public sealed class CloudShellServiceClientImpl : CloudShellServiceClient
Reference documentation and code samples for the Cloud Shell v1 API class CloudShellServiceClientImpl.
CloudShellService client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Shell.V1Assembly
Google.Cloud.Shell.V1.dll
Remarks
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.
Constructors
CloudShellServiceClientImpl(CloudShellServiceClient, CloudShellServiceSettings, ILogger)
public CloudShellServiceClientImpl(CloudShellService.CloudShellServiceClient grpcClient, CloudShellServiceSettings settings, ILogger logger)
Constructs a client wrapper for the CloudShellService service, with the specified gRPC client and settings.
Parameters | |
---|---|
Name | Description |
grpcClient | CloudShellServiceCloudShellServiceClient The underlying gRPC client. |
settings | CloudShellServiceSettings The base CloudShellServiceSettings used within this client. |
logger | ILogger Optional ILogger to use within this client. |
Properties
AddPublicKeyOperationsClient
public override OperationsClient AddPublicKeyOperationsClient { get; }
The long-running operations client for AddPublicKey
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
AuthorizeEnvironmentOperationsClient
public override OperationsClient AuthorizeEnvironmentOperationsClient { get; }
The long-running operations client for AuthorizeEnvironment
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public override CloudShellService.CloudShellServiceClient GrpcClient { get; }
The underlying gRPC CloudShellService client
Property Value | |
---|---|
Type | Description |
CloudShellServiceCloudShellServiceClient |
RemovePublicKeyOperationsClient
public override OperationsClient RemovePublicKeyOperationsClient { get; }
The long-running operations client for RemovePublicKey
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
StartEnvironmentOperationsClient
public override OperationsClient StartEnvironmentOperationsClient { get; }
The long-running operations client for StartEnvironment
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
AddPublicKey(AddPublicKeyRequest, CallSettings)
public override Operation<AddPublicKeyResponse, AddPublicKeyMetadata> AddPublicKey(AddPublicKeyRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | AddPublicKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationAddPublicKeyResponseAddPublicKeyMetadata | The RPC response. |
AddPublicKeyAsync(AddPublicKeyRequest, CallSettings)
public override Task<Operation<AddPublicKeyResponse, AddPublicKeyMetadata>> AddPublicKeyAsync(AddPublicKeyRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | AddPublicKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationAddPublicKeyResponseAddPublicKeyMetadata | A Task containing the RPC response. |
AuthorizeEnvironment(AuthorizeEnvironmentRequest, CallSettings)
public override Operation<AuthorizeEnvironmentResponse, AuthorizeEnvironmentMetadata> AuthorizeEnvironment(AuthorizeEnvironmentRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | AuthorizeEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationAuthorizeEnvironmentResponseAuthorizeEnvironmentMetadata | The RPC response. |
AuthorizeEnvironmentAsync(AuthorizeEnvironmentRequest, CallSettings)
public override Task<Operation<AuthorizeEnvironmentResponse, AuthorizeEnvironmentMetadata>> AuthorizeEnvironmentAsync(AuthorizeEnvironmentRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | AuthorizeEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationAuthorizeEnvironmentResponseAuthorizeEnvironmentMetadata | A Task containing the RPC response. |
GetEnvironment(GetEnvironmentRequest, CallSettings)
public override Environment GetEnvironment(GetEnvironmentRequest request, CallSettings callSettings = null)
Gets an environment. Returns NOT_FOUND if the environment does not exist.
Parameters | |
---|---|
Name | Description |
request | GetEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Environment | The RPC response. |
GetEnvironmentAsync(GetEnvironmentRequest, CallSettings)
public override Task<Environment> GetEnvironmentAsync(GetEnvironmentRequest request, CallSettings callSettings = null)
Gets an environment. Returns NOT_FOUND if the environment does not exist.
Parameters | |
---|---|
Name | Description |
request | GetEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskEnvironment | A Task containing the RPC response. |
RemovePublicKey(RemovePublicKeyRequest, CallSettings)
public override Operation<RemovePublicKeyResponse, RemovePublicKeyMetadata> RemovePublicKey(RemovePublicKeyRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | RemovePublicKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationRemovePublicKeyResponseRemovePublicKeyMetadata | The RPC response. |
RemovePublicKeyAsync(RemovePublicKeyRequest, CallSettings)
public override Task<Operation<RemovePublicKeyResponse, RemovePublicKeyMetadata>> RemovePublicKeyAsync(RemovePublicKeyRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | RemovePublicKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationRemovePublicKeyResponseRemovePublicKeyMetadata | A Task containing the RPC response. |
StartEnvironment(StartEnvironmentRequest, CallSettings)
public override Operation<StartEnvironmentResponse, StartEnvironmentMetadata> StartEnvironment(StartEnvironmentRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | StartEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationStartEnvironmentResponseStartEnvironmentMetadata | The RPC response. |
StartEnvironmentAsync(StartEnvironmentRequest, CallSettings)
public override Task<Operation<StartEnvironmentResponse, StartEnvironmentMetadata>> StartEnvironmentAsync(StartEnvironmentRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | StartEnvironmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationStartEnvironmentResponseStartEnvironmentMetadata | A Task containing the RPC response. |