/AWS1/IF_LIS=>LISTINSTANCES()¶
About ListInstances¶
Lists the EC2 instances providing user-based subscriptions.
Method Signature¶
METHODS /AWS1/IF_LIS~LISTINSTANCES
IMPORTING
!IV_MAXRESULTS TYPE /AWS1/LISBOXINTEGER OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/LISSTRING OPTIONAL
!IT_FILTERS TYPE /AWS1/CL_LISFILTER=>TT_FILTERLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lislistinstsresponse
RAISING
/AWS1/CX_LISACCESSDENIEDEX
/AWS1/CX_LISCONFLICTEXCEPTION
/AWS1/CX_LISINTERNALSERVEREX
/AWS1/CX_LISRESOURCENOTFOUNDEX
/AWS1/CX_LISSERVICEQUOTAEXCDEX
/AWS1/CX_LISTHROTTLINGEX
/AWS1/CX_LISVALIDATIONEX
/AWS1/CX_LISCLIENTEXC
/AWS1/CX_LISSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_maxresults TYPE /AWS1/LISBOXINTEGER /AWS1/LISBOXINTEGER¶
The maximum number of results to return from a single request.
iv_nexttoken TYPE /AWS1/LISSTRING /AWS1/LISSTRING¶
A token to specify where to start paginating. This is the nextToken from a previously truncated response.
it_filters TYPE /AWS1/CL_LISFILTER=>TT_FILTERLIST TT_FILTERLIST¶
You can use the following filters to streamline results:
Status
InstanceId
RETURNING¶
oo_output TYPE REF TO /aws1/cl_lislistinstsresponse /AWS1/CL_LISLISTINSTSRESPONSE¶
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->listinstances(
it_filters = VALUE /aws1/cl_lisfilter=>tt_filterlist(
(
new /aws1/cl_lisfilter(
iv_attribute = |string|
iv_operation = |string|
iv_value = |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_instancesummaries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_instanceid( ).
lv_string = lo_row_1->get_status( ).
LOOP AT lo_row_1->get_products( ) 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_laststatuscheckdate( ).
lv_string = lo_row_1->get_statusmessage( ).
lv_string = lo_row_1->get_owneraccountid( ).
lo_identityprovider = lo_row_1->get_identityprovider( ).
IF lo_identityprovider IS NOT INITIAL.
lo_activedirectoryidentity = lo_identityprovider->get_activedirectoryidpvdr( ).
IF lo_activedirectoryidentity IS NOT INITIAL.
lv_directory = lo_activedirectoryidentity->get_directoryid( ).
lo_activedirectorysettings = lo_activedirectoryidentity->get_activedirectorysettings( ).
IF lo_activedirectorysettings IS NOT INITIAL.
lv_string = lo_activedirectorysettings->get_domainname( ).
LOOP AT lo_activedirectorysettings->get_domainipv4list( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_ipv4 = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_activedirectorysettings->get_domainipv6list( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_ipv6 = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
lo_credentialsprovider = lo_activedirectorysettings->get_domaincredsprovider( ).
IF lo_credentialsprovider IS NOT INITIAL.
lo_secretsmanagercredentia = lo_credentialsprovider->get_secretsmanagercredspvdr( ).
IF lo_secretsmanagercredentia IS NOT INITIAL.
lv_string = lo_secretsmanagercredentia->get_secretid( ).
ENDIF.
ENDIF.
lo_domainnetworksettings = lo_activedirectorysettings->get_domainnetworksettings( ).
IF lo_domainnetworksettings IS NOT INITIAL.
LOOP AT lo_domainnetworksettings->get_subnets( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_subnet = lo_row_9->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lv_activedirectorytype = lo_activedirectoryidentity->get_activedirectorytype( ).
lv_boolean = lo_activedirectoryidentity->get_issharedactivedirectory( ).
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nexttoken( ).
ENDIF.