Index
CloudShellService(interface)AddPublicKeyMetadata(message)AddPublicKeyRequest(message)AddPublicKeyResponse(message)AuthorizeEnvironmentMetadata(message)AuthorizeEnvironmentRequest(message)AuthorizeEnvironmentResponse(message)CloudShellErrorDetails(message)CloudShellErrorDetails.CloudShellErrorCode(enum)CreateEnvironmentMetadata(message)DeleteEnvironmentMetadata(message)Environment(message)Environment.State(enum)GetEnvironmentRequest(message)RemovePublicKeyMetadata(message)RemovePublicKeyRequest(message)RemovePublicKeyResponse(message)StartEnvironmentMetadata(message)StartEnvironmentMetadata.State(enum)StartEnvironmentRequest(message)StartEnvironmentResponse(message)
CloudShellService
API for interacting with Google Cloud Shell. Each user of Cloud Shell has at least one environment, which has the ID "default". Environment consists of a Docker image defining what is installed on the environment and a home directory containing the user's data that will remain across sessions. Clients use this API to start and fetch information about their environment, which can then be used to connect to that environment via a separate SSH client.
| AddPublicKey |
|---|
|
Adds a public SSH key to an environment, allowing clients with the corresponding private key to connect to that environment via SSH. If a key with the same content already exists, this will error with ALREADY_EXISTS.
|
| AuthorizeEnvironment |
|---|
|
Sends OAuth credentials to a running environment on behalf of a user. When this completes, the environment will be authorized to run various Google Cloud command line tools without requiring the user to manually authenticate.
|
| GetEnvironment |
|---|
|
Gets an environment. Returns NOT_FOUND if the environment does not exist.
|
| RemovePublicKey |
|---|
|
Removes a public SSH key from an environment. Clients will no longer be able to connect to the environment using the corresponding private key. If a key with the same content is not present, this will error with NOT_FOUND.
|
| StartEnvironment |
|---|
|
Starts an existing environment, allowing clients to connect to it. The returned operation will contain an instance of StartEnvironmentMetadata in its metadata field. Users can wait for the environment to start by polling this operation via GetOperation. Once the environment has finished starting and is ready to accept connections, the operation will contain a StartEnvironmentResponse in its response field.
|
AddPublicKeyMetadata
This type has no fields.
Message included in the metadata field of operations returned from AddPublicKey.
AddPublicKeyRequest
Request message for AddPublicKey.
| Fields | |
|---|---|
environment |
Environment this key should be added to, e.g. |
key |
Key that should be added to the environment. Supported formats are |
AddPublicKeyResponse
Response message for AddPublicKey.
| Fields | |
|---|---|
key |
Key that was added to the environment. |
AuthorizeEnvironmentMetadata
This type has no fields.
Message included in the metadata field of operations returned from AuthorizeEnvironment.
AuthorizeEnvironmentRequest
Request message for AuthorizeEnvironment.
| Fields | |
|---|---|
name |
Name of the resource that should receive the credentials, for example |
access_token |
The OAuth access token that should be sent to the environment. |
id_token |
The OAuth ID token that should be sent to the environment. |
expire_time |
The time when the credentials expire. If not set, defaults to one hour from when the server received the request. |
AuthorizeEnvironmentResponse
This type has no fields.
Response message for AuthorizeEnvironment.
CloudShellErrorDetails
Cloud-shell specific information that will be included as details in failure responses.
| Fields | |
|---|---|
code |
Code indicating the specific error the occurred. |
CloudShellErrorCode
Set of possible errors returned from API calls.
| Enums | |
|---|---|
CLOUD_SHELL_ERROR_CODE_UNSPECIFIED |
An unknown error occurred. |
IMAGE_UNAVAILABLE |
The image used by the Cloud Shell environment either does not exist or the user does not have access to it. |
CLOUD_SHELL_DISABLED |
Cloud Shell has been disabled by an administrator for the user making the request. |
TOS_VIOLATION |
Cloud Shell has been permanently disabled due to a Terms of Service violation by the user. |
QUOTA_EXCEEDED |
The user has exhausted their weekly Cloud Shell quota, and Cloud Shell will be disabled until the quota resets. |
ENVIRONMENT_UNAVAILABLE |
The Cloud Shell environment is unavailable and cannot be connected to at the moment. |
WORKSPACE_ACCOUNT_NOT_ELIGIBLE |
The Workspace user is not eligible to use Cloud Shell. Please see: https://support.google.com/a/answer/14889350. |
CreateEnvironmentMetadata
This type has no fields.
Message included in the metadata field of operations returned from CreateEnvironment.
DeleteEnvironmentMetadata
This type has no fields.
Message included in the metadata field of operations returned from DeleteEnvironment.
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".
| Fields | |
|---|---|
name |
Immutable. Full name of this resource, in the format |
id |
Output only. The environment's identifier, unique among the user's environments. |
docker_image |
Required. Immutable. Full path to the Docker image used to run this environment, e.g. "gcr.io/dev-con/cloud-devshell:latest". |
state |
Output only. Current execution state of this environment. |
web_host |
Output only. Host to which clients can connect to initiate HTTPS or WSS connections with the environment. |
ssh_username |
Output only. Username that clients should use when initiating SSH sessions with the environment. |
ssh_host |
Output only. Host to which clients can connect to initiate SSH sessions with the environment. |
ssh_port |
Output only. Port to which clients can connect to initiate SSH sessions with the environment. |
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. |
State
Possible execution states for an environment.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
The environment's states is unknown. |
SUSPENDED |
The environment is not running and can't be connected to. Starting the environment will transition it to the PENDING state. |
PENDING |
The environment is being started but is not yet ready to accept connections. |
RUNNING |
The environment is running and ready to accept connections. It will automatically transition back to DISABLED after a period of inactivity or if another environment is started. |
DELETING |
The environment is being deleted and can't be connected to. |
GetEnvironmentRequest
Request message for GetEnvironment.
| Fields | |
|---|---|
name |
Required. Name of the requested resource, for example |
RemovePublicKeyMetadata
This type has no fields.
Message included in the metadata field of operations returned from RemovePublicKey.
RemovePublicKeyRequest
Request message for RemovePublicKey.