Class: Google::Apis::IamcredentialsV1::GenerateIdTokenRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/iamcredentials_v1/classes.rb,
lib/google/apis/iamcredentials_v1/representations.rb,
lib/google/apis/iamcredentials_v1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GenerateIdTokenRequest

Returns a new instance of GenerateIdTokenRequest.



137
138
139
# File 'lib/google/apis/iamcredentials_v1/classes.rb', line 137

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#audienceString

Required. The audience for the token, such as the API or account that this token grants access to. Corresponds to the JSON property audience

Returns:

  • (String)


107
108
109
# File 'lib/google/apis/iamcredentials_v1/classes.rb', line 107

def audience
  @audience
end

#delegatesArray<String>

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. Corresponds to the JSON propertydelegates`

Returns:

  • (Array<String>)


119
120
121
# File 'lib/google/apis/iamcredentials_v1/classes.rb', line 119

def delegates
  @delegates
end

#include_emailBoolean Also known as: include_email?

Include the service account email in the token. If set to true, the token will contain email and email_verified claims. Corresponds to the JSON property includeEmail

Returns:

  • (Boolean)


125
126
127
# File 'lib/google/apis/iamcredentials_v1/classes.rb', line 125

def include_email
  @include_email
end

#organization_number_includedBoolean Also known as: organization_number_included?

Include the organization number of the service account in the token. If set to true, the token will contain a google.organization_number claim. The value of the claim will be null if the service account isn't associated with an organization. Corresponds to the JSON property organizationNumberIncluded

Returns:

  • (Boolean)


134
135
136
# File 'lib/google/apis/iamcredentials_v1/classes.rb', line 134

def organization_number_included
  @organization_number_included
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



142
143
144
145
146
147
# File 'lib/google/apis/iamcredentials_v1/classes.rb', line 142

def update!(**args)
  @audience = args[:audience] if args.key?(:audience)
  @delegates = args[:delegates] if args.key?(:delegates)
  @include_email = args[:include_email] if args.key?(:include_email)
  @organization_number_included = args[:organization_number_included] if args.key?(:organization_number_included)
end