Skip to content

/AWS1/CL_LIX=>LISTLINUXSUBSCRIPTIONINSTS()

About ListLinuxSubscriptionInstances

Lists the running Amazon EC2 instances that were discovered with commercial Linux subscriptions.

Method Signature

IMPORTING

Optional arguments:

it_filters TYPE /AWS1/CL_LIXFILTER=>TT_FILTERLIST TT_FILTERLIST

An array of structures that you can use to filter the results by your specified criteria. For example, you can specify Region in the Name, with the contains operator to list all subscriptions that match a partial string in the Value, such as us-west.

For each filter, you can specify one of the following values for the Name key to streamline results:

  • AccountID

  • AmiID

  • DualSubscription

  • InstanceID

  • InstanceType

  • ProductCode

  • Region

  • Status

  • UsageOperation

For each filter, you can use one of the following Operator values to define the behavior of the filter:

  • contains

  • equals

  • Notequal

iv_maxresults TYPE /AWS1/LIXBOXINTEGER /AWS1/LIXBOXINTEGER

The maximum items to return in a request.

iv_nexttoken TYPE /AWS1/LIXSTRING /AWS1/LIXSTRING

A token to specify where to start paginating. This is the nextToken from a previously truncated response.

RETURNING

oo_output TYPE REF TO /aws1/cl_lixlstlinuxsubscrip01 /AWS1/CL_LIXLSTLINUXSUBSCRIP01

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_lix~listlinuxsubscriptioninsts(
  it_filters = VALUE /aws1/cl_lixfilter=>tt_filterlist(
    (
      new /aws1/cl_lixfilter(
        it_values = VALUE /aws1/cl_lixstringlist_w=>tt_stringlist(
          ( new /aws1/cl_lixstringlist_w( |string| ) )
        )
        iv_name = |string|
        iv_operator = |string|
      )
    )
  )
  iv_maxresults = 123
  iv_nexttoken = |string|
).

This is an example of reading all possible response values

LOOP AT lo_result->get_instances( ) into lo_row.
  lv_string = lo_row_1->get_amiid( ).
  lv_string = lo_row_1->get_instanceid( ).
  lv_string = lo_row_1->get_instancetype( ).
  lv_string = lo_row_1->get_accountid( ).
  lv_string = lo_row_1->get_status( ).
  lv_string = lo_row_1->get_region( ).
  lv_string = lo_row_1->get_usageoperation( ).
  LOOP AT lo_row_1->get_productcode( ) into lo_row_2.
    lv_string = lo_row_3->get_value( ).
  ENDLOOP.
  lv_string = lo_row_1->get_lastupdatedtime( ).
  lv_string = lo_row_1->get_subscriptionname( ).
  lv_string = lo_row_1->get_osversion( ).
  lv_string = lo_row_1->get_subscriptionpvdrcretime( ).
  lv_string = lo_row_1->get_subscriptionpvdrupdtime( ).
  lv_string = lo_row_1->get_dualsubscription( ).
  lv_string = lo_row_1->get_regedwthsubscriptionpvdr( ).
ENDLOOP.
lv_string = lo_result->get_nexttoken( ).