Skip to main content

host_reservation_purchase_previews

Creates, updates, deletes, gets or lists a host_reservation_purchase_previews resource.

Overview

Namehost_reservation_purchase_previews
TypeResource
Idaws.ec2.host_reservation_purchase_previews

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
currency_codestringThe currency in which the totalUpfrontPrice and totalHourlyPrice amounts are specified. At this time, the only supported currency is USD.
purchasestringThe purchase information of the Dedicated Host reservation and the Dedicated Hosts associated with it.
total_hourly_pricestringThe potential total hourly price of the reservation per hour.
total_upfront_pricestringThe potential total upfront price. This is billed immediately.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_host_reservation_purchase_previewselectHostIdSet, OfferingId, regionPreview 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
HostIdSetarrayThe IDs of the Dedicated Hosts with which the reservation is associated.
OfferingIdstringThe offering ID of the reservation.
regionstringAWS region (default: us-east-1)

SELECT examples

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.

SELECT
currency_code,
purchase,
total_hourly_price,
total_upfront_price
FROM aws.ec2.host_reservation_purchase_previews
WHERE HostIdSet = '{{ HostIdSet }}' -- required
AND OfferingId = '{{ OfferingId }}' -- required
AND region = '{{ region }}' -- required
;