/AWS1/IF_ECR=>LISTIMAGES()¶
About ListImages¶
Lists all the image IDs for the specified repository.
You can filter images based on whether or not they are tagged by using the
tagStatus filter and specifying either TAGGED,
UNTAGGED or ANY. For example, you can filter your results
to return only UNTAGGED images and then pipe that result to a BatchDeleteImage operation to delete them. Or, you can filter your
results to return only TAGGED images to list all of the tags in your
repository.
Method Signature¶
METHODS /AWS1/IF_ECR~LISTIMAGES
IMPORTING
!IV_REGISTRYID TYPE /AWS1/ECRREGISTRYID OPTIONAL
!IV_REPOSITORYNAME TYPE /AWS1/ECRREPOSITORYNAME OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/ECRNEXTTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/ECRMAXRESULTS OPTIONAL
!IO_FILTER TYPE REF TO /AWS1/CL_ECRLISTIMAGESFILTER OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ecrlistimagesresponse
RAISING
/AWS1/CX_ECRINVALIDPARAMETEREX
/AWS1/CX_ECRREPOSITORYNOTFNDEX
/AWS1/CX_ECRSERVEREXCEPTION
/AWS1/CX_ECRCLIENTEXC
/AWS1/CX_ECRSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_repositoryname TYPE /AWS1/ECRREPOSITORYNAME /AWS1/ECRREPOSITORYNAME¶
The repository with image IDs to be listed.
Optional arguments:¶
iv_registryid TYPE /AWS1/ECRREGISTRYID /AWS1/ECRREGISTRYID¶
The Amazon Web Services account ID associated with the registry that contains the repository in which to list images. If you do not specify a registry, the default registry is assumed.
iv_nexttoken TYPE /AWS1/ECRNEXTTOKEN /AWS1/ECRNEXTTOKEN¶
The
nextTokenvalue returned from a previous paginatedListImagesrequest wheremaxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextTokenvalue. This value isnullwhen there are no more results to return.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
iv_maxresults TYPE /AWS1/ECRMAXRESULTS /AWS1/ECRMAXRESULTS¶
The maximum number of image results returned by
ListImagesin paginated output. When this parameter is used,ListImagesonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListImagesrequest with the returnednextTokenvalue. This value can be between 1 and 1000. If this parameter is not used, thenListImagesreturns up to 100 results and anextTokenvalue, if applicable.
io_filter TYPE REF TO /AWS1/CL_ECRLISTIMAGESFILTER /AWS1/CL_ECRLISTIMAGESFILTER¶
The filter key and value with which to filter your
ListImagesresults.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ecrlistimagesresponse /AWS1/CL_ECRLISTIMAGESRESPONSE¶
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->listimages(
io_filter = new /aws1/cl_ecrlistimagesfilter(
iv_imagestatus = |string|
iv_tagstatus = |string|
)
iv_maxresults = 123
iv_nexttoken = |string|
iv_registryid = |string|
iv_repositoryname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_imageids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_imagedigest = lo_row_1->get_imagedigest( ).
lv_imagetag = lo_row_1->get_imagetag( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.
To list all images in a repository¶
This example lists all of the images in the repository named ubuntu in the default registry in the current account.
DATA(lo_result) = lo_client->listimages( iv_repositoryname = |ubuntu| ) .