Google Cloud Shell V1 Client - Class AddPublicKeyRequest (2.1.1)

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
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 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
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 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
Type Description
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
Name Description
var string
Returns
Type Description
$this

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.