/AWS1/IF_APS=>COPYIMAGE()¶
About CopyImage¶
Copies the image within the same region or to a new region within the same AWS account. Note that any tags you added to the image will not be copied.
Method Signature¶
METHODS /AWS1/IF_APS~COPYIMAGE
  IMPORTING
    !IV_SOURCEIMAGENAME TYPE /AWS1/APSNAME OPTIONAL
    !IV_DESTINATIONIMAGENAME TYPE /AWS1/APSNAME OPTIONAL
    !IV_DESTINATIONREGION TYPE /AWS1/APSREGIONNAME OPTIONAL
    !IV_DSTIMAGEDESCRIPTION TYPE /AWS1/APSDESCRIPTION OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_apscopyimageresponse
  RAISING
    /AWS1/CX_APSINCOMPATIBLEIMAG00
    /AWS1/CX_APSINVACCTSTATUSEX
    /AWS1/CX_APSLIMITEXCEEDEDEX
    /AWS1/CX_APSRESRCALRDYEXISTSEX
    /AWS1/CX_APSRESRCNOTAVAILABL00
    /AWS1/CX_APSRESOURCENOTFOUNDEX
    /AWS1/CX_APSCLIENTEXC
    /AWS1/CX_APSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_sourceimagename TYPE /AWS1/APSNAME /AWS1/APSNAME¶
The name of the image to copy.
iv_destinationimagename TYPE /AWS1/APSNAME /AWS1/APSNAME¶
The name that the image will have when it is copied to the destination.
iv_destinationregion TYPE /AWS1/APSREGIONNAME /AWS1/APSREGIONNAME¶
The destination region to which the image will be copied. This parameter is required, even if you are copying an image within the same region.
Optional arguments:¶
iv_dstimagedescription TYPE /AWS1/APSDESCRIPTION /AWS1/APSDESCRIPTION¶
The description that the image will have when it is copied to the destination.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_apscopyimageresponse /AWS1/CL_APSCOPYIMAGERESPONSE¶
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->copyimage(
  iv_destinationimagename = |string|
  iv_destinationregion = |string|
  iv_dstimagedescription = |string|
  iv_sourceimagename = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_name = lo_result->get_destinationimagename( ).
ENDIF.