/AWS1/IF_MDX=>LISTRESERVATIONS()¶
About ListReservations¶
Displays a list of all reservations that have been purchased by this account in the current Amazon Web Services Region. This list includes all reservations in all states (such as active and expired).
Method Signature¶
METHODS /AWS1/IF_MDX~LISTRESERVATIONS
IMPORTING
!IV_MAXRESULTS TYPE /AWS1/MDXMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/MDXSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mdxlistrsvresponse
RAISING
/AWS1/CX_MDXBADREQUESTEX
/AWS1/CX_MDXINTERNALSERVERER00
/AWS1/CX_MDXSERVICEUNAVAILEX
/AWS1/CX_MDXTOOMANYREQUESTSEX
/AWS1/CX_MDXCLIENTEXC
/AWS1/CX_MDXSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_maxresults TYPE /AWS1/MDXMAXRESULTS /AWS1/MDXMAXRESULTS¶
The maximum number of results to return per API request.
For example, you submit a
ListReservationsrequest withMaxResultsset at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.)The service might return fewer results than the
MaxResultsvalue. IfMaxResultsis not included in the request, the service defaults to pagination with a maximum of 10 results per page.
iv_nexttoken TYPE /AWS1/MDXSTRING /AWS1/MDXSTRING¶
The token that identifies the batch of results that you want to see.
For example, you submit a
ListReservationsrequest withMaxResultsset at 5. The service returns the first batch of results (up to 5) and aNextTokenvalue. To see the next batch of results, you can submit theListOfferingsrequest a second time and specify theNextTokenvalue.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_mdxlistrsvresponse /AWS1/CL_MDXLISTRSVRESPONSE¶
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->listreservations(
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.
lv_string = lo_result->get_nexttoken( ).
LOOP AT lo_result->get_reservations( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_currencycode( ).
lv_integer = lo_row_1->get_duration( ).
lv_durationunits = lo_row_1->get_durationunits( ).
lv_string = lo_row_1->get_end( ).
lv_string = lo_row_1->get_offeringarn( ).
lv_string = lo_row_1->get_offeringdescription( ).
lv_string = lo_row_1->get_priceperunit( ).
lv_priceunits = lo_row_1->get_priceunits( ).
lv_string = lo_row_1->get_reservationarn( ).
lv_string = lo_row_1->get_reservationname( ).
lv_reservationstate = lo_row_1->get_reservationstate( ).
lo_resourcespecification = lo_row_1->get_resourcespecification( ).
IF lo_resourcespecification IS NOT INITIAL.
lv_integer = lo_resourcespecification->get_reservedbitrate( ).
lv_resourcetype = lo_resourcespecification->get_resourcetype( ).
ENDIF.
lv_string = lo_row_1->get_start( ).
ENDIF.
ENDLOOP.
ENDIF.