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 the prioritized 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 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 (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 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 (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]) – AWS::EC2::CapacityReservationFleet.NoRemoveEndDate.

  • remove_end_date (Union[bool, IResolvable, None]) – AWS::EC2::CapacityReservationFleet.RemoveEndDate.

  • 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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html#cfn-ec2-capacityreservationfleet-allocationstrategy

Return type

Optional[str]

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 between 13:30:55 and 14:30:55 on 5/31/2019 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html#cfn-ec2-capacityreservationfleet-enddate

Return type

Optional[str]

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html#cfn-ec2-capacityreservationfleet-instancematchcriteria

Return type

Optional[str]

instance_type_specifications

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html#cfn-ec2-capacityreservationfleet-instancetypespecifications

Return type

Union[IResolvable, List[Union[IResolvable, InstanceTypeSpecificationProperty]], None]

no_remove_end_date

AWS::EC2::CapacityReservationFleet.NoRemoveEndDate.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html#cfn-ec2-capacityreservationfleet-noremoveenddate

Return type

Union[bool, IResolvable, None]

remove_end_date

AWS::EC2::CapacityReservationFleet.RemoveEndDate.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html#cfn-ec2-capacityreservationfleet-removeenddate

Return type

Union[bool, IResolvable, None]

tag_specifications

The tags to assign to the Capacity Reservation Fleet.

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html#cfn-ec2-capacityreservationfleet-tagspecifications

Return type

Union[IResolvable, List[Union[IResolvable, TagSpecificationProperty]], None]

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html#cfn-ec2-capacityreservationfleet-tenancy

Return type

Optional[str]

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-capacityreservationfleet.html#cfn-ec2-capacityreservationfleet-totaltargetcapacity

Return type

Union[int, float, None]