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.IotData
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.IotData
- Identifier:
- iotdata
- API Version:
- 2015-05-28
- Defined in:
- lib/services/iotdata.js
Overview
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 Summary
-
new AWS.IotData(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
-
deleteThingShadow(params = {}, callback) ⇒ AWS.Request
Deletes the shadow for the specified thing.
-
getThingShadow(params = {}, callback) ⇒ AWS.Request
Gets the shadow for the specified thing.
-
listNamedShadowsForThing(params = {}, callback) ⇒ AWS.Request
Lists the shadows for the specified thing.
-
publish(params = {}, callback) ⇒ AWS.Request
Publishes state information.
-
updateThingShadow(params = {}, callback) ⇒ AWS.Request
Updates the shadow for the specified thing.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, defineService
Constructor Details
Property Details
Method Details
deleteThingShadow(params = {}, callback) ⇒ AWS.Request
Deletes the shadow for the specified thing.
For more information, see DeleteThingShadow in the AWS IoT Developer Guide.
getThingShadow(params = {}, callback) ⇒ AWS.Request
Gets the shadow for the specified thing.
For more information, see GetThingShadow in the AWS IoT Developer Guide.
listNamedShadowsForThing(params = {}, callback) ⇒ AWS.Request
Lists the shadows for the specified thing.
publish(params = {}, callback) ⇒ AWS.Request
Publishes state information.
For more information, see HTTP Protocol in the AWS IoT Developer Guide.
updateThingShadow(params = {}, callback) ⇒ AWS.Request
Updates the shadow for the specified thing.
For more information, see UpdateThingShadow in the AWS IoT Developer Guide.