/AWS1/IF_S3C=>LISTJOBS()¶
About ListJobs¶
Lists current S3 Batch Operations jobs as well as the jobs that have ended within the last 90 days for the Amazon Web Services account making the request. For more information, see S3 Batch Operations in the Amazon S3 User Guide.
- Permissions
-
To use the
ListJobsoperation, you must have permission to perform thes3:ListJobsaction.
Related actions include:
You must URL encode any signed header values that contain spaces. For example, if your header value is my file.txt, containing two spaces after my, you must URL encode this value to my%20%20file.txt.
Method Signature¶
METHODS /AWS1/IF_S3C~LISTJOBS
IMPORTING
!IV_ACCOUNTID TYPE /AWS1/S3CACCOUNTID OPTIONAL
!IT_JOBSTATUSES TYPE /AWS1/CL_S3CJOBSTATUSLIST_W=>TT_JOBSTATUSLIST OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/S3CSTRINGFORNEXTTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/S3CMAXRESULTS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_s3clistjobsresult
RAISING
/AWS1/CX_S3CINTERNALSERVICEEX
/AWS1/CX_S3CINVALIDNEXTTOKENEX
/AWS1/CX_S3CINVALIDREQUESTEX
/AWS1/CX_S3CCLIENTEXC
/AWS1/CX_S3CSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_accountid TYPE /AWS1/S3CACCOUNTID /AWS1/S3CACCOUNTID¶
The Amazon Web Services account ID associated with the S3 Batch Operations job.
Optional arguments:¶
it_jobstatuses TYPE /AWS1/CL_S3CJOBSTATUSLIST_W=>TT_JOBSTATUSLIST TT_JOBSTATUSLIST¶
The
List Jobsrequest returns jobs that match the statuses listed in this element.
iv_nexttoken TYPE /AWS1/S3CSTRINGFORNEXTTOKEN /AWS1/S3CSTRINGFORNEXTTOKEN¶
A pagination token to request the next page of results. Use the token that Amazon S3 returned in the
NextTokenelement of theListJobsResultfrom the previousList Jobsrequest.
iv_maxresults TYPE /AWS1/S3CMAXRESULTS /AWS1/S3CMAXRESULTS¶
The maximum number of jobs that Amazon S3 will include in the
List Jobsresponse. If there are more jobs than this number, the response will include a pagination token in theNextTokenfield to enable you to retrieve the next page of results.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_s3clistjobsresult /AWS1/CL_S3CLISTJOBSRESULT¶
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(
it_jobstatuses = VALUE /aws1/cl_s3cjobstatuslist_w=>tt_jobstatuslist(
( new /aws1/cl_s3cjobstatuslist_w( |string| ) )
)
iv_accountid = |string|
iv_maxresults = 123
iv_nexttoken = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_stringfornexttoken = lo_result->get_nexttoken( ).
LOOP AT lo_result->get_jobs( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_jobid = lo_row_1->get_jobid( ).
lv_nonemptymaxlength256str = lo_row_1->get_description( ).
lv_operationname = lo_row_1->get_operation( ).
lv_jobpriority = lo_row_1->get_priority( ).
lv_jobstatus = lo_row_1->get_status( ).
lv_jobcreationtime = lo_row_1->get_creationtime( ).
lv_jobterminationdate = lo_row_1->get_terminationdate( ).
lo_jobprogresssummary = lo_row_1->get_progresssummary( ).
IF lo_jobprogresssummary IS NOT INITIAL.
lv_jobtotalnumberoftasks = lo_jobprogresssummary->get_totalnumberoftasks( ).
lv_jobnumberoftaskssucceed = lo_jobprogresssummary->get_numberoftaskssucceeded( ).
lv_jobnumberoftasksfailed = lo_jobprogresssummary->get_numberoftasksfailed( ).
lo_jobtimers = lo_jobprogresssummary->get_timers( ).
IF lo_jobtimers IS NOT INITIAL.
lv_jobtimeinstateseconds = lo_jobtimers->get_elapsedtimeinactseconds( ).
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.