/AWS1/IF_IOT=>ASSOCIATETARGETSWITHJOB()¶
About AssociateTargetsWithJob¶
Associates a group with a continuous job. The following criteria must be met:
-
The job must have been created with the
targetSelectionfield set to "CONTINUOUS". -
The job status must currently be "IN_PROGRESS".
-
The total number of targets associated with a job must not exceed 100.
Requires permission to access the AssociateTargetsWithJob action.
Method Signature¶
METHODS /AWS1/IF_IOT~ASSOCIATETARGETSWITHJOB
IMPORTING
!IT_TARGETS TYPE /AWS1/CL_IOTJOBTARGETS_W=>TT_JOBTARGETS OPTIONAL
!IV_JOBID TYPE /AWS1/IOTJOBID OPTIONAL
!IV_COMMENT TYPE /AWS1/IOTCOMMENT OPTIONAL
!IV_NAMESPACEID TYPE /AWS1/IOTNAMESPACEID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iotassctgtswithjobrsp
RAISING
/AWS1/CX_IOTINVALIDREQUESTEX
/AWS1/CX_IOTLIMITEXCEEDEDEX
/AWS1/CX_IOTRESOURCENOTFOUNDEX
/AWS1/CX_IOTSERVICEUNAVAILEX
/AWS1/CX_IOTTHROTTLINGEX
/AWS1/CX_IOTCLIENTEXC
/AWS1/CX_IOTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
it_targets TYPE /AWS1/CL_IOTJOBTARGETS_W=>TT_JOBTARGETS TT_JOBTARGETS¶
A list of thing group ARNs that define the targets of the job.
iv_jobid TYPE /AWS1/IOTJOBID /AWS1/IOTJOBID¶
The unique identifier you assigned to this job when it was created.
Optional arguments:¶
iv_comment TYPE /AWS1/IOTCOMMENT /AWS1/IOTCOMMENT¶
An optional comment string describing why the job was associated with the targets.
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
namespaceIdfeature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_iotassctgtswithjobrsp /AWS1/CL_IOTASSCTGTSWITHJOBRSP¶
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->associatetargetswithjob(
it_targets = VALUE /aws1/cl_iotjobtargets_w=>tt_jobtargets(
( new /aws1/cl_iotjobtargets_w( |string| ) )
)
iv_comment = |string|
iv_jobid = |string|
iv_namespaceid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_jobarn = lo_result->get_jobarn( ).
lv_jobid = lo_result->get_jobid( ).
lv_jobdescription = lo_result->get_description( ).
ENDIF.