Class CloudShellServiceClientImpl (2.0.0)

public sealed class CloudShellServiceClientImpl : CloudShellServiceClient

CloudShellService client wrapper implementation, for convenient use.

Inheritance

Object > CloudShellServiceClient > CloudShellServiceClientImpl

Namespace

Google.Cloud.Shell.V1

Assembly

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
NameDescription
grpcClientCloudShellService.CloudShellServiceClient

The underlying gRPC client.

settingsCloudShellServiceSettings

The base CloudShellServiceSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

AddPublicKeyOperationsClient

public override OperationsClient AddPublicKeyOperationsClient { get; }

The long-running operations client for AddPublicKey.

Property Value
TypeDescription
OperationsClient
Overrides

AuthorizeEnvironmentOperationsClient

public override OperationsClient AuthorizeEnvironmentOperationsClient { get; }

The long-running operations client for AuthorizeEnvironment.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override CloudShellService.CloudShellServiceClient GrpcClient { get; }

The underlying gRPC CloudShellService client

Property Value
TypeDescription
CloudShellService.CloudShellServiceClient
Overrides

RemovePublicKeyOperationsClient

public override OperationsClient RemovePublicKeyOperationsClient { get; }

The long-running operations client for RemovePublicKey.

Property Value
TypeDescription
OperationsClient
Overrides

StartEnvironmentOperationsClient

public override OperationsClient StartEnvironmentOperationsClient { get; }

The long-running operations client for StartEnvironment.

Property Value
TypeDescription
OperationsClient
Overrides

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
NameDescription
requestAddPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<AddPublicKeyResponse, AddPublicKeyMetadata>

The RPC response.

Overrides

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
NameDescription
requestAddPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<AddPublicKeyResponse, AddPublicKeyMetadata>>

A Task containing the RPC response.

Overrides

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
NameDescription
requestAuthorizeEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<AuthorizeEnvironmentResponse, AuthorizeEnvironmentMetadata>

The RPC response.

Overrides

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
NameDescription
requestAuthorizeEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<AuthorizeEnvironmentResponse, AuthorizeEnvironmentMetadata>>

A Task containing the RPC response.

Overrides

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
NameDescription
requestGetEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Environment

The RPC response.

Overrides

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
NameDescription
requestGetEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Environment>

A Task containing the RPC response.

Overrides

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
NameDescription
requestRemovePublicKeyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RemovePublicKeyResponse, RemovePublicKeyMetadata>

The RPC response.

Overrides

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
NameDescription
requestRemovePublicKeyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RemovePublicKeyResponse, RemovePublicKeyMetadata>>

A Task containing the RPC response.

Overrides

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
NameDescription
requestStartEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<StartEnvironmentResponse, StartEnvironmentMetadata>

The RPC response.

Overrides

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
NameDescription
requestStartEnvironmentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<StartEnvironmentResponse, StartEnvironmentMetadata>>

A Task containing the RPC response.

Overrides