/AWS1/IF_IOT=>CANCELJOB()¶
About CancelJob¶
Cancels a job.
Requires permission to access the CancelJob action.
Method Signature¶
METHODS /AWS1/IF_IOT~CANCELJOB
IMPORTING
!IV_JOBID TYPE /AWS1/IOTJOBID OPTIONAL
!IV_REASONCODE TYPE /AWS1/IOTREASONCODE OPTIONAL
!IV_COMMENT TYPE /AWS1/IOTCOMMENT OPTIONAL
!IV_FORCE TYPE /AWS1/IOTFORCEFLAG OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iotcanceljobresponse
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:¶
iv_jobid TYPE /AWS1/IOTJOBID /AWS1/IOTJOBID¶
The unique identifier you assigned to this job when it was created.
Optional arguments:¶
iv_reasoncode TYPE /AWS1/IOTREASONCODE /AWS1/IOTREASONCODE¶
(Optional)A reason code string that explains why the job was canceled.
iv_comment TYPE /AWS1/IOTCOMMENT /AWS1/IOTCOMMENT¶
An optional comment string describing why the job was canceled.
iv_force TYPE /AWS1/IOTFORCEFLAG /AWS1/IOTFORCEFLAG¶
(Optional) If
truejob executions with status "IN_PROGRESS" and "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are canceled. The default isfalse.Canceling a job which is "IN_PROGRESS", will cause a device which is executing the job to be unable to update the job execution status. Use caution and ensure that each device executing a job which is canceled is able to recover to a valid state.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_iotcanceljobresponse /AWS1/CL_IOTCANCELJOBRESPONSE¶
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->canceljob(
iv_comment = |string|
iv_force = ABAP_TRUE
iv_jobid = |string|
iv_reasoncode = |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.