/AWS1/IF_LIX=>LISTLINUXSUBSCRIPTIONINSTS()¶
About ListLinuxSubscriptionInstances¶
Lists the running Amazon EC2 instances that were discovered with commercial Linux subscriptions.
Method Signature¶
METHODS /AWS1/IF_LIX~LISTLINUXSUBSCRIPTIONINSTS
IMPORTING
!IT_FILTERS TYPE /AWS1/CL_LIXFILTER=>TT_FILTERLIST OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/LIXBOXINTEGER OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/LIXSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lixlstlinuxsubscrip01
RAISING
/AWS1/CX_LIXINTERNALSERVEREX
/AWS1/CX_LIXTHROTTLINGEX
/AWS1/CX_LIXVALIDATIONEX
/AWS1/CX_LIXCLIENTEXC
/AWS1/CX_LIXSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
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
Regionin theName, with thecontainsoperator to list all subscriptions that match a partial string in theValue, such asus-west.For each filter, you can specify one of the following values for the
Namekey to streamline results:
AccountID
AmiID
DualSubscription
InstanceID
InstanceType
ProductCode
Region
Status
UsageOperationFor each filter, you can use one of the following
Operatorvalues 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->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
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_instances( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
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.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_value( ).
ENDIF.
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( ).
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nexttoken( ).
ENDIF.