purchase_host_reservation
¶
purchase_host_reservation(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
55738 55739 55740 55741 55742 55743 55744 55745 55746 55747 55748 55749 55750 55751 55752 55753 55754 55755 55756 55757 55758 55759 55760 55761 55762 55763 55764 55765 55766 55767 55768 55769 55770 55771 55772 55773 55774 55775 55776 55777 55778 55779 55780 55781 55782 55783 55784 55785 55786 55787 55788 55789 55790 55791 55792 55793 55794 55795 55796 55797 55798 55799 55800 55801 55802 55803 55804 55805 55806 55807 55808 | |