Class CloudShellServiceGrpc.CloudShellServiceBlockingStub (2.5.0)

Stay organized with collections Save and categorize content based on your preferences.
public static final class CloudShellServiceGrpc.CloudShellServiceBlockingStub extends AbstractBlockingStub<CloudShellServiceGrpc.CloudShellServiceBlockingStub>

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.

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractBlockingStub > CloudShellServiceGrpc.CloudShellServiceBlockingStub

Methods

addPublicKey(AddPublicKeyRequest request)

public Operation addPublicKey(AddPublicKeyRequest request)

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.

Parameter
NameDescription
requestAddPublicKeyRequest
Returns
TypeDescription
Operation

authorizeEnvironment(AuthorizeEnvironmentRequest request)

public Operation authorizeEnvironment(AuthorizeEnvironmentRequest request)

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.

Parameter
NameDescription
requestAuthorizeEnvironmentRequest
Returns
TypeDescription
Operation

build(Channel channel, CallOptions callOptions)

protected CloudShellServiceGrpc.CloudShellServiceBlockingStub build(Channel channel, CallOptions callOptions)
Parameters
NameDescription
channelio.grpc.Channel
callOptionsio.grpc.CallOptions
Returns
TypeDescription
CloudShellServiceGrpc.CloudShellServiceBlockingStub
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

getEnvironment(GetEnvironmentRequest request)

public Environment getEnvironment(GetEnvironmentRequest request)

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

Parameter
NameDescription
requestGetEnvironmentRequest
Returns
TypeDescription
Environment

removePublicKey(RemovePublicKeyRequest request)

public Operation removePublicKey(RemovePublicKeyRequest request)

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.

Parameter
NameDescription
requestRemovePublicKeyRequest
Returns
TypeDescription
Operation

startEnvironment(StartEnvironmentRequest request)

public Operation startEnvironment(StartEnvironmentRequest request)

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.

Parameter
NameDescription
requestStartEnvironmentRequest
Returns
TypeDescription
Operation