/AWS1/IF_IOS=>LISTTASKS()¶
About ListTasks¶
Lists tasks in a workspace. To get complete details about a task, use DescribeTask.
Method Signature¶
METHODS /AWS1/IF_IOS~LISTTASKS
IMPORTING
!IV_WORKSPACENAME TYPE /AWS1/IOSWORKSPACENAME OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/IOSPAGINATIONTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/IOSLSTTAKSREQMAXRSLTSINT OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ioslisttasksresponse
RAISING
/AWS1/CX_IOSACCESSDENIEDEX
/AWS1/CX_IOSINTERNALFAILUREEX
/AWS1/CX_IOSINVALIDREQUESTEX
/AWS1/CX_IOSRESOURCENOTFOUNDEX
/AWS1/CX_IOSTHROTTLINGEX
/AWS1/CX_IOSCLIENTEXC
/AWS1/CX_IOSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_workspacename TYPE /AWS1/IOSWORKSPACENAME /AWS1/IOSWORKSPACENAME¶
The name of the workspace.
Optional arguments:¶
iv_nexttoken TYPE /AWS1/IOSPAGINATIONTOKEN /AWS1/IOSPAGINATIONTOKEN¶
The token to be used for the next set of paginated results.
iv_maxresults TYPE /AWS1/IOSLSTTAKSREQMAXRSLTSINT /AWS1/IOSLSTTAKSREQMAXRSLTSINT¶
The maximum number of results to return for each paginated request. Default: 50.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ioslisttasksresponse /AWS1/CL_IOSLISTTASKSRESPONSE¶
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->listtasks(
iv_maxresults = 123
iv_nexttoken = |string|
iv_workspacename = |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_tasksummaries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_resourcename = lo_row_1->get_taskname( ).
lv_description = lo_row_1->get_description( ).
lv_arn = lo_row_1->get_taskarn( ).
lv_version = lo_row_1->get_version( ).
lo_resourcestatus = lo_row_1->get_status( ).
IF lo_resourcestatus IS NOT INITIAL.
lo_resourceerror = lo_resourcestatus->get_error( ).
IF lo_resourceerror IS NOT INITIAL.
lv_resourceerrorcode = lo_resourceerror->get_code( ).
lv_string = lo_resourceerror->get_message( ).
ENDIF.
lv_resourcestate = lo_resourcestatus->get_state( ).
ENDIF.
lv_timestamp = lo_row_1->get_createdat( ).
lv_timestamp = lo_row_1->get_updatedat( ).
ENDIF.
ENDLOOP.
lv_paginationtoken = lo_result->get_nexttoken( ).
ENDIF.