Google Cloud Shell V1 Client - Class Environment (1.1.1)

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

A Cloud Shell environment, which is defined as the combination of a Docker image specifying what is installed on the environment and a home directory containing the user's data that will remain across sessions. Each user has at least an environment with the ID "default".

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

Namespace

Google \ Cloud \ Shell \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Immutable. Full name of this resource, in the format users/{owner_email}/environments/{environment_id}. {owner_email} is the email address of the user to whom this environment belongs, and {environment_id} is the identifier of this environment. For example, users/someone@example.com/environments/default.

↳ id string

Output only. The environment's identifier, unique among the user's environments.

↳ docker_image string

Required. Immutable. Full path to the Docker image used to run this environment, e.g. "gcr.io/dev-con/cloud-devshell:latest".

↳ state int

Output only. Current execution state of this environment.

↳ web_host string

Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment.

↳ ssh_username string

Output only. Username that clients should use when initiating SSH sessions with the environment.

↳ ssh_host string

Output only. Host to which clients can connect to initiate SSH sessions with the environment.

↳ ssh_port int

Output only. Port to which clients can connect to initiate SSH sessions with the environment.

↳ public_keys array

Output only. Public keys associated with the environment. Clients can connect to this environment via SSH only if they possess a private key corresponding to at least one of these public keys. Keys can be added to or removed from the environment using the AddPublicKey and RemovePublicKey methods.

getName

Immutable. Full name of this resource, in the format users/{owner_email}/environments/{environment_id}. {owner_email} is the email address of the user to whom this environment belongs, and {environment_id} is the identifier of this environment. For example, users/someone@example.com/environments/default.

Returns
TypeDescription
string

setName

Immutable. Full name of this resource, in the format users/{owner_email}/environments/{environment_id}. {owner_email} is the email address of the user to whom this environment belongs, and {environment_id} is the identifier of this environment. For example, users/someone@example.com/environments/default.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getId

Output only. The environment's identifier, unique among the user's environments.

Returns
TypeDescription
string

setId

Output only. The environment's identifier, unique among the user's environments.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDockerImage

Required. Immutable. Full path to the Docker image used to run this environment, e.g.

"gcr.io/dev-con/cloud-devshell:latest".

Returns
TypeDescription
string

setDockerImage

Required. Immutable. Full path to the Docker image used to run this environment, e.g.

"gcr.io/dev-con/cloud-devshell:latest".

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getState

Output only. Current execution state of this environment.

Returns
TypeDescription
int

setState

Output only. Current execution state of this environment.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getWebHost

Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment.

Returns
TypeDescription
string

setWebHost

Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSshUsername

Output only. Username that clients should use when initiating SSH sessions with the environment.

Returns
TypeDescription
string

setSshUsername

Output only. Username that clients should use when initiating SSH sessions with the environment.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSshHost

Output only. Host to which clients can connect to initiate SSH sessions with the environment.

Returns
TypeDescription
string

setSshHost

Output only. Host to which clients can connect to initiate SSH sessions with the environment.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSshPort

Output only. Port to which clients can connect to initiate SSH sessions with the environment.

Returns
TypeDescription
int

setSshPort

Output only. Port to which clients can connect to initiate SSH sessions with the environment.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getPublicKeys

Output only. Public keys associated with the environment. Clients can connect to this environment via SSH only if they possess a private key corresponding to at least one of these public keys. Keys can be added to or removed from the environment using the AddPublicKey and RemovePublicKey methods.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setPublicKeys

Output only. Public keys associated with the environment. Clients can connect to this environment via SSH only if they possess a private key corresponding to at least one of these public keys. Keys can be added to or removed from the environment using the AddPublicKey and RemovePublicKey methods.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this