host_reservations
Creates, updates, deletes, gets or lists a host_reservations resource.
Overview
| Name | host_reservations |
| Type | Resource |
| Id | aws.ec2.host_reservations |
Fields
The following fields are returned by SELECT queries:
- describe_host_reservations
| Name | Datatype | Description |
|---|---|---|
count | integer | The number of Dedicated Hosts the reservation is associated with. |
currency_code | string | The currency in which the upfrontPrice and hourlyPrice amounts are specified. At this time, the only supported currency is USD. |
duration | integer | The length of the reservation's term, specified in seconds. Can be 31536000 (1 year) | 94608000 (3 years). |
end | string | The date and time that the reservation ends. |
host_id_set | string | The IDs of the Dedicated Hosts associated with the reservation. |
host_reservation_id | string | The ID of the reservation that specifies the associated Dedicated Hosts. |
hourly_price | string | The hourly price of the reservation. |
instance_family | string | The instance family of the Dedicated Host Reservation. The instance family on the Dedicated Host must be the same in order for it to benefit from the reservation. |
offering_id | string | The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it. |
payment_option | string | The payment option selected for this reservation. |
start | string | The date and time that the reservation started. |
state | string | The state of the reservation. |
tags | string | Any tags assigned to the Dedicated Host Reservation. |
upfront_price | string | The upfront price of the reservation. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_host_reservations | select | region | Filter, HostReservationIdSet, MaxResults, NextToken | Describes reservations that are associated with Dedicated Hosts in your account. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
Filter | array | The filters. instance-family - The instance family (for example, m4). payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront). state - The state of the reservation (payment-pending | payment-failed | active | retired). tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value. tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value. |
HostReservationIdSet | array | The host reservation IDs. |
MaxResults | integer | 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 nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error. |
NextToken | string | The token to use to retrieve the next page of results. |
SELECT examples
- describe_host_reservations
Describes reservations that are associated with Dedicated Hosts in your account.
SELECT
count,
currency_code,
duration,
end,
host_id_set,
host_reservation_id,
hourly_price,
instance_family,
offering_id,
payment_option,
start,
state,
tags,
upfront_price
FROM aws.ec2.host_reservations
WHERE region = '{{ region }}' -- required
AND Filter = '{{ Filter }}'
AND HostReservationIdSet = '{{ HostReservationIdSet }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;