/AWS1/IF_IMG=>UPDATELIFECYCLEPOLICY()¶
About UpdateLifecyclePolicy¶
Update the specified lifecycle policy.
Method Signature¶
METHODS /AWS1/IF_IMG~UPDATELIFECYCLEPOLICY
IMPORTING
!IV_LIFECYCLEPOLICYARN TYPE /AWS1/IMGLIFECYCLEPOLICYARN OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/IMGNONEMPTYSTRING OPTIONAL
!IV_STATUS TYPE /AWS1/IMGLIFECYCLEPOLICYSTATUS OPTIONAL
!IV_EXECUTIONROLE TYPE /AWS1/IMGROLENAMEORARN OPTIONAL
!IV_RESOURCETYPE TYPE /AWS1/IMGLCPOLICYRESOURCETYPE OPTIONAL
!IT_POLICYDETAILS TYPE /AWS1/CL_IMGLCPOLICYDETAIL=>TT_LIFECYCLEPOLICYDETAILS OPTIONAL
!IO_RESOURCESELECTION TYPE REF TO /AWS1/CL_IMGLCPLYRESRCSELION OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/IMGCLIENTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_imgupdatelcpolicyrsp
RAISING
/AWS1/CX_IMGCALLRLIMEXCEEDEDEX
/AWS1/CX_IMGCLIENTEXCEPTION
/AWS1/CX_IMGFORBIDDENEXCEPTION
/AWS1/CX_IMGIDEMPOTENTPRMMIS00
/AWS1/CX_IMGINVPRMCOMBINATIO00
/AWS1/CX_IMGINVALIDREQUESTEX
/AWS1/CX_IMGRESOURCEINUSEEX
/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_lifecyclepolicyarn TYPE /AWS1/IMGLIFECYCLEPOLICYARN /AWS1/IMGLIFECYCLEPOLICYARN¶
The Amazon Resource Name (ARN) of the lifecycle policy resource.
iv_executionrole TYPE /AWS1/IMGROLENAMEORARN /AWS1/IMGROLENAMEORARN¶
The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to update the lifecycle policy.
iv_resourcetype TYPE /AWS1/IMGLCPOLICYRESOURCETYPE /AWS1/IMGLCPOLICYRESOURCETYPE¶
The type of image resource that the lifecycle policy applies to.
it_policydetails TYPE /AWS1/CL_IMGLCPOLICYDETAIL=>TT_LIFECYCLEPOLICYDETAILS TT_LIFECYCLEPOLICYDETAILS¶
The configuration details for a lifecycle policy resource.
io_resourceselection TYPE REF TO /AWS1/CL_IMGLCPLYRESRCSELION /AWS1/CL_IMGLCPLYRESRCSELION¶
Selection criteria for resources that the lifecycle policy applies to.
iv_clienttoken TYPE /AWS1/IMGCLIENTTOKEN /AWS1/IMGCLIENTTOKEN¶
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.
Optional arguments:¶
iv_description TYPE /AWS1/IMGNONEMPTYSTRING /AWS1/IMGNONEMPTYSTRING¶
Optional description for the lifecycle policy.
iv_status TYPE /AWS1/IMGLIFECYCLEPOLICYSTATUS /AWS1/IMGLIFECYCLEPOLICYSTATUS¶
Indicates whether the lifecycle policy resource is enabled.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_imgupdatelcpolicyrsp /AWS1/CL_IMGUPDATELCPOLICYRSP¶
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->updatelifecyclepolicy(
io_resourceselection = new /aws1/cl_imglcplyresrcselion(
it_recipes = VALUE /aws1/cl_imglcplyresrcselion00=>tt_lcplyresrcselectionrecipes(
(
new /aws1/cl_imglcplyresrcselion00(
iv_name = |string|
iv_semanticversion = |string|
)
)
)
it_tagmap = VALUE /aws1/cl_imgtagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_imgtagmap_w=>ts_tagmap_maprow(
value = new /aws1/cl_imgtagmap_w( |string| )
key = |string|
)
)
)
)
it_policydetails = VALUE /aws1/cl_imglcpolicydetail=>tt_lifecyclepolicydetails(
(
new /aws1/cl_imglcpolicydetail(
io_action = new /aws1/cl_imglcpolicydetaction(
io_includeresources = new /aws1/cl_imglcplydetactincre00(
iv_amis = ABAP_TRUE
iv_containers = ABAP_TRUE
iv_snapshots = ABAP_TRUE
)
iv_type = |string|
)
io_exclusionrules = new /aws1/cl_imglcplydetexclusio00(
io_amis = new /aws1/cl_imglcplydetexclusio01(
io_lastlaunched = new /aws1/cl_imglcplydetexclusio02(
iv_unit = |string|
iv_value = 123
)
it_regions = VALUE /aws1/cl_imgstringlist_w=>tt_stringlist(
( new /aws1/cl_imgstringlist_w( |string| ) )
)
it_sharedaccounts = VALUE /aws1/cl_imgaccountlist_w=>tt_accountlist(
( new /aws1/cl_imgaccountlist_w( |string| ) )
)
it_tagmap = VALUE /aws1/cl_imgtagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_imgtagmap_w=>ts_tagmap_maprow(
value = new /aws1/cl_imgtagmap_w( |string| )
key = |string|
)
)
)
iv_ispublic = ABAP_TRUE
)
it_tagmap = VALUE /aws1/cl_imgtagmap_w=>tt_tagmap(
(
VALUE /aws1/cl_imgtagmap_w=>ts_tagmap_maprow(
value = new /aws1/cl_imgtagmap_w( |string| )
key = |string|
)
)
)
)
io_filter = new /aws1/cl_imglcpolicydetfilter(
iv_retainatleast = 123
iv_type = |string|
iv_unit = |string|
iv_value = 123
)
)
)
)
iv_clienttoken = |string|
iv_description = |string|
iv_executionrole = |string|
iv_lifecyclepolicyarn = |string|
iv_resourcetype = |string|
iv_status = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_lifecyclepolicyarn = lo_result->get_lifecyclepolicyarn( ).
ENDIF.