Skip to content

EC2  >  Structures  >  CapacityReservation

CapacityReservation

Structure Class

CapacityReservation dataclass

Bases: _SerdeShape

Describes a Capacity Reservation.

Attributes

adjustment_details class-attribute instance-attribute
adjustment_details: CapacityReservationAdjustmentDetails | None = ...

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

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

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 class-attribute instance-attribute
availability_zone: str | None = ...

The Availability Zone in which the capacity is reserved.

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

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

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

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

capacity_allocations class-attribute instance-attribute
capacity_allocations: list[CapacityAllocation] | None = ...

Information about instance capacity usage.

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

The ID of the Capacity Block.

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

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

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

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 class-attribute instance-attribute
capacity_reservation_id: str | None = ...

The ID of the Capacity Reservation.

commitment_info class-attribute instance-attribute
commitment_info: CapacityReservationCommitmentInfo | None = ...

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

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

The date and time the Capacity Reservation was created.

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

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 class-attribute instance-attribute
ebs_optimized: bool | None = ...

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 class-attribute instance-attribute
end_date: datetime | None = ...

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 class-attribute instance-attribute
end_date_type: str | None = ...

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 class-attribute instance-attribute
ephemeral_storage: bool | None = ...

Deprecated.

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

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 class-attribute instance-attribute
instance_platform: str | None = ...

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

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

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

interruptible class-attribute instance-attribute
interruptible: bool | None = ...

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

interruptible_capacity_allocation class-attribute instance-attribute
interruptible_capacity_allocation: InterruptibleCapacityAllocation | None = ...

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

interruption_info class-attribute instance-attribute
interruption_info: InterruptionInfo | None = ...

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

launch_status class-attribute instance-attribute
launch_status: str | None = ...
Note

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 class-attribute instance-attribute
original_start_date: datetime | None = ...

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 class-attribute instance-attribute
outpost_arn: str | None = ...

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

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

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

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

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 class-attribute instance-attribute
reservation_type: str | None = ...

The type of Capacity Reservation.

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

The date and time the Capacity Reservation was started.

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

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 class-attribute instance-attribute
tags: list[Tag] | None = ...

Any tags assigned to the Capacity Reservation.

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

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 class-attribute instance-attribute
total_instance_count: int | None = ...

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

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

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

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

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.