Class: Google::Apis::IamV1::IamService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/iam_v1/service.rb

Overview

Google Identity and Access Management (IAM) API

Manages identity and access control for Google Cloud Platform resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls.

Examples:

require 'google/apis/iam_v1'

Iam = Google::Apis::IamV1 # Alias the module
service = Iam::IamService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeIamService

Returns a new instance of IamService



47
48
49
50
# File 'generated/google/apis/iam_v1/service.rb', line 47

def initialize
  super('https://iam.googleapis.com/', '')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



40
41
42
# File 'generated/google/apis/iam_v1/service.rb', line 40

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



45
46
47
# File 'generated/google/apis/iam_v1/service.rb', line 45

def quota_user
  @quota_user
end

Instance Method Details

#create_service_account(name, create_service_account_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::ServiceAccount

Creates a ServiceAccount and returns it.

Parameters:

  • name (String)

    Required. The resource name of the project associated with the service accounts, such as projects/my-project-123.

  • create_service_account_request_object (Google::Apis::IamV1::CreateServiceAccountRequest) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



254
255
256
257
258
259
260
261
262
263
264
# File 'generated/google/apis/iam_v1/service.rb', line 254

def (name,  = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+name}/serviceAccounts', options)
  command.request_representation = Google::Apis::IamV1::CreateServiceAccountRequest::Representation
  command.request_object = 
  command.response_representation = Google::Apis::IamV1::ServiceAccount::Representation
  command.response_class = Google::Apis::IamV1::ServiceAccount
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#create_service_account_key(name, create_service_account_key_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::ServiceAccountKey

Creates a ServiceAccountKey and returns it.

Parameters:

  • name (String)

    The resource name of the service account in the following format: projects/PROJECT_ID/serviceAccounts/SERVICE_ACCOUNT_EMAIL`. Using-as a wildcard for the project will infer the project from the account. Theaccountvalue can be theemailaddress or the unique_id` of the service account.

  • create_service_account_key_request_object (Google::Apis::IamV1::CreateServiceAccountKeyRequest) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



587
588
589
590
591
592
593
594
595
596
597
# File 'generated/google/apis/iam_v1/service.rb', line 587

def (name,  = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+name}/keys', options)
  command.request_representation = Google::Apis::IamV1::CreateServiceAccountKeyRequest::Representation
  command.request_object = 
  command.response_representation = Google::Apis::IamV1::ServiceAccountKey::Representation
  command.response_class = Google::Apis::IamV1::ServiceAccountKey
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_service_account(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::Empty

Deletes a ServiceAccount.

Parameters:

  • name (String)

    The resource name of the service account in the following format: projects/PROJECT_ID/serviceAccounts/SERVICE_ACCOUNT_EMAIL`. Using-as a wildcard for the project will infer the project from the account. Theaccountvalue can be theemailaddress or the unique_id` of the service account.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



108
109
110
111
112
113
114
115
116
# File 'generated/google/apis/iam_v1/service.rb', line 108

def (name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::IamV1::Empty::Representation
  command.response_class = Google::Apis::IamV1::Empty
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#delete_project_service_account_key(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::Empty

Deletes a ServiceAccountKey.

Parameters:

  • name (String)

    The resource name of the service account key in the following format: projects/PROJECT_ID/serviceAccounts/SERVICE_ACCOUNT_EMAIL/keys/key`. Using-as a wildcard for the project will infer the project from the account. Theaccountvalue can be theemailaddress or the unique_id` of the service account.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



473
474
475
476
477
478
479
480
481
# File 'generated/google/apis/iam_v1/service.rb', line 473

def (name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::IamV1::Empty::Representation
  command.response_class = Google::Apis::IamV1::Empty
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#get_project_service_account(name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::ServiceAccount

Gets a ServiceAccount.

Parameters:

  • name (String)

    The resource name of the service account in the following format: projects/PROJECT_ID/serviceAccounts/SERVICE_ACCOUNT_EMAIL`. Using-as a wildcard for the project will infer the project from the account. Theaccountvalue can be theemailaddress or the unique_id` of the service account.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



362
363
364
365
366
367
368
369
370
# File 'generated/google/apis/iam_v1/service.rb', line 362

def (name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::IamV1::ServiceAccount::Representation
  command.response_class = Google::Apis::IamV1::ServiceAccount
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#get_project_service_account_iam_policy(resource, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::Policy

Returns the IAM access control policy for a ServiceAccount.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



328
329
330
331
332
333
334
335
336
# File 'generated/google/apis/iam_v1/service.rb', line 328

def (resource, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
  command.response_representation = Google::Apis::IamV1::Policy::Representation
  command.response_class = Google::Apis::IamV1::Policy
  command.params['resource'] = resource unless resource.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#get_project_service_account_key(name, public_key_type: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::ServiceAccountKey

Gets the ServiceAccountKey by key id.

Parameters:

  • name (String)

    The resource name of the service account key in the following format: projects/PROJECT_ID/serviceAccounts/SERVICE_ACCOUNT_EMAIL/keys/key`. Using-as a wildcard for the project will infer the project from the account. Theaccountvalue can be theemailaddress or the unique_id` of the service account.

  • public_key_type (String)

    The output format of the public key requested. X509_PEM is the default output format.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



550
551
552
553
554
555
556
557
558
559
# File 'generated/google/apis/iam_v1/service.rb', line 550

def (name, public_key_type: nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::IamV1::ServiceAccountKey::Representation
  command.response_class = Google::Apis::IamV1::ServiceAccountKey
  command.params['name'] = name unless name.nil?
  command.query['publicKeyType'] = public_key_type unless public_key_type.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#list_project_service_account_keys(name, key_types: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::ListServiceAccountKeysResponse

Lists ServiceAccountKeys.

Parameters:

  • name (String)

    The resource name of the service account in the following format: projects/PROJECT_ID/serviceAccounts/SERVICE_ACCOUNT_EMAIL`. Using-as a wildcard for the project, will infer the project from the account. Theaccountvalue can be theemailaddress or the unique_id` of the service account.

  • key_types (Array<String>, String)

    Filters the types of keys the user wants to include in the list response. Duplicate key types are not allowed. If no key type is provided, all keys are returned.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



511
512
513
514
515
516
517
518
519
520
# File 'generated/google/apis/iam_v1/service.rb', line 511

def (name, key_types: nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+name}/keys', options)
  command.response_representation = Google::Apis::IamV1::ListServiceAccountKeysResponse::Representation
  command.response_class = Google::Apis::IamV1::ListServiceAccountKeysResponse
  command.params['name'] = name unless name.nil?
  command.query['keyTypes'] = key_types unless key_types.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#list_project_service_accounts(name, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::ListServiceAccountsResponse

Lists ServiceAccounts for a project.

Parameters:

  • name (String)

    Required. The resource name of the project associated with the service accounts, such as projects/my-project-123.

  • page_token (String)

    Optional pagination token returned in an earlier ListServiceAccountsResponse.next_page_token.

  • page_size (Fixnum)

    Optional limit on the number of service accounts to include in the response. Further accounts can subsequently be obtained by including the ListServiceAccountsResponse.next_page_token in a subsequent request.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



184
185
186
187
188
189
190
191
192
193
194
# File 'generated/google/apis/iam_v1/service.rb', line 184

def list_project_service_accounts(name, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+name}/serviceAccounts', options)
  command.response_representation = Google::Apis::IamV1::ListServiceAccountsResponse::Representation
  command.response_class = Google::Apis::IamV1::ListServiceAccountsResponse
  command.params['name'] = name unless name.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#query_grantable_roles(query_grantable_roles_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::QueryGrantableRolesResponse

Queries roles that can be granted on a particular resource. A role is grantable if it can be used as the role in a binding for a policy for that resource.

Parameters:

  • query_grantable_roles_request_object (Google::Apis::IamV1::QueryGrantableRolesRequest) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



73
74
75
76
77
78
79
80
81
82
# File 'generated/google/apis/iam_v1/service.rb', line 73

def query_grantable_roles(query_grantable_roles_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/roles:queryGrantableRoles', options)
  command.request_representation = Google::Apis::IamV1::QueryGrantableRolesRequest::Representation
  command.request_object = query_grantable_roles_request_object
  command.response_representation = Google::Apis::IamV1::QueryGrantableRolesResponse::Representation
  command.response_class = Google::Apis::IamV1::QueryGrantableRolesResponse
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#set_service_account_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::Policy

Sets the IAM access control policy for a ServiceAccount.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

  • set_iam_policy_request_object (Google::Apis::IamV1::SetIamPolicyRequest) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



219
220
221
222
223
224
225
226
227
228
229
# File 'generated/google/apis/iam_v1/service.rb', line 219

def (resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
  command.request_representation = Google::Apis::IamV1::SetIamPolicyRequest::Representation
  command.request_object = set_iam_policy_request_object
  command.response_representation = Google::Apis::IamV1::Policy::Representation
  command.response_class = Google::Apis::IamV1::Policy
  command.params['resource'] = resource unless resource.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#sign_service_account_blob(name, sign_blob_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::SignBlobResponse

Signs a blob using a service account's system-managed private key.

Parameters:

  • name (String)

    The resource name of the service account in the following format: projects/PROJECT_ID/serviceAccounts/SERVICE_ACCOUNT_EMAIL`. Using-as a wildcard for the project will infer the project from the account. Theaccountvalue can be theemailaddress or the unique_id` of the service account.

  • sign_blob_request_object (Google::Apis::IamV1::SignBlobRequest) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



143
144
145
146
147
148
149
150
151
152
153
# File 'generated/google/apis/iam_v1/service.rb', line 143

def (name, sign_blob_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+name}:signBlob', options)
  command.request_representation = Google::Apis::IamV1::SignBlobRequest::Representation
  command.request_object = sign_blob_request_object
  command.response_representation = Google::Apis::IamV1::SignBlobResponse::Representation
  command.response_class = Google::Apis::IamV1::SignBlobResponse
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#sign_service_account_jwt(name, sign_jwt_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::SignJwtResponse

Signs a JWT using a service account's system-managed private key. If no expiry time (exp) is provided in the SignJwtRequest, IAM sets an an expiry time of one hour by default. If you request an expiry time of more than one hour, the request will fail.

Parameters:

  • name (String)

    The resource name of the service account in the following format: projects/PROJECT_ID/serviceAccounts/SERVICE_ACCOUNT_EMAIL`. Using-as a wildcard for the project will infer the project from the account. Theaccountvalue can be theemailaddress or the unique_id` of the service account.

  • sign_jwt_request_object (Google::Apis::IamV1::SignJwtRequest) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



294
295
296
297
298
299
300
301
302
303
304
# File 'generated/google/apis/iam_v1/service.rb', line 294

def (name, sign_jwt_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+name}:signJwt', options)
  command.request_representation = Google::Apis::IamV1::SignJwtRequest::Representation
  command.request_object = sign_jwt_request_object
  command.response_representation = Google::Apis::IamV1::SignJwtResponse::Representation
  command.response_class = Google::Apis::IamV1::SignJwtResponse
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#test_service_account_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::TestIamPermissionsResponse

Tests the specified permissions against the IAM access control policy for a ServiceAccount.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

  • test_iam_permissions_request_object (Google::Apis::IamV1::TestIamPermissionsRequest) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



437
438
439
440
441
442
443
444
445
446
447
# File 'generated/google/apis/iam_v1/service.rb', line 437

def (resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
  command.request_representation = Google::Apis::IamV1::TestIamPermissionsRequest::Representation
  command.request_object = test_iam_permissions_request_object
  command.response_representation = Google::Apis::IamV1::TestIamPermissionsResponse::Representation
  command.response_class = Google::Apis::IamV1::TestIamPermissionsResponse
  command.params['resource'] = resource unless resource.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#update_project_service_account(name, service_account_object = nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::IamV1::ServiceAccount

Updates a ServiceAccount. Currently, only the following fields are updatable: display_name . The etag is mandatory.

Parameters:

  • name (String)

    The resource name of the service account in the following format: projects/PROJECT_ID/serviceAccounts/SERVICE_ACCOUNT_EMAIL. Requests using `-` as a wildcard for the project will infer the project from the `account` and the `account` value can be the `email` address or the `unique_id` of the service account. In responses the resource name will always be in the format `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL.

  • service_account_object (Google::Apis::IamV1::ServiceAccount) (defaults to: nil)
  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



402
403
404
405
406
407
408
409
410
411
412
# File 'generated/google/apis/iam_v1/service.rb', line 402

def (name,  = nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:put, 'v1/{+name}', options)
  command.request_representation = Google::Apis::IamV1::ServiceAccount::Representation
  command.request_object = 
  command.response_representation = Google::Apis::IamV1::ServiceAccount::Representation
  command.response_class = Google::Apis::IamV1::ServiceAccount
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end