Skip to content

/AWS1/IF_EBN=>LISTPLATFORMVERSIONS()

About ListPlatformVersions

Lists the platform versions available for your account in an Amazon Web Services Region. Provides summary information about each platform version. Compare to DescribePlatformVersion, which provides full details about a single platform version.

This action only returns information about platform versions that the calling principle has IAM permissions to access. For example, consider a case where a user only has permission to access one of ten platform versions. When the user calls the ListPlatformVersions action, the response will only include the one platform version that the user has permission to access instead of all ten platform versions. If the user doesn’t have access to any of the platform versions an empty result is returned.

The AWSElasticBeanstalkReadOnly managed policy allows operators to view information about resources related to Elastic Beanstalk environments. For more information, see Managing Elastic Beanstalk user policies in the Elastic Beanstalk Developer Guide. For detailed instructions to attach a policy to a user or group, see the section Controlling access with managed policies in the same topic.

For definitions of platform version and other platform-related terms, see Elastic Beanstalk Platforms Glossary.

Method Signature

METHODS /AWS1/IF_EBN~LISTPLATFORMVERSIONS
  IMPORTING
    !IT_FILTERS TYPE /AWS1/CL_EBNPLATFORMFILTER=>TT_PLATFORMFILTERS OPTIONAL
    !IV_MAXRECORDS TYPE /AWS1/EBNPLATFORMMAXRECORDS OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/EBNTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ebnlistplatformvrssrs
  RAISING
    /AWS1/CX_EBNELASTICBEANSTALK00
    /AWS1/CX_EBNINSUFFICIENTPRIV00
    /AWS1/CX_EBNCLIENTEXC
    /AWS1/CX_EBNSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

it_filters TYPE /AWS1/CL_EBNPLATFORMFILTER=>TT_PLATFORMFILTERS TT_PLATFORMFILTERS

Criteria for restricting the resulting list of platform versions. The filter is interpreted as a logical conjunction (AND) of the separate PlatformFilter terms.

iv_maxrecords TYPE /AWS1/EBNPLATFORMMAXRECORDS /AWS1/EBNPLATFORMMAXRECORDS

The maximum number of platform version values returned in one call.

iv_nexttoken TYPE /AWS1/EBNTOKEN /AWS1/EBNTOKEN

For a paginated request. Specify a token from a previous response page to retrieve the next response page. All other parameter values must be identical to the ones specified in the initial request.

If no NextToken is specified, the first page is retrieved.

RETURNING

oo_output TYPE REF TO /aws1/cl_ebnlistplatformvrssrs /AWS1/CL_EBNLISTPLATFORMVRSSRS

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->listplatformversions(
  it_filters = VALUE /aws1/cl_ebnplatformfilter=>tt_platformfilters(
    (
      new /aws1/cl_ebnplatformfilter(
        it_values = VALUE /aws1/cl_ebnplatformfiltvall00=>tt_platformfiltervaluelist(
          ( new /aws1/cl_ebnplatformfiltvall00( |string| ) )
        )
        iv_operator = |string|
        iv_type = |string|
      )
    )
  )
  iv_maxrecords = 123
  iv_nexttoken = |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_platformsummarylist( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_platformarn = lo_row_1->get_platformarn( ).
      lv_platformowner = lo_row_1->get_platformowner( ).
      lv_platformstatus = lo_row_1->get_platformstatus( ).
      lv_platformcategory = lo_row_1->get_platformcategory( ).
      lv_operatingsystemname = lo_row_1->get_operatingsystemname( ).
      lv_operatingsystemversion = lo_row_1->get_operatingsystemversion( ).
      LOOP AT lo_row_1->get_supportedtierlist( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_supportedtier = lo_row_3->get_value( ).
        ENDIF.
      ENDLOOP.
      LOOP AT lo_row_1->get_supportedaddonlist( ) into lo_row_4.
        lo_row_5 = lo_row_4.
        IF lo_row_5 IS NOT INITIAL.
          lv_supportedaddon = lo_row_5->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_platformlifecyclestate = lo_row_1->get_platformlifecyclestate( ).
      lv_platformversion = lo_row_1->get_platformversion( ).
      lv_branchname = lo_row_1->get_platformbranchname( ).
      lv_platformbranchlifecycle = lo_row_1->get_platformbranchlcstate( ).
    ENDIF.
  ENDLOOP.
  lv_token = lo_result->get_nexttoken( ).
ENDIF.