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.
434 435 436 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 434 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.
907 908 909 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 907 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.
910 911 912 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 910 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.
880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 880 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.56.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).
465 466 467 468 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 465 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.
501 502 503 504 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 501 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>
540 541 542 543 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 540 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.
570 571 572 573 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 570 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>
604 605 606 607 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 604 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.
644 645 646 647 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 644 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.
689 690 691 692 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 689 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.
733 734 735 736 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 733 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.
761 762 763 764 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 761 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
793 794 795 796 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 793 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.
820 821 822 823 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 820 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.
845 846 847 848 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 845 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.
871 872 873 874 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 871 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.
900 901 902 |
# File 'lib/aws-sdk-iot1clickdevicesservice/client.rb', line 900 def waiter_names [] end |