Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.
HTTP request
POST https://workstations.googleapis.com/v1/{workstation=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:generateAccessToken
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
workstation |
Required. Name of the workstation for which the access token should be generated. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field expiration . Desired expiration or lifetime of the access token. expiration can be only one of the following: |
|
expireTime |
Desired expiration time of the access token. This value must be at most 24 hours in the future. If a value is not specified, the token's expiration time will be set to a default value of 1 hour in the future. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
ttl |
Desired lifetime duration of the access token. This value must be at most 24 hours. If a value is not specified, the token's lifetime will be set to a default value of 1 hour. A duration in seconds with up to nine fractional digits, ending with ' |
Response body
Response message for workstations.generateAccessToken.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "accessToken": string, "expireTime": string } |
Fields | |
---|---|
accessToken |
The generated bearer access token. To use this token, include it in an Authorization header of an HTTP request sent to the associated workstation's hostname—for example, |
expireTime |
Time at which the generated token will expire. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.