Skip to content

SpotInstanceRequest

Source code in docs_src/capo_ec2/types/spot_instance_request.py
class SpotInstanceRequest(TypedDict, closed=True):
    actual_block_hourly_price: NotRequired["capo_ec2.types.string.String"]
    """<p>Deprecated.</p>"""
    availability_zone_group: NotRequired["capo_ec2.types.string.String"]
    """<p>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.</p>"""
    block_duration_minutes: NotRequired["capo_ec2.types.integer.Integer"]
    """<p>Deprecated.</p>"""
    create_time: NotRequired["capo_ec2.types.date_time.DateTime"]
    """<p>The date and time when the Spot Instance request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>"""
    fault: NotRequired[
        "capo_ec2.types.spot_instance_state_fault.SpotInstanceStateFault"
    ]
    """<p>The fault codes for the Spot Instance request, if any.</p>"""
    instance_id: NotRequired["capo_ec2.types.instance_id.InstanceId"]
    """<p>The instance ID, if an instance has been launched to fulfill the Spot Instance request.</p>"""
    launch_group: NotRequired["capo_ec2.types.string.String"]
    """<p>The instance launch group. Launch groups are Spot Instances that launch together and terminate together.</p>"""
    launch_specification: NotRequired[
        "capo_ec2.types.launch_specification.LaunchSpecification"
    ]
    """<p>Additional information for launching instances.</p>"""
    launched_availability_zone: NotRequired["capo_ec2.types.string.String"]
    """<p>The Availability Zone in which the request is launched.</p> <p>Either <code>launchedAvailabilityZone</code> or <code>launchedAvailabilityZoneId</code> can be specified, but not both</p>"""
    launched_availability_zone_id: NotRequired["capo_ec2.types.string.String"]
    """<p>The ID of the Availability Zone in which the request is launched.</p> <p>Either <code>launchedAvailabilityZone</code> or <code>launchedAvailabilityZoneId</code> can be specified, but not both</p>"""
    product_description: NotRequired[
        "capo_ec2.types.ri_product_description.RIProductDescription"
    ]
    """<p>The product description associated with the Spot Instance.</p>"""
    spot_instance_request_id: NotRequired["capo_ec2.types.string.String"]
    """<p>The ID of the Spot Instance request.</p>"""
    spot_price: NotRequired["capo_ec2.types.string.String"]
    """<p>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.</p> <important> <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p> </important>"""
    state: NotRequired["capo_ec2.types.spot_instance_state.SpotInstanceState"]
    """<p>The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html">Spot request status</a> in the <i>Amazon EC2 User Guide</i>.</p>"""
    status: NotRequired["capo_ec2.types.spot_instance_status.SpotInstanceStatus"]
    """<p>The status code and status message describing the Spot Instance request.</p>"""
    tags: NotRequired["capo_ec2.types.tag_list.TagList"]
    """<p>Any tags assigned to the resource.</p>"""
    type: NotRequired["capo_ec2.types.spot_instance_type.SpotInstanceType"]
    """<p>The Spot Instance request type.</p>"""
    valid_from: NotRequired["capo_ec2.types.date_time.DateTime"]
    """<p>The start date of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request becomes active at this date and time.</p>"""
    valid_until: NotRequired["capo_ec2.types.date_time.DateTime"]
    """<p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p> <ul> <li> <p>For a persistent request, the request remains active until the <code>validUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it. </p> </li> <li> <p>For a one-time request, the request remains active until all instances launch, the request is canceled, or the <code>validUntil</code> date and time is reached. By default, the request is valid for 7 days from the date the request was created.</p> </li> </ul>"""
    instance_interruption_behavior: NotRequired[
        "capo_ec2.types.instance_interruption_behavior.InstanceInterruptionBehavior"
    ]
    """<p>The behavior when a Spot Instance is interrupted.</p>"""

actual_block_hourly_price instance-attribute

actual_block_hourly_price: NotRequired[String]

Deprecated.

availability_zone_group instance-attribute

availability_zone_group: NotRequired[String]

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 instance-attribute

block_duration_minutes: NotRequired[Integer]

Deprecated.

create_time instance-attribute

create_time: NotRequired[DateTime]

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

fault instance-attribute

fault: NotRequired[SpotInstanceStateFault]

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

instance_id instance-attribute

instance_id: NotRequired[InstanceId]

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

instance_interruption_behavior instance-attribute

instance_interruption_behavior: NotRequired[InstanceInterruptionBehavior]

The behavior when a Spot Instance is interrupted.

launch_group instance-attribute

launch_group: NotRequired[String]

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

launch_specification instance-attribute

launch_specification: NotRequired[LaunchSpecification]

Additional information for launching instances.

launched_availability_zone instance-attribute

launched_availability_zone: NotRequired[String]

The Availability Zone in which the request is launched.

Either launchedAvailabilityZone or launchedAvailabilityZoneId can be specified, but not both

launched_availability_zone_id instance-attribute

launched_availability_zone_id: NotRequired[String]

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

Either launchedAvailabilityZone or launchedAvailabilityZoneId can be specified, but not both

product_description instance-attribute

product_description: NotRequired[RIProductDescription]

The product description associated with the Spot Instance.

spot_instance_request_id instance-attribute

spot_instance_request_id: NotRequired[String]

The ID of the Spot Instance request.

spot_price instance-attribute

spot_price: NotRequired[String]

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.

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

state instance-attribute

state: NotRequired[SpotInstanceState]

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 instance-attribute

status: NotRequired[SpotInstanceStatus]

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

tags instance-attribute

tags: NotRequired[TagList]

Any tags assigned to the resource.

type instance-attribute

type: NotRequired[SpotInstanceType]

The Spot Instance request type.

valid_from instance-attribute

valid_from: NotRequired[DateTime]

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 instance-attribute

valid_until: NotRequired[DateTime]

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.