create_capacity_reservation_fleet
async
¶
create_capacity_reservation_fleet(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
allocation_strategy: Optional[String] = None,
client_token: Optional[String] = None,
instance_type_specifications: Optional[
ReservationFleetInstanceSpecificationList
] = None,
tenancy: Optional[FleetCapacityReservationTenancy] = None,
total_target_capacity: Optional[Integer] = None,
end_date: Optional[MillisecondDateTime] = None,
instance_match_criteria: Optional[FleetInstanceMatchCriteria] = None,
tag_specifications: Optional[TagSpecificationList] = None,
dry_run: Optional[Boolean] = None,
) -> CreateCapacityReservationFleetResult
Creates a Capacity Reservation Fleet. For more information, see Create a Capacity Reservation Fleet in the Amazon EC2 User Guide.
Parameters:
-
allocation_strategy(Optional[String], default:None) –The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. Currently, only the
prioritizedallocation strategy is supported. For more information, see Allocation strategy in the Amazon EC2 User Guide.Valid values:
prioritized -
client_token(Optional[String], default:None) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency.
-
instance_type_specifications(Optional[ReservationFleetInstanceSpecificationList], default:None) –Information about the instance types for which to reserve the capacity.
-
tenancy(Optional[FleetCapacityReservationTenancy], default: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(Optional[Integer], default: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.
-
end_date(Optional[MillisecondDateTime], default:None) –The date and time at which the Capacity Reservation Fleet expires. When the Capacity Reservation Fleet expires, its state changes to
expiredand 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 between13:30:55and14:30:55on5/31/2019. -
instance_match_criteria(Optional[FleetInstanceMatchCriteria], default: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
openinstance 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. -
tag_specifications(Optional[TagSpecificationList], default:None) –The tags to assign to the Capacity Reservation Fleet. The tags are automatically assigned to the Capacity Reservations in the Fleet.
-
dry_run(Optional[Boolean], default: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 isUnauthorizedOperation.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/async_ec2.py
7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 | |