{ "version": "2.0", "metadata": { "apiVersion": "2017-09-29", "endpointPrefix": "data.jobs.iot", "protocol": "rest-json", "serviceFullName": "AWS IoT Jobs Data Plane", "serviceId": "IoT Jobs Data Plane", "signatureVersion": "v4", "signingName": "iot-jobs-data", "uid": "iot-jobs-data-2017-09-29" }, "operations": { "DescribeJobExecution": { "name": "DescribeJobExecution", "http": { "method": "GET", "requestUri": "/things/{thingName}/jobs/{jobId}" }, "input": { "shape": "DescribeJobExecutionRequest" }, "output": { "shape": "DescribeJobExecutionResponse" }, "errors": [ { "shape": "InvalidRequestException" }, { "shape": "ResourceNotFoundException" }, { "shape": "ThrottlingException" }, { "shape": "ServiceUnavailableException" }, { "shape": "CertificateValidationException" }, { "shape": "TerminalStateException" } ], "documentation": "
Gets details of a job execution.
" }, "GetPendingJobExecutions": { "name": "GetPendingJobExecutions", "http": { "method": "GET", "requestUri": "/things/{thingName}/jobs" }, "input": { "shape": "GetPendingJobExecutionsRequest" }, "output": { "shape": "GetPendingJobExecutionsResponse" }, "errors": [ { "shape": "InvalidRequestException" }, { "shape": "ResourceNotFoundException" }, { "shape": "ThrottlingException" }, { "shape": "ServiceUnavailableException" }, { "shape": "CertificateValidationException" } ], "documentation": "Gets the list of all jobs for a thing that are not in a terminal status.
" }, "StartNextPendingJobExecution": { "name": "StartNextPendingJobExecution", "http": { "method": "PUT", "requestUri": "/things/{thingName}/jobs/$next" }, "input": { "shape": "StartNextPendingJobExecutionRequest" }, "output": { "shape": "StartNextPendingJobExecutionResponse" }, "errors": [ { "shape": "InvalidRequestException" }, { "shape": "ResourceNotFoundException" }, { "shape": "ThrottlingException" }, { "shape": "ServiceUnavailableException" }, { "shape": "CertificateValidationException" } ], "documentation": "Gets and starts the next pending (status IN_PROGRESS or QUEUED) job execution for a thing.
" }, "UpdateJobExecution": { "name": "UpdateJobExecution", "http": { "method": "POST", "requestUri": "/things/{thingName}/jobs/{jobId}" }, "input": { "shape": "UpdateJobExecutionRequest" }, "output": { "shape": "UpdateJobExecutionResponse" }, "errors": [ { "shape": "InvalidRequestException" }, { "shape": "ResourceNotFoundException" }, { "shape": "ThrottlingException" }, { "shape": "ServiceUnavailableException" }, { "shape": "CertificateValidationException" }, { "shape": "InvalidStateTransitionException" } ], "documentation": "Updates the status of a job execution.
" } }, "shapes": { "ApproximateSecondsBeforeTimedOut": { "type": "long" }, "DescribeJobExecutionJobId": { "type": "string", "pattern": "[a-zA-Z0-9_-]+|^\\$next" }, "DescribeJobExecutionRequest": { "type": "structure", "required": [ "jobId", "thingName" ], "members": { "jobId": { "shape": "DescribeJobExecutionJobId", "documentation": "The unique identifier assigned to this job when it was created.
", "location": "uri", "locationName": "jobId" }, "thingName": { "shape": "ThingName", "documentation": "The thing name associated with the device the job execution is running on.
", "location": "uri", "locationName": "thingName" }, "includeJobDocument": { "shape": "IncludeJobDocument", "documentation": "Optional. When set to true, the response contains the job document. The default is false.
", "location": "querystring", "locationName": "includeJobDocument" }, "executionNumber": { "shape": "ExecutionNumber", "documentation": "Optional. A number that identifies a particular job execution on a particular device. If not specified, the latest job execution is returned.
", "location": "querystring", "locationName": "executionNumber" } } }, "DescribeJobExecutionResponse": { "type": "structure", "members": { "execution": { "shape": "JobExecution", "documentation": "Contains data about a job execution.
" } } }, "DetailsKey": { "type": "string", "max": 128, "min": 1, "pattern": "[a-zA-Z0-9:_-]+" }, "DetailsMap": { "type": "map", "key": { "shape": "DetailsKey" }, "value": { "shape": "DetailsValue" } }, "DetailsValue": { "type": "string", "max": 1024, "min": 1, "pattern": "[^\\p{C}]*+" }, "ExecutionNumber": { "type": "long" }, "ExpectedVersion": { "type": "long" }, "GetPendingJobExecutionsRequest": { "type": "structure", "required": [ "thingName" ], "members": { "thingName": { "shape": "ThingName", "documentation": "The name of the thing that is executing the job.
", "location": "uri", "locationName": "thingName" } } }, "GetPendingJobExecutionsResponse": { "type": "structure", "members": { "inProgressJobs": { "shape": "JobExecutionSummaryList", "documentation": "A list of JobExecutionSummary objects with status IN_PROGRESS.
" }, "queuedJobs": { "shape": "JobExecutionSummaryList", "documentation": "A list of JobExecutionSummary objects with status QUEUED.
" } } }, "IncludeExecutionState": { "type": "boolean" }, "IncludeJobDocument": { "type": "boolean" }, "JobDocument": { "type": "string", "max": 32768 }, "JobExecution": { "type": "structure", "members": { "jobId": { "shape": "JobId", "documentation": "The unique identifier you assigned to this job when it was created.
" }, "thingName": { "shape": "ThingName", "documentation": "The name of the thing that is executing the job.
" }, "status": { "shape": "JobExecutionStatus", "documentation": "The status of the job execution. Can be one of: \"QUEUED\", \"IN_PROGRESS\", \"FAILED\", \"SUCCESS\", \"CANCELED\", \"REJECTED\", or \"REMOVED\".
" }, "statusDetails": { "shape": "DetailsMap", "documentation": "A collection of name/value pairs that describe the status of the job execution.
" }, "queuedAt": { "shape": "QueuedAt", "documentation": "The time, in milliseconds since the epoch, when the job execution was enqueued.
" }, "startedAt": { "shape": "StartedAt", "documentation": "The time, in milliseconds since the epoch, when the job execution was started.
" }, "lastUpdatedAt": { "shape": "LastUpdatedAt", "documentation": "The time, in milliseconds since the epoch, when the job execution was last updated.
" }, "approximateSecondsBeforeTimedOut": { "shape": "ApproximateSecondsBeforeTimedOut", "documentation": "The estimated number of seconds that remain before the job execution status will be changed to TIMED_OUT
.
The version of the job execution. Job execution versions are incremented each time they are updated by a device.
" }, "executionNumber": { "shape": "ExecutionNumber", "documentation": "A number that identifies a particular job execution on a particular device. It can be used later in commands that return or update job execution information.
" }, "jobDocument": { "shape": "JobDocument", "documentation": "The content of the job document.
" } }, "documentation": "Contains data about a job execution.
" }, "JobExecutionState": { "type": "structure", "members": { "status": { "shape": "JobExecutionStatus", "documentation": "The status of the job execution. Can be one of: \"QUEUED\", \"IN_PROGRESS\", \"FAILED\", \"SUCCESS\", \"CANCELED\", \"REJECTED\", or \"REMOVED\".
" }, "statusDetails": { "shape": "DetailsMap", "documentation": "A collection of name/value pairs that describe the status of the job execution.
" }, "versionNumber": { "shape": "VersionNumber", "documentation": "The version of the job execution. Job execution versions are incremented each time they are updated by a device.
" } }, "documentation": "Contains data about the state of a job execution.
" }, "JobExecutionStatus": { "type": "string", "enum": [ "QUEUED", "IN_PROGRESS", "SUCCEEDED", "FAILED", "TIMED_OUT", "REJECTED", "REMOVED", "CANCELED" ] }, "JobExecutionSummary": { "type": "structure", "members": { "jobId": { "shape": "JobId", "documentation": "The unique identifier you assigned to this job when it was created.
" }, "queuedAt": { "shape": "QueuedAt", "documentation": "The time, in milliseconds since the epoch, when the job execution was enqueued.
" }, "startedAt": { "shape": "StartedAt", "documentation": "The time, in milliseconds since the epoch, when the job execution started.
" }, "lastUpdatedAt": { "shape": "LastUpdatedAt", "documentation": "The time, in milliseconds since the epoch, when the job execution was last updated.
" }, "versionNumber": { "shape": "VersionNumber", "documentation": "The version of the job execution. Job execution versions are incremented each time AWS IoT Jobs receives an update from a device.
" }, "executionNumber": { "shape": "ExecutionNumber", "documentation": "A number that identifies a particular job execution on a particular device.
" } }, "documentation": "Contains a subset of information about a job execution.
" }, "JobExecutionSummaryList": { "type": "list", "member": { "shape": "JobExecutionSummary" } }, "JobId": { "type": "string", "max": 64, "min": 1, "pattern": "[a-zA-Z0-9_-]+" }, "LastUpdatedAt": { "type": "long" }, "QueuedAt": { "type": "long" }, "StartNextPendingJobExecutionRequest": { "type": "structure", "required": [ "thingName" ], "members": { "thingName": { "shape": "ThingName", "documentation": "The name of the thing associated with the device.
", "location": "uri", "locationName": "thingName" }, "statusDetails": { "shape": "DetailsMap", "documentation": "A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged.
" }, "stepTimeoutInMinutes": { "shape": "StepTimeoutInMinutes", "documentation": "Specifies the amount of time this device has to finish execution of this job. If the job execution status is not set to a terminal state before this timer expires, or before the timer is reset (by calling UpdateJobExecution
, setting the status to IN_PROGRESS
and specifying a new timeout value in field stepTimeoutInMinutes
) the job execution status will be automatically set to TIMED_OUT
. Note that setting this timeout has no effect on that job execution timeout which may have been specified when the job was created (CreateJob
using field timeoutConfig
).
A JobExecution object.
" } } }, "StartedAt": { "type": "long" }, "StepTimeoutInMinutes": { "type": "long" }, "ThingName": { "type": "string", "max": 128, "min": 1, "pattern": "[a-zA-Z0-9:_-]+" }, "UpdateJobExecutionRequest": { "type": "structure", "required": [ "jobId", "thingName", "status" ], "members": { "jobId": { "shape": "JobId", "documentation": "The unique identifier assigned to this job when it was created.
", "location": "uri", "locationName": "jobId" }, "thingName": { "shape": "ThingName", "documentation": "The name of the thing associated with the device.
", "location": "uri", "locationName": "thingName" }, "status": { "shape": "JobExecutionStatus", "documentation": "The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or REJECTED). This must be specified on every update.
" }, "statusDetails": { "shape": "DetailsMap", "documentation": "Optional. A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged.
" }, "stepTimeoutInMinutes": { "shape": "StepTimeoutInMinutes", "documentation": "Specifies the amount of time this device has to finish execution of this job. If the job execution status is not set to a terminal state before this timer expires, or before the timer is reset (by again calling UpdateJobExecution
, setting the status to IN_PROGRESS
and specifying a new timeout value in this field) the job execution status will be automatically set to TIMED_OUT
. Note that setting or resetting this timeout has no effect on that job execution timeout which may have been specified when the job was created (CreateJob
using field timeoutConfig
).
Optional. The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)
" }, "includeJobExecutionState": { "shape": "IncludeExecutionState", "documentation": "Optional. When included and set to true, the response contains the JobExecutionState data. The default is false.
" }, "includeJobDocument": { "shape": "IncludeJobDocument", "documentation": "Optional. When set to true, the response contains the job document. The default is false.
" }, "executionNumber": { "shape": "ExecutionNumber", "documentation": "Optional. A number that identifies a particular job execution on a particular device.
" } } }, "UpdateJobExecutionResponse": { "type": "structure", "members": { "executionState": { "shape": "JobExecutionState", "documentation": "A JobExecutionState object.
" }, "jobDocument": { "shape": "JobDocument", "documentation": "The contents of the Job Documents.
" } } }, "VersionNumber": { "type": "long" } }, "documentation": "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
" }