/AWS1/CL_SCG=>COPYPRODUCT()
¶
About CopyProduct¶
Copies the specified source product to the specified target product or a new product.
You can copy a product to the same account or another account. You can copy a product to the same Region or another Region. If you copy a product to another account, you must first share the product in a portfolio using CreatePortfolioShare.
This operation is performed asynchronously. To track the progress of the operation, use DescribeCopyProductStatus.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_sourceproductarn
TYPE /AWS1/SCGPRODUCTARN
/AWS1/SCGPRODUCTARN
¶
The Amazon Resource Name (ARN) of the source product.
iv_idempotencytoken
TYPE /AWS1/SCGIDEMPOTENCYTOKEN
/AWS1/SCGIDEMPOTENCYTOKEN
¶
A unique identifier that you provide to ensure idempotency. If multiple requests differ only by the idempotency token, the same response is returned for each repeated request.
Optional arguments:¶
iv_acceptlanguage
TYPE /AWS1/SCGACCEPTLANGUAGE
/AWS1/SCGACCEPTLANGUAGE
¶
The language code.
jp
- Japanese
zh
- Chinese
iv_targetproductid
TYPE /AWS1/SCGID
/AWS1/SCGID
¶
The identifier of the target product. By default, a new product is created.
iv_targetproductname
TYPE /AWS1/SCGPRODUCTVIEWNAME
/AWS1/SCGPRODUCTVIEWNAME
¶
A name for the target product. The default is the name of the source product.
it_sourceprovartifactids
TYPE /AWS1/CL_SCGSRCPROVARTIFACTP00=>TT_SOURCEPROVARTIFACTPRPS
TT_SOURCEPROVARTIFACTPRPS
¶
The identifiers of the provisioning artifacts (also known as versions) of the product to copy. By default, all provisioning artifacts are copied.
it_copyoptions
TYPE /AWS1/CL_SCGCOPYOPTIONS_W=>TT_COPYOPTIONS
TT_COPYOPTIONS
¶
The copy options. If the value is
CopyTags
, the tags from the source product are copied to the target product.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_scgcopyproductoutput
/AWS1/CL_SCGCOPYPRODUCTOUTPUT
¶
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->/aws1/if_scg~copyproduct(
it_copyoptions = VALUE /aws1/cl_scgcopyoptions_w=>tt_copyoptions(
( new /aws1/cl_scgcopyoptions_w( |string| ) )
)
it_sourceprovartifactids = VALUE /aws1/cl_scgsrcprovartifactp00=>tt_sourceprovartifactprps(
(
VALUE /aws1/cl_scgsrcprovartifactp00=>tt_sourceprovartifactprpsmap(
(
VALUE /aws1/cl_scgsrcprovartifactp00=>ts_srcprovartifactprp00_maprow(
key = |string|
value = new /aws1/cl_scgsrcprovartifactp00( |string| )
)
)
)
)
)
iv_acceptlanguage = |string|
iv_idempotencytoken = |string|
iv_sourceproductarn = |string|
iv_targetproductid = |string|
iv_targetproductname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_id = lo_result->get_copyproducttoken( ).
ENDIF.