CfnCapacityProviderPropsMixin

class aws_cdk.mixins_preview.aws_ecs.mixins.CfnCapacityProviderPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates a capacity provider.

Capacity providers are associated with a cluster and are used in capacity provider strategies to facilitate cluster auto scaling. You can create capacity providers for Amazon ECS Managed Instances and EC2 instances. AWS Fargate has the predefined FARGATE and FARGATE_SPOT capacity providers.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html

CloudformationResource:

AWS::ECS::CapacityProvider

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_ecs import mixins as ecs_mixins

cfn_capacity_provider_props_mixin = ecs_mixins.CfnCapacityProviderPropsMixin(ecs_mixins.CfnCapacityProviderMixinProps(
    auto_scaling_group_provider=ecs_mixins.CfnCapacityProviderPropsMixin.AutoScalingGroupProviderProperty(
        auto_scaling_group_arn="autoScalingGroupArn",
        managed_draining="managedDraining",
        managed_scaling=ecs_mixins.CfnCapacityProviderPropsMixin.ManagedScalingProperty(
            instance_warmup_period=123,
            maximum_scaling_step_size=123,
            minimum_scaling_step_size=123,
            status="status",
            target_capacity=123
        ),
        managed_termination_protection="managedTerminationProtection"
    ),
    cluster_name="clusterName",
    managed_instances_provider=ecs_mixins.CfnCapacityProviderPropsMixin.ManagedInstancesProviderProperty(
        infrastructure_optimization=ecs_mixins.CfnCapacityProviderPropsMixin.InfrastructureOptimizationProperty(
            scale_in_after=123
        ),
        infrastructure_role_arn="infrastructureRoleArn",
        instance_launch_template=ecs_mixins.CfnCapacityProviderPropsMixin.InstanceLaunchTemplateProperty(
            ec2_instance_profile_arn="ec2InstanceProfileArn",
            instance_requirements=ecs_mixins.CfnCapacityProviderPropsMixin.InstanceRequirementsRequestProperty(
                accelerator_count=ecs_mixins.CfnCapacityProviderPropsMixin.AcceleratorCountRequestProperty(
                    max=123,
                    min=123
                ),
                accelerator_manufacturers=["acceleratorManufacturers"],
                accelerator_names=["acceleratorNames"],
                accelerator_total_memory_mi_b=ecs_mixins.CfnCapacityProviderPropsMixin.AcceleratorTotalMemoryMiBRequestProperty(
                    max=123,
                    min=123
                ),
                accelerator_types=["acceleratorTypes"],
                allowed_instance_types=["allowedInstanceTypes"],
                bare_metal="bareMetal",
                baseline_ebs_bandwidth_mbps=ecs_mixins.CfnCapacityProviderPropsMixin.BaselineEbsBandwidthMbpsRequestProperty(
                    max=123,
                    min=123
                ),
                burstable_performance="burstablePerformance",
                cpu_manufacturers=["cpuManufacturers"],
                excluded_instance_types=["excludedInstanceTypes"],
                instance_generations=["instanceGenerations"],
                local_storage="localStorage",
                local_storage_types=["localStorageTypes"],
                max_spot_price_as_percentage_of_optimal_on_demand_price=123,
                memory_gi_bPer_vCpu=ecs_mixins.CfnCapacityProviderPropsMixin.MemoryGiBPerVCpuRequestProperty(
                    max=123,
                    min=123
                ),
                memory_mi_b=ecs_mixins.CfnCapacityProviderPropsMixin.MemoryMiBRequestProperty(
                    max=123,
                    min=123
                ),
                network_bandwidth_gbps=ecs_mixins.CfnCapacityProviderPropsMixin.NetworkBandwidthGbpsRequestProperty(
                    max=123,
                    min=123
                ),
                network_interface_count=ecs_mixins.CfnCapacityProviderPropsMixin.NetworkInterfaceCountRequestProperty(
                    max=123,
                    min=123
                ),
                on_demand_max_price_percentage_over_lowest_price=123,
                require_hibernate_support=False,
                spot_max_price_percentage_over_lowest_price=123,
                total_local_storage_gb=ecs_mixins.CfnCapacityProviderPropsMixin.TotalLocalStorageGBRequestProperty(
                    max=123,
                    min=123
                ),
                v_cpu_count=ecs_mixins.CfnCapacityProviderPropsMixin.VCpuCountRangeRequestProperty(
                    max=123,
                    min=123
                )
            ),
            monitoring="monitoring",
            network_configuration=ecs_mixins.CfnCapacityProviderPropsMixin.ManagedInstancesNetworkConfigurationProperty(
                security_groups=["securityGroups"],
                subnets=["subnets"]
            ),
            storage_configuration=ecs_mixins.CfnCapacityProviderPropsMixin.ManagedInstancesStorageConfigurationProperty(
                storage_size_gi_b=123
            )
        ),
        propagate_tags="propagateTags"
    ),
    name="name",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::ECS::CapacityProvider.

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 = ['autoScalingGroupProvider', 'clusterName', 'managedInstancesProvider', 'name', 'tags']

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

AcceleratorCountRequestProperty

class CfnCapacityProviderPropsMixin.AcceleratorCountRequestProperty(*, max=None, min=None)

Bases: object

The minimum and maximum number of accelerators (such as GPUs) for instance type selection.

This is used for workloads that require specific numbers of accelerators.

Parameters:
  • max (Union[int, float, None]) – The maximum number of accelerators. Instance types with more accelerators are excluded from selection.

  • min (Union[int, float, None]) – The minimum number of accelerators. Instance types with fewer accelerators are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratorcountrequest.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_ecs import mixins as ecs_mixins

accelerator_count_request_property = ecs_mixins.CfnCapacityProviderPropsMixin.AcceleratorCountRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum number of accelerators.

Instance types with more accelerators are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratorcountrequest.html#cfn-ecs-capacityprovider-acceleratorcountrequest-max

min

The minimum number of accelerators.

Instance types with fewer accelerators are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratorcountrequest.html#cfn-ecs-capacityprovider-acceleratorcountrequest-min

AcceleratorTotalMemoryMiBRequestProperty

class CfnCapacityProviderPropsMixin.AcceleratorTotalMemoryMiBRequestProperty(*, max=None, min=None)

Bases: object

The minimum and maximum total accelerator memory in mebibytes (MiB) for instance type selection.

This is important for GPU workloads that require specific amounts of video memory.

Parameters:
  • max (Union[int, float, None]) – The maximum total accelerator memory in MiB. Instance types with more accelerator memory are excluded from selection.

  • min (Union[int, float, None]) – The minimum total accelerator memory in MiB. Instance types with less accelerator memory are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest.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_ecs import mixins as ecs_mixins

accelerator_total_memory_mi_bRequest_property = ecs_mixins.CfnCapacityProviderPropsMixin.AcceleratorTotalMemoryMiBRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum total accelerator memory in MiB.

Instance types with more accelerator memory are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest.html#cfn-ecs-capacityprovider-acceleratortotalmemorymibrequest-max

min

The minimum total accelerator memory in MiB.

Instance types with less accelerator memory are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest.html#cfn-ecs-capacityprovider-acceleratortotalmemorymibrequest-min

AutoScalingGroupProviderProperty

class CfnCapacityProviderPropsMixin.AutoScalingGroupProviderProperty(*, auto_scaling_group_arn=None, managed_draining=None, managed_scaling=None, managed_termination_protection=None)

Bases: object

The details of the Auto Scaling group for the capacity provider.

Parameters:
  • auto_scaling_group_arn (Optional[str]) – The Amazon Resource Name (ARN) that identifies the Auto Scaling group, or the Auto Scaling group name.

  • managed_draining (Optional[str]) – The managed draining option for the Auto Scaling group capacity provider. When you enable this, Amazon ECS manages and gracefully drains the EC2 container instances that are in the Auto Scaling group capacity provider.

  • managed_scaling (Union[IResolvable, ManagedScalingProperty, Dict[str, Any], None]) – The managed scaling settings for the Auto Scaling group capacity provider.

  • managed_termination_protection (Optional[str]) – The managed termination protection setting to use for the Auto Scaling group capacity provider. This determines whether the Auto Scaling group has managed termination protection. The default is off. .. epigraph:: When using managed termination protection, managed scaling must also be used otherwise managed termination protection doesn’t work. When managed termination protection is on, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling group that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each instance in the Auto Scaling group must have instance protection from scale-in actions on as well. For more information, see Instance Protection in the AWS Auto Scaling User Guide . When managed termination protection is off, your Amazon EC2 instances aren’t protected from termination when the Auto Scaling group scales in.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.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_ecs import mixins as ecs_mixins

auto_scaling_group_provider_property = ecs_mixins.CfnCapacityProviderPropsMixin.AutoScalingGroupProviderProperty(
    auto_scaling_group_arn="autoScalingGroupArn",
    managed_draining="managedDraining",
    managed_scaling=ecs_mixins.CfnCapacityProviderPropsMixin.ManagedScalingProperty(
        instance_warmup_period=123,
        maximum_scaling_step_size=123,
        minimum_scaling_step_size=123,
        status="status",
        target_capacity=123
    ),
    managed_termination_protection="managedTerminationProtection"
)

Attributes

auto_scaling_group_arn

The Amazon Resource Name (ARN) that identifies the Auto Scaling group, or the Auto Scaling group name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider-autoscalinggrouparn

managed_draining

The managed draining option for the Auto Scaling group capacity provider.

When you enable this, Amazon ECS manages and gracefully drains the EC2 container instances that are in the Auto Scaling group capacity provider.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider-manageddraining

managed_scaling

The managed scaling settings for the Auto Scaling group capacity provider.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider-managedscaling

managed_termination_protection

The managed termination protection setting to use for the Auto Scaling group capacity provider.

This determines whether the Auto Scaling group has managed termination protection. The default is off. .. epigraph:

When using managed termination protection, managed scaling must also be used otherwise managed termination protection doesn't work.

When managed termination protection is on, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling group that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each instance in the Auto Scaling group must have instance protection from scale-in actions on as well. For more information, see Instance Protection in the AWS Auto Scaling User Guide .

When managed termination protection is off, your Amazon EC2 instances aren’t protected from termination when the Auto Scaling group scales in.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider-managedterminationprotection

BaselineEbsBandwidthMbpsRequestProperty

class CfnCapacityProviderPropsMixin.BaselineEbsBandwidthMbpsRequestProperty(*, max=None, min=None)

Bases: object

The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps) for instance type selection.

This is important for workloads with high storage I/O requirements.

Parameters:
  • max (Union[int, float, None]) – The maximum baseline Amazon EBS bandwidth in Mbps. Instance types with higher Amazon EBS bandwidth are excluded from selection.

  • min (Union[int, float, None]) – The minimum baseline Amazon EBS bandwidth in Mbps. Instance types with lower Amazon EBS bandwidth are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest.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_ecs import mixins as ecs_mixins

baseline_ebs_bandwidth_mbps_request_property = ecs_mixins.CfnCapacityProviderPropsMixin.BaselineEbsBandwidthMbpsRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum baseline Amazon EBS bandwidth in Mbps.

Instance types with higher Amazon EBS bandwidth are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest.html#cfn-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-max

min

The minimum baseline Amazon EBS bandwidth in Mbps.

Instance types with lower Amazon EBS bandwidth are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest.html#cfn-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-min

InfrastructureOptimizationProperty

class CfnCapacityProviderPropsMixin.InfrastructureOptimizationProperty(*, scale_in_after=None)

Bases: object

The configuration that controls how Amazon ECS optimizes your infrastructure.

Parameters:

scale_in_after (Union[int, float, None]) – This parameter defines the number of seconds Amazon ECS Managed Instances waits before optimizing EC2 instances that have become idle or underutilized. A longer delay increases the likelihood of placing new tasks on idle or underutilized instances instances, reducing startup time. A shorter delay helps reduce infrastructure costs by optimizing idle or underutilized instances,instances more quickly. Valid values are: - null - Uses the default optimization behavior. - -1 - Disables automatic infrastructure optimization. - A value between 0 and 3600 (inclusive) - Specifies the number of seconds to wait before optimizing instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-infrastructureoptimization.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_ecs import mixins as ecs_mixins

infrastructure_optimization_property = ecs_mixins.CfnCapacityProviderPropsMixin.InfrastructureOptimizationProperty(
    scale_in_after=123
)

Attributes

scale_in_after

This parameter defines the number of seconds Amazon ECS Managed Instances waits before optimizing EC2 instances that have become idle or underutilized.

A longer delay increases the likelihood of placing new tasks on idle or underutilized instances instances, reducing startup time. A shorter delay helps reduce infrastructure costs by optimizing idle or underutilized instances,instances more quickly.

Valid values are:

  • null - Uses the default optimization behavior.

  • -1 - Disables automatic infrastructure optimization.

  • A value between 0 and 3600 (inclusive) - Specifies the number of seconds to wait before optimizing instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-infrastructureoptimization.html#cfn-ecs-capacityprovider-infrastructureoptimization-scaleinafter

InstanceLaunchTemplateProperty

class CfnCapacityProviderPropsMixin.InstanceLaunchTemplateProperty(*, ec2_instance_profile_arn=None, instance_requirements=None, monitoring=None, network_configuration=None, storage_configuration=None)

Bases: object

The launch template configuration for Amazon ECS Managed Instances.

This defines how Amazon ECS launches Amazon EC2 instances, including the instance profile for your tasks, network and storage configuration, capacity options, and instance requirements for flexible instance type selection.

Parameters:
  • ec2_instance_profile_arn (Optional[str]) – The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances. This instance profile must include the necessary permissions for your tasks to access AWS services and resources. For more information, see Amazon ECS instance profile for Managed Instances in the Amazon ECS Developer Guide .

  • instance_requirements (Union[IResolvable, InstanceRequirementsRequestProperty, Dict[str, Any], None]) – The instance requirements. You can specify:. - The instance types - Instance requirements such as vCPU count, memory, network performance, and accelerator specifications Amazon ECS automatically selects the instances that match the specified criteria.

  • monitoring (Optional[str]) – CloudWatch provides two categories of monitoring: basic monitoring and detailed monitoring. By default, your managed instance is configured for basic monitoring. You can optionally enable detailed monitoring to help you more quickly identify and act on operational issues. You can enable or turn off detailed monitoring at launch or when the managed instance is running or stopped. For more information, see Detailed monitoring for Amazon ECS Managed Instances in the Amazon ECS Developer Guide.

  • network_configuration (Union[IResolvable, ManagedInstancesNetworkConfigurationProperty, Dict[str, Any], None]) – The network configuration for Amazon ECS Managed Instances. This specifies the subnets and security groups that instances use for network connectivity.

  • storage_configuration (Union[IResolvable, ManagedInstancesStorageConfigurationProperty, Dict[str, Any], None]) – The storage configuration for Amazon ECS Managed Instances. This defines the root volume size and type for the instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.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_ecs import mixins as ecs_mixins

instance_launch_template_property = ecs_mixins.CfnCapacityProviderPropsMixin.InstanceLaunchTemplateProperty(
    ec2_instance_profile_arn="ec2InstanceProfileArn",
    instance_requirements=ecs_mixins.CfnCapacityProviderPropsMixin.InstanceRequirementsRequestProperty(
        accelerator_count=ecs_mixins.CfnCapacityProviderPropsMixin.AcceleratorCountRequestProperty(
            max=123,
            min=123
        ),
        accelerator_manufacturers=["acceleratorManufacturers"],
        accelerator_names=["acceleratorNames"],
        accelerator_total_memory_mi_b=ecs_mixins.CfnCapacityProviderPropsMixin.AcceleratorTotalMemoryMiBRequestProperty(
            max=123,
            min=123
        ),
        accelerator_types=["acceleratorTypes"],
        allowed_instance_types=["allowedInstanceTypes"],
        bare_metal="bareMetal",
        baseline_ebs_bandwidth_mbps=ecs_mixins.CfnCapacityProviderPropsMixin.BaselineEbsBandwidthMbpsRequestProperty(
            max=123,
            min=123
        ),
        burstable_performance="burstablePerformance",
        cpu_manufacturers=["cpuManufacturers"],
        excluded_instance_types=["excludedInstanceTypes"],
        instance_generations=["instanceGenerations"],
        local_storage="localStorage",
        local_storage_types=["localStorageTypes"],
        max_spot_price_as_percentage_of_optimal_on_demand_price=123,
        memory_gi_bPer_vCpu=ecs_mixins.CfnCapacityProviderPropsMixin.MemoryGiBPerVCpuRequestProperty(
            max=123,
            min=123
        ),
        memory_mi_b=ecs_mixins.CfnCapacityProviderPropsMixin.MemoryMiBRequestProperty(
            max=123,
            min=123
        ),
        network_bandwidth_gbps=ecs_mixins.CfnCapacityProviderPropsMixin.NetworkBandwidthGbpsRequestProperty(
            max=123,
            min=123
        ),
        network_interface_count=ecs_mixins.CfnCapacityProviderPropsMixin.NetworkInterfaceCountRequestProperty(
            max=123,
            min=123
        ),
        on_demand_max_price_percentage_over_lowest_price=123,
        require_hibernate_support=False,
        spot_max_price_percentage_over_lowest_price=123,
        total_local_storage_gb=ecs_mixins.CfnCapacityProviderPropsMixin.TotalLocalStorageGBRequestProperty(
            max=123,
            min=123
        ),
        v_cpu_count=ecs_mixins.CfnCapacityProviderPropsMixin.VCpuCountRangeRequestProperty(
            max=123,
            min=123
        )
    ),
    monitoring="monitoring",
    network_configuration=ecs_mixins.CfnCapacityProviderPropsMixin.ManagedInstancesNetworkConfigurationProperty(
        security_groups=["securityGroups"],
        subnets=["subnets"]
    ),
    storage_configuration=ecs_mixins.CfnCapacityProviderPropsMixin.ManagedInstancesStorageConfigurationProperty(
        storage_size_gi_b=123
    )
)

Attributes

ec2_instance_profile_arn

The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances.

This instance profile must include the necessary permissions for your tasks to access AWS services and resources.

For more information, see Amazon ECS instance profile for Managed Instances in the Amazon ECS Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-ec2instanceprofilearn

instance_requirements

.

  • The instance types

  • Instance requirements such as vCPU count, memory, network performance, and accelerator specifications

Amazon ECS automatically selects the instances that match the specified criteria.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-instancerequirements

Type:

The instance requirements. You can specify

monitoring

basic monitoring and detailed monitoring.

By default, your managed instance is configured for basic monitoring. You can optionally enable detailed monitoring to help you more quickly identify and act on operational issues. You can enable or turn off detailed monitoring at launch or when the managed instance is running or stopped. For more information, see Detailed monitoring for Amazon ECS Managed Instances in the Amazon ECS Developer Guide.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-monitoring

Type:

CloudWatch provides two categories of monitoring

network_configuration

The network configuration for Amazon ECS Managed Instances.

This specifies the subnets and security groups that instances use for network connectivity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-networkconfiguration

storage_configuration

The storage configuration for Amazon ECS Managed Instances.

This defines the root volume size and type for the instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-storageconfiguration

InstanceRequirementsRequestProperty

class CfnCapacityProviderPropsMixin.InstanceRequirementsRequestProperty(*, accelerator_count=None, accelerator_manufacturers=None, accelerator_names=None, accelerator_total_memory_mib=None, accelerator_types=None, allowed_instance_types=None, bare_metal=None, baseline_ebs_bandwidth_mbps=None, burstable_performance=None, cpu_manufacturers=None, excluded_instance_types=None, instance_generations=None, local_storage=None, local_storage_types=None, max_spot_price_as_percentage_of_optimal_on_demand_price=None, memory_gib_per_v_cpu=None, memory_mib=None, network_bandwidth_gbps=None, network_interface_count=None, on_demand_max_price_percentage_over_lowest_price=None, require_hibernate_support=None, spot_max_price_percentage_over_lowest_price=None, total_local_storage_gb=None, v_cpu_count=None)

Bases: object

The instance requirements for attribute-based instance type selection.

Instead of specifying exact instance types, you define requirements such as vCPU count, memory size, network performance, and accelerator specifications. Amazon ECS automatically selects Amazon EC2 instance types that match these requirements, providing flexibility and helping to mitigate capacity constraints.

Parameters:
  • accelerator_count (Union[IResolvable, AcceleratorCountRequestProperty, Dict[str, Any], None]) – The minimum and maximum number of accelerators for the instance types. This is used when you need instances with specific numbers of GPUs or other accelerators.

  • accelerator_manufacturers (Optional[Sequence[str]]) – The accelerator manufacturers to include. You can specify nvidia , amd , amazon-web-services , or xilinx depending on your accelerator requirements.

  • accelerator_names (Optional[Sequence[str]]) – The specific accelerator names to include. For example, you can specify a100 , v100 , k80 , or other specific accelerator models.

  • accelerator_total_memory_mib (Union[IResolvable, AcceleratorTotalMemoryMiBRequestProperty, Dict[str, Any], None]) – The minimum and maximum total accelerator memory in mebibytes (MiB). This is important for GPU workloads that require specific amounts of video memory.

  • accelerator_types (Optional[Sequence[str]]) – The accelerator types to include. You can specify gpu for graphics processing units, fpga for field programmable gate arrays, or inference for machine learning inference accelerators.

  • allowed_instance_types (Optional[Sequence[str]]) – The instance types to include in the selection. When specified, Amazon ECS only considers these instance types, subject to the other requirements specified.

  • bare_metal (Optional[str]) – Indicates whether to include bare metal instance types. Set to included to allow bare metal instances, excluded to exclude them, or required to use only bare metal instances.

  • baseline_ebs_bandwidth_mbps (Union[IResolvable, BaselineEbsBandwidthMbpsRequestProperty, Dict[str, Any], None]) – The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps). This is important for workloads with high storage I/O requirements.

  • burstable_performance (Optional[str]) – Indicates whether to include burstable performance instance types (T2, T3, T3a, T4g). Set to included to allow burstable instances, excluded to exclude them, or required to use only burstable instances.

  • cpu_manufacturers (Optional[Sequence[str]]) – The CPU manufacturers to include or exclude. You can specify intel , amd , or amazon-web-services to control which CPU types are used for your workloads.

  • excluded_instance_types (Optional[Sequence[str]]) – The instance types to exclude from selection. Use this to prevent Amazon ECS from selecting specific instance types that may not be suitable for your workloads.

  • instance_generations (Optional[Sequence[str]]) – The instance generations to include. You can specify current to use the latest generation instances, or previous to include previous generation instances for cost optimization.

  • local_storage (Optional[str]) – Indicates whether to include instance types with local storage. Set to included to allow local storage, excluded to exclude it, or required to use only instances with local storage.

  • local_storage_types (Optional[Sequence[str]]) – The local storage types to include. You can specify hdd for hard disk drives, ssd for solid state drives, or both.

  • max_spot_price_as_percentage_of_optimal_on_demand_price (Union[int, float, None]) – The maximum price for Spot instances as a percentage of the optimal On-Demand price. This provides more precise cost control for Spot instance selection.

  • memory_gib_per_v_cpu (Union[IResolvable, MemoryGiBPerVCpuRequestProperty, Dict[str, Any], None]) – The minimum and maximum amount of memory per vCPU in gibibytes (GiB). This helps ensure that instance types have the appropriate memory-to-CPU ratio for your workloads.

  • memory_mib (Union[IResolvable, MemoryMiBRequestProperty, Dict[str, Any], None]) – The minimum and maximum amount of memory in mebibytes (MiB) for the instance types. Amazon ECS selects instance types that have memory within this range.

  • network_bandwidth_gbps (Union[IResolvable, NetworkBandwidthGbpsRequestProperty, Dict[str, Any], None]) – The minimum and maximum network bandwidth in gigabits per second (Gbps). This is crucial for network-intensive workloads that require high throughput.

  • network_interface_count (Union[IResolvable, NetworkInterfaceCountRequestProperty, Dict[str, Any], None]) – The minimum and maximum number of network interfaces for the instance types. This is useful for workloads that require multiple network interfaces.

  • on_demand_max_price_percentage_over_lowest_price (Union[int, float, None]) – The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from either the lowest priced current generation instance types or, failing that, the lowest priced previous generation instance types that match your attributes. When Amazon ECS selects instance types with your attributes, we will exclude instance types whose price exceeds your specified threshold.

  • require_hibernate_support (Union[bool, IResolvable, None]) – Indicates whether the instance types must support hibernation. When set to true , only instance types that support hibernation are selected.

  • spot_max_price_percentage_over_lowest_price (Union[int, float, None]) – The maximum price for Spot instances as a percentage over the lowest priced On-Demand instance. This helps control Spot instance costs while maintaining access to capacity.

  • total_local_storage_gb (Union[IResolvable, TotalLocalStorageGBRequestProperty, Dict[str, Any], None]) – The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.

  • v_cpu_count (Union[IResolvable, VCpuCountRangeRequestProperty, Dict[str, Any], None]) – The minimum and maximum number of vCPUs for the instance types. Amazon ECS selects instance types that have vCPU counts within this range.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.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_ecs import mixins as ecs_mixins

instance_requirements_request_property = ecs_mixins.CfnCapacityProviderPropsMixin.InstanceRequirementsRequestProperty(
    accelerator_count=ecs_mixins.CfnCapacityProviderPropsMixin.AcceleratorCountRequestProperty(
        max=123,
        min=123
    ),
    accelerator_manufacturers=["acceleratorManufacturers"],
    accelerator_names=["acceleratorNames"],
    accelerator_total_memory_mi_b=ecs_mixins.CfnCapacityProviderPropsMixin.AcceleratorTotalMemoryMiBRequestProperty(
        max=123,
        min=123
    ),
    accelerator_types=["acceleratorTypes"],
    allowed_instance_types=["allowedInstanceTypes"],
    bare_metal="bareMetal",
    baseline_ebs_bandwidth_mbps=ecs_mixins.CfnCapacityProviderPropsMixin.BaselineEbsBandwidthMbpsRequestProperty(
        max=123,
        min=123
    ),
    burstable_performance="burstablePerformance",
    cpu_manufacturers=["cpuManufacturers"],
    excluded_instance_types=["excludedInstanceTypes"],
    instance_generations=["instanceGenerations"],
    local_storage="localStorage",
    local_storage_types=["localStorageTypes"],
    max_spot_price_as_percentage_of_optimal_on_demand_price=123,
    memory_gi_bPer_vCpu=ecs_mixins.CfnCapacityProviderPropsMixin.MemoryGiBPerVCpuRequestProperty(
        max=123,
        min=123
    ),
    memory_mi_b=ecs_mixins.CfnCapacityProviderPropsMixin.MemoryMiBRequestProperty(
        max=123,
        min=123
    ),
    network_bandwidth_gbps=ecs_mixins.CfnCapacityProviderPropsMixin.NetworkBandwidthGbpsRequestProperty(
        max=123,
        min=123
    ),
    network_interface_count=ecs_mixins.CfnCapacityProviderPropsMixin.NetworkInterfaceCountRequestProperty(
        max=123,
        min=123
    ),
    on_demand_max_price_percentage_over_lowest_price=123,
    require_hibernate_support=False,
    spot_max_price_percentage_over_lowest_price=123,
    total_local_storage_gb=ecs_mixins.CfnCapacityProviderPropsMixin.TotalLocalStorageGBRequestProperty(
        max=123,
        min=123
    ),
    v_cpu_count=ecs_mixins.CfnCapacityProviderPropsMixin.VCpuCountRangeRequestProperty(
        max=123,
        min=123
    )
)

Attributes

accelerator_count

The minimum and maximum number of accelerators for the instance types.

This is used when you need instances with specific numbers of GPUs or other accelerators.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratorcount

accelerator_manufacturers

The accelerator manufacturers to include.

You can specify nvidia , amd , amazon-web-services , or xilinx depending on your accelerator requirements.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratormanufacturers

accelerator_names

The specific accelerator names to include.

For example, you can specify a100 , v100 , k80 , or other specific accelerator models.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratornames

accelerator_total_memory_mib

The minimum and maximum total accelerator memory in mebibytes (MiB).

This is important for GPU workloads that require specific amounts of video memory.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratortotalmemorymib

accelerator_types

The accelerator types to include.

You can specify gpu for graphics processing units, fpga for field programmable gate arrays, or inference for machine learning inference accelerators.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratortypes

allowed_instance_types

The instance types to include in the selection.

When specified, Amazon ECS only considers these instance types, subject to the other requirements specified.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-allowedinstancetypes

bare_metal

Indicates whether to include bare metal instance types.

Set to included to allow bare metal instances, excluded to exclude them, or required to use only bare metal instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-baremetal

baseline_ebs_bandwidth_mbps

The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps).

This is important for workloads with high storage I/O requirements.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-baselineebsbandwidthmbps

burstable_performance

Indicates whether to include burstable performance instance types (T2, T3, T3a, T4g).

Set to included to allow burstable instances, excluded to exclude them, or required to use only burstable instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-burstableperformance

cpu_manufacturers

The CPU manufacturers to include or exclude.

You can specify intel , amd , or amazon-web-services to control which CPU types are used for your workloads.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-cpumanufacturers

excluded_instance_types

The instance types to exclude from selection.

Use this to prevent Amazon ECS from selecting specific instance types that may not be suitable for your workloads.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-excludedinstancetypes

instance_generations

The instance generations to include.

You can specify current to use the latest generation instances, or previous to include previous generation instances for cost optimization.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-instancegenerations

local_storage

Indicates whether to include instance types with local storage.

Set to included to allow local storage, excluded to exclude it, or required to use only instances with local storage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-localstorage

local_storage_types

The local storage types to include.

You can specify hdd for hard disk drives, ssd for solid state drives, or both.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-localstoragetypes

max_spot_price_as_percentage_of_optimal_on_demand_price

The maximum price for Spot instances as a percentage of the optimal On-Demand price.

This provides more precise cost control for Spot instance selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-maxspotpriceaspercentageofoptimalondemandprice

memory_gib_per_v_cpu

The minimum and maximum amount of memory per vCPU in gibibytes (GiB).

This helps ensure that instance types have the appropriate memory-to-CPU ratio for your workloads.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-memorygibpervcpu

memory_mib

The minimum and maximum amount of memory in mebibytes (MiB) for the instance types.

Amazon ECS selects instance types that have memory within this range.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-memorymib

network_bandwidth_gbps

The minimum and maximum network bandwidth in gigabits per second (Gbps).

This is crucial for network-intensive workloads that require high throughput.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-networkbandwidthgbps

network_interface_count

The minimum and maximum number of network interfaces for the instance types.

This is useful for workloads that require multiple network interfaces.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-networkinterfacecount

on_demand_max_price_percentage_over_lowest_price

The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price.

The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from either the lowest priced current generation instance types or, failing that, the lowest priced previous generation instance types that match your attributes. When Amazon ECS selects instance types with your attributes, we will exclude instance types whose price exceeds your specified threshold.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-ondemandmaxpricepercentageoverlowestprice

require_hibernate_support

Indicates whether the instance types must support hibernation.

When set to true , only instance types that support hibernation are selected.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-requirehibernatesupport

spot_max_price_percentage_over_lowest_price

The maximum price for Spot instances as a percentage over the lowest priced On-Demand instance.

This helps control Spot instance costs while maintaining access to capacity.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-spotmaxpricepercentageoverlowestprice

total_local_storage_gb

The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-totallocalstoragegb

v_cpu_count

The minimum and maximum number of vCPUs for the instance types.

Amazon ECS selects instance types that have vCPU counts within this range.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-vcpucount

ManagedInstancesNetworkConfigurationProperty

class CfnCapacityProviderPropsMixin.ManagedInstancesNetworkConfigurationProperty(*, security_groups=None, subnets=None)

Bases: object

The network configuration for Amazon ECS Managed Instances.

This specifies the VPC subnets and security groups that instances use for network connectivity. Amazon ECS Managed Instances support multiple network modes including awsvpc (instances receive ENIs for task isolation), host (instances share network namespace with tasks), and none (no external network connectivity), ensuring backward compatibility for migrating workloads from Fargate or Amazon EC2.

Parameters:
  • security_groups (Optional[Sequence[str]]) – The list of security group IDs to apply to Amazon ECS Managed Instances. These security groups control the network traffic allowed to and from the instances.

  • subnets (Optional[Sequence[str]]) – The list of subnet IDs where Amazon ECS can launch Amazon ECS Managed Instances. Instances are distributed across the specified subnets for high availability. All subnets must be in the same VPC.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration.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_ecs import mixins as ecs_mixins

managed_instances_network_configuration_property = ecs_mixins.CfnCapacityProviderPropsMixin.ManagedInstancesNetworkConfigurationProperty(
    security_groups=["securityGroups"],
    subnets=["subnets"]
)

Attributes

security_groups

The list of security group IDs to apply to Amazon ECS Managed Instances.

These security groups control the network traffic allowed to and from the instances.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration.html#cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-securitygroups

subnets

The list of subnet IDs where Amazon ECS can launch Amazon ECS Managed Instances.

Instances are distributed across the specified subnets for high availability. All subnets must be in the same VPC.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration.html#cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-subnets

ManagedInstancesProviderProperty

class CfnCapacityProviderPropsMixin.ManagedInstancesProviderProperty(*, infrastructure_optimization=None, infrastructure_role_arn=None, instance_launch_template=None, propagate_tags=None)

Bases: object

The configuration for a Amazon ECS Managed Instances provider.

Amazon ECS uses this configuration to automatically launch, manage, and terminate Amazon EC2 instances on your behalf. Managed instances provide access to the full range of Amazon EC2 instance types and features while offloading infrastructure management to AWS .

Parameters:
  • infrastructure_optimization (Union[IResolvable, InfrastructureOptimizationProperty, Dict[str, Any], None]) – Defines how Amazon ECS Managed Instances optimizes the infrastastructure in your capacity provider. Configure it to turn on or off the infrastructure optimization in your capacity provider, and to control the idle or underutilized EC2 instances optimization delay.

  • infrastructure_role_arn (Optional[str]) – The Amazon Resource Name (ARN) of the infrastructure role that Amazon ECS assumes to manage instances. This role must include permissions for Amazon EC2 instance lifecycle management, networking, and any additional AWS services required for your workloads. For more information, see Amazon ECS infrastructure IAM role in the Amazon ECS Developer Guide .

  • instance_launch_template (Union[IResolvable, InstanceLaunchTemplateProperty, Dict[str, Any], None]) – The launch template that defines how Amazon ECS launches Amazon ECS Managed Instances. This includes the instance profile for your tasks, network and storage configuration, and instance requirements that determine which Amazon EC2 instance types can be used. For more information, see Store instance launch parameters in Amazon EC2 launch templates in the Amazon EC2 User Guide .

  • propagate_tags (Optional[str]) – Determines whether tags from the capacity provider are automatically applied to Amazon ECS Managed Instances. This helps with cost allocation and resource management by ensuring consistent tagging across your infrastructure.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.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_ecs import mixins as ecs_mixins

managed_instances_provider_property = ecs_mixins.CfnCapacityProviderPropsMixin.ManagedInstancesProviderProperty(
    infrastructure_optimization=ecs_mixins.CfnCapacityProviderPropsMixin.InfrastructureOptimizationProperty(
        scale_in_after=123
    ),
    infrastructure_role_arn="infrastructureRoleArn",
    instance_launch_template=ecs_mixins.CfnCapacityProviderPropsMixin.InstanceLaunchTemplateProperty(
        ec2_instance_profile_arn="ec2InstanceProfileArn",
        instance_requirements=ecs_mixins.CfnCapacityProviderPropsMixin.InstanceRequirementsRequestProperty(
            accelerator_count=ecs_mixins.CfnCapacityProviderPropsMixin.AcceleratorCountRequestProperty(
                max=123,
                min=123
            ),
            accelerator_manufacturers=["acceleratorManufacturers"],
            accelerator_names=["acceleratorNames"],
            accelerator_total_memory_mi_b=ecs_mixins.CfnCapacityProviderPropsMixin.AcceleratorTotalMemoryMiBRequestProperty(
                max=123,
                min=123
            ),
            accelerator_types=["acceleratorTypes"],
            allowed_instance_types=["allowedInstanceTypes"],
            bare_metal="bareMetal",
            baseline_ebs_bandwidth_mbps=ecs_mixins.CfnCapacityProviderPropsMixin.BaselineEbsBandwidthMbpsRequestProperty(
                max=123,
                min=123
            ),
            burstable_performance="burstablePerformance",
            cpu_manufacturers=["cpuManufacturers"],
            excluded_instance_types=["excludedInstanceTypes"],
            instance_generations=["instanceGenerations"],
            local_storage="localStorage",
            local_storage_types=["localStorageTypes"],
            max_spot_price_as_percentage_of_optimal_on_demand_price=123,
            memory_gi_bPer_vCpu=ecs_mixins.CfnCapacityProviderPropsMixin.MemoryGiBPerVCpuRequestProperty(
                max=123,
                min=123
            ),
            memory_mi_b=ecs_mixins.CfnCapacityProviderPropsMixin.MemoryMiBRequestProperty(
                max=123,
                min=123
            ),
            network_bandwidth_gbps=ecs_mixins.CfnCapacityProviderPropsMixin.NetworkBandwidthGbpsRequestProperty(
                max=123,
                min=123
            ),
            network_interface_count=ecs_mixins.CfnCapacityProviderPropsMixin.NetworkInterfaceCountRequestProperty(
                max=123,
                min=123
            ),
            on_demand_max_price_percentage_over_lowest_price=123,
            require_hibernate_support=False,
            spot_max_price_percentage_over_lowest_price=123,
            total_local_storage_gb=ecs_mixins.CfnCapacityProviderPropsMixin.TotalLocalStorageGBRequestProperty(
                max=123,
                min=123
            ),
            v_cpu_count=ecs_mixins.CfnCapacityProviderPropsMixin.VCpuCountRangeRequestProperty(
                max=123,
                min=123
            )
        ),
        monitoring="monitoring",
        network_configuration=ecs_mixins.CfnCapacityProviderPropsMixin.ManagedInstancesNetworkConfigurationProperty(
            security_groups=["securityGroups"],
            subnets=["subnets"]
        ),
        storage_configuration=ecs_mixins.CfnCapacityProviderPropsMixin.ManagedInstancesStorageConfigurationProperty(
            storage_size_gi_b=123
        )
    ),
    propagate_tags="propagateTags"
)

Attributes

infrastructure_optimization

Defines how Amazon ECS Managed Instances optimizes the infrastastructure in your capacity provider.

Configure it to turn on or off the infrastructure optimization in your capacity provider, and to control the idle or underutilized EC2 instances optimization delay.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-infrastructureoptimization

infrastructure_role_arn

The Amazon Resource Name (ARN) of the infrastructure role that Amazon ECS assumes to manage instances.

This role must include permissions for Amazon EC2 instance lifecycle management, networking, and any additional AWS services required for your workloads.

For more information, see Amazon ECS infrastructure IAM role in the Amazon ECS Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-infrastructurerolearn

instance_launch_template

The launch template that defines how Amazon ECS launches Amazon ECS Managed Instances.

This includes the instance profile for your tasks, network and storage configuration, and instance requirements that determine which Amazon EC2 instance types can be used.

For more information, see Store instance launch parameters in Amazon EC2 launch templates in the Amazon EC2 User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-instancelaunchtemplate

propagate_tags

Determines whether tags from the capacity provider are automatically applied to Amazon ECS Managed Instances.

This helps with cost allocation and resource management by ensuring consistent tagging across your infrastructure.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-propagatetags

ManagedInstancesStorageConfigurationProperty

class CfnCapacityProviderPropsMixin.ManagedInstancesStorageConfigurationProperty(*, storage_size_gib=None)

Bases: object

The storage configuration for Amazon ECS Managed Instances.

This defines the root volume configuration for the instances.

Parameters:

storage_size_gib (Union[int, float, None]) – The size of the tasks volume.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesstorageconfiguration.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_ecs import mixins as ecs_mixins

managed_instances_storage_configuration_property = ecs_mixins.CfnCapacityProviderPropsMixin.ManagedInstancesStorageConfigurationProperty(
    storage_size_gi_b=123
)

Attributes

storage_size_gib

The size of the tasks volume.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesstorageconfiguration.html#cfn-ecs-capacityprovider-managedinstancesstorageconfiguration-storagesizegib

ManagedScalingProperty

class CfnCapacityProviderPropsMixin.ManagedScalingProperty(*, instance_warmup_period=None, maximum_scaling_step_size=None, minimum_scaling_step_size=None, status=None, target_capacity=None)

Bases: object

The managed scaling settings for the Auto Scaling group capacity provider.

When managed scaling is turned on, Amazon ECS manages the scale-in and scale-out actions of the Auto Scaling group. Amazon ECS manages a target tracking scaling policy using an Amazon ECS managed CloudWatch metric with the specified targetCapacity value as the target value for the metric. For more information, see Using managed scaling in the Amazon Elastic Container Service Developer Guide .

If managed scaling is off, the user must manage the scaling of the Auto Scaling group.

Parameters:
  • instance_warmup_period (Union[int, float, None]) – The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group. If this parameter is omitted, the default value of 300 seconds is used.

  • maximum_scaling_step_size (Union[int, float, None]) – The maximum number of Amazon EC2 instances that Amazon ECS will scale out at one time. If this parameter is omitted, the default value of 10000 is used.

  • minimum_scaling_step_size (Union[int, float, None]) – The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one time. The scale in process is not affected by this parameter If this parameter is omitted, the default value of 1 is used. When additional capacity is required, Amazon ECS will scale up the minimum scaling step size even if the actual demand is less than the minimum scaling step size.

  • status (Optional[str]) – Determines whether to use managed scaling for the capacity provider.

  • target_capacity (Union[int, float, None]) – The target capacity utilization as a percentage for the capacity provider. The specified value must be greater than 0 and less than or equal to 100 . For example, if you want the capacity provider to maintain 10% spare capacity, then that means the utilization is 90%, so use a targetCapacity of 90 . The default value of 100 percent results in the Amazon EC2 instances in your Auto Scaling group being completely used.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.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_ecs import mixins as ecs_mixins

managed_scaling_property = ecs_mixins.CfnCapacityProviderPropsMixin.ManagedScalingProperty(
    instance_warmup_period=123,
    maximum_scaling_step_size=123,
    minimum_scaling_step_size=123,
    status="status",
    target_capacity=123
)

Attributes

instance_warmup_period

The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group.

If this parameter is omitted, the default value of 300 seconds is used.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-instancewarmupperiod

maximum_scaling_step_size

The maximum number of Amazon EC2 instances that Amazon ECS will scale out at one time.

If this parameter is omitted, the default value of 10000 is used.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-maximumscalingstepsize

minimum_scaling_step_size

The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one time.

The scale in process is not affected by this parameter If this parameter is omitted, the default value of 1 is used.

When additional capacity is required, Amazon ECS will scale up the minimum scaling step size even if the actual demand is less than the minimum scaling step size.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-minimumscalingstepsize

status

Determines whether to use managed scaling for the capacity provider.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-status

target_capacity

The target capacity utilization as a percentage for the capacity provider.

The specified value must be greater than 0 and less than or equal to 100 . For example, if you want the capacity provider to maintain 10% spare capacity, then that means the utilization is 90%, so use a targetCapacity of 90 . The default value of 100 percent results in the Amazon EC2 instances in your Auto Scaling group being completely used.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedscaling.html#cfn-ecs-capacityprovider-managedscaling-targetcapacity

MemoryGiBPerVCpuRequestProperty

class CfnCapacityProviderPropsMixin.MemoryGiBPerVCpuRequestProperty(*, max=None, min=None)

Bases: object

The minimum and maximum amount of memory per vCPU in gibibytes (GiB).

This helps ensure that instance types have the appropriate memory-to-CPU ratio for your workloads.

Parameters:
  • max (Union[int, float, None]) – The maximum amount of memory per vCPU in GiB. Instance types with a higher memory-to-vCPU ratio are excluded from selection.

  • min (Union[int, float, None]) – The minimum amount of memory per vCPU in GiB. Instance types with a lower memory-to-vCPU ratio are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorygibpervcpurequest.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_ecs import mixins as ecs_mixins

memory_gi_bPer_vCpu_request_property = ecs_mixins.CfnCapacityProviderPropsMixin.MemoryGiBPerVCpuRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum amount of memory per vCPU in GiB.

Instance types with a higher memory-to-vCPU ratio are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorygibpervcpurequest.html#cfn-ecs-capacityprovider-memorygibpervcpurequest-max

min

The minimum amount of memory per vCPU in GiB.

Instance types with a lower memory-to-vCPU ratio are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorygibpervcpurequest.html#cfn-ecs-capacityprovider-memorygibpervcpurequest-min

MemoryMiBRequestProperty

class CfnCapacityProviderPropsMixin.MemoryMiBRequestProperty(*, max=None, min=None)

Bases: object

The minimum and maximum amount of memory in mebibytes (MiB) for instance type selection.

This ensures that selected instance types have adequate memory for your workloads.

Parameters:
  • max (Union[int, float, None]) – The maximum amount of memory in MiB. Instance types with more memory than this value are excluded from selection.

  • min (Union[int, float, None]) – The minimum amount of memory in MiB. Instance types with less memory than this value are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorymibrequest.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_ecs import mixins as ecs_mixins

memory_mi_bRequest_property = ecs_mixins.CfnCapacityProviderPropsMixin.MemoryMiBRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum amount of memory in MiB.

Instance types with more memory than this value are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorymibrequest.html#cfn-ecs-capacityprovider-memorymibrequest-max

min

The minimum amount of memory in MiB.

Instance types with less memory than this value are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorymibrequest.html#cfn-ecs-capacityprovider-memorymibrequest-min

NetworkBandwidthGbpsRequestProperty

class CfnCapacityProviderPropsMixin.NetworkBandwidthGbpsRequestProperty(*, max=None, min=None)

Bases: object

The minimum and maximum network bandwidth in gigabits per second (Gbps) for instance type selection.

This is important for network-intensive workloads.

Parameters:
  • max (Union[int, float, None]) – The maximum network bandwidth in Gbps. Instance types with higher network bandwidth are excluded from selection.

  • min (Union[int, float, None]) – The minimum network bandwidth in Gbps. Instance types with lower network bandwidth are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest.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_ecs import mixins as ecs_mixins

network_bandwidth_gbps_request_property = ecs_mixins.CfnCapacityProviderPropsMixin.NetworkBandwidthGbpsRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum network bandwidth in Gbps.

Instance types with higher network bandwidth are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest.html#cfn-ecs-capacityprovider-networkbandwidthgbpsrequest-max

min

The minimum network bandwidth in Gbps.

Instance types with lower network bandwidth are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest.html#cfn-ecs-capacityprovider-networkbandwidthgbpsrequest-min

NetworkInterfaceCountRequestProperty

class CfnCapacityProviderPropsMixin.NetworkInterfaceCountRequestProperty(*, max=None, min=None)

Bases: object

The minimum and maximum number of network interfaces for instance type selection.

This is useful for workloads that require multiple network interfaces.

Parameters:
  • max (Union[int, float, None]) – The maximum number of network interfaces. Instance types that support more network interfaces are excluded from selection.

  • min (Union[int, float, None]) – The minimum number of network interfaces. Instance types that support fewer network interfaces are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkinterfacecountrequest.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_ecs import mixins as ecs_mixins

network_interface_count_request_property = ecs_mixins.CfnCapacityProviderPropsMixin.NetworkInterfaceCountRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum number of network interfaces.

Instance types that support more network interfaces are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkinterfacecountrequest.html#cfn-ecs-capacityprovider-networkinterfacecountrequest-max

min

The minimum number of network interfaces.

Instance types that support fewer network interfaces are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkinterfacecountrequest.html#cfn-ecs-capacityprovider-networkinterfacecountrequest-min

TotalLocalStorageGBRequestProperty

class CfnCapacityProviderPropsMixin.TotalLocalStorageGBRequestProperty(*, max=None, min=None)

Bases: object

The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.

This is useful for workloads that require local storage for temporary data or caching.

Parameters:
  • max (Union[int, float, None]) – The maximum total local storage in GB. Instance types with more local storage are excluded from selection.

  • min (Union[int, float, None]) – The minimum total local storage in GB. Instance types with less local storage are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-totallocalstoragegbrequest.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_ecs import mixins as ecs_mixins

total_local_storage_gBRequest_property = ecs_mixins.CfnCapacityProviderPropsMixin.TotalLocalStorageGBRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum total local storage in GB.

Instance types with more local storage are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-totallocalstoragegbrequest.html#cfn-ecs-capacityprovider-totallocalstoragegbrequest-max

min

The minimum total local storage in GB.

Instance types with less local storage are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-totallocalstoragegbrequest.html#cfn-ecs-capacityprovider-totallocalstoragegbrequest-min

VCpuCountRangeRequestProperty

class CfnCapacityProviderPropsMixin.VCpuCountRangeRequestProperty(*, max=None, min=None)

Bases: object

The minimum and maximum number of vCPUs for instance type selection.

This allows you to specify a range of vCPU counts that meet your workload requirements.

Parameters:
  • max (Union[int, float, None]) – The maximum number of vCPUs. Instance types with more vCPUs than this value are excluded from selection.

  • min (Union[int, float, None]) – The minimum number of vCPUs. Instance types with fewer vCPUs than this value are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-vcpucountrangerequest.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_ecs import mixins as ecs_mixins

v_cpu_count_range_request_property = ecs_mixins.CfnCapacityProviderPropsMixin.VCpuCountRangeRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum number of vCPUs.

Instance types with more vCPUs than this value are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-vcpucountrangerequest.html#cfn-ecs-capacityprovider-vcpucountrangerequest-max

min

The minimum number of vCPUs.

Instance types with fewer vCPUs than this value are excluded from selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-vcpucountrangerequest.html#cfn-ecs-capacityprovider-vcpucountrangerequest-min