UsersEnvironments
class UsersEnvironments extends Resource (View source)
The "environments" collection of methods.
Typical usage is:
$cloudshellService = new Google\Service\CloudShell(...);
$environments = $cloudshellService->users_environments;
Methods
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.
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.
Gets an environment. Returns NOT_FOUND if the environment does not exist.
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.
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. (environments.start)
Details
Operation
addPublicKey(string $environment, AddPublicKeyRequest $postBody, array $optParams = [])
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.
(environments.addPublicKey)
Operation
authorize(string $name, AuthorizeEnvironmentRequest $postBody, array $optParams = [])
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.
(environments.authorize)
Environment
get(string $name, array $optParams = [])
Gets an environment. Returns NOT_FOUND if the environment does not exist.
(environments.get)
Operation
removePublicKey(string $environment, RemovePublicKeyRequest $postBody, array $optParams = [])
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.
(environments.removePublicKey)
Operation
start(string $name, StartEnvironmentRequest $postBody, array $optParams = [])
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. (environments.start)