Cloud Shell v1 API - Class CloudShellService.CloudShellServiceClient (2.1.0)

public class CloudShellServiceClient : ClientBase<CloudShellService.CloudShellServiceClient>

Reference documentation and code samples for the Cloud Shell v1 API class CloudShellService.CloudShellServiceClient.

Client for CloudShellService

Inheritance

Object > ClientBase > ClientBase<CloudShellService.CloudShellServiceClient> > CloudShellService.CloudShellServiceClient

Namespace

Google.Cloud.Shell.V1

Assembly

Google.Cloud.Shell.V1.dll

Constructors

CloudShellServiceClient()

protected CloudShellServiceClient()

Protected parameterless constructor to allow creation of test doubles.

CloudShellServiceClient(CallInvoker)

public CloudShellServiceClient(CallInvoker callInvoker)

Creates a new client for CloudShellService that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

CloudShellServiceClient(ChannelBase)

public CloudShellServiceClient(ChannelBase channel)

Creates a new client for CloudShellService

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

CloudShellServiceClient(ClientBase.ClientBaseConfiguration)

protected CloudShellServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

AddPublicKey(AddPublicKeyRequest, CallOptions)

public virtual Operation AddPublicKey(AddPublicKeyRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

AddPublicKey(AddPublicKeyRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Operation AddPublicKey(AddPublicKeyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

AddPublicKeyAsync(AddPublicKeyRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> AddPublicKeyAsync(AddPublicKeyRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

AddPublicKeyAsync(AddPublicKeyRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Operation> AddPublicKeyAsync(AddPublicKeyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

AuthorizeEnvironment(AuthorizeEnvironmentRequest, CallOptions)

public virtual Operation AuthorizeEnvironment(AuthorizeEnvironmentRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

AuthorizeEnvironment(AuthorizeEnvironmentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Operation AuthorizeEnvironment(AuthorizeEnvironmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

AuthorizeEnvironmentAsync(AuthorizeEnvironmentRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> AuthorizeEnvironmentAsync(AuthorizeEnvironmentRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

AuthorizeEnvironmentAsync(AuthorizeEnvironmentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Operation> AuthorizeEnvironmentAsync(AuthorizeEnvironmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

CreateOperationsClient()

public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client.

Returns
TypeDescription
Operations.OperationsClient

A new Operations client for the same target as this client.

GetEnvironment(GetEnvironmentRequest, CallOptions)

public virtual Environment GetEnvironment(GetEnvironmentRequest request, CallOptions options)

Gets an environment. Returns NOT_FOUND if the environment does not exist.

Parameters
NameDescription
requestGetEnvironmentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Environment

The response received from the server.

GetEnvironment(GetEnvironmentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Environment GetEnvironment(GetEnvironmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Gets an environment. Returns NOT_FOUND if the environment does not exist.

Parameters
NameDescription
requestGetEnvironmentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Environment

The response received from the server.

GetEnvironmentAsync(GetEnvironmentRequest, CallOptions)

public virtual AsyncUnaryCall<Environment> GetEnvironmentAsync(GetEnvironmentRequest request, CallOptions options)

Gets an environment. Returns NOT_FOUND if the environment does not exist.

Parameters
NameDescription
requestGetEnvironmentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Environment>

The call object.

GetEnvironmentAsync(GetEnvironmentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Environment> GetEnvironmentAsync(GetEnvironmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Gets an environment. Returns NOT_FOUND if the environment does not exist.

Parameters
NameDescription
requestGetEnvironmentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Environment>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

protected override CloudShellService.CloudShellServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
CloudShellService.CloudShellServiceClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Shell.V1.CloudShellService.CloudShellServiceClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

RemovePublicKey(RemovePublicKeyRequest, CallOptions)

public virtual Operation RemovePublicKey(RemovePublicKeyRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

RemovePublicKey(RemovePublicKeyRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Operation RemovePublicKey(RemovePublicKeyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

RemovePublicKeyAsync(RemovePublicKeyRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> RemovePublicKeyAsync(RemovePublicKeyRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

RemovePublicKeyAsync(RemovePublicKeyRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Operation> RemovePublicKeyAsync(RemovePublicKeyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

StartEnvironment(StartEnvironmentRequest, CallOptions)

public virtual Operation StartEnvironment(StartEnvironmentRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

StartEnvironment(StartEnvironmentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Operation StartEnvironment(StartEnvironmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

StartEnvironmentAsync(StartEnvironmentRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> StartEnvironmentAsync(StartEnvironmentRequest request, CallOptions options)

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 to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

StartEnvironmentAsync(StartEnvironmentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Operation> StartEnvironmentAsync(StartEnvironmentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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 to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.