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.
409 410 411 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 409 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.
877 878 879 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 877 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.
880 881 882 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 880 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.
855 856 857 858 859 860 861 862 863 864 865 866 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 855 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.50.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).
440 441 442 443 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 440 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.
476 477 478 479 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 476 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>
515 516 517 518 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 515 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.
545 546 547 548 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 545 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>
579 580 581 582 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 579 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.
619 620 621 622 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 619 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.
664 665 666 667 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 664 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.
708 709 710 711 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 708 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.
736 737 738 739 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 736 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
768 769 770 771 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 768 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.
795 796 797 798 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 795 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.
820 821 822 823 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 820 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.
846 847 848 849 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 846 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.
870 871 872 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 870 def waiter_names [] end |