# Cloud Shell V1 API - Class Google::Cloud::Shell::V1::Environment (v1.8.0)

1.8.0 (latest) 1.7.1 1.6.0 1.5.1 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 0.8.0 0.7.2 0.6.0 0.5.1 0.4.0 0.3.0 0.2.0 0.1.4 Reference documentation and code samples for the Cloud Shell V1 API class Google::Cloud::Shell::V1::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".

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #docker_image

    def docker_image() -> ::String

**Returns**

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

### #docker_image=

    def docker_image=(value) -> ::String

**Parameter**

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

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

### #id

    def id() -> ::String

**Returns**

- (::String) --- Output only. The environment's identifier, unique among the user's environments.

### #name

    def name() -> ::String

**Returns**

- (::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`.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::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`.
**Returns**

- (::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`.

### #public_keys

    def public_keys() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- 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.

### #ssh_host

    def ssh_host() -> ::String

**Returns**

- (::String) --- Output only. Host to which clients can connect to initiate SSH sessions with the environment.

### #ssh_port

    def ssh_port() -> ::Integer

**Returns**

- (::Integer) --- Output only. Port to which clients can connect to initiate SSH sessions with the environment.

### #ssh_username

    def ssh_username() -> ::String

**Returns**

- (::String) --- Output only. Username that clients should use when initiating SSH sessions with the environment.

### #state

    def state() -> ::Google::Cloud::Shell::V1::Environment::State

**Returns**

- ([::Google::Cloud::Shell::V1::Environment::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-shell-v1/latest/Google-Cloud-Shell-V1-Environment-State)) --- Output only. Current execution state of this environment.

### #web_host

    def web_host() -> ::String

**Returns**

- (::String) --- Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment.