Skip to content

/AWS1/CL_APS=>DESCRIBEIMAGES()

About DescribeImages

Retrieves a list that describes one or more specified images, if the image names or image ARNs are provided. Otherwise, all images in the account are described.

Method Signature

IMPORTING

Optional arguments:

it_names TYPE /AWS1/CL_APSSTRINGLIST_W=>TT_STRINGLIST TT_STRINGLIST

The names of the public or private images to describe.

it_arns TYPE /AWS1/CL_APSARNLIST_W=>TT_ARNLIST TT_ARNLIST

The ARNs of the public, private, and shared images to describe.

iv_type TYPE /AWS1/APSVISIBILITYTYPE /AWS1/APSVISIBILITYTYPE

The type of image (public, private, or shared) to describe.

iv_nexttoken TYPE /AWS1/APSSTRING /AWS1/APSSTRING

The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

iv_maxresults TYPE /AWS1/APSDESCRIMAGESMAXRESULTS /AWS1/APSDESCRIMAGESMAXRESULTS

The maximum size of each page of results.

RETURNING

oo_output TYPE REF TO /aws1/cl_apsdescrimagesresult /AWS1/CL_APSDESCRIMAGESRESULT

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_aps~describeimages(
  it_arns = VALUE /aws1/cl_apsarnlist_w=>tt_arnlist(
    ( new /aws1/cl_apsarnlist_w( |string| ) )
  )
  it_names = VALUE /aws1/cl_apsstringlist_w=>tt_stringlist(
    ( new /aws1/cl_apsstringlist_w( |string| ) )
  )
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_type = |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_images( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_string = lo_row_1->get_name( ).
      lv_arn = lo_row_1->get_arn( ).
      lv_arn = lo_row_1->get_baseimagearn( ).
      lv_string = lo_row_1->get_displayname( ).
      lv_imagestate = lo_row_1->get_state( ).
      lv_visibilitytype = lo_row_1->get_visibility( ).
      lv_boolean = lo_row_1->get_imagebuildersupported( ).
      lv_string = lo_row_1->get_imagebuildername( ).
      lv_platformtype = lo_row_1->get_platform( ).
      lv_string = lo_row_1->get_description( ).
      lo_imagestatechangereason = lo_row_1->get_statechangereason( ).
      IF lo_imagestatechangereason IS NOT INITIAL.
        lv_imagestatechangereasonc = lo_imagestatechangereason->get_code( ).
        lv_string = lo_imagestatechangereason->get_message( ).
      ENDIF.
      LOOP AT lo_row_1->get_applications( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_string = lo_row_3->get_name( ).
          lv_string = lo_row_3->get_displayname( ).
          lv_string = lo_row_3->get_iconurl( ).
          lv_string = lo_row_3->get_launchpath( ).
          lv_string = lo_row_3->get_launchparameters( ).
          lv_boolean = lo_row_3->get_enabled( ).
          LOOP AT lo_row_3->get_metadata( ) into ls_row_4.
            lv_key = ls_row_4-key.
            lo_value = ls_row_4-value.
            IF lo_value IS NOT INITIAL.
              lv_string = lo_value->get_value( ).
            ENDIF.
          ENDLOOP.
          lv_string = lo_row_3->get_workingdirectory( ).
          lv_string = lo_row_3->get_description( ).
          lv_arn = lo_row_3->get_arn( ).
          lv_arn = lo_row_3->get_appblockarn( ).
          lo_s3location = lo_row_3->get_icons3location( ).
          IF lo_s3location IS NOT INITIAL.
            lv_s3bucket = lo_s3location->get_s3bucket( ).
            lv_s3key = lo_s3location->get_s3key( ).
          ENDIF.
          LOOP AT lo_row_3->get_platforms( ) into lo_row_5.
            lo_row_6 = lo_row_5.
            IF lo_row_6 IS NOT INITIAL.
              lv_platformtype = lo_row_6->get_value( ).
            ENDIF.
          ENDLOOP.
          LOOP AT lo_row_3->get_instancefamilies( ) into lo_row_7.
            lo_row_8 = lo_row_7.
            IF lo_row_8 IS NOT INITIAL.
              lv_string = lo_row_8->get_value( ).
            ENDIF.
          ENDLOOP.
          lv_timestamp = lo_row_3->get_createdtime( ).
        ENDIF.
      ENDLOOP.
      lv_timestamp = lo_row_1->get_createdtime( ).
      lv_timestamp = lo_row_1->get_pubbaseimagereleaseddate( ).
      lv_appstreamagentversion = lo_row_1->get_appstreamagentversion( ).
      lo_imagepermissions = lo_row_1->get_imagepermissions( ).
      IF lo_imagepermissions IS NOT INITIAL.
        lv_booleanobject = lo_imagepermissions->get_allowfleet( ).
        lv_booleanobject = lo_imagepermissions->get_allowimagebuilder( ).
      ENDIF.
      LOOP AT lo_row_1->get_imageerrors( ) into lo_row_9.
        lo_row_10 = lo_row_9.
        IF lo_row_10 IS NOT INITIAL.
          lv_fleeterrorcode = lo_row_10->get_errorcode( ).
          lv_string = lo_row_10->get_errormessage( ).
          lv_timestamp = lo_row_10->get_errortimestamp( ).
        ENDIF.
      ENDLOOP.
      lv_latestappstreamagentver = lo_row_1->get_latestappstreamagentvrs( ).
      LOOP AT lo_row_1->get_supportedinstfamilies( ) into lo_row_7.
        lo_row_8 = lo_row_7.
        IF lo_row_8 IS NOT INITIAL.
          lv_string = lo_row_8->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_dynamicappprovidersenab = lo_row_1->get_dynamicapppvdrsenabled( ).
      lv_imagesharedwithothers = lo_row_1->get_imagesharedwithothers( ).
    ENDIF.
  ENDLOOP.
  lv_string = lo_result->get_nexttoken( ).
ENDIF.