/AWS1/IF_IOT=>CREATEJOBTEMPLATE()¶
About CreateJobTemplate¶
Creates a job template.
Requires permission to access the CreateJobTemplate action.
Method Signature¶
METHODS /AWS1/IF_IOT~CREATEJOBTEMPLATE
IMPORTING
!IV_JOBTEMPLATEID TYPE /AWS1/IOTJOBTEMPLATEID OPTIONAL
!IV_JOBARN TYPE /AWS1/IOTJOBARN OPTIONAL
!IV_DOCUMENTSOURCE TYPE /AWS1/IOTJOBDOCUMENTSOURCE OPTIONAL
!IV_DOCUMENT TYPE /AWS1/IOTJOBDOCUMENT OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/IOTJOBDESCRIPTION OPTIONAL
!IO_PRESIGNEDURLCONFIG TYPE REF TO /AWS1/CL_IOTPRESIGNEDURLCONFIG OPTIONAL
!IO_JOBEXECSROLLOUTCONFIG TYPE REF TO /AWS1/CL_IOTJOBEXECSRLOUTCFG OPTIONAL
!IO_ABORTCONFIG TYPE REF TO /AWS1/CL_IOTABORTCONFIG OPTIONAL
!IO_TIMEOUTCONFIG TYPE REF TO /AWS1/CL_IOTTIMEOUTCONFIG OPTIONAL
!IT_TAGS TYPE /AWS1/CL_IOTTAG=>TT_TAGLIST OPTIONAL
!IO_JOBEXECUTIONSRETRYCONFIG TYPE REF TO /AWS1/CL_IOTJOBEXECSRETRYCFG OPTIONAL
!IT_MAINTENANCEWINDOWS TYPE /AWS1/CL_IOTMAINTENANCEWINDOW=>TT_MAINTENANCEWINDOWS OPTIONAL
!IT_DSTPACKAGEVERSIONS TYPE /AWS1/CL_IOTDSTPACKAGEVRSS_W=>TT_DESTINATIONPACKAGEVERSIONS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iotcreatejobtmplrsp
RAISING
/AWS1/CX_IOTCONFLICTEXCEPTION
/AWS1/CX_IOTINTERNALFAILUREEX
/AWS1/CX_IOTINVALIDREQUESTEX
/AWS1/CX_IOTLIMITEXCEEDEDEX
/AWS1/CX_IOTRESOURCENOTFOUNDEX
/AWS1/CX_IOTTHROTTLINGEX
/AWS1/CX_IOTCLIENTEXC
/AWS1/CX_IOTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_jobtemplateid TYPE /AWS1/IOTJOBTEMPLATEID /AWS1/IOTJOBTEMPLATEID¶
A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, "-", and "_" are valid for use here.
iv_description TYPE /AWS1/IOTJOBDESCRIPTION /AWS1/IOTJOBDESCRIPTION¶
A description of the job document.
Optional arguments:¶
iv_jobarn TYPE /AWS1/IOTJOBARN /AWS1/IOTJOBARN¶
The ARN of the job to use as the basis for the job template.
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.0For 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.
io_presignedurlconfig TYPE REF TO /AWS1/CL_IOTPRESIGNEDURLCONFIG /AWS1/CL_IOTPRESIGNEDURLCONFIG¶
presignedUrlConfig
io_jobexecsrolloutconfig TYPE REF TO /AWS1/CL_IOTJOBEXECSRLOUTCFG /AWS1/CL_IOTJOBEXECSRLOUTCFG¶
jobExecutionsRolloutConfig
io_abortconfig TYPE REF TO /AWS1/CL_IOTABORTCONFIG /AWS1/CL_IOTABORTCONFIG¶
abortConfig
io_timeoutconfig TYPE REF TO /AWS1/CL_IOTTIMEOUTCONFIG /AWS1/CL_IOTTIMEOUTCONFIG¶
timeoutConfig
it_tags TYPE /AWS1/CL_IOTTAG=>TT_TAGLIST TT_TAGLIST¶
Metadata that can be used to manage the job template.
io_jobexecutionsretryconfig TYPE REF TO /AWS1/CL_IOTJOBEXECSRETRYCFG /AWS1/CL_IOTJOBEXECSRETRYCFG¶
Allows you to create the criteria to retry a job.
it_maintenancewindows TYPE /AWS1/CL_IOTMAINTENANCEWINDOW=>TT_MAINTENANCEWINDOWS TT_MAINTENANCEWINDOWS¶
Allows you to configure an optional maintenance window for the rollout of a job document to all devices in the target group for a job.
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_iotcreatejobtmplrsp /AWS1/CL_IOTCREATEJOBTMPLRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createjobtemplate(
io_abortconfig = new /aws1/cl_iotabortconfig(
it_criterialist = VALUE /aws1/cl_iotabortcriteria=>tt_abortcriterialist(
(
new /aws1/cl_iotabortcriteria(
iv_action = |string|
iv_failuretype = |string|
iv_minnumberofexecutedthings = 123
iv_thresholdpercentage = '0.1'
)
)
)
)
io_jobexecsrolloutconfig = new /aws1/cl_iotjobexecsrloutcfg(
io_exponentialrate = new /aws1/cl_iotexprolloutrate(
io_rateincreasecriteria = new /aws1/cl_iotrateincreasecrit(
iv_numberofnotifiedthings = 123
iv_numberofsucceededthings = 123
)
iv_baserateperminute = 123
iv_incrementfactor = '0.1'
)
iv_maximumperminute = 123
)
io_jobexecutionsretryconfig = new /aws1/cl_iotjobexecsretrycfg(
it_criterialist = VALUE /aws1/cl_iotretrycriteria=>tt_retrycriterialist(
(
new /aws1/cl_iotretrycriteria(
iv_failuretype = |string|
iv_numberofretries = 123
)
)
)
)
io_presignedurlconfig = new /aws1/cl_iotpresignedurlconfig(
iv_expiresinsec = 123
iv_rolearn = |string|
)
io_timeoutconfig = new /aws1/cl_iottimeoutconfig( 123 )
it_dstpackageversions = VALUE /aws1/cl_iotdstpackagevrss_w=>tt_destinationpackageversions(
( new /aws1/cl_iotdstpackagevrss_w( |string| ) )
)
it_maintenancewindows = VALUE /aws1/cl_iotmaintenancewindow=>tt_maintenancewindows(
(
new /aws1/cl_iotmaintenancewindow(
iv_durationinminutes = 123
iv_starttime = |string|
)
)
)
it_tags = VALUE /aws1/cl_iottag=>tt_taglist(
(
new /aws1/cl_iottag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_description = |string|
iv_document = |string|
iv_documentsource = |string|
iv_jobarn = |string|
iv_jobtemplateid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_jobtemplatearn = lo_result->get_jobtemplatearn( ).
lv_jobtemplateid = lo_result->get_jobtemplateid( ).
ENDIF.