选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

DescribeHostReservationOfferings - Amazon Elastic Compute Cloud
此页面尚未翻译为您的语言。 请求翻译

DescribeHostReservationOfferings

Describes the Dedicated Host reservations that are available to purchase.

The results describe all of the Dedicated Host reservation offerings, including offerings that might not match the instance family and Region of your Dedicated Hosts. When purchasing an offering, ensure that the instance family and Region of the offering matches that of the Dedicated Hosts with which it is to be associated. For more information about supported instance types, see Dedicated Hosts in the Amazon EC2 User Guide.

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

The filters.

  • instance-family - The instance family of the offering (for example, m4).

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

Type: Array of Filter objects

Required: No

MaxDuration

This is the maximum duration of the reservation to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 94608000 for three years.

Type: Integer

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

Type: Integer

Valid Range: Minimum value of 5. Maximum value of 500.

Required: No

MinDuration

This is the minimum duration of the reservation you'd like to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 31536000 for one year.

Type: Integer

Required: No

NextToken

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

Type: String

Required: No

OfferingId

The ID of the reservation offering.

Type: String

Required: No

Response Elements

The following elements are returned by the service.

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

offeringSet

Information about the offerings.

Type: Array of HostOffering objects

requestId

The ID of the request.

Type: String

Errors

For information about the errors that are common to all actions, see Common client error codes.

Examples

Example 1

This example describes all of the Dedicated Host Reservation offerings.

Sample Request

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

Sample Response

<DescribeHostReservationOfferingsResult xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>d4904fd9-84c3-4ea5-gtyk-a9cc3EXAMPLE</requestId> <offeringSet> <item> <duration>94608000</duration> <upfrontPrice>28396.000</upfrontPrice> <paymentOption>AllUpfront</paymentOption> <instanceFamily>m4</instanceFamily> <offeringId>hro-0875903788203856fg</offeringId> <hourlyPrice>0.000</hourlyPrice> </item> <item> <duration>31536000</duration> <upfrontPrice>13603.000</upfrontPrice> <paymentOption>AllUpfront</paymentOption> <instanceFamily>r3</instanceFamily> <offeringId>hro-08ddfitlb8990hhkmp</offeringId> <hourlyPrice>0.000</hourlyPrice> </item> <item> <duration>94608000</duration> <upfrontPrice>57382.000</upfrontPrice> <paymentOption>PartialUpfront</paymentOption> <instanceFamily>x1</instanceFamily> <offeringId>hro-0875903788207657fg</offeringId> <hourlyPrice>2.183</hourlyPrice> </item> </offeringSet> </DescribeHostReservationOfferingsResult>

Example 2

This example describes all of the Dedicated Host reservation offerings, with a maximum duration of three years, that are available to purchase.

Sample Request

https://ec2.amazonaws.com/?Action=DescribeHostReservationOfferings &MaxDuration=94608000 &AUTHPARAMS

Sample Response

<DescribeHostReservationOfferingsResult xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>d4905678-84c3-4ea5-gtyk-a9cc3EXAMPLE</requestId> <offeringSet> <item> <duration>31536000</duration> <upfrontPrice>4879.000</upfrontPrice> <paymentOption>PartialUpfront</paymentOption> <instanceFamily>c3</instanceFamily> <offeringId>hro-7890903788203856fg</offeringId> <hourlyPrice>0.557</hourlyPrice> </item> <item> <duration>94608000</duration> <upfrontPrice>18892.000</upfrontPrice> <paymentOption>AllUpfront</paymentOption> <instanceFamily>c4</instanceFamily> <offeringId>hro-1092903788203856fg</offeringId> <hourlyPrice>0.000</hourlyPrice> </item> </offeringSet> </DescribeHostReservationOfferingsResult>

See Also

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

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。