Preview a reservation purchase with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation.
This is a preview of the PurchaseHostReservation action and does not result in the offering being purchased.
The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.
The ID/s of the Dedicated Host/s that the reservation will be associated with.
Type: array of Strings
The offering ID of the reservation.
The following elements are returned by the service.
The currency in which the
totalHourlyPriceamounts are specified. At this time, the only supported currency is
The purchase information of the Dedicated Host Reservation and the Dedicated Hosts associated with it.
Type: array of Purchase objects
The ID of the request.
The potential total hourly price of the reservation per hour.
The potential total upfront price. This is billed immediately.
For information about the errors that are common to all actions, see Common Errors.
This example is a preview of the reservation that will be purchased.
https://ec2.amazonaws.com/?Action=GetHostReservationPurchasePreview &OfferingId=hro-0eb3541dght849c2d &HostIdSet=h-0fgr9ddb0ecd0a1cd &AUTHPARAMS
<GetHostReservationPurchasePreviewResult xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>d4904fd9-84c3-4967-gtyk-a9983EXAMPLE</requestId> <purchase> <item> <duration>31536000</duration> <upfrontPrice>7453.000</upfrontPrice> <paymentOption>PartialUpfront</paymentOption> <instanceFamily>m4</instanceFamily> <hourlyPrice>0.850</hourlyPrice> <hostIdSet> <item>h-0fgr9ddb0ecd0a1cd</item> </hostIdSet> </item> </purchase> <totalHourlyPrice>0.850<totalHourlyPrice> <totalUpfrontPrice>7453.000<totalUpfrontPrice> </GetHostReservationPurchasePreviewResult>
For more information about using this API in one of the language-specific AWS SDKs, see the following: