Class: Google::Apis::ChromepolicyV1::ChromePolicyService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::ChromepolicyV1::ChromePolicyService
- Defined in:
- lib/google/apis/chromepolicy_v1/service.rb
Overview
Chrome Policy API
The Chrome Policy API is a suite of services that allows Chrome administrators to control the policies applied to their managed Chrome OS devices and Chrome browsers.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#batch_customer_policy_group_delete(customer, google_chrome_policy_versions_v1_batch_delete_group_policies_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleProtobufEmpty
Delete multiple policy values that are applied to a specific group.
-
#batch_customer_policy_group_modify(customer, google_chrome_policy_versions_v1_batch_modify_group_policies_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleProtobufEmpty
Modify multiple policy values that are applied to a specific group.
-
#batch_customer_policy_orgunit_inherit(customer, google_chrome_policy_versions_v1_batch_inherit_org_unit_policies_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleProtobufEmpty
Modify multiple policy values that are applied to a specific org unit so that they now inherit the value from a parent (if applicable).
-
#batch_customer_policy_orgunit_modify(customer, google_chrome_policy_versions_v1_batch_modify_org_unit_policies_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleProtobufEmpty
Modify multiple policy values that are applied to a specific org unit.
-
#define_customer_policy_network_certificate(customer, google_chrome_policy_versions_v1_define_certificate_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1DefineCertificateResponse
Creates a certificate at a specified OU for a customer.
-
#define_customer_policy_network_network(customer, google_chrome_policy_versions_v1_define_network_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1DefineNetworkResponse
Define a new network.
-
#get_customer_policy_schema(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1PolicySchema
Get a specific policy schema for a customer by its resource name.
-
#initialize ⇒ ChromePolicyService
constructor
A new instance of ChromePolicyService.
-
#list_customer_policy_group_group_priority_ordering(customer, google_chrome_policy_versions_v1_list_group_priority_ordering_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ListGroupPriorityOrderingResponse
Retrieve a group priority ordering for an app.
-
#list_customer_policy_schemas(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ListPolicySchemasResponse
Gets a list of policy schemas that match a specified filter value for a given customer.
-
#remove_customer_policy_network_certificate(customer, google_chrome_policy_versions_v1_remove_certificate_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1RemoveCertificateResponse
Remove an existing certificate by guid.
-
#remove_customer_policy_network_network(customer, google_chrome_policy_versions_v1_remove_network_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1RemoveNetworkResponse
Remove an existing network by guid.
-
#resolve_customer_policy(customer, google_chrome_policy_versions_v1_resolve_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ResolveResponse
Gets the resolved policy values for a list of policies that match a search query.
-
#update_customer_policy_group_group_priority_ordering(customer, google_chrome_policy_versions_v1_update_group_priority_ordering_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleProtobufEmpty
Update a group priority ordering for an app.
-
#upload_medium(customer, google_chrome_policy_versions_v1_upload_policy_file_request_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1UploadPolicyFileResponse
Creates an enterprise file from the content provided by user.
Constructor Details
#initialize ⇒ ChromePolicyService
Returns a new instance of ChromePolicyService.
47 48 49 50 51 52 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 47 def initialize super('https://chromepolicy.googleapis.com/', '', client_name: 'google-apis-chromepolicy_v1', client_version: Google::Apis::ChromepolicyV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
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.
40 41 42 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 40 def key @key end |
#quota_user ⇒ String
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.
45 46 47 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#batch_customer_policy_group_delete(customer, google_chrome_policy_versions_v1_batch_delete_group_policies_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleProtobufEmpty
Delete multiple policy values that are applied to a specific group. All
targets must have the same target format. That is to say that they must point
to the same target resource and must have the same keys specified in
additionalTargetKeyNames, though the values for those keys may be different.
On failure the request will return the error details as part of the google.rpc.
Status.
116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 116 def batch_customer_policy_group_delete(customer, google_chrome_policy_versions_v1_batch_delete_group_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+customer}/policies/groups:batchDelete', ) command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1BatchDeleteGroupPoliciesRequest::Representation command.request_object = google_chrome_policy_versions_v1_batch_delete_group_policies_request_object command.response_representation = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty 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 |
#batch_customer_policy_group_modify(customer, google_chrome_policy_versions_v1_batch_modify_group_policies_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleProtobufEmpty
Modify multiple policy values that are applied to a specific group. All
targets must have the same target format. That is to say that they must point
to the same target resource and must have the same keys specified in
additionalTargetKeyNames, though the values for those keys may be different.
On failure the request will return the error details as part of the google.rpc.
Status.
155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 155 def batch_customer_policy_group_modify(customer, google_chrome_policy_versions_v1_batch_modify_group_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+customer}/policies/groups:batchModify', ) command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1BatchModifyGroupPoliciesRequest::Representation command.request_object = google_chrome_policy_versions_v1_batch_modify_group_policies_request_object command.response_representation = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty 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 |
#batch_customer_policy_orgunit_inherit(customer, google_chrome_policy_versions_v1_batch_inherit_org_unit_policies_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleProtobufEmpty
Modify multiple policy values that are applied to a specific org unit so that
they now inherit the value from a parent (if applicable). All targets must
have the same target format. That is to say that they must point to the same
target resource and must have the same keys specified in
additionalTargetKeyNames, though the values for those keys may be different.
On failure the request will return the error details as part of the google.rpc.
Status.
399 400 401 402 403 404 405 406 407 408 409 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 399 def batch_customer_policy_orgunit_inherit(customer, google_chrome_policy_versions_v1_batch_inherit_org_unit_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+customer}/policies/orgunits:batchInherit', ) command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1BatchInheritOrgUnitPoliciesRequest::Representation command.request_object = google_chrome_policy_versions_v1_batch_inherit_org_unit_policies_request_object command.response_representation = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty 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 |
#batch_customer_policy_orgunit_modify(customer, google_chrome_policy_versions_v1_batch_modify_org_unit_policies_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleProtobufEmpty
Modify multiple policy values that are applied to a specific org unit. All
targets must have the same target format. That is to say that they must point
to the same target resource and must have the same keys specified in
additionalTargetKeyNames, though the values for those keys may be different.
On failure the request will return the error details as part of the google.rpc.
Status.
438 439 440 441 442 443 444 445 446 447 448 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 438 def batch_customer_policy_orgunit_modify(customer, google_chrome_policy_versions_v1_batch_modify_org_unit_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+customer}/policies/orgunits:batchModify', ) command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1BatchModifyOrgUnitPoliciesRequest::Representation command.request_object = google_chrome_policy_versions_v1_batch_modify_org_unit_policies_request_object command.response_representation = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty 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 |
#define_customer_policy_network_certificate(customer, google_chrome_policy_versions_v1_define_certificate_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1DefineCertificateResponse
Creates a certificate at a specified OU for a customer.
260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 260 def define_customer_policy_network_certificate(customer, google_chrome_policy_versions_v1_define_certificate_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+customer}/policies/networks:defineCertificate', ) command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1DefineCertificateRequest::Representation command.request_object = google_chrome_policy_versions_v1_define_certificate_request_object command.response_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1DefineCertificateResponse::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1DefineCertificateResponse 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 |
#define_customer_policy_network_network(customer, google_chrome_policy_versions_v1_define_network_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1DefineNetworkResponse
Define a new network.
293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 293 def define_customer_policy_network_network(customer, google_chrome_policy_versions_v1_define_network_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+customer}/policies/networks:defineNetwork', ) command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1DefineNetworkRequest::Representation command.request_object = google_chrome_policy_versions_v1_define_network_request_object command.response_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1DefineNetworkResponse::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1DefineNetworkResponse 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 |
#get_customer_policy_schema(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1PolicySchema
Get a specific policy schema for a customer by its resource name.
470 471 472 473 474 475 476 477 478 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 470 def get_customer_policy_schema(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1PolicySchema::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1PolicySchema 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_customer_policy_group_group_priority_ordering(customer, google_chrome_policy_versions_v1_list_group_priority_ordering_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ListGroupPriorityOrderingResponse
Retrieve a group priority ordering for an app. The target app must be supplied
in additionalTargetKeyNames in the PolicyTargetKey. On failure the request
will return the error details as part of the google.rpc.Status.
191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 191 def list_customer_policy_group_group_priority_ordering(customer, google_chrome_policy_versions_v1_list_group_priority_ordering_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+customer}/policies/groups:listGroupPriorityOrdering', ) command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ListGroupPriorityOrderingRequest::Representation command.request_object = google_chrome_policy_versions_v1_list_group_priority_ordering_request_object command.response_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ListGroupPriorityOrderingResponse::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ListGroupPriorityOrderingResponse 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_customer_policy_schemas(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ListPolicySchemasResponse
Gets a list of policy schemas that match a specified filter value for a given customer.
509 510 511 512 513 514 515 516 517 518 519 520 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 509 def list_customer_policy_schemas(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/policySchemas', ) command.response_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ListPolicySchemasResponse::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ListPolicySchemasResponse 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 |
#remove_customer_policy_network_certificate(customer, google_chrome_policy_versions_v1_remove_certificate_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1RemoveCertificateResponse
Remove an existing certificate by guid.
326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 326 def remove_customer_policy_network_certificate(customer, google_chrome_policy_versions_v1_remove_certificate_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+customer}/policies/networks:removeCertificate', ) command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1RemoveCertificateRequest::Representation command.request_object = google_chrome_policy_versions_v1_remove_certificate_request_object command.response_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1RemoveCertificateResponse::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1RemoveCertificateResponse 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 |
#remove_customer_policy_network_network(customer, google_chrome_policy_versions_v1_remove_network_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1RemoveNetworkResponse
Remove an existing network by guid.
359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 359 def remove_customer_policy_network_network(customer, google_chrome_policy_versions_v1_remove_network_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+customer}/policies/networks:removeNetwork', ) command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1RemoveNetworkRequest::Representation command.request_object = google_chrome_policy_versions_v1_remove_network_request_object command.response_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1RemoveNetworkResponse::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1RemoveNetworkResponse 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 |
#resolve_customer_policy(customer, google_chrome_policy_versions_v1_resolve_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ResolveResponse
Gets the resolved policy values for a list of policies that match a search query.
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 77 def resolve_customer_policy(customer, google_chrome_policy_versions_v1_resolve_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+customer}/policies:resolve', ) command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ResolveRequest::Representation command.request_object = google_chrome_policy_versions_v1_resolve_request_object command.response_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ResolveResponse::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1ResolveResponse 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 |
#update_customer_policy_group_group_priority_ordering(customer, google_chrome_policy_versions_v1_update_group_priority_ordering_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleProtobufEmpty
Update a group priority ordering for an app. The target app must be supplied
in additionalTargetKeyNames in the PolicyTargetKey. On failure the request
will return the error details as part of the google.rpc.Status.
227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 227 def update_customer_policy_group_group_priority_ordering(customer, google_chrome_policy_versions_v1_update_group_priority_ordering_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+customer}/policies/groups:updateGroupPriorityOrdering', ) command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1UpdateGroupPriorityOrderingRequest::Representation command.request_object = google_chrome_policy_versions_v1_update_group_priority_ordering_request_object command.response_representation = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleProtobufEmpty 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 |
#upload_medium(customer, google_chrome_policy_versions_v1_upload_policy_file_request_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1UploadPolicyFileResponse
Creates an enterprise file from the content provided by user. Returns a public download url for end user.
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 |
# File 'lib/google/apis/chromepolicy_v1/service.rb', line 548 def upload_medium(customer, google_chrome_policy_versions_v1_upload_policy_file_request_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'v1/{+customer}/policies/files:uploadPolicyFile', ) else command = make_upload_command(:post, 'v1/{+customer}/policies/files:uploadPolicyFile', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1UploadPolicyFileRequest::Representation command.request_object = google_chrome_policy_versions_v1_upload_policy_file_request_object command.response_representation = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1UploadPolicyFileResponse::Representation command.response_class = Google::Apis::ChromepolicyV1::GoogleChromePolicyVersionsV1UploadPolicyFileResponse 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 |