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

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/admin_directory_v1/service.rb

Overview

Admin SDK API

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:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://admin.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDirectoryService

Returns a new instance of DirectoryService.



49
50
51
52
53
54
# File 'lib/google/apis/admin_directory_v1/service.rb', line 49

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-admin_directory_v1',
        client_version: Google::Apis::AdminDirectoryV1::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

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

Returns:

  • (String)

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



42
43
44
# File 'lib/google/apis/admin_directory_v1/service.rb', line 42

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.



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

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.

Use BatchChangeChromeOsDeviceStatus instead. Takes an action that affects a Chrome OS Device. This includes deprovisioning, disabling, and re- enabling devices. Warning: * Deprovisioning a device will stop device policy syncing and remove device-level printers. After a device is deprovisioned, it must be wiped before it can be re-enrolled. * Lost or stolen devices should use the disable action. * Re-enabling a disabled device will consume a device license. If you do not have sufficient licenses available when completing the re-enable action, you will receive an error. For more information about deprovisioning and disabling devices, visit the help center.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • resource_id (String)

    The unique ID of the device. The resourceIds are returned in the response from the chromeosdevices.list method.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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

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.

Takes an action that affects a mobile device. For example, remotely wiping a device.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • resource_id (String)

    The unique ID the API service uses to identify the 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2126

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

#batch_create_print_servers(parent, batch_create_print_servers_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::BatchCreatePrintServersResponse

Creates multiple print servers.

Parameters:

  • parent (String)

    Required. The unique ID of the customer's Google Workspace account. Format: customers/id``

  • batch_create_print_servers_request_object (Google::Apis::AdminDirectoryV1::BatchCreatePrintServersRequest) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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

def batch_create_print_servers(parent, batch_create_print_servers_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/{+parent}/chrome/printServers:batchCreatePrintServers', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::BatchCreatePrintServersRequest::Representation
  command.request_object = batch_create_print_servers_request_object
  command.response_representation = Google::Apis::AdminDirectoryV1::BatchCreatePrintServersResponse::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::BatchCreatePrintServersResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#batch_create_printers(parent, batch_create_printers_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::BatchCreatePrintersResponse

Creates printers under given Organization Unit.

Parameters:

  • parent (String)

    Required. The name of the customer. Format: customers/customer_id

  • batch_create_printers_request_object (Google::Apis::AdminDirectoryV1::BatchCreatePrintersRequest) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



953
954
955
956
957
958
959
960
961
962
963
# File 'lib/google/apis/admin_directory_v1/service.rb', line 953

def batch_create_printers(parent, batch_create_printers_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/{+parent}/chrome/printers:batchCreatePrinters', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::BatchCreatePrintersRequest::Representation
  command.request_object = batch_create_printers_request_object
  command.response_representation = Google::Apis::AdminDirectoryV1::BatchCreatePrintersResponse::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::BatchCreatePrintersResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#batch_customer_device_chromeo_change_status(customer_id, batch_change_chrome_os_device_status_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::BatchChangeChromeOsDeviceStatusResponse

Changes the status of a batch of ChromeOS devices. For more information about changing a ChromeOS device state Repair, repurpose, or retire ChromeOS devices.

Parameters:

  • customer_id (String)

    Required. Immutable ID of the Google Workspace account.

  • batch_change_chrome_os_device_status_request_object (Google::Apis::AdminDirectoryV1::BatchChangeChromeOsDeviceStatusRequest) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



487
488
489
490
491
492
493
494
495
496
497
# File 'lib/google/apis/admin_directory_v1/service.rb', line 487

def batch_customer_device_chromeo_change_status(customer_id, batch_change_chrome_os_device_status_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customerId}/devices/chromeos:batchChangeStatus', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::BatchChangeChromeOsDeviceStatusRequest::Representation
  command.request_object = batch_change_chrome_os_device_status_request_object
  command.response_representation = Google::Apis::AdminDirectoryV1::BatchChangeChromeOsDeviceStatusResponse::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::BatchChangeChromeOsDeviceStatusResponse
  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

#batch_delete_print_servers(parent, batch_delete_print_servers_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::BatchDeletePrintServersResponse

Deletes multiple print servers.

Parameters:

  • parent (String)

    Required. The unique ID of the customer's Google Workspace account. Format: customers/customer.id``

  • batch_delete_print_servers_request_object (Google::Apis::AdminDirectoryV1::BatchDeletePrintServersRequest) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



725
726
727
728
729
730
731
732
733
734
735
# File 'lib/google/apis/admin_directory_v1/service.rb', line 725

def batch_delete_print_servers(parent, batch_delete_print_servers_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/{+parent}/chrome/printServers:batchDeletePrintServers', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::BatchDeletePrintServersRequest::Representation
  command.request_object = batch_delete_print_servers_request_object
  command.response_representation = Google::Apis::AdminDirectoryV1::BatchDeletePrintServersResponse::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::BatchDeletePrintServersResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#batch_delete_printers(parent, batch_delete_printers_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::BatchDeletePrintersResponse

Deletes printers in batch.

Parameters:

  • parent (String)

    Required. The name of the customer. Format: customers/customer_id

  • batch_delete_printers_request_object (Google::Apis::AdminDirectoryV1::BatchDeletePrintersRequest) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



986
987
988
989
990
991
992
993
994
995
996
# File 'lib/google/apis/admin_directory_v1/service.rb', line 986

def batch_delete_printers(parent, batch_delete_printers_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/{+parent}/chrome/printers:batchDeletePrinters', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::BatchDeletePrintersRequest::Representation
  command.request_object = batch_delete_printers_request_object
  command.response_representation = Google::Apis::AdminDirectoryV1::BatchDeletePrintersResponse::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::BatchDeletePrintersResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2849

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

#create_customer_chrome_print_server(parent, print_server_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::PrintServer

Creates a print server.

Parameters:

  • parent (String)

    Required. The unique ID of the customer's Google Workspace account. Format: customers/id``

  • print_server_object (Google::Apis::AdminDirectoryV1::PrintServer) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



760
761
762
763
764
765
766
767
768
769
770
# File 'lib/google/apis/admin_directory_v1/service.rb', line 760

def create_customer_chrome_print_server(parent, print_server_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/{+parent}/chrome/printServers', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::PrintServer::Representation
  command.request_object = print_server_object
  command.response_representation = Google::Apis::AdminDirectoryV1::PrintServer::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::PrintServer
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_customer_chrome_printer(parent, printer_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Printer

Creates a printer under given Organization Unit.

Parameters:

  • parent (String)

    Required. The name of the customer. Format: customers/customer_id

  • printer_object (Google::Apis::AdminDirectoryV1::Printer) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1019

def create_customer_chrome_printer(parent, printer_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/{+parent}/chrome/printers', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Printer::Representation
  command.request_object = printer_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Printer::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Printer
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

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

This method returns an undefined value.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



79
80
81
82
83
84
85
86
# File 'lib/google/apis/admin_directory_v1/service.rb', line 79

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2782
2783
2784
2785
2786
2787
2788
2789
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2782

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_customer_chrome_print_server(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Empty

Deletes a print server.

Parameters:

  • name (String)

    Required. The name of the print server to be deleted. Format: customers/ customer.id/chrome/printServers/print_server.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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



793
794
795
796
797
798
799
800
801
# File 'lib/google/apis/admin_directory_v1/service.rb', line 793

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

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

Deletes a Printer.

Parameters:

  • name (String)

    Required. The name of the printer to be updated. Format: customers/ customer_id/chrome/printers/printer_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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1052
1053
1054
1055
1056
1057
1058
1059
1060
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1052

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

#delete_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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1396
1397
1398
1399
1400
1401
1402
1403
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1396

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1256
1257
1258
1259
1260
1261
1262
1263
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1256

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.

Deletes a group.

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1532
1533
1534
1535
1536
1537
1538
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1532

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.

Removes an alias.

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1754
1755
1756
1757
1758
1759
1760
1761
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1754

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.

Removes a member from a group.

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 group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1853
1854
1855
1856
1857
1858
1859
1860
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1853

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.

Removes a mobile device.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • resource_id (String)

    The unique ID the API service uses to identify the 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2162
2163
2164
2165
2166
2167
2168
2169
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2162

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.

Removes an organizational unit.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • org_unit_path (String)

    The full path of the organizational unit (minus the leading /) or its 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2294
2295
2296
2297
2298
2299
2300
2301
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2294

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2556
2557
2558
2559
2560
2561
2562
2563
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2556

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3020
3021
3022
3023
3024
3025
3026
3027
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3020

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3427
3428
3429
3430
3431
3432
3433
3434
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3427

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3271
3272
3273
3274
3275
3276
3277
3278
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3271

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.

Deletes a schema.

Parameters:

  • customer_id (String)

    Immutable ID of the Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3642
3643
3644
3645
3646
3647
3648
3649
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3642

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3852
3853
3854
3855
3856
3857
3858
3859
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3852

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.

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

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3976
3977
3978
3979
3980
3981
3982
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3976

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.

Removes an alias.

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4415
4416
4417
4418
4419
4420
4421
4422
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4415

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.

Removes the user's photo.

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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4549
4550
4551
4552
4553
4554
4555
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4549

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4677
4678
4679
4680
4681
4682
4683
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4677

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

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



111
112
113
114
115
116
117
118
119
120
# File 'lib/google/apis/admin_directory_v1/service.rb', line 111

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2815

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

Retrieves a Chrome OS device's properties.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • device_id (String)

    The unique ID of the device. The deviceIds are returned in the response from the chromeosdevices.list method.

  • projection (String) (defaults to: nil)

    Determines whether the response contains the full list of properties or only a subset.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



260
261
262
263
264
265
266
267
268
269
270
# File 'lib/google/apis/admin_directory_v1/service.rb', line 260

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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



591
592
593
594
595
596
597
598
599
# File 'lib/google/apis/admin_directory_v1/service.rb', line 591

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_customer_chrome_print_server(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::PrintServer

Returns a print server's configuration.

Parameters:

  • name (String)

    Required. The unique ID of the customer's Google Workspace account. Format: customers/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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



825
826
827
828
829
830
831
832
833
# File 'lib/google/apis/admin_directory_v1/service.rb', line 825

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

#get_customer_chrome_printer(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Printer

Returns a Printer resource (printer's config).

Parameters:

  • name (String)

    Required. The name of the printer to retrieve. Format: customers/customer_id/ chrome/printers/printer_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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1083
1084
1085
1086
1087
1088
1089
1090
1091
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1083

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

#get_customer_device_chromeo_command(customer_id, device_id, command_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesCommand

Gets command data a specific command issued to the device.

Parameters:

  • customer_id (String)

    Immutable. ID of the Google Workspace account.

  • device_id (String)

    Immutable. ID of Chrome OS Device.

  • command_id (Fixnum)

    Immutable. ID of Chrome OS Device Command.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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

def get_customer_device_chromeo_command(customer_id, device_id, command_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}/commands/{commandId}', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesCommand::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesCommand
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['deviceId'] = device_id unless device_id.nil?
  command.params['commandId'] = command_id unless command_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_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)

    The unique ID for the customer's Google Workspace account. In case of a multi- domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1432

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)

    The unique ID for the customer's Google Workspace account. In case of a multi- domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1292

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

Retrieves a group's properties.

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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

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

Retrieves a group member's properties.

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 group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1887

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

Retrieves a mobile device's properties.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • resource_id (String)

    The unique ID the API service uses to identify the 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2198

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

Retrieves an organizational unit.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • org_unit_path (String)

    The full path of the organizational unit (minus the leading /) or its 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2329

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2589

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3053

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)

    The unique ID for the customer's Google Workspace account. In case of a multi- domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3463

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

Retrieves a role assignment.

Parameters:

  • customer (String)

    The unique ID for the customer's Google Workspace account. In case of a multi- domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3307

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

Retrieves a schema.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. In case of a multi- domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3678

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

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3884

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

Retrieves 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.

  • custom_field_mask (String) (defaults to: nil)

    A 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 administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4014

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

Retrieves the user's photo.

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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4578
4579
4580
4581
4582
4583
4584
4585
4586
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4578

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, but if nested, the memberKey and groupKey must be entities in the same domain or an Invalid input error is returned. To check for nested memberships that include entities outside of the group's domain, use the checkTransitiveMembership() method in the Cloud Identity Groups API.

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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1928

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1464

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1324

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

Creates a 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1590

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

Adds an alias for the group.

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1785

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

Adds a user to the specified group.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1961

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

Adds an organizational unit.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2364

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2625

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3087

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3495

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3339

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

Creates a schema.

Parameters:

  • customer_id (String)

    Immutable ID of the Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3710

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, resolve_conflict_account: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::User

Creates a user. Mutate calls immediately following user creation might sometimes fail as the user isn't fully created due to propagation delay in our backends. Check the error details for the "User creation is not complete" message to see if this is the case. Retrying the calls after some time can help in this case. If resolveConflictAccount is set to true, a 202 response code means that a conflicting unmanaged account exists and was invited to join the organization. A 409 response code means that a conflicting account exists so the user wasn't created based on the handling unmanaged user accounts option selected.

Parameters:

  • user_object (Google::Apis::AdminDirectoryV1::User) (defaults to: nil)
  • resolve_conflict_account (Boolean) (defaults to: nil)

    Optional. If set to true, the option selected for handling unmanaged user accounts will apply. Default: false

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4059

def insert_user(user_object = nil, resolve_conflict_account: 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['resolveConflictAccount'] =  unless .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_alias(user_key, alias_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Alias

Adds an alias.

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4446

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4705
4706
4707
4708
4709
4710
4711
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4705

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

#issue_customer_device_chromeo_command(customer_id, device_id, directory_chromeosdevices_issue_command_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesIssueCommandResponse

Issues a command for the device to execute.

Parameters:

  • customer_id (String)

    Immutable. ID of the Google Workspace account.

  • device_id (String)

    Immutable. ID of Chrome OS Device.

  • directory_chromeosdevices_issue_command_request_object (Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesIssueCommandRequest) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



522
523
524
525
526
527
528
529
530
531
532
533
# File 'lib/google/apis/admin_directory_v1/service.rb', line 522

def issue_customer_device_chromeo_command(customer_id, device_id, directory_chromeosdevices_issue_command_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommand', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesIssueCommandRequest::Representation
  command.request_object = directory_chromeosdevices_issue_command_request_object
  command.response_representation = Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesIssueCommandResponse::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::DirectoryChromeosdevicesIssueCommandResponse
  command.params['customerId'] = customer_id unless customer_id.nil?
  command.params['deviceId'] = device_id unless device_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_asps(user_key, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Asps

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



143
144
145
146
147
148
149
150
151
# File 'lib/google/apis/admin_directory_v1/service.rb', line 143

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 Google Workspace 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, resourceEmail, resourceCategory. 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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

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, include_child_orgunits: nil, 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

Retrieves a paginated list of Chrome OS devices within an account.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • include_child_orgunits (Boolean) (defaults to: nil)

    Return devices from all child orgunits, as well as the specified org unit. If this is set to true, 'orgUnitPath' must be provided.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return. Value should not exceed 300.

  • order_by (String) (defaults to: nil)

    Device property to use for sorting results.

  • org_unit_path (String) (defaults to: nil)

    The full path of the organizational unit (minus the leading /) or its unique ID.

  • page_token (String) (defaults to: nil)

    The pageToken query parameter is used to request the next page of query results. The follow-on request's pageToken query parameter is the nextPageToken from your previous response.

  • projection (String) (defaults to: nil)

    Determines whether the response contains the full list of properties or only a subset.

  • query (String) (defaults to: nil)

    Search string in the format given at https://developers.google.com/admin-sdk/ directory/v1/list-query-operators

  • sort_order (String) (defaults to: nil)

    Whether to return results in ascending or descending order. Must be used with the orderBy parameter.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/google/apis/admin_directory_v1/service.rb', line 318

def list_chrome_os_devices(customer_id, include_child_orgunits: nil, 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['includeChildOrgunits'] = include_child_orgunits unless include_child_orgunits.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_customer_chrome_print_servers(parent, filter: nil, order_by: nil, org_unit_id: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::ListPrintServersResponse

Lists print server configurations.

Parameters:

  • parent (String)

    Required. The unique ID of the customer's Google Workspace account. Format: customers/id``

  • filter (String) (defaults to: nil)

    Search query in Common Expression Language syntax. Supported filters are display_name, description, and uri. Example: printServer.displayName=='marketing-queue'.

  • order_by (String) (defaults to: nil)

    Sort order for results. Supported values are display_name, description, or create_time. Default order is ascending, but descending order can be returned by appending "desc" to the order_by field. For instance, orderBy==' description desc' returns the print servers sorted by description in descending order.

  • org_unit_id (String) (defaults to: nil)

    If org_unit_id is present in the request, only print servers owned or inherited by the organizational unit (OU) are returned. If the PrintServer resource's org_unit_id matches the one in the request, the OU owns the server. If org_unit_id is not specified in the request, all print servers are returned or filtered against.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of objects to return (default 100, max 100). The service might return fewer than this value.

  • page_token (String) (defaults to: nil)

    A generated token to paginate results (the next_page_token from a previous call).

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



879
880
881
882
883
884
885
886
887
888
889
890
891
892
# File 'lib/google/apis/admin_directory_v1/service.rb', line 879

def list_customer_chrome_print_servers(parent, filter: nil, order_by: nil, org_unit_id: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/{+parent}/chrome/printServers', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::ListPrintServersResponse::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::ListPrintServersResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['orgUnitId'] = org_unit_id unless org_unit_id.nil?
  command.query['pageSize'] = page_size unless page_size.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_customer_chrome_printer_printer_models(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::ListPrinterModelsResponse

Lists the supported printer models.

Parameters:

  • parent (String)

    Required. The name of the customer who owns this collection of printers. Format: customers/customer_id

  • filter (String) (defaults to: nil)

    Filer to list only models by a given manufacturer in format: "manufacturer: Brother". Search syntax is shared between this api and Admin Console printers pages.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of objects to return. The service may return fewer than this value.

  • page_token (String) (defaults to: nil)

    A page token, received from a previous call.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1179

def list_customer_chrome_printer_printer_models(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/{+parent}/chrome/printers:listPrinterModels', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::ListPrinterModelsResponse::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::ListPrinterModelsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.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_customer_chrome_printers(parent, filter: nil, order_by: nil, org_unit_id: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::ListPrintersResponse

List printers configs.

Parameters:

  • parent (String)

    Required. The name of the customer who owns this collection of printers. Format: customers/customer_id

  • filter (String) (defaults to: nil)

    Search query. Search syntax is shared between this api and Admin Console printers pages.

  • order_by (String) (defaults to: nil)

    The order to sort results by. Must be one of display_name, description, make_and_model, or create_time. Default order is ascending, but descending order can be returned by appending "desc" to the order_by field. For instance, "description desc" will return the printers sorted by description in descending order.

  • org_unit_id (String) (defaults to: nil)

    Organization Unit that we want to list the printers for. When org_unit is not present in the request then all printers of the customer are returned (or filtered). When org_unit is present in the request then only printers available to this OU will be returned (owned or inherited). You may see if printer is owned or inherited for this OU by looking at Printer.org_unit_id.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of objects to return. The service may return fewer than this value.

  • page_token (String) (defaults to: nil)

    A page token, received from a previous call.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1134

def list_customer_chrome_printers(parent, filter: nil, order_by: nil, org_unit_id: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'admin/directory/v1/{+parent}/chrome/printers', options)
  command.response_representation = Google::Apis::AdminDirectoryV1::ListPrintersResponse::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::ListPrintersResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['orgUnitId'] = org_unit_id unless org_unit_id.nil?
  command.query['pageSize'] = page_size unless page_size.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_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)

    The unique ID for the customer's Google Workspace account. In case of a multi- domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1363

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)

    The unique ID for the customer's Google Workspace account. In case of a multi- domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1501
1502
1503
1504
1505
1506
1507
1508
1509
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1501

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

Lists all aliases for a group.

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1818
1819
1820
1821
1822
1823
1824
1825
1826
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1818

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

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

Parameters:

  • customer (String) (defaults to: nil)

    The unique ID for the customer's Google Workspace account. In case of a multi- domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

  • domain (String) (defaults to: nil)

    The domain name. Use this field to get groups from only one domain. To return all domains for a customer account, use the customer query parameter 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1645

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

Retrieves a paginated list of all members in a group. This method times out after 60 minutes. For more information, see Troubleshoot error codes.

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.

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

    The roles query parameter allows you to retrieve group members by role. Allowed values are OWNER, MANAGER, and 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2005

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

Retrieves a paginated list of all user-owned mobile devices for an account. To retrieve a list that includes company-owned devices, use the Cloud Identity Devices API instead. This method times out after 60 minutes. For more information, see Troubleshoot error codes.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • max_results (Fixnum) (defaults to: nil)

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

  • order_by (String) (defaults to: nil)

    Device property 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 https://developers.google.com/admin-sdk/ directory/v1/search-operators

  • sort_order (String) (defaults to: nil)

    Whether to return results in ascending or descending order. Must be used with the orderBy parameter.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2252

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

Retrieves a list of all organizational units for an account.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • org_unit_path (String) (defaults to: nil)

    The full path to the organizational unit or its unique ID. Returns the children of the specified organizational unit.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2404

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)

    The unique ID for the customer's Google Workspace account. In case of a multi- domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2522
2523
2524
2525
2526
2527
2528
2529
2530
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2522

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2664

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3125

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, include_indirect_role_assignments: nil, 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)

    The unique ID for the customer's Google Workspace account. In case of a multi- domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

  • include_indirect_role_assignments (Boolean) (defaults to: nil)

    When set to true, fetches indirect role assignments (i.e. role assignment via a group) as well as direct ones. Defaults to false. You must specify user_key or the indirect role assignments will not be included.

  • 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 primary email address, alias email address, or unique user or group ID. If included in the request, returns role assignments only for this user or 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3390

def list_role_assignments(customer, include_indirect_role_assignments: nil, 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['includeIndirectRoleAssignments'] = include_indirect_role_assignments unless include_indirect_role_assignments.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)

    The unique ID for the customer's Google Workspace account. In case of a multi- domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3536

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

Retrieves all schemas for a customer.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. In case of a multi- domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3747
3748
3749
3750
3751
3752
3753
3754
3755
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3747

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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3916
3917
3918
3919
3920
3921
3922
3923
3924
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3916

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, event: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Aliases

Lists all aliases for 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.

  • event (String) (defaults to: nil)

    Events to watch for.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4481

def list_user_aliases(user_key, event: nil, 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['event'] = event unless event.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, event: 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

Retrieves a paginated list of either deleted users or all users in a domain.

Parameters:

  • custom_field_mask (String) (defaults to: nil)

    A 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)

    The unique ID for the customer's Google Workspace account. In case of a multi- domain account, to fetch all users for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.

  • domain (String) (defaults to: nil)

    The domain name. Use this field to get users from only one domain. To return all domains for a customer account, use the customer query parameter instead. Either the customer or the domain parameter must be provided.

  • event (String) (defaults to: nil)

    Event on which subscription is intended (if subscribing)

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return.

  • order_by (String) (defaults to: nil)

    Property 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 for searching user fields. For more information on constructing user queries, see Search for 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, ignoring case.

  • view_type (String) (defaults to: nil)

    Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4125

def list_users(custom_field_mask: nil, customer: nil, domain: nil, event: 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['event'] = event unless event.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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4735
4736
4737
4738
4739
4740
4741
4742
4743
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4735

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.

Makes a user a super administrator.

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4168
4169
4170
4171
4172
4173
4174
4175
4176
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4168

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.

Moves or inserts multiple Chrome OS devices to an organizational unit. You can move up to 50 devices at once.

Parameters:

  • customer_id (String)

    Immutable. ID of the Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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

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.

Parameters:

  • customer (String)

    The unique ID for the customer's Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2943

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

Updates a device's updatable properties, such as annotatedUser, annotatedLocation, notes, orgUnitPath, or annotatedAssetId. This method supports patch semantics.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • device_id (String)

    The unique ID of the device. The deviceIds are returned in the response from the chromeosdevices.list method.

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

    Determines whether the response contains the full list of properties or only a subset.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



404
405
406
407
408
409
410
411
412
413
414
415
416
# File 'lib/google/apis/admin_directory_v1/service.rb', line 404

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

Patches a customer.

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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



622
623
624
625
626
627
628
629
630
631
632
# File 'lib/google/apis/admin_directory_v1/service.rb', line 622

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_customer_chrome_print_server(name, print_server_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::PrintServer

Updates a print server's configuration.

Parameters:

  • name (String)

    Immutable. Resource name of the print server. Leave empty when creating. Format: customers/customer.id/printServers/print_server.id``

  • print_server_object (Google::Apis::AdminDirectoryV1::PrintServer) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    The list of fields to update. Some fields are read-only and cannot be updated. Values for unspecified fields are patched.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



919
920
921
922
923
924
925
926
927
928
929
930
# File 'lib/google/apis/admin_directory_v1/service.rb', line 919

def patch_customer_chrome_print_server(name, print_server_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/{+name}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::PrintServer::Representation
  command.request_object = print_server_object
  command.response_representation = Google::Apis::AdminDirectoryV1::PrintServer::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::PrintServer
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_customer_chrome_printer(name, printer_object = nil, clear_mask: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Printer

Updates a Printer resource.

Parameters:

  • name (String)

    The resource name of the Printer object, in the format customers/customer-id/ printers/printer-id (During printer creation leave empty)

  • printer_object (Google::Apis::AdminDirectoryV1::Printer) (defaults to: nil)
  • clear_mask (String) (defaults to: nil)

    The list of fields to be cleared. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched.

  • update_mask (String) (defaults to: nil)

    The list of fields to be updated. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1220

def patch_customer_chrome_printer(name, printer_object = nil, clear_mask: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'admin/directory/v1/{+name}', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Printer::Representation
  command.request_object = printer_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Printer::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Printer
  command.params['name'] = name unless name.nil?
  command.query['clearMask'] = clear_mask unless clear_mask.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

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

Updates a group's properties. This method supports patch semantics.

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1685

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

Updates the membership properties of a user in the specified group. This method supports patch semantics.

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 group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2047

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

Updates an organizational unit. This method supports patch semantics

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • org_unit_path (String)

    The full path of the organizational unit (minus the leading /) or its unique 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2444

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.

Parameters:

  • customer (String)

    The unique ID for the customer's Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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

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.

Parameters:

  • customer (String)

    The unique ID for the customer's Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3162

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

Patches a role.

Parameters:

  • customer (String)

    Immutable ID of the Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3571

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

Patches a schema.

Parameters:

  • customer_id (String)

    Immutable ID of the Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3780

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

Updates a user using patch semantics. The update method should be used instead, because it also supports patch semantics and has better performance. If you' re mapping an external identity to a Google identity, use the update method instead of the patch method. This method is unable to clear fields that contain repeated objects (addresses, phones, etc). Use the update method instead.

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4206

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

Adds a photo for the user. This method supports patch semantics.

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4611

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 Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3200

def rename_resource_feature(customer, old_name, feature_rename_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/customer/{customer}/resources/features/{oldName}/rename', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::FeatureRename::Representation
  command.request_object = feature_rename_object
  command.params['customer'] = customer unless customer.nil?
  command.params['oldName'] = old_name unless old_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

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

This method returns an undefined value.

Signs a user out of all web and device sessions and reset their sign-in cookies. User will have to sign in by authenticating again.

Parameters:

  • user_key (String)

    Identifies the target 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4240
4241
4242
4243
4244
4245
4246
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4240

def sign_user_out(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/signOut', 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

#stop_channel(channel_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Stops watching resources through this channel.

Parameters:

  • channel_object (Google::Apis::AdminDirectoryV1::Channel) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



172
173
174
175
176
177
178
179
# File 'lib/google/apis/admin_directory_v1/service.rb', line 172

def stop_channel(channel_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory_v1/channels/stop', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
  command.request_object = channel_object
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

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

This method returns an undefined value.

Turns off 2-Step Verification for 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3947
3948
3949
3950
3951
3952
3953
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3947

def turn_two_step_verification_off(user_key, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/twoStepVerification/turnOff', 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

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

This method returns an undefined value.

Undeletes a deleted user.

Parameters:

  • user_key (String)

    The immutable id of the user

  • user_undelete_object (Google::Apis::AdminDirectoryV1::UserUndelete) (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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4269
4270
4271
4272
4273
4274
4275
4276
4277
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4269

def undelete_user(user_key, user_undelete_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'admin/directory/v1/users/{userKey}/undelete', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::UserUndelete::Representation
  command.request_object = user_undelete_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

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

Updates a calendar resource. This method supports patch semantics, meaning you only need to include the fields you wish to update. Fields that are not present in the request will be preserved.

Parameters:

  • customer (String)

    The unique ID for the customer's Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2983

def update_calendar_resource(customer, calendar_resource_id, calendar_resource_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, '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

#update_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

Updates a device's updatable properties, such as annotatedUser, annotatedLocation, notes, orgUnitPath, or annotatedAssetId.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • device_id (String)

    The unique ID of the device. The deviceIds are returned in the response from the chromeosdevices.list method.

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

    Determines whether the response contains the full list of properties or only a subset.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



450
451
452
453
454
455
456
457
458
459
460
461
462
# File 'lib/google/apis/admin_directory_v1/service.rb', line 450

def update_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(:put, '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

#update_customer(customer_key, customer_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Customer

Updates a customer.

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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



655
656
657
658
659
660
661
662
663
664
665
# File 'lib/google/apis/admin_directory_v1/service.rb', line 655

def update_customer(customer_key, customer_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, '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

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

Updates a group's properties.

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
# File 'lib/google/apis/admin_directory_v1/service.rb', line 1719

def update_group(group_key, group_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, '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

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

Updates the membership of a user in the specified group.

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 group member in the API request. A group member can be a user or another group. The value can be the member's (group or user) primary email address, alias, or unique ID.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2086

def update_member(group_key, member_key, member_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, '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

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

Updates an organizational unit.

Parameters:

  • customer_id (String)

    The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource.

  • org_unit_path (String)

    The full path of the organizational unit (minus the leading /) or its unique 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2484

def update_org_unit(customer_id, org_unit_path, org_unit_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, '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

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

Updates a building.

Parameters:

  • customer (String)

    The unique ID for the customer's Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
# File 'lib/google/apis/admin_directory_v1/service.rb', line 2744

def update_resource_building(customer, building_id, building_object = nil, coordinates_source: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, '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

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

Updates a feature.

Parameters:

  • customer (String)

    The unique ID for the customer's Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3236

def update_resource_feature(customer, feature_key, feature_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, '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

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

Updates a role.

Parameters:

  • customer (String)

    Immutable ID of the Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3607

def update_role(customer, role_id, role_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, '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

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

Updates a schema.

Parameters:

  • customer_id (String)

    Immutable ID of the Google Workspace 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
# File 'lib/google/apis/admin_directory_v1/service.rb', line 3816

def update_schema(customer_id, schema_key, schema_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, '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

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

Updates a user. This method supports patch semantics, meaning that you only need to include the fields you wish to update. Fields that are not present in the request will be preserved, and fields set to null will be cleared. For repeating fields that contain arrays, individual items in the array can't be patched piecemeal; they must be supplied in the request body with the desired values for all items. See the user accounts guide for more information.

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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4308

def update_user(user_key, user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, '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

#update_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::UserPhoto

Adds a photo for the 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.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4645

def update_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, '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

#watch_user(channel_object = nil, custom_field_mask: nil, customer: nil, domain: nil, event: 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::Channel

Watches for changes in users list.

Parameters:

  • channel_object (Google::Apis::AdminDirectoryV1::Channel) (defaults to: nil)
  • 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 Google Workspace 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."

  • event (String) (defaults to: nil)

    Events to watch for.

  • 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 administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4369

def watch_user(channel_object = nil, custom_field_mask: nil, customer: nil, domain: nil, event: 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(:post, 'admin/directory/v1/users/watch', options)
  command.request_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
  command.request_object = channel_object
  command.response_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
  command.response_class = Google::Apis::AdminDirectoryV1::Channel
  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['event'] = event unless event.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

#watch_user_alias(user_key, channel_object = nil, event: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminDirectoryV1::Channel

Watches for changes in users list.

Parameters:

  • user_key (String)

    Email or immutable ID of the user

  • channel_object (Google::Apis::AdminDirectoryV1::Channel) (defaults to: nil)
  • event (String) (defaults to: nil)

    Events to watch for.

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

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
# File 'lib/google/apis/admin_directory_v1/service.rb', line 4515

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