Note: You are viewing the documentation for an older major version of the AWS SDK for JavaScript (v2).
The modular AWS SDK for JavaScript (v3) is now General Available. For more information see the Developer Guide or API Reference.
Class: AWS.IoT1ClickDevicesService
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.IoT1ClickDevicesService
- Identifier:
- iot1clickdevicesservice
- API Version:
- 2018-05-14
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
Describes all of the AWS IoT 1-Click device-related API operations for the service. Also provides sample requests, responses, and errors for the supported web services protocols.
Sending a Request Using IoT1ClickDevicesService
var iot1clickdevicesservice = new AWS.IoT1ClickDevicesService();
iot1clickdevicesservice.claimDevicesByClaimCode(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the IoT1ClickDevicesService object uses this specific API, you can
construct the object by passing the apiVersion
option to the constructor:
var iot1clickdevicesservice = new AWS.IoT1ClickDevicesService({apiVersion: '2018-05-14'});
You can also set the API version globally in AWS.config.apiVersions
using
the iot1clickdevicesservice service identifier:
AWS.config.apiVersions = {
iot1clickdevicesservice: '2018-05-14',
// other service API versions
};
var iot1clickdevicesservice = new AWS.IoT1ClickDevicesService();
Constructor Summary
-
new AWS.IoT1ClickDevicesService(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary
-
claimDevicesByClaimCode(params = {}, callback) ⇒ AWS.Request
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).
-
describeDevice(params = {}, callback) ⇒ AWS.Request
Given a device ID, returns a DescribeDeviceResponse object describing the details of the device.
-
finalizeDeviceClaim(params = {}, callback) ⇒ AWS.Request
Given a device ID, finalizes the claim request for the associated device.Note: Claiming a device consists of initiating a claim, then publishing a device event, and finalizing the claim.
-
getDeviceMethods(params = {}, callback) ⇒ AWS.Request
Given a device ID, returns the invokable methods associated with the device.
-
initiateDeviceClaim(params = {}, callback) ⇒ AWS.Request
Given a device ID, initiates a claim request for the associated device.Note: Claiming a device consists of initiating a claim, then publishing a device event, and finalizing the claim.
-
invokeDeviceMethod(params = {}, callback) ⇒ AWS.Request
Given a device ID, issues a request to invoke a named device method (with possible parameters).
-
listDeviceEvents(params = {}, callback) ⇒ AWS.Request
Using a device ID, returns a DeviceEventsResponse object containing an array of events for the device.
-
listDevices(params = {}, callback) ⇒ AWS.Request
Lists the 1-Click compatible devices associated with your AWS account.
-
listTagsForResource(params = {}, callback) ⇒ AWS.Request
Lists the tags associated with the specified resource ARN.
-
tagResource(params = {}, callback) ⇒ AWS.Request
Adds or updates the tags associated with the resource ARN.
-
unclaimDevice(params = {}, callback) ⇒ AWS.Request
Disassociates a device from your AWS account using its device ID.
-
untagResource(params = {}, callback) ⇒ AWS.Request
Using tag keys, deletes the tags (key/value pairs) associated with the specified resource ARN.
-
updateDeviceState(params = {}, callback) ⇒ AWS.Request
Using a Boolean value (true or false), this operation enables or disables the device given a device ID.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
Property Details
Method Details
claimDevicesByClaimCode(params = {}, callback) ⇒ AWS.Request
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).
describeDevice(params = {}, callback) ⇒ AWS.Request
Given a device ID, returns a DescribeDeviceResponse object describing the details of the device.
finalizeDeviceClaim(params = {}, callback) ⇒ AWS.Request
Given a device ID, finalizes the claim request for the associated device.
getDeviceMethods(params = {}, callback) ⇒ AWS.Request
Given a device ID, returns the invokable methods associated with the device.
initiateDeviceClaim(params = {}, callback) ⇒ AWS.Request
Given a device ID, initiates a claim request for the associated device.
invokeDeviceMethod(params = {}, callback) ⇒ AWS.Request
Given a device ID, issues a request to invoke a named device method (with possible parameters). See the "Example POST" code snippet below.
listDeviceEvents(params = {}, callback) ⇒ AWS.Request
Using a device ID, returns a DeviceEventsResponse object containing an array of events for the device.
listDevices(params = {}, callback) ⇒ AWS.Request
Lists the 1-Click compatible devices associated with your AWS account.
listTagsForResource(params = {}, callback) ⇒ AWS.Request
Lists the tags associated with the specified resource ARN.
tagResource(params = {}, callback) ⇒ AWS.Request
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.
unclaimDevice(params = {}, callback) ⇒ AWS.Request
Disassociates a device from your AWS account using its device ID.