purchase_reserved_instances_offering
¶
purchase_reserved_instances_offering(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
55810 55811 55812 55813 55814 55815 55816 55817 55818 55819 55820 55821 55822 55823 55824 55825 55826 55827 55828 55829 55830 55831 55832 55833 55834 55835 55836 55837 55838 55839 55840 55841 55842 55843 55844 55845 55846 55847 55848 55849 55850 55851 55852 55853 55854 55855 55856 55857 55858 55859 55860 55861 55862 55863 55864 55865 55866 55867 55868 55869 55870 55871 55872 | |