Generates an access token for a cluster agent.
HTTP request
POST https://{endpoint}/v1/{attachedCluster=projects/*/locations/*/attachedClusters/*}:generateAttachedClusterAgentToken
Where {endpoint}
is one of the supported service endpoints.
The URLs use gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
attachedCluster |
Required. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "subjectToken": string, "subjectTokenType": string, "version": string, "grantType": string, "audience": string, "scope": string, "requestedTokenType": string, "options": string } |
Fields | |
---|---|
subjectToken |
Required. |
subjectTokenType |
Required. |
version |
Required. |
grantType |
Optional. |
audience |
Optional. |
scope |
Optional. |
requestedTokenType |
Optional. |
options |
Optional. |
Response body
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "access_token": string, "expires_in": integer, "token_type": string } |
Fields | |
---|---|
access_token |
|
expires_in |
|
token_type |
|
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.