Skip to content

EC2  >  Operations  >  get_host_reservation_purchase_preview

get_host_reservation_purchase_preview

Operation

get_host_reservation_purchase_preview async

get_host_reservation_purchase_preview(request: GetHostReservationPurchasePreviewInput | GetHostReservationPurchasePreviewInputDict, /, *, plugins: list[Plugin] | None = None) -> GetHostReservationPurchasePreviewOutput
get_host_reservation_purchase_preview(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetHostReservationPurchasePreviewInputDict]) -> GetHostReservationPurchasePreviewOutput

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.

Parameters:

Name Type Description Default
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetHostReservationPurchasePreviewOutput

An instance of GetHostReservationPurchasePreviewOutput.

Input

Pass the input fields as keyword arguments, or pass a model or dictionary as the first positional argument. Pass plugins separately as a keyword argument.

Model

GetHostReservationPurchasePreviewInput dataclass

Bases: _SerdeShape

Dataclass for GetHostReservationPurchasePreviewInput structure.

Attributes
host_id_set class-attribute instance-attribute
host_id_set: list[str] | None = ...

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

offering_id class-attribute instance-attribute
offering_id: str | None = ...

The offering ID of the reservation.

Dictionaries

GetHostReservationPurchasePreviewInputDict

Bases: TypedDict

Dictionary form of GetHostReservationPurchasePreviewInput.

Attributes
host_id_set instance-attribute
host_id_set: Required[Sequence[str]]

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

offering_id instance-attribute
offering_id: Required[str]

The offering ID of the reservation.

Output

GetHostReservationPurchasePreviewOutput dataclass

Bases: _SerdeShape

Dataclass for GetHostReservationPurchasePreviewOutput structure.

Attributes

currency_code class-attribute instance-attribute
currency_code: str | None = ...

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

purchase class-attribute instance-attribute
purchase: list[Purchase] | None = ...

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

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

total_hourly_price class-attribute instance-attribute
total_hourly_price: str | None = ...

The potential total hourly price of the reservation per hour.

total_upfront_price class-attribute instance-attribute
total_upfront_price: str | None = ...

The potential total upfront price. This is billed immediately.