purchase_reserved_instances_offering
async
¶
purchase_reserved_instances_offering(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
instance_count: Optional[Integer] = None,
reserved_instances_offering_id: Optional[ReservedInstancesOfferingId] = None,
purchase_time: Optional[DateTime] = None,
dry_run: Optional[Boolean] = None,
limit_price: Optional[ReservedInstanceLimitPrice] = None,
) -> PurchaseReservedInstancesOfferingResult
Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower hourly rate compared to On-Demand instance pricing.
Use DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with DescribeReservedInstances.
To queue a purchase for a future date and time, specify a purchase time. If you do not specify a purchase time, the default is the current time.
For more information, see Reserved Instances and Sell in the Reserved Instance Marketplace in the Amazon EC2 User Guide.
Parameters:
-
instance_count(Optional[Integer], default:None) –The number of Reserved Instances to purchase.
-
reserved_instances_offering_id(Optional[ReservedInstancesOfferingId], default:None) –The ID of the Reserved Instance offering to purchase.
-
purchase_time(Optional[DateTime], default:None) –The time at which to purchase the Reserved Instance, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
-
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation. -
limit_price(Optional[ReservedInstanceLimitPrice], default:None) –Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
56587 56588 56589 56590 56591 56592 56593 56594 56595 56596 56597 56598 56599 56600 56601 56602 56603 56604 56605 56606 56607 56608 56609 56610 56611 56612 56613 56614 56615 56616 56617 56618 56619 56620 56621 56622 56623 56624 56625 56626 56627 56628 56629 56630 56631 56632 56633 56634 56635 56636 56637 56638 56639 56640 56641 56642 56643 56644 56645 56646 56647 56648 56649 56650 | |