CfnCapacityReservationFleetPropsMixin
- class aws_cdk.mixins_preview.aws_ec2.mixins.CfnCapacityReservationFleetPropsMixin(props, *, strategy=None)
Bases:
MixinCreates a new Capacity Reservation Fleet with the specified attributes.
For more information, see Capacity Reservation Fleets in the Amazon EC2 User Guide .
- See:
- 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:
props (
Union[CfnCapacityReservationFleetMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- 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:
objectSpecifies information about an instance type to use in a Capacity Reservation Fleet.
InstanceTypeSpecificationis 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 of0.001. Maximum value of99.999.
- 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.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.
- 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.
- 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.
- instance_platform
The type of operating system for which the Capacity Reservation Fleet reserves capacity.
- instance_type
The instance type for which the Capacity Reservation Fleet reserves capacity.
- 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 .
- 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 of99.999.