Skip to content

EC2  >  Operations  >  create_interruptible_capacity_reservation_allocation

create_interruptible_capacity_reservation_allocation

Operation

create_interruptible_capacity_reservation_allocation async

create_interruptible_capacity_reservation_allocation(*, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateInterruptibleCapacityReservationAllocationInputDict]) -> CreateInterruptibleCapacityReservationAllocationOutput

Creates an interruptible Capacity Reservation by specifying the number of unused instances you want to allocate from your source reservation. This helps you make unused capacity available for other workloads within your account while maintaining control to reclaim it.

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
CreateInterruptibleCapacityReservationAllocationOutput

An instance of CreateInterruptibleCapacityReservationAllocationOutput.

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

CreateInterruptibleCapacityReservationAllocationInput dataclass

Bases: _SerdeShape

Dataclass for CreateInterruptibleCapacityReservationAllocationInput structure.

Attributes
capacity_reservation_id class-attribute instance-attribute
capacity_reservation_id: str | None = ...

The ID of the source Capacity Reservation from which to create the interruptible Capacity Reservation. Your Capacity Reservation must be in active state with no end date set and have available capacity for allocation.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

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.

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

The number of instances to allocate from your source reservation. You can only allocate available instances (also called unused capacity).

tag_specifications class-attribute instance-attribute
tag_specifications: list[TagSpecification] | None = ...

The tags to apply to the interruptible Capacity Reservation during creation.

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

Specifies the behavior for the interruptible Capacity Reservation when you reduce its allocation to zero instances. Specify retain to keep the interruptible Capacity Reservation active at zero capacity so that you can allocate instances to it again later. Specify default to cancel the interruptible Capacity Reservation and return the capacity to your source Capacity Reservation. The default value is default.

Dictionaries

CreateInterruptibleCapacityReservationAllocationInputDict

Bases: TypedDict

Dictionary form of CreateInterruptibleCapacityReservationAllocationInput.

Attributes
capacity_reservation_id instance-attribute
capacity_reservation_id: Required[str]

The ID of the source Capacity Reservation from which to create the interruptible Capacity Reservation. Your Capacity Reservation must be in active state with no end date set and have available capacity for allocation.

client_token instance-attribute
client_token: str | None

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

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.

instance_count instance-attribute
instance_count: Required[int]

The number of instances to allocate from your source reservation. You can only allocate available instances (also called unused capacity).

tag_specifications instance-attribute
tag_specifications: Sequence[TagSpecification | TagSpecificationDict] | None

The tags to apply to the interruptible Capacity Reservation during creation.

zero_size_preference instance-attribute
zero_size_preference: str | None

Specifies the behavior for the interruptible Capacity Reservation when you reduce its allocation to zero instances. Specify retain to keep the interruptible Capacity Reservation active at zero capacity so that you can allocate instances to it again later. Specify default to cancel the interruptible Capacity Reservation and return the capacity to your source Capacity Reservation. The default value is default.

Output

CreateInterruptibleCapacityReservationAllocationOutput dataclass

Bases: _SerdeShape

Dataclass for CreateInterruptibleCapacityReservationAllocationOutput structure.

Attributes

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

The type of interruption applied to the interruptible reservation.

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.

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

The ID of the source Capacity Reservation from which the interruptible Capacity Reservation was created.

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

The current status of the allocation request (creating, active, updating).

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

The number of instances allocated to the interruptible reservation.