Method: users.environments.publicKeys.create

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

string

Parent resource name, e.g. users/me/environments/default.

Request body

The request body contains data with the following structure:

JSON representation
{
  "key": {
    object(PublicKey)
  }
}
Fields
key

object(PublicKey)

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.

Try it!

本頁內容對您是否有任何幫助?請提供意見:

傳送您對下列選項的寶貴意見...

這個網頁
Cloud Shell