aws-cdk-lib 2.218.0__py3-none-any.whl → 2.219.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of aws-cdk-lib might be problematic. Click here for more details.

Files changed (35) hide show
  1. aws_cdk/__init__.py +19 -19
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.218.0.jsii.tgz → aws-cdk-lib@2.219.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_amazonmq/__init__.py +98 -87
  5. aws_cdk/aws_apigateway/__init__.py +39 -0
  6. aws_cdk/aws_bcmdataexports/__init__.py +9 -0
  7. aws_cdk/aws_bedrock/__init__.py +356 -1
  8. aws_cdk/aws_bedrockagentcore/__init__.py +297 -157
  9. aws_cdk/aws_codebuild/__init__.py +339 -62
  10. aws_cdk/aws_connect/__init__.py +9 -9
  11. aws_cdk/aws_cur/__init__.py +5 -3
  12. aws_cdk/aws_datasync/__init__.py +44 -22
  13. aws_cdk/aws_datazone/__init__.py +35 -33
  14. aws_cdk/aws_directoryservice/__init__.py +0 -29
  15. aws_cdk/aws_dms/__init__.py +3 -5
  16. aws_cdk/aws_ec2/__init__.py +2622 -22
  17. aws_cdk/aws_ecs/__init__.py +2681 -79
  18. aws_cdk/aws_entityresolution/__init__.py +18 -0
  19. aws_cdk/aws_greengrassv2/__init__.py +29 -0
  20. aws_cdk/aws_msk/__init__.py +4 -2
  21. aws_cdk/aws_networkfirewall/__init__.py +6 -2
  22. aws_cdk/aws_networkmanager/__init__.py +29 -29
  23. aws_cdk/aws_opensearchservice/__init__.py +58 -0
  24. aws_cdk/aws_opsworkscm/__init__.py +0 -29
  25. aws_cdk/aws_quicksight/__init__.py +38 -0
  26. aws_cdk/aws_rds/__init__.py +33 -14
  27. aws_cdk/aws_route53/__init__.py +8 -2
  28. aws_cdk/aws_servicecatalog/__init__.py +78 -86
  29. aws_cdk/aws_smsvoice/__init__.py +319 -0
  30. {aws_cdk_lib-2.218.0.dist-info → aws_cdk_lib-2.219.0.dist-info}/METADATA +2 -2
  31. {aws_cdk_lib-2.218.0.dist-info → aws_cdk_lib-2.219.0.dist-info}/RECORD +35 -35
  32. {aws_cdk_lib-2.218.0.dist-info → aws_cdk_lib-2.219.0.dist-info}/LICENSE +0 -0
  33. {aws_cdk_lib-2.218.0.dist-info → aws_cdk_lib-2.219.0.dist-info}/NOTICE +0 -0
  34. {aws_cdk_lib-2.218.0.dist-info → aws_cdk_lib-2.219.0.dist-info}/WHEEL +0 -0
  35. {aws_cdk_lib-2.218.0.dist-info → aws_cdk_lib-2.219.0.dist-info}/top_level.txt +0 -0
@@ -1696,6 +1696,108 @@ ecs.Ec2Service(self, "EC2Service",
1696
1696
  )
1697
1697
  ```
1698
1698
 
1699
+ ### Managed Instances Capacity Providers
1700
+
1701
+ Managed Instances Capacity Providers allow you to use AWS-managed EC2 instances for your ECS tasks while providing more control over instance selection than standard Fargate. AWS handles the instance lifecycle, patching, and maintenance while you can specify detailed instance requirements.
1702
+
1703
+ To create a Managed Instances Capacity Provider, you need to specify the required EC2 instance profile, and networking configuration. You can also define detailed instance requirements to control which types of instances are used for your workloads.
1704
+
1705
+ ```python
1706
+ # vpc: ec2.Vpc
1707
+ # infrastructure_role: iam.Role
1708
+ # instance_profile: iam.InstanceProfile
1709
+
1710
+
1711
+ cluster = ecs.Cluster(self, "Cluster", vpc=vpc)
1712
+
1713
+ # Create a Managed Instances Capacity Provider
1714
+ mi_capacity_provider = ecs.ManagedInstancesCapacityProvider(self, "MICapacityProvider",
1715
+ infrastructure_role=infrastructure_role,
1716
+ ec2_instance_profile=instance_profile,
1717
+ subnets=vpc.private_subnets,
1718
+ security_groups=[ec2.SecurityGroup(self, "MISecurityGroup", vpc=vpc)],
1719
+ instance_requirements=ec2.InstanceRequirementsConfig(
1720
+ v_cpu_count_min=1,
1721
+ memory_min=Size.gibibytes(2),
1722
+ cpu_manufacturers=[ec2.CpuManufacturer.INTEL],
1723
+ accelerator_manufacturers=[ec2.AcceleratorManufacturer.NVIDIA]
1724
+ ),
1725
+ propagate_tags=ecs.PropagateManagedInstancesTags.CAPACITY_PROVIDER
1726
+ )
1727
+
1728
+ # Add the capacity provider to the cluster
1729
+ cluster.add_managed_instances_capacity_provider(mi_capacity_provider)
1730
+
1731
+ task_definition = ecs.Ec2TaskDefinition(self, "TaskDef")
1732
+
1733
+ task_definition.add_container("web",
1734
+ image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
1735
+ memory_reservation_mi_b=256
1736
+ )
1737
+
1738
+ ecs.Ec2Service(self, "EC2Service",
1739
+ cluster=cluster,
1740
+ task_definition=task_definition,
1741
+ min_healthy_percent=100,
1742
+ capacity_provider_strategies=[ecs.CapacityProviderStrategy(
1743
+ capacity_provider=mi_capacity_provider.capacity_provider_name,
1744
+ weight=1
1745
+ )
1746
+ ]
1747
+ )
1748
+ ```
1749
+
1750
+ You can specify detailed instance requirements to control which types of instances are used:
1751
+
1752
+ ```python
1753
+ # infrastructure_role: iam.Role
1754
+ # instance_profile: iam.InstanceProfile
1755
+ # vpc: ec2.Vpc
1756
+
1757
+
1758
+ mi_capacity_provider = ecs.ManagedInstancesCapacityProvider(self, "MICapacityProvider",
1759
+ infrastructure_role=infrastructure_role,
1760
+ ec2_instance_profile=instance_profile,
1761
+ subnets=vpc.private_subnets,
1762
+ instance_requirements=ec2.InstanceRequirementsConfig(
1763
+ # Required: CPU and memory constraints
1764
+ v_cpu_count_min=2,
1765
+ v_cpu_count_max=8,
1766
+ memory_min=Size.gibibytes(4),
1767
+ memory_max=Size.gibibytes(32),
1768
+
1769
+ # CPU preferences
1770
+ cpu_manufacturers=[ec2.CpuManufacturer.INTEL, ec2.CpuManufacturer.AMD],
1771
+ instance_generations=[ec2.InstanceGeneration.CURRENT],
1772
+
1773
+ # Instance type filtering
1774
+ allowed_instance_types=["m5.*", "c5.*"],
1775
+
1776
+ # Performance characteristics
1777
+ burstable_performance=ec2.BurstablePerformance.EXCLUDED,
1778
+ bare_metal=ec2.BareMetal.EXCLUDED,
1779
+
1780
+ # Accelerator requirements (for ML/AI workloads)
1781
+ accelerator_types=[ec2.AcceleratorType.GPU],
1782
+ accelerator_manufacturers=[ec2.AcceleratorManufacturer.NVIDIA],
1783
+ accelerator_names=[ec2.AcceleratorName.T4, ec2.AcceleratorName.V100],
1784
+ accelerator_count_min=1,
1785
+
1786
+ # Storage requirements
1787
+ local_storage=ec2.LocalStorage.REQUIRED,
1788
+ local_storage_types=[ec2.LocalStorageType.SSD],
1789
+ total_local_storage_gBMin=100,
1790
+
1791
+ # Network requirements
1792
+ network_interface_count_min=2,
1793
+ network_bandwidth_gbps_min=10,
1794
+
1795
+ # Cost optimization
1796
+ on_demand_max_price_percentage_over_lowest_price=10
1797
+ )
1798
+ )
1799
+ ```
1800
+
1699
1801
  ### Cluster Default Provider Strategy
1700
1802
 
1701
1803
  A capacity provider strategy determines whether ECS tasks are launched on EC2 instances or Fargate/Fargate Spot. It can be specified at the cluster, service, or task level, and consists of one or more capacity providers. You can specify an optional base and weight value for finer control of how tasks are launched. The `base` specifies a minimum number of tasks on one capacity provider, and the `weight`s of each capacity provider determine how tasks are distributed after `base` is satisfied.
@@ -2271,8 +2373,10 @@ from ..aws_ec2 import (
2271
2373
  IKeyPair as _IKeyPair_bc344eda,
2272
2374
  IMachineImage as _IMachineImage_0e8bd50b,
2273
2375
  ISecurityGroup as _ISecurityGroup_acf8a799,
2376
+ ISubnet as _ISubnet_d57d1229,
2274
2377
  IVpc as _IVpc_f30d5663,
2275
2378
  InstanceArchitecture as _InstanceArchitecture_7721cb36,
2379
+ InstanceRequirementsConfig as _InstanceRequirementsConfig_1b353659,
2276
2380
  InstanceType as _InstanceType_f64915b9,
2277
2381
  MachineImageConfig as _MachineImageConfig_187edaee,
2278
2382
  SubnetSelection as _SubnetSelection_e57d76df,
@@ -2313,6 +2417,7 @@ from ..aws_elasticloadbalancingv2 import (
2313
2417
  from ..aws_iam import (
2314
2418
  Grant as _Grant_a7ae64f8,
2315
2419
  IGrantable as _IGrantable_71c4f5de,
2420
+ IInstanceProfile as _IInstanceProfile_10d5ce2c,
2316
2421
  IRole as _IRole_235f5d8e,
2317
2422
  PolicyStatement as _PolicyStatement_0fe33853,
2318
2423
  )
@@ -6757,6 +6862,8 @@ class CapacityProviderStrategy:
6757
6862
  jsii_struct_bases=[],
6758
6863
  name_mapping={
6759
6864
  "auto_scaling_group_provider": "autoScalingGroupProvider",
6865
+ "cluster_name": "clusterName",
6866
+ "managed_instances_provider": "managedInstancesProvider",
6760
6867
  "name": "name",
6761
6868
  "tags": "tags",
6762
6869
  },
@@ -6766,12 +6873,16 @@ class CfnCapacityProviderProps:
6766
6873
  self,
6767
6874
  *,
6768
6875
  auto_scaling_group_provider: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.AutoScalingGroupProviderProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
6876
+ cluster_name: typing.Optional[builtins.str] = None,
6877
+ managed_instances_provider: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.ManagedInstancesProviderProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
6769
6878
  name: typing.Optional[builtins.str] = None,
6770
6879
  tags: typing.Optional[typing.Sequence[typing.Union[_CfnTag_f6864754, typing.Dict[builtins.str, typing.Any]]]] = None,
6771
6880
  ) -> None:
6772
6881
  '''Properties for defining a ``CfnCapacityProvider``.
6773
6882
 
6774
6883
  :param auto_scaling_group_provider: The Auto Scaling group settings for the capacity provider.
6884
+ :param cluster_name:
6885
+ :param managed_instances_provider:
6775
6886
  :param name: The name of the capacity provider. If a name is specified, it cannot start with ``aws`` , ``ecs`` , or ``fargate`` . If no name is specified, a default name in the ``CFNStackName-CFNResourceName-RandomString`` format is used.
6776
6887
  :param tags: The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both. The following basic restrictions apply to tags: - Maximum number of tags per resource - 50 - For each resource, each tag key must be unique, and each tag key can have only one value. - Maximum key length - 128 Unicode characters in UTF-8 - Maximum value length - 256 Unicode characters in UTF-8 - If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : /
6777
6888
 
@@ -6799,6 +6910,87 @@ class CfnCapacityProviderProps:
6799
6910
  ),
6800
6911
  managed_termination_protection="managedTerminationProtection"
6801
6912
  ),
6913
+ cluster_name="clusterName",
6914
+ managed_instances_provider=ecs.CfnCapacityProvider.ManagedInstancesProviderProperty(
6915
+ infrastructure_role_arn="infrastructureRoleArn",
6916
+ instance_launch_template=ecs.CfnCapacityProvider.InstanceLaunchTemplateProperty(
6917
+ ec2_instance_profile_arn="ec2InstanceProfileArn",
6918
+ network_configuration=ecs.CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty(
6919
+ subnets=["subnets"],
6920
+
6921
+ # the properties below are optional
6922
+ security_groups=["securityGroups"]
6923
+ ),
6924
+
6925
+ # the properties below are optional
6926
+ instance_requirements=ecs.CfnCapacityProvider.InstanceRequirementsRequestProperty(
6927
+ memory_mi_b=ecs.CfnCapacityProvider.MemoryMiBRequestProperty(
6928
+ min=123,
6929
+
6930
+ # the properties below are optional
6931
+ max=123
6932
+ ),
6933
+ v_cpu_count=ecs.CfnCapacityProvider.VCpuCountRangeRequestProperty(
6934
+ min=123,
6935
+
6936
+ # the properties below are optional
6937
+ max=123
6938
+ ),
6939
+
6940
+ # the properties below are optional
6941
+ accelerator_count=ecs.CfnCapacityProvider.AcceleratorCountRequestProperty(
6942
+ max=123,
6943
+ min=123
6944
+ ),
6945
+ accelerator_manufacturers=["acceleratorManufacturers"],
6946
+ accelerator_names=["acceleratorNames"],
6947
+ accelerator_total_memory_mi_b=ecs.CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty(
6948
+ max=123,
6949
+ min=123
6950
+ ),
6951
+ accelerator_types=["acceleratorTypes"],
6952
+ allowed_instance_types=["allowedInstanceTypes"],
6953
+ bare_metal="bareMetal",
6954
+ baseline_ebs_bandwidth_mbps=ecs.CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty(
6955
+ max=123,
6956
+ min=123
6957
+ ),
6958
+ burstable_performance="burstablePerformance",
6959
+ cpu_manufacturers=["cpuManufacturers"],
6960
+ excluded_instance_types=["excludedInstanceTypes"],
6961
+ instance_generations=["instanceGenerations"],
6962
+ local_storage="localStorage",
6963
+ local_storage_types=["localStorageTypes"],
6964
+ max_spot_price_as_percentage_of_optimal_on_demand_price=123,
6965
+ memory_gi_bPer_vCpu=ecs.CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty(
6966
+ max=123,
6967
+ min=123
6968
+ ),
6969
+ network_bandwidth_gbps=ecs.CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty(
6970
+ max=123,
6971
+ min=123
6972
+ ),
6973
+ network_interface_count=ecs.CfnCapacityProvider.NetworkInterfaceCountRequestProperty(
6974
+ max=123,
6975
+ min=123
6976
+ ),
6977
+ on_demand_max_price_percentage_over_lowest_price=123,
6978
+ require_hibernate_support=False,
6979
+ spot_max_price_percentage_over_lowest_price=123,
6980
+ total_local_storage_gb=ecs.CfnCapacityProvider.TotalLocalStorageGBRequestProperty(
6981
+ max=123,
6982
+ min=123
6983
+ )
6984
+ ),
6985
+ monitoring="monitoring",
6986
+ storage_configuration=ecs.CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty(
6987
+ storage_size_gi_b=123
6988
+ )
6989
+ ),
6990
+
6991
+ # the properties below are optional
6992
+ propagate_tags="propagateTags"
6993
+ ),
6802
6994
  name="name",
6803
6995
  tags=[CfnTag(
6804
6996
  key="key",
@@ -6809,11 +7001,17 @@ class CfnCapacityProviderProps:
6809
7001
  if __debug__:
6810
7002
  type_hints = typing.get_type_hints(_typecheckingstub__48080bdf05dc1c4ca9ab46c833774163f6afcd0d1551b378b8d59e67bc180c3f)
6811
7003
  check_type(argname="argument auto_scaling_group_provider", value=auto_scaling_group_provider, expected_type=type_hints["auto_scaling_group_provider"])
7004
+ check_type(argname="argument cluster_name", value=cluster_name, expected_type=type_hints["cluster_name"])
7005
+ check_type(argname="argument managed_instances_provider", value=managed_instances_provider, expected_type=type_hints["managed_instances_provider"])
6812
7006
  check_type(argname="argument name", value=name, expected_type=type_hints["name"])
6813
7007
  check_type(argname="argument tags", value=tags, expected_type=type_hints["tags"])
6814
7008
  self._values: typing.Dict[builtins.str, typing.Any] = {}
6815
7009
  if auto_scaling_group_provider is not None:
6816
7010
  self._values["auto_scaling_group_provider"] = auto_scaling_group_provider
7011
+ if cluster_name is not None:
7012
+ self._values["cluster_name"] = cluster_name
7013
+ if managed_instances_provider is not None:
7014
+ self._values["managed_instances_provider"] = managed_instances_provider
6817
7015
  if name is not None:
6818
7016
  self._values["name"] = name
6819
7017
  if tags is not None:
@@ -6830,6 +7028,24 @@ class CfnCapacityProviderProps:
6830
7028
  result = self._values.get("auto_scaling_group_provider")
6831
7029
  return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.AutoScalingGroupProviderProperty"]], result)
6832
7030
 
7031
+ @builtins.property
7032
+ def cluster_name(self) -> typing.Optional[builtins.str]:
7033
+ '''
7034
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html#cfn-ecs-capacityprovider-clustername
7035
+ '''
7036
+ result = self._values.get("cluster_name")
7037
+ return typing.cast(typing.Optional[builtins.str], result)
7038
+
7039
+ @builtins.property
7040
+ def managed_instances_provider(
7041
+ self,
7042
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.ManagedInstancesProviderProperty"]]:
7043
+ '''
7044
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider
7045
+ '''
7046
+ result = self._values.get("managed_instances_provider")
7047
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.ManagedInstancesProviderProperty"]], result)
7048
+
6833
7049
  @builtins.property
6834
7050
  def name(self) -> typing.Optional[builtins.str]:
6835
7051
  '''The name of the capacity provider.
@@ -10174,6 +10390,14 @@ class Compatibility(enum.Enum):
10174
10390
  '''The task can specify either the EC2 or Fargate launch types.'''
10175
10391
  EXTERNAL = "EXTERNAL"
10176
10392
  '''The task should specify the External launch type.'''
10393
+ MANAGED_INSTANCES = "MANAGED_INSTANCES"
10394
+ '''The task should specify the Managed Instances launch type.'''
10395
+ EC2_AND_MANAGED_INSTANCES = "EC2_AND_MANAGED_INSTANCES"
10396
+ '''The task can specify either the EC2 or Managed Instances launch types.'''
10397
+ FARGATE_AND_MANAGED_INSTANCES = "FARGATE_AND_MANAGED_INSTANCES"
10398
+ '''The task can specify either the Fargate or Managed Instances launch types.'''
10399
+ FARGATE_AND_EC2_AND_MANAGED_INSTANCES = "FARGATE_AND_EC2_AND_MANAGED_INSTANCES"
10400
+ '''The task can specify either the Fargate, EC2 or Managed Instances launch types.'''
10177
10401
 
10178
10402
 
10179
10403
  class ContainerDefinition(
@@ -12357,32 +12581,24 @@ class ContainerImage(
12357
12581
 
12358
12582
  Example::
12359
12583
 
12360
- # vpc: ec2.Vpc
12361
-
12362
-
12363
- cluster = ecs.Cluster(self, "FargateCPCluster",
12364
- vpc=vpc,
12365
- enable_fargate_capacity_providers=True
12366
- )
12367
-
12368
- task_definition = ecs.FargateTaskDefinition(self, "TaskDef")
12369
-
12370
- task_definition.add_container("web",
12371
- image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample")
12372
- )
12373
-
12374
- ecs.FargateService(self, "FargateService",
12375
- cluster=cluster,
12376
- task_definition=task_definition,
12377
- min_healthy_percent=100,
12378
- capacity_provider_strategies=[ecs.CapacityProviderStrategy(
12379
- capacity_provider="FARGATE_SPOT",
12380
- weight=2
12381
- ), ecs.CapacityProviderStrategy(
12382
- capacity_provider="FARGATE",
12383
- weight=1
12584
+ # my_file_system: efs.IFileSystem
12585
+ # my_job_role: iam.Role
12586
+
12587
+ my_file_system.grant_read(my_job_role)
12588
+
12589
+ job_defn = batch.EcsJobDefinition(self, "JobDefn",
12590
+ container=batch.EcsEc2ContainerDefinition(self, "containerDefn",
12591
+ image=ecs.ContainerImage.from_registry("public.ecr.aws/amazonlinux/amazonlinux:latest"),
12592
+ memory=cdk.Size.mebibytes(2048),
12593
+ cpu=256,
12594
+ volumes=[batch.EcsVolume.efs(
12595
+ name="myVolume",
12596
+ file_system=my_file_system,
12597
+ container_path="/Volumes/myVolume",
12598
+ use_job_role=True
12599
+ )],
12600
+ job_role=my_job_role
12384
12601
  )
12385
- ]
12386
12602
  )
12387
12603
  '''
12388
12604
 
@@ -14348,30 +14564,33 @@ class Ec2ServiceProps(BaseServiceOptions):
14348
14564
 
14349
14565
  Example::
14350
14566
 
14351
- # vpc: ec2.Vpc
14352
-
14567
+ # task_definition: ecs.TaskDefinition
14568
+ # cluster: ecs.Cluster
14353
14569
 
14354
- # Create an ECS cluster
14355
- cluster = ecs.Cluster(self, "Cluster", vpc=vpc)
14356
14570
 
14357
- # Add capacity to it
14358
- cluster.add_capacity("DefaultAutoScalingGroupCapacity",
14359
- instance_type=ec2.InstanceType("t2.xlarge"),
14360
- desired_capacity=3
14571
+ # Add a container to the task definition
14572
+ specific_container = task_definition.add_container("Container",
14573
+ image=ecs.ContainerImage.from_registry("/aws/aws-example-app"),
14574
+ memory_limit_mi_b=2048
14361
14575
  )
14362
14576
 
14363
- task_definition = ecs.Ec2TaskDefinition(self, "TaskDef")
14364
-
14365
- task_definition.add_container("DefaultContainer",
14366
- image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
14367
- memory_limit_mi_b=512
14577
+ # Add a port mapping
14578
+ specific_container.add_port_mappings(
14579
+ container_port=7600,
14580
+ protocol=ecs.Protocol.TCP
14368
14581
  )
14369
14582
 
14370
- # Instantiate an Amazon ECS Service
14371
- ecs_service = ecs.Ec2Service(self, "Service",
14583
+ ecs.Ec2Service(self, "Service",
14372
14584
  cluster=cluster,
14373
14585
  task_definition=task_definition,
14374
- min_healthy_percent=100
14586
+ min_healthy_percent=100,
14587
+ cloud_map_options=ecs.CloudMapOptions(
14588
+ # Create SRV records - useful for bridge networking
14589
+ dns_record_type=cloudmap.DnsRecordType.SRV,
14590
+ # Targets port TCP port 7600 `specificContainer`
14591
+ container=specific_container,
14592
+ container_port=7600
14593
+ )
14375
14594
  )
14376
14595
  '''
14377
14596
  if isinstance(circuit_breaker, dict):
@@ -21722,6 +21941,12 @@ class ITaskDefinition(_IResource_c80c4260, typing_extensions.Protocol):
21722
21941
  '''Return true if the task definition can be run on a Fargate cluster.'''
21723
21942
  ...
21724
21943
 
21944
+ @builtins.property
21945
+ @jsii.member(jsii_name="isManagedInstancesCompatible")
21946
+ def is_managed_instances_compatible(self) -> builtins.bool:
21947
+ '''Return true if the task definition can be run on Managed Instances.'''
21948
+ ...
21949
+
21725
21950
  @builtins.property
21726
21951
  @jsii.member(jsii_name="networkMode")
21727
21952
  def network_mode(self) -> "NetworkMode":
@@ -21781,6 +22006,12 @@ class _ITaskDefinitionProxy(
21781
22006
  '''Return true if the task definition can be run on a Fargate cluster.'''
21782
22007
  return typing.cast(builtins.bool, jsii.get(self, "isFargateCompatible"))
21783
22008
 
22009
+ @builtins.property
22010
+ @jsii.member(jsii_name="isManagedInstancesCompatible")
22011
+ def is_managed_instances_compatible(self) -> builtins.bool:
22012
+ '''Return true if the task definition can be run on Managed Instances.'''
22013
+ return typing.cast(builtins.bool, jsii.get(self, "isManagedInstancesCompatible"))
22014
+
21784
22015
  @builtins.property
21785
22016
  @jsii.member(jsii_name="networkMode")
21786
22017
  def network_mode(self) -> "NetworkMode":
@@ -22013,6 +22244,16 @@ class InferenceAccelerator:
22013
22244
  )
22014
22245
 
22015
22246
 
22247
+ @jsii.enum(jsii_type="aws-cdk-lib.aws_ecs.InstanceMonitoring")
22248
+ class InstanceMonitoring(enum.Enum):
22249
+ '''The monitoring configuration for EC2 instances.'''
22250
+
22251
+ BASIC = "BASIC"
22252
+ '''Basic monitoring (5-minute intervals).'''
22253
+ DETAILED = "DETAILED"
22254
+ '''Detailed monitoring (1-minute intervals).'''
22255
+
22256
+
22016
22257
  @jsii.enum(jsii_type="aws-cdk-lib.aws_ecs.IpcMode")
22017
22258
  class IpcMode(enum.Enum):
22018
22259
  '''The IPC resource namespace to use for the containers in the task.'''
@@ -23565,6 +23806,383 @@ class MachineImageType(enum.Enum):
23565
23806
  '''Bottlerocket AMI.'''
23566
23807
 
23567
23808
 
23809
+ class ManagedInstancesCapacityProvider(
23810
+ _constructs_77d1e7e8.Construct,
23811
+ metaclass=jsii.JSIIMeta,
23812
+ jsii_type="aws-cdk-lib.aws_ecs.ManagedInstancesCapacityProvider",
23813
+ ):
23814
+ '''A Managed Instances Capacity Provider.
23815
+
23816
+ This allows an ECS cluster to use
23817
+ Managed Instances for task placement with managed infrastructure.
23818
+
23819
+ :exampleMetadata: infused
23820
+
23821
+ Example::
23822
+
23823
+ # vpc: ec2.Vpc
23824
+ # infrastructure_role: iam.Role
23825
+ # instance_profile: iam.InstanceProfile
23826
+
23827
+
23828
+ cluster = ecs.Cluster(self, "Cluster", vpc=vpc)
23829
+
23830
+ # Create a Managed Instances Capacity Provider
23831
+ mi_capacity_provider = ecs.ManagedInstancesCapacityProvider(self, "MICapacityProvider",
23832
+ infrastructure_role=infrastructure_role,
23833
+ ec2_instance_profile=instance_profile,
23834
+ subnets=vpc.private_subnets,
23835
+ security_groups=[ec2.SecurityGroup(self, "MISecurityGroup", vpc=vpc)],
23836
+ instance_requirements=ec2.InstanceRequirementsConfig(
23837
+ v_cpu_count_min=1,
23838
+ memory_min=Size.gibibytes(2),
23839
+ cpu_manufacturers=[ec2.CpuManufacturer.INTEL],
23840
+ accelerator_manufacturers=[ec2.AcceleratorManufacturer.NVIDIA]
23841
+ ),
23842
+ propagate_tags=ecs.PropagateManagedInstancesTags.CAPACITY_PROVIDER
23843
+ )
23844
+
23845
+ # Add the capacity provider to the cluster
23846
+ cluster.add_managed_instances_capacity_provider(mi_capacity_provider)
23847
+
23848
+ task_definition = ecs.Ec2TaskDefinition(self, "TaskDef")
23849
+
23850
+ task_definition.add_container("web",
23851
+ image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
23852
+ memory_reservation_mi_b=256
23853
+ )
23854
+
23855
+ ecs.Ec2Service(self, "EC2Service",
23856
+ cluster=cluster,
23857
+ task_definition=task_definition,
23858
+ min_healthy_percent=100,
23859
+ capacity_provider_strategies=[ecs.CapacityProviderStrategy(
23860
+ capacity_provider=mi_capacity_provider.capacity_provider_name,
23861
+ weight=1
23862
+ )
23863
+ ]
23864
+ )
23865
+ '''
23866
+
23867
+ def __init__(
23868
+ self,
23869
+ scope: _constructs_77d1e7e8.Construct,
23870
+ id: builtins.str,
23871
+ *,
23872
+ ec2_instance_profile: _IInstanceProfile_10d5ce2c,
23873
+ subnets: typing.Sequence[_ISubnet_d57d1229],
23874
+ capacity_provider_name: typing.Optional[builtins.str] = None,
23875
+ infrastructure_role: typing.Optional[_IRole_235f5d8e] = None,
23876
+ instance_requirements: typing.Optional[typing.Union[_InstanceRequirementsConfig_1b353659, typing.Dict[builtins.str, typing.Any]]] = None,
23877
+ monitoring: typing.Optional[InstanceMonitoring] = None,
23878
+ propagate_tags: typing.Optional["PropagateManagedInstancesTags"] = None,
23879
+ security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
23880
+ task_volume_storage: typing.Optional[_Size_7b441c34] = None,
23881
+ ) -> None:
23882
+ '''
23883
+ :param scope: -
23884
+ :param id: -
23885
+ :param ec2_instance_profile: The EC2 instance profile that will be attached to instances launched by this capacity provider. This instance profile must contain the necessary IAM permissions for ECS container instances to register with the cluster and run tasks. At minimum, it should include permissions for ECS agent communication, ECR image pulling, and CloudWatch logging.
23886
+ :param subnets: The VPC subnets where EC2 instances will be launched. This array must be non-empty and should contain subnets from the VPC where you want the managed instances to be deployed.
23887
+ :param capacity_provider_name: The name of the capacity provider. If a name is specified, it cannot start with ``aws``, ``ecs``, or ``fargate``. If no name is specified, a default name in the CFNStackName-CFNResourceName-RandomString format is used. If the stack name starts with ``aws``, ``ecs``, or ``fargate``, a unique resource name is generated that starts with ``cp-``. Default: CloudFormation-generated name
23888
+ :param infrastructure_role: The IAM role that ECS uses to manage the infrastructure for the capacity provider. This role is used by ECS to perform actions such as launching and terminating instances, managing Auto Scaling Groups, and other infrastructure operations required for the managed instances capacity provider. Default: - A new role will be created with the AmazonECSInfrastructureRolePolicyForManagedInstances managed policy
23889
+ :param instance_requirements: The instance requirements configuration for EC2 instance selection. This allows you to specify detailed requirements for instance selection including vCPU count ranges, memory ranges, CPU manufacturers (Intel, AMD, AWS Graviton), instance generations, network performance requirements, and many other criteria. ECS will automatically select appropriate instance types that meet these requirements. Default: - no specific instance requirements, ECS will choose appropriate instances
23890
+ :param monitoring: The CloudWatch monitoring configuration for the EC2 instances. Determines the granularity of CloudWatch metrics collection for the instances. Detailed monitoring incurs additional costs but provides better observability. Default: - no enhanced monitoring (basic monitoring only)
23891
+ :param propagate_tags: Specifies whether to propagate tags from the capacity provider to the launched instances. When set to CAPACITY_PROVIDER, tags applied to the capacity provider resource will be automatically applied to all EC2 instances launched by this capacity provider. Default: PropagateManagedInstancesTags.NONE - no tag propagation
23892
+ :param security_groups: The security groups to associate with the launched EC2 instances. These security groups control the network traffic allowed to and from the instances. If not specified, the default security group of the VPC containing the subnets will be used. Default: - default security group of the VPC
23893
+ :param task_volume_storage: The size of the task volume storage attached to each instance. This storage is used for container images, container logs, and temporary files. Larger storage may be needed for workloads with large container images or applications that generate significant temporary data. Default: Size.gibibytes(80)
23894
+ '''
23895
+ if __debug__:
23896
+ type_hints = typing.get_type_hints(_typecheckingstub__718bb820f1409b5f15556f2e394659a060bda46e302dbb4e973a6484f24497de)
23897
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
23898
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
23899
+ props = ManagedInstancesCapacityProviderProps(
23900
+ ec2_instance_profile=ec2_instance_profile,
23901
+ subnets=subnets,
23902
+ capacity_provider_name=capacity_provider_name,
23903
+ infrastructure_role=infrastructure_role,
23904
+ instance_requirements=instance_requirements,
23905
+ monitoring=monitoring,
23906
+ propagate_tags=propagate_tags,
23907
+ security_groups=security_groups,
23908
+ task_volume_storage=task_volume_storage,
23909
+ )
23910
+
23911
+ jsii.create(self.__class__, self, [scope, id, props])
23912
+
23913
+ @jsii.member(jsii_name="bind")
23914
+ def bind(self, cluster: ICluster) -> None:
23915
+ '''Associates the capacity provider with the specified cluster.
23916
+
23917
+ This method is called by the cluster when adding the capacity provider.
23918
+
23919
+ :param cluster: -
23920
+ '''
23921
+ if __debug__:
23922
+ type_hints = typing.get_type_hints(_typecheckingstub__86f1df235e6255faeece6081f964f386186a84532c53bb8fad57fd4ab50e809d)
23923
+ check_type(argname="argument cluster", value=cluster, expected_type=type_hints["cluster"])
23924
+ return typing.cast(None, jsii.invoke(self, "bind", [cluster]))
23925
+
23926
+ @jsii.python.classproperty
23927
+ @jsii.member(jsii_name="PROPERTY_INJECTION_ID")
23928
+ def PROPERTY_INJECTION_ID(cls) -> builtins.str:
23929
+ '''Uniquely identifies this class.'''
23930
+ return typing.cast(builtins.str, jsii.sget(cls, "PROPERTY_INJECTION_ID"))
23931
+
23932
+ @builtins.property
23933
+ @jsii.member(jsii_name="capacityProviderName")
23934
+ def capacity_provider_name(self) -> builtins.str:
23935
+ '''Capacity provider name.'''
23936
+ return typing.cast(builtins.str, jsii.get(self, "capacityProviderName"))
23937
+
23938
+
23939
+ @jsii.data_type(
23940
+ jsii_type="aws-cdk-lib.aws_ecs.ManagedInstancesCapacityProviderProps",
23941
+ jsii_struct_bases=[],
23942
+ name_mapping={
23943
+ "ec2_instance_profile": "ec2InstanceProfile",
23944
+ "subnets": "subnets",
23945
+ "capacity_provider_name": "capacityProviderName",
23946
+ "infrastructure_role": "infrastructureRole",
23947
+ "instance_requirements": "instanceRequirements",
23948
+ "monitoring": "monitoring",
23949
+ "propagate_tags": "propagateTags",
23950
+ "security_groups": "securityGroups",
23951
+ "task_volume_storage": "taskVolumeStorage",
23952
+ },
23953
+ )
23954
+ class ManagedInstancesCapacityProviderProps:
23955
+ def __init__(
23956
+ self,
23957
+ *,
23958
+ ec2_instance_profile: _IInstanceProfile_10d5ce2c,
23959
+ subnets: typing.Sequence[_ISubnet_d57d1229],
23960
+ capacity_provider_name: typing.Optional[builtins.str] = None,
23961
+ infrastructure_role: typing.Optional[_IRole_235f5d8e] = None,
23962
+ instance_requirements: typing.Optional[typing.Union[_InstanceRequirementsConfig_1b353659, typing.Dict[builtins.str, typing.Any]]] = None,
23963
+ monitoring: typing.Optional[InstanceMonitoring] = None,
23964
+ propagate_tags: typing.Optional["PropagateManagedInstancesTags"] = None,
23965
+ security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
23966
+ task_volume_storage: typing.Optional[_Size_7b441c34] = None,
23967
+ ) -> None:
23968
+ '''The options for creating a Managed Instances Capacity Provider.
23969
+
23970
+ :param ec2_instance_profile: The EC2 instance profile that will be attached to instances launched by this capacity provider. This instance profile must contain the necessary IAM permissions for ECS container instances to register with the cluster and run tasks. At minimum, it should include permissions for ECS agent communication, ECR image pulling, and CloudWatch logging.
23971
+ :param subnets: The VPC subnets where EC2 instances will be launched. This array must be non-empty and should contain subnets from the VPC where you want the managed instances to be deployed.
23972
+ :param capacity_provider_name: The name of the capacity provider. If a name is specified, it cannot start with ``aws``, ``ecs``, or ``fargate``. If no name is specified, a default name in the CFNStackName-CFNResourceName-RandomString format is used. If the stack name starts with ``aws``, ``ecs``, or ``fargate``, a unique resource name is generated that starts with ``cp-``. Default: CloudFormation-generated name
23973
+ :param infrastructure_role: The IAM role that ECS uses to manage the infrastructure for the capacity provider. This role is used by ECS to perform actions such as launching and terminating instances, managing Auto Scaling Groups, and other infrastructure operations required for the managed instances capacity provider. Default: - A new role will be created with the AmazonECSInfrastructureRolePolicyForManagedInstances managed policy
23974
+ :param instance_requirements: The instance requirements configuration for EC2 instance selection. This allows you to specify detailed requirements for instance selection including vCPU count ranges, memory ranges, CPU manufacturers (Intel, AMD, AWS Graviton), instance generations, network performance requirements, and many other criteria. ECS will automatically select appropriate instance types that meet these requirements. Default: - no specific instance requirements, ECS will choose appropriate instances
23975
+ :param monitoring: The CloudWatch monitoring configuration for the EC2 instances. Determines the granularity of CloudWatch metrics collection for the instances. Detailed monitoring incurs additional costs but provides better observability. Default: - no enhanced monitoring (basic monitoring only)
23976
+ :param propagate_tags: Specifies whether to propagate tags from the capacity provider to the launched instances. When set to CAPACITY_PROVIDER, tags applied to the capacity provider resource will be automatically applied to all EC2 instances launched by this capacity provider. Default: PropagateManagedInstancesTags.NONE - no tag propagation
23977
+ :param security_groups: The security groups to associate with the launched EC2 instances. These security groups control the network traffic allowed to and from the instances. If not specified, the default security group of the VPC containing the subnets will be used. Default: - default security group of the VPC
23978
+ :param task_volume_storage: The size of the task volume storage attached to each instance. This storage is used for container images, container logs, and temporary files. Larger storage may be needed for workloads with large container images or applications that generate significant temporary data. Default: Size.gibibytes(80)
23979
+
23980
+ :exampleMetadata: infused
23981
+
23982
+ Example::
23983
+
23984
+ # vpc: ec2.Vpc
23985
+ # infrastructure_role: iam.Role
23986
+ # instance_profile: iam.InstanceProfile
23987
+
23988
+
23989
+ cluster = ecs.Cluster(self, "Cluster", vpc=vpc)
23990
+
23991
+ # Create a Managed Instances Capacity Provider
23992
+ mi_capacity_provider = ecs.ManagedInstancesCapacityProvider(self, "MICapacityProvider",
23993
+ infrastructure_role=infrastructure_role,
23994
+ ec2_instance_profile=instance_profile,
23995
+ subnets=vpc.private_subnets,
23996
+ security_groups=[ec2.SecurityGroup(self, "MISecurityGroup", vpc=vpc)],
23997
+ instance_requirements=ec2.InstanceRequirementsConfig(
23998
+ v_cpu_count_min=1,
23999
+ memory_min=Size.gibibytes(2),
24000
+ cpu_manufacturers=[ec2.CpuManufacturer.INTEL],
24001
+ accelerator_manufacturers=[ec2.AcceleratorManufacturer.NVIDIA]
24002
+ ),
24003
+ propagate_tags=ecs.PropagateManagedInstancesTags.CAPACITY_PROVIDER
24004
+ )
24005
+
24006
+ # Add the capacity provider to the cluster
24007
+ cluster.add_managed_instances_capacity_provider(mi_capacity_provider)
24008
+
24009
+ task_definition = ecs.Ec2TaskDefinition(self, "TaskDef")
24010
+
24011
+ task_definition.add_container("web",
24012
+ image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
24013
+ memory_reservation_mi_b=256
24014
+ )
24015
+
24016
+ ecs.Ec2Service(self, "EC2Service",
24017
+ cluster=cluster,
24018
+ task_definition=task_definition,
24019
+ min_healthy_percent=100,
24020
+ capacity_provider_strategies=[ecs.CapacityProviderStrategy(
24021
+ capacity_provider=mi_capacity_provider.capacity_provider_name,
24022
+ weight=1
24023
+ )
24024
+ ]
24025
+ )
24026
+ '''
24027
+ if isinstance(instance_requirements, dict):
24028
+ instance_requirements = _InstanceRequirementsConfig_1b353659(**instance_requirements)
24029
+ if __debug__:
24030
+ type_hints = typing.get_type_hints(_typecheckingstub__efa15b9a00384128ebdb40ffd56f7e66e8863f1c3a6b8d4cf8bc61fb9e822e92)
24031
+ check_type(argname="argument ec2_instance_profile", value=ec2_instance_profile, expected_type=type_hints["ec2_instance_profile"])
24032
+ check_type(argname="argument subnets", value=subnets, expected_type=type_hints["subnets"])
24033
+ check_type(argname="argument capacity_provider_name", value=capacity_provider_name, expected_type=type_hints["capacity_provider_name"])
24034
+ check_type(argname="argument infrastructure_role", value=infrastructure_role, expected_type=type_hints["infrastructure_role"])
24035
+ check_type(argname="argument instance_requirements", value=instance_requirements, expected_type=type_hints["instance_requirements"])
24036
+ check_type(argname="argument monitoring", value=monitoring, expected_type=type_hints["monitoring"])
24037
+ check_type(argname="argument propagate_tags", value=propagate_tags, expected_type=type_hints["propagate_tags"])
24038
+ check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
24039
+ check_type(argname="argument task_volume_storage", value=task_volume_storage, expected_type=type_hints["task_volume_storage"])
24040
+ self._values: typing.Dict[builtins.str, typing.Any] = {
24041
+ "ec2_instance_profile": ec2_instance_profile,
24042
+ "subnets": subnets,
24043
+ }
24044
+ if capacity_provider_name is not None:
24045
+ self._values["capacity_provider_name"] = capacity_provider_name
24046
+ if infrastructure_role is not None:
24047
+ self._values["infrastructure_role"] = infrastructure_role
24048
+ if instance_requirements is not None:
24049
+ self._values["instance_requirements"] = instance_requirements
24050
+ if monitoring is not None:
24051
+ self._values["monitoring"] = monitoring
24052
+ if propagate_tags is not None:
24053
+ self._values["propagate_tags"] = propagate_tags
24054
+ if security_groups is not None:
24055
+ self._values["security_groups"] = security_groups
24056
+ if task_volume_storage is not None:
24057
+ self._values["task_volume_storage"] = task_volume_storage
24058
+
24059
+ @builtins.property
24060
+ def ec2_instance_profile(self) -> _IInstanceProfile_10d5ce2c:
24061
+ '''The EC2 instance profile that will be attached to instances launched by this capacity provider.
24062
+
24063
+ This instance profile must contain the necessary IAM permissions for ECS container instances
24064
+ to register with the cluster and run tasks. At minimum, it should include permissions for
24065
+ ECS agent communication, ECR image pulling, and CloudWatch logging.
24066
+ '''
24067
+ result = self._values.get("ec2_instance_profile")
24068
+ assert result is not None, "Required property 'ec2_instance_profile' is missing"
24069
+ return typing.cast(_IInstanceProfile_10d5ce2c, result)
24070
+
24071
+ @builtins.property
24072
+ def subnets(self) -> typing.List[_ISubnet_d57d1229]:
24073
+ '''The VPC subnets where EC2 instances will be launched.
24074
+
24075
+ This array must be non-empty and should contain subnets from the VPC where you want
24076
+ the managed instances to be deployed.
24077
+ '''
24078
+ result = self._values.get("subnets")
24079
+ assert result is not None, "Required property 'subnets' is missing"
24080
+ return typing.cast(typing.List[_ISubnet_d57d1229], result)
24081
+
24082
+ @builtins.property
24083
+ def capacity_provider_name(self) -> typing.Optional[builtins.str]:
24084
+ '''The name of the capacity provider.
24085
+
24086
+ If a name is specified, it cannot start with ``aws``, ``ecs``, or ``fargate``.
24087
+ If no name is specified, a default name in the CFNStackName-CFNResourceName-RandomString format is used.
24088
+ If the stack name starts with ``aws``, ``ecs``, or ``fargate``, a unique resource name
24089
+ is generated that starts with ``cp-``.
24090
+
24091
+ :default: CloudFormation-generated name
24092
+ '''
24093
+ result = self._values.get("capacity_provider_name")
24094
+ return typing.cast(typing.Optional[builtins.str], result)
24095
+
24096
+ @builtins.property
24097
+ def infrastructure_role(self) -> typing.Optional[_IRole_235f5d8e]:
24098
+ '''The IAM role that ECS uses to manage the infrastructure for the capacity provider.
24099
+
24100
+ This role is used by ECS to perform actions such as launching and terminating instances,
24101
+ managing Auto Scaling Groups, and other infrastructure operations required for the
24102
+ managed instances capacity provider.
24103
+
24104
+ :default: - A new role will be created with the AmazonECSInfrastructureRolePolicyForManagedInstances managed policy
24105
+ '''
24106
+ result = self._values.get("infrastructure_role")
24107
+ return typing.cast(typing.Optional[_IRole_235f5d8e], result)
24108
+
24109
+ @builtins.property
24110
+ def instance_requirements(
24111
+ self,
24112
+ ) -> typing.Optional[_InstanceRequirementsConfig_1b353659]:
24113
+ '''The instance requirements configuration for EC2 instance selection.
24114
+
24115
+ This allows you to specify detailed requirements for instance selection including
24116
+ vCPU count ranges, memory ranges, CPU manufacturers (Intel, AMD, AWS Graviton),
24117
+ instance generations, network performance requirements, and many other criteria.
24118
+ ECS will automatically select appropriate instance types that meet these requirements.
24119
+
24120
+ :default: - no specific instance requirements, ECS will choose appropriate instances
24121
+ '''
24122
+ result = self._values.get("instance_requirements")
24123
+ return typing.cast(typing.Optional[_InstanceRequirementsConfig_1b353659], result)
24124
+
24125
+ @builtins.property
24126
+ def monitoring(self) -> typing.Optional[InstanceMonitoring]:
24127
+ '''The CloudWatch monitoring configuration for the EC2 instances.
24128
+
24129
+ Determines the granularity of CloudWatch metrics collection for the instances.
24130
+ Detailed monitoring incurs additional costs but provides better observability.
24131
+
24132
+ :default: - no enhanced monitoring (basic monitoring only)
24133
+ '''
24134
+ result = self._values.get("monitoring")
24135
+ return typing.cast(typing.Optional[InstanceMonitoring], result)
24136
+
24137
+ @builtins.property
24138
+ def propagate_tags(self) -> typing.Optional["PropagateManagedInstancesTags"]:
24139
+ '''Specifies whether to propagate tags from the capacity provider to the launched instances.
24140
+
24141
+ When set to CAPACITY_PROVIDER, tags applied to the capacity provider resource will be
24142
+ automatically applied to all EC2 instances launched by this capacity provider.
24143
+
24144
+ :default: PropagateManagedInstancesTags.NONE - no tag propagation
24145
+ '''
24146
+ result = self._values.get("propagate_tags")
24147
+ return typing.cast(typing.Optional["PropagateManagedInstancesTags"], result)
24148
+
24149
+ @builtins.property
24150
+ def security_groups(self) -> typing.Optional[typing.List[_ISecurityGroup_acf8a799]]:
24151
+ '''The security groups to associate with the launched EC2 instances.
24152
+
24153
+ These security groups control the network traffic allowed to and from the instances.
24154
+ If not specified, the default security group of the VPC containing the subnets will be used.
24155
+
24156
+ :default: - default security group of the VPC
24157
+ '''
24158
+ result = self._values.get("security_groups")
24159
+ return typing.cast(typing.Optional[typing.List[_ISecurityGroup_acf8a799]], result)
24160
+
24161
+ @builtins.property
24162
+ def task_volume_storage(self) -> typing.Optional[_Size_7b441c34]:
24163
+ '''The size of the task volume storage attached to each instance.
24164
+
24165
+ This storage is used for container images, container logs, and temporary files.
24166
+ Larger storage may be needed for workloads with large container images or
24167
+ applications that generate significant temporary data.
24168
+
24169
+ :default: Size.gibibytes(80)
24170
+ '''
24171
+ result = self._values.get("task_volume_storage")
24172
+ return typing.cast(typing.Optional[_Size_7b441c34], result)
24173
+
24174
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
24175
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
24176
+
24177
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
24178
+ return not (rhs == self)
24179
+
24180
+ def __repr__(self) -> str:
24181
+ return "ManagedInstancesCapacityProviderProps(%s)" % ", ".join(
24182
+ k + "=" + repr(v) for k, v in self._values.items()
24183
+ )
24184
+
24185
+
23568
24186
  @jsii.data_type(
23569
24187
  jsii_type="aws-cdk-lib.aws_ecs.ManagedStorageConfiguration",
23570
24188
  jsii_struct_bases=[],
@@ -24560,6 +25178,64 @@ class PrimaryTaskSetReference:
24560
25178
  )
24561
25179
 
24562
25180
 
25181
+ @jsii.enum(jsii_type="aws-cdk-lib.aws_ecs.PropagateManagedInstancesTags")
25182
+ class PropagateManagedInstancesTags(enum.Enum):
25183
+ '''Propagate tags for Managed Instances.
25184
+
25185
+ :exampleMetadata: infused
25186
+
25187
+ Example::
25188
+
25189
+ # vpc: ec2.Vpc
25190
+ # infrastructure_role: iam.Role
25191
+ # instance_profile: iam.InstanceProfile
25192
+
25193
+
25194
+ cluster = ecs.Cluster(self, "Cluster", vpc=vpc)
25195
+
25196
+ # Create a Managed Instances Capacity Provider
25197
+ mi_capacity_provider = ecs.ManagedInstancesCapacityProvider(self, "MICapacityProvider",
25198
+ infrastructure_role=infrastructure_role,
25199
+ ec2_instance_profile=instance_profile,
25200
+ subnets=vpc.private_subnets,
25201
+ security_groups=[ec2.SecurityGroup(self, "MISecurityGroup", vpc=vpc)],
25202
+ instance_requirements=ec2.InstanceRequirementsConfig(
25203
+ v_cpu_count_min=1,
25204
+ memory_min=Size.gibibytes(2),
25205
+ cpu_manufacturers=[ec2.CpuManufacturer.INTEL],
25206
+ accelerator_manufacturers=[ec2.AcceleratorManufacturer.NVIDIA]
25207
+ ),
25208
+ propagate_tags=ecs.PropagateManagedInstancesTags.CAPACITY_PROVIDER
25209
+ )
25210
+
25211
+ # Add the capacity provider to the cluster
25212
+ cluster.add_managed_instances_capacity_provider(mi_capacity_provider)
25213
+
25214
+ task_definition = ecs.Ec2TaskDefinition(self, "TaskDef")
25215
+
25216
+ task_definition.add_container("web",
25217
+ image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
25218
+ memory_reservation_mi_b=256
25219
+ )
25220
+
25221
+ ecs.Ec2Service(self, "EC2Service",
25222
+ cluster=cluster,
25223
+ task_definition=task_definition,
25224
+ min_healthy_percent=100,
25225
+ capacity_provider_strategies=[ecs.CapacityProviderStrategy(
25226
+ capacity_provider=mi_capacity_provider.capacity_provider_name,
25227
+ weight=1
25228
+ )
25229
+ ]
25230
+ )
25231
+ '''
25232
+
25233
+ CAPACITY_PROVIDER = "CAPACITY_PROVIDER"
25234
+ '''Propagate tags from the capacity provider.'''
25235
+ NONE = "NONE"
25236
+ '''Do not propagate tags.'''
25237
+
25238
+
24563
25239
  @jsii.enum(jsii_type="aws-cdk-lib.aws_ecs.PropagatedTagSource")
24564
25240
  class PropagatedTagSource(enum.Enum):
24565
25241
  '''Propagate tags from either service or task definition.
@@ -28048,22 +28724,34 @@ class TaskDefinition(
28048
28724
 
28049
28725
  Example::
28050
28726
 
28727
+ import aws_cdk.aws_cloudwatch as cw
28728
+
28051
28729
  # cluster: ecs.Cluster
28052
28730
  # task_definition: ecs.TaskDefinition
28053
- # vpc: ec2.Vpc
28731
+ # elb_alarm: cw.Alarm
28054
28732
 
28055
- service = ecs.FargateService(self, "Service", cluster=cluster, task_definition=task_definition, min_healthy_percent=100)
28056
28733
 
28057
- lb = elbv2.ApplicationLoadBalancer(self, "LB", vpc=vpc, internet_facing=True)
28058
- listener = lb.add_listener("Listener", port=80)
28059
- service.register_load_balancer_targets(
28060
- container_name="web",
28061
- container_port=80,
28062
- new_target_group_id="ECS",
28063
- listener=ecs.ListenerConfig.application_listener(listener,
28064
- protocol=elbv2.ApplicationProtocol.HTTPS
28734
+ service = ecs.FargateService(self, "Service",
28735
+ cluster=cluster,
28736
+ task_definition=task_definition,
28737
+ min_healthy_percent=100,
28738
+ deployment_alarms=ecs.DeploymentAlarmConfig(
28739
+ alarm_names=[elb_alarm.alarm_name],
28740
+ behavior=ecs.AlarmBehavior.ROLLBACK_ON_ALARM
28065
28741
  )
28066
28742
  )
28743
+
28744
+ # Defining a deployment alarm after the service has been created
28745
+ cpu_alarm_name = "MyCpuMetricAlarm"
28746
+ cw.Alarm(self, "CPUAlarm",
28747
+ alarm_name=cpu_alarm_name,
28748
+ metric=service.metric_cpu_utilization(),
28749
+ evaluation_periods=2,
28750
+ threshold=80
28751
+ )
28752
+ service.enable_deployment_alarms([cpu_alarm_name],
28753
+ behavior=ecs.AlarmBehavior.FAIL_ON_ALARM
28754
+ )
28067
28755
  '''
28068
28756
 
28069
28757
  def __init__(
@@ -28669,6 +29357,12 @@ class TaskDefinition(
28669
29357
  '''Return true if the task definition can be run on a Fargate cluster.'''
28670
29358
  return typing.cast(builtins.bool, jsii.get(self, "isFargateCompatible"))
28671
29359
 
29360
+ @builtins.property
29361
+ @jsii.member(jsii_name="isManagedInstancesCompatible")
29362
+ def is_managed_instances_compatible(self) -> builtins.bool:
29363
+ '''Return true if the task definition can be run on Managed Instances.'''
29364
+ return typing.cast(builtins.bool, jsii.get(self, "isManagedInstancesCompatible"))
29365
+
28672
29366
  @builtins.property
28673
29367
  @jsii.member(jsii_name="networkMode")
28674
29368
  def network_mode(self) -> NetworkMode:
@@ -30704,6 +31398,87 @@ class CfnCapacityProvider(
30704
31398
  ),
30705
31399
  managed_termination_protection="managedTerminationProtection"
30706
31400
  ),
31401
+ cluster_name="clusterName",
31402
+ managed_instances_provider=ecs.CfnCapacityProvider.ManagedInstancesProviderProperty(
31403
+ infrastructure_role_arn="infrastructureRoleArn",
31404
+ instance_launch_template=ecs.CfnCapacityProvider.InstanceLaunchTemplateProperty(
31405
+ ec2_instance_profile_arn="ec2InstanceProfileArn",
31406
+ network_configuration=ecs.CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty(
31407
+ subnets=["subnets"],
31408
+
31409
+ # the properties below are optional
31410
+ security_groups=["securityGroups"]
31411
+ ),
31412
+
31413
+ # the properties below are optional
31414
+ instance_requirements=ecs.CfnCapacityProvider.InstanceRequirementsRequestProperty(
31415
+ memory_mi_b=ecs.CfnCapacityProvider.MemoryMiBRequestProperty(
31416
+ min=123,
31417
+
31418
+ # the properties below are optional
31419
+ max=123
31420
+ ),
31421
+ v_cpu_count=ecs.CfnCapacityProvider.VCpuCountRangeRequestProperty(
31422
+ min=123,
31423
+
31424
+ # the properties below are optional
31425
+ max=123
31426
+ ),
31427
+
31428
+ # the properties below are optional
31429
+ accelerator_count=ecs.CfnCapacityProvider.AcceleratorCountRequestProperty(
31430
+ max=123,
31431
+ min=123
31432
+ ),
31433
+ accelerator_manufacturers=["acceleratorManufacturers"],
31434
+ accelerator_names=["acceleratorNames"],
31435
+ accelerator_total_memory_mi_b=ecs.CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty(
31436
+ max=123,
31437
+ min=123
31438
+ ),
31439
+ accelerator_types=["acceleratorTypes"],
31440
+ allowed_instance_types=["allowedInstanceTypes"],
31441
+ bare_metal="bareMetal",
31442
+ baseline_ebs_bandwidth_mbps=ecs.CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty(
31443
+ max=123,
31444
+ min=123
31445
+ ),
31446
+ burstable_performance="burstablePerformance",
31447
+ cpu_manufacturers=["cpuManufacturers"],
31448
+ excluded_instance_types=["excludedInstanceTypes"],
31449
+ instance_generations=["instanceGenerations"],
31450
+ local_storage="localStorage",
31451
+ local_storage_types=["localStorageTypes"],
31452
+ max_spot_price_as_percentage_of_optimal_on_demand_price=123,
31453
+ memory_gi_bPer_vCpu=ecs.CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty(
31454
+ max=123,
31455
+ min=123
31456
+ ),
31457
+ network_bandwidth_gbps=ecs.CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty(
31458
+ max=123,
31459
+ min=123
31460
+ ),
31461
+ network_interface_count=ecs.CfnCapacityProvider.NetworkInterfaceCountRequestProperty(
31462
+ max=123,
31463
+ min=123
31464
+ ),
31465
+ on_demand_max_price_percentage_over_lowest_price=123,
31466
+ require_hibernate_support=False,
31467
+ spot_max_price_percentage_over_lowest_price=123,
31468
+ total_local_storage_gb=ecs.CfnCapacityProvider.TotalLocalStorageGBRequestProperty(
31469
+ max=123,
31470
+ min=123
31471
+ )
31472
+ ),
31473
+ monitoring="monitoring",
31474
+ storage_configuration=ecs.CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty(
31475
+ storage_size_gi_b=123
31476
+ )
31477
+ ),
31478
+
31479
+ # the properties below are optional
31480
+ propagate_tags="propagateTags"
31481
+ ),
30707
31482
  name="name",
30708
31483
  tags=[CfnTag(
30709
31484
  key="key",
@@ -30718,6 +31493,8 @@ class CfnCapacityProvider(
30718
31493
  id: builtins.str,
30719
31494
  *,
30720
31495
  auto_scaling_group_provider: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.AutoScalingGroupProviderProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
31496
+ cluster_name: typing.Optional[builtins.str] = None,
31497
+ managed_instances_provider: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.ManagedInstancesProviderProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
30721
31498
  name: typing.Optional[builtins.str] = None,
30722
31499
  tags: typing.Optional[typing.Sequence[typing.Union[_CfnTag_f6864754, typing.Dict[builtins.str, typing.Any]]]] = None,
30723
31500
  ) -> None:
@@ -30725,6 +31502,8 @@ class CfnCapacityProvider(
30725
31502
  :param scope: Scope in which this resource is defined.
30726
31503
  :param id: Construct identifier for this resource (unique in its scope).
30727
31504
  :param auto_scaling_group_provider: The Auto Scaling group settings for the capacity provider.
31505
+ :param cluster_name:
31506
+ :param managed_instances_provider:
30728
31507
  :param name: The name of the capacity provider. If a name is specified, it cannot start with ``aws`` , ``ecs`` , or ``fargate`` . If no name is specified, a default name in the ``CFNStackName-CFNResourceName-RandomString`` format is used.
30729
31508
  :param tags: The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both. The following basic restrictions apply to tags: - Maximum number of tags per resource - 50 - For each resource, each tag key must be unique, and each tag key can have only one value. - Maximum key length - 128 Unicode characters in UTF-8 - Maximum value length - 256 Unicode characters in UTF-8 - If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : /
30730
31509
  '''
@@ -30734,6 +31513,8 @@ class CfnCapacityProvider(
30734
31513
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
30735
31514
  props = CfnCapacityProviderProps(
30736
31515
  auto_scaling_group_provider=auto_scaling_group_provider,
31516
+ cluster_name=cluster_name,
31517
+ managed_instances_provider=managed_instances_provider,
30737
31518
  name=name,
30738
31519
  tags=tags,
30739
31520
  )
@@ -30826,6 +31607,35 @@ class CfnCapacityProvider(
30826
31607
  check_type(argname="argument value", value=value, expected_type=type_hints["value"])
30827
31608
  jsii.set(self, "autoScalingGroupProvider", value) # pyright: ignore[reportArgumentType]
30828
31609
 
31610
+ @builtins.property
31611
+ @jsii.member(jsii_name="clusterName")
31612
+ def cluster_name(self) -> typing.Optional[builtins.str]:
31613
+ return typing.cast(typing.Optional[builtins.str], jsii.get(self, "clusterName"))
31614
+
31615
+ @cluster_name.setter
31616
+ def cluster_name(self, value: typing.Optional[builtins.str]) -> None:
31617
+ if __debug__:
31618
+ type_hints = typing.get_type_hints(_typecheckingstub__56e821d6de113ad791628d9a188368814c7c0fb94ce466313a674dfb2a04780b)
31619
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
31620
+ jsii.set(self, "clusterName", value) # pyright: ignore[reportArgumentType]
31621
+
31622
+ @builtins.property
31623
+ @jsii.member(jsii_name="managedInstancesProvider")
31624
+ def managed_instances_provider(
31625
+ self,
31626
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.ManagedInstancesProviderProperty"]]:
31627
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.ManagedInstancesProviderProperty"]], jsii.get(self, "managedInstancesProvider"))
31628
+
31629
+ @managed_instances_provider.setter
31630
+ def managed_instances_provider(
31631
+ self,
31632
+ value: typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.ManagedInstancesProviderProperty"]],
31633
+ ) -> None:
31634
+ if __debug__:
31635
+ type_hints = typing.get_type_hints(_typecheckingstub__1eade181f601623fa0955313b90bd74d62cfcd3ee4f4809fd9998abc514cb4bc)
31636
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
31637
+ jsii.set(self, "managedInstancesProvider", value) # pyright: ignore[reportArgumentType]
31638
+
30829
31639
  @builtins.property
30830
31640
  @jsii.member(jsii_name="name")
30831
31641
  def name(self) -> typing.Optional[builtins.str]:
@@ -30852,6 +31662,140 @@ class CfnCapacityProvider(
30852
31662
  check_type(argname="argument value", value=value, expected_type=type_hints["value"])
30853
31663
  jsii.set(self, "tagsRaw", value) # pyright: ignore[reportArgumentType]
30854
31664
 
31665
+ @jsii.data_type(
31666
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.AcceleratorCountRequestProperty",
31667
+ jsii_struct_bases=[],
31668
+ name_mapping={"max": "max", "min": "min"},
31669
+ )
31670
+ class AcceleratorCountRequestProperty:
31671
+ def __init__(
31672
+ self,
31673
+ *,
31674
+ max: typing.Optional[jsii.Number] = None,
31675
+ min: typing.Optional[jsii.Number] = None,
31676
+ ) -> None:
31677
+ '''
31678
+ :param max:
31679
+ :param min:
31680
+
31681
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratorcountrequest.html
31682
+ :exampleMetadata: fixture=_generated
31683
+
31684
+ Example::
31685
+
31686
+ # The code below shows an example of how to instantiate this type.
31687
+ # The values are placeholders you should change.
31688
+ from aws_cdk import aws_ecs as ecs
31689
+
31690
+ accelerator_count_request_property = ecs.CfnCapacityProvider.AcceleratorCountRequestProperty(
31691
+ max=123,
31692
+ min=123
31693
+ )
31694
+ '''
31695
+ if __debug__:
31696
+ type_hints = typing.get_type_hints(_typecheckingstub__43d53bcba92c90cf6f4d328d0942a76121d27482644e63c47c94438bbe161846)
31697
+ check_type(argname="argument max", value=max, expected_type=type_hints["max"])
31698
+ check_type(argname="argument min", value=min, expected_type=type_hints["min"])
31699
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
31700
+ if max is not None:
31701
+ self._values["max"] = max
31702
+ if min is not None:
31703
+ self._values["min"] = min
31704
+
31705
+ @builtins.property
31706
+ def max(self) -> typing.Optional[jsii.Number]:
31707
+ '''
31708
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratorcountrequest.html#cfn-ecs-capacityprovider-acceleratorcountrequest-max
31709
+ '''
31710
+ result = self._values.get("max")
31711
+ return typing.cast(typing.Optional[jsii.Number], result)
31712
+
31713
+ @builtins.property
31714
+ def min(self) -> typing.Optional[jsii.Number]:
31715
+ '''
31716
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratorcountrequest.html#cfn-ecs-capacityprovider-acceleratorcountrequest-min
31717
+ '''
31718
+ result = self._values.get("min")
31719
+ return typing.cast(typing.Optional[jsii.Number], result)
31720
+
31721
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
31722
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
31723
+
31724
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
31725
+ return not (rhs == self)
31726
+
31727
+ def __repr__(self) -> str:
31728
+ return "AcceleratorCountRequestProperty(%s)" % ", ".join(
31729
+ k + "=" + repr(v) for k, v in self._values.items()
31730
+ )
31731
+
31732
+ @jsii.data_type(
31733
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty",
31734
+ jsii_struct_bases=[],
31735
+ name_mapping={"max": "max", "min": "min"},
31736
+ )
31737
+ class AcceleratorTotalMemoryMiBRequestProperty:
31738
+ def __init__(
31739
+ self,
31740
+ *,
31741
+ max: typing.Optional[jsii.Number] = None,
31742
+ min: typing.Optional[jsii.Number] = None,
31743
+ ) -> None:
31744
+ '''
31745
+ :param max:
31746
+ :param min:
31747
+
31748
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest.html
31749
+ :exampleMetadata: fixture=_generated
31750
+
31751
+ Example::
31752
+
31753
+ # The code below shows an example of how to instantiate this type.
31754
+ # The values are placeholders you should change.
31755
+ from aws_cdk import aws_ecs as ecs
31756
+
31757
+ accelerator_total_memory_mi_bRequest_property = ecs.CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty(
31758
+ max=123,
31759
+ min=123
31760
+ )
31761
+ '''
31762
+ if __debug__:
31763
+ type_hints = typing.get_type_hints(_typecheckingstub__05b0b4abd870382eb40911671e91b829abe416723b1b38346d22783d1a2c8f67)
31764
+ check_type(argname="argument max", value=max, expected_type=type_hints["max"])
31765
+ check_type(argname="argument min", value=min, expected_type=type_hints["min"])
31766
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
31767
+ if max is not None:
31768
+ self._values["max"] = max
31769
+ if min is not None:
31770
+ self._values["min"] = min
31771
+
31772
+ @builtins.property
31773
+ def max(self) -> typing.Optional[jsii.Number]:
31774
+ '''
31775
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest.html#cfn-ecs-capacityprovider-acceleratortotalmemorymibrequest-max
31776
+ '''
31777
+ result = self._values.get("max")
31778
+ return typing.cast(typing.Optional[jsii.Number], result)
31779
+
31780
+ @builtins.property
31781
+ def min(self) -> typing.Optional[jsii.Number]:
31782
+ '''
31783
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest.html#cfn-ecs-capacityprovider-acceleratortotalmemorymibrequest-min
31784
+ '''
31785
+ result = self._values.get("min")
31786
+ return typing.cast(typing.Optional[jsii.Number], result)
31787
+
31788
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
31789
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
31790
+
31791
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
31792
+ return not (rhs == self)
31793
+
31794
+ def __repr__(self) -> str:
31795
+ return "AcceleratorTotalMemoryMiBRequestProperty(%s)" % ", ".join(
31796
+ k + "=" + repr(v) for k, v in self._values.items()
31797
+ )
31798
+
30855
31799
  @jsii.data_type(
30856
31800
  jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.AutoScalingGroupProviderProperty",
30857
31801
  jsii_struct_bases=[],
@@ -30979,6 +31923,1007 @@ class CfnCapacityProvider(
30979
31923
  k + "=" + repr(v) for k, v in self._values.items()
30980
31924
  )
30981
31925
 
31926
+ @jsii.data_type(
31927
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty",
31928
+ jsii_struct_bases=[],
31929
+ name_mapping={"max": "max", "min": "min"},
31930
+ )
31931
+ class BaselineEbsBandwidthMbpsRequestProperty:
31932
+ def __init__(
31933
+ self,
31934
+ *,
31935
+ max: typing.Optional[jsii.Number] = None,
31936
+ min: typing.Optional[jsii.Number] = None,
31937
+ ) -> None:
31938
+ '''
31939
+ :param max:
31940
+ :param min:
31941
+
31942
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest.html
31943
+ :exampleMetadata: fixture=_generated
31944
+
31945
+ Example::
31946
+
31947
+ # The code below shows an example of how to instantiate this type.
31948
+ # The values are placeholders you should change.
31949
+ from aws_cdk import aws_ecs as ecs
31950
+
31951
+ baseline_ebs_bandwidth_mbps_request_property = ecs.CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty(
31952
+ max=123,
31953
+ min=123
31954
+ )
31955
+ '''
31956
+ if __debug__:
31957
+ type_hints = typing.get_type_hints(_typecheckingstub__55f829b236ccb12cc42e7c374a47c6c0909fecf313bf4ebb779169af029b2ba4)
31958
+ check_type(argname="argument max", value=max, expected_type=type_hints["max"])
31959
+ check_type(argname="argument min", value=min, expected_type=type_hints["min"])
31960
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
31961
+ if max is not None:
31962
+ self._values["max"] = max
31963
+ if min is not None:
31964
+ self._values["min"] = min
31965
+
31966
+ @builtins.property
31967
+ def max(self) -> typing.Optional[jsii.Number]:
31968
+ '''
31969
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest.html#cfn-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-max
31970
+ '''
31971
+ result = self._values.get("max")
31972
+ return typing.cast(typing.Optional[jsii.Number], result)
31973
+
31974
+ @builtins.property
31975
+ def min(self) -> typing.Optional[jsii.Number]:
31976
+ '''
31977
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest.html#cfn-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-min
31978
+ '''
31979
+ result = self._values.get("min")
31980
+ return typing.cast(typing.Optional[jsii.Number], result)
31981
+
31982
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
31983
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
31984
+
31985
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
31986
+ return not (rhs == self)
31987
+
31988
+ def __repr__(self) -> str:
31989
+ return "BaselineEbsBandwidthMbpsRequestProperty(%s)" % ", ".join(
31990
+ k + "=" + repr(v) for k, v in self._values.items()
31991
+ )
31992
+
31993
+ @jsii.data_type(
31994
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.InstanceLaunchTemplateProperty",
31995
+ jsii_struct_bases=[],
31996
+ name_mapping={
31997
+ "ec2_instance_profile_arn": "ec2InstanceProfileArn",
31998
+ "network_configuration": "networkConfiguration",
31999
+ "instance_requirements": "instanceRequirements",
32000
+ "monitoring": "monitoring",
32001
+ "storage_configuration": "storageConfiguration",
32002
+ },
32003
+ )
32004
+ class InstanceLaunchTemplateProperty:
32005
+ def __init__(
32006
+ self,
32007
+ *,
32008
+ ec2_instance_profile_arn: builtins.str,
32009
+ network_configuration: typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty", typing.Dict[builtins.str, typing.Any]]],
32010
+ instance_requirements: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.InstanceRequirementsRequestProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
32011
+ monitoring: typing.Optional[builtins.str] = None,
32012
+ storage_configuration: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
32013
+ ) -> None:
32014
+ '''
32015
+ :param ec2_instance_profile_arn:
32016
+ :param network_configuration:
32017
+ :param instance_requirements:
32018
+ :param monitoring:
32019
+ :param storage_configuration:
32020
+
32021
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html
32022
+ :exampleMetadata: fixture=_generated
32023
+
32024
+ Example::
32025
+
32026
+ # The code below shows an example of how to instantiate this type.
32027
+ # The values are placeholders you should change.
32028
+ from aws_cdk import aws_ecs as ecs
32029
+
32030
+ instance_launch_template_property = ecs.CfnCapacityProvider.InstanceLaunchTemplateProperty(
32031
+ ec2_instance_profile_arn="ec2InstanceProfileArn",
32032
+ network_configuration=ecs.CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty(
32033
+ subnets=["subnets"],
32034
+
32035
+ # the properties below are optional
32036
+ security_groups=["securityGroups"]
32037
+ ),
32038
+
32039
+ # the properties below are optional
32040
+ instance_requirements=ecs.CfnCapacityProvider.InstanceRequirementsRequestProperty(
32041
+ memory_mi_b=ecs.CfnCapacityProvider.MemoryMiBRequestProperty(
32042
+ min=123,
32043
+
32044
+ # the properties below are optional
32045
+ max=123
32046
+ ),
32047
+ v_cpu_count=ecs.CfnCapacityProvider.VCpuCountRangeRequestProperty(
32048
+ min=123,
32049
+
32050
+ # the properties below are optional
32051
+ max=123
32052
+ ),
32053
+
32054
+ # the properties below are optional
32055
+ accelerator_count=ecs.CfnCapacityProvider.AcceleratorCountRequestProperty(
32056
+ max=123,
32057
+ min=123
32058
+ ),
32059
+ accelerator_manufacturers=["acceleratorManufacturers"],
32060
+ accelerator_names=["acceleratorNames"],
32061
+ accelerator_total_memory_mi_b=ecs.CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty(
32062
+ max=123,
32063
+ min=123
32064
+ ),
32065
+ accelerator_types=["acceleratorTypes"],
32066
+ allowed_instance_types=["allowedInstanceTypes"],
32067
+ bare_metal="bareMetal",
32068
+ baseline_ebs_bandwidth_mbps=ecs.CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty(
32069
+ max=123,
32070
+ min=123
32071
+ ),
32072
+ burstable_performance="burstablePerformance",
32073
+ cpu_manufacturers=["cpuManufacturers"],
32074
+ excluded_instance_types=["excludedInstanceTypes"],
32075
+ instance_generations=["instanceGenerations"],
32076
+ local_storage="localStorage",
32077
+ local_storage_types=["localStorageTypes"],
32078
+ max_spot_price_as_percentage_of_optimal_on_demand_price=123,
32079
+ memory_gi_bPer_vCpu=ecs.CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty(
32080
+ max=123,
32081
+ min=123
32082
+ ),
32083
+ network_bandwidth_gbps=ecs.CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty(
32084
+ max=123,
32085
+ min=123
32086
+ ),
32087
+ network_interface_count=ecs.CfnCapacityProvider.NetworkInterfaceCountRequestProperty(
32088
+ max=123,
32089
+ min=123
32090
+ ),
32091
+ on_demand_max_price_percentage_over_lowest_price=123,
32092
+ require_hibernate_support=False,
32093
+ spot_max_price_percentage_over_lowest_price=123,
32094
+ total_local_storage_gb=ecs.CfnCapacityProvider.TotalLocalStorageGBRequestProperty(
32095
+ max=123,
32096
+ min=123
32097
+ )
32098
+ ),
32099
+ monitoring="monitoring",
32100
+ storage_configuration=ecs.CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty(
32101
+ storage_size_gi_b=123
32102
+ )
32103
+ )
32104
+ '''
32105
+ if __debug__:
32106
+ type_hints = typing.get_type_hints(_typecheckingstub__cb545da33f3067adee24bf90d3e903b06a7562a7e6ea6b3785f5b0ae6f3e105d)
32107
+ check_type(argname="argument ec2_instance_profile_arn", value=ec2_instance_profile_arn, expected_type=type_hints["ec2_instance_profile_arn"])
32108
+ check_type(argname="argument network_configuration", value=network_configuration, expected_type=type_hints["network_configuration"])
32109
+ check_type(argname="argument instance_requirements", value=instance_requirements, expected_type=type_hints["instance_requirements"])
32110
+ check_type(argname="argument monitoring", value=monitoring, expected_type=type_hints["monitoring"])
32111
+ check_type(argname="argument storage_configuration", value=storage_configuration, expected_type=type_hints["storage_configuration"])
32112
+ self._values: typing.Dict[builtins.str, typing.Any] = {
32113
+ "ec2_instance_profile_arn": ec2_instance_profile_arn,
32114
+ "network_configuration": network_configuration,
32115
+ }
32116
+ if instance_requirements is not None:
32117
+ self._values["instance_requirements"] = instance_requirements
32118
+ if monitoring is not None:
32119
+ self._values["monitoring"] = monitoring
32120
+ if storage_configuration is not None:
32121
+ self._values["storage_configuration"] = storage_configuration
32122
+
32123
+ @builtins.property
32124
+ def ec2_instance_profile_arn(self) -> builtins.str:
32125
+ '''
32126
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-ec2instanceprofilearn
32127
+ '''
32128
+ result = self._values.get("ec2_instance_profile_arn")
32129
+ assert result is not None, "Required property 'ec2_instance_profile_arn' is missing"
32130
+ return typing.cast(builtins.str, result)
32131
+
32132
+ @builtins.property
32133
+ def network_configuration(
32134
+ self,
32135
+ ) -> typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty"]:
32136
+ '''
32137
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-networkconfiguration
32138
+ '''
32139
+ result = self._values.get("network_configuration")
32140
+ assert result is not None, "Required property 'network_configuration' is missing"
32141
+ return typing.cast(typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty"], result)
32142
+
32143
+ @builtins.property
32144
+ def instance_requirements(
32145
+ self,
32146
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.InstanceRequirementsRequestProperty"]]:
32147
+ '''
32148
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-instancerequirements
32149
+ '''
32150
+ result = self._values.get("instance_requirements")
32151
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.InstanceRequirementsRequestProperty"]], result)
32152
+
32153
+ @builtins.property
32154
+ def monitoring(self) -> typing.Optional[builtins.str]:
32155
+ '''
32156
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-monitoring
32157
+ '''
32158
+ result = self._values.get("monitoring")
32159
+ return typing.cast(typing.Optional[builtins.str], result)
32160
+
32161
+ @builtins.property
32162
+ def storage_configuration(
32163
+ self,
32164
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty"]]:
32165
+ '''
32166
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancelaunchtemplate.html#cfn-ecs-capacityprovider-instancelaunchtemplate-storageconfiguration
32167
+ '''
32168
+ result = self._values.get("storage_configuration")
32169
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty"]], result)
32170
+
32171
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
32172
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
32173
+
32174
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
32175
+ return not (rhs == self)
32176
+
32177
+ def __repr__(self) -> str:
32178
+ return "InstanceLaunchTemplateProperty(%s)" % ", ".join(
32179
+ k + "=" + repr(v) for k, v in self._values.items()
32180
+ )
32181
+
32182
+ @jsii.data_type(
32183
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.InstanceRequirementsRequestProperty",
32184
+ jsii_struct_bases=[],
32185
+ name_mapping={
32186
+ "memory_mib": "memoryMiB",
32187
+ "v_cpu_count": "vCpuCount",
32188
+ "accelerator_count": "acceleratorCount",
32189
+ "accelerator_manufacturers": "acceleratorManufacturers",
32190
+ "accelerator_names": "acceleratorNames",
32191
+ "accelerator_total_memory_mib": "acceleratorTotalMemoryMiB",
32192
+ "accelerator_types": "acceleratorTypes",
32193
+ "allowed_instance_types": "allowedInstanceTypes",
32194
+ "bare_metal": "bareMetal",
32195
+ "baseline_ebs_bandwidth_mbps": "baselineEbsBandwidthMbps",
32196
+ "burstable_performance": "burstablePerformance",
32197
+ "cpu_manufacturers": "cpuManufacturers",
32198
+ "excluded_instance_types": "excludedInstanceTypes",
32199
+ "instance_generations": "instanceGenerations",
32200
+ "local_storage": "localStorage",
32201
+ "local_storage_types": "localStorageTypes",
32202
+ "max_spot_price_as_percentage_of_optimal_on_demand_price": "maxSpotPriceAsPercentageOfOptimalOnDemandPrice",
32203
+ "memory_gib_per_v_cpu": "memoryGiBPerVCpu",
32204
+ "network_bandwidth_gbps": "networkBandwidthGbps",
32205
+ "network_interface_count": "networkInterfaceCount",
32206
+ "on_demand_max_price_percentage_over_lowest_price": "onDemandMaxPricePercentageOverLowestPrice",
32207
+ "require_hibernate_support": "requireHibernateSupport",
32208
+ "spot_max_price_percentage_over_lowest_price": "spotMaxPricePercentageOverLowestPrice",
32209
+ "total_local_storage_gb": "totalLocalStorageGb",
32210
+ },
32211
+ )
32212
+ class InstanceRequirementsRequestProperty:
32213
+ def __init__(
32214
+ self,
32215
+ *,
32216
+ memory_mib: typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.MemoryMiBRequestProperty", typing.Dict[builtins.str, typing.Any]]],
32217
+ v_cpu_count: typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.VCpuCountRangeRequestProperty", typing.Dict[builtins.str, typing.Any]]],
32218
+ accelerator_count: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.AcceleratorCountRequestProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
32219
+ accelerator_manufacturers: typing.Optional[typing.Sequence[builtins.str]] = None,
32220
+ accelerator_names: typing.Optional[typing.Sequence[builtins.str]] = None,
32221
+ accelerator_total_memory_mib: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
32222
+ accelerator_types: typing.Optional[typing.Sequence[builtins.str]] = None,
32223
+ allowed_instance_types: typing.Optional[typing.Sequence[builtins.str]] = None,
32224
+ bare_metal: typing.Optional[builtins.str] = None,
32225
+ baseline_ebs_bandwidth_mbps: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
32226
+ burstable_performance: typing.Optional[builtins.str] = None,
32227
+ cpu_manufacturers: typing.Optional[typing.Sequence[builtins.str]] = None,
32228
+ excluded_instance_types: typing.Optional[typing.Sequence[builtins.str]] = None,
32229
+ instance_generations: typing.Optional[typing.Sequence[builtins.str]] = None,
32230
+ local_storage: typing.Optional[builtins.str] = None,
32231
+ local_storage_types: typing.Optional[typing.Sequence[builtins.str]] = None,
32232
+ max_spot_price_as_percentage_of_optimal_on_demand_price: typing.Optional[jsii.Number] = None,
32233
+ memory_gib_per_v_cpu: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
32234
+ network_bandwidth_gbps: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
32235
+ network_interface_count: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.NetworkInterfaceCountRequestProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
32236
+ on_demand_max_price_percentage_over_lowest_price: typing.Optional[jsii.Number] = None,
32237
+ require_hibernate_support: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
32238
+ spot_max_price_percentage_over_lowest_price: typing.Optional[jsii.Number] = None,
32239
+ total_local_storage_gb: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.TotalLocalStorageGBRequestProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
32240
+ ) -> None:
32241
+ '''
32242
+ :param memory_mib:
32243
+ :param v_cpu_count:
32244
+ :param accelerator_count:
32245
+ :param accelerator_manufacturers:
32246
+ :param accelerator_names:
32247
+ :param accelerator_total_memory_mib:
32248
+ :param accelerator_types:
32249
+ :param allowed_instance_types:
32250
+ :param bare_metal:
32251
+ :param baseline_ebs_bandwidth_mbps:
32252
+ :param burstable_performance:
32253
+ :param cpu_manufacturers:
32254
+ :param excluded_instance_types:
32255
+ :param instance_generations:
32256
+ :param local_storage:
32257
+ :param local_storage_types:
32258
+ :param max_spot_price_as_percentage_of_optimal_on_demand_price:
32259
+ :param memory_gib_per_v_cpu:
32260
+ :param network_bandwidth_gbps:
32261
+ :param network_interface_count:
32262
+ :param on_demand_max_price_percentage_over_lowest_price:
32263
+ :param require_hibernate_support:
32264
+ :param spot_max_price_percentage_over_lowest_price:
32265
+ :param total_local_storage_gb:
32266
+
32267
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html
32268
+ :exampleMetadata: fixture=_generated
32269
+
32270
+ Example::
32271
+
32272
+ # The code below shows an example of how to instantiate this type.
32273
+ # The values are placeholders you should change.
32274
+ from aws_cdk import aws_ecs as ecs
32275
+
32276
+ instance_requirements_request_property = ecs.CfnCapacityProvider.InstanceRequirementsRequestProperty(
32277
+ memory_mi_b=ecs.CfnCapacityProvider.MemoryMiBRequestProperty(
32278
+ min=123,
32279
+
32280
+ # the properties below are optional
32281
+ max=123
32282
+ ),
32283
+ v_cpu_count=ecs.CfnCapacityProvider.VCpuCountRangeRequestProperty(
32284
+ min=123,
32285
+
32286
+ # the properties below are optional
32287
+ max=123
32288
+ ),
32289
+
32290
+ # the properties below are optional
32291
+ accelerator_count=ecs.CfnCapacityProvider.AcceleratorCountRequestProperty(
32292
+ max=123,
32293
+ min=123
32294
+ ),
32295
+ accelerator_manufacturers=["acceleratorManufacturers"],
32296
+ accelerator_names=["acceleratorNames"],
32297
+ accelerator_total_memory_mi_b=ecs.CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty(
32298
+ max=123,
32299
+ min=123
32300
+ ),
32301
+ accelerator_types=["acceleratorTypes"],
32302
+ allowed_instance_types=["allowedInstanceTypes"],
32303
+ bare_metal="bareMetal",
32304
+ baseline_ebs_bandwidth_mbps=ecs.CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty(
32305
+ max=123,
32306
+ min=123
32307
+ ),
32308
+ burstable_performance="burstablePerformance",
32309
+ cpu_manufacturers=["cpuManufacturers"],
32310
+ excluded_instance_types=["excludedInstanceTypes"],
32311
+ instance_generations=["instanceGenerations"],
32312
+ local_storage="localStorage",
32313
+ local_storage_types=["localStorageTypes"],
32314
+ max_spot_price_as_percentage_of_optimal_on_demand_price=123,
32315
+ memory_gi_bPer_vCpu=ecs.CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty(
32316
+ max=123,
32317
+ min=123
32318
+ ),
32319
+ network_bandwidth_gbps=ecs.CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty(
32320
+ max=123,
32321
+ min=123
32322
+ ),
32323
+ network_interface_count=ecs.CfnCapacityProvider.NetworkInterfaceCountRequestProperty(
32324
+ max=123,
32325
+ min=123
32326
+ ),
32327
+ on_demand_max_price_percentage_over_lowest_price=123,
32328
+ require_hibernate_support=False,
32329
+ spot_max_price_percentage_over_lowest_price=123,
32330
+ total_local_storage_gb=ecs.CfnCapacityProvider.TotalLocalStorageGBRequestProperty(
32331
+ max=123,
32332
+ min=123
32333
+ )
32334
+ )
32335
+ '''
32336
+ if __debug__:
32337
+ type_hints = typing.get_type_hints(_typecheckingstub__d2fd7f319e7a3e49a0d45d342ee067f3719bf8c8519bbab1a3a3c81f41641bec)
32338
+ check_type(argname="argument memory_mib", value=memory_mib, expected_type=type_hints["memory_mib"])
32339
+ check_type(argname="argument v_cpu_count", value=v_cpu_count, expected_type=type_hints["v_cpu_count"])
32340
+ check_type(argname="argument accelerator_count", value=accelerator_count, expected_type=type_hints["accelerator_count"])
32341
+ check_type(argname="argument accelerator_manufacturers", value=accelerator_manufacturers, expected_type=type_hints["accelerator_manufacturers"])
32342
+ check_type(argname="argument accelerator_names", value=accelerator_names, expected_type=type_hints["accelerator_names"])
32343
+ check_type(argname="argument accelerator_total_memory_mib", value=accelerator_total_memory_mib, expected_type=type_hints["accelerator_total_memory_mib"])
32344
+ check_type(argname="argument accelerator_types", value=accelerator_types, expected_type=type_hints["accelerator_types"])
32345
+ check_type(argname="argument allowed_instance_types", value=allowed_instance_types, expected_type=type_hints["allowed_instance_types"])
32346
+ check_type(argname="argument bare_metal", value=bare_metal, expected_type=type_hints["bare_metal"])
32347
+ check_type(argname="argument baseline_ebs_bandwidth_mbps", value=baseline_ebs_bandwidth_mbps, expected_type=type_hints["baseline_ebs_bandwidth_mbps"])
32348
+ check_type(argname="argument burstable_performance", value=burstable_performance, expected_type=type_hints["burstable_performance"])
32349
+ check_type(argname="argument cpu_manufacturers", value=cpu_manufacturers, expected_type=type_hints["cpu_manufacturers"])
32350
+ check_type(argname="argument excluded_instance_types", value=excluded_instance_types, expected_type=type_hints["excluded_instance_types"])
32351
+ check_type(argname="argument instance_generations", value=instance_generations, expected_type=type_hints["instance_generations"])
32352
+ check_type(argname="argument local_storage", value=local_storage, expected_type=type_hints["local_storage"])
32353
+ check_type(argname="argument local_storage_types", value=local_storage_types, expected_type=type_hints["local_storage_types"])
32354
+ check_type(argname="argument max_spot_price_as_percentage_of_optimal_on_demand_price", value=max_spot_price_as_percentage_of_optimal_on_demand_price, expected_type=type_hints["max_spot_price_as_percentage_of_optimal_on_demand_price"])
32355
+ check_type(argname="argument memory_gib_per_v_cpu", value=memory_gib_per_v_cpu, expected_type=type_hints["memory_gib_per_v_cpu"])
32356
+ check_type(argname="argument network_bandwidth_gbps", value=network_bandwidth_gbps, expected_type=type_hints["network_bandwidth_gbps"])
32357
+ check_type(argname="argument network_interface_count", value=network_interface_count, expected_type=type_hints["network_interface_count"])
32358
+ check_type(argname="argument on_demand_max_price_percentage_over_lowest_price", value=on_demand_max_price_percentage_over_lowest_price, expected_type=type_hints["on_demand_max_price_percentage_over_lowest_price"])
32359
+ check_type(argname="argument require_hibernate_support", value=require_hibernate_support, expected_type=type_hints["require_hibernate_support"])
32360
+ check_type(argname="argument spot_max_price_percentage_over_lowest_price", value=spot_max_price_percentage_over_lowest_price, expected_type=type_hints["spot_max_price_percentage_over_lowest_price"])
32361
+ check_type(argname="argument total_local_storage_gb", value=total_local_storage_gb, expected_type=type_hints["total_local_storage_gb"])
32362
+ self._values: typing.Dict[builtins.str, typing.Any] = {
32363
+ "memory_mib": memory_mib,
32364
+ "v_cpu_count": v_cpu_count,
32365
+ }
32366
+ if accelerator_count is not None:
32367
+ self._values["accelerator_count"] = accelerator_count
32368
+ if accelerator_manufacturers is not None:
32369
+ self._values["accelerator_manufacturers"] = accelerator_manufacturers
32370
+ if accelerator_names is not None:
32371
+ self._values["accelerator_names"] = accelerator_names
32372
+ if accelerator_total_memory_mib is not None:
32373
+ self._values["accelerator_total_memory_mib"] = accelerator_total_memory_mib
32374
+ if accelerator_types is not None:
32375
+ self._values["accelerator_types"] = accelerator_types
32376
+ if allowed_instance_types is not None:
32377
+ self._values["allowed_instance_types"] = allowed_instance_types
32378
+ if bare_metal is not None:
32379
+ self._values["bare_metal"] = bare_metal
32380
+ if baseline_ebs_bandwidth_mbps is not None:
32381
+ self._values["baseline_ebs_bandwidth_mbps"] = baseline_ebs_bandwidth_mbps
32382
+ if burstable_performance is not None:
32383
+ self._values["burstable_performance"] = burstable_performance
32384
+ if cpu_manufacturers is not None:
32385
+ self._values["cpu_manufacturers"] = cpu_manufacturers
32386
+ if excluded_instance_types is not None:
32387
+ self._values["excluded_instance_types"] = excluded_instance_types
32388
+ if instance_generations is not None:
32389
+ self._values["instance_generations"] = instance_generations
32390
+ if local_storage is not None:
32391
+ self._values["local_storage"] = local_storage
32392
+ if local_storage_types is not None:
32393
+ self._values["local_storage_types"] = local_storage_types
32394
+ if max_spot_price_as_percentage_of_optimal_on_demand_price is not None:
32395
+ self._values["max_spot_price_as_percentage_of_optimal_on_demand_price"] = max_spot_price_as_percentage_of_optimal_on_demand_price
32396
+ if memory_gib_per_v_cpu is not None:
32397
+ self._values["memory_gib_per_v_cpu"] = memory_gib_per_v_cpu
32398
+ if network_bandwidth_gbps is not None:
32399
+ self._values["network_bandwidth_gbps"] = network_bandwidth_gbps
32400
+ if network_interface_count is not None:
32401
+ self._values["network_interface_count"] = network_interface_count
32402
+ if on_demand_max_price_percentage_over_lowest_price is not None:
32403
+ self._values["on_demand_max_price_percentage_over_lowest_price"] = on_demand_max_price_percentage_over_lowest_price
32404
+ if require_hibernate_support is not None:
32405
+ self._values["require_hibernate_support"] = require_hibernate_support
32406
+ if spot_max_price_percentage_over_lowest_price is not None:
32407
+ self._values["spot_max_price_percentage_over_lowest_price"] = spot_max_price_percentage_over_lowest_price
32408
+ if total_local_storage_gb is not None:
32409
+ self._values["total_local_storage_gb"] = total_local_storage_gb
32410
+
32411
+ @builtins.property
32412
+ def memory_mib(
32413
+ self,
32414
+ ) -> typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.MemoryMiBRequestProperty"]:
32415
+ '''
32416
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-memorymib
32417
+ '''
32418
+ result = self._values.get("memory_mib")
32419
+ assert result is not None, "Required property 'memory_mib' is missing"
32420
+ return typing.cast(typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.MemoryMiBRequestProperty"], result)
32421
+
32422
+ @builtins.property
32423
+ def v_cpu_count(
32424
+ self,
32425
+ ) -> typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.VCpuCountRangeRequestProperty"]:
32426
+ '''
32427
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-vcpucount
32428
+ '''
32429
+ result = self._values.get("v_cpu_count")
32430
+ assert result is not None, "Required property 'v_cpu_count' is missing"
32431
+ return typing.cast(typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.VCpuCountRangeRequestProperty"], result)
32432
+
32433
+ @builtins.property
32434
+ def accelerator_count(
32435
+ self,
32436
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.AcceleratorCountRequestProperty"]]:
32437
+ '''
32438
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratorcount
32439
+ '''
32440
+ result = self._values.get("accelerator_count")
32441
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.AcceleratorCountRequestProperty"]], result)
32442
+
32443
+ @builtins.property
32444
+ def accelerator_manufacturers(
32445
+ self,
32446
+ ) -> typing.Optional[typing.List[builtins.str]]:
32447
+ '''
32448
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratormanufacturers
32449
+ '''
32450
+ result = self._values.get("accelerator_manufacturers")
32451
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
32452
+
32453
+ @builtins.property
32454
+ def accelerator_names(self) -> typing.Optional[typing.List[builtins.str]]:
32455
+ '''
32456
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratornames
32457
+ '''
32458
+ result = self._values.get("accelerator_names")
32459
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
32460
+
32461
+ @builtins.property
32462
+ def accelerator_total_memory_mib(
32463
+ self,
32464
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty"]]:
32465
+ '''
32466
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratortotalmemorymib
32467
+ '''
32468
+ result = self._values.get("accelerator_total_memory_mib")
32469
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty"]], result)
32470
+
32471
+ @builtins.property
32472
+ def accelerator_types(self) -> typing.Optional[typing.List[builtins.str]]:
32473
+ '''
32474
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratortypes
32475
+ '''
32476
+ result = self._values.get("accelerator_types")
32477
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
32478
+
32479
+ @builtins.property
32480
+ def allowed_instance_types(self) -> typing.Optional[typing.List[builtins.str]]:
32481
+ '''
32482
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-allowedinstancetypes
32483
+ '''
32484
+ result = self._values.get("allowed_instance_types")
32485
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
32486
+
32487
+ @builtins.property
32488
+ def bare_metal(self) -> typing.Optional[builtins.str]:
32489
+ '''
32490
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-baremetal
32491
+ '''
32492
+ result = self._values.get("bare_metal")
32493
+ return typing.cast(typing.Optional[builtins.str], result)
32494
+
32495
+ @builtins.property
32496
+ def baseline_ebs_bandwidth_mbps(
32497
+ self,
32498
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty"]]:
32499
+ '''
32500
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-baselineebsbandwidthmbps
32501
+ '''
32502
+ result = self._values.get("baseline_ebs_bandwidth_mbps")
32503
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty"]], result)
32504
+
32505
+ @builtins.property
32506
+ def burstable_performance(self) -> typing.Optional[builtins.str]:
32507
+ '''
32508
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-burstableperformance
32509
+ '''
32510
+ result = self._values.get("burstable_performance")
32511
+ return typing.cast(typing.Optional[builtins.str], result)
32512
+
32513
+ @builtins.property
32514
+ def cpu_manufacturers(self) -> typing.Optional[typing.List[builtins.str]]:
32515
+ '''
32516
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-cpumanufacturers
32517
+ '''
32518
+ result = self._values.get("cpu_manufacturers")
32519
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
32520
+
32521
+ @builtins.property
32522
+ def excluded_instance_types(self) -> typing.Optional[typing.List[builtins.str]]:
32523
+ '''
32524
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-excludedinstancetypes
32525
+ '''
32526
+ result = self._values.get("excluded_instance_types")
32527
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
32528
+
32529
+ @builtins.property
32530
+ def instance_generations(self) -> typing.Optional[typing.List[builtins.str]]:
32531
+ '''
32532
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-instancegenerations
32533
+ '''
32534
+ result = self._values.get("instance_generations")
32535
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
32536
+
32537
+ @builtins.property
32538
+ def local_storage(self) -> typing.Optional[builtins.str]:
32539
+ '''
32540
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-localstorage
32541
+ '''
32542
+ result = self._values.get("local_storage")
32543
+ return typing.cast(typing.Optional[builtins.str], result)
32544
+
32545
+ @builtins.property
32546
+ def local_storage_types(self) -> typing.Optional[typing.List[builtins.str]]:
32547
+ '''
32548
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-localstoragetypes
32549
+ '''
32550
+ result = self._values.get("local_storage_types")
32551
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
32552
+
32553
+ @builtins.property
32554
+ def max_spot_price_as_percentage_of_optimal_on_demand_price(
32555
+ self,
32556
+ ) -> typing.Optional[jsii.Number]:
32557
+ '''
32558
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-maxspotpriceaspercentageofoptimalondemandprice
32559
+ '''
32560
+ result = self._values.get("max_spot_price_as_percentage_of_optimal_on_demand_price")
32561
+ return typing.cast(typing.Optional[jsii.Number], result)
32562
+
32563
+ @builtins.property
32564
+ def memory_gib_per_v_cpu(
32565
+ self,
32566
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty"]]:
32567
+ '''
32568
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-memorygibpervcpu
32569
+ '''
32570
+ result = self._values.get("memory_gib_per_v_cpu")
32571
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty"]], result)
32572
+
32573
+ @builtins.property
32574
+ def network_bandwidth_gbps(
32575
+ self,
32576
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty"]]:
32577
+ '''
32578
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-networkbandwidthgbps
32579
+ '''
32580
+ result = self._values.get("network_bandwidth_gbps")
32581
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty"]], result)
32582
+
32583
+ @builtins.property
32584
+ def network_interface_count(
32585
+ self,
32586
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.NetworkInterfaceCountRequestProperty"]]:
32587
+ '''
32588
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-networkinterfacecount
32589
+ '''
32590
+ result = self._values.get("network_interface_count")
32591
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.NetworkInterfaceCountRequestProperty"]], result)
32592
+
32593
+ @builtins.property
32594
+ def on_demand_max_price_percentage_over_lowest_price(
32595
+ self,
32596
+ ) -> typing.Optional[jsii.Number]:
32597
+ '''
32598
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-ondemandmaxpricepercentageoverlowestprice
32599
+ '''
32600
+ result = self._values.get("on_demand_max_price_percentage_over_lowest_price")
32601
+ return typing.cast(typing.Optional[jsii.Number], result)
32602
+
32603
+ @builtins.property
32604
+ def require_hibernate_support(
32605
+ self,
32606
+ ) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
32607
+ '''
32608
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-requirehibernatesupport
32609
+ '''
32610
+ result = self._values.get("require_hibernate_support")
32611
+ return typing.cast(typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]], result)
32612
+
32613
+ @builtins.property
32614
+ def spot_max_price_percentage_over_lowest_price(
32615
+ self,
32616
+ ) -> typing.Optional[jsii.Number]:
32617
+ '''
32618
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-spotmaxpricepercentageoverlowestprice
32619
+ '''
32620
+ result = self._values.get("spot_max_price_percentage_over_lowest_price")
32621
+ return typing.cast(typing.Optional[jsii.Number], result)
32622
+
32623
+ @builtins.property
32624
+ def total_local_storage_gb(
32625
+ self,
32626
+ ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.TotalLocalStorageGBRequestProperty"]]:
32627
+ '''
32628
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-instancerequirementsrequest.html#cfn-ecs-capacityprovider-instancerequirementsrequest-totallocalstoragegb
32629
+ '''
32630
+ result = self._values.get("total_local_storage_gb")
32631
+ return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.TotalLocalStorageGBRequestProperty"]], result)
32632
+
32633
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
32634
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
32635
+
32636
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
32637
+ return not (rhs == self)
32638
+
32639
+ def __repr__(self) -> str:
32640
+ return "InstanceRequirementsRequestProperty(%s)" % ", ".join(
32641
+ k + "=" + repr(v) for k, v in self._values.items()
32642
+ )
32643
+
32644
+ @jsii.data_type(
32645
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty",
32646
+ jsii_struct_bases=[],
32647
+ name_mapping={"subnets": "subnets", "security_groups": "securityGroups"},
32648
+ )
32649
+ class ManagedInstancesNetworkConfigurationProperty:
32650
+ def __init__(
32651
+ self,
32652
+ *,
32653
+ subnets: typing.Sequence[builtins.str],
32654
+ security_groups: typing.Optional[typing.Sequence[builtins.str]] = None,
32655
+ ) -> None:
32656
+ '''
32657
+ :param subnets:
32658
+ :param security_groups:
32659
+
32660
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration.html
32661
+ :exampleMetadata: fixture=_generated
32662
+
32663
+ Example::
32664
+
32665
+ # The code below shows an example of how to instantiate this type.
32666
+ # The values are placeholders you should change.
32667
+ from aws_cdk import aws_ecs as ecs
32668
+
32669
+ managed_instances_network_configuration_property = ecs.CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty(
32670
+ subnets=["subnets"],
32671
+
32672
+ # the properties below are optional
32673
+ security_groups=["securityGroups"]
32674
+ )
32675
+ '''
32676
+ if __debug__:
32677
+ type_hints = typing.get_type_hints(_typecheckingstub__b8cf486af6edb309081654dbba3fcab445314c93a7a69231f0ca16b32fff9ae0)
32678
+ check_type(argname="argument subnets", value=subnets, expected_type=type_hints["subnets"])
32679
+ check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
32680
+ self._values: typing.Dict[builtins.str, typing.Any] = {
32681
+ "subnets": subnets,
32682
+ }
32683
+ if security_groups is not None:
32684
+ self._values["security_groups"] = security_groups
32685
+
32686
+ @builtins.property
32687
+ def subnets(self) -> typing.List[builtins.str]:
32688
+ '''
32689
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration.html#cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-subnets
32690
+ '''
32691
+ result = self._values.get("subnets")
32692
+ assert result is not None, "Required property 'subnets' is missing"
32693
+ return typing.cast(typing.List[builtins.str], result)
32694
+
32695
+ @builtins.property
32696
+ def security_groups(self) -> typing.Optional[typing.List[builtins.str]]:
32697
+ '''
32698
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration.html#cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-securitygroups
32699
+ '''
32700
+ result = self._values.get("security_groups")
32701
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
32702
+
32703
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
32704
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
32705
+
32706
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
32707
+ return not (rhs == self)
32708
+
32709
+ def __repr__(self) -> str:
32710
+ return "ManagedInstancesNetworkConfigurationProperty(%s)" % ", ".join(
32711
+ k + "=" + repr(v) for k, v in self._values.items()
32712
+ )
32713
+
32714
+ @jsii.data_type(
32715
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.ManagedInstancesProviderProperty",
32716
+ jsii_struct_bases=[],
32717
+ name_mapping={
32718
+ "infrastructure_role_arn": "infrastructureRoleArn",
32719
+ "instance_launch_template": "instanceLaunchTemplate",
32720
+ "propagate_tags": "propagateTags",
32721
+ },
32722
+ )
32723
+ class ManagedInstancesProviderProperty:
32724
+ def __init__(
32725
+ self,
32726
+ *,
32727
+ infrastructure_role_arn: builtins.str,
32728
+ instance_launch_template: typing.Union[_IResolvable_da3f097b, typing.Union["CfnCapacityProvider.InstanceLaunchTemplateProperty", typing.Dict[builtins.str, typing.Any]]],
32729
+ propagate_tags: typing.Optional[builtins.str] = None,
32730
+ ) -> None:
32731
+ '''
32732
+ :param infrastructure_role_arn:
32733
+ :param instance_launch_template:
32734
+ :param propagate_tags:
32735
+
32736
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html
32737
+ :exampleMetadata: fixture=_generated
32738
+
32739
+ Example::
32740
+
32741
+ # The code below shows an example of how to instantiate this type.
32742
+ # The values are placeholders you should change.
32743
+ from aws_cdk import aws_ecs as ecs
32744
+
32745
+ managed_instances_provider_property = ecs.CfnCapacityProvider.ManagedInstancesProviderProperty(
32746
+ infrastructure_role_arn="infrastructureRoleArn",
32747
+ instance_launch_template=ecs.CfnCapacityProvider.InstanceLaunchTemplateProperty(
32748
+ ec2_instance_profile_arn="ec2InstanceProfileArn",
32749
+ network_configuration=ecs.CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty(
32750
+ subnets=["subnets"],
32751
+
32752
+ # the properties below are optional
32753
+ security_groups=["securityGroups"]
32754
+ ),
32755
+
32756
+ # the properties below are optional
32757
+ instance_requirements=ecs.CfnCapacityProvider.InstanceRequirementsRequestProperty(
32758
+ memory_mi_b=ecs.CfnCapacityProvider.MemoryMiBRequestProperty(
32759
+ min=123,
32760
+
32761
+ # the properties below are optional
32762
+ max=123
32763
+ ),
32764
+ v_cpu_count=ecs.CfnCapacityProvider.VCpuCountRangeRequestProperty(
32765
+ min=123,
32766
+
32767
+ # the properties below are optional
32768
+ max=123
32769
+ ),
32770
+
32771
+ # the properties below are optional
32772
+ accelerator_count=ecs.CfnCapacityProvider.AcceleratorCountRequestProperty(
32773
+ max=123,
32774
+ min=123
32775
+ ),
32776
+ accelerator_manufacturers=["acceleratorManufacturers"],
32777
+ accelerator_names=["acceleratorNames"],
32778
+ accelerator_total_memory_mi_b=ecs.CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty(
32779
+ max=123,
32780
+ min=123
32781
+ ),
32782
+ accelerator_types=["acceleratorTypes"],
32783
+ allowed_instance_types=["allowedInstanceTypes"],
32784
+ bare_metal="bareMetal",
32785
+ baseline_ebs_bandwidth_mbps=ecs.CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty(
32786
+ max=123,
32787
+ min=123
32788
+ ),
32789
+ burstable_performance="burstablePerformance",
32790
+ cpu_manufacturers=["cpuManufacturers"],
32791
+ excluded_instance_types=["excludedInstanceTypes"],
32792
+ instance_generations=["instanceGenerations"],
32793
+ local_storage="localStorage",
32794
+ local_storage_types=["localStorageTypes"],
32795
+ max_spot_price_as_percentage_of_optimal_on_demand_price=123,
32796
+ memory_gi_bPer_vCpu=ecs.CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty(
32797
+ max=123,
32798
+ min=123
32799
+ ),
32800
+ network_bandwidth_gbps=ecs.CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty(
32801
+ max=123,
32802
+ min=123
32803
+ ),
32804
+ network_interface_count=ecs.CfnCapacityProvider.NetworkInterfaceCountRequestProperty(
32805
+ max=123,
32806
+ min=123
32807
+ ),
32808
+ on_demand_max_price_percentage_over_lowest_price=123,
32809
+ require_hibernate_support=False,
32810
+ spot_max_price_percentage_over_lowest_price=123,
32811
+ total_local_storage_gb=ecs.CfnCapacityProvider.TotalLocalStorageGBRequestProperty(
32812
+ max=123,
32813
+ min=123
32814
+ )
32815
+ ),
32816
+ monitoring="monitoring",
32817
+ storage_configuration=ecs.CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty(
32818
+ storage_size_gi_b=123
32819
+ )
32820
+ ),
32821
+
32822
+ # the properties below are optional
32823
+ propagate_tags="propagateTags"
32824
+ )
32825
+ '''
32826
+ if __debug__:
32827
+ type_hints = typing.get_type_hints(_typecheckingstub__45a3888e29c1b6fb29bc3dbf90f279f8c543b8924bb51956a75f3290eca0b7c9)
32828
+ check_type(argname="argument infrastructure_role_arn", value=infrastructure_role_arn, expected_type=type_hints["infrastructure_role_arn"])
32829
+ check_type(argname="argument instance_launch_template", value=instance_launch_template, expected_type=type_hints["instance_launch_template"])
32830
+ check_type(argname="argument propagate_tags", value=propagate_tags, expected_type=type_hints["propagate_tags"])
32831
+ self._values: typing.Dict[builtins.str, typing.Any] = {
32832
+ "infrastructure_role_arn": infrastructure_role_arn,
32833
+ "instance_launch_template": instance_launch_template,
32834
+ }
32835
+ if propagate_tags is not None:
32836
+ self._values["propagate_tags"] = propagate_tags
32837
+
32838
+ @builtins.property
32839
+ def infrastructure_role_arn(self) -> builtins.str:
32840
+ '''
32841
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-infrastructurerolearn
32842
+ '''
32843
+ result = self._values.get("infrastructure_role_arn")
32844
+ assert result is not None, "Required property 'infrastructure_role_arn' is missing"
32845
+ return typing.cast(builtins.str, result)
32846
+
32847
+ @builtins.property
32848
+ def instance_launch_template(
32849
+ self,
32850
+ ) -> typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.InstanceLaunchTemplateProperty"]:
32851
+ '''
32852
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-instancelaunchtemplate
32853
+ '''
32854
+ result = self._values.get("instance_launch_template")
32855
+ assert result is not None, "Required property 'instance_launch_template' is missing"
32856
+ return typing.cast(typing.Union[_IResolvable_da3f097b, "CfnCapacityProvider.InstanceLaunchTemplateProperty"], result)
32857
+
32858
+ @builtins.property
32859
+ def propagate_tags(self) -> typing.Optional[builtins.str]:
32860
+ '''
32861
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-propagatetags
32862
+ '''
32863
+ result = self._values.get("propagate_tags")
32864
+ return typing.cast(typing.Optional[builtins.str], result)
32865
+
32866
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
32867
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
32868
+
32869
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
32870
+ return not (rhs == self)
32871
+
32872
+ def __repr__(self) -> str:
32873
+ return "ManagedInstancesProviderProperty(%s)" % ", ".join(
32874
+ k + "=" + repr(v) for k, v in self._values.items()
32875
+ )
32876
+
32877
+ @jsii.data_type(
32878
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty",
32879
+ jsii_struct_bases=[],
32880
+ name_mapping={"storage_size_gib": "storageSizeGiB"},
32881
+ )
32882
+ class ManagedInstancesStorageConfigurationProperty:
32883
+ def __init__(self, *, storage_size_gib: jsii.Number) -> None:
32884
+ '''
32885
+ :param storage_size_gib:
32886
+
32887
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesstorageconfiguration.html
32888
+ :exampleMetadata: fixture=_generated
32889
+
32890
+ Example::
32891
+
32892
+ # The code below shows an example of how to instantiate this type.
32893
+ # The values are placeholders you should change.
32894
+ from aws_cdk import aws_ecs as ecs
32895
+
32896
+ managed_instances_storage_configuration_property = ecs.CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty(
32897
+ storage_size_gi_b=123
32898
+ )
32899
+ '''
32900
+ if __debug__:
32901
+ type_hints = typing.get_type_hints(_typecheckingstub__8d1e06667171eb082ce77bd8060c435a6f130ac6e9384412fb372763b838e22b)
32902
+ check_type(argname="argument storage_size_gib", value=storage_size_gib, expected_type=type_hints["storage_size_gib"])
32903
+ self._values: typing.Dict[builtins.str, typing.Any] = {
32904
+ "storage_size_gib": storage_size_gib,
32905
+ }
32906
+
32907
+ @builtins.property
32908
+ def storage_size_gib(self) -> jsii.Number:
32909
+ '''
32910
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesstorageconfiguration.html#cfn-ecs-capacityprovider-managedinstancesstorageconfiguration-storagesizegib
32911
+ '''
32912
+ result = self._values.get("storage_size_gib")
32913
+ assert result is not None, "Required property 'storage_size_gib' is missing"
32914
+ return typing.cast(jsii.Number, result)
32915
+
32916
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
32917
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
32918
+
32919
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
32920
+ return not (rhs == self)
32921
+
32922
+ def __repr__(self) -> str:
32923
+ return "ManagedInstancesStorageConfigurationProperty(%s)" % ", ".join(
32924
+ k + "=" + repr(v) for k, v in self._values.items()
32925
+ )
32926
+
30982
32927
  @jsii.data_type(
30983
32928
  jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.ManagedScalingProperty",
30984
32929
  jsii_struct_bases=[],
@@ -31114,6 +33059,414 @@ class CfnCapacityProvider(
31114
33059
  k + "=" + repr(v) for k, v in self._values.items()
31115
33060
  )
31116
33061
 
33062
+ @jsii.data_type(
33063
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty",
33064
+ jsii_struct_bases=[],
33065
+ name_mapping={"max": "max", "min": "min"},
33066
+ )
33067
+ class MemoryGiBPerVCpuRequestProperty:
33068
+ def __init__(
33069
+ self,
33070
+ *,
33071
+ max: typing.Optional[jsii.Number] = None,
33072
+ min: typing.Optional[jsii.Number] = None,
33073
+ ) -> None:
33074
+ '''
33075
+ :param max:
33076
+ :param min:
33077
+
33078
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorygibpervcpurequest.html
33079
+ :exampleMetadata: fixture=_generated
33080
+
33081
+ Example::
33082
+
33083
+ # The code below shows an example of how to instantiate this type.
33084
+ # The values are placeholders you should change.
33085
+ from aws_cdk import aws_ecs as ecs
33086
+
33087
+ memory_gi_bPer_vCpu_request_property = ecs.CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty(
33088
+ max=123,
33089
+ min=123
33090
+ )
33091
+ '''
33092
+ if __debug__:
33093
+ type_hints = typing.get_type_hints(_typecheckingstub__01b8a285c0250eb2fa8268dc32a515cb17c662ef0085fef55300ca206a1a746c)
33094
+ check_type(argname="argument max", value=max, expected_type=type_hints["max"])
33095
+ check_type(argname="argument min", value=min, expected_type=type_hints["min"])
33096
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
33097
+ if max is not None:
33098
+ self._values["max"] = max
33099
+ if min is not None:
33100
+ self._values["min"] = min
33101
+
33102
+ @builtins.property
33103
+ def max(self) -> typing.Optional[jsii.Number]:
33104
+ '''
33105
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorygibpervcpurequest.html#cfn-ecs-capacityprovider-memorygibpervcpurequest-max
33106
+ '''
33107
+ result = self._values.get("max")
33108
+ return typing.cast(typing.Optional[jsii.Number], result)
33109
+
33110
+ @builtins.property
33111
+ def min(self) -> typing.Optional[jsii.Number]:
33112
+ '''
33113
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorygibpervcpurequest.html#cfn-ecs-capacityprovider-memorygibpervcpurequest-min
33114
+ '''
33115
+ result = self._values.get("min")
33116
+ return typing.cast(typing.Optional[jsii.Number], result)
33117
+
33118
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
33119
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
33120
+
33121
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
33122
+ return not (rhs == self)
33123
+
33124
+ def __repr__(self) -> str:
33125
+ return "MemoryGiBPerVCpuRequestProperty(%s)" % ", ".join(
33126
+ k + "=" + repr(v) for k, v in self._values.items()
33127
+ )
33128
+
33129
+ @jsii.data_type(
33130
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.MemoryMiBRequestProperty",
33131
+ jsii_struct_bases=[],
33132
+ name_mapping={"min": "min", "max": "max"},
33133
+ )
33134
+ class MemoryMiBRequestProperty:
33135
+ def __init__(
33136
+ self,
33137
+ *,
33138
+ min: jsii.Number,
33139
+ max: typing.Optional[jsii.Number] = None,
33140
+ ) -> None:
33141
+ '''
33142
+ :param min:
33143
+ :param max:
33144
+
33145
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorymibrequest.html
33146
+ :exampleMetadata: fixture=_generated
33147
+
33148
+ Example::
33149
+
33150
+ # The code below shows an example of how to instantiate this type.
33151
+ # The values are placeholders you should change.
33152
+ from aws_cdk import aws_ecs as ecs
33153
+
33154
+ memory_mi_bRequest_property = ecs.CfnCapacityProvider.MemoryMiBRequestProperty(
33155
+ min=123,
33156
+
33157
+ # the properties below are optional
33158
+ max=123
33159
+ )
33160
+ '''
33161
+ if __debug__:
33162
+ type_hints = typing.get_type_hints(_typecheckingstub__a69680081ccdd5c785405398f4f1d616d0c97b874ced183049da2f9c6e34787e)
33163
+ check_type(argname="argument min", value=min, expected_type=type_hints["min"])
33164
+ check_type(argname="argument max", value=max, expected_type=type_hints["max"])
33165
+ self._values: typing.Dict[builtins.str, typing.Any] = {
33166
+ "min": min,
33167
+ }
33168
+ if max is not None:
33169
+ self._values["max"] = max
33170
+
33171
+ @builtins.property
33172
+ def min(self) -> jsii.Number:
33173
+ '''
33174
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorymibrequest.html#cfn-ecs-capacityprovider-memorymibrequest-min
33175
+ '''
33176
+ result = self._values.get("min")
33177
+ assert result is not None, "Required property 'min' is missing"
33178
+ return typing.cast(jsii.Number, result)
33179
+
33180
+ @builtins.property
33181
+ def max(self) -> typing.Optional[jsii.Number]:
33182
+ '''
33183
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorymibrequest.html#cfn-ecs-capacityprovider-memorymibrequest-max
33184
+ '''
33185
+ result = self._values.get("max")
33186
+ return typing.cast(typing.Optional[jsii.Number], result)
33187
+
33188
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
33189
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
33190
+
33191
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
33192
+ return not (rhs == self)
33193
+
33194
+ def __repr__(self) -> str:
33195
+ return "MemoryMiBRequestProperty(%s)" % ", ".join(
33196
+ k + "=" + repr(v) for k, v in self._values.items()
33197
+ )
33198
+
33199
+ @jsii.data_type(
33200
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty",
33201
+ jsii_struct_bases=[],
33202
+ name_mapping={"max": "max", "min": "min"},
33203
+ )
33204
+ class NetworkBandwidthGbpsRequestProperty:
33205
+ def __init__(
33206
+ self,
33207
+ *,
33208
+ max: typing.Optional[jsii.Number] = None,
33209
+ min: typing.Optional[jsii.Number] = None,
33210
+ ) -> None:
33211
+ '''
33212
+ :param max:
33213
+ :param min:
33214
+
33215
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest.html
33216
+ :exampleMetadata: fixture=_generated
33217
+
33218
+ Example::
33219
+
33220
+ # The code below shows an example of how to instantiate this type.
33221
+ # The values are placeholders you should change.
33222
+ from aws_cdk import aws_ecs as ecs
33223
+
33224
+ network_bandwidth_gbps_request_property = ecs.CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty(
33225
+ max=123,
33226
+ min=123
33227
+ )
33228
+ '''
33229
+ if __debug__:
33230
+ type_hints = typing.get_type_hints(_typecheckingstub__0b64349de0e0aa036cd2591e8e4db2f873feceecef981a341ecb449ccf6868be)
33231
+ check_type(argname="argument max", value=max, expected_type=type_hints["max"])
33232
+ check_type(argname="argument min", value=min, expected_type=type_hints["min"])
33233
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
33234
+ if max is not None:
33235
+ self._values["max"] = max
33236
+ if min is not None:
33237
+ self._values["min"] = min
33238
+
33239
+ @builtins.property
33240
+ def max(self) -> typing.Optional[jsii.Number]:
33241
+ '''
33242
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest.html#cfn-ecs-capacityprovider-networkbandwidthgbpsrequest-max
33243
+ '''
33244
+ result = self._values.get("max")
33245
+ return typing.cast(typing.Optional[jsii.Number], result)
33246
+
33247
+ @builtins.property
33248
+ def min(self) -> typing.Optional[jsii.Number]:
33249
+ '''
33250
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest.html#cfn-ecs-capacityprovider-networkbandwidthgbpsrequest-min
33251
+ '''
33252
+ result = self._values.get("min")
33253
+ return typing.cast(typing.Optional[jsii.Number], result)
33254
+
33255
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
33256
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
33257
+
33258
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
33259
+ return not (rhs == self)
33260
+
33261
+ def __repr__(self) -> str:
33262
+ return "NetworkBandwidthGbpsRequestProperty(%s)" % ", ".join(
33263
+ k + "=" + repr(v) for k, v in self._values.items()
33264
+ )
33265
+
33266
+ @jsii.data_type(
33267
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.NetworkInterfaceCountRequestProperty",
33268
+ jsii_struct_bases=[],
33269
+ name_mapping={"max": "max", "min": "min"},
33270
+ )
33271
+ class NetworkInterfaceCountRequestProperty:
33272
+ def __init__(
33273
+ self,
33274
+ *,
33275
+ max: typing.Optional[jsii.Number] = None,
33276
+ min: typing.Optional[jsii.Number] = None,
33277
+ ) -> None:
33278
+ '''
33279
+ :param max:
33280
+ :param min:
33281
+
33282
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkinterfacecountrequest.html
33283
+ :exampleMetadata: fixture=_generated
33284
+
33285
+ Example::
33286
+
33287
+ # The code below shows an example of how to instantiate this type.
33288
+ # The values are placeholders you should change.
33289
+ from aws_cdk import aws_ecs as ecs
33290
+
33291
+ network_interface_count_request_property = ecs.CfnCapacityProvider.NetworkInterfaceCountRequestProperty(
33292
+ max=123,
33293
+ min=123
33294
+ )
33295
+ '''
33296
+ if __debug__:
33297
+ type_hints = typing.get_type_hints(_typecheckingstub__b7767213e94df32328c6564e342330aa95c25ac187a4114099951ea2e0802ddb)
33298
+ check_type(argname="argument max", value=max, expected_type=type_hints["max"])
33299
+ check_type(argname="argument min", value=min, expected_type=type_hints["min"])
33300
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
33301
+ if max is not None:
33302
+ self._values["max"] = max
33303
+ if min is not None:
33304
+ self._values["min"] = min
33305
+
33306
+ @builtins.property
33307
+ def max(self) -> typing.Optional[jsii.Number]:
33308
+ '''
33309
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkinterfacecountrequest.html#cfn-ecs-capacityprovider-networkinterfacecountrequest-max
33310
+ '''
33311
+ result = self._values.get("max")
33312
+ return typing.cast(typing.Optional[jsii.Number], result)
33313
+
33314
+ @builtins.property
33315
+ def min(self) -> typing.Optional[jsii.Number]:
33316
+ '''
33317
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-networkinterfacecountrequest.html#cfn-ecs-capacityprovider-networkinterfacecountrequest-min
33318
+ '''
33319
+ result = self._values.get("min")
33320
+ return typing.cast(typing.Optional[jsii.Number], result)
33321
+
33322
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
33323
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
33324
+
33325
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
33326
+ return not (rhs == self)
33327
+
33328
+ def __repr__(self) -> str:
33329
+ return "NetworkInterfaceCountRequestProperty(%s)" % ", ".join(
33330
+ k + "=" + repr(v) for k, v in self._values.items()
33331
+ )
33332
+
33333
+ @jsii.data_type(
33334
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.TotalLocalStorageGBRequestProperty",
33335
+ jsii_struct_bases=[],
33336
+ name_mapping={"max": "max", "min": "min"},
33337
+ )
33338
+ class TotalLocalStorageGBRequestProperty:
33339
+ def __init__(
33340
+ self,
33341
+ *,
33342
+ max: typing.Optional[jsii.Number] = None,
33343
+ min: typing.Optional[jsii.Number] = None,
33344
+ ) -> None:
33345
+ '''
33346
+ :param max:
33347
+ :param min:
33348
+
33349
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-totallocalstoragegbrequest.html
33350
+ :exampleMetadata: fixture=_generated
33351
+
33352
+ Example::
33353
+
33354
+ # The code below shows an example of how to instantiate this type.
33355
+ # The values are placeholders you should change.
33356
+ from aws_cdk import aws_ecs as ecs
33357
+
33358
+ total_local_storage_gBRequest_property = ecs.CfnCapacityProvider.TotalLocalStorageGBRequestProperty(
33359
+ max=123,
33360
+ min=123
33361
+ )
33362
+ '''
33363
+ if __debug__:
33364
+ type_hints = typing.get_type_hints(_typecheckingstub__0b9cda28d66272632c4d42fbe68333883ca70c46c98159c2cd3f806c8bcc87fb)
33365
+ check_type(argname="argument max", value=max, expected_type=type_hints["max"])
33366
+ check_type(argname="argument min", value=min, expected_type=type_hints["min"])
33367
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
33368
+ if max is not None:
33369
+ self._values["max"] = max
33370
+ if min is not None:
33371
+ self._values["min"] = min
33372
+
33373
+ @builtins.property
33374
+ def max(self) -> typing.Optional[jsii.Number]:
33375
+ '''
33376
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-totallocalstoragegbrequest.html#cfn-ecs-capacityprovider-totallocalstoragegbrequest-max
33377
+ '''
33378
+ result = self._values.get("max")
33379
+ return typing.cast(typing.Optional[jsii.Number], result)
33380
+
33381
+ @builtins.property
33382
+ def min(self) -> typing.Optional[jsii.Number]:
33383
+ '''
33384
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-totallocalstoragegbrequest.html#cfn-ecs-capacityprovider-totallocalstoragegbrequest-min
33385
+ '''
33386
+ result = self._values.get("min")
33387
+ return typing.cast(typing.Optional[jsii.Number], result)
33388
+
33389
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
33390
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
33391
+
33392
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
33393
+ return not (rhs == self)
33394
+
33395
+ def __repr__(self) -> str:
33396
+ return "TotalLocalStorageGBRequestProperty(%s)" % ", ".join(
33397
+ k + "=" + repr(v) for k, v in self._values.items()
33398
+ )
33399
+
33400
+ @jsii.data_type(
33401
+ jsii_type="aws-cdk-lib.aws_ecs.CfnCapacityProvider.VCpuCountRangeRequestProperty",
33402
+ jsii_struct_bases=[],
33403
+ name_mapping={"min": "min", "max": "max"},
33404
+ )
33405
+ class VCpuCountRangeRequestProperty:
33406
+ def __init__(
33407
+ self,
33408
+ *,
33409
+ min: jsii.Number,
33410
+ max: typing.Optional[jsii.Number] = None,
33411
+ ) -> None:
33412
+ '''
33413
+ :param min:
33414
+ :param max:
33415
+
33416
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-vcpucountrangerequest.html
33417
+ :exampleMetadata: fixture=_generated
33418
+
33419
+ Example::
33420
+
33421
+ # The code below shows an example of how to instantiate this type.
33422
+ # The values are placeholders you should change.
33423
+ from aws_cdk import aws_ecs as ecs
33424
+
33425
+ v_cpu_count_range_request_property = ecs.CfnCapacityProvider.VCpuCountRangeRequestProperty(
33426
+ min=123,
33427
+
33428
+ # the properties below are optional
33429
+ max=123
33430
+ )
33431
+ '''
33432
+ if __debug__:
33433
+ type_hints = typing.get_type_hints(_typecheckingstub__f6d818d37cfd5e478cf4f6075fe0ba45bdd81aa83e9eb5b3f01094a71abf8822)
33434
+ check_type(argname="argument min", value=min, expected_type=type_hints["min"])
33435
+ check_type(argname="argument max", value=max, expected_type=type_hints["max"])
33436
+ self._values: typing.Dict[builtins.str, typing.Any] = {
33437
+ "min": min,
33438
+ }
33439
+ if max is not None:
33440
+ self._values["max"] = max
33441
+
33442
+ @builtins.property
33443
+ def min(self) -> jsii.Number:
33444
+ '''
33445
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-vcpucountrangerequest.html#cfn-ecs-capacityprovider-vcpucountrangerequest-min
33446
+ '''
33447
+ result = self._values.get("min")
33448
+ assert result is not None, "Required property 'min' is missing"
33449
+ return typing.cast(jsii.Number, result)
33450
+
33451
+ @builtins.property
33452
+ def max(self) -> typing.Optional[jsii.Number]:
33453
+ '''
33454
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-vcpucountrangerequest.html#cfn-ecs-capacityprovider-vcpucountrangerequest-max
33455
+ '''
33456
+ result = self._values.get("max")
33457
+ return typing.cast(typing.Optional[jsii.Number], result)
33458
+
33459
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
33460
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
33461
+
33462
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
33463
+ return not (rhs == self)
33464
+
33465
+ def __repr__(self) -> str:
33466
+ return "VCpuCountRangeRequestProperty(%s)" % ", ".join(
33467
+ k + "=" + repr(v) for k, v in self._values.items()
33468
+ )
33469
+
31117
33470
 
31118
33471
  @jsii.implements(_IInspectable_c2943556, IClusterRef, _ITaggable_36806126)
31119
33472
  class CfnCluster(
@@ -42799,24 +45152,43 @@ class Cluster(
42799
45152
 
42800
45153
  Example::
42801
45154
 
42802
- from aws_cdk import Tags
45155
+ # vpc: ec2.Vpc
42803
45156
 
42804
45157
 
42805
- vpc = ec2.Vpc(self, "Vpc", max_azs=1)
42806
- cluster = ecs.Cluster(self, "EcsCluster", vpc=vpc)
42807
- task_definition = ecs.FargateTaskDefinition(self, "TaskDef",
42808
- memory_limit_mi_b=512,
42809
- cpu=256
45158
+ cluster = ecs.Cluster(self, "Cluster",
45159
+ vpc=vpc
42810
45160
  )
42811
- task_definition.add_container("WebContainer",
42812
- image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample")
45161
+
45162
+ auto_scaling_group = autoscaling.AutoScalingGroup(self, "ASG",
45163
+ vpc=vpc,
45164
+ instance_type=ec2.InstanceType("t2.micro"),
45165
+ machine_image=ecs.EcsOptimizedImage.amazon_linux2(),
45166
+ min_capacity=0,
45167
+ max_capacity=100
42813
45168
  )
42814
- Tags.of(task_definition).add("my-tag", "my-tag-value")
42815
- scheduled_fargate_task = ecs_patterns.ScheduledFargateTask(self, "ScheduledFargateTask",
45169
+
45170
+ capacity_provider = ecs.AsgCapacityProvider(self, "AsgCapacityProvider",
45171
+ auto_scaling_group=auto_scaling_group,
45172
+ instance_warmup_period=300
45173
+ )
45174
+ cluster.add_asg_capacity_provider(capacity_provider)
45175
+
45176
+ task_definition = ecs.Ec2TaskDefinition(self, "TaskDef")
45177
+
45178
+ task_definition.add_container("web",
45179
+ image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
45180
+ memory_reservation_mi_b=256
45181
+ )
45182
+
45183
+ ecs.Ec2Service(self, "EC2Service",
42816
45184
  cluster=cluster,
42817
45185
  task_definition=task_definition,
42818
- schedule=appscaling.Schedule.expression("rate(1 minute)"),
42819
- propagate_tags=ecs.PropagatedTagSource.TASK_DEFINITION
45186
+ min_healthy_percent=100,
45187
+ capacity_provider_strategies=[ecs.CapacityProviderStrategy(
45188
+ capacity_provider=capacity_provider.capacity_provider_name,
45189
+ weight=1
45190
+ )
45191
+ ]
42820
45192
  )
42821
45193
  '''
42822
45194
 
@@ -43145,6 +45517,20 @@ class Cluster(
43145
45517
 
43146
45518
  return typing.cast(_INamespace_6b61e84f, jsii.invoke(self, "addDefaultCloudMapNamespace", [options]))
43147
45519
 
45520
+ @jsii.member(jsii_name="addManagedInstancesCapacityProvider")
45521
+ def add_managed_instances_capacity_provider(
45522
+ self,
45523
+ provider: ManagedInstancesCapacityProvider,
45524
+ ) -> None:
45525
+ '''This method adds a Managed Instances Capacity Provider to a cluster.
45526
+
45527
+ :param provider: the capacity provider to add to this cluster.
45528
+ '''
45529
+ if __debug__:
45530
+ type_hints = typing.get_type_hints(_typecheckingstub__5a82d1be969d3085ebea9661809bac2d0fcfb12723cd197d9b51420e44f7dbe3)
45531
+ check_type(argname="argument provider", value=provider, expected_type=type_hints["provider"])
45532
+ return typing.cast(None, jsii.invoke(self, "addManagedInstancesCapacityProvider", [provider]))
45533
+
43148
45534
  @jsii.member(jsii_name="arnForTasks")
43149
45535
  def arn_for_tasks(self, key_pattern: builtins.str) -> builtins.str:
43150
45536
  '''Returns an ARN that represents all tasks within the cluster that match the task pattern specified.
@@ -43459,6 +45845,15 @@ class Cluster(
43459
45845
  '''The name of the cluster.'''
43460
45846
  return typing.cast(builtins.str, jsii.get(self, "clusterName"))
43461
45847
 
45848
+ @builtins.property
45849
+ @jsii.member(jsii_name="clusterScopedCapacityProviderNames")
45850
+ def cluster_scoped_capacity_provider_names(self) -> typing.List[builtins.str]:
45851
+ '''Getter for _clusterScopedCapacityProviderNames.
45852
+
45853
+ :attribute: true
45854
+ '''
45855
+ return typing.cast(typing.List[builtins.str], jsii.get(self, "clusterScopedCapacityProviderNames"))
45856
+
43462
45857
  @builtins.property
43463
45858
  @jsii.member(jsii_name="connections")
43464
45859
  def connections(self) -> _Connections_0f31fce8:
@@ -44972,30 +47367,33 @@ class Ec2Service(
44972
47367
 
44973
47368
  Example::
44974
47369
 
44975
- # vpc: ec2.Vpc
44976
-
47370
+ # task_definition: ecs.TaskDefinition
47371
+ # cluster: ecs.Cluster
44977
47372
 
44978
- # Create an ECS cluster
44979
- cluster = ecs.Cluster(self, "Cluster", vpc=vpc)
44980
47373
 
44981
- # Add capacity to it
44982
- cluster.add_capacity("DefaultAutoScalingGroupCapacity",
44983
- instance_type=ec2.InstanceType("t2.xlarge"),
44984
- desired_capacity=3
47374
+ # Add a container to the task definition
47375
+ specific_container = task_definition.add_container("Container",
47376
+ image=ecs.ContainerImage.from_registry("/aws/aws-example-app"),
47377
+ memory_limit_mi_b=2048
44985
47378
  )
44986
47379
 
44987
- task_definition = ecs.Ec2TaskDefinition(self, "TaskDef")
44988
-
44989
- task_definition.add_container("DefaultContainer",
44990
- image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
44991
- memory_limit_mi_b=512
47380
+ # Add a port mapping
47381
+ specific_container.add_port_mappings(
47382
+ container_port=7600,
47383
+ protocol=ecs.Protocol.TCP
44992
47384
  )
44993
47385
 
44994
- # Instantiate an Amazon ECS Service
44995
- ecs_service = ecs.Ec2Service(self, "Service",
47386
+ ecs.Ec2Service(self, "Service",
44996
47387
  cluster=cluster,
44997
47388
  task_definition=task_definition,
44998
- min_healthy_percent=100
47389
+ min_healthy_percent=100,
47390
+ cloud_map_options=ecs.CloudMapOptions(
47391
+ # Create SRV records - useful for bridge networking
47392
+ dns_record_type=cloudmap.DnsRecordType.SRV,
47393
+ # Targets port TCP port 7600 `specificContainer`
47394
+ container=specific_container,
47395
+ container_port=7600
47396
+ )
44999
47397
  )
45000
47398
  '''
45001
47399
 
@@ -45953,6 +48351,9 @@ class FargateService(
45953
48351
  ):
45954
48352
  '''This creates a service using the Fargate launch type on an ECS cluster.
45955
48353
 
48354
+ Can also be used with Managed Instances compatible task definitions when using
48355
+ capacity provider strategies.
48356
+
45956
48357
  :resource: AWS::ECS::Service
45957
48358
  :exampleMetadata: infused
45958
48359
 
@@ -46510,6 +48911,7 @@ __all__ = [
46510
48911
  "ITaskDefinitionRef",
46511
48912
  "ITaskSetRef",
46512
48913
  "InferenceAccelerator",
48914
+ "InstanceMonitoring",
46513
48915
  "IpcMode",
46514
48916
  "JournaldLogDriver",
46515
48917
  "JournaldLogDriverProps",
@@ -46525,6 +48927,8 @@ __all__ = [
46525
48927
  "LogDriverConfig",
46526
48928
  "LogDrivers",
46527
48929
  "MachineImageType",
48930
+ "ManagedInstancesCapacityProvider",
48931
+ "ManagedInstancesCapacityProviderProps",
46528
48932
  "ManagedStorageConfiguration",
46529
48933
  "MemoryUtilizationScalingProps",
46530
48934
  "MountPoint",
@@ -46536,6 +48940,7 @@ __all__ = [
46536
48940
  "PortMap",
46537
48941
  "PortMapping",
46538
48942
  "PrimaryTaskSetReference",
48943
+ "PropagateManagedInstancesTags",
46539
48944
  "PropagatedTagSource",
46540
48945
  "Protocol",
46541
48946
  "ProxyConfiguration",
@@ -46914,6 +49319,8 @@ def _typecheckingstub__481a7064afb879135819febdd572a91fb6799e4bfadf66c711f640b51
46914
49319
  def _typecheckingstub__48080bdf05dc1c4ca9ab46c833774163f6afcd0d1551b378b8d59e67bc180c3f(
46915
49320
  *,
46916
49321
  auto_scaling_group_provider: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.AutoScalingGroupProviderProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
49322
+ cluster_name: typing.Optional[builtins.str] = None,
49323
+ managed_instances_provider: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.ManagedInstancesProviderProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
46917
49324
  name: typing.Optional[builtins.str] = None,
46918
49325
  tags: typing.Optional[typing.Sequence[typing.Union[_CfnTag_f6864754, typing.Dict[builtins.str, typing.Any]]]] = None,
46919
49326
  ) -> None:
@@ -48323,6 +50730,44 @@ def _typecheckingstub__4028d39adfbd4018be781b02eae5afae009ba3d6754c9cac3c26580b7
48323
50730
  """Type checking stubs"""
48324
50731
  pass
48325
50732
 
50733
+ def _typecheckingstub__718bb820f1409b5f15556f2e394659a060bda46e302dbb4e973a6484f24497de(
50734
+ scope: _constructs_77d1e7e8.Construct,
50735
+ id: builtins.str,
50736
+ *,
50737
+ ec2_instance_profile: _IInstanceProfile_10d5ce2c,
50738
+ subnets: typing.Sequence[_ISubnet_d57d1229],
50739
+ capacity_provider_name: typing.Optional[builtins.str] = None,
50740
+ infrastructure_role: typing.Optional[_IRole_235f5d8e] = None,
50741
+ instance_requirements: typing.Optional[typing.Union[_InstanceRequirementsConfig_1b353659, typing.Dict[builtins.str, typing.Any]]] = None,
50742
+ monitoring: typing.Optional[InstanceMonitoring] = None,
50743
+ propagate_tags: typing.Optional[PropagateManagedInstancesTags] = None,
50744
+ security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
50745
+ task_volume_storage: typing.Optional[_Size_7b441c34] = None,
50746
+ ) -> None:
50747
+ """Type checking stubs"""
50748
+ pass
50749
+
50750
+ def _typecheckingstub__86f1df235e6255faeece6081f964f386186a84532c53bb8fad57fd4ab50e809d(
50751
+ cluster: ICluster,
50752
+ ) -> None:
50753
+ """Type checking stubs"""
50754
+ pass
50755
+
50756
+ def _typecheckingstub__efa15b9a00384128ebdb40ffd56f7e66e8863f1c3a6b8d4cf8bc61fb9e822e92(
50757
+ *,
50758
+ ec2_instance_profile: _IInstanceProfile_10d5ce2c,
50759
+ subnets: typing.Sequence[_ISubnet_d57d1229],
50760
+ capacity_provider_name: typing.Optional[builtins.str] = None,
50761
+ infrastructure_role: typing.Optional[_IRole_235f5d8e] = None,
50762
+ instance_requirements: typing.Optional[typing.Union[_InstanceRequirementsConfig_1b353659, typing.Dict[builtins.str, typing.Any]]] = None,
50763
+ monitoring: typing.Optional[InstanceMonitoring] = None,
50764
+ propagate_tags: typing.Optional[PropagateManagedInstancesTags] = None,
50765
+ security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
50766
+ task_volume_storage: typing.Optional[_Size_7b441c34] = None,
50767
+ ) -> None:
50768
+ """Type checking stubs"""
50769
+ pass
50770
+
48326
50771
  def _typecheckingstub__2f9a1356d6603371cc25e0653216ab0167448ba43002bef5b32c489376e7fbb9(
48327
50772
  *,
48328
50773
  fargate_ephemeral_storage_kms_key: typing.Optional[_IKey_5f11635f] = None,
@@ -49178,6 +51623,8 @@ def _typecheckingstub__59a913caee739f6d41600bf8ae89985db638913fbcb77a8abd5451cda
49178
51623
  id: builtins.str,
49179
51624
  *,
49180
51625
  auto_scaling_group_provider: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.AutoScalingGroupProviderProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
51626
+ cluster_name: typing.Optional[builtins.str] = None,
51627
+ managed_instances_provider: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.ManagedInstancesProviderProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
49181
51628
  name: typing.Optional[builtins.str] = None,
49182
51629
  tags: typing.Optional[typing.Sequence[typing.Union[_CfnTag_f6864754, typing.Dict[builtins.str, typing.Any]]]] = None,
49183
51630
  ) -> None:
@@ -49210,6 +51657,18 @@ def _typecheckingstub__5888da07adc4050987d977b4699983a6760a2abcd538f800018e65953
49210
51657
  """Type checking stubs"""
49211
51658
  pass
49212
51659
 
51660
+ def _typecheckingstub__56e821d6de113ad791628d9a188368814c7c0fb94ce466313a674dfb2a04780b(
51661
+ value: typing.Optional[builtins.str],
51662
+ ) -> None:
51663
+ """Type checking stubs"""
51664
+ pass
51665
+
51666
+ def _typecheckingstub__1eade181f601623fa0955313b90bd74d62cfcd3ee4f4809fd9998abc514cb4bc(
51667
+ value: typing.Optional[typing.Union[_IResolvable_da3f097b, CfnCapacityProvider.ManagedInstancesProviderProperty]],
51668
+ ) -> None:
51669
+ """Type checking stubs"""
51670
+ pass
51671
+
49213
51672
  def _typecheckingstub__6b097d35daad25c1c594150aba1acbb2fe2a7052d42d247db35563ec5fed6bd4(
49214
51673
  value: typing.Optional[builtins.str],
49215
51674
  ) -> None:
@@ -49222,6 +51681,22 @@ def _typecheckingstub__81c56757bceb2c5880b41cbaabe62c67844b248e61c810588b5c50b5f
49222
51681
  """Type checking stubs"""
49223
51682
  pass
49224
51683
 
51684
+ def _typecheckingstub__43d53bcba92c90cf6f4d328d0942a76121d27482644e63c47c94438bbe161846(
51685
+ *,
51686
+ max: typing.Optional[jsii.Number] = None,
51687
+ min: typing.Optional[jsii.Number] = None,
51688
+ ) -> None:
51689
+ """Type checking stubs"""
51690
+ pass
51691
+
51692
+ def _typecheckingstub__05b0b4abd870382eb40911671e91b829abe416723b1b38346d22783d1a2c8f67(
51693
+ *,
51694
+ max: typing.Optional[jsii.Number] = None,
51695
+ min: typing.Optional[jsii.Number] = None,
51696
+ ) -> None:
51697
+ """Type checking stubs"""
51698
+ pass
51699
+
49225
51700
  def _typecheckingstub__ca441075e92a847965e776db4f5ab9f545ce368b5efa4bc2476d58061dd0b742(
49226
51701
  *,
49227
51702
  auto_scaling_group_arn: builtins.str,
@@ -49232,6 +51707,79 @@ def _typecheckingstub__ca441075e92a847965e776db4f5ab9f545ce368b5efa4bc2476d58061
49232
51707
  """Type checking stubs"""
49233
51708
  pass
49234
51709
 
51710
+ def _typecheckingstub__55f829b236ccb12cc42e7c374a47c6c0909fecf313bf4ebb779169af029b2ba4(
51711
+ *,
51712
+ max: typing.Optional[jsii.Number] = None,
51713
+ min: typing.Optional[jsii.Number] = None,
51714
+ ) -> None:
51715
+ """Type checking stubs"""
51716
+ pass
51717
+
51718
+ def _typecheckingstub__cb545da33f3067adee24bf90d3e903b06a7562a7e6ea6b3785f5b0ae6f3e105d(
51719
+ *,
51720
+ ec2_instance_profile_arn: builtins.str,
51721
+ network_configuration: typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.ManagedInstancesNetworkConfigurationProperty, typing.Dict[builtins.str, typing.Any]]],
51722
+ instance_requirements: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.InstanceRequirementsRequestProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
51723
+ monitoring: typing.Optional[builtins.str] = None,
51724
+ storage_configuration: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.ManagedInstancesStorageConfigurationProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
51725
+ ) -> None:
51726
+ """Type checking stubs"""
51727
+ pass
51728
+
51729
+ def _typecheckingstub__d2fd7f319e7a3e49a0d45d342ee067f3719bf8c8519bbab1a3a3c81f41641bec(
51730
+ *,
51731
+ memory_mib: typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.MemoryMiBRequestProperty, typing.Dict[builtins.str, typing.Any]]],
51732
+ v_cpu_count: typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.VCpuCountRangeRequestProperty, typing.Dict[builtins.str, typing.Any]]],
51733
+ accelerator_count: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.AcceleratorCountRequestProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
51734
+ accelerator_manufacturers: typing.Optional[typing.Sequence[builtins.str]] = None,
51735
+ accelerator_names: typing.Optional[typing.Sequence[builtins.str]] = None,
51736
+ accelerator_total_memory_mib: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.AcceleratorTotalMemoryMiBRequestProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
51737
+ accelerator_types: typing.Optional[typing.Sequence[builtins.str]] = None,
51738
+ allowed_instance_types: typing.Optional[typing.Sequence[builtins.str]] = None,
51739
+ bare_metal: typing.Optional[builtins.str] = None,
51740
+ baseline_ebs_bandwidth_mbps: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.BaselineEbsBandwidthMbpsRequestProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
51741
+ burstable_performance: typing.Optional[builtins.str] = None,
51742
+ cpu_manufacturers: typing.Optional[typing.Sequence[builtins.str]] = None,
51743
+ excluded_instance_types: typing.Optional[typing.Sequence[builtins.str]] = None,
51744
+ instance_generations: typing.Optional[typing.Sequence[builtins.str]] = None,
51745
+ local_storage: typing.Optional[builtins.str] = None,
51746
+ local_storage_types: typing.Optional[typing.Sequence[builtins.str]] = None,
51747
+ max_spot_price_as_percentage_of_optimal_on_demand_price: typing.Optional[jsii.Number] = None,
51748
+ memory_gib_per_v_cpu: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.MemoryGiBPerVCpuRequestProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
51749
+ network_bandwidth_gbps: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.NetworkBandwidthGbpsRequestProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
51750
+ network_interface_count: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.NetworkInterfaceCountRequestProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
51751
+ on_demand_max_price_percentage_over_lowest_price: typing.Optional[jsii.Number] = None,
51752
+ require_hibernate_support: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
51753
+ spot_max_price_percentage_over_lowest_price: typing.Optional[jsii.Number] = None,
51754
+ total_local_storage_gb: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.TotalLocalStorageGBRequestProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
51755
+ ) -> None:
51756
+ """Type checking stubs"""
51757
+ pass
51758
+
51759
+ def _typecheckingstub__b8cf486af6edb309081654dbba3fcab445314c93a7a69231f0ca16b32fff9ae0(
51760
+ *,
51761
+ subnets: typing.Sequence[builtins.str],
51762
+ security_groups: typing.Optional[typing.Sequence[builtins.str]] = None,
51763
+ ) -> None:
51764
+ """Type checking stubs"""
51765
+ pass
51766
+
51767
+ def _typecheckingstub__45a3888e29c1b6fb29bc3dbf90f279f8c543b8924bb51956a75f3290eca0b7c9(
51768
+ *,
51769
+ infrastructure_role_arn: builtins.str,
51770
+ instance_launch_template: typing.Union[_IResolvable_da3f097b, typing.Union[CfnCapacityProvider.InstanceLaunchTemplateProperty, typing.Dict[builtins.str, typing.Any]]],
51771
+ propagate_tags: typing.Optional[builtins.str] = None,
51772
+ ) -> None:
51773
+ """Type checking stubs"""
51774
+ pass
51775
+
51776
+ def _typecheckingstub__8d1e06667171eb082ce77bd8060c435a6f130ac6e9384412fb372763b838e22b(
51777
+ *,
51778
+ storage_size_gib: jsii.Number,
51779
+ ) -> None:
51780
+ """Type checking stubs"""
51781
+ pass
51782
+
49235
51783
  def _typecheckingstub__b6ba7d15ac2121ea6e10f20fe3e2441ae17d00f30897db384f8f72e7d6406865(
49236
51784
  *,
49237
51785
  instance_warmup_period: typing.Optional[jsii.Number] = None,
@@ -49243,6 +51791,54 @@ def _typecheckingstub__b6ba7d15ac2121ea6e10f20fe3e2441ae17d00f30897db384f8f72e7d
49243
51791
  """Type checking stubs"""
49244
51792
  pass
49245
51793
 
51794
+ def _typecheckingstub__01b8a285c0250eb2fa8268dc32a515cb17c662ef0085fef55300ca206a1a746c(
51795
+ *,
51796
+ max: typing.Optional[jsii.Number] = None,
51797
+ min: typing.Optional[jsii.Number] = None,
51798
+ ) -> None:
51799
+ """Type checking stubs"""
51800
+ pass
51801
+
51802
+ def _typecheckingstub__a69680081ccdd5c785405398f4f1d616d0c97b874ced183049da2f9c6e34787e(
51803
+ *,
51804
+ min: jsii.Number,
51805
+ max: typing.Optional[jsii.Number] = None,
51806
+ ) -> None:
51807
+ """Type checking stubs"""
51808
+ pass
51809
+
51810
+ def _typecheckingstub__0b64349de0e0aa036cd2591e8e4db2f873feceecef981a341ecb449ccf6868be(
51811
+ *,
51812
+ max: typing.Optional[jsii.Number] = None,
51813
+ min: typing.Optional[jsii.Number] = None,
51814
+ ) -> None:
51815
+ """Type checking stubs"""
51816
+ pass
51817
+
51818
+ def _typecheckingstub__b7767213e94df32328c6564e342330aa95c25ac187a4114099951ea2e0802ddb(
51819
+ *,
51820
+ max: typing.Optional[jsii.Number] = None,
51821
+ min: typing.Optional[jsii.Number] = None,
51822
+ ) -> None:
51823
+ """Type checking stubs"""
51824
+ pass
51825
+
51826
+ def _typecheckingstub__0b9cda28d66272632c4d42fbe68333883ca70c46c98159c2cd3f806c8bcc87fb(
51827
+ *,
51828
+ max: typing.Optional[jsii.Number] = None,
51829
+ min: typing.Optional[jsii.Number] = None,
51830
+ ) -> None:
51831
+ """Type checking stubs"""
51832
+ pass
51833
+
51834
+ def _typecheckingstub__f6d818d37cfd5e478cf4f6075fe0ba45bdd81aa83e9eb5b3f01094a71abf8822(
51835
+ *,
51836
+ min: jsii.Number,
51837
+ max: typing.Optional[jsii.Number] = None,
51838
+ ) -> None:
51839
+ """Type checking stubs"""
51840
+ pass
51841
+
49246
51842
  def _typecheckingstub__ea27f9318b2a509011f1175119715629617e6b8d976d0782e37d54e45f1e94c8(
49247
51843
  scope: _constructs_77d1e7e8.Construct,
49248
51844
  id: builtins.str,
@@ -50683,6 +53279,12 @@ def _typecheckingstub__e4b0382e0260e2588867571eddfb9f2d145389bea69e7e0b00917ba8a
50683
53279
  """Type checking stubs"""
50684
53280
  pass
50685
53281
 
53282
+ def _typecheckingstub__5a82d1be969d3085ebea9661809bac2d0fcfb12723cd197d9b51420e44f7dbe3(
53283
+ provider: ManagedInstancesCapacityProvider,
53284
+ ) -> None:
53285
+ """Type checking stubs"""
53286
+ pass
53287
+
50686
53288
  def _typecheckingstub__dc82c424ab5a0b25f0e355e707c39f45826ed166c15976f45690abfa1ffcd30e(
50687
53289
  key_pattern: builtins.str,
50688
53290
  ) -> None: