Menu
Amazon Elastic Compute Cloud
API Reference (API Version 2016-11-15)

DescribeHostReservations

Describes Dedicated Host Reservations which are associated with Dedicated Hosts in your account.

Request Parameters

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.

Filter.N

One or more filters.

  • instance-family - The instance family (e.g., m4).

  • payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront).

  • state - The state of the reservation (payment-pending | payment-failed | active | retired).

Type: Array of Filter objects

Required: No

HostReservationIdSet.N

One or more host reservation IDs.

Type: Array of strings

Required: No

MaxResults

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 will receive an error.

Type: Integer

Required: No

NextToken

The token to use to retrieve the next page of results.

Type: String

Required: No

Response Elements

The following elements are returned by the service.

hostReservationSet

Details about the reservation's configuration.

Type: Array of HostReservation objects

nextToken

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Type: String

requestId

The ID of the request.

Type: String

Errors

For information about the errors that are common to all actions, see Common Client Errors.

Example

Example

This example describes the all the Dedicated Host Reservations in your account.

Sample Request

https://ec2.amazonaws.com/?Action=DescribeHostReservations
&AUTHPARAMS

Sample Response

<DescribeHostReservationsResult xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
<requestId>d4904fd9-84c3-4ea5-gtyk-a9983EXAMPLE</requestId>
<hostReservationSet>
    <item>
        <upfrontPrice>0.000</upfrontPrice>
        <count>2</count>
        <start>2016-08-01T15:43:15Z</start>
        <instanceFamily>m4</instanceFamily>
        <offeringId>hro-0875903778903856fg</offeringId>
        <duration>31536000</duration>
        <paymentOption>NoUpfront</paymentOption>
        <end>2017-08-01T15:43:15Z</end>
        <hostReservationId>hr-0875903778903856fg</hostReservationId>
        <state>active</state>
        <hourlyPrice>1.990</hourlyPrice>
        <hostIdSet>
            <item>h-0897086hfkttn</item>
            <item>h-0891346hytrtn</item>
        </hostIdSet>
    </item>
</hostReservationSet>
</DescribeHostReservationsResult>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: