Skip to content

EC2  >  Structures  >  SpotInstanceRequest

SpotInstanceRequest

Structure Class

SpotInstanceRequest dataclass

Bases: _SerdeShape

Describes a Spot Instance request.

Attributes

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

Deprecated.

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

The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

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

Deprecated.

create_time class-attribute instance-attribute
create_time: datetime | None = ...

The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

fault class-attribute instance-attribute
fault: SpotInstanceStateFault | None = ...

The fault codes for the Spot Instance request, if any.

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

The instance ID, if an instance has been launched to fulfill the Spot Instance request.

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

The behavior when a Spot Instance is interrupted.

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

The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

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

Additional information for launching instances.

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

The Availability Zone in which the request is launched.

Either launchedAvailabilityZone or launchedAvailabilityZoneId can be specified, but not both

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

The ID of the Availability Zone in which the request is launched.

Either launchedAvailabilityZone or launchedAvailabilityZoneId can be specified, but not both

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

The product description associated with the Spot Instance.

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

The ID of the Spot Instance request.

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

The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

Warning

If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

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

The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide.

status class-attribute instance-attribute
status: SpotInstanceStatus | None = ...

The status code and status message describing the Spot Instance request.

tags class-attribute instance-attribute
tags: list[Tag] | None = ...

Any tags assigned to the resource.

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

The Spot Instance request type.

valid_from class-attribute instance-attribute
valid_from: datetime | None = ...

The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.

valid_until class-attribute instance-attribute
valid_until: datetime | None = ...

The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).

  • For a persistent request, the request remains active until the validUntil date and time is reached. Otherwise, the request remains active until you cancel it.

  • For a one-time request, the request remains active until all instances launch, the request is canceled, or the validUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.