Class: Google::Apis::CloudidentityV1::CloudIdentityService

Inherits:
Google::Apis::Core::BaseService show all
Defined in:
generated/google/apis/cloudidentity_v1/service.rb

Overview

Cloud Identity API

API for provisioning and managing identity resources.

Examples:

require 'google/apis/cloudidentity_v1'

Cloudidentity = Google::Apis::CloudidentityV1 # Alias the module
service = Cloudidentity::CloudIdentityService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Google::Apis::Core::BaseService

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

Instance Method Summary collapse

Methods inherited from Google::Apis::Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Google::Apis::Core::Logging

#logger

Constructor Details

#initializeCloudIdentityService

Returns a new instance of CloudIdentityService.



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

def initialize
  super('https://cloudidentity.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.



38
39
40
# File 'generated/google/apis/cloudidentity_v1/service.rb', line 38

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.



43
44
45
# File 'generated/google/apis/cloudidentity_v1/service.rb', line 43

def quota_user
  @quota_user
end

Instance Method Details

#create_group(group_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudidentityV1::Operation

Creates a Group.

Parameters:

  • group_object (Google::Apis::CloudidentityV1::Group) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



69
70
71
72
73
74
75
76
77
78
# File 'generated/google/apis/cloudidentity_v1/service.rb', line 69

def create_group(group_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/groups', options)
  command.request_representation = Google::Apis::CloudidentityV1::Group::Representation
  command.request_object = group_object
  command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
  command.response_class = Google::Apis::CloudidentityV1::Operation
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_group_membership(parent, membership_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudidentityV1::Operation

Creates a Membership.

Parameters:

  • parent (String)

    Required. Resource name of the Group to create Membership within. Format: groups/group_id`, where group_id` is the unique ID assigned to the Group.

  • membership_object (Google::Apis::CloudidentityV1::Membership) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



334
335
336
337
338
339
340
341
342
343
344
# File 'generated/google/apis/cloudidentity_v1/service.rb', line 334

def create_group_membership(parent, membership_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/memberships', options)
  command.request_representation = Google::Apis::CloudidentityV1::Membership::Representation
  command.request_object = membership_object
  command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
  command.response_class = Google::Apis::CloudidentityV1::Operation
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_group(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudidentityV1::Operation

Deletes a Group.

Parameters:

  • name (String)

    Required. Resource name of the Group in the format: groups/group_id`, wheregroup_id` is the unique ID assigned to the Group.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



103
104
105
106
107
108
109
110
111
# File 'generated/google/apis/cloudidentity_v1/service.rb', line 103

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

#delete_group_membership(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudidentityV1::Operation

Deletes a Membership.

Parameters:

  • name (String)

    Required. Resource name of the Membership to be deleted. Format: groups/group_id/memberships/member_id`, wheregroup_id` is the unique ID assigned to the Group to which Membership belongs to, and member_id is the unique ID assigned to the member.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



371
372
373
374
375
376
377
378
379
# File 'generated/google/apis/cloudidentity_v1/service.rb', line 371

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

#get_group(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudidentityV1::Group

Retrieves a Group.

Parameters:

  • name (String)

    Required. Resource name of the Group in the format: groups/group_id`, wheregroup_id` is the unique ID assigned to the Group.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



136
137
138
139
140
141
142
143
144
# File 'generated/google/apis/cloudidentity_v1/service.rb', line 136

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

#get_group_membership(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudidentityV1::Membership

Retrieves a Membership.

Parameters:

  • name (String)

    Required. Resource name of the Membership to be retrieved. Format: groups/group_id/memberships/member_id`, wheregroup_idis the unique id assigned to the Group to which Membership belongs to, and member_id` is the unique ID assigned to the member.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



406
407
408
409
410
411
412
413
414
# File 'generated/google/apis/cloudidentity_v1/service.rb', line 406

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

#list_group_memberships(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudidentityV1::ListMembershipsResponse

Lists Memberships within a Group.

Parameters:

  • parent (String)

    Required. Resource name of the Group to list Memberships within. Format: groups/group_id`, wheregroup_id` is the unique ID assigned to the Group.

  • page_size (Fixnum) (defaults to: nil)

    The default page size is 200 (max 1000) for the BASIC view, and 50 (max 500) for the FULL view.

  • page_token (String) (defaults to: nil)

    The next_page_token value returned from a previous list request, if any.

  • view (String) (defaults to: nil)

    Membership resource view to be returned. Defaults to View.BASIC.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



447
448
449
450
451
452
453
454
455
456
457
458
# File 'generated/google/apis/cloudidentity_v1/service.rb', line 447

def list_group_memberships(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/memberships', options)
  command.response_representation = Google::Apis::CloudidentityV1::ListMembershipsResponse::Representation
  command.response_class = Google::Apis::CloudidentityV1::ListMembershipsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_groups(page_size: nil, page_token: nil, parent: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudidentityV1::ListGroupsResponse

Lists groups within a customer or a domain.

Parameters:

  • page_size (Fixnum) (defaults to: nil)

    The default page size is 200 (max 1000) for the BASIC view, and 50 (max 500) for the FULL view.

  • page_token (String) (defaults to: nil)

    The next_page_token value returned from a previous list request, if any.

  • parent (String) (defaults to: nil)

    Required. Customer ID to list all groups from.

  • view (String) (defaults to: nil)

    Group resource view to be returned. Defaults to View.BASIC.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



173
174
175
176
177
178
179
180
181
182
183
184
# File 'generated/google/apis/cloudidentity_v1/service.rb', line 173

def list_groups(page_size: nil, page_token: nil, parent: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/groups', options)
  command.response_representation = Google::Apis::CloudidentityV1::ListGroupsResponse::Representation
  command.response_class = Google::Apis::CloudidentityV1::ListGroupsResponse
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#lookup_group(group_key_id: nil, group_key_namespace: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudidentityV1::LookupGroupNameResponse

Looks up resource name of a Group by its EntityKey.

Parameters:

  • group_key_id (String) (defaults to: nil)

    The ID of the entity within the given namespace. The ID must be unique within its namespace.

  • group_key_namespace (String) (defaults to: nil)

    Namespaces provide isolation for IDs, so an ID only needs to be unique within its namespace. Namespaces are currently only created as part of IdentitySource creation from Admin Console. A namespace "identitysources/identity_source_id" is created corresponding to every Identity Source identity_source_id.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



215
216
217
218
219
220
221
222
223
224
# File 'generated/google/apis/cloudidentity_v1/service.rb', line 215

def lookup_group(group_key_id: nil, group_key_namespace: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/groups:lookup', options)
  command.response_representation = Google::Apis::CloudidentityV1::LookupGroupNameResponse::Representation
  command.response_class = Google::Apis::CloudidentityV1::LookupGroupNameResponse
  command.query['groupKey.id'] = group_key_id unless group_key_id.nil?
  command.query['groupKey.namespace'] = group_key_namespace unless group_key_namespace.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#lookup_group_membership(parent, member_key_id: nil, member_key_namespace: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudidentityV1::LookupMembershipNameResponse

Looks up resource name of a Membership within a Group by member's EntityKey.

Parameters:

  • parent (String)

    Required. Resource name of the Group to lookup Membership within. Format: groups/group_id`, wheregroup_id` is the unique ID assigned to the Group.

  • member_key_id (String) (defaults to: nil)

    The ID of the entity within the given namespace. The ID must be unique within its namespace.

  • member_key_namespace (String) (defaults to: nil)

    Namespaces provide isolation for IDs, so an ID only needs to be unique within its namespace. Namespaces are currently only created as part of IdentitySource creation from Admin Console. A namespace "identitysources/identity_source_id" is created corresponding to every Identity Source identity_source_id.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



495
496
497
498
499
500
501
502
503
504
505
# File 'generated/google/apis/cloudidentity_v1/service.rb', line 495

def lookup_group_membership(parent, member_key_id: nil, member_key_namespace: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/memberships:lookup', options)
  command.response_representation = Google::Apis::CloudidentityV1::LookupMembershipNameResponse::Representation
  command.response_class = Google::Apis::CloudidentityV1::LookupMembershipNameResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['memberKey.id'] = member_key_id unless member_key_id.nil?
  command.query['memberKey.namespace'] = member_key_namespace unless member_key_namespace.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_group(name, group_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudidentityV1::Operation

Updates a Group.

Parameters:

  • name (String)

    Output only. Resource name of the Group in the format: groups/group_id``, where group_id is the unique ID assigned to the Group. Must be left blank while creating a Group.

  • group_object (Google::Apis::CloudidentityV1::Group) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Required. Editable fields: display_name, description

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def patch_group(name, group_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/{+name}', options)
  command.request_representation = Google::Apis::CloudidentityV1::Group::Representation
  command.request_object = group_object
  command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
  command.response_class = Google::Apis::CloudidentityV1::Operation
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#search_groups(page_size: nil, page_token: nil, query: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudidentityV1::SearchGroupsResponse

Searches for Groups.

Parameters:

  • page_size (Fixnum) (defaults to: nil)

    The default page size is 200 (max 1000) for the BASIC view, and 50 (max 500) for the FULL view.

  • page_token (String) (defaults to: nil)

    The next_page_token value returned from a previous search request, if any.

  • query (String) (defaults to: nil)

    Required. Required. Query string for performing search on groups. Users can search on parent and label attributes of groups. EXACT match ('==') is supported on parent, and CONTAINS match ('in') is supported on labels.

  • view (String) (defaults to: nil)

    Group resource view to be returned. Defaults to View.BASIC.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



297
298
299
300
301
302
303
304
305
306
307
308
# File 'generated/google/apis/cloudidentity_v1/service.rb', line 297

def search_groups(page_size: nil, page_token: nil, query: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/groups:search', options)
  command.response_representation = Google::Apis::CloudidentityV1::SearchGroupsResponse::Representation
  command.response_class = Google::Apis::CloudidentityV1::SearchGroupsResponse
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['query'] = query unless query.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end