Google Cloud Shell V1 Client - Class Environment (1.3.5)

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

getId

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

Returns
Type Description
string

setId

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

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

getState

Output only. Current execution state of this environment.

Returns
Type Description
int

setState

Output only. Current execution state of this environment.

Parameter
Name Description
var int
Returns
Type Description
$this

getWebHost

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

Returns
Type Description
string

setWebHost

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

Parameter
Name Description
var string
Returns
Type Description
$this

getSshUsername

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

Returns
Type Description
string

setSshUsername

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

Parameter
Name Description
var string
Returns
Type Description
$this

getSshHost

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

Returns
Type Description
string

setSshHost

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

Parameter
Name Description
var string
Returns
Type Description
$this

getSshPort

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

Returns
Type Description
int

setSshPort

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

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