As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Shell v1 API

class google.cloud.shell_v1.types.AddPublicKeyMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message included in the metadata field of operations returned from [AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey].

class google.cloud.shell_v1.types.AddPublicKeyRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey].

environment

Environment this key should be added to, e.g. users/me/environments/default.

Type

str

key

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 <format> <content>, where <content> part is encoded with Base64.

Type

str

class google.cloud.shell_v1.types.AddPublicKeyResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for [AddPublicKey][google.cloud.shell.v1.CloudShellService.AddPublicKey].

key

Key that was added to the environment.

Type

str

class google.cloud.shell_v1.types.AuthorizeEnvironmentMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message included in the metadata field of operations returned from [AuthorizeEnvironment][google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment].

class google.cloud.shell_v1.types.AuthorizeEnvironmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [AuthorizeEnvironment][google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment].

name

Name of the resource that should receive the credentials, for example users/me/environments/default or users/someone@example.com/environments/default.

Type

str

access_token

The OAuth access token that should be sent to the environment.

Type

str

id_token

The OAuth ID token that should be sent to the environment.

Type

str

expire_time

The time when the credentials expire. If not set, defaults to one hour from when the server received the request.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.cloud.shell_v1.types.AuthorizeEnvironmentResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for [AuthorizeEnvironment][google.cloud.shell.v1.CloudShellService.AuthorizeEnvironment].

class google.cloud.shell_v1.types.CloudShellErrorDetails(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Cloud-shell specific information that will be included as details in failure responses.

code

Code indicating the specific error the occurred.

Type

google.cloud.shell_v1.types.CloudShellErrorDetails.CloudShellErrorCode

class CloudShellErrorCode(value)[source]

Bases: proto.enums.Enum

Set of possible errors returned from API calls.

CLOUD_SHELL_DISABLED = 2
CLOUD_SHELL_ERROR_CODE_UNSPECIFIED = 0
IMAGE_UNAVAILABLE = 1
QUOTA_EXCEEDED = 5
TOS_VIOLATION = 4
class google.cloud.shell_v1.types.CreateEnvironmentMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message included in the metadata field of operations returned from [CreateEnvironment][google.cloud.shell.v1.CloudShellService.CreateEnvironment].

class google.cloud.shell_v1.types.DeleteEnvironmentMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message included in the metadata field of operations returned from [DeleteEnvironment][google.cloud.shell.v1.CloudShellService.DeleteEnvironment].

class google.cloud.shell_v1.types.Environment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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”.

name

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.

Type

str

id

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

Type

str

docker_image

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

Type

str

state

Output only. Current execution state of this environment.

Type

google.cloud.shell_v1.types.Environment.State

web_host

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

Type

str

ssh_username

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

Type

str

ssh_host

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

Type

str

ssh_port

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

Type

int

public_keys

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.

Type

Sequence[str]

class State(value)[source]

Bases: proto.enums.Enum

Possible execution states for an environment.

DELETING = 4
PENDING = 2
RUNNING = 3
STATE_UNSPECIFIED = 0
SUSPENDED = 1
class google.cloud.shell_v1.types.GetEnvironmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [GetEnvironment][google.cloud.shell.v1.CloudShellService.GetEnvironment].

name

Required. Name of the requested resource, for example users/me/environments/default or users/someone@example.com/environments/default.

Type

str

class google.cloud.shell_v1.types.RemovePublicKeyMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message included in the metadata field of operations returned from [RemovePublicKey][google.cloud.shell.v1.CloudShellService.RemovePublicKey].

class google.cloud.shell_v1.types.RemovePublicKeyRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [RemovePublicKey][google.cloud.shell.v1.CloudShellService.RemovePublicKey].

environment

Environment this key should be removed from, e.g. users/me/environments/default.

Type

str

key

Key that should be removed from the environment.

Type

str

class google.cloud.shell_v1.types.RemovePublicKeyResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for [RemovePublicKey][google.cloud.shell.v1.CloudShellService.RemovePublicKey].

class google.cloud.shell_v1.types.StartEnvironmentMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message included in the metadata field of operations returned from [StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment].

state

Current state of the environment being started.

Type

google.cloud.shell_v1.types.StartEnvironmentMetadata.State

class State(value)[source]

Bases: proto.enums.Enum

Possible states an environment might transition between during startup. These states are not normally actionable by clients, but may be used to show a progress message to the user. An environment won’t necessarily go through all of these states when starting. More states are likely to be added in the future.

AWAITING_COMPUTE_RESOURCES = 4
FINISHED = 3
STARTING = 1
STATE_UNSPECIFIED = 0
UNARCHIVING_DISK = 2
class google.cloud.shell_v1.types.StartEnvironmentRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment].

name

Name of the resource that should be started, for example users/me/environments/default or users/someone@example.com/environments/default.

Type

str

access_token

The initial access token passed to the environment. If this is present and valid, the environment will be pre-authenticated with gcloud so that the user can run gcloud commands in Cloud Shell without having to log in. This code can be updated later by calling AuthorizeEnvironment.

Type

str

public_keys

Public keys that should be added to the environment before it is started.

Type

Sequence[str]

class google.cloud.shell_v1.types.StartEnvironmentResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Message included in the response field of operations returned from [StartEnvironment][google.cloud.shell.v1.CloudShellService.StartEnvironment] once the operation is complete.

environment

Environment that was started.

Type

google.cloud.shell_v1.types.Environment