AWS.IotData — 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.
Class: AWS.IotData
Overview
Note:
You must provide an endpoint
configuration parameter when constructing this service. See constructor() for more information.
Constructs a service interface object. Each API operation is exposed as a function on service.
Sending a Request Using IotData
var iotdata = new AWS.IotData({endpoint: 'my.host.tld'});
iotdata.getThingShadow(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 IotData object uses this specific API, you can construct the object by passing the apiVersion
option to the constructor:
var iotdata = new AWS.IotData({
endpoint: 'my.host.tld',
apiVersion: '2015-05-28'
});
You can also set the API version globally in AWS.config.apiVersions
using the iotdata service identifier:
AWS.config.apiVersions = {
iotdata: '2015-05-28',
// other service API versions
};
var iotdata = new AWS.IotData({endpoint: 'my.host.tld'});
Constructor Summarycollapse
- new AWS.IotData(options = {}) ⇒ Object constructor
Constructs a service object.
Property Summarycollapse
- endpoint ⇒ AWS.Endpoint readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summarycollapse
- deleteThingShadow(params = {}, callback) ⇒ AWS.Request
Deletes the shadow for the specified thing.
Requires permission to access the DeleteThingShadow action.
For more information, see DeleteThingShadow in the IoT Developer Guide.
. - getRetainedMessage(params = {}, callback) ⇒ AWS.Request
Gets the details of a single retained message for the specified topic.
This action returns the message payload of the retained message, which can incur messaging costs. - getThingShadow(params = {}, callback) ⇒ AWS.Request
Gets the shadow for the specified thing.
Requires permission to access the GetThingShadow action.
For more information, see GetThingShadow in the IoT Developer Guide.
. - listNamedShadowsForThing(params = {}, callback) ⇒ AWS.Request
- listRetainedMessages(params = {}, callback) ⇒ AWS.Request
Lists summary information about the retained messages stored for the account.
This action returns only the topic names of the retained messages. - publish(params = {}, callback) ⇒ AWS.Request
- updateThingShadow(params = {}, callback) ⇒ AWS.Request
Updates the shadow for the specified thing.
Requires permission to access the UpdateThingShadow action.
For more information, see UpdateThingShadow in the IoT Developer Guide.
.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, defineService
Constructor Details
new AWS.IotData(options = {}) ⇒ Object
Note:
You must provide an endpoint
when constructing this service.
Constructs a service object. This object has one method for each API operation.
Property Details
endpoint ⇒ AWS.Endpoint
Returns an Endpoint object representing the endpoint URL for service requests.
Method Details
deleteThingShadow(params = {}, callback) ⇒ AWS.Request
Deletes the shadow for the specified thing.
Requires permission to access the DeleteThingShadow action.
For more information, see DeleteThingShadow in the IoT Developer Guide.
getRetainedMessage(params = {}, callback) ⇒ AWS.Request
getThingShadow(params = {}, callback) ⇒ AWS.Request
Gets the shadow for the specified thing.
Requires permission to access the GetThingShadow action.
For more information, see GetThingShadow in the IoT Developer Guide.
listNamedShadowsForThing(params = {}, callback) ⇒ AWS.Request
listRetainedMessages(params = {}, callback) ⇒ AWS.Request
Lists summary information about the retained messages stored for the account.
This action returns only the topic names of the retained messages. It doesn't return any message payloads. Although this action doesn't return a message payload, it can still incur messaging costs.
To get the message payload of a retained message, call GetRetainedMessage with the topic name of the retained message.
Requires permission to access the ListRetainedMessages action.
For more information about messaging costs, see Amazon Web Services IoT Core pricing - Messaging.
updateThingShadow(params = {}, callback) ⇒ AWS.Request
Updates the shadow for the specified thing.
Requires permission to access the UpdateThingShadow action.
For more information, see UpdateThingShadow in the IoT Developer Guide.