Job - Amazon IoT
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Job

The Job object contains details about a job.

Contents

abortConfig

Configuration for criteria to abort the job.

Type: AbortConfig object

Required: No

comment

If the job was updated, describes the reason for the update.

Type: String

Length Constraints: Maximum length of 2028.

Pattern: [^\p{C}]+

Required: No

completedAt

The time, in seconds since the epoch, when the job was completed.

Type: Timestamp

Required: No

createdAt

The time, in seconds since the epoch, when the job was created.

Type: Timestamp

Required: No

description

A short text description of the job.

Type: String

Length Constraints: Maximum length of 2028.

Pattern: [^\p{C}]+

Required: No

destinationPackageVersions

The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.

Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: ^arn:[!-~]+$

Required: No

documentParameters

A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You can use the description of each key as a guidance to specify the inputs during runtime when creating a job.

Note

documentParameters can only be used when creating jobs from Amazon managed templates. This parameter can't be used with custom job templates or to create jobs from them.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: [a-zA-Z0-9_-]+

Value Length Constraints: Minimum length of 1. Maximum length of 512.

Value Pattern: [^\p{C}]+

Required: No

forceCanceled

Will be true if the job was canceled with the optional force parameter set to true.

Type: Boolean

Required: No

isConcurrent

Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.

Type: Boolean

Required: No

jobArn

An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId".

Type: String

Required: No

jobExecutionsRetryConfig

The configuration for the criteria to retry the job.

Type: JobExecutionsRetryConfig object

Required: No

jobExecutionsRolloutConfig

Allows you to create a staged rollout of a job.

Type: JobExecutionsRolloutConfig object

Required: No

jobId

The unique identifier you assigned to this job when it was created.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9_-]+

Required: No

jobProcessDetails

Details about the job process.

Type: JobProcessDetails object

Required: No

jobTemplateArn

The ARN of the job template used to create the job.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: ^arn:[!-~]+$

Required: No

lastUpdatedAt

The time, in seconds since the epoch, when the job was last updated.

Type: Timestamp

Required: No

namespaceId

The namespace used to indicate that a job is a customer-managed job.

When you specify a value for this parameter, Amazon IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.

$aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/

Note

The namespaceId feature is only supported by Amazon IoT Greengrass at this time. For more information, see Setting up Amazon IoT Greengrass core devices.

Type: String

Pattern: [a-zA-Z0-9_-]+

Required: No

presignedUrlConfig

Configuration for pre-signed S3 URLs.

Type: PresignedUrlConfig object

Required: No

reasonCode

If the job was updated, provides the reason code for the update.

Type: String

Length Constraints: Maximum length of 128.

Pattern: [\p{Upper}\p{Digit}_]+

Required: No

scheduledJobRollouts

Displays the next seven maintenance window occurrences and their start times.

Type: Array of ScheduledJobRollout objects

Required: No

schedulingConfig

The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.

Type: SchedulingConfig object

Required: No

status

The status of the job, one of IN_PROGRESS, CANCELED, DELETION_IN_PROGRESS or COMPLETED.

Type: String

Valid Values: IN_PROGRESS | CANCELED | COMPLETED | DELETION_IN_PROGRESS | SCHEDULED

Required: No

targets

A list of IoT things and thing groups to which the job should be sent.

Type: Array of strings

Array Members: Minimum number of 1 item.

Length Constraints: Maximum length of 2048.

Required: No

targetSelection

Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a device when the thing representing the device is added to a target group, even after the job was completed by all things originally in the group.

Note

We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.

Type: String

Valid Values: CONTINUOUS | SNAPSHOT

Required: No

timeoutConfig

Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to TIMED_OUT.

Type: TimeoutConfig object

Required: No

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: