purchase_host_reservation
async
¶
purchase_host_reservation(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
client_token: Optional[String] = None,
currency_code: Optional[CurrencyCodeValues] = None,
host_id_set: Optional[RequestHostIdSet] = None,
limit_price: Optional[String] = None,
offering_id: Optional[OfferingId] = None,
tag_specifications: Optional[TagSpecificationList] = None,
) -> PurchaseHostReservationResult
Purchase a reservation with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation. This action results in the specified reservation being purchased and charged to your account.
Parameters:
-
client_token(Optional[String], default:None) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
-
currency_code(Optional[CurrencyCodeValues], default:None) –The currency in which the
totalUpfrontPrice,LimitPrice, andtotalHourlyPriceamounts are specified. At this time, the only supported currency isUSD. -
host_id_set(Optional[RequestHostIdSet], default:None) –The IDs of the Dedicated Hosts with which the reservation will be associated.
-
limit_price(Optional[String], default:None) –The specified limit is checked against the total upfront cost of the reservation (calculated as the offering's upfront cost multiplied by the host count). If the total upfront cost is greater than the specified price limit, the request fails. This is used to ensure that the purchase does not exceed the expected upfront cost of the purchase. At this time, the only supported currency is
USD. For example, to indicate a limit price of USD 100, specify 100.00. -
offering_id(Optional[OfferingId], default:None) –The ID of the offering.
-
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to apply to the Dedicated Host Reservation during purchase.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
56514 56515 56516 56517 56518 56519 56520 56521 56522 56523 56524 56525 56526 56527 56528 56529 56530 56531 56532 56533 56534 56535 56536 56537 56538 56539 56540 56541 56542 56543 56544 56545 56546 56547 56548 56549 56550 56551 56552 56553 56554 56555 56556 56557 56558 56559 56560 56561 56562 56563 56564 56565 56566 56567 56568 56569 56570 56571 56572 56573 56574 56575 56576 56577 56578 56579 56580 56581 56582 56583 56584 56585 | |