Cloud Shell v1 API - Class CloudShellService.CloudShellServiceBase (2.5.0)

[BindServiceMethod(typeof(CloudShellService), "BindService")]
public abstract class CloudShellService.CloudShellServiceBase

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

Base class for server-side implementations of CloudShellService

Inheritance

object > CloudShellService.CloudShellServiceBase

Namespace

Google.Cloud.Shell.V1

Assembly

Google.Cloud.Shell.V1.dll

Methods

AddPublicKey(AddPublicKeyRequest, ServerCallContext)

public virtual Task<Operation> AddPublicKey(AddPublicKeyRequest request, ServerCallContext context)

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 received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

AuthorizeEnvironment(AuthorizeEnvironmentRequest, ServerCallContext)

public virtual Task<Operation> AuthorizeEnvironment(AuthorizeEnvironmentRequest request, ServerCallContext context)

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 received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

GetEnvironment(GetEnvironmentRequest, ServerCallContext)

public virtual Task<Environment> GetEnvironment(GetEnvironmentRequest request, ServerCallContext context)

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

Parameters
Name Description
request GetEnvironmentRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskEnvironment

The response to send back to the client (wrapped by a task).

RemovePublicKey(RemovePublicKeyRequest, ServerCallContext)

public virtual Task<Operation> RemovePublicKey(RemovePublicKeyRequest request, ServerCallContext context)

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 received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).

StartEnvironment(StartEnvironmentRequest, ServerCallContext)

public virtual Task<Operation> StartEnvironment(StartEnvironmentRequest request, ServerCallContext context)

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 received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskOperation

The response to send back to the client (wrapped by a task).