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 format and content already exists, this will return the existing key.
HTTP request
POST https://cloudshell.googleapis.com/v1alpha1/{parent=users/*/environments/*}/publicKeys
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Parent resource name, e.g. |
Request body
The request body contains data with the following structure:
JSON representation | |
---|---|
{
"key": {
object( |
Fields | |
---|---|
key |
Key that should be added to the environment. |
Response body
If successful, the response body contains a newly created instance of PublicKey
.
Authorization Scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.