/AWS1/IF_IOT=>LISTJOBS()¶
About ListJobs¶
Lists jobs.
Requires permission to access the ListJobs action.
Method Signature¶
METHODS /AWS1/IF_IOT~LISTJOBS
IMPORTING
!IV_STATUS TYPE /AWS1/IOTJOBSTATUS OPTIONAL
!IV_TARGETSELECTION TYPE /AWS1/IOTTARGETSELECTION OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/IOTLASERMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/IOTNEXTTOKEN OPTIONAL
!IV_THINGGROUPNAME TYPE /AWS1/IOTTHINGGROUPNAME OPTIONAL
!IV_THINGGROUPID TYPE /AWS1/IOTTHINGGROUPID OPTIONAL
!IV_NAMESPACEID TYPE /AWS1/IOTNAMESPACEID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iotlistjobsresponse
RAISING
/AWS1/CX_IOTINVALIDREQUESTEX
/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¶
Optional arguments:¶
iv_status TYPE /AWS1/IOTJOBSTATUS /AWS1/IOTJOBSTATUS¶
An optional filter that lets you search for jobs that have the specified status.
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.
iv_maxresults TYPE /AWS1/IOTLASERMAXRESULTS /AWS1/IOTLASERMAXRESULTS¶
The maximum number of results to return per request.
iv_nexttoken TYPE /AWS1/IOTNEXTTOKEN /AWS1/IOTNEXTTOKEN¶
The token to retrieve the next set of results.
iv_thinggroupname TYPE /AWS1/IOTTHINGGROUPNAME /AWS1/IOTTHINGGROUPNAME¶
A filter that limits the returned jobs to those for the specified group.
iv_thinggroupid TYPE /AWS1/IOTTHINGGROUPID /AWS1/IOTTHINGGROUPID¶
A filter that limits the returned jobs to those for the specified group.
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_iotlistjobsresponse /AWS1/CL_IOTLISTJOBSRESPONSE¶
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->listjobs(
iv_maxresults = 123
iv_namespaceid = |string|
iv_nexttoken = |string|
iv_status = |string|
iv_targetselection = |string|
iv_thinggroupid = |string|
iv_thinggroupname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_jobs( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_jobarn = lo_row_1->get_jobarn( ).
lv_jobid = lo_row_1->get_jobid( ).
lv_thinggroupid = lo_row_1->get_thinggroupid( ).
lv_targetselection = lo_row_1->get_targetselection( ).
lv_jobstatus = lo_row_1->get_status( ).
lv_datetype = lo_row_1->get_createdat( ).
lv_datetype = lo_row_1->get_lastupdatedat( ).
lv_datetype = lo_row_1->get_completedat( ).
lv_booleanwrapperobject = lo_row_1->get_isconcurrent( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.