/AWS1/IF_ECR=>DESCRIBEIMAGES()¶
About DescribeImages¶
Returns metadata about the images in a repository.
Starting with Docker version 1.9, the Docker client compresses image layers before
pushing them to a V2 Docker registry. The output of the docker images
command shows the uncompressed image size. Therefore, Docker might return a larger
image than the image shown in the Amazon Web Services Management Console.
The new version of Amazon ECR Basic Scanning doesn't use the ImageDetail$imageScanFindingsSummary and ImageDetail$imageScanStatus attributes from the API response to return scan results. Use the DescribeImageScanFindings API instead. For more information about Amazon Web Services native basic scanning, see Scan images for software vulnerabilities in Amazon ECR.
Method Signature¶
METHODS /AWS1/IF_ECR~DESCRIBEIMAGES
IMPORTING
!IV_REGISTRYID TYPE /AWS1/ECRREGISTRYID OPTIONAL
!IV_REPOSITORYNAME TYPE /AWS1/ECRREPOSITORYNAME OPTIONAL
!IT_IMAGEIDS TYPE /AWS1/CL_ECRIMAGEIDENTIFIER=>TT_IMAGEIDENTIFIERLIST OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/ECRNEXTTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/ECRMAXRESULTS OPTIONAL
!IO_FILTER TYPE REF TO /AWS1/CL_ECRDESCRIMAGESFILTER OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ecrdescrimagesrsp
RAISING
/AWS1/CX_ECRIMAGENOTFOUNDEX
/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 that contains the images to describe.
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 describe images. If you do not specify a registry, the default registry is assumed.
it_imageids TYPE /AWS1/CL_ECRIMAGEIDENTIFIER=>TT_IMAGEIDENTIFIERLIST TT_IMAGEIDENTIFIERLIST¶
The list of image IDs for the requested repository.
iv_nexttoken TYPE /AWS1/ECRNEXTTOKEN /AWS1/ECRNEXTTOKEN¶
The
nextTokenvalue returned from a previous paginatedDescribeImagesrequest 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 option cannot be used when you specify images withimageIds.
iv_maxresults TYPE /AWS1/ECRMAXRESULTS /AWS1/ECRMAXRESULTS¶
The maximum number of repository results returned by
DescribeImagesin paginated output. When this parameter is used,DescribeImagesonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherDescribeImagesrequest with the returnednextTokenvalue. This value can be between 1 and 1000. If this parameter is not used, thenDescribeImagesreturns up to 100 results and anextTokenvalue, if applicable. This option cannot be used when you specify images withimageIds.
io_filter TYPE REF TO /AWS1/CL_ECRDESCRIMAGESFILTER /AWS1/CL_ECRDESCRIMAGESFILTER¶
The filter key and value with which to filter your
DescribeImagesresults.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ecrdescrimagesrsp /AWS1/CL_ECRDESCRIMAGESRSP¶
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->describeimages(
io_filter = new /aws1/cl_ecrdescrimagesfilter(
iv_imagestatus = |string|
iv_tagstatus = |string|
)
it_imageids = VALUE /aws1/cl_ecrimageidentifier=>tt_imageidentifierlist(
(
new /aws1/cl_ecrimageidentifier(
iv_imagedigest = |string|
iv_imagetag = |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_imagedetails( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_registryid = lo_row_1->get_registryid( ).
lv_repositoryname = lo_row_1->get_repositoryname( ).
lv_imagedigest = lo_row_1->get_imagedigest( ).
LOOP AT lo_row_1->get_imagetags( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_imagetag = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_imagesizeinbytes = lo_row_1->get_imagesizeinbytes( ).
lv_pushtimestamp = lo_row_1->get_imagepushedat( ).
lo_imagescanstatus = lo_row_1->get_imagescanstatus( ).
IF lo_imagescanstatus IS NOT INITIAL.
lv_scanstatus = lo_imagescanstatus->get_status( ).
lv_scanstatusdescription = lo_imagescanstatus->get_description( ).
ENDIF.
lo_imagescanfindingssummar = lo_row_1->get_imagescanfindingssummary( ).
IF lo_imagescanfindingssummar IS NOT INITIAL.
lv_scantimestamp = lo_imagescanfindingssummar->get_imagescancompletedat( ).
lv_vulnerabilitysourceupda = lo_imagescanfindingssummar->get_vulnerabilitysrcupddat( ).
LOOP AT lo_imagescanfindingssummar->get_findingseveritycounts( ) into ls_row_4.
lv_key = ls_row_4-key.
lo_value = ls_row_4-value.
IF lo_value IS NOT INITIAL.
lv_severitycount = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_mediatype = lo_row_1->get_imagemanifestmediatype( ).
lv_mediatype = lo_row_1->get_artifactmediatype( ).
lv_recordedpulltimestamp = lo_row_1->get_lastrecordedpulltime( ).
lv_imagedigest = lo_row_1->get_subjectmanifestdigest( ).
lv_imagestatus = lo_row_1->get_imagestatus( ).
lv_lastarchivedattimestamp = lo_row_1->get_lastarchivedat( ).
lv_lastactivatedattimestam = lo_row_1->get_lastactivatedat( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.