AWS.IoT1ClickDevicesService — AWS SDK for JavaScript (original) (raw)

We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Inherits:

AWS.Service

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 Summarycollapse

Property Summarycollapse

Properties inherited from AWS.Service

apiVersions

Method Summarycollapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.IoT1ClickDevicesService(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Property Details

endpointAWS.Endpoint

Returns an Endpoint object representing the endpoint URL for service requests.

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.

Note: 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.

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. For a device of type button, a device event can be published by simply clicking the 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.

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.