- 2.51.0 (latest)
- 2.50.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.38.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.1.11
The interfaces provided are listed below, along with usage samples.
CloudShellServiceClient
Service Description: 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.
Sample for CloudShellServiceClient:
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
EnvironmentName name = EnvironmentName.of("[USER]", "[ENVIRONMENT]");
Environment response = cloudShellServiceClient.getEnvironment(name);
}
Classes
AddPublicKeyMetadata
Message included in the metadata field of operations returned from AddPublicKey.
Protobuf type google.cloud.shell.v1.AddPublicKeyMetadata
AddPublicKeyMetadata.Builder
Message included in the metadata field of operations returned from AddPublicKey.
Protobuf type google.cloud.shell.v1.AddPublicKeyMetadata
AddPublicKeyRequest
Request message for AddPublicKey.
Protobuf type google.cloud.shell.v1.AddPublicKeyRequest
AddPublicKeyRequest.Builder
Request message for AddPublicKey.
Protobuf type google.cloud.shell.v1.AddPublicKeyRequest
AddPublicKeyResponse
Response message for AddPublicKey.
Protobuf type google.cloud.shell.v1.AddPublicKeyResponse
AddPublicKeyResponse.Builder
Response message for AddPublicKey.
Protobuf type google.cloud.shell.v1.AddPublicKeyResponse
AuthorizeEnvironmentMetadata
Message included in the metadata field of operations returned from AuthorizeEnvironment.
Protobuf type google.cloud.shell.v1.AuthorizeEnvironmentMetadata
AuthorizeEnvironmentMetadata.Builder
Message included in the metadata field of operations returned from AuthorizeEnvironment.
Protobuf type google.cloud.shell.v1.AuthorizeEnvironmentMetadata
AuthorizeEnvironmentRequest
Request message for AuthorizeEnvironment.
Protobuf type google.cloud.shell.v1.AuthorizeEnvironmentRequest
AuthorizeEnvironmentRequest.Builder
Request message for AuthorizeEnvironment.
Protobuf type google.cloud.shell.v1.AuthorizeEnvironmentRequest
AuthorizeEnvironmentResponse
Response message for AuthorizeEnvironment.
Protobuf type google.cloud.shell.v1.AuthorizeEnvironmentResponse
AuthorizeEnvironmentResponse.Builder
Response message for AuthorizeEnvironment.
Protobuf type google.cloud.shell.v1.AuthorizeEnvironmentResponse
CloudShellErrorDetails
Cloud-shell specific information that will be included as details in failure responses.
Protobuf type google.cloud.shell.v1.CloudShellErrorDetails
CloudShellErrorDetails.Builder
Cloud-shell specific information that will be included as details in failure responses.
Protobuf type google.cloud.shell.v1.CloudShellErrorDetails
CloudShellProto
CloudShellServiceClient
Service Description: 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.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
EnvironmentName name = EnvironmentName.of("[USER]", "[ENVIRONMENT]");
Environment response = cloudShellServiceClient.getEnvironment(name);
}
Note: close() needs to be called on the CloudShellServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of CloudShellServiceSettings to create(). For example:
To customize credentials:
CloudShellServiceSettings cloudShellServiceSettings =
CloudShellServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
CloudShellServiceClient cloudShellServiceClient =
CloudShellServiceClient.create(cloudShellServiceSettings);
To customize the endpoint:
CloudShellServiceSettings cloudShellServiceSettings =
CloudShellServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
CloudShellServiceClient cloudShellServiceClient =
CloudShellServiceClient.create(cloudShellServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
CloudShellServiceGrpc
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.
CloudShellServiceGrpc.CloudShellServiceBlockingStub
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.
CloudShellServiceGrpc.CloudShellServiceFutureStub
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.
CloudShellServiceGrpc.CloudShellServiceImplBase
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.
CloudShellServiceGrpc.CloudShellServiceStub
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.
CloudShellServiceSettings
Settings class to configure an instance of CloudShellServiceClient.
The default instance has everything set to sensible defaults:
- The default service address (cloudshell.googleapis.com) and default port (443) are used.
- Credentials are acquired automatically through Application Default Credentials.
- Retries are configured for idempotent methods but not for non-idempotent methods.
The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.
For example, to set the total timeout of getEnvironment to 30 seconds:
CloudShellServiceSettings.Builder cloudShellServiceSettingsBuilder =
CloudShellServiceSettings.newBuilder();
cloudShellServiceSettingsBuilder
.getEnvironmentSettings()
.setRetrySettings(
cloudShellServiceSettingsBuilder
.getEnvironmentSettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
CloudShellServiceSettings cloudShellServiceSettings = cloudShellServiceSettingsBuilder.build();
CloudShellServiceSettings.Builder
Builder for CloudShellServiceSettings.
CreateEnvironmentMetadata
Message included in the metadata field of operations returned from CreateEnvironment.
Protobuf type google.cloud.shell.v1.CreateEnvironmentMetadata
CreateEnvironmentMetadata.Builder
Message included in the metadata field of operations returned from CreateEnvironment.
Protobuf type google.cloud.shell.v1.CreateEnvironmentMetadata
DeleteEnvironmentMetadata
Message included in the metadata field of operations returned from DeleteEnvironment.
Protobuf type google.cloud.shell.v1.DeleteEnvironmentMetadata
DeleteEnvironmentMetadata.Builder
Message included in the metadata field of operations returned from DeleteEnvironment.
Protobuf type google.cloud.shell.v1.DeleteEnvironmentMetadata
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".
Protobuf type google.cloud.shell.v1.Environment
Environment.Builder
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".
Protobuf type google.cloud.shell.v1.Environment
EnvironmentName
EnvironmentName.Builder
Builder for users/{user}/environments/{environment}.
GetEnvironmentRequest
Request message for GetEnvironment.
Protobuf type google.cloud.shell.v1.GetEnvironmentRequest
GetEnvironmentRequest.Builder
Request message for GetEnvironment.
Protobuf type google.cloud.shell.v1.GetEnvironmentRequest
RemovePublicKeyMetadata
Message included in the metadata field of operations returned from RemovePublicKey.
Protobuf type google.cloud.shell.v1.RemovePublicKeyMetadata
RemovePublicKeyMetadata.Builder
Message included in the metadata field of operations returned from RemovePublicKey.
Protobuf type google.cloud.shell.v1.RemovePublicKeyMetadata
RemovePublicKeyRequest
Request message for RemovePublicKey.
Protobuf type google.cloud.shell.v1.RemovePublicKeyRequest
RemovePublicKeyRequest.Builder
Request message for RemovePublicKey.
Protobuf type google.cloud.shell.v1.RemovePublicKeyRequest
RemovePublicKeyResponse
Response message for RemovePublicKey.
Protobuf type google.cloud.shell.v1.RemovePublicKeyResponse
RemovePublicKeyResponse.Builder
Response message for RemovePublicKey.
Protobuf type google.cloud.shell.v1.RemovePublicKeyResponse
StartEnvironmentMetadata
Message included in the metadata field of operations returned from StartEnvironment.
Protobuf type google.cloud.shell.v1.StartEnvironmentMetadata
StartEnvironmentMetadata.Builder
Message included in the metadata field of operations returned from StartEnvironment.
Protobuf type google.cloud.shell.v1.StartEnvironmentMetadata
StartEnvironmentRequest
Request message for StartEnvironment.
Protobuf type google.cloud.shell.v1.StartEnvironmentRequest
StartEnvironmentRequest.Builder
Request message for StartEnvironment.
Protobuf type google.cloud.shell.v1.StartEnvironmentRequest
StartEnvironmentResponse
Message included in the response field of operations returned from StartEnvironment once the operation is complete.
Protobuf type google.cloud.shell.v1.StartEnvironmentResponse
StartEnvironmentResponse.Builder
Message included in the response field of operations returned from StartEnvironment once the operation is complete.
Protobuf type google.cloud.shell.v1.StartEnvironmentResponse
Interfaces
AddPublicKeyMetadataOrBuilder
AddPublicKeyRequestOrBuilder
AddPublicKeyResponseOrBuilder
AuthorizeEnvironmentMetadataOrBuilder
AuthorizeEnvironmentRequestOrBuilder
AuthorizeEnvironmentResponseOrBuilder
CloudShellErrorDetailsOrBuilder
CreateEnvironmentMetadataOrBuilder
DeleteEnvironmentMetadataOrBuilder
EnvironmentOrBuilder
GetEnvironmentRequestOrBuilder
RemovePublicKeyMetadataOrBuilder
RemovePublicKeyRequestOrBuilder
RemovePublicKeyResponseOrBuilder
StartEnvironmentMetadataOrBuilder
StartEnvironmentRequestOrBuilder
StartEnvironmentResponseOrBuilder
Enums
CloudShellErrorDetails.CloudShellErrorCode
Set of possible errors returned from API calls.
Protobuf enum google.cloud.shell.v1.CloudShellErrorDetails.CloudShellErrorCode
Environment.State
Possible execution states for an environment.
Protobuf enum google.cloud.shell.v1.Environment.State
StartEnvironmentMetadata.State
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.
Protobuf enum google.cloud.shell.v1.StartEnvironmentMetadata.State