Skip to content

EC2  >  Operations  >  create_capacity_reservation_fleet

create_capacity_reservation_fleet

Operation

create_capacity_reservation_fleet async

create_capacity_reservation_fleet(input: CreateCapacityReservationFleetInput, plugins: list[Plugin] | None = None) -> CreateCapacityReservationFleetOutput

Creates a Capacity Reservation Fleet. For more information, see Create a Capacity Reservation Fleet in the Amazon EC2 User Guide.

Parameters:

Name Type Description Default
input CreateCapacityReservationFleetInput

An instance of CreateCapacityReservationFleetInput.

required
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
CreateCapacityReservationFleetOutput

An instance of CreateCapacityReservationFleetOutput.

Input

CreateCapacityReservationFleetInput dataclass

Bases: _SerdeShape

Dataclass for CreateCapacityReservationFleetInput structure.

Attributes

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

The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. Currently, only the prioritized allocation strategy is supported. For more information, see Allocation strategy in the Amazon EC2 User Guide.

Valid values: prioritized

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

Reserved for internal use.

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

Reserved for internal use.

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

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.

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. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

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

The date and time at which the Capacity Reservation Fleet expires. When the Capacity Reservation Fleet expires, its state changes to expired and all of the Capacity Reservations in the Fleet expire.

The Capacity Reservation Fleet expires within an hour after the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation Fleet is guaranteed to expire between 13:30:55 and 14:30:55 on 5/31/2019.

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

Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All Capacity Reservations in the Fleet inherit this instance matching criteria.

Currently, Capacity Reservation Fleets support open instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.

instance_requirements class-attribute instance-attribute
instance_requirements: InstanceRequirementsRequest | None = ...

Reserved for internal use.

instance_type_specifications class-attribute instance-attribute
instance_type_specifications: list[ReservationFleetInstanceSpecification] | None = ...

Information about the instance types for which to reserve the capacity.

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

The tags to assign to the Capacity Reservation Fleet. The tags are automatically assigned to the Capacity Reservations in the Fleet.

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

Indicates the tenancy of the Capacity Reservation Fleet. All Capacity Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet can have one of the following tenancy settings:

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

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

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

The total number of capacity units to be reserved by the Capacity Reservation Fleet. This value, together with the instance type weights that you assign to each instance type used by the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see Total target capacity in the Amazon EC2 User Guide.

Output

CreateCapacityReservationFleetOutput dataclass

Bases: _SerdeShape

Dataclass for CreateCapacityReservationFleetOutput structure.

Attributes

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

The allocation strategy used by the Capacity Reservation Fleet.

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

The ID of the Capacity Reservation Fleet.

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

The date and time at which the Capacity Reservation Fleet was created.

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

The date and time at which the Capacity Reservation Fleet expires.

fleet_capacity_reservations class-attribute instance-attribute
fleet_capacity_reservations: list[FleetCapacityReservation] | None = ...

Information about the individual Capacity Reservations in the Capacity Reservation Fleet.

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

The instance matching criteria for the Capacity Reservation Fleet.

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.

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

The status of the Capacity Reservation Fleet.

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

The tags assigned to the Capacity Reservation Fleet.

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

Indicates the tenancy of Capacity Reservation Fleet.

total_fulfilled_capacity class-attribute instance-attribute
total_fulfilled_capacity: float | None = ...

The requested capacity units that have been successfully reserved.

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

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