describe_host_reservations
(**kwargs)¶Describes reservations that are associated with Dedicated Hosts in your account.
See also: AWS API Documentation
Request Syntax
response = client.describe_host_reservations(
Filters=[
{
'Name': 'string',
'Values': [
'string',
]
},
],
HostReservationIdSet=[
'string',
],
MaxResults=123,
NextToken='string'
)
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.A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.
If you specify multiple filters, the filters are joined with an AND
, and the request returns only results that match all of the specified filters.
The name of the filter. Filter names are case-sensitive.
The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR
, and the request returns all results that match any of the specified values.
The host reservation IDs.
nextToken
value. This value can be between 5 and 500. If maxResults
is given a larger value than 500, you receive an error.dict
Response Syntax
{
'HostReservationSet': [
{
'Count': 123,
'CurrencyCode': 'USD',
'Duration': 123,
'End': datetime(2015, 1, 1),
'HostIdSet': [
'string',
],
'HostReservationId': 'string',
'HourlyPrice': 'string',
'InstanceFamily': 'string',
'OfferingId': 'string',
'PaymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront',
'Start': datetime(2015, 1, 1),
'State': 'payment-pending'|'payment-failed'|'active'|'retired',
'UpfrontPrice': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
HostReservationSet (list) --
Details about the reservation's configuration.
(dict) --
Details about the Dedicated Host Reservation and associated Dedicated Hosts.
Count (integer) --
The number of Dedicated Hosts the reservation is associated with.
CurrencyCode (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 (datetime) --
The date and time that the reservation ends.
HostIdSet (list) --
The IDs of the Dedicated Hosts associated with the reservation.
HostReservationId (string) --
The ID of the reservation that specifies the associated Dedicated Hosts.
HourlyPrice (string) --
The hourly price of the reservation.
InstanceFamily (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.
OfferingId (string) --
The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.
PaymentOption (string) --
The payment option selected for this reservation.
Start (datetime) --
The date and time that the reservation started.
State (string) --
The state of the reservation.
UpfrontPrice (string) --
The upfront price of the reservation.
Tags (list) --
Any tags assigned to the Dedicated Host Reservation.
(dict) --
Describes a tag.
Key (string) --
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:
.
Value (string) --
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.
NextToken (string) --
The token to use to retrieve the next page of results. This value is null
when there are no more results to return.