public sealed class CloudShellServiceClientImpl : CloudShellServiceClient
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(CloudShellService.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 | CloudShellService.CloudShellServiceClient 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 |
CloudShellService.CloudShellServiceClient |
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 |
Operation<AddPublicKeyResponse, AddPublicKeyMetadata> | The RPC response. |
AddPublicKeyAsync(AddPublicKeyRequest, CallSettings)
public override async 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 |
Task<Operation<AddPublicKeyResponse, AddPublicKeyMetadata>> | 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 |
Operation<AuthorizeEnvironmentResponse, AuthorizeEnvironmentMetadata> | The RPC response. |
AuthorizeEnvironmentAsync(AuthorizeEnvironmentRequest, CallSettings)
public override async 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 |
Task<Operation<AuthorizeEnvironmentResponse, AuthorizeEnvironmentMetadata>> | 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 |
Task<Environment> | 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 |
Operation<RemovePublicKeyResponse, RemovePublicKeyMetadata> | The RPC response. |
RemovePublicKeyAsync(RemovePublicKeyRequest, CallSettings)
public override async 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 |
Task<Operation<RemovePublicKeyResponse, RemovePublicKeyMetadata>> | 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 |
Operation<StartEnvironmentResponse, StartEnvironmentMetadata> | The RPC response. |
StartEnvironmentAsync(StartEnvironmentRequest, CallSettings)
public override async 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 |
Task<Operation<StartEnvironmentResponse, StartEnvironmentMetadata>> | A Task containing the RPC response. |