CfnCapacityReservationFleetProps
- class aws_cdk.aws_ec2.CfnCapacityReservationFleetProps(*, allocation_strategy=None, end_date=None, instance_match_criteria=None, instance_type_specifications=None, no_remove_end_date=None, remove_end_date=None, tag_specifications=None, tenancy=None, total_target_capacity=None)
Bases:
object
Properties for defining a
CfnCapacityReservationFleet
.- Parameters:
allocation_strategy (
Optional
[str
]) – The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. Currently, only theprioritized
allocation strategy is supported. For more information, see Allocation strategy in the Amazon EC2 User Guide . Valid values:prioritized
end_date (
Optional
[str
]) – The date and time at which the Capacity Reservation Fleet expires. When the Capacity Reservation Fleet expires, its state changes toexpired
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 specify5/31/2019
,13:30:55
, the Capacity Reservation Fleet is guaranteed to expire between13:30:55
and14:30:55
on5/31/2019
.instance_match_criteria (
Optional
[str
]) – 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 supportopen
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_type_specifications (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,InstanceTypeSpecificationProperty
,Dict
[str
,Any
]]],None
]) – Information about the instance types for which to reserve the capacity.no_remove_end_date (
Union
[bool
,IResolvable
,None
]) – Used to add an end date to a Capacity Reservation Fleet that has no end date and time. To add an end date to a Capacity Reservation Fleet, specifytrue
for this paramater and specify the end date and time (in UTC time format) for the EndDate parameter.remove_end_date (
Union
[bool
,IResolvable
,None
]) – Used to remove an end date from a Capacity Reservation Fleet that is configured to end automatically at a specific date and time. To remove the end date from a Capacity Reservation Fleet, specifytrue
for this paramater and omit the EndDate parameter.tag_specifications (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,TagSpecificationProperty
,Dict
[str
,Any
]]],None
]) – The tags to assign to the Capacity Reservation Fleet. The tags are automatically assigned to the Capacity Reservations in the Fleet.tenancy (
Optional
[str
]) – 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 AWS accounts . -dedicated
- The Capacity Reservations are created on single-tenant hardware that is dedicated to a single AWS account .total_target_capacity (
Union
[int
,float
,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 .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_ec2 as ec2 cfn_capacity_reservation_fleet_props = ec2.CfnCapacityReservationFleetProps( allocation_strategy="allocationStrategy", end_date="endDate", instance_match_criteria="instanceMatchCriteria", instance_type_specifications=[ec2.CfnCapacityReservationFleet.InstanceTypeSpecificationProperty( availability_zone="availabilityZone", availability_zone_id="availabilityZoneId", ebs_optimized=False, instance_platform="instancePlatform", instance_type="instanceType", priority=123, weight=123 )], no_remove_end_date=False, remove_end_date=False, tag_specifications=[ec2.CfnCapacityReservationFleet.TagSpecificationProperty( resource_type="resourceType", tags=[CfnTag( key="key", value="value" )] )], tenancy="tenancy", total_target_capacity=123 )
Attributes
- allocation_strategy
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
- end_date
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 between13:30:55
and14:30:55
on5/31/2019
.
- instance_match_criteria
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_type_specifications
Information about the instance types for which to reserve the capacity.
- no_remove_end_date
Used to add an end date to a Capacity Reservation Fleet that has no end date and time.
To add an end date to a Capacity Reservation Fleet, specify
true
for this paramater and specify the end date and time (in UTC time format) for the EndDate parameter.
- remove_end_date
Used to remove an end date from a Capacity Reservation Fleet that is configured to end automatically at a specific date and time.
To remove the end date from a Capacity Reservation Fleet, specify
true
for this paramater and omit the EndDate parameter.
- tag_specifications
The tags to assign to the Capacity Reservation Fleet.
The tags are automatically assigned to the Capacity Reservations in the Fleet.
- tenancy
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 AWS accounts .dedicated
- The Capacity Reservations are created on single-tenant hardware that is dedicated to a single AWS account .
- total_target_capacity
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 .