Skip to content

CapacityReservation

Source code in docs_src/capo_ec2/types/capacity_reservation.py
class CapacityReservation(TypedDict, closed=True):
    capacity_reservation_id: NotRequired["capo_ec2.types.string.String"]
    """<p>The ID of the Capacity Reservation.</p>"""
    owner_id: NotRequired["capo_ec2.types.string.String"]
    """<p>The ID of the Amazon Web Services account that owns the Capacity Reservation.</p>"""
    capacity_reservation_arn: NotRequired["capo_ec2.types.string.String"]
    """<p>The Amazon Resource Name (ARN) of the Capacity Reservation.</p>"""
    availability_zone_id: NotRequired["capo_ec2.types.string.String"]
    """<p>The ID of the Availability Zone in which the capacity is reserved.</p>"""
    instance_type: NotRequired["capo_ec2.types.string.String"]
    """<p>The type of instance for which the Capacity Reservation reserves capacity.</p>"""
    instance_platform: NotRequired[
        "capo_ec2.types.capacity_reservation_instance_platform.CapacityReservationInstancePlatform"
    ]
    """<p>The type of operating system for which the Capacity Reservation reserves capacity.</p>"""
    availability_zone: NotRequired["capo_ec2.types.string.String"]
    """<p>The Availability Zone in which the capacity is reserved.</p>"""
    tenancy: NotRequired[
        "capo_ec2.types.capacity_reservation_tenancy.CapacityReservationTenancy"
    ]
    """<p>Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:</p> <ul> <li> <p> <code>default</code> - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.</p> </li> <li> <p> <code>dedicated</code> - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.</p> </li> </ul>"""
    total_instance_count: NotRequired["capo_ec2.types.integer.Integer"]
    """<p>The total number of instances for which the Capacity Reservation reserves capacity.</p>"""
    available_instance_count: NotRequired["capo_ec2.types.integer.Integer"]
    """<p>The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.</p>"""
    ebs_optimized: NotRequired["capo_ec2.types.boolean.Boolean"]
    """<p>Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.</p>"""
    ephemeral_storage: NotRequired["capo_ec2.types.boolean.Boolean"]
    """<p> <i>Deprecated.</i> </p>"""
    state: NotRequired[
        "capo_ec2.types.capacity_reservation_state.CapacityReservationState"
    ]
    """<p>The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:</p> <ul> <li> <p> <code>active</code> - The capacity is available for use.</p> </li> <li> <p> <code>expired</code> - The Capacity Reservation expired automatically at the date and time specified in your reservation request. The reserved capacity is no longer available for your use.</p> </li> <li> <p> <code>cancelled</code> - The Capacity Reservation was canceled. The reserved capacity is no longer available for your use.</p> </li> <li> <p> <code>pending</code> - The Capacity Reservation request was successful but the capacity provisioning is still pending.</p> </li> <li> <p> <code>failed</code> - The Capacity Reservation request has failed. A request can fail due to request parameters that are not valid, capacity constraints, or instance limit constraints. You can view a failed request for 60 minutes.</p> </li> <li> <p> <code>scheduled</code> - (<i>Future-dated Capacity Reservations</i>) The future-dated Capacity Reservation request was approved and the Capacity Reservation is scheduled for delivery on the requested start date.</p> </li> <li> <p> <code>payment-pending</code> - (<i>Capacity Blocks</i>) The upfront payment has not been processed yet.</p> </li> <li> <p> <code>payment-failed</code> - (<i>Capacity Blocks</i>) The upfront payment was not processed in the 12-hour time frame. Your Capacity Block was released.</p> </li> <li> <p> <code>assessing</code> - (<i>Future-dated Capacity Reservations</i>) Amazon EC2 is assessing your request for a future-dated Capacity Reservation.</p> </li> <li> <p> <code>delayed</code> - (<i>Future-dated Capacity Reservations</i>) Amazon EC2 encountered a delay in provisioning the requested future-dated Capacity Reservation. Amazon EC2 is unable to deliver the requested capacity by the requested start date and time.</p> </li> <li> <p> <code>unsupported</code> - (<i>Future-dated Capacity Reservations</i>) Amazon EC2 can't support the future-dated Capacity Reservation request due to capacity constraints. You can view unsupported requests for 30 days. The Capacity Reservation will not be delivered.</p> </li> <li> <p> <code>cancelling</code> - (<i>Future-dated Capacity Reservations</i>) The Capacity Reservation is being cancelled. Capacity has been released but charges continue for the commitment wind-down period. The reservation transitions to <code>cancelled</code> when the wind-down completes.</p> </li> </ul>"""
    start_date: NotRequired["capo_ec2.types.millisecond_date_time.MillisecondDateTime"]
    """<p>The date and time the Capacity Reservation was started.</p>"""
    end_date: NotRequired["capo_ec2.types.date_time.DateTime"]
    """<p>The date and time the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to <code>expired</code> when it reaches its end date and time.</p>"""
    end_date_type: NotRequired["capo_ec2.types.end_date_type.EndDateType"]
    """<p>Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:</p> <ul> <li> <p> <code>unlimited</code> - The Capacity Reservation remains active until you explicitly cancel it.</p> </li> <li> <p> <code>limited</code> - The Capacity Reservation expires automatically at a specified date and time.</p> </li> </ul>"""
    instance_match_criteria: NotRequired[
        "capo_ec2.types.instance_match_criteria.InstanceMatchCriteria"
    ]
    """<p>Indicates the type of instance launches that the Capacity Reservation accepts. The options include:</p> <ul> <li> <p> <code>open</code> - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.</p> </li> <li> <p> <code>targeted</code> - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity. </p> </li> </ul>"""
    create_date: NotRequired["capo_ec2.types.date_time.DateTime"]
    """<p>The date and time the Capacity Reservation was created.</p>"""
    tags: NotRequired["capo_ec2.types.tag_list.TagList"]
    """<p>Any tags assigned to the Capacity Reservation.</p>"""
    outpost_arn: NotRequired["capo_ec2.types.outpost_arn.OutpostArn"]
    """<p>The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.</p>"""
    capacity_reservation_fleet_id: NotRequired["capo_ec2.types.string.String"]
    """<p>The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.</p>"""
    placement_group_arn: NotRequired[
        "capo_ec2.types.placement_group_arn.PlacementGroupArn"
    ]
    """<p>The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cr-cpg.html"> Capacity Reservations for cluster placement groups</a> in the <i>Amazon EC2 User Guide</i>.</p>"""
    capacity_allocations: NotRequired[
        "capo_ec2.types.capacity_allocations.CapacityAllocations"
    ]
    """<p>Information about instance capacity usage.</p>"""
    reservation_type: NotRequired[
        "capo_ec2.types.capacity_reservation_type.CapacityReservationType"
    ]
    """<p>The type of Capacity Reservation.</p>"""
    unused_reservation_billing_owner_id: NotRequired[
        "capo_ec2.types.account_id.AccountID"
    ]
    """<p>The ID of the Amazon Web Services account to which billing of the unused capacity of the Capacity Reservation is assigned.</p>"""
    commitment_info: NotRequired[
        "capo_ec2.types.capacity_reservation_commitment_info.CapacityReservationCommitmentInfo"
    ]
    """<p>Information about your commitment for a future-dated Capacity Reservation.</p>"""
    delivery_preference: NotRequired[
        "capo_ec2.types.capacity_reservation_delivery_preference.CapacityReservationDeliveryPreference"
    ]
    """<p>The delivery method for a future-dated Capacity Reservation. <code>incremental</code> indicates that the requested capacity is delivered in addition to any running instances and reserved capacity that you have in your account at the requested date and time.</p>"""
    capacity_block_id: NotRequired["capo_ec2.types.capacity_block_id.CapacityBlockId"]
    """<p>The ID of the Capacity Block.</p>"""
    interruptible: NotRequired["capo_ec2.types.boxed_boolean.BoxedBoolean"]
    """<p> Indicates whether this Capacity Reservation is interruptible, meaning instances may be terminated when the owner reclaims capacity. </p>"""
    interruptible_capacity_allocation: NotRequired[
        "capo_ec2.types.interruptible_capacity_allocation.InterruptibleCapacityAllocation"
    ]
    """<p> Contains allocation details for interruptible reservations, including current allocated instances and target instance counts within the interruptibleCapacityAllocation object. </p>"""
    interruption_info: NotRequired["capo_ec2.types.interruption_info.InterruptionInfo"]
    """<p> Information about the interruption configuration and association with the source reservation for interruptible Capacity Reservations. </p>"""
    adjustment_status: NotRequired[
        "capo_ec2.types.capacity_reservation_adjustment_status.CapacityReservationAdjustmentStatus"
    ]
    """<p>The status of the most recent modification to the Capacity Reservation. A Capacity Reservation can have one of the following adjustment statuses:</p> <ul> <li> <p> <code>requested</code> - The modification was requested and is being processed.</p> </li> <li> <p> <code>applied</code> - The modification was applied to the Capacity Reservation.</p> </li> <li> <p> <code>rejected</code> - The modification was not applied and the Capacity Reservation keeps its existing configuration.</p> </li> </ul> <p>This field is not returned if the Capacity Reservation has never been modified.</p>"""
    adjustment_details: NotRequired[
        "capo_ec2.types.capacity_reservation_adjustment_details.CapacityReservationAdjustmentDetails"
    ]
    """<p>The configuration that the Capacity Reservation will have after the requested adjustment is applied.</p>"""
    original_start_date: NotRequired[
        "capo_ec2.types.millisecond_date_time.MillisecondDateTime"
    ]
    """<p>The start date that you originally requested for the Capacity Reservation, in the ISO8601 format in the UTC time zone (<code>YYYY-MM-DDThh:mm:ss.sssZ</code>). This value doesn't change when you push out the start date.</p>"""
    zero_size_preference: NotRequired[
        "capo_ec2.types.zero_size_preference.ZeroSizePreference"
    ]
    """<p> The zero-size preference configured for the interruptible Capacity Reservation. A value of <code>retain</code> keeps the interruptible Capacity Reservation active at zero capacity when you reduce its allocation to zero. A value of <code>default</code> cancels the interruptible Capacity Reservation when you reduce its allocation to zero. </p>"""
    launch_status: NotRequired[
        "capo_ec2.types.capacity_reservation_launch_status.CapacityReservationLaunchStatus"
    ]
    """<note> <p>Only supported for UltraServers.</p> </note> <p>Indicates whether you can launch instances into the Capacity Reservation. A Capacity Reservation can have the following launch statuses:</p> <ul> <li> <p> <code>launchable</code> - You can launch instances into the Capacity Reservation.</p> </li> <li> <p> <code>unlaunchable</code> - You can't launch instances into the Capacity Reservation. For example, the Capacity Reservation is not active.</p> </li> </ul>"""

adjustment_details instance-attribute

adjustment_details: NotRequired[CapacityReservationAdjustmentDetails]

The configuration that the Capacity Reservation will have after the requested adjustment is applied.

adjustment_status instance-attribute

adjustment_status: NotRequired[CapacityReservationAdjustmentStatus]

The status of the most recent modification to the Capacity Reservation. A Capacity Reservation can have one of the following adjustment statuses:

  • requested - The modification was requested and is being processed.

  • applied - The modification was applied to the Capacity Reservation.

  • rejected - The modification was not applied and the Capacity Reservation keeps its existing configuration.

This field is not returned if the Capacity Reservation has never been modified.

availability_zone instance-attribute

availability_zone: NotRequired[String]

The Availability Zone in which the capacity is reserved.

availability_zone_id instance-attribute

availability_zone_id: NotRequired[String]

The ID of the Availability Zone in which the capacity is reserved.

available_instance_count instance-attribute

available_instance_count: NotRequired[Integer]

The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

capacity_allocations instance-attribute

capacity_allocations: NotRequired[CapacityAllocations]

Information about instance capacity usage.

capacity_block_id instance-attribute

capacity_block_id: NotRequired[CapacityBlockId]

The ID of the Capacity Block.

capacity_reservation_arn instance-attribute

capacity_reservation_arn: NotRequired[String]

The Amazon Resource Name (ARN) of the Capacity Reservation.

capacity_reservation_fleet_id instance-attribute

capacity_reservation_fleet_id: NotRequired[String]

The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.

capacity_reservation_id instance-attribute

capacity_reservation_id: NotRequired[String]

The ID of the Capacity Reservation.

commitment_info instance-attribute

commitment_info: NotRequired[CapacityReservationCommitmentInfo]

Information about your commitment for a future-dated Capacity Reservation.

create_date instance-attribute

create_date: NotRequired[DateTime]

The date and time the Capacity Reservation was created.

delivery_preference instance-attribute

delivery_preference: NotRequired[CapacityReservationDeliveryPreference]

The delivery method for a future-dated Capacity Reservation. incremental indicates that the requested capacity is delivered in addition to any running instances and reserved capacity that you have in your account at the requested date and time.

ebs_optimized instance-attribute

ebs_optimized: NotRequired[Boolean]

Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.

end_date instance-attribute

end_date: NotRequired[DateTime]

The date and time the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.

end_date_type instance-attribute

end_date_type: NotRequired[EndDateType]

Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

  • unlimited - The Capacity Reservation remains active until you explicitly cancel it.

  • limited - The Capacity Reservation expires automatically at a specified date and time.

ephemeral_storage instance-attribute

ephemeral_storage: NotRequired[Boolean]

Deprecated.

instance_match_criteria instance-attribute

instance_match_criteria: NotRequired[InstanceMatchCriteria]

Indicates the type of instance launches that the Capacity Reservation accepts. The options include:

  • open - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.

  • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.

instance_platform instance-attribute

instance_platform: NotRequired[CapacityReservationInstancePlatform]

The type of operating system for which the Capacity Reservation reserves capacity.

instance_type instance-attribute

instance_type: NotRequired[String]

The type of instance for which the Capacity Reservation reserves capacity.

interruptible instance-attribute

interruptible: NotRequired[BoxedBoolean]

Indicates whether this Capacity Reservation is interruptible, meaning instances may be terminated when the owner reclaims capacity.

interruptible_capacity_allocation instance-attribute

interruptible_capacity_allocation: NotRequired[InterruptibleCapacityAllocation]

Contains allocation details for interruptible reservations, including current allocated instances and target instance counts within the interruptibleCapacityAllocation object.

interruption_info instance-attribute

interruption_info: NotRequired[InterruptionInfo]

Information about the interruption configuration and association with the source reservation for interruptible Capacity Reservations.

launch_status instance-attribute

launch_status: NotRequired[CapacityReservationLaunchStatus]

Only supported for UltraServers.

Indicates whether you can launch instances into the Capacity Reservation. A Capacity Reservation can have the following launch statuses:

  • launchable - You can launch instances into the Capacity Reservation.

  • unlaunchable - You can't launch instances into the Capacity Reservation. For example, the Capacity Reservation is not active.

original_start_date instance-attribute

original_start_date: NotRequired[MillisecondDateTime]

The start date that you originally requested for the Capacity Reservation, in the ISO8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ). This value doesn't change when you push out the start date.

outpost_arn instance-attribute

outpost_arn: NotRequired[OutpostArn]

The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.

owner_id instance-attribute

owner_id: NotRequired[String]

The ID of the Amazon Web Services account that owns the Capacity Reservation.

placement_group_arn instance-attribute

placement_group_arn: NotRequired[PlacementGroupArn]

The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.

reservation_type instance-attribute

reservation_type: NotRequired[CapacityReservationType]

The type of Capacity Reservation.

start_date instance-attribute

start_date: NotRequired[MillisecondDateTime]

The date and time the Capacity Reservation was started.

state instance-attribute

state: NotRequired[CapacityReservationState]

The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

  • active - The capacity is available for use.

  • expired - The Capacity Reservation expired automatically at the date and time specified in your reservation request. The reserved capacity is no longer available for your use.

  • cancelled - The Capacity Reservation was canceled. The reserved capacity is no longer available for your use.

  • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.

  • failed - The Capacity Reservation request has failed. A request can fail due to request parameters that are not valid, capacity constraints, or instance limit constraints. You can view a failed request for 60 minutes.

  • scheduled - (Future-dated Capacity Reservations) The future-dated Capacity Reservation request was approved and the Capacity Reservation is scheduled for delivery on the requested start date.

  • payment-pending - (Capacity Blocks) The upfront payment has not been processed yet.

  • payment-failed - (Capacity Blocks) The upfront payment was not processed in the 12-hour time frame. Your Capacity Block was released.

  • assessing - (Future-dated Capacity Reservations) Amazon EC2 is assessing your request for a future-dated Capacity Reservation.

  • delayed - (Future-dated Capacity Reservations) Amazon EC2 encountered a delay in provisioning the requested future-dated Capacity Reservation. Amazon EC2 is unable to deliver the requested capacity by the requested start date and time.

  • unsupported - (Future-dated Capacity Reservations) Amazon EC2 can't support the future-dated Capacity Reservation request due to capacity constraints. You can view unsupported requests for 30 days. The Capacity Reservation will not be delivered.

  • cancelling - (Future-dated Capacity Reservations) The Capacity Reservation is being cancelled. Capacity has been released but charges continue for the commitment wind-down period. The reservation transitions to cancelled when the wind-down completes.

tags instance-attribute

tags: NotRequired[TagList]

Any tags assigned to the Capacity Reservation.

tenancy instance-attribute

tenancy: NotRequired[CapacityReservationTenancy]

Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:

  • default - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.

  • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.

total_instance_count instance-attribute

total_instance_count: NotRequired[Integer]

The total number of instances for which the Capacity Reservation reserves capacity.

unused_reservation_billing_owner_id instance-attribute

unused_reservation_billing_owner_id: NotRequired[AccountID]

The ID of the Amazon Web Services account to which billing of the unused capacity of the Capacity Reservation is assigned.

zero_size_preference instance-attribute

zero_size_preference: NotRequired[ZeroSizePreference]

The zero-size preference configured for the interruptible Capacity Reservation. A value of retain keeps the interruptible Capacity Reservation active at zero capacity when you reduce its allocation to zero. A value of default cancels the interruptible Capacity Reservation when you reduce its allocation to zero.