Show / Hide Table of Contents

Class UsersResource.EnvironmentsResource

The "environments" collection of methods.

Inheritance
object
UsersResource.EnvironmentsResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.CloudShell.v1
Assembly: Google.Apis.CloudShell.v1.dll
Syntax
public class UsersResource.EnvironmentsResource

Constructors

EnvironmentsResource(IClientService)

Constructs a new resource.

Declaration
public EnvironmentsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

AddPublicKey(AddPublicKeyRequest, string)

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.

Declaration
public virtual UsersResource.EnvironmentsResource.AddPublicKeyRequest AddPublicKey(AddPublicKeyRequest body, string environment)
Parameters
Type Name Description
AddPublicKeyRequest body

The body of the request.

string environment

Environment this key should be added to, e.g. users/me/environments/default.

Returns
Type Description
UsersResource.EnvironmentsResource.AddPublicKeyRequest

Authorize(AuthorizeEnvironmentRequest, string)

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.

Declaration
public virtual UsersResource.EnvironmentsResource.AuthorizeRequest Authorize(AuthorizeEnvironmentRequest body, string name)
Parameters
Type Name Description
AuthorizeEnvironmentRequest body

The body of the request.

string name

Name of the resource that should receive the credentials, for example users/me/environments/default or users/someone@example.com/environments/default.

Returns
Type Description
UsersResource.EnvironmentsResource.AuthorizeRequest

Get(string)

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

Declaration
public virtual UsersResource.EnvironmentsResource.GetRequest Get(string name)
Parameters
Type Name Description
string name

Required. Name of the requested resource, for example users/me/environments/default or users/someone@example.com/environments/default.

Returns
Type Description
UsersResource.EnvironmentsResource.GetRequest

RemovePublicKey(RemovePublicKeyRequest, string)

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.

Declaration
public virtual UsersResource.EnvironmentsResource.RemovePublicKeyRequest RemovePublicKey(RemovePublicKeyRequest body, string environment)
Parameters
Type Name Description
RemovePublicKeyRequest body

The body of the request.

string environment

Environment this key should be removed from, e.g. users/me/environments/default.

Returns
Type Description
UsersResource.EnvironmentsResource.RemovePublicKeyRequest

Start(StartEnvironmentRequest, string)

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.

Declaration
public virtual UsersResource.EnvironmentsResource.StartRequest Start(StartEnvironmentRequest body, string name)
Parameters
Type Name Description
StartEnvironmentRequest body

The body of the request.

string name

Name of the resource that should be started, for example users/me/environments/default or users/someone@example.com/environments/default.

Returns
Type Description
UsersResource.EnvironmentsResource.StartRequest
In this article
Back to top Generated by DocFX