Method: projects.locations.attachedClusters.generateAttachedClusterAgentToken

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

string

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

string

Required.

subjectTokenType

string

Required.

version

string

Required.

grantType

string

Optional.

audience

string

Optional.

scope

string

Optional.

requestedTokenType

string

Optional.

options

string

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

string

expires_in

integer

token_type

string

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.