/AWS1/IF_EC2=>DSCHOSTRESERVATIONOFFERINGS()¶
About DescribeHostReservationOfferings¶
Describes the Dedicated Host reservations that are available to purchase.
The results describe all of the Dedicated Host reservation offerings, including offerings that might not match the instance family and Region of your Dedicated Hosts. When purchasing an offering, ensure that the instance family and Region of the offering matches that of the Dedicated Hosts with which it is to be associated. For more information about supported instance types, see Dedicated Hosts in the Amazon EC2 User Guide.
Method Signature¶
METHODS /AWS1/IF_EC2~DSCHOSTRESERVATIONOFFERINGS
IMPORTING
!IT_FILTER TYPE /AWS1/CL_EC2FILTER=>TT_FILTERLIST OPTIONAL
!IV_MAXDURATION TYPE /AWS1/EC2INTEGER OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/EC2DESCRHOSTRSVMAXRSLTS OPTIONAL
!IV_MINDURATION TYPE /AWS1/EC2INTEGER OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/EC2STRING OPTIONAL
!IV_OFFERINGID TYPE /AWS1/EC2OFFERINGID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ec2dschostreservati01
RAISING
/AWS1/CX_EC2CLIENTEXC
/AWS1/CX_EC2SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
it_filter TYPE /AWS1/CL_EC2FILTER=>TT_FILTERLIST TT_FILTERLIST¶
The filters.
instance-family- The instance family of the offering (for example,m4).
payment-option- The payment option (NoUpfront|PartialUpfront|AllUpfront).
iv_maxduration TYPE /AWS1/EC2INTEGER /AWS1/EC2INTEGER¶
This is the maximum duration of the reservation to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 94608000 for three years.
iv_maxresults TYPE /AWS1/EC2DESCRHOSTRSVMAXRSLTS /AWS1/EC2DESCRHOSTRSVMAXRSLTS¶
The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned
nextTokenvalue. This value can be between 5 and 500. IfmaxResultsis given a larger value than 500, you receive an error.
iv_minduration TYPE /AWS1/EC2INTEGER /AWS1/EC2INTEGER¶
This is the minimum duration of the reservation you'd like to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 31536000 for one year.
iv_nexttoken TYPE /AWS1/EC2STRING /AWS1/EC2STRING¶
The token to use to retrieve the next page of results.
iv_offeringid TYPE /AWS1/EC2OFFERINGID /AWS1/EC2OFFERINGID¶
The ID of the reservation offering.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ec2dschostreservati01 /AWS1/CL_EC2DSCHOSTRESERVATI01¶
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->dschostreservationofferings(
it_filter = VALUE /aws1/cl_ec2filter=>tt_filterlist(
(
new /aws1/cl_ec2filter(
it_values = VALUE /aws1/cl_ec2valuestringlist_w=>tt_valuestringlist(
( new /aws1/cl_ec2valuestringlist_w( |string| ) )
)
iv_name = |string|
)
)
)
iv_maxduration = 123
iv_maxresults = 123
iv_minduration = 123
iv_nexttoken = |string|
iv_offeringid = |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_offeringset( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_currencycodevalues = lo_row_1->get_currencycode( ).
lv_integer = lo_row_1->get_duration( ).
lv_string = lo_row_1->get_hourlyprice( ).
lv_string = lo_row_1->get_instancefamily( ).
lv_offeringid = lo_row_1->get_offeringid( ).
lv_paymentoption = lo_row_1->get_paymentoption( ).
lv_string = lo_row_1->get_upfrontprice( ).
ENDIF.
ENDLOOP.
ENDIF.