Skip to content

purchase_scheduled_instances

Operation

purchase_scheduled_instances

purchase_scheduled_instances(request: PurchaseScheduledInstancesInput | PurchaseScheduledInstancesInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[PurchaseScheduledInstancesInputDict]) -> PurchaseScheduledInstancesOutput
Note

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:

Name Type Description Default
request PurchaseScheduledInstancesInput | PurchaseScheduledInstancesInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[PurchaseScheduledInstancesInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
PurchaseScheduledInstancesOutput

An instance of PurchaseScheduledInstancesOutput.

purchase_scheduled_instances async

purchase_scheduled_instances(request: PurchaseScheduledInstancesInput | PurchaseScheduledInstancesInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[PurchaseScheduledInstancesInputDict]) -> PurchaseScheduledInstancesOutput
Note

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:

Name Type Description Default
request PurchaseScheduledInstancesInput | PurchaseScheduledInstancesInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[PurchaseScheduledInstancesInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
PurchaseScheduledInstancesOutput

An instance of PurchaseScheduledInstancesOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

PurchaseScheduledInstancesInputDict

Bases: TypedDict

Dictionary form of PurchaseScheduledInstancesInput.

Attributes

client_token instance-attribute
client_token: str | None

Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see Ensuring Idempotency.

This field is autopopulated if not provided.

dry_run instance-attribute
dry_run: bool | 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 is UnauthorizedOperation.

purchase_requests instance-attribute

The purchase requests.

PurchaseScheduledInstancesInput dataclass

Bases: _SerdeShape

Contains the parameters for PurchaseScheduledInstances.

Attributes

client_token class-attribute instance-attribute
client_token: str | None = ...

Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see Ensuring Idempotency.

This field is autopopulated if not provided.

dry_run class-attribute instance-attribute
dry_run: bool | 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 is UnauthorizedOperation.

purchase_requests class-attribute instance-attribute
purchase_requests: list[PurchaseRequest] | None = ...

The purchase requests.

Output

PurchaseScheduledInstancesOutput dataclass

Bases: _SerdeShape

Contains the output of PurchaseScheduledInstances.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

scheduled_instance_set class-attribute instance-attribute
scheduled_instance_set: list[ScheduledInstance] | None = ...

Information about the Scheduled Instances.