/AWS1/IF_IMG=>DISTRIBUTEIMAGE()¶
About DistributeImage¶
DistributeImage distributes existing AMIs to additional regions and accounts without rebuilding the image.
Method Signature¶
METHODS /AWS1/IF_IMG~DISTRIBUTEIMAGE
IMPORTING
!IV_SOURCEIMAGE TYPE /AWS1/IMGNONEMPTYSTRING OPTIONAL
!IV_DISTRIBUTIONCONFARN TYPE /AWS1/IMGDISTRIBUTIONCONFARN OPTIONAL
!IV_EXECUTIONROLE TYPE /AWS1/IMGROLENAMEORARN OPTIONAL
!IT_TAGS TYPE /AWS1/CL_IMGTAGMAP_W=>TT_TAGMAP OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/IMGCLIENTTOKEN OPTIONAL
!IO_LOGGINGCONFIGURATION TYPE REF TO /AWS1/CL_IMGIMAGELOGGINGCONF OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_imgdistributeimagersp
RAISING
/AWS1/CX_IMGACCESSDENIEDEX
/AWS1/CX_IMGCALLRLIMEXCEEDEDEX
/AWS1/CX_IMGCLIENTEXCEPTION
/AWS1/CX_IMGFORBIDDENEXCEPTION
/AWS1/CX_IMGIDEMPOTENTPRMMIS00
/AWS1/CX_IMGINVALIDREQUESTEX
/AWS1/CX_IMGRESOURCEINUSEEX
/AWS1/CX_IMGRESOURCENOTFOUNDEX
/AWS1/CX_IMGSERVICEEXCEPTION
/AWS1/CX_IMGSERVICEQUOTAEXCDEX
/AWS1/CX_IMGSERVICEUNAVAILEX
/AWS1/CX_IMGTOOMANYREQUESTSEX
/AWS1/CX_IMGCLIENTEXC
/AWS1/CX_IMGSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_sourceimage TYPE /AWS1/IMGNONEMPTYSTRING /AWS1/IMGNONEMPTYSTRING¶
The source image Amazon Resource Name (ARN) to distribute.
iv_distributionconfarn TYPE /AWS1/IMGDISTRIBUTIONCONFARN /AWS1/IMGDISTRIBUTIONCONFARN¶
The Amazon Resource Name (ARN) of the distribution configuration to use.
iv_executionrole TYPE /AWS1/IMGROLENAMEORARN /AWS1/IMGROLENAMEORARN¶
The IAM role to use for the distribution.
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:¶
it_tags TYPE /AWS1/CL_IMGTAGMAP_W=>TT_TAGMAP TT_TAGMAP¶
The tags to apply to the distributed image.
io_loggingconfiguration TYPE REF TO /AWS1/CL_IMGIMAGELOGGINGCONF /AWS1/CL_IMGIMAGELOGGINGCONF¶
The logging configuration for the distribution.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_imgdistributeimagersp /AWS1/CL_IMGDISTRIBUTEIMAGERSP¶
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->distributeimage(
io_loggingconfiguration = new /aws1/cl_imgimageloggingconf( |string| )
it_tags = 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_clienttoken = |string|
iv_distributionconfarn = |string|
iv_executionrole = |string|
iv_sourceimage = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_clienttoken = lo_result->get_clienttoken( ).
lv_imagebuildversionarn = lo_result->get_imagebuildversionarn( ).
ENDIF.