/AWS1/IF_FRM=>UPDATEGENERATEDTEMPLATE()¶
About UpdateGeneratedTemplate¶
Updates a generated template. This can be used to change the name, add and remove
resources, refresh resources, and change the DeletionPolicy and
UpdateReplacePolicy settings. You can check the status of the update to the
generated template using the DescribeGeneratedTemplate API action.
Method Signature¶
METHODS /AWS1/IF_FRM~UPDATEGENERATEDTEMPLATE
IMPORTING
!IV_GENERATEDTEMPLATENAME TYPE /AWS1/FRMGENERATEDTEMPLATENAME OPTIONAL
!IV_NEWGENERATEDTEMPLATENAME TYPE /AWS1/FRMGENERATEDTEMPLATENAME OPTIONAL
!IT_ADDRESOURCES TYPE /AWS1/CL_FRMRESOURCEDEFINITION=>TT_RESOURCEDEFINITIONS OPTIONAL
!IT_REMOVERESOURCES TYPE /AWS1/CL_FRMJAZZLOGICALRESRC00=>TT_JAZZLOGICALRESOURCEIDS OPTIONAL
!IV_REFRESHALLRESOURCES TYPE /AWS1/FRMREFRESHALLRESOURCES OPTIONAL
!IO_TEMPLATECONFIGURATION TYPE REF TO /AWS1/CL_FRMTEMPLATECONF OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_frmupgeneratedtmplout
RAISING
/AWS1/CX_FRMALREADYEXISTSEX
/AWS1/CX_FRMGENERATEDTMPLNOT00
/AWS1/CX_FRMLIMITEXCEEDEDEX
/AWS1/CX_FRMCLIENTEXC
/AWS1/CX_FRMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_generatedtemplatename TYPE /AWS1/FRMGENERATEDTEMPLATENAME /AWS1/FRMGENERATEDTEMPLATENAME¶
The name or Amazon Resource Name (ARN) of a generated template.
Optional arguments:¶
iv_newgeneratedtemplatename TYPE /AWS1/FRMGENERATEDTEMPLATENAME /AWS1/FRMGENERATEDTEMPLATENAME¶
An optional new name to assign to the generated template.
it_addresources TYPE /AWS1/CL_FRMRESOURCEDEFINITION=>TT_RESOURCEDEFINITIONS TT_RESOURCEDEFINITIONS¶
An optional list of resources to be added to the generated template.
it_removeresources TYPE /AWS1/CL_FRMJAZZLOGICALRESRC00=>TT_JAZZLOGICALRESOURCEIDS TT_JAZZLOGICALRESOURCEIDS¶
A list of logical ids for resources to remove from the generated template.
iv_refreshallresources TYPE /AWS1/FRMREFRESHALLRESOURCES /AWS1/FRMREFRESHALLRESOURCES¶
If
true, update the resource properties in the generated template with their current live state. This feature is useful when the resource properties in your generated a template does not reflect the live state of the resource properties. This happens when a user update the resource properties after generating a template.
io_templateconfiguration TYPE REF TO /AWS1/CL_FRMTEMPLATECONF /AWS1/CL_FRMTEMPLATECONF¶
The configuration details of the generated template, including the
DeletionPolicyandUpdateReplacePolicy.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_frmupgeneratedtmplout /AWS1/CL_FRMUPGENERATEDTMPLOUT¶
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->updategeneratedtemplate(
io_templateconfiguration = new /aws1/cl_frmtemplateconf(
iv_deletionpolicy = |string|
iv_updatereplacepolicy = |string|
)
it_addresources = VALUE /aws1/cl_frmresourcedefinition=>tt_resourcedefinitions(
(
new /aws1/cl_frmresourcedefinition(
it_resourceidentifier = VALUE /aws1/cl_frmresourceidprps_w=>tt_resourceidproperties(
(
VALUE /aws1/cl_frmresourceidprps_w=>ts_resourceidproperties_maprow(
value = new /aws1/cl_frmresourceidprps_w( |string| )
key = |string|
)
)
)
iv_logicalresourceid = |string|
iv_resourcetype = |string|
)
)
)
it_removeresources = VALUE /aws1/cl_frmjazzlogicalresrc00=>tt_jazzlogicalresourceids(
( new /aws1/cl_frmjazzlogicalresrc00( |string| ) )
)
iv_generatedtemplatename = |string|
iv_newgeneratedtemplatename = |string|
iv_refreshallresources = ABAP_TRUE
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_generatedtemplateid = lo_result->get_generatedtemplateid( ).
ENDIF.
To add resources to a generated template¶
This example adds resources to a generated template
DATA(lo_result) = lo_client->updategeneratedtemplate(
it_addresources = VALUE /aws1/cl_frmresourcedefinition=>tt_resourcedefinitions(
(
new /aws1/cl_frmresourcedefinition(
it_resourceidentifier = VALUE /aws1/cl_frmresourceidprps_w=>tt_resourceidproperties(
(
VALUE /aws1/cl_frmresourceidprps_w=>ts_resourceidproperties_maprow(
value = new /aws1/cl_frmresourceidprps_w( |jazz-bucket| )
key = |BucketName|
)
)
)
iv_resourcetype = |AWS::S3::Bucket|
)
)
(
new /aws1/cl_frmresourcedefinition(
it_resourceidentifier = VALUE /aws1/cl_frmresourceidprps_w=>tt_resourceidproperties(
(
VALUE /aws1/cl_frmresourceidprps_w=>ts_resourceidproperties_maprow(
value = new /aws1/cl_frmresourceidprps_w( |random-id123| )
key = |DhcpOptionsId|
)
)
)
iv_resourcetype = |AWS::EC2::DHCPOptions|
)
)
)
iv_generatedtemplatename = |JazzyTemplate|
).
To update a generated template's name¶
This example updates a generated template with a new name.
DATA(lo_result) = lo_client->updategeneratedtemplate(
iv_generatedtemplatename = |JazzyTemplate|
iv_newgeneratedtemplatename = |JazzierTemplate|
).
To remove resources from a generated template¶
This example removes resources from a generated template
DATA(lo_result) = lo_client->updategeneratedtemplate(
it_removeresources = VALUE /aws1/cl_frmjazzlogicalresrc00=>tt_jazzlogicalresourceids(
( new /aws1/cl_frmjazzlogicalresrc00( |LogicalResourceId1| ) )
( new /aws1/cl_frmjazzlogicalresrc00( |LogicalResourceId2| ) )
)
iv_generatedtemplatename = |JazzyTemplate|
).