/AWS1/IF_IMG=>LISTLCEXECUTIONRESOURCES()¶
About ListLifecycleExecutionResources¶
Lists 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¶
The unique identifier for a runtime instance of the lifecycle policy.
Optional arguments:¶
iv_parentresourceid TYPE /AWS1/IMGNONEMPTYSTRING /AWS1/IMGNONEMPTYSTRING¶
The Amazon Resource Name (ARN) of an image build version to get the output resources for, such as AMIs or container images in Amazon ECR. You can get this value from the
resourceIdin the top-level response. If you leave this property empty, the response lists the Image Builder resources that the lifecycle execution identified for lifecycle actions. If the image build version that you specify inparentResourceIdwasn't part of this lifecycle execution, the response contains an empty list.
iv_maxresults TYPE /AWS1/IMGRESTRICTEDINTEGER /AWS1/IMGRESTRICTEDINTEGER¶
The maximum number of items to return in a single request.
iv_nexttoken TYPE /AWS1/IMGPAGINATIONTOKEN /AWS1/IMGPAGINATIONTOKEN¶
A token to specify where to start paginating. Use the
nextTokenvalue from a previously truncated response.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_imglstlcexecresrcsrsp /AWS1/CL_IMGLSTLCEXECRESRCSRSP¶
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.
List the resources that a lifecycle execution acted on¶
The following example lists the resources that the specified lifecycle execution acted on. For a scheduled resource state update that hasn't started to apply changes yet, the resources list is empty.
DATA(lo_result) = lo_client->listlcexecutionresources( iv_lifecycleexecutionid = |lce-401aefc3-a829-46f6-8fc2-91497988a503| ) .