CfnCapacityReservationFleetPropsMixin

class aws_cdk.mixins_preview.aws_ec2.mixins.CfnCapacityReservationFleetPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates a new Capacity Reservation Fleet with the specified attributes.

For more information, see Capacity Reservation Fleets in the Amazon EC2 User Guide .

See:

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

CloudformationResource:

AWS::EC2::CapacityReservationFleet

Mixin:

true

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.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins

cfn_capacity_reservation_fleet_props_mixin = ec2_mixins.CfnCapacityReservationFleetPropsMixin(ec2_mixins.CfnCapacityReservationFleetMixinProps(
    allocation_strategy="allocationStrategy",
    end_date="endDate",
    instance_match_criteria="instanceMatchCriteria",
    instance_type_specifications=[ec2_mixins.CfnCapacityReservationFleetPropsMixin.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_mixins.CfnCapacityReservationFleetPropsMixin.TagSpecificationProperty(
        resource_type="resourceType",
        tags=[CfnTag(
            key="key",
            value="value"
        )]
    )],
    tenancy="tenancy",
    total_target_capacity=123
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::EC2::CapacityReservationFleet.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['allocationStrategy', 'endDate', 'instanceMatchCriteria', 'instanceTypeSpecifications', 'noRemoveEndDate', 'removeEndDate', 'tagSpecifications', 'tenancy', 'totalTargetCapacity']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

InstanceTypeSpecificationProperty

class CfnCapacityReservationFleetPropsMixin.InstanceTypeSpecificationProperty(*, availability_zone=None, availability_zone_id=None, ebs_optimized=None, instance_platform=None, instance_type=None, priority=None, weight=None)

Bases: object

Specifies information about an instance type to use in a Capacity Reservation Fleet.

InstanceTypeSpecification is a property of the AWS::EC2::CapacityReservationFleet resource.

Parameters:
  • availability_zone (Optional[str]) – The Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can’t span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.

  • availability_zone_id (Optional[str]) – The ID of the Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can’t span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.

  • ebs_optimized (Union[bool, IResolvable, None]) – Indicates whether the Capacity Reservation Fleet supports EBS-optimized instances types. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn’t available with all instance types. Additional usage charges apply when using EBS-optimized instance types.

  • instance_platform (Optional[str]) – The type of operating system for which the Capacity Reservation Fleet reserves capacity.

  • instance_type (Optional[str]) – The instance type for which the Capacity Reservation Fleet reserves capacity.

  • priority (Union[int, float, None]) – The priority to assign to the instance type. This value is used to determine which of the instance types specified for the Fleet should be prioritized for use. A lower value indicates a high priority. For more information, see Instance type priority in the Amazon EC2 User Guide .

  • weight (Union[int, float, None]) – The number of capacity units provided by the specified instance type. This value, together with the total target capacity that you specify for 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. Valid Range: Minimum value of 0.001 . Maximum value of 99.999 .

See:

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

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.mixins_preview.aws_ec2 import mixins as ec2_mixins

instance_type_specification_property = ec2_mixins.CfnCapacityReservationFleetPropsMixin.InstanceTypeSpecificationProperty(
    availability_zone="availabilityZone",
    availability_zone_id="availabilityZoneId",
    ebs_optimized=False,
    instance_platform="instancePlatform",
    instance_type="instanceType",
    priority=123,
    weight=123
)

Attributes

availability_zone

The Availability Zone in which the Capacity Reservation Fleet reserves the capacity.

A Capacity Reservation Fleet can’t span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-availabilityzone

availability_zone_id

The ID of the Availability Zone in which the Capacity Reservation Fleet reserves the capacity.

A Capacity Reservation Fleet can’t span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-availabilityzoneid

ebs_optimized

Indicates whether the Capacity Reservation Fleet supports EBS-optimized instances types.

This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn’t available with all instance types. Additional usage charges apply when using EBS-optimized instance types.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-ebsoptimized

instance_platform

The type of operating system for which the Capacity Reservation Fleet reserves capacity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-instanceplatform

instance_type

The instance type for which the Capacity Reservation Fleet reserves capacity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-instancetype

priority

The priority to assign to the instance type.

This value is used to determine which of the instance types specified for the Fleet should be prioritized for use. A lower value indicates a high priority. For more information, see Instance type priority in the Amazon EC2 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-priority

weight

The number of capacity units provided by the specified instance type.

This value, together with the total target capacity that you specify for 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.

Valid Range: Minimum value of 0.001 . Maximum value of 99.999 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-instancetypespecification.html#cfn-ec2-capacityreservationfleet-instancetypespecification-weight

TagSpecificationProperty

class CfnCapacityReservationFleetPropsMixin.TagSpecificationProperty(*, resource_type=None, tags=None)

Bases: object

The tags to apply to a resource when the resource is being created.

When you specify a tag, you must specify the resource type to tag, otherwise the request will fail. .. epigraph:

The ``Valid Values`` lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.
Parameters:
  • resource_type (Optional[str]) – The type of resource to tag on creation. Specify capacity-reservation-fleet . To tag a resource after it has been created, see CreateTags .

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – The tags to apply to the resource.

See:

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

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.mixins_preview.aws_ec2 import mixins as ec2_mixins

tag_specification_property = ec2_mixins.CfnCapacityReservationFleetPropsMixin.TagSpecificationProperty(
    resource_type="resourceType",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

resource_type

The type of resource to tag on creation. Specify capacity-reservation-fleet .

To tag a resource after it has been created, see CreateTags .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-tagspecification.html#cfn-ec2-capacityreservationfleet-tagspecification-resourcetype

tags

The tags to apply to the resource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-capacityreservationfleet-tagspecification.html#cfn-ec2-capacityreservationfleet-tagspecification-tags