Class: Google::Apis::AndroidmanagementV1::AndroidManagementService

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

Overview

Android Management API

The Android Management API provides remote enterprise management of Android devices and apps.

Examples:

require 'google/apis/androidmanagement_v1'

Androidmanagement = Google::Apis::AndroidmanagementV1 # Alias the module
service = Androidmanagement::AndroidManagementService.new

See Also:

Constant Summary collapse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAndroidManagementService

Returns a new instance of AndroidManagementService.



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

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-androidmanagement_v1',
        client_version: Google::Apis::AndroidmanagementV1::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.



41
42
43
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 41

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.



46
47
48
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 46

def quota_user
  @quota_user
end

Instance Method Details

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

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

Parameters:

  • name (String)

    The name of the operation resource to be cancelled.

  • 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



498
499
500
501
502
503
504
505
506
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 498

def cancel_enterprise_device_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:cancel', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::Empty::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::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

#create_enterprise(enterprise_object = nil, agreement_accepted: nil, enterprise_token: nil, project_id: nil, signup_url_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Enterprise

Creates an enterprise. This is the last step in the enterprise signup flow. See also: SigninDetail

Parameters:

  • enterprise_object (Google::Apis::AndroidmanagementV1::Enterprise) (defaults to: nil)
  • agreement_accepted (Boolean) (defaults to: nil)

    Whether the enterprise admin has seen and agreed to the managed Google Play Agreement (https://www.android.com/enterprise/terms/). Do not set this field for any customer-managed enterprise (https://developers.google.com/android/ management/create-enterprise#customer-managed_enterprises). Set this to field to true for all EMM-managed enterprises (https://developers.google.com/android/ management/create-enterprise#emm-managed_enterprises).

  • enterprise_token (String) (defaults to: nil)

    The enterprise token appended to the callback URL. Set this when creating a customer-managed enterprise (https://developers.google.com/android/management/ create-enterprise#customer-managed_enterprises) and not when creating a deprecated EMM-managed enterprise (https://developers.google.com/android/ management/create-enterprise#emm-managed_enterprises).

  • project_id (String) (defaults to: nil)

    The ID of the Google Cloud Platform project which will own the enterprise.

  • signup_url_name (String) (defaults to: nil)

    The name of the SignupUrl used to sign up for the enterprise. Set this when creating a customer-managed enterprise (https://developers.google.com/android/ management/create-enterprise#customer-managed_enterprises) and not when creating a deprecated EMM-managed enterprise (https://developers.google.com/ android/management/create-enterprise#emm-managed_enterprises).

  • 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



96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 96

def create_enterprise(enterprise_object = nil, agreement_accepted: nil, enterprise_token: nil, project_id: nil, signup_url_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/enterprises', options)
  command.request_representation = Google::Apis::AndroidmanagementV1::Enterprise::Representation
  command.request_object = enterprise_object
  command.response_representation = Google::Apis::AndroidmanagementV1::Enterprise::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::Enterprise
  command.query['agreementAccepted'] = agreement_accepted unless agreement_accepted.nil?
  command.query['enterpriseToken'] = enterprise_token unless enterprise_token.nil?
  command.query['projectId'] = project_id unless project_id.nil?
  command.query['signupUrlName'] =  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

#create_enterprise_enrollment_token(parent, enrollment_token_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::EnrollmentToken

Creates an enrollment token for a given enterprise. It's up to the caller's responsibility to manage the lifecycle of newly created tokens and deleting them when they're not intended to be used anymore.

Parameters:

  • parent (String)

    The name of the enterprise in the form enterprises/enterpriseId.

  • enrollment_token_object (Google::Apis::AndroidmanagementV1::EnrollmentToken) (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



602
603
604
605
606
607
608
609
610
611
612
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 602

def create_enterprise_enrollment_token(parent, enrollment_token_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/enrollmentTokens', options)
  command.request_representation = Google::Apis::AndroidmanagementV1::EnrollmentToken::Representation
  command.request_object = enrollment_token_object
  command.response_representation = Google::Apis::AndroidmanagementV1::EnrollmentToken::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::EnrollmentToken
  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_enterprise_migration_token(parent, migration_token_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::MigrationToken

Creates a migration token, to migrate an existing device from being managed by the EMM's Device Policy Controller (DPC) to being managed by the Android Management API. See the guide (https://developers.google.com/android/ management/dpc-migration) for more details.

Parameters:

  • parent (String)

    Required. The enterprise in which this migration token is created. This must be the same enterprise which already manages the device in the Play EMM API. Format: enterprises/enterprise

  • migration_token_object (Google::Apis::AndroidmanagementV1::MigrationToken) (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



751
752
753
754
755
756
757
758
759
760
761
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 751

def create_enterprise_migration_token(parent, migration_token_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/migrationTokens', options)
  command.request_representation = Google::Apis::AndroidmanagementV1::MigrationToken::Representation
  command.request_object = migration_token_object
  command.response_representation = Google::Apis::AndroidmanagementV1::MigrationToken::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::MigrationToken
  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_enterprise_web_app(parent, web_app_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::WebApp

Creates a web app.

Parameters:

  • parent (String)

    The name of the enterprise in the form enterprises/enterpriseId.

  • web_app_object (Google::Apis::AndroidmanagementV1::WebApp) (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



994
995
996
997
998
999
1000
1001
1002
1003
1004
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 994

def create_enterprise_web_app(parent, web_app_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/webApps', options)
  command.request_representation = Google::Apis::AndroidmanagementV1::WebApp::Representation
  command.request_object = web_app_object
  command.response_representation = Google::Apis::AndroidmanagementV1::WebApp::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::WebApp
  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_enterprise_web_token(parent, web_token_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::WebToken

Creates a web token to access an embeddable managed Google Play web UI for a given enterprise.

Parameters:

  • parent (String)

    The name of the enterprise in the form enterprises/enterpriseId.

  • web_token_object (Google::Apis::AndroidmanagementV1::WebToken) (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



1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 1165

def create_enterprise_web_token(parent, web_token_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/webTokens', options)
  command.request_representation = Google::Apis::AndroidmanagementV1::WebToken::Representation
  command.request_object = web_token_object
  command.response_representation = Google::Apis::AndroidmanagementV1::WebToken::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::WebToken
  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_signup_url(admin_email: nil, callback_url: nil, project_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::SignupUrl

Creates an enterprise signup URL.

Parameters:

  • admin_email (String) (defaults to: nil)

    Optional. Email address used to prefill the admin field of the enterprise signup form. This value is a hint only and can be altered by the user.

  • callback_url (String) (defaults to: nil)

    The callback URL that the admin will be redirected to after successfully creating an enterprise. Before redirecting there the system will add a query parameter to this URL named enterpriseToken which will contain an opaque token to be used for the create enterprise request. The URL will be parsed then reformatted in order to add the enterpriseToken parameter, so there may be some minor formatting changes.

  • project_id (String) (defaults to: nil)

    The ID of the Google Cloud Platform project which will own the enterprise.

  • 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



1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 1239

def (admin_email: nil, callback_url: nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/signupUrls', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::SignupUrl::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::SignupUrl
  command.query['adminEmail'] = admin_email unless admin_email.nil?
  command.query['callbackUrl'] = callback_url unless callback_url.nil?
  command.query['projectId'] = project_id unless project_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_enterprise(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Empty

Permanently deletes an enterprise and all accounts and data associated with it. Warning: this will result in a cascaded deletion of all AM API devices associated with the deleted enterprise. Only available for EMM-managed enterprises.

Parameters:

  • name (String)

    The name of the enterprise in the form enterprises/enterpriseId.

  • 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



134
135
136
137
138
139
140
141
142
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 134

def delete_enterprise(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::Empty::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::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_enterprise_device(name, wipe_data_flags: nil, wipe_reason_message: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Empty

Deletes a device. This operation wipes the device. Deleted devices do not show up in enterprises.devices.list calls and a 404 is returned from enterprises. devices.get.

Parameters:

  • name (String)

    The name of the device in the form enterprises/enterpriseId/devices/ deviceId.

  • wipe_data_flags (Array<String>, String) (defaults to: nil)

    Optional flags that control the device wiping behavior.

  • wipe_reason_message (String) (defaults to: nil)

    Optional. A short message displayed to the user before wiping the work profile on personal devices. This has no effect on company owned devices. The maximum message length is 200 characters.

  • 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



316
317
318
319
320
321
322
323
324
325
326
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 316

def delete_enterprise_device(name, wipe_data_flags: nil, wipe_reason_message: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::Empty::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::Empty
  command.params['name'] = name unless name.nil?
  command.query['wipeDataFlags'] = wipe_data_flags unless wipe_data_flags.nil?
  command.query['wipeReasonMessage'] = wipe_reason_message unless wipe_reason_message.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_enterprise_enrollment_token(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Empty

Deletes an enrollment token. This operation invalidates the token, preventing its future use.

Parameters:

  • name (String)

    The name of the enrollment token in the form enterprises/enterpriseId/ enrollmentTokens/enrollmentTokenId.

  • 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



636
637
638
639
640
641
642
643
644
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 636

def delete_enterprise_enrollment_token(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::Empty::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::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_enterprise_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Empty

Deletes a policy. This operation is only permitted if no devices are currently referencing the policy.

Parameters:

  • name (String)

    The name of the policy in the form enterprises/enterpriseId/policies/ policyId.

  • 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



857
858
859
860
861
862
863
864
865
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 857

def delete_enterprise_policy(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::Empty::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::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_enterprise_web_app(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Empty

Deletes a web app.

Parameters:

  • name (String)

    The name of the web app in the form enterprises/enterpriseId/webApps/ packageName.

  • 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



1027
1028
1029
1030
1031
1032
1033
1034
1035
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 1027

def delete_enterprise_web_app(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::Empty::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::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

#get_enterprise(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Enterprise

Gets an enterprise.

Parameters:

  • name (String)

    The name of the enterprise in the form enterprises/enterpriseId.

  • 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



164
165
166
167
168
169
170
171
172
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 164

def get_enterprise(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::Enterprise::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::Enterprise
  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_enterprise_application(name, language_code: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Application

Gets info about an application.

Parameters:

  • name (String)

    The name of the application in the form enterprises/enterpriseId/ applications/package_name.

  • language_code (String) (defaults to: nil)

    The preferred language for localized application info, as a BCP47 tag (e.g. " en-US", "de"). If not specified the default language of the application will be used.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

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

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

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



276
277
278
279
280
281
282
283
284
285
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 276

def get_enterprise_application(name, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::Application::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::Application
  command.params['name'] = name unless name.nil?
  command.query['languageCode'] = language_code unless language_code.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_enterprise_device(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Device

Gets a device. Deleted devices will respond with a 404 error.

Parameters:

  • name (String)

    The name of the device in the form enterprises/enterpriseId/devices/ deviceId.

  • 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



349
350
351
352
353
354
355
356
357
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 349

def get_enterprise_device(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::Device::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::Device
  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_enterprise_device_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Operation

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters:

  • name (String)

    The name of the operation resource.

  • 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



529
530
531
532
533
534
535
536
537
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 529

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

#get_enterprise_enrollment_token(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::EnrollmentToken

Gets an active, unexpired enrollment token. A partial view of the enrollment token is returned. Only the following fields are populated: name, expirationTimestamp, allowPersonalUsage, value, qrCode. This method is meant to help manage active enrollment tokens lifecycle. For security reasons, it's recommended to delete active enrollment tokens as soon as they're not intended to be used anymore.

Parameters:

  • name (String)

    Required. The name of the enrollment token in the form enterprises/ enterpriseId/enrollmentTokens/enrollmentTokenId.

  • 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



672
673
674
675
676
677
678
679
680
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 672

def get_enterprise_enrollment_token(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::EnrollmentToken::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::EnrollmentToken
  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_enterprise_migration_token(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::MigrationToken

Gets a migration token.

Parameters:

  • name (String)

    Required. The name of the migration token to retrieve. Format: enterprises/ enterprise/migrationTokens/migration_token

  • 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



784
785
786
787
788
789
790
791
792
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 784

def get_enterprise_migration_token(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::MigrationToken::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::MigrationToken
  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_enterprise_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Policy

Gets a policy.

Parameters:

  • name (String)

    The name of the policy in the form enterprises/enterpriseId/policies/ policyId.

  • 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



888
889
890
891
892
893
894
895
896
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 888

def get_enterprise_policy(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::Policy::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::Policy
  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_enterprise_web_app(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::WebApp

Gets a web app.

Parameters:

  • name (String)

    The name of the web app in the form enterprises/enterpriseId/webApp/ packageName.

  • 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



1058
1059
1060
1061
1062
1063
1064
1065
1066
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 1058

def get_enterprise_web_app(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::WebApp::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::WebApp
  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_provisioning_info(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::ProvisioningInfo

Get the device provisioning information by the identifier provided in the sign- in url.

Parameters:

  • name (String)

    Required. The identifier that Android Device Policy passes to the 3P sign-in page in the form of provisioningInfo/provisioning_info.

  • 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



1199
1200
1201
1202
1203
1204
1205
1206
1207
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 1199

def get_provisioning_info(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::ProvisioningInfo::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::ProvisioningInfo
  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

#issue_enterprise_device_command(name, command_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Operation

Issues a command to a device. The Operation resource returned contains a Command in its metadata field. Use the get operation method to get the status of the command.

Parameters:

  • name (String)

    The name of the device in the form enterprises/enterpriseId/devices/ deviceId.

  • command_object (Google::Apis::AndroidmanagementV1::Command) (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



383
384
385
386
387
388
389
390
391
392
393
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 383

def issue_enterprise_device_command(name, command_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:issueCommand', options)
  command.request_representation = Google::Apis::AndroidmanagementV1::Command::Representation
  command.request_object = command_object
  command.response_representation = Google::Apis::AndroidmanagementV1::Operation::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::Operation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_enterprise_device_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::ListOperationsResponse

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

Parameters:

  • name (String)

    The name of the operation's parent resource.

  • filter (String) (defaults to: nil)

    The standard list filter.

  • page_size (Fixnum) (defaults to: nil)

    The standard list page size.

  • page_token (String) (defaults to: nil)

    The standard list page token.

  • 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



566
567
568
569
570
571
572
573
574
575
576
577
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 566

def list_enterprise_device_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::ListOperationsResponse::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::ListOperationsResponse
  command.params['name'] = name unless name.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_enterprise_devices(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::ListDevicesResponse

Lists devices for a given enterprise. Deleted devices are not returned in the response.

Parameters:

  • parent (String)

    The name of the enterprise in the form enterprises/enterpriseId.

  • page_size (Fixnum) (defaults to: nil)

    The requested page size. The actual page size may be fixed to a min or max value.

  • page_token (String) (defaults to: nil)

    A token identifying a page of results returned by the server.

  • 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



421
422
423
424
425
426
427
428
429
430
431
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 421

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

#list_enterprise_enrollment_tokens(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::ListEnrollmentTokensResponse

Lists active, unexpired enrollment tokens for a given enterprise. The list items contain only a partial view of EnrollmentToken object. Only the following fields are populated: name, expirationTimestamp, allowPersonalUsage, value, qrCode. This method is meant to help manage active enrollment tokens lifecycle. For security reasons, it's recommended to delete active enrollment tokens as soon as they're not intended to be used anymore.

Parameters:

  • parent (String)

    Required. The name of the enterprise in the form enterprises/enterpriseId.

  • page_size (Fixnum) (defaults to: nil)

    The requested page size. The service may return fewer than this value. If unspecified, at most 10 items will be returned. The maximum value is 100; values above 100 will be coerced to 100.

  • page_token (String) (defaults to: nil)

    A token identifying a page of results returned by the server.

  • 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



713
714
715
716
717
718
719
720
721
722
723
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 713

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

#list_enterprise_migration_tokens(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::ListMigrationTokensResponse

Lists migration tokens.

Parameters:

  • parent (String)

    Required. The enterprise which the migration tokens belong to. Format: enterprises/enterprise

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of migration tokens to return. Fewer migration tokens may be returned. If unspecified, at most 100 migration tokens will be returned. The maximum value is 100; values above 100 will be coerced to 100.

  • page_token (String) (defaults to: nil)

    A page token, received from a previous ListMigrationTokens call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to ListMigrationTokens must match the call that provided the page token.

  • 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



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

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

#list_enterprise_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::ListPoliciesResponse

Lists policies for a given enterprise.

Parameters:

  • parent (String)

    The name of the enterprise in the form enterprises/enterpriseId.

  • page_size (Fixnum) (defaults to: nil)

    The requested page size. The actual page size may be fixed to a min or max value.

  • page_token (String) (defaults to: nil)

    A token identifying a page of results returned by the server.

  • 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



923
924
925
926
927
928
929
930
931
932
933
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 923

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

#list_enterprise_web_apps(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::ListWebAppsResponse

Lists web apps for a given enterprise.

Parameters:

  • parent (String)

    The name of the enterprise in the form enterprises/enterpriseId.

  • page_size (Fixnum) (defaults to: nil)

    The requested page size. This is a hint and the actual page size in the response may be different.

  • page_token (String) (defaults to: nil)

    A token identifying a page of results returned by the server.

  • 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



1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 1093

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

#list_enterprises(page_size: nil, page_token: nil, project_id: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::ListEnterprisesResponse

Lists EMM-managed enterprises. Only BASIC fields are returned.

Parameters:

  • page_size (Fixnum) (defaults to: nil)

    The requested page size. The actual page size may be fixed to a min or max value.

  • page_token (String) (defaults to: nil)

    A token identifying a page of results returned by the server.

  • project_id (String) (defaults to: nil)

    Required. The Cloud project ID of the EMM managing the enterprises.

  • view (String) (defaults to: nil)

    Specifies which Enterprise fields to return. This method only supports BASIC.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

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

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

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



201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 201

def list_enterprises(page_size: nil, page_token: nil, project_id: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/enterprises', options)
  command.response_representation = Google::Apis::AndroidmanagementV1::ListEnterprisesResponse::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::ListEnterprisesResponse
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['projectId'] = project_id unless project_id.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_enterprise(name, enterprise_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Enterprise

Updates an enterprise. See also: SigninDetail

Parameters:

  • name (String)

    The name of the enterprise in the form enterprises/enterpriseId.

  • enterprise_object (Google::Apis::AndroidmanagementV1::Enterprise) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    The field mask indicating the fields to update. If not set, all modifiable fields will be modified.

  • 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



238
239
240
241
242
243
244
245
246
247
248
249
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 238

def patch_enterprise(name, enterprise_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/{+name}', options)
  command.request_representation = Google::Apis::AndroidmanagementV1::Enterprise::Representation
  command.request_object = enterprise_object
  command.response_representation = Google::Apis::AndroidmanagementV1::Enterprise::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::Enterprise
  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_enterprise_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Device

Updates a device.

Parameters:

  • name (String)

    The name of the device in the form enterprises/enterpriseId/devices/ deviceId.

  • device_object (Google::Apis::AndroidmanagementV1::Device) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    The field mask indicating the fields to update. If not set, all modifiable fields will be modified.

  • 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



458
459
460
461
462
463
464
465
466
467
468
469
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 458

def patch_enterprise_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/{+name}', options)
  command.request_representation = Google::Apis::AndroidmanagementV1::Device::Representation
  command.request_object = device_object
  command.response_representation = Google::Apis::AndroidmanagementV1::Device::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::Device
  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_enterprise_policy(name, policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::Policy

Updates or creates a policy.

Parameters:

  • name (String)

    The name of the policy in the form enterprises/enterpriseId/policies/ policyId.

  • policy_object (Google::Apis::AndroidmanagementV1::Policy) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    The field mask indicating the fields to update. If not set, all modifiable fields will be modified.

  • 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



960
961
962
963
964
965
966
967
968
969
970
971
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 960

def patch_enterprise_policy(name, policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/{+name}', options)
  command.request_representation = Google::Apis::AndroidmanagementV1::Policy::Representation
  command.request_object = policy_object
  command.response_representation = Google::Apis::AndroidmanagementV1::Policy::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::Policy
  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_enterprise_web_app(name, web_app_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AndroidmanagementV1::WebApp

Updates a web app.

Parameters:

  • name (String)

    The name of the web app in the form enterprises/enterpriseId/webApps/ packageName.

  • web_app_object (Google::Apis::AndroidmanagementV1::WebApp) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    The field mask indicating the fields to update. If not set, all modifiable fields will be modified.

  • 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



1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
# File 'lib/google/apis/androidmanagement_v1/service.rb', line 1130

def patch_enterprise_web_app(name, web_app_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/{+name}', options)
  command.request_representation = Google::Apis::AndroidmanagementV1::WebApp::Representation
  command.request_object = web_app_object
  command.response_representation = Google::Apis::AndroidmanagementV1::WebApp::Representation
  command.response_class = Google::Apis::AndroidmanagementV1::WebApp
  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