Google Cloud Iam Credentials V1 Client - Class GenerateAccessTokenRequest (1.0.6)

Reference documentation and code samples for the Google Cloud Iam Credentials V1 Client class GenerateAccessTokenRequest.

Generated from protobuf message google.iam.credentials.v1.GenerateAccessTokenRequest

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Required. The resource name of the service account for which the credentials are requested, in the following format: projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard character is required; replacing it with a project ID is invalid.

↳ delegates array

The sequence of service accounts in a delegation chain. Each service account must be granted the roles/iam.serviceAccountTokenCreator role on its next service account in the chain. The last service account in the chain must be granted the roles/iam.serviceAccountTokenCreator role on the service account that is specified in the name field of the request. The delegates must have the following format: projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard character is required; replacing it with a project ID is invalid.

↳ scope array

Required. Code to identify the scopes to be included in the OAuth 2.0 access token. See https://developers.google.com/identity/protocols/googlescopes for more information. At least one value required.

↳ lifetime Google\Protobuf\Duration

The desired lifetime duration of the access token in seconds. Must be set to a value less than or equal to 3600 (1 hour). If a value is not specified, the token's lifetime will be set to a default value of one hour.

getName

Required. The resource name of the service account for which the credentials are requested, in the following format: projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard character is required; replacing it with a project ID is invalid.

Returns
TypeDescription
string

setName

Required. The resource name of the service account for which the credentials are requested, in the following format: projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard character is required; replacing it with a project ID is invalid.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDelegates

The sequence of service accounts in a delegation chain. Each service account must be granted the roles/iam.serviceAccountTokenCreator role on its next service account in the chain. The last service account in the chain must be granted the roles/iam.serviceAccountTokenCreator role on the service account that is specified in the name field of the request.

The delegates must have the following format: projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard character is required; replacing it with a project ID is invalid.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setDelegates

The sequence of service accounts in a delegation chain. Each service account must be granted the roles/iam.serviceAccountTokenCreator role on its next service account in the chain. The last service account in the chain must be granted the roles/iam.serviceAccountTokenCreator role on the service account that is specified in the name field of the request.

The delegates must have the following format: projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard character is required; replacing it with a project ID is invalid.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getScope

Required. Code to identify the scopes to be included in the OAuth 2.0 access token.

See https://developers.google.com/identity/protocols/googlescopes for more information. At least one value required.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setScope

Required. Code to identify the scopes to be included in the OAuth 2.0 access token.

See https://developers.google.com/identity/protocols/googlescopes for more information. At least one value required.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getLifetime

The desired lifetime duration of the access token in seconds.

Must be set to a value less than or equal to 3600 (1 hour). If a value is not specified, the token's lifetime will be set to a default value of one hour.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasLifetime

clearLifetime

setLifetime

The desired lifetime duration of the access token in seconds.

Must be set to a value less than or equal to 3600 (1 hour). If a value is not specified, the token's lifetime will be set to a default value of one hour.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this