Class: Aws::IoT1ClickDevicesService::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::IoT1ClickDevicesService::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-iot1clickdevicesservice/client.rb
Overview
An API client for IoT1ClickDevicesService. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::IoT1ClickDevicesService::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#claim_devices_by_claim_code(params = {}) ⇒ Types::ClaimDevicesByClaimCodeResponse
Adds device(s) to your account (i.e., claim one or more devices) if and only if you received a claim code with the device(s).
-
#describe_device(params = {}) ⇒ Types::DescribeDeviceResponse
Given a device ID, returns a DescribeDeviceResponse object describing the details of the device.
-
#finalize_device_claim(params = {}) ⇒ Types::FinalizeDeviceClaimResponse
Given a device ID, finalizes the claim request for the associated device.
-
#get_device_methods(params = {}) ⇒ Types::GetDeviceMethodsResponse
Given a device ID, returns the invokable methods associated with the device.
-
#initiate_device_claim(params = {}) ⇒ Types::InitiateDeviceClaimResponse
Given a device ID, initiates a claim request for the associated device.
-
#invoke_device_method(params = {}) ⇒ Types::InvokeDeviceMethodResponse
Given a device ID, issues a request to invoke a named device method (with possible parameters).
-
#list_device_events(params = {}) ⇒ Types::ListDeviceEventsResponse
Using a device ID, returns a DeviceEventsResponse object containing an array of events for the device.
-
#list_devices(params = {}) ⇒ Types::ListDevicesResponse
Lists the 1-Click compatible devices associated with your AWS account.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags associated with the specified resource ARN.
-
#tag_resource(params = {}) ⇒ Struct
Adds or updates the tags associated with the resource ARN.
-
#unclaim_device(params = {}) ⇒ Types::UnclaimDeviceResponse
Disassociates a device from your AWS account using its device ID.
-
#untag_resource(params = {}) ⇒ Struct
Using tag keys, deletes the tags (key/value pairs) associated with the specified resource ARN.
-
#update_device_state(params = {}) ⇒ Struct
Using a Boolean value (true or false), this operation enables or disables the device given a device ID.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
385 386 387 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 385 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
853 854 855 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 853 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
856 857 858 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 856 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
831 832 833 834 835 836 837 838 839 840 841 842 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 831 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-iot1clickdevicesservice' context[:gem_version] = '1.48.0' Seahorse::Client::Request.new(handlers, context) end |
#claim_devices_by_claim_code(params = {}) ⇒ Types::ClaimDevicesByClaimCodeResponse
Adds device(s) to your account (i.e., claim one or more devices) if and only if you received a claim code with the device(s).
416 417 418 419 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 416 def claim_devices_by_claim_code(params = {}, = {}) req = build_request(:claim_devices_by_claim_code, params) req.send_request() end |
#describe_device(params = {}) ⇒ Types::DescribeDeviceResponse
Given a device ID, returns a DescribeDeviceResponse object describing the details of the device.
452 453 454 455 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 452 def describe_device(params = {}, = {}) req = build_request(:describe_device, params) req.send_request() end |
#finalize_device_claim(params = {}) ⇒ Types::FinalizeDeviceClaimResponse
Given a device ID, finalizes the claim request for the associated device.
<note markdown=“1”> Claiming a device consists of initiating a claim, then publishing a device event, and finalizing the claim. For a device of type button, a device event can be published by simply clicking the device.
</note>
491 492 493 494 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 491 def finalize_device_claim(params = {}, = {}) req = build_request(:finalize_device_claim, params) req.send_request() end |
#get_device_methods(params = {}) ⇒ Types::GetDeviceMethodsResponse
Given a device ID, returns the invokable methods associated with the device.
521 522 523 524 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 521 def get_device_methods(params = {}, = {}) req = build_request(:get_device_methods, params) req.send_request() end |
#initiate_device_claim(params = {}) ⇒ Types::InitiateDeviceClaimResponse
Given a device ID, initiates a claim request for the associated device.
<note markdown=“1”> Claiming a device consists of initiating a claim, then publishing a device event, and finalizing the claim. For a device of type button, a device event can be published by simply clicking the device.
</note>
555 556 557 558 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 555 def initiate_device_claim(params = {}, = {}) req = build_request(:initiate_device_claim, params) req.send_request() end |
#invoke_device_method(params = {}) ⇒ Types::InvokeDeviceMethodResponse
Given a device ID, issues a request to invoke a named device method (with possible parameters). See the “Example POST” code snippet below.
595 596 597 598 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 595 def invoke_device_method(params = {}, = {}) req = build_request(:invoke_device_method, params) req.send_request() end |
#list_device_events(params = {}) ⇒ Types::ListDeviceEventsResponse
Using a device ID, returns a DeviceEventsResponse object containing an array of events for the device.
640 641 642 643 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 640 def list_device_events(params = {}, = {}) req = build_request(:list_device_events, params) req.send_request() end |
#list_devices(params = {}) ⇒ Types::ListDevicesResponse
Lists the 1-Click compatible devices associated with your AWS account.
684 685 686 687 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 684 def list_devices(params = {}, = {}) req = build_request(:list_devices, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags associated with the specified resource ARN.
712 713 714 715 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 712 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds or updates the tags associated with the resource ARN. See [AWS IoT 1-Click Service Limits] for the maximum number of tags allowed per resource.
[1]: docs.aws.amazon.com/iot-1-click/latest/developerguide/1click-appendix.html#1click-limits
744 745 746 747 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 744 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#unclaim_device(params = {}) ⇒ Types::UnclaimDeviceResponse
Disassociates a device from your AWS account using its device ID.
771 772 773 774 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 771 def unclaim_device(params = {}, = {}) req = build_request(:unclaim_device, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Using tag keys, deletes the tags (key/value pairs) associated with the specified resource ARN.
796 797 798 799 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 796 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_device_state(params = {}) ⇒ Struct
Using a Boolean value (true or false), this operation enables or disables the device given a device ID.
822 823 824 825 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 822 def update_device_state(params = {}, = {}) req = build_request(:update_device_state, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
846 847 848 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 846 def waiter_names [] end |