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.
HTTP request
POST https://cloudshell.googleapis.com/v1/{name=users/*/environments/*}:authorize
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
name |
Name of the resource that should receive the credentials, for example |
Request body
The request body contains data with the following structure:
JSON representation | |
---|---|
{ "accessToken": string, "idToken": string, "expireTime": string } |
Fields | |
---|---|
accessToken |
The OAuth access token that should be sent to the environment. |
idToken |
The OAuth ID token that should be sent to the environment. |
expireTime |
The time when the credentials expire. If not set, defaults to one hour from when the server received the request. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
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.