Selecione suas preferências de cookies

Usamos cookies essenciais e ferramentas semelhantes que são necessárias para fornecer nosso site e serviços. Usamos cookies de desempenho para coletar estatísticas anônimas, para que possamos entender como os clientes usam nosso site e fazer as devidas melhorias. Cookies essenciais não podem ser desativados, mas você pode clicar em “Personalizar” ou “Recusar” para recusar cookies de desempenho.

Se você concordar, a AWS e terceiros aprovados também usarão cookies para fornecer recursos úteis do site, lembrar suas preferências e exibir conteúdo relevante, incluindo publicidade relevante. Para aceitar ou recusar todos os cookies não essenciais, clique em “Aceitar” ou “Recusar”. Para fazer escolhas mais detalhadas, clique em “Personalizar”.

GetHostReservationPurchasePreview - Amazon Elastic Compute Cloud
Esta página não foi traduzida para seu idioma. Solicitar tradução

GetHostReservationPurchasePreview

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.

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.

HostIdSet.N

The IDs of the Dedicated Hosts with which the reservation is associated.

Type: Array of strings

Required: Yes

OfferingId

The offering ID of the reservation.

Type: String

Required: Yes

Response Elements

The following elements are returned by the service.

currencyCode

The currency in which the totalUpfrontPrice and totalHourlyPrice amounts are specified. At this time, the only supported currency is USD.

Type: String

Valid Values: USD

purchase

The purchase information of the Dedicated Host reservation and the Dedicated Hosts associated with it.

Type: Array of Purchase objects

requestId

The ID of the request.

Type: String

totalHourlyPrice

The potential total hourly price of the reservation per hour.

Type: String

totalUpfrontPrice

The potential total upfront price. This is billed immediately.

Type: String

Errors

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

Examples

Example

This example is a preview of the reservation to be purchased.

Sample Request

https://ec2.amazonaws.com/?Action=GetHostReservationPurchasePreview &OfferingId=hro-0eb3541dght849c2d &HostIdSet=h-0fgr9ddb0ecd0a1cd &AUTHPARAMS

Sample Response

<GetHostReservationPurchasePreviewResult xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>d4904fd9-84c3-4967-gtyk-a9983EXAMPLE</requestId> <purchase> <item> <duration>31536000</duration> <upfrontPrice>7453.000</upfrontPrice> <paymentOption>PartialUpfront</paymentOption> <instanceFamily>m4</instanceFamily> <hourlyPrice>0.850</hourlyPrice> <hostIdSet> <item>h-0fgr9ddb0ecd0a1cd</item> </hostIdSet> </item> </purchase> <totalHourlyPrice>0.850<totalHourlyPrice> <totalUpfrontPrice>7453.000<totalUpfrontPrice> </GetHostReservationPurchasePreviewResult>

See Also

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

PrivacidadeTermos do sitePreferências de cookies
© 2025, Amazon Web Services, Inc. ou suas afiliadas. Todos os direitos reservados.