purchase_scheduled_instances
¶
purchase_scheduled_instances(
*,
config_overrides: Optional[EC2ClientConfig] = None,
client_token: Optional[String] = None,
dry_run: Optional[Boolean] = None,
purchase_requests: Optional[PurchaseRequestSet] = None,
) -> PurchaseScheduledInstancesResult
You can no longer purchase Scheduled Instances.
Purchases the Scheduled Instances with the specified schedule.
Scheduled Instances enable you to purchase Amazon EC2 compute capacity by the hour for a one-year term. Before you can purchase a Scheduled Instance, you must call DescribeScheduledInstanceAvailability to check for available schedules and obtain a purchase token. After you purchase a Scheduled Instance, you must call RunScheduledInstances during each scheduled time period.
After you purchase a Scheduled Instance, you can't cancel, modify, or resell your purchase.
Parameters:
-
client_token(Optional[String], default:None) –Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see Ensuring Idempotency.
-
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. -
purchase_requests(Optional[PurchaseRequestSet], default:None) –The purchase requests.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
55874 55875 55876 55877 55878 55879 55880 55881 55882 55883 55884 55885 55886 55887 55888 55889 55890 55891 55892 55893 55894 55895 55896 55897 55898 55899 55900 55901 55902 55903 55904 55905 55906 55907 55908 55909 55910 55911 55912 55913 55914 55915 55916 55917 55918 55919 55920 55921 55922 55923 55924 55925 55926 55927 | |