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.
444 445 446 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 444 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.
917 918 919 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 917 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.
920 921 922 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 920 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.
890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 890 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::IoT1ClickDevicesService') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-iot1clickdevicesservice' context[:gem_version] = '1.62.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).
475 476 477 478 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 475 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.
511 512 513 514 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 511 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>
550 551 552 553 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 550 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.
580 581 582 583 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 580 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>
614 615 616 617 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 614 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.
654 655 656 657 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 654 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.
699 700 701 702 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 699 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.
743 744 745 746 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 743 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.
771 772 773 774 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 771 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
803 804 805 806 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 803 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.
830 831 832 833 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 830 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.
855 856 857 858 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 855 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.
881 882 883 884 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 881 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.
910 911 912 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 910 def waiter_names [] end |