host_reservation_purchase_previews
Creates, updates, deletes, gets or lists a host_reservation_purchase_previews resource.
Overview
| Name | host_reservation_purchase_previews |
| Type | Resource |
| Id | aws.ec2.host_reservation_purchase_previews |
Fields
The following fields are returned by SELECT queries:
- get_host_reservation_purchase_preview
| Name | Datatype | Description |
|---|---|---|
currency_code | string | The currency in which the totalUpfrontPrice and totalHourlyPrice amounts are specified. At this time, the only supported currency is USD. |
purchase | string | The purchase information of the Dedicated Host reservation and the Dedicated Hosts associated with it. |
total_hourly_price | string | The potential total hourly price of the reservation per hour. |
total_upfront_price | string | The potential total upfront price. This is billed immediately. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_host_reservation_purchase_preview | select | HostIdSet, OfferingId, region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
HostIdSet | array | The IDs of the Dedicated Hosts with which the reservation is associated. |
OfferingId | string | The offering ID of the reservation. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_host_reservation_purchase_preview
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
;