Skip to content

/AWS1/CL_IOT=>CREATEJOB()

About CreateJob

Creates a job.

Requires permission to access the CreateJob action.

Method Signature

IMPORTING

Required arguments:

IV_JOBID TYPE /AWS1/IOTJOBID /AWS1/IOTJOBID

A job identifier which must be unique for your Amazon Web Services account. We recommend using a UUID. Alpha-numeric characters, "-" and "_" are valid for use here.

IT_TARGETS TYPE /AWS1/CL_IOTJOBTARGETS_W=>TT_JOBTARGETS TT_JOBTARGETS

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

Optional arguments:

IV_DOCUMENTSOURCE TYPE /AWS1/IOTJOBDOCUMENTSOURCE /AWS1/IOTJOBDOCUMENTSOURCE

An S3 link, or S3 object URL, to the job document. The link is an Amazon S3 object URL and is required if you don't specify a value for document.

For example, --document-source https://s3.region-code.amazonaws.com/example-firmware/device-firmware.1.0

For more information, see Methods for accessing a bucket.

IV_DOCUMENT TYPE /AWS1/IOTJOBDOCUMENT /AWS1/IOTJOBDOCUMENT

The job document. Required if you don't specify a value for documentSource.

IV_DESCRIPTION TYPE /AWS1/IOTJOBDESCRIPTION /AWS1/IOTJOBDESCRIPTION

A short text description of the job.

IO_PRESIGNEDURLCONFIG TYPE REF TO /AWS1/CL_IOTPRESIGNEDURLCONFIG /AWS1/CL_IOTPRESIGNEDURLCONFIG

Configuration information for pre-signed S3 URLs.

IV_TARGETSELECTION TYPE /AWS1/IOTTARGETSELECTION /AWS1/IOTTARGETSELECTION

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 thing when the thing is added to a target group, even after the job was completed by all things originally in the group.

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.

IO_JOBEXECSROLLOUTCONFIG TYPE REF TO /AWS1/CL_IOTJOBEXECSRLOUTCFG /AWS1/CL_IOTJOBEXECSRLOUTCFG

Allows you to create a staged rollout of the job.

IO_ABORTCONFIG TYPE REF TO /AWS1/CL_IOTABORTCONFIG /AWS1/CL_IOTABORTCONFIG

Allows you to create the criteria to abort a job.

IO_TIMEOUTCONFIG TYPE REF TO /AWS1/CL_IOTTIMEOUTCONFIG /AWS1/CL_IOTTIMEOUTCONFIG

Specifies the amount of time each device has to finish its execution of the job. The 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 time expires, it will be automatically set to TIMED_OUT.

IT_TAGS TYPE /AWS1/CL_IOTTAG=>TT_TAGLIST TT_TAGLIST

Metadata which can be used to manage the job.

IV_NAMESPACEID TYPE /AWS1/IOTNAMESPACEID /AWS1/IOTNAMESPACEID

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

When you specify a value for this parameter, Amazon Web Services 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/

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

IV_JOBTEMPLATEARN TYPE /AWS1/IOTJOBTEMPLATEARN /AWS1/IOTJOBTEMPLATEARN

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

IO_JOBEXECUTIONSRETRYCONFIG TYPE REF TO /AWS1/CL_IOTJOBEXECSRETRYCFG /AWS1/CL_IOTJOBEXECSRETRYCFG

Allows you to create the criteria to retry a job.

IT_DOCUMENTPARAMETERS TYPE /AWS1/CL_IOTPARAMETERMAP_W=>TT_PARAMETERMAP TT_PARAMETERMAP

Parameters of an Amazon Web Services managed template that you can specify to create the job document.

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

IO_SCHEDULINGCONFIG TYPE REF TO /AWS1/CL_IOTSCHEDULINGCONFIG /AWS1/CL_IOTSCHEDULINGCONFIG

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.

IT_DSTPACKAGEVERSIONS TYPE /AWS1/CL_IOTDSTPACKAGEVRSS_W=>TT_DESTINATIONPACKAGEVERSIONS TT_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.

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

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_IOTCREATEJOBRESPONSE /AWS1/CL_IOTCREATEJOBRESPONSE