Generated from protobuf messagegoogle.cloud.shell.v1.AddPublicKeyRequest
Namespace
Google \ Cloud \ Shell \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ environment
string
Environment this key should be added to, e.g.users/me/environments/default.
↳ key
string
Key that should be added to the environment. Supported formats aressh-dss(see RFC4253),ssh-rsa(see RFC4253),ecdsa-sha2-nistp256(see RFC5656),ecdsa-sha2-nistp384(see RFC5656) andecdsa-sha2-nistp521(see RFC5656). It should be structured as
getEnvironment
Environment this key should be added to, e.g.
users/me/environments/default.
Returns
Type
Description
string
setEnvironment
Environment this key should be added to, e.g.
users/me/environments/default.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getKey
Key that should be added to the environment. Supported formats aressh-dss(see RFC4253),ssh-rsa(see RFC4253),ecdsa-sha2-nistp256(see RFC5656),ecdsa-sha2-nistp384(see RFC5656) andecdsa-sha2-nistp521(see RFC5656). It should be structured as
Returns
Type
Description
string
setKey
Key that should be added to the environment. Supported formats aressh-dss(see RFC4253),ssh-rsa(see RFC4253),ecdsa-sha2-nistp256(see RFC5656),ecdsa-sha2-nistp384(see RFC5656) andecdsa-sha2-nistp521(see RFC5656). It should be structured as
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Shell V1 Client - Class AddPublicKeyRequest (2.0.5)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.5 (latest)](/php/docs/reference/cloud-shell/latest/V1.AddPublicKeyRequest)\n- [2.0.4](/php/docs/reference/cloud-shell/2.0.4/V1.AddPublicKeyRequest)\n- [1.3.5](/php/docs/reference/cloud-shell/1.3.5/V1.AddPublicKeyRequest)\n- [1.2.2](/php/docs/reference/cloud-shell/1.2.2/V1.AddPublicKeyRequest)\n- [1.1.1](/php/docs/reference/cloud-shell/1.1.1/V1.AddPublicKeyRequest)\n- [1.0.4](/php/docs/reference/cloud-shell/1.0.4/V1.AddPublicKeyRequest) \nReference documentation and code samples for the Google Cloud Shell V1 Client class AddPublicKeyRequest.\n\nRequest message for\n[AddPublicKey](/php/docs/reference/cloud-shell/latest/V1.Client.CloudShellServiceClient#_Google_Cloud_Shell_V1_Client_CloudShellServiceClient__addPublicKey__).\n\nGenerated from protobuf message `google.cloud.shell.v1.AddPublicKeyRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Shell \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getEnvironment\n\nEnvironment this key should be added to, e.g.\n\n`users/me/environments/default`.\n\n### setEnvironment\n\nEnvironment this key should be added to, e.g.\n\n`users/me/environments/default`.\n\n### getKey\n\nKey that should be added to the environment. Supported formats are\n`ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256`\n(see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and\n`ecdsa-sha2-nistp521` (see RFC5656). It should be structured as\n\n\n### setKey\n\nKey that should be added to the environment. Supported formats are\n`ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256`\n(see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and\n`ecdsa-sha2-nistp521` (see RFC5656). It should be structured as"]]