Class: Google::Apis::CloudiotV1beta1::CloudIotService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::CloudiotV1beta1::CloudIotService
- Defined in:
- generated/google/apis/cloudiot_v1beta1/service.rb
Overview
Google Cloud IoT API
Registers and manages IoT (Internet of Things) devices that connect to the Google Cloud Platform.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Attributes inherited from Google::Apis::Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#create_project_location_registry(parent, device_registry_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::DeviceRegistry
Creates a device registry that contains devices.
-
#create_project_location_registry_device(parent, device_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Device
Creates a device in a device registry.
-
#delete_project_location_registry(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Empty
Deletes a device registry configuration.
-
#delete_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Empty
Deletes a device.
-
#get_project_location_registry(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::DeviceRegistry
Gets a device registry configuration.
-
#get_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Device
Gets details about a device.
-
#get_registry_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Policy
Gets the access control policy for a resource.
-
#initialize ⇒ CloudIotService
constructor
A new instance of CloudIotService.
-
#list_project_location_registries(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::ListDeviceRegistriesResponse
Lists device registries.
-
#list_project_location_registry_device_config_versions(name, num_versions: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::ListDeviceConfigVersionsResponse
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
-
#list_project_location_registry_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::ListDevicesResponse
List devices in a device registry.
-
#modify_cloud_to_device_config(name, modify_cloud_to_device_config_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::DeviceConfig
Modifies the configuration for the device, which is eventually sent from the Cloud IoT servers.
-
#patch_project_location_registry(name, device_registry_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::DeviceRegistry
Updates a device registry configuration.
-
#patch_project_location_registry_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Device
Updates a device.
-
#set_registry_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Policy
Sets the access control policy on the specified resource.
-
#test_registry_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::TestIamPermissionsResponse
Returns permissions that a caller has on the specified resource.
Methods inherited from Google::Apis::Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Google::Apis::Core::Logging
Constructor Details
#initialize ⇒ CloudIotService
Returns a new instance of CloudIotService
46 47 48 49 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 46 def initialize super('https://cloudiot.googleapis.com/', '') @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.
39 40 41 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 39 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.
44 45 46 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 44 def quota_user @quota_user end |
Instance Method Details
#create_project_location_registry(parent, device_registry_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::DeviceRegistry
Creates a device registry that contains devices.
73 74 75 76 77 78 79 80 81 82 83 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 73 def create_project_location_registry(parent, device_registry_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+parent}/registries', ) command.request_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation command.request_object = device_registry_object command.response_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation command.response_class = Google::Apis::CloudiotV1beta1::DeviceRegistry 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_project_location_registry_device(parent, device_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Device
Creates a device in a device registry.
359 360 361 362 363 364 365 366 367 368 369 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 359 def create_project_location_registry_device(parent, device_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+parent}/devices', ) command.request_representation = Google::Apis::CloudiotV1beta1::Device::Representation command.request_object = device_object command.response_representation = Google::Apis::CloudiotV1beta1::Device::Representation command.response_class = Google::Apis::CloudiotV1beta1::Device command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_location_registry(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Empty
Deletes a device registry configuration.
106 107 108 109 110 111 112 113 114 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 106 def delete_project_location_registry(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1beta1/{+name}', ) command.response_representation = Google::Apis::CloudiotV1beta1::Empty::Representation command.response_class = Google::Apis::CloudiotV1beta1::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_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Empty
Deletes a device.
393 394 395 396 397 398 399 400 401 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 393 def delete_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1beta1/{+name}', ) command.response_representation = Google::Apis::CloudiotV1beta1::Empty::Representation command.response_class = Google::Apis::CloudiotV1beta1::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_project_location_registry(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::DeviceRegistry
Gets a device registry configuration.
137 138 139 140 141 142 143 144 145 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 137 def get_project_location_registry(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+name}', ) command.response_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation command.response_class = Google::Apis::CloudiotV1beta1::DeviceRegistry 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_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Device
Gets details about a device.
425 426 427 428 429 430 431 432 433 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 425 def get_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+name}', ) command.response_representation = Google::Apis::CloudiotV1beta1::Device::Representation command.response_class = Google::Apis::CloudiotV1beta1::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_registry_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Policy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
171 172 173 174 175 176 177 178 179 180 181 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 171 def get_registry_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', ) command.request_representation = Google::Apis::CloudiotV1beta1::GetIamPolicyRequest::Representation command.request_object = get_iam_policy_request_object command.response_representation = Google::Apis::CloudiotV1beta1::Policy::Representation command.response_class = Google::Apis::CloudiotV1beta1::Policy command.params['resource'] = resource unless resource.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_project_location_registries(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::ListDeviceRegistriesResponse
Lists device registries.
213 214 215 216 217 218 219 220 221 222 223 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 213 def list_project_location_registries(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+parent}/registries', ) command.response_representation = Google::Apis::CloudiotV1beta1::ListDeviceRegistriesResponse::Representation command.response_class = Google::Apis::CloudiotV1beta1::ListDeviceRegistriesResponse 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_project_location_registry_device_config_versions(name, num_versions: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::ListDeviceConfigVersionsResponse
Lists the last few versions of the device configuration in descending order (i.e.: newest first).
598 599 600 601 602 603 604 605 606 607 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 598 def list_project_location_registry_device_config_versions(name, num_versions: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+name}/configVersions', ) command.response_representation = Google::Apis::CloudiotV1beta1::ListDeviceConfigVersionsResponse::Representation command.response_class = Google::Apis::CloudiotV1beta1::ListDeviceConfigVersionsResponse command.params['name'] = name unless name.nil? command.query['numVersions'] = num_versions unless num_versions.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_project_location_registry_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::ListDevicesResponse
List devices in a device registry.
476 477 478 479 480 481 482 483 484 485 486 487 488 489 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 476 def list_project_location_registry_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+parent}/devices', ) command.response_representation = Google::Apis::CloudiotV1beta1::ListDevicesResponse::Representation command.response_class = Google::Apis::CloudiotV1beta1::ListDevicesResponse command.params['parent'] = parent unless parent.nil? command.query['deviceIds'] = device_ids unless device_ids.nil? command.query['deviceNumIds'] = device_num_ids unless device_num_ids.nil? command.query['fieldMask'] = field_mask unless field_mask.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 |
#modify_cloud_to_device_config(name, modify_cloud_to_device_config_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::DeviceConfig
Modifies the configuration for the device, which is eventually sent from the Cloud IoT servers. Returns the modified configuration version and its meta-data.
516 517 518 519 520 521 522 523 524 525 526 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 516 def modify_cloud_to_device_config(name, modify_cloud_to_device_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+name}:modifyCloudToDeviceConfig', ) command.request_representation = Google::Apis::CloudiotV1beta1::ModifyCloudToDeviceConfigRequest::Representation command.request_object = modify_cloud_to_device_config_request_object command.response_representation = Google::Apis::CloudiotV1beta1::DeviceConfig::Representation command.response_class = Google::Apis::CloudiotV1beta1::DeviceConfig 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 |
#patch_project_location_registry(name, device_registry_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::DeviceRegistry
Updates a device registry configuration.
252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 252 def patch_project_location_registry(name, device_registry_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1beta1/{+name}', ) command.request_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation command.request_object = device_registry_object command.response_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation command.response_class = Google::Apis::CloudiotV1beta1::DeviceRegistry 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_project_location_registry_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Device
Updates a device.
558 559 560 561 562 563 564 565 566 567 568 569 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 558 def patch_project_location_registry_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1beta1/{+name}', ) command.request_representation = Google::Apis::CloudiotV1beta1::Device::Representation command.request_object = device_object command.response_representation = Google::Apis::CloudiotV1beta1::Device::Representation command.response_class = Google::Apis::CloudiotV1beta1::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 |
#set_registry_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::Policy
Sets the access control policy on the specified resource. Replaces any existing policy.
288 289 290 291 292 293 294 295 296 297 298 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 288 def set_registry_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', ) command.request_representation = Google::Apis::CloudiotV1beta1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::CloudiotV1beta1::Policy::Representation command.response_class = Google::Apis::CloudiotV1beta1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#test_registry_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudiotV1beta1::TestIamPermissionsResponse
Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
324 325 326 327 328 329 330 331 332 333 334 |
# File 'generated/google/apis/cloudiot_v1beta1/service.rb', line 324 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::CloudiotV1beta1::TestIamPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::CloudiotV1beta1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::CloudiotV1beta1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |