Class: Google::Apis::AdminDirectoryV1::DirectoryService

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

Overview

Admin SDK

Admin SDK lets administrators of enterprise domains to view and manage resources like user, groups etc. It also provides audit and usage reports of domain.

Examples:

require 'google/apis/admin_directory_v1'

Admin = Google::Apis::AdminDirectoryV1 # Alias the module
service = Admin::DirectoryService.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

#initializeDirectoryService

Returns a new instance of DirectoryService.


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

def initialize
  super('https://www.googleapis.com/', '')
  @batch_path = 'batch/admin/directory_v1'
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/admin_directory_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/admin_directory_v1/service.rb', line 45

def quota_user
  @quota_user
end

Instance Method Details

#action_chromeosdevice(customer_id, resource_id, chrome_os_device_action_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Take action on Chrome OS Device

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • resource_id (String)

    Immutable ID of Chrome OS Device

  • chrome_os_device_action_object (Google::Apis::AdminDirectoryV1::ChromeOsDeviceAction) (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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


200
201
202
203
204
205
206
207
208
209
# File 'generated/google/apis/admin_directory_v1/service.rb', line 200

def action_chromeosdevice(customer_id, resource_id, chrome_os_device_action_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/action', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsDeviceAction::Representation
  command.request_object = chrome_os_device_action_object
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['resourceId'] = resource_id unless resource_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#action_mobile_device(customer_id, resource_id, mobile_device_action_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Take action on Mobile Device

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • resource_id (String)

    Immutable ID of Mobile Device

  • mobile_device_action_object (Google::Apis::AdminDirectoryV1::MobileDeviceAction) (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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1346

def action_mobile_device(customer_id, resource_id, mobile_device_action_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}/action', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::MobileDeviceAction::Representation
  command.request_object = mobile_device_action_object
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['resourceId'] = resource_id unless resource_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#calendar_resource(customer, calendar_resource_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::CalendarResource

Inserts a calendar resource.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • calendar_resource_object (Google::Apis::AdminDirectoryV1::CalendarResource) (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:


2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2017

def calendar_resource(customer, calendar_resource_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/resources/calendars', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
  command.request_object = calendar_resource_object
  command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::CalendarResource
  command.params['customer'] = customer unless customer.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_asp(user_key, code_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Delete an ASP issued by a user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • code_id (Fixnum)

    The unique ID of the ASP to be deleted.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


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

def delete_asp(user_key, code_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/users/{userKey}/asps/{codeId}', options)
  command.params['userKey'] = user_key unless user_key.nil?
  command.params['codeId'] = code_id unless code_id.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_calendar_resource(customer, calendar_resource_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a calendar resource.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • calendar_resource_id (String)

    The unique ID of the calendar resource to delete.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


1952
1953
1954
1955
1956
1957
1958
1959
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1952

def delete_calendar_resource(customer, calendar_resource_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['calendarResourceId'] = calendar_resource_id unless calendar_resource_id.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_domain(customer, domain_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a domain of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • domain_name (String)

    Name of domain to be deleted

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


660
661
662
663
664
665
666
667
# File 'generated/google/apis/admin_directory_v1/service.rb', line 660

def delete_domain(customer, domain_name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/domains/{domainName}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['domainName'] = domain_name unless domain_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_domain_alias(customer, domain_alias_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a domain Alias of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • domain_alias_name (String)

    Name of domain alias to be retrieved.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


530
531
532
533
534
535
536
537
# File 'generated/google/apis/admin_directory_v1/service.rb', line 530

def delete_domain_alias(customer, domain_alias_name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['domainAliasName'] = domain_alias_name unless domain_alias_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(group_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Delete Group

Parameters:

  • group_key (String)

    Email or immutable ID of 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


785
786
787
788
789
790
791
# File 'generated/google/apis/admin_directory_v1/service.rb', line 785

def delete_group(group_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/groups/{groupKey}', options)
  command.params['groupKey'] = group_key unless group_key.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_alias(group_key, group_alias, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Remove a alias for the group

Parameters:

  • group_key (String)

    Email or immutable ID of the group

  • group_alias (String)

    The alias to be removed

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


1000
1001
1002
1003
1004
1005
1006
1007
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1000

def delete_group_alias(group_key, group_alias, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/groups/{groupKey}/aliases/{alias}', options)
  command.params['groupKey'] = group_key unless group_key.nil?
  command.params['alias'] = group_alias unless group_alias.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_member(group_key, member_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Remove membership.

Parameters:

  • group_key (String)

    Email or immutable ID of the group

  • member_key (String)

    Email or immutable ID of 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


1094
1095
1096
1097
1098
1099
1100
1101
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1094

def delete_member(group_key, member_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/groups/{groupKey}/members/{memberKey}', options)
  command.params['groupKey'] = group_key unless group_key.nil?
  command.params['memberKey'] = member_key unless member_key.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_mobile_device(customer_id, resource_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Delete Mobile Device

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • resource_id (String)

    Immutable ID of Mobile Device

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


1379
1380
1381
1382
1383
1384
1385
1386
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1379

def delete_mobile_device(customer_id, resource_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}', options)
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['resourceId'] = resource_id unless resource_id.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_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Remove organizational unit

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • org_unit_path (String)

    Full path of the organizational unit or its 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


1496
1497
1498
1499
1500
1501
1502
1503
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1496

def delete_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}', options)
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['orgUnitPath'] = org_unit_path unless org_unit_path.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_resource_building(customer, building_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a building.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • building_id (String)

    The id of the building to delete.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


1732
1733
1734
1735
1736
1737
1738
1739
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1732

def delete_resource_building(customer, building_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['buildingId'] = building_id unless building_id.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_resource_feature(customer, feature_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a feature.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • feature_key (String)

    The unique ID of the feature to delete.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


2184
2185
2186
2187
2188
2189
2190
2191
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2184

def delete_resource_feature(customer, feature_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/resources/features/{featureKey}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['featureKey'] = feature_key unless feature_key.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_role(customer, role_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a role.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_id (String)

    Immutable ID of the role.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


2570
2571
2572
2573
2574
2575
2576
2577
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2570

def delete_role(customer, role_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/roles/{roleId}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['roleId'] = role_id unless role_id.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_role_assignment(customer, role_assignment_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes a role assignment.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_assignment_id (String)

    Immutable ID of the role assignment.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


2429
2430
2431
2432
2433
2434
2435
2436
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2429

def delete_role_assignment(customer, role_assignment_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}', options)
  command.params['customer'] = customer unless customer.nil?
  command.params['roleAssignmentId'] = role_assignment_id unless role_assignment_id.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_schema(customer_id, schema_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Delete schema

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • schema_key (String)

    Name or immutable ID of the schema

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


2775
2776
2777
2778
2779
2780
2781
2782
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2775

def delete_schema(customer_id, schema_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/customer/{customerId}/schemas/{schemaKey}', options)
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['schemaKey'] = schema_key unless schema_key.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_token(user_key, client_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Delete all access tokens issued by a user for an application.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • client_id (String)

    The Client ID of the application the token is issued to.

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


2975
2976
2977
2978
2979
2980
2981
2982
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2975

def delete_token(user_key, client_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/users/{userKey}/tokens/{clientId}', options)
  command.params['userKey'] = user_key unless user_key.nil?
  command.params['clientId'] = client_id unless client_id.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_user(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Delete user

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


3069
3070
3071
3072
3073
3074
3075
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3069

def delete_user(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/users/{userKey}', options)
  command.params['userKey'] = user_key unless user_key.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_user_alias(user_key, user_alias, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Remove a alias for the user

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • user_alias (String)

    The alias to be removed

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


3404
3405
3406
3407
3408
3409
3410
3411
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3404

def delete_user_alias(user_key, user_alias, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/users/{userKey}/aliases/{alias}', options)
  command.params['userKey'] = user_key unless user_key.nil?
  command.params['alias'] = user_alias unless user_alias.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_user_photo(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Remove photos for the user

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


3532
3533
3534
3535
3536
3537
3538
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3532

def delete_user_photo(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'admin/directory/v1/users/{userKey}/photos/thumbnail', options)
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#generate_verification_code(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Generate new backup verification codes for the user.

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


3656
3657
3658
3659
3660
3661
3662
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3656

def generate_verification_code(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/verificationCodes/generate', options)
  command.params['userKey'] = user_key unless user_key.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_asp(user_key, code_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Asp

Get information about an ASP issued by a user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • code_id (Fixnum)

    The unique ID of the ASP.

  • 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:


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

def get_asp(user_key, code_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/asps/{codeId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Asp::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Asp
  command.params['userKey'] = user_key unless user_key.nil?
  command.params['codeId'] = code_id unless code_id.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_calendar_resource(customer, calendar_resource_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::CalendarResource

Retrieves a calendar resource.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • calendar_resource_id (String)

    The unique ID of the calendar resource to retrieve.

  • 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:


1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1984

def get_calendar_resource(customer, calendar_resource_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::CalendarResource
  command.params['customer'] = customer unless customer.nil?
  command.params['calendarResourceId'] = calendar_resource_id unless calendar_resource_id.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_chrome_os_device(customer_id, device_id, projection: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::ChromeOsDevice

Retrieve Chrome OS Device

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • device_id (String)

    Immutable ID of Chrome OS Device

  • projection (String) (defaults to: nil)

    Restrict information returned to a set of selected fields.

  • 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:


235
236
237
238
239
240
241
242
243
244
245
# File 'generated/google/apis/admin_directory_v1/service.rb', line 235

def get_chrome_os_device(customer_id, device_id, projection: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['deviceId'] = device_id unless device_id.nil?
  command.query['projection'] = projection unless projection.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_customer(customer_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Customer

Retrieves a customer.

Parameters:

  • customer_key (String)

    Id of the customer to be retrieved

  • 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:


432
433
434
435
436
437
438
439
440
# File 'generated/google/apis/admin_directory_v1/service.rb', line 432

def get_customer(customer_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customers/{customerKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Customer::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Customer
  command.params['customerKey'] = customer_key unless customer_key.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_domain(customer, domain_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Domains

Retrieves a domain of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • domain_name (String)

    Name of domain to be retrieved

  • 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:


691
692
693
694
695
696
697
698
699
700
# File 'generated/google/apis/admin_directory_v1/service.rb', line 691

def get_domain(customer, domain_name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/domains/{domainName}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Domains::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Domains
  command.params['customer'] = customer unless customer.nil?
  command.params['domainName'] = domain_name unless domain_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_domain_alias(customer, domain_alias_name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::DomainAlias

Retrieves a domain alias of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • domain_alias_name (String)

    Name of domain alias to be retrieved.

  • 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:


561
562
563
564
565
566
567
568
569
570
# File 'generated/google/apis/admin_directory_v1/service.rb', line 561

def get_domain_alias(customer, domain_alias_name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/domainaliases/{domainAliasName}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::DomainAlias::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::DomainAlias
  command.params['customer'] = customer unless customer.nil?
  command.params['domainAliasName'] = domain_alias_name unless domain_alias_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(group_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Group

Retrieve Group

Parameters:

  • group_key (String)

    Email or immutable ID of 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:


813
814
815
816
817
818
819
820
821
# File 'generated/google/apis/admin_directory_v1/service.rb', line 813

def get_group(group_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/groups/{groupKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Group
  command.params['groupKey'] = group_key unless group_key.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_member(group_key, member_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Member

Retrieve Group Member

Parameters:

  • group_key (String)

    Email or immutable ID of the group

  • member_key (String)

    Email or immutable ID of 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:


1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1125

def get_member(group_key, member_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/groups/{groupKey}/members/{memberKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Member
  command.params['groupKey'] = group_key unless group_key.nil?
  command.params['memberKey'] = member_key unless member_key.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_mobile_device(customer_id, resource_id, projection: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::MobileDevice

Retrieve Mobile Device

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • resource_id (String)

    Immutable ID of Mobile Device

  • projection (String) (defaults to: nil)

    Restrict information returned to a set of selected fields.

  • 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:


1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1412

def get_mobile_device(customer_id, resource_id, projection: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/devices/mobile/{resourceId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::MobileDevice::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::MobileDevice
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['resourceId'] = resource_id unless resource_id.nil?
  command.query['projection'] = projection unless projection.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_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::OrgUnit

Retrieve organizational unit

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • org_unit_path (String)

    Full path of the organizational unit or its 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:


1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1527

def get_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['orgUnitPath'] = org_unit_path unless org_unit_path.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_resource_building(customer, building_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Building

Retrieves a building.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • building_id (String)

    The unique ID of the building to retrieve.

  • 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:


1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1764

def get_resource_building(customer, building_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Building::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Building
  command.params['customer'] = customer unless customer.nil?
  command.params['buildingId'] = building_id unless building_id.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_resource_feature(customer, feature_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Feature

Retrieves a feature.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • feature_key (String)

    The unique ID of the feature to retrieve.

  • 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:


2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2216

def get_resource_feature(customer, feature_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/resources/features/{featureKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Feature::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Feature
  command.params['customer'] = customer unless customer.nil?
  command.params['featureKey'] = feature_key unless feature_key.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_role(customer, role_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Role

Retrieves a role.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_id (String)

    Immutable ID of the role.

  • 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:


2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2601

def get_role(customer, role_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/roles/{roleId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Role::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Role
  command.params['customer'] = customer unless customer.nil?
  command.params['roleId'] = role_id unless role_id.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_role_assignment(customer, role_assignment_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::RoleAssignment

Retrieve a role assignment.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_assignment_id (String)

    Immutable ID of the role assignment.

  • 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:


2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2460

def get_role_assignment(customer, role_assignment_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/roleassignments/{roleAssignmentId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::RoleAssignment::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::RoleAssignment
  command.params['customer'] = customer unless customer.nil?
  command.params['roleAssignmentId'] = role_assignment_id unless role_assignment_id.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_schema(customer_id, schema_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Schema

Retrieve schema

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • schema_key (String)

    Name or immutable ID of the schema

  • 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:


2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2806

def get_schema(customer_id, schema_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/schemas/{schemaKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Schema
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['schemaKey'] = schema_key unless schema_key.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_token(user_key, client_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Token

Get information about an access token issued by a user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.

  • client_id (String)

    The Client ID of the application the token is issued to.

  • 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:


3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3007

def get_token(user_key, client_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/tokens/{clientId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Token::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Token
  command.params['userKey'] = user_key unless user_key.nil?
  command.params['clientId'] = client_id unless client_id.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_user(user_key, custom_field_mask: nil, projection: nil, view_type: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::User

retrieve user

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • custom_field_mask (String) (defaults to: nil)

    Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.

  • projection (String) (defaults to: nil)

    What subset of fields to fetch for this user.

  • view_type (String) (defaults to: nil)

    Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.

  • 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:


3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3104

def get_user(user_key, custom_field_mask: nil, projection: nil, view_type: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::User
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['viewType'] = view_type unless view_type.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_user_photo(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::UserPhoto

Retrieve photo of a user

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • 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:


3560
3561
3562
3563
3564
3565
3566
3567
3568
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3560

def get_user_photo(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/photos/thumbnail', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#has_member_member(group_key, member_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::MembersHasMember

Checks whether the given user is a member of the group. Membership can be direct or nested.

Parameters:

  • group_key (String)

    Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.

  • member_key (String)

    Identifies the user member in the API request. The value can be the user's primary email address, alias, or unique 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:


1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1161

def has_member_member(group_key, member_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/groups/{groupKey}/hasMember/{memberKey}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::MembersHasMember::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::MembersHasMember
  command.params['groupKey'] = group_key unless group_key.nil?
  command.params['memberKey'] = member_key unless member_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_domain(customer, domains_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Domains

Inserts a domain of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • domains_object (Google::Apis::AdminDirectoryV1::Domains) (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:


723
724
725
726
727
728
729
730
731
732
733
# File 'generated/google/apis/admin_directory_v1/service.rb', line 723

def insert_domain(customer, domains_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/domains', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Domains::Representation
  command.request_object = domains_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Domains::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Domains
  command.params['customer'] = customer unless customer.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_domain_alias(customer, domain_alias_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::DomainAlias

Inserts a domain alias of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • domain_alias_object (Google::Apis::AdminDirectoryV1::DomainAlias) (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:


593
594
595
596
597
598
599
600
601
602
603
# File 'generated/google/apis/admin_directory_v1/service.rb', line 593

def insert_domain_alias(customer, domain_alias_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/domainaliases', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::DomainAlias::Representation
  command.request_object = domain_alias_object
  command.response_representation = Google::Apis::AdminDirectoryV1::DomainAlias::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::DomainAlias
  command.params['customer'] = customer unless customer.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_group(group_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Group

Create Group

Parameters:

  • group_object (Google::Apis::AdminDirectoryV1::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:


842
843
844
845
846
847
848
849
850
851
# File 'generated/google/apis/admin_directory_v1/service.rb', line 842

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

#insert_group_alias(group_key, alias_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Alias

Add a alias for the group

Parameters:

  • group_key (String)

    Email or immutable ID of the group

  • alias_object (Google::Apis::AdminDirectoryV1::Alias) (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:


1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1030

def insert_group_alias(group_key, alias_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/groups/{groupKey}/aliases', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
  command.request_object = alias_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Alias
  command.params['groupKey'] = group_key unless group_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_member(group_key, member_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Member

Add user to the specified group.

Parameters:

  • group_key (String)

    Email or immutable ID of the group

  • member_object (Google::Apis::AdminDirectoryV1::Member) (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:


1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1193

def insert_member(group_key, member_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/groups/{groupKey}/members', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation
  command.request_object = member_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Member
  command.params['groupKey'] = group_key unless group_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_org_unit(customer_id, org_unit_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::OrgUnit

Add organizational unit

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • org_unit_object (Google::Apis::AdminDirectoryV1::OrgUnit) (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:


1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1559

def insert_org_unit(customer_id, org_unit_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customerId}/orgunits', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
  command.request_object = org_unit_object
  command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_resource_building(customer, building_object = nil, coordinates_source: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Building

Inserts a building.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • building_object (Google::Apis::AdminDirectoryV1::Building) (defaults to: nil)
  • coordinates_source (String) (defaults to: nil)

    Source from which Building.coordinates are derived.

  • 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:


1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1799

def insert_resource_building(customer, building_object = nil, coordinates_source: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/resources/buildings', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Building::Representation
  command.request_object = building_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Building::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Building
  command.params['customer'] = customer unless customer.nil?
  command.query['coordinatesSource'] = coordinates_source unless coordinates_source.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_resource_feature(customer, feature_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Feature

Inserts a feature.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • feature_object (Google::Apis::AdminDirectoryV1::Feature) (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:


2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2249

def insert_resource_feature(customer, feature_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/resources/features', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Feature::Representation
  command.request_object = feature_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Feature::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Feature
  command.params['customer'] = customer unless customer.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_role(customer, role_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Role

Creates a role.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_object (Google::Apis::AdminDirectoryV1::Role) (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:


2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2633

def insert_role(customer, role_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/roles', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Role::Representation
  command.request_object = role_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Role::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Role
  command.params['customer'] = customer unless customer.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_role_assignment(customer, role_assignment_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::RoleAssignment

Creates a role assignment.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_assignment_object (Google::Apis::AdminDirectoryV1::RoleAssignment) (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:


2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2492

def insert_role_assignment(customer, role_assignment_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/roleassignments', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::RoleAssignment::Representation
  command.request_object = role_assignment_object
  command.response_representation = Google::Apis::AdminDirectoryV1::RoleAssignment::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::RoleAssignment
  command.params['customer'] = customer unless customer.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_schema(customer_id, schema_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Schema

Create schema.

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • schema_object (Google::Apis::AdminDirectoryV1::Schema) (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:


2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2838

def insert_schema(customer_id, schema_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customerId}/schemas', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
  command.request_object = schema_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Schema
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_user(user_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::User

create user.

Parameters:

  • user_object (Google::Apis::AdminDirectoryV1::User) (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:


3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3136

def insert_user(user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation
  command.request_object = user_object
  command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::User
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_user_alias(user_key, alias_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Alias

Add a alias for the user

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • alias_object (Google::Apis::AdminDirectoryV1::Alias) (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:


3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3434

def insert_user_alias(user_key, alias_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/aliases', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
  command.request_object = alias_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Alias
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#invalidate_verification_code(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Invalidate the current backup verification codes for the user.

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


3684
3685
3686
3687
3688
3689
3690
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3684

def invalidate_verification_code(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/verificationCodes/invalidate', options)
  command.params['userKey'] = user_key unless user_key.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_asps(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Asps

List the ASPs issued by a user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user 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:


139
140
141
142
143
144
145
146
147
# File 'generated/google/apis/admin_directory_v1/service.rb', line 139

def list_asps(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/asps', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Asps::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Asps
  command.params['userKey'] = user_key unless user_key.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_calendar_resources(customer, max_results: nil, order_by: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::CalendarResources

Retrieves a list of calendar resources for an account.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • order_by (String) (defaults to: nil)

    Field(s) to sort results by in either ascending or descending order. Supported fields include resourceId, resourceName, capacity, buildingId, and floorName. If no order is specified, defaults to ascending. Should be of the form "field [ asc|desc], field [asc|desc], ...". For example buildingId, capacity desc would return results sorted first by buildingId in ascending order then by capacity in descending order.

  • page_token (String) (defaults to: nil)

    Token to specify the next page in the list.

  • query (String) (defaults to: nil)

    String query used to filter results. Should be of the form "field operator value" where field can be any of supported fields and operators can be any of supported operations. Operators include '=' for exact match, '!=' for mismatch and ':' for prefix match or HAS match where applicable. For prefix match, the value should always be followed by a *. Logical operators NOT and AND are supported (in this order of precedence). Supported fields include generatedResourceName, name, buildingId, floor_name, capacity, featureInstances.feature.name. For example buildingId=US-NYC-9TH AND featureInstances.feature.name:Phone.

  • 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:


2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2071

def list_calendar_resources(customer, max_results: nil, order_by: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/resources/calendars', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResources::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::CalendarResources
  command.params['customer'] = customer unless customer.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['query'] = query unless query.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_chrome_os_devices(customer_id, max_results: nil, order_by: nil, org_unit_path: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::ChromeOsDevices

Retrieve all Chrome OS Devices of a customer (paginated)

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • order_by (String) (defaults to: nil)

    Column to use for sorting results

  • org_unit_path (String) (defaults to: nil)

    Full path of the organizational unit or its ID

  • page_token (String) (defaults to: nil)

    Token to specify next page in the list

  • projection (String) (defaults to: nil)

    Restrict information returned to a set of selected fields.

  • query (String) (defaults to: nil)

    Search string in the format given at http://support.google.com/chromeos/a/bin/ answer.py?answer=1698333

  • sort_order (String) (defaults to: nil)

    Whether to return results in ascending or descending order. Only of use when orderBy is also used

  • 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:


283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'generated/google/apis/admin_directory_v1/service.rb', line 283

def list_chrome_os_devices(customer_id, max_results: nil, order_by: nil, org_unit_path: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/devices/chromeos', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevices::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevices
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['query'] = query unless query.nil?
  command.query['sortOrder'] = sort_order unless sort_order.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_domain_aliases(customer, parent_domain_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::DomainAliases

Lists the domain aliases of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • parent_domain_name (String) (defaults to: nil)

    Name of the parent domain for which domain aliases are to be fetched.

  • 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:


627
628
629
630
631
632
633
634
635
636
# File 'generated/google/apis/admin_directory_v1/service.rb', line 627

def list_domain_aliases(customer, parent_domain_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/domainaliases', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::DomainAliases::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::DomainAliases
  command.params['customer'] = customer unless customer.nil?
  command.query['parentDomainName'] = parent_domain_name unless parent_domain_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_domains(customer, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Domains2

Lists the domains of the customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • 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:


755
756
757
758
759
760
761
762
763
# File 'generated/google/apis/admin_directory_v1/service.rb', line 755

def list_domains(customer, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/domains', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Domains2::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Domains2
  command.params['customer'] = customer unless customer.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_aliases(group_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Aliases

List all aliases for a group

Parameters:

  • group_key (String)

    Email or immutable ID of 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:


1062
1063
1064
1065
1066
1067
1068
1069
1070
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1062

def list_group_aliases(group_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/groups/{groupKey}/aliases', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Aliases::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Aliases
  command.params['groupKey'] = group_key unless group_key.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(customer: nil, domain: nil, max_results: nil, order_by: nil, page_token: nil, query: nil, sort_order: nil, user_key: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Groups

Retrieve all groups of a domain or of a user given a userKey (paginated)

Parameters:

  • customer (String) (defaults to: nil)

    Immutable ID of the G Suite account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain.

  • domain (String) (defaults to: nil)

    Name of the domain. Fill this field to get groups from only this domain. To return all groups in a multi-domain fill customer field instead.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return. Max allowed value is 200.

  • order_by (String) (defaults to: nil)

    Column to use for sorting results

  • page_token (String) (defaults to: nil)

    Token to specify next page in the list

  • query (String) (defaults to: nil)

    Query string search. Should be of the form "". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-groups

  • sort_order (String) (defaults to: nil)

    Whether to return results in ascending or descending order. Only of use when orderBy is also used

  • user_key (String) (defaults to: nil)

    Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object.

  • 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:


893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
# File 'generated/google/apis/admin_directory_v1/service.rb', line 893

def list_groups(customer: nil, domain: nil, max_results: nil, order_by: nil, page_token: nil, query: nil, sort_order: nil, user_key: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/groups', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Groups::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Groups
  command.query['customer'] = customer unless customer.nil?
  command.query['domain'] = domain unless domain.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['query'] = query unless query.nil?
  command.query['sortOrder'] = sort_order unless sort_order.nil?
  command.query['userKey'] = user_key unless user_key.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_members(group_key, include_derived_membership: nil, max_results: nil, page_token: nil, roles: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Members

Retrieve all members in a group (paginated)

Parameters:

  • group_key (String)

    Email or immutable ID of the group

  • include_derived_membership (Boolean) (defaults to: nil)

    Whether to list indirect memberships. Default: false.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return. Max allowed value is 200.

  • page_token (String) (defaults to: nil)

    Token to specify next page in the list

  • roles (String) (defaults to: nil)

    Comma separated role values to filter list results on.

  • 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:


1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1233

def list_members(group_key, include_derived_membership: nil, max_results: nil, page_token: nil, roles: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/groups/{groupKey}/members', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Members::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Members
  command.params['groupKey'] = group_key unless group_key.nil?
  command.query['includeDerivedMembership'] = include_derived_membership unless include_derived_membership.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['roles'] = roles unless roles.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_mobile_devices(customer_id, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::MobileDevices

Retrieve all Mobile Devices of a customer (paginated)

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return. Max allowed value is 100.

  • order_by (String) (defaults to: nil)

    Column to use for sorting results

  • page_token (String) (defaults to: nil)

    Token to specify next page in the list

  • projection (String) (defaults to: nil)

    Restrict information returned to a set of selected fields.

  • query (String) (defaults to: nil)

    Search string in the format given at http://support.google.com/a/bin/answer.py? answer=1408863#search

  • sort_order (String) (defaults to: nil)

    Whether to return results in ascending or descending order. Only of use when orderBy is also used

  • 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:


1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1458

def list_mobile_devices(customer_id, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/devices/mobile', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::MobileDevices::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::MobileDevices
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['query'] = query unless query.nil?
  command.query['sortOrder'] = sort_order unless sort_order.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_org_units(customer_id, org_unit_path: nil, type: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::OrgUnits

Retrieve all organizational units

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • org_unit_path (String) (defaults to: nil)

    the URL-encoded organizational unit's path or its ID

  • type (String) (defaults to: nil)

    Whether to return all sub-organizations or just immediate children

  • 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:


1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1595

def list_org_units(customer_id, org_unit_path: nil, type: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/orgunits', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnits::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::OrgUnits
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
  command.query['type'] = type unless type.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_privileges(customer, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Privileges

Retrieves a paginated list of all privileges for a customer.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • 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:


1699
1700
1701
1702
1703
1704
1705
1706
1707
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1699

def list_privileges(customer, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/roles/ALL/privileges', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Privileges::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Privileges
  command.params['customer'] = customer unless customer.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_resource_buildings(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Buildings

Retrieves a list of buildings for an account.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • page_token (String) (defaults to: nil)

    Token to specify the next page in the list.

  • 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:


1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1837

def list_resource_buildings(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/resources/buildings', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Buildings::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Buildings
  command.params['customer'] = customer unless customer.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.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_resource_features(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Features

Retrieves a list of features for an account.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • page_token (String) (defaults to: nil)

    Token to specify the next page in the list.

  • 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:


2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2286

def list_resource_features(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/resources/features', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Features::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Features
  command.params['customer'] = customer unless customer.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.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_role_assignments(customer, max_results: nil, page_token: nil, role_id: nil, user_key: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::RoleAssignments

Retrieves a paginated list of all roleAssignments.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • page_token (String) (defaults to: nil)

    Token to specify the next page in the list.

  • role_id (String) (defaults to: nil)

    Immutable ID of a role. If included in the request, returns only role assignments containing this role ID.

  • user_key (String) (defaults to: nil)

    The user's primary email address, alias email address, or unique user ID. If included in the request, returns role assignments only for this user.

  • 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:


2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2534

def list_role_assignments(customer, max_results: nil, page_token: nil, role_id: nil, user_key: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/roleassignments', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::RoleAssignments::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::RoleAssignments
  command.params['customer'] = customer unless customer.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['roleId'] = role_id unless role_id.nil?
  command.query['userKey'] = user_key unless user_key.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_roles(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Roles

Retrieves a paginated list of all the roles in a domain.

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • page_token (String) (defaults to: nil)

    Token to specify the next page in the list.

  • 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:


2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2669

def list_roles(customer, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customer}/roles', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Roles::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Roles
  command.params['customer'] = customer unless customer.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.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_schemas(customer_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Schemas

Retrieve all schemas for a customer

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • 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:


2870
2871
2872
2873
2874
2875
2876
2877
2878
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2870

def list_schemas(customer_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/schemas', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Schemas::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Schemas
  command.params['customerId'] = customer_id unless customer_id.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_tokens(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Tokens

Returns the set of tokens specified user has issued to 3rd party applications.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user 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:


3039
3040
3041
3042
3043
3044
3045
3046
3047
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3039

def list_tokens(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/tokens', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Tokens::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Tokens
  command.params['userKey'] = user_key unless user_key.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_user_aliases(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Aliases

List all aliases for a user

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • 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:


3466
3467
3468
3469
3470
3471
3472
3473
3474
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3466

def list_user_aliases(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/aliases', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Aliases::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Aliases
  command.params['userKey'] = user_key unless user_key.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_users(custom_field_mask: nil, customer: nil, domain: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, show_deleted: nil, sort_order: nil, view_type: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Users

Retrieve either deleted users or all users in a domain (paginated)

Parameters:

  • custom_field_mask (String) (defaults to: nil)

    Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.

  • customer (String) (defaults to: nil)

    Immutable ID of the G Suite account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.

  • domain (String) (defaults to: nil)

    Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • order_by (String) (defaults to: nil)

    Column to use for sorting results

  • page_token (String) (defaults to: nil)

    Token to specify next page in the list

  • projection (String) (defaults to: nil)

    What subset of fields to fetch for this user.

  • query (String) (defaults to: nil)

    Query string search. Should be of the form "". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-users

  • show_deleted (String) (defaults to: nil)

    If set to true, retrieves the list of deleted users. (Default: false)

  • sort_order (String) (defaults to: nil)

    Whether to return results in ascending or descending order.

  • view_type (String) (defaults to: nil)

    Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.

  • 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:


3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3191

def list_users(custom_field_mask: nil, customer: nil, domain: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, show_deleted: nil, sort_order: nil, view_type: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::Users::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Users
  command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil?
  command.query['customer'] = customer unless customer.nil?
  command.query['domain'] = domain unless domain.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['query'] = query unless query.nil?
  command.query['showDeleted'] = show_deleted unless show_deleted.nil?
  command.query['sortOrder'] = sort_order unless sort_order.nil?
  command.query['viewType'] = view_type unless view_type.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_verification_codes(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::VerificationCodes

Returns the current set of valid backup verification codes for the specified user.

Parameters:

  • user_key (String)

    Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user 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:


3714
3715
3716
3717
3718
3719
3720
3721
3722
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3714

def list_verification_codes(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/users/{userKey}/verificationCodes', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::VerificationCodes::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::VerificationCodes
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#make_user_admin(user_key, user_make_admin_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

change admin status of a user

Parameters:

  • user_key (String)

    Email or immutable ID of the user as admin

  • user_make_admin_object (Google::Apis::AdminDirectoryV1::UserMakeAdmin) (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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


3232
3233
3234
3235
3236
3237
3238
3239
3240
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3232

def make_user_admin(user_key, user_make_admin_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/makeAdmin', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::UserMakeAdmin::Representation
  command.request_object = user_make_admin_object
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#move_chromeosdevice_devices_to_ou(customer_id, org_unit_path, chrome_os_move_devices_to_ou_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Move or insert multiple Chrome OS Devices to organizational unit

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • org_unit_path (String)

    Full path of the target organizational unit or its ID

  • chrome_os_move_devices_to_ou_object (Google::Apis::AdminDirectoryV1::ChromeOsMoveDevicesToOu) (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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


323
324
325
326
327
328
329
330
331
332
# File 'generated/google/apis/admin_directory_v1/service.rb', line 323

def move_chromeosdevice_devices_to_ou(customer_id, org_unit_path, chrome_os_move_devices_to_ou_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customerId}/devices/chromeos/moveDevicesToOu', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsMoveDevicesToOu::Representation
  command.request_object = chrome_os_move_devices_to_ou_object
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.query['orgUnitPath'] = org_unit_path unless org_unit_path.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_calendar_resource(customer, calendar_resource_id, calendar_resource_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::CalendarResource

Patches a calendar resource via Apiary Patch Orchestration.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • calendar_resource_id (String)

    The unique ID of the calendar resource to update.

  • calendar_resource_object (Google::Apis::AdminDirectoryV1::CalendarResource) (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:


2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2109

def patch_calendar_resource(customer, calendar_resource_id, calendar_resource_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customer}/resources/calendars/{calendarResourceId}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
  command.request_object = calendar_resource_object
  command.response_representation = Google::Apis::AdminDirectoryV1::CalendarResource::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::CalendarResource
  command.params['customer'] = customer unless customer.nil?
  command.params['calendarResourceId'] = calendar_resource_id unless calendar_resource_id.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_chrome_os_device(customer_id, device_id, chrome_os_device_object = nil, projection: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::ChromeOsDevice

Patch Chrome OS Device

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • device_id (String)

    Immutable ID of Chrome OS Device

  • chrome_os_device_object (Google::Apis::AdminDirectoryV1::ChromeOsDevice) (defaults to: nil)
  • projection (String) (defaults to: nil)

    Restrict information returned to a set of selected fields.

  • 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:


359
360
361
362
363
364
365
366
367
368
369
370
371
# File 'generated/google/apis/admin_directory_v1/service.rb', line 359

def patch_chrome_os_device(customer_id, device_id, chrome_os_device_object = nil, projection: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
  command.request_object = chrome_os_device_object
  command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['deviceId'] = device_id unless device_id.nil?
  command.query['projection'] = projection unless projection.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_customer(customer_key, customer_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Customer

Patch Customers via Apiary Patch Orchestration

Parameters:

  • customer_key (String)

    Id of the customer to be updated

  • customer_object (Google::Apis::AdminDirectoryV1::Customer) (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:


463
464
465
466
467
468
469
470
471
472
473
# File 'generated/google/apis/admin_directory_v1/service.rb', line 463

def patch_customer(customer_key, customer_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customers/{customerKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Customer::Representation
  command.request_object = customer_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Customer::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Customer
  command.params['customerKey'] = customer_key unless customer_key.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(group_key, group_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Group

Patch Groups via Apiary Patch Orchestration

Parameters:

  • group_key (String)

    Email or immutable ID of the group. If ID, it should match with id of group object

  • group_object (Google::Apis::AdminDirectoryV1::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:


932
933
934
935
936
937
938
939
940
941
942
# File 'generated/google/apis/admin_directory_v1/service.rb', line 932

def patch_group(group_key, group_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/groups/{groupKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Group::Representation
  command.request_object = group_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Group
  command.params['groupKey'] = group_key unless group_key.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_member(group_key, member_key, member_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Member

Patch Member via Apiary Patch Orchestration

Parameters:

  • group_key (String)

    Email or immutable ID of the group. If ID, it should match with id of group object

  • member_key (String)

    Email or immutable ID of the user. If ID, it should match with id of member object

  • member_object (Google::Apis::AdminDirectoryV1::Member) (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:


1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1272

def patch_member(group_key, member_key, member_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/groups/{groupKey}/members/{memberKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation
  command.request_object = member_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Member
  command.params['groupKey'] = group_key unless group_key.nil?
  command.params['memberKey'] = member_key unless member_key.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_org_unit(customer_id, org_unit_path, org_unit_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::OrgUnit

Patch organization unit via Apiary Patch Orchestration

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • org_unit_path (String)

    Full path of the organizational unit or its ID

  • org_unit_object (Google::Apis::AdminDirectoryV1::OrgUnit) (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:


1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1630

def patch_org_unit(customer_id, org_unit_path, org_unit_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customerId}/orgunits/{+orgUnitPath}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
  command.request_object = org_unit_object
  command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['orgUnitPath'] = org_unit_path unless org_unit_path.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_resource_building(customer, building_id, building_object = nil, coordinates_source: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Building

Patches a building via Apiary Patch Orchestration.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • building_id (String)

    The id of the building to update.

  • building_object (Google::Apis::AdminDirectoryV1::Building) (defaults to: nil)
  • coordinates_source (String) (defaults to: nil)

    Source from which Building.coordinates are derived.

  • 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:


1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
# File 'generated/google/apis/admin_directory_v1/service.rb', line 1875

def patch_resource_building(customer, building_id, building_object = nil, coordinates_source: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customer}/resources/buildings/{buildingId}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Building::Representation
  command.request_object = building_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Building::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Building
  command.params['customer'] = customer unless customer.nil?
  command.params['buildingId'] = building_id unless building_id.nil?
  command.query['coordinatesSource'] = coordinates_source unless coordinates_source.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_resource_feature(customer, feature_key, feature_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Feature

Patches a feature via Apiary Patch Orchestration.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • feature_key (String)

    The unique ID of the feature to update.

  • feature_object (Google::Apis::AdminDirectoryV1::Feature) (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:


2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2322

def patch_resource_feature(customer, feature_key, feature_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customer}/resources/features/{featureKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Feature::Representation
  command.request_object = feature_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Feature::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Feature
  command.params['customer'] = customer unless customer.nil?
  command.params['featureKey'] = feature_key unless feature_key.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_role(customer, role_id, role_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Role

Patch role via Apiary Patch Orchestration

Parameters:

  • customer (String)

    Immutable ID of the G Suite account.

  • role_id (String)

    Immutable ID of the role.

  • role_object (Google::Apis::AdminDirectoryV1::Role) (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:


2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2704

def patch_role(customer, role_id, role_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customer}/roles/{roleId}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Role::Representation
  command.request_object = role_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Role::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Role
  command.params['customer'] = customer unless customer.nil?
  command.params['roleId'] = role_id unless role_id.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_schema(customer_id, schema_key, schema_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Schema

Patch Schema via Apiary Patch Orchestration

Parameters:

  • customer_id (String)

    Immutable ID of the G Suite account

  • schema_key (String)

    Name or immutable ID of the schema.

  • schema_object (Google::Apis::AdminDirectoryV1::Schema) (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:


2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2903

def patch_schema(customer_id, schema_key, schema_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/customer/{customerId}/schemas/{schemaKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
  command.request_object = schema_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Schema
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['schemaKey'] = schema_key unless schema_key.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_user(user_key, user_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::User

Patch Users via Apiary Patch Orchestration

Parameters:

  • user_key (String)

    Email or immutable ID of the user. If ID, it should match with id of user object

  • user_object (Google::Apis::AdminDirectoryV1::User) (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:


3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3264

def patch_user(user_key, user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/users/{userKey}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation
  command.request_object = user_object
  command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::User
  command.params['userKey'] = user_key unless user_key.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_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::UserPhoto

Patch Photo via Apiary Patch Orchestration

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • user_photo_object (Google::Apis::AdminDirectoryV1::UserPhoto) (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:


3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
# File 'generated/google/apis/admin_directory_v1/service.rb', line 3591

def patch_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/users/{userKey}/photos/thumbnail', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
  command.request_object = user_photo_object
  command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto
  command.params['userKey'] = user_key unless user_key.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#rename_resource_feature(customer, old_name, feature_rename_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Renames a feature.

Parameters:

  • customer (String)

    The unique ID for the customer's G Suite account. As an account administrator, you can also use the my_customer alias to represent your account's customer ID.

  • old_name (String)

    The unique ID of the feature to rename.

  • feature_rename_object (Google::Apis::AdminDirectoryV1::FeatureRename) (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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
# File 'generated/google/apis/admin_directory_v1/service.rb', line 2359

def