AWS.IoTJobsDataPlane — 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.

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

AWS IoT Jobs is a service that allows you to define a set of jobs — remote operations that are sent to and executed on one or more devices connected to AWS IoT. For example, you can define a job that instructs a set of devices to download and install application or firmware updates, reboot, rotate certificates, or perform remote troubleshooting operations.

To create a job, you make a job document which is a description of the remote operations to be performed, and you specify a list of targets that should perform the operations. The targets can be individual things, thing groups or both.

AWS IoT Jobs sends a message to inform the targets that a job is available. The target starts the execution of the job by downloading the job document, performing the operations it specifies, and reporting its progress to AWS IoT. The Jobs service provides commands to track the progress of a job on a specific target and for all the targets of the job

Sending a Request Using IoTJobsDataPlane

var iotjobsdataplane = new AWS.IoTJobsDataPlane();
iotjobsdataplane.describeJobExecution(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 IoTJobsDataPlane object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var iotjobsdataplane = new AWS.IoTJobsDataPlane({apiVersion: '2017-09-29'});

You can also set the API version globally in AWS.config.apiVersions using the iotjobsdataplane service identifier:

AWS.config.apiVersions = {
  iotjobsdataplane: '2017-09-29',
  // other service API versions
};

var iotjobsdataplane = new AWS.IoTJobsDataPlane();

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.IoTJobsDataPlane(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

describeJobExecution(params = {}, callback) ⇒ AWS.Request

Gets details of a job execution.

getPendingJobExecutions(params = {}, callback) ⇒ AWS.Request

Gets the list of all jobs for a thing that are not in a terminal status.

startNextPendingJobExecution(params = {}, callback) ⇒ AWS.Request

Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.

updateJobExecution(params = {}, callback) ⇒ AWS.Request

Updates the status of a job execution.