Skip to content

EC2  >  Operations  >  run_scheduled_instances

run_scheduled_instances

Operation

run_scheduled_instances async

run_scheduled_instances(request: RunScheduledInstancesInput | RunScheduledInstancesInputDict, /, *, plugins: list[Plugin] | None = None) -> RunScheduledInstancesOutput
run_scheduled_instances(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[RunScheduledInstancesInputDict]) -> RunScheduledInstancesOutput

Launches the specified Scheduled Instances.

Before you can launch a Scheduled Instance, you must purchase it and obtain an identifier using PurchaseScheduledInstances.

You must launch a Scheduled Instance during its scheduled time period. You can't stop or reboot a Scheduled Instance, but you can terminate it as needed. If you terminate a Scheduled Instance before the current scheduled time period ends, you can launch it again after a few minutes.

Parameters:

Name Type Description Default
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

Returns:

Type Description
RunScheduledInstancesOutput

An instance of RunScheduledInstancesOutput.

Input

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

Model

RunScheduledInstancesInput dataclass

Bases: _SerdeShape

Contains the parameters for RunScheduledInstances.

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.

instance_count class-attribute instance-attribute
instance_count: int | None = ...

The number of instances.

Default: 1

launch_specification class-attribute instance-attribute
launch_specification: ScheduledInstancesLaunchSpecification | None = ...

The launch specification. You must match the instance type, Availability Zone, network, and platform of the schedule that you purchased.

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

The Scheduled Instance ID.

Dictionaries

RunScheduledInstancesInputDict

Bases: TypedDict

Dictionary form of RunScheduledInstancesInput.

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.

instance_count instance-attribute
instance_count: int | None

The number of instances.

Default: 1

launch_specification instance-attribute

The launch specification. You must match the instance type, Availability Zone, network, and platform of the schedule that you purchased.

scheduled_instance_id instance-attribute
scheduled_instance_id: Required[str]

The Scheduled Instance ID.

Output

RunScheduledInstancesOutput dataclass

Bases: _SerdeShape

Contains the output of RunScheduledInstances.

Attributes

instance_id_set class-attribute instance-attribute
instance_id_set: list[str] | None = ...

The IDs of the newly launched instances.

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.