Google Cloud Shell V1 Client - Class AddPublicKeyRequest (1.2.2)

Reference documentation and code samples for the Google Cloud Shell V1 Client class AddPublicKeyRequest.

Request message for AddPublicKey.

Generated from protobuf message google.cloud.shell.v1.AddPublicKeyRequest

Namespace

Google \ Cloud \ Shell \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
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 are ssh-dss (see RFC4253), ssh-rsa (see RFC4253), ecdsa-sha2-nistp256 (see RFC5656), ecdsa-sha2-nistp384 (see RFC5656) and ecdsa-sha2-nistp521 (see RFC5656). It should be structured as

getEnvironment

Environment this key should be added to, e.g.

users/me/environments/default.

Returns
TypeDescription
string

setEnvironment

Environment this key should be added to, e.g.

users/me/environments/default.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getKey

Key that should be added to the environment. Supported formats are ssh-dss (see RFC4253), ssh-rsa (see RFC4253), ecdsa-sha2-nistp256 (see RFC5656), ecdsa-sha2-nistp384 (see RFC5656) and ecdsa-sha2-nistp521 (see RFC5656). It should be structured as

Returns
TypeDescription
string

setKey

Key that should be added to the environment. Supported formats are ssh-dss (see RFC4253), ssh-rsa (see RFC4253), ecdsa-sha2-nistp256 (see RFC5656), ecdsa-sha2-nistp384 (see RFC5656) and ecdsa-sha2-nistp521 (see RFC5656). It should be structured as

Parameter
NameDescription
var string
Returns
TypeDescription
$this