/AWS1/IF_IMG=>LISTLCEXECUTIONRESOURCES()¶
About ListLifecycleExecutionResources¶
List resources that the runtime instance of the image lifecycle identified for lifecycle actions.
Method Signature¶
METHODS /AWS1/IF_IMG~LISTLCEXECUTIONRESOURCES
IMPORTING
!IV_LIFECYCLEEXECUTIONID TYPE /AWS1/IMGLIFECYCLEEXECUTIONID OPTIONAL
!IV_PARENTRESOURCEID TYPE /AWS1/IMGNONEMPTYSTRING OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/IMGRESTRICTEDINTEGER OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/IMGPAGINATIONTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_imglstlcexecresrcsrsp
RAISING
/AWS1/CX_IMGCALLRLIMEXCEEDEDEX
/AWS1/CX_IMGCLIENTEXCEPTION
/AWS1/CX_IMGFORBIDDENEXCEPTION
/AWS1/CX_IMGINVPAGINATIONTOKEX
/AWS1/CX_IMGINVALIDREQUESTEX
/AWS1/CX_IMGSERVICEEXCEPTION
/AWS1/CX_IMGSERVICEUNAVAILEX
/AWS1/CX_IMGCLIENTEXC
/AWS1/CX_IMGSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_lifecycleexecutionid TYPE /AWS1/IMGLIFECYCLEEXECUTIONID /AWS1/IMGLIFECYCLEEXECUTIONID¶
Use the unique identifier for a runtime instance of the lifecycle policy to get runtime details.
Optional arguments:¶
iv_parentresourceid TYPE /AWS1/IMGNONEMPTYSTRING /AWS1/IMGNONEMPTYSTRING¶
You can leave this empty to get a list of Image Builder resources that were identified for lifecycle actions.
To get a list of associated resources that are impacted for an individual resource (the parent), specify its Amazon Resource Name (ARN). Associated resources are produced from your image and distributed when you run a build, such as AMIs or container images stored in ECR repositories.
iv_maxresults TYPE /AWS1/IMGRESTRICTEDINTEGER /AWS1/IMGRESTRICTEDINTEGER¶
Specify the maximum number of items to return in a request.
iv_nexttoken TYPE /AWS1/IMGPAGINATIONTOKEN /AWS1/IMGPAGINATIONTOKEN¶
A token to specify where to start paginating. This is the nextToken from a previously truncated response.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_imglstlcexecresrcsrsp /AWS1/CL_IMGLSTLCEXECRESRCSRSP¶
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->listlcexecutionresources(
iv_lifecycleexecutionid = |string|
iv_maxresults = 123
iv_nexttoken = |string|
iv_parentresourceid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_lifecycleexecutionid = lo_result->get_lifecycleexecutionid( ).
lo_lifecycleexecutionstate = lo_result->get_lifecycleexecutionstate( ).
IF lo_lifecycleexecutionstate IS NOT INITIAL.
lv_lifecycleexecutionstatu = lo_lifecycleexecutionstate->get_status( ).
lv_nonemptystring = lo_lifecycleexecutionstate->get_reason( ).
ENDIF.
LOOP AT lo_result->get_resources( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_nonemptystring = lo_row_1->get_accountid( ).
lv_nonemptystring = lo_row_1->get_resourceid( ).
lo_lifecycleexecutionresou = lo_row_1->get_state( ).
IF lo_lifecycleexecutionresou IS NOT INITIAL.
lv_lifecycleexecutionresou_1 = lo_lifecycleexecutionresou->get_status( ).
lv_nonemptystring = lo_lifecycleexecutionresou->get_reason( ).
ENDIF.
lo_lifecycleexecutionresou_2 = lo_row_1->get_action( ).
IF lo_lifecycleexecutionresou_2 IS NOT INITIAL.
lv_lifecycleexecutionresou_3 = lo_lifecycleexecutionresou_2->get_name( ).
lv_nonemptystring = lo_lifecycleexecutionresou_2->get_reason( ).
ENDIF.
lv_nonemptystring = lo_row_1->get_region( ).
LOOP AT lo_row_1->get_snapshots( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_nonemptystring = lo_row_3->get_snapshotid( ).
lo_lifecycleexecutionresou = lo_row_3->get_state( ).
IF lo_lifecycleexecutionresou IS NOT INITIAL.
lv_lifecycleexecutionresou_1 = lo_lifecycleexecutionresou->get_status( ).
lv_nonemptystring = lo_lifecycleexecutionresou->get_reason( ).
ENDIF.
ENDIF.
ENDLOOP.
LOOP AT lo_row_1->get_imageuris( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_nonemptystring = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_datetimetimestamp = lo_row_1->get_starttime( ).
lv_datetimetimestamp = lo_row_1->get_endtime( ).
ENDIF.
ENDLOOP.
lv_paginationtoken = lo_result->get_nexttoken( ).
ENDIF.