Method: users.environments.addPublicKey
Stay organized with collections
Save and categorize content based on your preferences.
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.
HTTP request
POST https://cloudshell.googleapis.com/v1/{environment=users/*/environments/*}:addPublicKey
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
environment |
Environment this key should be added to, e.g. |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "key": string } |
| Fields | |
|---|---|
key |
Key that should be added to the environment. Supported formats are |
Response body
If successful, the response body contains an instance of Operation .
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.