/AWS1/CL_IMG=>DELETEIMAGE()
¶
About DeleteImage¶
Deletes an Image Builder image resource. This does not delete any EC2 AMIs or ECR container images that are created during the image build process. You must clean those up separately, using the appropriate Amazon EC2 or Amazon ECR console actions, or API or CLI commands.
-
To deregister an EC2 Linux AMI, see Deregister your Linux AMI in the Amazon EC2 User Guide .
-
To deregister an EC2 Windows AMI, see Deregister your Windows AMI in the Amazon EC2 Windows Guide .
-
To delete a container image from Amazon ECR, see Deleting an image in the Amazon ECR User Guide.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_imagebuildversionarn
TYPE /AWS1/IMGIMAGEBUILDVERSIONARN
/AWS1/IMGIMAGEBUILDVERSIONARN
¶
The Amazon Resource Name (ARN) of the Image Builder image resource to delete.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_imgdeleteimagersp
/AWS1/CL_IMGDELETEIMAGERSP
¶
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_img~deleteimage( |string| ).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_nonemptystring = lo_result->get_requestid( ).
lv_imagebuildversionarn = lo_result->get_imagebuildversionarn( ).
ENDIF.