aws-cdk-lib 2.176.0__py3-none-any.whl → 2.178.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 (120) hide show
  1. aws_cdk/__init__.py +106 -62
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.176.0.jsii.tgz → aws-cdk-lib@2.178.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_amplifyuibuilder/__init__.py +8 -8
  5. aws_cdk/aws_apigateway/__init__.py +97 -97
  6. aws_cdk/aws_apigatewayv2/__init__.py +35 -10
  7. aws_cdk/aws_apigatewayv2_integrations/__init__.py +2 -2
  8. aws_cdk/aws_appconfig/__init__.py +10 -10
  9. aws_cdk/aws_appflow/__init__.py +20 -20
  10. aws_cdk/aws_applicationsignals/__init__.py +8 -8
  11. aws_cdk/aws_appmesh/__init__.py +8 -8
  12. aws_cdk/aws_appsync/__init__.py +10387 -7038
  13. aws_cdk/aws_apptest/__init__.py +4 -4
  14. aws_cdk/aws_aps/__init__.py +135 -0
  15. aws_cdk/aws_athena/__init__.py +10 -10
  16. aws_cdk/aws_backup/__init__.py +14 -14
  17. aws_cdk/aws_batch/__init__.py +189 -24
  18. aws_cdk/aws_bcmdataexports/__init__.py +4 -4
  19. aws_cdk/aws_bedrock/__init__.py +5494 -2518
  20. aws_cdk/aws_certificatemanager/__init__.py +15 -14
  21. aws_cdk/aws_chatbot/__init__.py +4 -4
  22. aws_cdk/aws_cloudformation/__init__.py +22 -18
  23. aws_cdk/aws_cloudfront/__init__.py +686 -9
  24. aws_cdk/aws_cloudfront_origins/__init__.py +73 -2
  25. aws_cdk/aws_cloudtrail/__init__.py +4 -4
  26. aws_cdk/aws_cloudwatch/__init__.py +53 -53
  27. aws_cdk/aws_codedeploy/__init__.py +2 -2
  28. aws_cdk/aws_codepipeline/__init__.py +59 -6
  29. aws_cdk/aws_codepipeline_actions/__init__.py +2 -2
  30. aws_cdk/aws_cognito/__init__.py +204 -159
  31. aws_cdk/aws_connect/__init__.py +4 -4
  32. aws_cdk/aws_customerprofiles/__init__.py +6 -4
  33. aws_cdk/aws_databrew/__init__.py +16 -16
  34. aws_cdk/aws_datasync/__init__.py +14 -11
  35. aws_cdk/aws_datazone/__init__.py +199 -129
  36. aws_cdk/aws_dms/__init__.py +4 -4
  37. aws_cdk/aws_dynamodb/__init__.py +267 -25
  38. aws_cdk/aws_ec2/__init__.py +1142 -184
  39. aws_cdk/aws_ecs/__init__.py +767 -124
  40. aws_cdk/aws_ecs_patterns/__init__.py +49 -0
  41. aws_cdk/aws_efs/__init__.py +8 -8
  42. aws_cdk/aws_eks/__init__.py +55 -35
  43. aws_cdk/aws_elasticache/__init__.py +10 -10
  44. aws_cdk/aws_elasticloadbalancingv2/__init__.py +47 -18
  45. aws_cdk/aws_elasticsearch/__init__.py +10 -10
  46. aws_cdk/aws_emr/__init__.py +16 -16
  47. aws_cdk/aws_emrserverless/__init__.py +93 -4
  48. aws_cdk/aws_entityresolution/__init__.py +31 -17
  49. aws_cdk/aws_events/__init__.py +12 -12
  50. aws_cdk/aws_fis/__init__.py +16 -16
  51. aws_cdk/aws_fms/__init__.py +46 -0
  52. aws_cdk/aws_gamelift/__init__.py +8 -10
  53. aws_cdk/aws_glue/__init__.py +1326 -7
  54. aws_cdk/aws_greengrassv2/__init__.py +8 -8
  55. aws_cdk/aws_guardduty/__init__.py +521 -0
  56. aws_cdk/aws_healthlake/__init__.py +10 -2
  57. aws_cdk/aws_iam/__init__.py +8 -0
  58. aws_cdk/aws_imagebuilder/__init__.py +88 -74
  59. aws_cdk/aws_iot/__init__.py +40 -40
  60. aws_cdk/aws_iotanalytics/__init__.py +4 -4
  61. aws_cdk/aws_iotfleetwise/__init__.py +424 -10
  62. aws_cdk/aws_iotsitewise/__init__.py +84 -13
  63. aws_cdk/aws_iottwinmaker/__init__.py +18 -18
  64. aws_cdk/aws_iotwireless/__init__.py +4 -4
  65. aws_cdk/aws_kafkaconnect/__init__.py +10 -10
  66. aws_cdk/aws_kendra/__init__.py +0 -10
  67. aws_cdk/aws_kinesisanalytics/__init__.py +4 -4
  68. aws_cdk/aws_kinesisanalyticsv2/__init__.py +4 -4
  69. aws_cdk/aws_kinesisfirehose/__init__.py +4544 -183
  70. aws_cdk/aws_kms/__init__.py +11 -10
  71. aws_cdk/aws_lambda/__init__.py +47 -4
  72. aws_cdk/aws_lambda_nodejs/__init__.py +24 -5
  73. aws_cdk/aws_launchwizard/__init__.py +10 -10
  74. aws_cdk/aws_logs/__init__.py +78 -74
  75. aws_cdk/aws_mediaconnect/__init__.py +509 -12
  76. aws_cdk/aws_medialive/__init__.py +16 -16
  77. aws_cdk/aws_mediatailor/__init__.py +10 -10
  78. aws_cdk/aws_networkfirewall/__init__.py +12 -12
  79. aws_cdk/aws_notifications/__init__.py +1927 -0
  80. aws_cdk/aws_notificationscontacts/__init__.py +593 -0
  81. aws_cdk/aws_omics/__init__.py +4 -4
  82. aws_cdk/aws_opensearchservice/__init__.py +10 -10
  83. aws_cdk/aws_opsworks/__init__.py +58 -58
  84. aws_cdk/aws_personalize/__init__.py +8 -8
  85. aws_cdk/aws_pipes/__init__.py +20 -20
  86. aws_cdk/aws_qbusiness/__init__.py +119 -0
  87. aws_cdk/aws_quicksight/__init__.py +247 -92
  88. aws_cdk/aws_rds/__init__.py +37 -37
  89. aws_cdk/aws_redshift/__init__.py +19 -15
  90. aws_cdk/aws_resiliencehub/__init__.py +0 -41
  91. aws_cdk/aws_route53/__init__.py +10 -4
  92. aws_cdk/aws_route53_targets/__init__.py +15 -15
  93. aws_cdk/aws_rum/__init__.py +4 -4
  94. aws_cdk/aws_s3/__init__.py +801 -2
  95. aws_cdk/aws_s3_notifications/__init__.py +5 -5
  96. aws_cdk/aws_s3tables/__init__.py +2 -2
  97. aws_cdk/aws_sagemaker/__init__.py +84 -60
  98. aws_cdk/aws_sam/__init__.py +48 -48
  99. aws_cdk/aws_secretsmanager/__init__.py +30 -14
  100. aws_cdk/aws_securityhub/__init__.py +12 -12
  101. aws_cdk/aws_sns/__init__.py +137 -12
  102. aws_cdk/aws_ssm/__init__.py +5 -5
  103. aws_cdk/aws_ssmquicksetup/__init__.py +10 -10
  104. aws_cdk/aws_stepfunctions/__init__.py +13207 -4740
  105. aws_cdk/aws_stepfunctions_tasks/__init__.py +77615 -22817
  106. aws_cdk/aws_synthetics/__init__.py +109 -36
  107. aws_cdk/aws_timestream/__init__.py +41 -0
  108. aws_cdk/aws_transfer/__init__.py +9 -10
  109. aws_cdk/aws_wafv2/__init__.py +24 -22
  110. aws_cdk/aws_wisdom/__init__.py +8 -8
  111. aws_cdk/aws_workspacesweb/__init__.py +60 -60
  112. aws_cdk/aws_xray/__init__.py +8 -8
  113. aws_cdk/cloud_assembly_schema/__init__.py +63 -4
  114. aws_cdk/cx_api/__init__.py +62 -4
  115. {aws_cdk_lib-2.176.0.dist-info → aws_cdk_lib-2.178.0.dist-info}/METADATA +3 -3
  116. {aws_cdk_lib-2.176.0.dist-info → aws_cdk_lib-2.178.0.dist-info}/RECORD +120 -118
  117. {aws_cdk_lib-2.176.0.dist-info → aws_cdk_lib-2.178.0.dist-info}/LICENSE +0 -0
  118. {aws_cdk_lib-2.176.0.dist-info → aws_cdk_lib-2.178.0.dist-info}/NOTICE +0 -0
  119. {aws_cdk_lib-2.176.0.dist-info → aws_cdk_lib-2.178.0.dist-info}/WHEEL +0 -0
  120. {aws_cdk_lib-2.176.0.dist-info → aws_cdk_lib-2.178.0.dist-info}/top_level.txt +0 -0
@@ -1170,6 +1170,73 @@ const service = ecs.FargateService.fromFargateServiceAttributes(this, 'EcsServic
1170
1170
  const service = ecs.FargateService.fromFargateServiceArn(this, 'EcsService', 'arn:aws:ecs:us-west-2:123456789012:service/my-http-service');
1171
1171
  ```
1172
1172
 
1173
+ ### Availability Zone rebalancing
1174
+
1175
+ ECS services running in AWS can be launched in multiple VPC subnets that are
1176
+ each in different Availability Zones (AZs) to achieve high availability. Fargate
1177
+ services launched this way will automatically try to achieve an even spread of
1178
+ service tasks across AZs, and EC2 services can be instructed to do the same with
1179
+ placement strategies. This ensures that the service has equal availability in
1180
+ each AZ.
1181
+
1182
+ ```python
1183
+ # vpc: ec2.Vpc
1184
+ # cluster: ecs.Cluster
1185
+ # task_definition: ecs.TaskDefinition
1186
+
1187
+
1188
+ service = ecs.FargateService(self, "Service",
1189
+ cluster=cluster,
1190
+ task_definition=task_definition,
1191
+ # Fargate will try to ensure an even spread of newly launched tasks across
1192
+ # all AZs corresponding to the public subnets of the VPC.
1193
+ vpc_subnets=ec2.SubnetSelection(subnet_type=ec2.SubnetType.PUBLIC)
1194
+ )
1195
+ ```
1196
+
1197
+ However, those approaches only affect how newly launched tasks are placed.
1198
+ Service tasks can still become unevenly spread across AZs if there is an
1199
+ infrastructure event, like an AZ outage or a lack of available compute capacity
1200
+ in an AZ. During such events, newly launched tasks may be placed in AZs in such
1201
+ a way that tasks are not evenly spread across all AZs. After the infrastructure
1202
+ event is over, the service will remain imbalanced until new tasks are launched
1203
+ for some other reason, such as a service deployment.
1204
+
1205
+ Availability Zone rebalancing is a feature whereby ECS actively tries to correct
1206
+ service AZ imbalances whenever they exist, by moving service tasks from
1207
+ overbalanced AZs to underbalanced AZs. When an imbalance is detected, ECS will
1208
+ launch new tasks in underbalanced AZs, then stop existing tasks in overbalanced
1209
+ AZs, to ensure an even spread.
1210
+
1211
+ You can enabled Availability Zone rebalancing when creating your service:
1212
+
1213
+ ```python
1214
+ # cluster: ecs.Cluster
1215
+ # task_definition: ecs.TaskDefinition
1216
+
1217
+
1218
+ service = ecs.FargateService(self, "Service",
1219
+ cluster=cluster,
1220
+ task_definition=task_definition,
1221
+ availability_zone_rebalancing=ecs.AvailabilityZoneRebalancing.ENABLED
1222
+ )
1223
+ ```
1224
+
1225
+ Availability Zone rebalancing works in the following configurations:
1226
+
1227
+ * Services that use the Replica strategy.
1228
+ * Services that specify Availability Zone spread as the first task placement
1229
+ strategy, or do not specify a placement strategy.
1230
+
1231
+ You can't use Availability Zone rebalancing with services that meet any of the
1232
+ following criteria:
1233
+
1234
+ * Uses the Daemon strategy.
1235
+ * Uses the EXTERNAL launch type (ECSAnywhere).
1236
+ * Uses 100% for the maximumPercent value.
1237
+ * Uses a Classic Load Balancer.
1238
+ * Uses the `attribute:ecs.availability-zone` as a task placement constraint.
1239
+
1173
1240
  ## Task Auto-Scaling
1174
1241
 
1175
1242
  You can configure the task count of a service to match demand. Task auto-scaling is
@@ -1959,6 +2026,20 @@ task_definition.add_container("TheContainer",
1959
2026
  )
1960
2027
  ```
1961
2028
 
2029
+ ## Disable service container image version consistency
2030
+
2031
+ You can disable the
2032
+ [container image "version consistency"](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html#deployment-container-image-stability)
2033
+ feature of ECS service deployments on a per-container basis.
2034
+
2035
+ ```python
2036
+ task_definition = ecs.Ec2TaskDefinition(self, "TaskDef")
2037
+ task_definition.add_container("TheContainer",
2038
+ image=ecs.ContainerImage.from_registry("example-image"),
2039
+ version_consistency=ecs.VersionConsistency.DISABLED
2040
+ )
2041
+ ```
2042
+
1962
2043
  ## Specify a container ulimit
1963
2044
 
1964
2045
  You can specify a container `ulimits` by specifying them in the `ulimits` option while adding the container
@@ -1975,6 +2056,65 @@ task_definition.add_container("TheContainer",
1975
2056
  )]
1976
2057
  )
1977
2058
  ```
2059
+
2060
+ ## Service Connect TLS
2061
+
2062
+ Service Connect TLS is a feature that allows you to secure the communication between services using TLS.
2063
+
2064
+ You can specify the `tls` option in the `services` array of the `serviceConnectConfiguration` property.
2065
+
2066
+ The `tls` property is an object with the following properties:
2067
+
2068
+ * `role`: The IAM role that's associated with the Service Connect TLS.
2069
+ * `awsPcaAuthorityArn`: The ARN of the certificate root authority that secures your service.
2070
+ * `kmsKey`: The KMS key used for encryption and decryption.
2071
+
2072
+ ```python
2073
+ # cluster: ecs.Cluster
2074
+ # task_definition: ecs.TaskDefinition
2075
+ # kms_key: kms.IKey
2076
+ # role: iam.IRole
2077
+
2078
+
2079
+ service = ecs.FargateService(self, "FargateService",
2080
+ cluster=cluster,
2081
+ task_definition=task_definition,
2082
+ service_connect_configuration=ecs.ServiceConnectProps(
2083
+ services=[ecs.ServiceConnectService(
2084
+ tls=ecs.ServiceConnectTlsConfiguration(
2085
+ role=role,
2086
+ kms_key=kms_key,
2087
+ aws_pca_authority_arn="arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/123456789012"
2088
+ ),
2089
+ port_mapping_name="api"
2090
+ )
2091
+ ],
2092
+ namespace="sample namespace"
2093
+ )
2094
+ )
2095
+ ```
2096
+
2097
+ ## Daemon scheduling strategy
2098
+
2099
+ You can specify whether service use Daemon scheduling strategy by specifying `daemon` option in Service constructs. See [differences between Daemon and Replica scheduling strategy](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html)
2100
+
2101
+ ```python
2102
+ # cluster: ecs.Cluster
2103
+ # task_definition: ecs.TaskDefinition
2104
+
2105
+
2106
+ ecs.Ec2Service(self, "Ec2Service",
2107
+ cluster=cluster,
2108
+ task_definition=task_definition,
2109
+ daemon=True
2110
+ )
2111
+
2112
+ ecs.ExternalService(self, "ExternalService",
2113
+ cluster=cluster,
2114
+ task_definition=task_definition,
2115
+ daemon=True
2116
+ )
2117
+ ```
1978
2118
  '''
1979
2119
  from pkgutil import extend_path
1980
2120
  __path__ = extend_path(__path__, __name__)
@@ -4351,6 +4491,32 @@ class AuthorizationConfig:
4351
4491
  )
4352
4492
 
4353
4493
 
4494
+ @jsii.enum(jsii_type="aws-cdk-lib.aws_ecs.AvailabilityZoneRebalancing")
4495
+ class AvailabilityZoneRebalancing(enum.Enum):
4496
+ '''Indicates whether to use Availability Zone rebalancing for an ECS service.
4497
+
4498
+ :see: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html
4499
+ :exampleMetadata: infused
4500
+
4501
+ Example::
4502
+
4503
+ # cluster: ecs.Cluster
4504
+ # task_definition: ecs.TaskDefinition
4505
+
4506
+
4507
+ service = ecs.FargateService(self, "Service",
4508
+ cluster=cluster,
4509
+ task_definition=task_definition,
4510
+ availability_zone_rebalancing=ecs.AvailabilityZoneRebalancing.ENABLED
4511
+ )
4512
+ '''
4513
+
4514
+ ENABLED = "ENABLED"
4515
+ '''Availability zone rebalancing is enabled.'''
4516
+ DISABLED = "DISABLED"
4517
+ '''Availability zone rebalancing is disabled.'''
4518
+
4519
+
4354
4520
  @jsii.enum(jsii_type="aws-cdk-lib.aws_ecs.AwsLogDriverMode")
4355
4521
  class AwsLogDriverMode(enum.Enum):
4356
4522
  '''awslogs provides two modes for delivering messages from the container to the log driver.
@@ -4830,12 +4996,16 @@ class BaseServiceOptions:
4830
4996
  # The values are placeholders you should change.
4831
4997
  import aws_cdk as cdk
4832
4998
  from aws_cdk import aws_ecs as ecs
4999
+ from aws_cdk import aws_iam as iam
5000
+ from aws_cdk import aws_kms as kms
4833
5001
  from aws_cdk import aws_servicediscovery as servicediscovery
4834
5002
 
4835
5003
  # cluster: ecs.Cluster
4836
5004
  # container_definition: ecs.ContainerDefinition
5005
+ # key: kms.Key
4837
5006
  # log_driver: ecs.LogDriver
4838
5007
  # namespace: servicediscovery.INamespace
5008
+ # role: iam.Role
4839
5009
  # service_managed_volume: ecs.ServiceManagedVolume
4840
5010
  # task_definition_revision: ecs.TaskDefinitionRevision
4841
5011
 
@@ -4891,7 +5061,12 @@ class BaseServiceOptions:
4891
5061
  idle_timeout=cdk.Duration.minutes(30),
4892
5062
  ingress_port_override=123,
4893
5063
  per_request_timeout=cdk.Duration.minutes(30),
4894
- port=123
5064
+ port=123,
5065
+ tls=ecs.ServiceConnectTlsConfiguration(
5066
+ aws_pca_authority_arn="awsPcaAuthorityArn",
5067
+ kms_key=key,
5068
+ role=role
5069
+ )
4895
5070
  )]
4896
5071
  ),
4897
5072
  service_name="serviceName",
@@ -5227,12 +5402,16 @@ class BaseServiceProps(BaseServiceOptions):
5227
5402
  # The values are placeholders you should change.
5228
5403
  import aws_cdk as cdk
5229
5404
  from aws_cdk import aws_ecs as ecs
5405
+ from aws_cdk import aws_iam as iam
5406
+ from aws_cdk import aws_kms as kms
5230
5407
  from aws_cdk import aws_servicediscovery as servicediscovery
5231
5408
 
5232
5409
  # cluster: ecs.Cluster
5233
5410
  # container_definition: ecs.ContainerDefinition
5411
+ # key: kms.Key
5234
5412
  # log_driver: ecs.LogDriver
5235
5413
  # namespace: servicediscovery.INamespace
5414
+ # role: iam.Role
5236
5415
  # service_managed_volume: ecs.ServiceManagedVolume
5237
5416
  # task_definition_revision: ecs.TaskDefinitionRevision
5238
5417
 
@@ -5289,7 +5468,12 @@ class BaseServiceProps(BaseServiceOptions):
5289
5468
  idle_timeout=cdk.Duration.minutes(30),
5290
5469
  ingress_port_override=123,
5291
5470
  per_request_timeout=cdk.Duration.minutes(30),
5292
- port=123
5471
+ port=123,
5472
+ tls=ecs.ServiceConnectTlsConfiguration(
5473
+ aws_pca_authority_arn="awsPcaAuthorityArn",
5474
+ kms_key=key,
5475
+ role=role
5476
+ )
5293
5477
  )]
5294
5478
  ),
5295
5479
  service_name="serviceName",
@@ -8232,7 +8416,7 @@ class CfnService(
8232
8416
 
8233
8417
  .. epigraph::
8234
8418
 
8235
- The stack update fails if you change any properties that require replacement and at least one Amazon ECS Service Connect ``ServiceConnectConfiguration`` property the is configured. This is because AWS CloudFormation creates the replacement service first, but each ``ServiceConnectService`` must have a name that is unique in the namespace. > Starting April 15, 2023, AWS ; will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS , or Amazon EC2 . However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service.
8419
+ The stack update fails if you change any properties that require replacement and at least one Amazon ECS Service Connect ``ServiceConnectConfiguration`` property is configured. This is because AWS CloudFormation creates the replacement service first, but each ``ServiceConnectService`` must have a name that is unique in the namespace. > Starting April 15, 2023, AWS ; will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS , or Amazon EC2 . However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service.
8236
8420
 
8237
8421
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html
8238
8422
  :cloudformationResource: AWS::ECS::Service
@@ -8381,6 +8565,7 @@ class CfnService(
8381
8565
  )]
8382
8566
  )],
8383
8567
  throughput=123,
8568
+ volume_initialization_rate=123,
8384
8569
  volume_type="volumeType"
8385
8570
  )
8386
8571
  )],
@@ -8427,7 +8612,7 @@ class CfnService(
8427
8612
  :param scope: Scope in which this resource is defined.
8428
8613
  :param id: Construct identifier for this resource (unique in its scope).
8429
8614
  :param availability_zone_rebalancing: Indicates whether to use Availability Zone rebalancing for the service. For more information, see `Balancing an Amazon ECS service across Availability Zones <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html>`_ in the *Amazon Elastic Container Service Developer Guide* . Default: - "DISABLED"
8430
- :param capacity_provider_strategy: The capacity provider strategy to use for the service. If a ``capacityProviderStrategy`` is specified, the ``launchType`` parameter must be omitted. If no ``capacityProviderStrategy`` or ``launchType`` is specified, the ``defaultCapacityProviderStrategy`` for the cluster is used. A capacity provider strategy can contain a maximum of 20 capacity providers.
8615
+ :param capacity_provider_strategy: The capacity provider strategy to use for the service. If a ``capacityProviderStrategy`` is specified, the ``launchType`` parameter must be omitted. If no ``capacityProviderStrategy`` or ``launchType`` is specified, the ``defaultCapacityProviderStrategy`` for the cluster is used. A capacity provider strategy may contain a maximum of 6 capacity providers. .. epigraph:: To remove this property from your service resource, specify an empty ``CapacityProviderStrategyItem`` array.
8431
8616
  :param cluster: The short name or full Amazon Resource Name (ARN) of the cluster that you run your service on. If you do not specify a cluster, the default cluster is assumed.
8432
8617
  :param deployment_configuration: Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
8433
8618
  :param deployment_controller: The deployment controller to use for the service. If no deployment controller is specified, the default value of ``ECS`` is used.
@@ -8436,20 +8621,20 @@ class CfnService(
8436
8621
  :param enable_execute_command: Determines whether the execute command functionality is turned on for the service. If ``true`` , the execute command functionality is turned on for all containers in tasks as part of the service.
8437
8622
  :param health_check_grace_period_seconds: The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing, VPC Lattice, and container health checks after a task has first started. If you don't specify a health check grace period value, the default value of ``0`` is used. If you don't use any of the health checks, then ``healthCheckGracePeriodSeconds`` is unused. If your service's tasks take a while to start and respond to health checks, you can specify a health check grace period of up to 2,147,483,647 seconds (about 69 years). During that time, the Amazon ECS service scheduler ignores health check status. This grace period can prevent the service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.
8438
8623
  :param launch_type: The launch type on which to run your service. For more information, see `Amazon ECS Launch Types <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
8439
- :param load_balancers: A list of load balancer objects to associate with the service. If you specify the ``Role`` property, ``LoadBalancers`` must be specified as well. For information about the number of load balancers that you can specify per service, see `Service Load Balancing <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
8624
+ :param load_balancers: A list of load balancer objects to associate with the service. If you specify the ``Role`` property, ``LoadBalancers`` must be specified as well. For information about the number of load balancers that you can specify per service, see `Service Load Balancing <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html>`_ in the *Amazon Elastic Container Service Developer Guide* . .. epigraph:: To remove this property from your service resource, specify an empty ``LoadBalancer`` array.
8440
8625
  :param network_configuration: The network configuration for the service. This parameter is required for task definitions that use the ``awsvpc`` network mode to receive their own elastic network interface, and it is not supported for other network modes. For more information, see `Task Networking <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
8441
- :param placement_constraints: An array of placement constraint objects to use for tasks in your service. You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.
8442
- :param placement_strategies: The placement strategy objects to use for tasks in your service. You can specify a maximum of 5 strategy rules for each service.
8626
+ :param placement_constraints: An array of placement constraint objects to use for tasks in your service. You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime. .. epigraph:: To remove this property from your service resource, specify an empty ``PlacementConstraint`` array.
8627
+ :param placement_strategies: The placement strategy objects to use for tasks in your service. You can specify a maximum of 5 strategy rules for each service. .. epigraph:: To remove this property from your service resource, specify an empty ``PlacementStrategy`` array.
8443
8628
  :param platform_version: The platform version that your tasks in the service are running on. A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the ``LATEST`` platform version is used. For more information, see `AWS Fargate platform versions <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html>`_ in the *Amazon Elastic Container Service Developer Guide* . Default: - "LATEST"
8444
8629
  :param propagate_tags: Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the `TagResource <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html>`_ API action. You must set this to a value other than ``NONE`` when you use Cost Explorer. For more information, see `Amazon ECS usage reports <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/usage-reports.html>`_ in the *Amazon Elastic Container Service Developer Guide* . The default is ``NONE`` .
8445
8630
  :param role: The name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is only permitted if you are using a load balancer with your service and your task definition doesn't use the ``awsvpc`` network mode. If you specify the ``role`` parameter, you must also specify a load balancer object with the ``loadBalancers`` parameter. .. epigraph:: If your account has already created the Amazon ECS service-linked role, that role is used for your service unless you specify a role here. The service-linked role is required if your task definition uses the ``awsvpc`` network mode or if the service is configured to use service discovery, an external deployment controller, multiple target groups, or Elastic Inference accelerators in which case you don't specify a role here. For more information, see `Using service-linked roles for Amazon ECS <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html>`_ in the *Amazon Elastic Container Service Developer Guide* . If your specified role has a path other than ``/`` , then you must either specify the full role ARN (this is recommended) or prefix the role name with the path. For example, if a role with the name ``bar`` has a path of ``/foo/`` then you would specify ``/foo/bar`` as the role name. For more information, see `Friendly names and paths <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names>`_ in the *IAM User Guide* .
8446
8631
  :param scheduling_strategy: The scheduling strategy to use for the service. For more information, see `Services <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html>`_ . There are two service scheduler strategies available: - ``REPLICA`` -The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. This scheduler strategy is required if the service uses the ``CODE_DEPLOY`` or ``EXTERNAL`` deployment controller types. - ``DAEMON`` -The daemon scheduling strategy deploys exactly one task on each active container instance that meets all of the task placement constraints that you specify in your cluster. The service scheduler also evaluates the task placement constraints for running tasks and will stop tasks that don't meet the placement constraints. When you're using this strategy, you don't need to specify a desired number of tasks, a task placement strategy, or use Service Auto Scaling policies. .. epigraph:: Tasks using the Fargate launch type or the ``CODE_DEPLOY`` or ``EXTERNAL`` deployment controller types don't support the ``DAEMON`` scheduling strategy.
8447
8632
  :param service_connect_configuration: The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see `Service Connect <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
8448
8633
  :param service_name: The name of your service. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a Region or across multiple Regions. .. epigraph:: The stack update fails if you change any properties that require replacement and the ``ServiceName`` is configured. This is because AWS CloudFormation creates the replacement service first, but each ``ServiceName`` must be unique in the cluster.
8449
- :param service_registries: The details of the service discovery registry to associate with this service. For more information, see `Service discovery <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html>`_ . .. epigraph:: Each service may be associated with one service registry. Multiple service registries for each service isn't supported.
8634
+ :param service_registries: The details of the service discovery registry to associate with this service. For more information, see `Service discovery <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html>`_ . .. epigraph:: Each service may be associated with one service registry. Multiple service registries for each service isn't supported. > To remove this property from your service resource, specify an empty ``ServiceRegistry`` array.
8450
8635
  :param tags: The metadata that you apply to the service to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. When a service is deleted, the tags are deleted as well. 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: + - = . _ : /
8451
8636
  :param task_definition: The ``family`` and ``revision`` ( ``family:revision`` ) or full ARN of the task definition to run in your service. If a ``revision`` isn't specified, the latest ``ACTIVE`` revision is used. A task definition must be specified if the service uses either the ``ECS`` or ``CODE_DEPLOY`` deployment controllers. For more information about deployment types, see `Amazon ECS deployment types <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html>`_ .
8452
- :param volume_configurations: The configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume.
8637
+ :param volume_configurations: The configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. .. epigraph:: To remove this property from your service resource, specify an empty ``ServiceVolumeConfiguration`` array.
8453
8638
  :param vpc_lattice_configurations: The VPC Lattice configuration for the service being created.
8454
8639
  '''
8455
8640
  if __debug__:
@@ -8969,8 +9154,8 @@ class CfnService(
8969
9154
  For example ``awsVpcConfiguration={subnets=["subnet-12344321"],securityGroups=["sg-12344321"]}`` .
8970
9155
 
8971
9156
  :param assign_public_ip: Whether the task's elastic network interface receives a public IP address. The default value is ``ENABLED`` .
8972
- :param security_groups: The IDs of the security groups associated with the task or service. If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified per ``awsvpcConfiguration`` . .. epigraph:: All specified security groups must be from the same VPC.
8973
- :param subnets: The IDs of the subnets associated with the task or service. There's a limit of 16 subnets that can be specified per ``awsvpcConfiguration`` . .. epigraph:: All specified subnets must be from the same VPC.
9157
+ :param security_groups: The IDs of the security groups associated with the task or service. If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified. .. epigraph:: All specified security groups must be from the same VPC.
9158
+ :param subnets: The IDs of the subnets associated with the task or service. There's a limit of 16 subnets that can be specified. .. epigraph:: All specified subnets must be from the same VPC.
8974
9159
 
8975
9160
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-awsvpcconfiguration.html
8976
9161
  :exampleMetadata: fixture=_generated
@@ -9015,7 +9200,7 @@ class CfnService(
9015
9200
  def security_groups(self) -> typing.Optional[typing.List[builtins.str]]:
9016
9201
  '''The IDs of the security groups associated with the task or service.
9017
9202
 
9018
- If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified per ``awsvpcConfiguration`` .
9203
+ If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified.
9019
9204
  .. epigraph::
9020
9205
 
9021
9206
  All specified security groups must be from the same VPC.
@@ -9029,7 +9214,7 @@ class CfnService(
9029
9214
  def subnets(self) -> typing.Optional[typing.List[builtins.str]]:
9030
9215
  '''The IDs of the subnets associated with the task or service.
9031
9216
 
9032
- There's a limit of 16 subnets that can be specified per ``awsvpcConfiguration`` .
9217
+ There's a limit of 16 subnets that can be specified.
9033
9218
  .. epigraph::
9034
9219
 
9035
9220
  All specified subnets must be from the same VPC.
@@ -9783,7 +9968,7 @@ class CfnService(
9783
9968
  self,
9784
9969
  *,
9785
9970
  log_driver: typing.Optional[builtins.str] = None,
9786
- options: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
9971
+ options: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
9787
9972
  secret_options: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union["CfnService.SecretProperty", typing.Dict[builtins.str, typing.Any]]]]]] = None,
9788
9973
  ) -> None:
9789
9974
  '''The log configuration for the container.
@@ -9864,7 +10049,7 @@ class CfnService(
9864
10049
  @builtins.property
9865
10050
  def options(
9866
10051
  self,
9867
- ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]]:
10052
+ ) -> typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]]:
9868
10053
  '''The configuration options to send to the log driver.
9869
10054
 
9870
10055
  The options you can specify depend on the log driver. Some of the options you can specify when you use the ``awslogs`` log driver to route logs to Amazon CloudWatch include the following:
@@ -9953,7 +10138,7 @@ class CfnService(
9953
10138
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-logconfiguration.html#cfn-ecs-service-logconfiguration-options
9954
10139
  '''
9955
10140
  result = self._values.get("options")
9956
- return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]], result)
10141
+ return typing.cast(typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]], result)
9957
10142
 
9958
10143
  @builtins.property
9959
10144
  def secret_options(
@@ -10890,6 +11075,7 @@ class CfnService(
10890
11075
  "snapshot_id": "snapshotId",
10891
11076
  "tag_specifications": "tagSpecifications",
10892
11077
  "throughput": "throughput",
11078
+ "volume_initialization_rate": "volumeInitializationRate",
10893
11079
  "volume_type": "volumeType",
10894
11080
  },
10895
11081
  )
@@ -10906,6 +11092,7 @@ class CfnService(
10906
11092
  snapshot_id: typing.Optional[builtins.str] = None,
10907
11093
  tag_specifications: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union["CfnService.EBSTagSpecificationProperty", typing.Dict[builtins.str, typing.Any]]]]]] = None,
10908
11094
  throughput: typing.Optional[jsii.Number] = None,
11095
+ volume_initialization_rate: typing.Optional[jsii.Number] = None,
10909
11096
  volume_type: typing.Optional[builtins.str] = None,
10910
11097
  ) -> None:
10911
11098
  '''The configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf.
@@ -10923,6 +11110,7 @@ class CfnService(
10923
11110
  :param snapshot_id: The snapshot that Amazon ECS uses to create the volume. You must specify either a snapshot ID or a volume size. This parameter maps 1:1 with the ``SnapshotId`` parameter of the `CreateVolume API <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html>`_ in the *Amazon EC2 API Reference* .
10924
11111
  :param tag_specifications: The tags to apply to the volume. Amazon ECS applies service-managed tags by default. This parameter maps 1:1 with the ``TagSpecifications.N`` parameter of the `CreateVolume API <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html>`_ in the *Amazon EC2 API Reference* .
10925
11112
  :param throughput: The throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s. This parameter maps 1:1 with the ``Throughput`` parameter of the `CreateVolume API <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html>`_ in the *Amazon EC2 API Reference* . .. epigraph:: This parameter is only supported for the ``gp3`` volume type.
11113
+ :param volume_initialization_rate:
10926
11114
  :param volume_type: The volume type. This parameter maps 1:1 with the ``VolumeType`` parameter of the `CreateVolume API <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html>`_ in the *Amazon EC2 API Reference* . For more information, see `Amazon EBS volume types <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html>`_ in the *Amazon EC2 User Guide* . The following are the supported volume types. - General Purpose SSD: ``gp2`` | ``gp3`` - Provisioned IOPS SSD: ``io1`` | ``io2`` - Throughput Optimized HDD: ``st1`` - Cold HDD: ``sc1`` - Magnetic: ``standard`` .. epigraph:: The magnetic volume type is not supported on Fargate.
10927
11115
 
10928
11116
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-servicemanagedebsvolumeconfiguration.html
@@ -10955,6 +11143,7 @@ class CfnService(
10955
11143
  )]
10956
11144
  )],
10957
11145
  throughput=123,
11146
+ volume_initialization_rate=123,
10958
11147
  volume_type="volumeType"
10959
11148
  )
10960
11149
  '''
@@ -10969,6 +11158,7 @@ class CfnService(
10969
11158
  check_type(argname="argument snapshot_id", value=snapshot_id, expected_type=type_hints["snapshot_id"])
10970
11159
  check_type(argname="argument tag_specifications", value=tag_specifications, expected_type=type_hints["tag_specifications"])
10971
11160
  check_type(argname="argument throughput", value=throughput, expected_type=type_hints["throughput"])
11161
+ check_type(argname="argument volume_initialization_rate", value=volume_initialization_rate, expected_type=type_hints["volume_initialization_rate"])
10972
11162
  check_type(argname="argument volume_type", value=volume_type, expected_type=type_hints["volume_type"])
10973
11163
  self._values: typing.Dict[builtins.str, typing.Any] = {
10974
11164
  "role_arn": role_arn,
@@ -10989,6 +11179,8 @@ class CfnService(
10989
11179
  self._values["tag_specifications"] = tag_specifications
10990
11180
  if throughput is not None:
10991
11181
  self._values["throughput"] = throughput
11182
+ if volume_initialization_rate is not None:
11183
+ self._values["volume_initialization_rate"] = volume_initialization_rate
10992
11184
  if volume_type is not None:
10993
11185
  self._values["volume_type"] = volume_type
10994
11186
 
@@ -11123,6 +11315,14 @@ class CfnService(
11123
11315
  result = self._values.get("throughput")
11124
11316
  return typing.cast(typing.Optional[jsii.Number], result)
11125
11317
 
11318
+ @builtins.property
11319
+ def volume_initialization_rate(self) -> typing.Optional[jsii.Number]:
11320
+ '''
11321
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-servicemanagedebsvolumeconfiguration.html#cfn-ecs-service-servicemanagedebsvolumeconfiguration-volumeinitializationrate
11322
+ '''
11323
+ result = self._values.get("volume_initialization_rate")
11324
+ return typing.cast(typing.Optional[jsii.Number], result)
11325
+
11126
11326
  @builtins.property
11127
11327
  def volume_type(self) -> typing.Optional[builtins.str]:
11128
11328
  '''The volume type.
@@ -11327,6 +11527,7 @@ class CfnService(
11327
11527
  )]
11328
11528
  )],
11329
11529
  throughput=123,
11530
+ volume_initialization_rate=123,
11330
11531
  volume_type="volumeType"
11331
11532
  )
11332
11533
  )
@@ -11621,7 +11822,7 @@ class CfnServiceProps:
11621
11822
  '''Properties for defining a ``CfnService``.
11622
11823
 
11623
11824
  :param availability_zone_rebalancing: Indicates whether to use Availability Zone rebalancing for the service. For more information, see `Balancing an Amazon ECS service across Availability Zones <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html>`_ in the *Amazon Elastic Container Service Developer Guide* . Default: - "DISABLED"
11624
- :param capacity_provider_strategy: The capacity provider strategy to use for the service. If a ``capacityProviderStrategy`` is specified, the ``launchType`` parameter must be omitted. If no ``capacityProviderStrategy`` or ``launchType`` is specified, the ``defaultCapacityProviderStrategy`` for the cluster is used. A capacity provider strategy can contain a maximum of 20 capacity providers.
11825
+ :param capacity_provider_strategy: The capacity provider strategy to use for the service. If a ``capacityProviderStrategy`` is specified, the ``launchType`` parameter must be omitted. If no ``capacityProviderStrategy`` or ``launchType`` is specified, the ``defaultCapacityProviderStrategy`` for the cluster is used. A capacity provider strategy may contain a maximum of 6 capacity providers. .. epigraph:: To remove this property from your service resource, specify an empty ``CapacityProviderStrategyItem`` array.
11625
11826
  :param cluster: The short name or full Amazon Resource Name (ARN) of the cluster that you run your service on. If you do not specify a cluster, the default cluster is assumed.
11626
11827
  :param deployment_configuration: Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
11627
11828
  :param deployment_controller: The deployment controller to use for the service. If no deployment controller is specified, the default value of ``ECS`` is used.
@@ -11630,20 +11831,20 @@ class CfnServiceProps:
11630
11831
  :param enable_execute_command: Determines whether the execute command functionality is turned on for the service. If ``true`` , the execute command functionality is turned on for all containers in tasks as part of the service.
11631
11832
  :param health_check_grace_period_seconds: The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing, VPC Lattice, and container health checks after a task has first started. If you don't specify a health check grace period value, the default value of ``0`` is used. If you don't use any of the health checks, then ``healthCheckGracePeriodSeconds`` is unused. If your service's tasks take a while to start and respond to health checks, you can specify a health check grace period of up to 2,147,483,647 seconds (about 69 years). During that time, the Amazon ECS service scheduler ignores health check status. This grace period can prevent the service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.
11632
11833
  :param launch_type: The launch type on which to run your service. For more information, see `Amazon ECS Launch Types <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
11633
- :param load_balancers: A list of load balancer objects to associate with the service. If you specify the ``Role`` property, ``LoadBalancers`` must be specified as well. For information about the number of load balancers that you can specify per service, see `Service Load Balancing <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
11834
+ :param load_balancers: A list of load balancer objects to associate with the service. If you specify the ``Role`` property, ``LoadBalancers`` must be specified as well. For information about the number of load balancers that you can specify per service, see `Service Load Balancing <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html>`_ in the *Amazon Elastic Container Service Developer Guide* . .. epigraph:: To remove this property from your service resource, specify an empty ``LoadBalancer`` array.
11634
11835
  :param network_configuration: The network configuration for the service. This parameter is required for task definitions that use the ``awsvpc`` network mode to receive their own elastic network interface, and it is not supported for other network modes. For more information, see `Task Networking <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
11635
- :param placement_constraints: An array of placement constraint objects to use for tasks in your service. You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.
11636
- :param placement_strategies: The placement strategy objects to use for tasks in your service. You can specify a maximum of 5 strategy rules for each service.
11836
+ :param placement_constraints: An array of placement constraint objects to use for tasks in your service. You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime. .. epigraph:: To remove this property from your service resource, specify an empty ``PlacementConstraint`` array.
11837
+ :param placement_strategies: The placement strategy objects to use for tasks in your service. You can specify a maximum of 5 strategy rules for each service. .. epigraph:: To remove this property from your service resource, specify an empty ``PlacementStrategy`` array.
11637
11838
  :param platform_version: The platform version that your tasks in the service are running on. A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the ``LATEST`` platform version is used. For more information, see `AWS Fargate platform versions <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html>`_ in the *Amazon Elastic Container Service Developer Guide* . Default: - "LATEST"
11638
11839
  :param propagate_tags: Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the `TagResource <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html>`_ API action. You must set this to a value other than ``NONE`` when you use Cost Explorer. For more information, see `Amazon ECS usage reports <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/usage-reports.html>`_ in the *Amazon Elastic Container Service Developer Guide* . The default is ``NONE`` .
11639
11840
  :param role: The name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is only permitted if you are using a load balancer with your service and your task definition doesn't use the ``awsvpc`` network mode. If you specify the ``role`` parameter, you must also specify a load balancer object with the ``loadBalancers`` parameter. .. epigraph:: If your account has already created the Amazon ECS service-linked role, that role is used for your service unless you specify a role here. The service-linked role is required if your task definition uses the ``awsvpc`` network mode or if the service is configured to use service discovery, an external deployment controller, multiple target groups, or Elastic Inference accelerators in which case you don't specify a role here. For more information, see `Using service-linked roles for Amazon ECS <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html>`_ in the *Amazon Elastic Container Service Developer Guide* . If your specified role has a path other than ``/`` , then you must either specify the full role ARN (this is recommended) or prefix the role name with the path. For example, if a role with the name ``bar`` has a path of ``/foo/`` then you would specify ``/foo/bar`` as the role name. For more information, see `Friendly names and paths <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names>`_ in the *IAM User Guide* .
11640
11841
  :param scheduling_strategy: The scheduling strategy to use for the service. For more information, see `Services <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html>`_ . There are two service scheduler strategies available: - ``REPLICA`` -The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. This scheduler strategy is required if the service uses the ``CODE_DEPLOY`` or ``EXTERNAL`` deployment controller types. - ``DAEMON`` -The daemon scheduling strategy deploys exactly one task on each active container instance that meets all of the task placement constraints that you specify in your cluster. The service scheduler also evaluates the task placement constraints for running tasks and will stop tasks that don't meet the placement constraints. When you're using this strategy, you don't need to specify a desired number of tasks, a task placement strategy, or use Service Auto Scaling policies. .. epigraph:: Tasks using the Fargate launch type or the ``CODE_DEPLOY`` or ``EXTERNAL`` deployment controller types don't support the ``DAEMON`` scheduling strategy.
11641
11842
  :param service_connect_configuration: The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see `Service Connect <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
11642
11843
  :param service_name: The name of your service. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a Region or across multiple Regions. .. epigraph:: The stack update fails if you change any properties that require replacement and the ``ServiceName`` is configured. This is because AWS CloudFormation creates the replacement service first, but each ``ServiceName`` must be unique in the cluster.
11643
- :param service_registries: The details of the service discovery registry to associate with this service. For more information, see `Service discovery <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html>`_ . .. epigraph:: Each service may be associated with one service registry. Multiple service registries for each service isn't supported.
11844
+ :param service_registries: The details of the service discovery registry to associate with this service. For more information, see `Service discovery <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html>`_ . .. epigraph:: Each service may be associated with one service registry. Multiple service registries for each service isn't supported. > To remove this property from your service resource, specify an empty ``ServiceRegistry`` array.
11644
11845
  :param tags: The metadata that you apply to the service to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. When a service is deleted, the tags are deleted as well. 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: + - = . _ : /
11645
11846
  :param task_definition: The ``family`` and ``revision`` ( ``family:revision`` ) or full ARN of the task definition to run in your service. If a ``revision`` isn't specified, the latest ``ACTIVE`` revision is used. A task definition must be specified if the service uses either the ``ECS`` or ``CODE_DEPLOY`` deployment controllers. For more information about deployment types, see `Amazon ECS deployment types <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html>`_ .
11646
- :param volume_configurations: The configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume.
11847
+ :param volume_configurations: The configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. .. epigraph:: To remove this property from your service resource, specify an empty ``ServiceVolumeConfiguration`` array.
11647
11848
  :param vpc_lattice_configurations: The VPC Lattice configuration for the service being created.
11648
11849
 
11649
11850
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html
@@ -11792,6 +11993,7 @@ class CfnServiceProps:
11792
11993
  )]
11793
11994
  )],
11794
11995
  throughput=123,
11996
+ volume_initialization_rate=123,
11795
11997
  volume_type="volumeType"
11796
11998
  )
11797
11999
  )],
@@ -11902,7 +12104,10 @@ class CfnServiceProps:
11902
12104
 
11903
12105
  If a ``capacityProviderStrategy`` is specified, the ``launchType`` parameter must be omitted. If no ``capacityProviderStrategy`` or ``launchType`` is specified, the ``defaultCapacityProviderStrategy`` for the cluster is used.
11904
12106
 
11905
- A capacity provider strategy can contain a maximum of 20 capacity providers.
12107
+ A capacity provider strategy may contain a maximum of 6 capacity providers.
12108
+ .. epigraph::
12109
+
12110
+ To remove this property from your service resource, specify an empty ``CapacityProviderStrategyItem`` array.
11906
12111
 
11907
12112
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-capacityproviderstrategy
11908
12113
  '''
@@ -12016,6 +12221,9 @@ class CfnServiceProps:
12016
12221
  '''A list of load balancer objects to associate with the service.
12017
12222
 
12018
12223
  If you specify the ``Role`` property, ``LoadBalancers`` must be specified as well. For information about the number of load balancers that you can specify per service, see `Service Load Balancing <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
12224
+ .. epigraph::
12225
+
12226
+ To remove this property from your service resource, specify an empty ``LoadBalancer`` array.
12019
12227
 
12020
12228
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-loadbalancers
12021
12229
  '''
@@ -12042,6 +12250,9 @@ class CfnServiceProps:
12042
12250
  '''An array of placement constraint objects to use for tasks in your service.
12043
12251
 
12044
12252
  You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.
12253
+ .. epigraph::
12254
+
12255
+ To remove this property from your service resource, specify an empty ``PlacementConstraint`` array.
12045
12256
 
12046
12257
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-placementconstraints
12047
12258
  '''
@@ -12055,6 +12266,9 @@ class CfnServiceProps:
12055
12266
  '''The placement strategy objects to use for tasks in your service.
12056
12267
 
12057
12268
  You can specify a maximum of 5 strategy rules for each service.
12269
+ .. epigraph::
12270
+
12271
+ To remove this property from your service resource, specify an empty ``PlacementStrategy`` array.
12058
12272
 
12059
12273
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-placementstrategies
12060
12274
  '''
@@ -12158,7 +12372,7 @@ class CfnServiceProps:
12158
12372
 
12159
12373
  .. epigraph::
12160
12374
 
12161
- Each service may be associated with one service registry. Multiple service registries for each service isn't supported.
12375
+ Each service may be associated with one service registry. Multiple service registries for each service isn't supported. > To remove this property from your service resource, specify an empty ``ServiceRegistry`` array.
12162
12376
 
12163
12377
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-serviceregistries
12164
12378
  '''
@@ -12212,6 +12426,9 @@ class CfnServiceProps:
12212
12426
  '''The configuration for a volume specified in the task definition as a volume that is configured at launch time.
12213
12427
 
12214
12428
  Currently, the only supported volume type is an Amazon EBS volume.
12429
+ .. epigraph::
12430
+
12431
+ To remove this property from your service resource, specify an empty ``ServiceVolumeConfiguration`` array.
12215
12432
 
12216
12433
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-volumeconfigurations
12217
12434
  '''
@@ -13021,7 +13238,7 @@ class CfnTaskDefinition(
13021
13238
  disable_networking: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
13022
13239
  dns_search_domains: typing.Optional[typing.Sequence[builtins.str]] = None,
13023
13240
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
13024
- docker_labels: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
13241
+ docker_labels: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
13025
13242
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
13026
13243
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
13027
13244
  environment: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union["CfnTaskDefinition.KeyValuePairProperty", typing.Dict[builtins.str, typing.Any]]]]]] = None,
@@ -13540,7 +13757,7 @@ class CfnTaskDefinition(
13540
13757
  @builtins.property
13541
13758
  def docker_labels(
13542
13759
  self,
13543
- ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]]:
13760
+ ) -> typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]]:
13544
13761
  '''A key/value map of labels to add to the container.
13545
13762
 
13546
13763
  This parameter maps to ``Labels`` in the docker container create command and the ``--label`` option to docker run. This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: ``sudo docker version --format '{{.Server.APIVersion}}'``
@@ -13548,7 +13765,7 @@ class CfnTaskDefinition(
13548
13765
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinition.html#cfn-ecs-taskdefinition-containerdefinition-dockerlabels
13549
13766
  '''
13550
13767
  result = self._values.get("docker_labels")
13551
- return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]], result)
13768
+ return typing.cast(typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]], result)
13552
13769
 
13553
13770
  @builtins.property
13554
13771
  def docker_security_options(self) -> typing.Optional[typing.List[builtins.str]]:
@@ -14261,8 +14478,8 @@ class CfnTaskDefinition(
14261
14478
  *,
14262
14479
  autoprovision: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
14263
14480
  driver: typing.Optional[builtins.str] = None,
14264
- driver_opts: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
14265
- labels: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
14481
+ driver_opts: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
14482
+ labels: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
14266
14483
  scope: typing.Optional[builtins.str] = None,
14267
14484
  ) -> None:
14268
14485
  '''The ``DockerVolumeConfiguration`` property specifies a Docker volume configuration and is used when you use Docker volumes.
@@ -14344,7 +14561,7 @@ class CfnTaskDefinition(
14344
14561
  @builtins.property
14345
14562
  def driver_opts(
14346
14563
  self,
14347
- ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]]:
14564
+ ) -> typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]]:
14348
14565
  '''A map of Docker driver-specific options passed through.
14349
14566
 
14350
14567
  This parameter maps to ``DriverOpts`` in the docker create-volume command and the ``xxopt`` option to docker volume create.
@@ -14352,12 +14569,12 @@ class CfnTaskDefinition(
14352
14569
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-dockervolumeconfiguration.html#cfn-ecs-taskdefinition-dockervolumeconfiguration-driveropts
14353
14570
  '''
14354
14571
  result = self._values.get("driver_opts")
14355
- return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]], result)
14572
+ return typing.cast(typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]], result)
14356
14573
 
14357
14574
  @builtins.property
14358
14575
  def labels(
14359
14576
  self,
14360
- ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]]:
14577
+ ) -> typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]]:
14361
14578
  '''Custom metadata to add to your Docker volume.
14362
14579
 
14363
14580
  This parameter maps to ``Labels`` in the docker container create command and the ``xxlabel`` option to docker volume create.
@@ -14365,7 +14582,7 @@ class CfnTaskDefinition(
14365
14582
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-dockervolumeconfiguration.html#cfn-ecs-taskdefinition-dockervolumeconfiguration-labels
14366
14583
  '''
14367
14584
  result = self._values.get("labels")
14368
- return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]], result)
14585
+ return typing.cast(typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]], result)
14369
14586
 
14370
14587
  @builtins.property
14371
14588
  def scope(self) -> typing.Optional[builtins.str]:
@@ -14867,7 +15084,7 @@ class CfnTaskDefinition(
14867
15084
  def __init__(
14868
15085
  self,
14869
15086
  *,
14870
- options: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
15087
+ options: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
14871
15088
  type: typing.Optional[builtins.str] = None,
14872
15089
  ) -> None:
14873
15090
  '''The FireLens configuration for the container.
@@ -14906,7 +15123,7 @@ class CfnTaskDefinition(
14906
15123
  @builtins.property
14907
15124
  def options(
14908
15125
  self,
14909
- ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]]:
15126
+ ) -> typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]]:
14910
15127
  '''The options to use when configuring the log router.
14911
15128
 
14912
15129
  This field is optional and can be used to add additional metadata, such as the task, task definition, cluster, and container instance details to the log event.
@@ -14920,7 +15137,7 @@ class CfnTaskDefinition(
14920
15137
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-firelensconfiguration.html#cfn-ecs-taskdefinition-firelensconfiguration-options
14921
15138
  '''
14922
15139
  result = self._values.get("options")
14923
- return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]], result)
15140
+ return typing.cast(typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]], result)
14924
15141
 
14925
15142
  @builtins.property
14926
15143
  def type(self) -> typing.Optional[builtins.str]:
@@ -15320,6 +15537,14 @@ class CfnTaskDefinition(
15320
15537
 
15321
15538
  For more detailed information about these Linux capabilities, see the `capabilities(7) <https://docs.aws.amazon.com/http://man7.org/linux/man-pages/man7/capabilities.7.html>`_ Linux manual page.
15322
15539
 
15540
+ The following describes how Docker processes the Linux capabilities specified in the ``add`` and ``drop`` request parameters. For information about the latest behavior, see `Docker Compose: order of cap_drop and cap_add <https://docs.aws.amazon.com/https://forums.docker.com/t/docker-compose-order-of-cap-drop-and-cap-add/97136/1>`_ in the Docker Community Forum.
15541
+
15542
+ - When the container is a privleged container, the container capabilities are all of the default Docker capabilities. The capabilities specified in the ``add`` request parameter, and the ``drop`` request parameter are ignored.
15543
+ - When the ``add`` request parameter is set to ALL, the container capabilities are all of the default Docker capabilities, excluding those specified in the ``drop`` request parameter.
15544
+ - When the ``drop`` request parameter is set to ALL, the container capabilities are the capabilities specified in the ``add`` request parameter.
15545
+ - When the ``add`` request parameter and the ``drop`` request parameter are both empty, the capabilities the container capabilities are all of the default Docker capabilities.
15546
+ - The default is to first drop the capabilities specified in the ``drop`` request parameter, and then add the capabilities specified in the ``add`` request parameter.
15547
+
15323
15548
  :param add: The Linux capabilities for the container that have been added to the default configuration provided by Docker. This parameter maps to ``CapAdd`` in the docker container create command and the ``--cap-add`` option to docker run. .. epigraph:: Tasks launched on AWS Fargate only support adding the ``SYS_PTRACE`` kernel capability. Valid values: ``"ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | "WAKE_ALARM"``
15324
15549
  :param drop: The Linux capabilities for the container that have been removed from the default configuration provided by Docker. This parameter maps to ``CapDrop`` in the docker container create command and the ``--cap-drop`` option to docker run. Valid values: ``"ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | "WAKE_ALARM"``
15325
15550
 
@@ -15686,7 +15911,7 @@ class CfnTaskDefinition(
15686
15911
  self,
15687
15912
  *,
15688
15913
  log_driver: builtins.str,
15689
- options: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
15914
+ options: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
15690
15915
  secret_options: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union["CfnTaskDefinition.SecretProperty", typing.Dict[builtins.str, typing.Any]]]]]] = None,
15691
15916
  ) -> None:
15692
15917
  '''The ``LogConfiguration`` property specifies log configuration options to send to a custom log driver for the container.
@@ -15754,7 +15979,7 @@ class CfnTaskDefinition(
15754
15979
  @builtins.property
15755
15980
  def options(
15756
15981
  self,
15757
- ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]]:
15982
+ ) -> typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]]:
15758
15983
  '''The configuration options to send to the log driver.
15759
15984
 
15760
15985
  The options you can specify depend on the log driver. Some of the options you can specify when you use the ``awslogs`` log driver to route logs to Amazon CloudWatch include the following:
@@ -15843,7 +16068,7 @@ class CfnTaskDefinition(
15843
16068
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-logconfiguration.html#cfn-ecs-taskdefinition-logconfiguration-options
15844
16069
  '''
15845
16070
  result = self._values.get("options")
15846
- return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]], result)
16071
+ return typing.cast(typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]], result)
15847
16072
 
15848
16073
  @builtins.property
15849
16074
  def secret_options(
@@ -16412,7 +16637,7 @@ class CfnTaskDefinition(
16412
16637
  self,
16413
16638
  *,
16414
16639
  enabled: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
16415
- ignored_exit_codes: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[jsii.Number]]] = None,
16640
+ ignored_exit_codes: typing.Optional[typing.Union[typing.Sequence[jsii.Number], _IResolvable_da3f097b]] = None,
16416
16641
  restart_attempt_period: typing.Optional[jsii.Number] = None,
16417
16642
  ) -> None:
16418
16643
  '''You can enable a restart policy for each container defined in your task definition, to overcome transient failures faster and maintain task availability.
@@ -16465,7 +16690,7 @@ class CfnTaskDefinition(
16465
16690
  @builtins.property
16466
16691
  def ignored_exit_codes(
16467
16692
  self,
16468
- ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[jsii.Number]]]:
16693
+ ) -> typing.Optional[typing.Union[typing.List[jsii.Number], _IResolvable_da3f097b]]:
16469
16694
  '''A list of exit codes that Amazon ECS will ignore and not attempt a restart on.
16470
16695
 
16471
16696
  You can specify a maximum of 50 container exit codes. By default, Amazon ECS does not ignore any exit codes.
@@ -16473,7 +16698,7 @@ class CfnTaskDefinition(
16473
16698
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-restartpolicy.html#cfn-ecs-taskdefinition-restartpolicy-ignoredexitcodes
16474
16699
  '''
16475
16700
  result = self._values.get("ignored_exit_codes")
16476
- return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[jsii.Number]]], result)
16701
+ return typing.cast(typing.Optional[typing.Union[typing.List[jsii.Number], _IResolvable_da3f097b]], result)
16477
16702
 
16478
16703
  @builtins.property
16479
16704
  def restart_attempt_period(self) -> typing.Optional[jsii.Number]:
@@ -18343,9 +18568,9 @@ class CfnTaskSet(
18343
18568
 
18344
18569
  For example ``awsVpcConfiguration={subnets=["subnet-12344321"],securityGroups=["sg-12344321"]}`` .
18345
18570
 
18346
- :param subnets: The IDs of the subnets associated with the task or service. There's a limit of 16 subnets that can be specified per ``awsvpcConfiguration`` . .. epigraph:: All specified subnets must be from the same VPC.
18571
+ :param subnets: The IDs of the subnets associated with the task or service. There's a limit of 16 subnets that can be specified. .. epigraph:: All specified subnets must be from the same VPC.
18347
18572
  :param assign_public_ip: Whether the task's elastic network interface receives a public IP address. The default value is ``ENABLED`` .
18348
- :param security_groups: The IDs of the security groups associated with the task or service. If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified per ``awsvpcConfiguration`` . .. epigraph:: All specified security groups must be from the same VPC.
18573
+ :param security_groups: The IDs of the security groups associated with the task or service. If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified. .. epigraph:: All specified security groups must be from the same VPC.
18349
18574
 
18350
18575
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskset-awsvpcconfiguration.html
18351
18576
  :exampleMetadata: fixture=_generated
@@ -18381,7 +18606,7 @@ class CfnTaskSet(
18381
18606
  def subnets(self) -> typing.List[builtins.str]:
18382
18607
  '''The IDs of the subnets associated with the task or service.
18383
18608
 
18384
- There's a limit of 16 subnets that can be specified per ``awsvpcConfiguration`` .
18609
+ There's a limit of 16 subnets that can be specified.
18385
18610
  .. epigraph::
18386
18611
 
18387
18612
  All specified subnets must be from the same VPC.
@@ -18407,7 +18632,7 @@ class CfnTaskSet(
18407
18632
  def security_groups(self) -> typing.Optional[typing.List[builtins.str]]:
18408
18633
  '''The IDs of the security groups associated with the task or service.
18409
18634
 
18410
- If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified per ``awsvpcConfiguration`` .
18635
+ If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified.
18411
18636
  .. epigraph::
18412
18637
 
18413
18638
  All specified security groups must be from the same VPC.
@@ -20319,6 +20544,7 @@ class ContainerDefinition(
20319
20544
  system_controls: typing.Optional[typing.Sequence[typing.Union["SystemControl", typing.Dict[builtins.str, typing.Any]]]] = None,
20320
20545
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
20321
20546
  user: typing.Optional[builtins.str] = None,
20547
+ version_consistency: typing.Optional["VersionConsistency"] = None,
20322
20548
  working_directory: typing.Optional[builtins.str] = None,
20323
20549
  ) -> None:
20324
20550
  '''Constructs a new instance of the ContainerDefinition class.
@@ -20363,6 +20589,7 @@ class ContainerDefinition(
20363
20589
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
20364
20590
  :param ulimits: An array of ulimits to set in the container.
20365
20591
  :param user: The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run. Default: root
20592
+ :param version_consistency: Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest. If you set the value for a container as disabled, Amazon ECS will not resolve the provided container image tag to a digest and will use the original image URI specified in the container definition for deployment. Default: VersionConsistency.DISABLED if ``image`` is a CDK asset, VersionConsistency.ENABLED otherwise
20366
20593
  :param working_directory: The working directory in which to run commands inside the container. Default: /
20367
20594
  '''
20368
20595
  if __debug__:
@@ -20408,6 +20635,7 @@ class ContainerDefinition(
20408
20635
  system_controls=system_controls,
20409
20636
  ulimits=ulimits,
20410
20637
  user=user,
20638
+ version_consistency=version_consistency,
20411
20639
  working_directory=working_directory,
20412
20640
  )
20413
20641
 
@@ -20805,6 +21033,7 @@ class ContainerDefinition(
20805
21033
  "system_controls": "systemControls",
20806
21034
  "ulimits": "ulimits",
20807
21035
  "user": "user",
21036
+ "version_consistency": "versionConsistency",
20808
21037
  "working_directory": "workingDirectory",
20809
21038
  },
20810
21039
  )
@@ -20849,6 +21078,7 @@ class ContainerDefinitionOptions:
20849
21078
  system_controls: typing.Optional[typing.Sequence[typing.Union["SystemControl", typing.Dict[builtins.str, typing.Any]]]] = None,
20850
21079
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
20851
21080
  user: typing.Optional[builtins.str] = None,
21081
+ version_consistency: typing.Optional["VersionConsistency"] = None,
20852
21082
  working_directory: typing.Optional[builtins.str] = None,
20853
21083
  ) -> None:
20854
21084
  '''
@@ -20889,6 +21119,7 @@ class ContainerDefinitionOptions:
20889
21119
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
20890
21120
  :param ulimits: An array of ulimits to set in the container.
20891
21121
  :param user: The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run. Default: root
21122
+ :param version_consistency: Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest. If you set the value for a container as disabled, Amazon ECS will not resolve the provided container image tag to a digest and will use the original image URI specified in the container definition for deployment. Default: VersionConsistency.DISABLED if ``image`` is a CDK asset, VersionConsistency.ENABLED otherwise
20892
21123
  :param working_directory: The working directory in which to run commands inside the container. Default: /
20893
21124
 
20894
21125
  :exampleMetadata: infused
@@ -20957,6 +21188,7 @@ class ContainerDefinitionOptions:
20957
21188
  check_type(argname="argument system_controls", value=system_controls, expected_type=type_hints["system_controls"])
20958
21189
  check_type(argname="argument ulimits", value=ulimits, expected_type=type_hints["ulimits"])
20959
21190
  check_type(argname="argument user", value=user, expected_type=type_hints["user"])
21191
+ check_type(argname="argument version_consistency", value=version_consistency, expected_type=type_hints["version_consistency"])
20960
21192
  check_type(argname="argument working_directory", value=working_directory, expected_type=type_hints["working_directory"])
20961
21193
  self._values: typing.Dict[builtins.str, typing.Any] = {
20962
21194
  "image": image,
@@ -21033,6 +21265,8 @@ class ContainerDefinitionOptions:
21033
21265
  self._values["ulimits"] = ulimits
21034
21266
  if user is not None:
21035
21267
  self._values["user"] = user
21268
+ if version_consistency is not None:
21269
+ self._values["version_consistency"] = version_consistency
21036
21270
  if working_directory is not None:
21037
21271
  self._values["working_directory"] = working_directory
21038
21272
 
@@ -21443,6 +21677,21 @@ class ContainerDefinitionOptions:
21443
21677
  result = self._values.get("user")
21444
21678
  return typing.cast(typing.Optional[builtins.str], result)
21445
21679
 
21680
+ @builtins.property
21681
+ def version_consistency(self) -> typing.Optional["VersionConsistency"]:
21682
+ '''Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest.
21683
+
21684
+ If you set the value for a container as disabled, Amazon ECS will
21685
+ not resolve the provided container image tag to a digest and will use the
21686
+ original image URI specified in the container definition for deployment.
21687
+
21688
+ :default: VersionConsistency.DISABLED if ``image`` is a CDK asset, VersionConsistency.ENABLED otherwise
21689
+
21690
+ :see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinition.html#cfn-ecs-taskdefinition-containerdefinition-versionconsistency
21691
+ '''
21692
+ result = self._values.get("version_consistency")
21693
+ return typing.cast(typing.Optional["VersionConsistency"], result)
21694
+
21446
21695
  @builtins.property
21447
21696
  def working_directory(self) -> typing.Optional[builtins.str]:
21448
21697
  '''The working directory in which to run commands inside the container.
@@ -21505,6 +21754,7 @@ class ContainerDefinitionOptions:
21505
21754
  "system_controls": "systemControls",
21506
21755
  "ulimits": "ulimits",
21507
21756
  "user": "user",
21757
+ "version_consistency": "versionConsistency",
21508
21758
  "working_directory": "workingDirectory",
21509
21759
  "task_definition": "taskDefinition",
21510
21760
  },
@@ -21550,6 +21800,7 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
21550
21800
  system_controls: typing.Optional[typing.Sequence[typing.Union["SystemControl", typing.Dict[builtins.str, typing.Any]]]] = None,
21551
21801
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
21552
21802
  user: typing.Optional[builtins.str] = None,
21803
+ version_consistency: typing.Optional["VersionConsistency"] = None,
21553
21804
  working_directory: typing.Optional[builtins.str] = None,
21554
21805
  task_definition: "TaskDefinition",
21555
21806
  ) -> None:
@@ -21592,6 +21843,7 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
21592
21843
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
21593
21844
  :param ulimits: An array of ulimits to set in the container.
21594
21845
  :param user: The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run. Default: root
21846
+ :param version_consistency: Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest. If you set the value for a container as disabled, Amazon ECS will not resolve the provided container image tag to a digest and will use the original image URI specified in the container definition for deployment. Default: VersionConsistency.DISABLED if ``image`` is a CDK asset, VersionConsistency.ENABLED otherwise
21595
21847
  :param working_directory: The working directory in which to run commands inside the container. Default: /
21596
21848
  :param task_definition: The name of the task definition that includes this container definition. [disable-awslint:ref-via-interface]
21597
21849
 
@@ -21686,6 +21938,7 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
21686
21938
  soft_limit=123
21687
21939
  )],
21688
21940
  user="user",
21941
+ version_consistency=ecs.VersionConsistency.ENABLED,
21689
21942
  working_directory="workingDirectory"
21690
21943
  )
21691
21944
  '''
@@ -21730,6 +21983,7 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
21730
21983
  check_type(argname="argument system_controls", value=system_controls, expected_type=type_hints["system_controls"])
21731
21984
  check_type(argname="argument ulimits", value=ulimits, expected_type=type_hints["ulimits"])
21732
21985
  check_type(argname="argument user", value=user, expected_type=type_hints["user"])
21986
+ check_type(argname="argument version_consistency", value=version_consistency, expected_type=type_hints["version_consistency"])
21733
21987
  check_type(argname="argument working_directory", value=working_directory, expected_type=type_hints["working_directory"])
21734
21988
  check_type(argname="argument task_definition", value=task_definition, expected_type=type_hints["task_definition"])
21735
21989
  self._values: typing.Dict[builtins.str, typing.Any] = {
@@ -21808,6 +22062,8 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
21808
22062
  self._values["ulimits"] = ulimits
21809
22063
  if user is not None:
21810
22064
  self._values["user"] = user
22065
+ if version_consistency is not None:
22066
+ self._values["version_consistency"] = version_consistency
21811
22067
  if working_directory is not None:
21812
22068
  self._values["working_directory"] = working_directory
21813
22069
 
@@ -22218,6 +22474,21 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
22218
22474
  result = self._values.get("user")
22219
22475
  return typing.cast(typing.Optional[builtins.str], result)
22220
22476
 
22477
+ @builtins.property
22478
+ def version_consistency(self) -> typing.Optional["VersionConsistency"]:
22479
+ '''Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest.
22480
+
22481
+ If you set the value for a container as disabled, Amazon ECS will
22482
+ not resolve the provided container image tag to a digest and will use the
22483
+ original image URI specified in the container definition for deployment.
22484
+
22485
+ :default: VersionConsistency.DISABLED if ``image`` is a CDK asset, VersionConsistency.ENABLED otherwise
22486
+
22487
+ :see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinition.html#cfn-ecs-taskdefinition-containerdefinition-versionconsistency
22488
+ '''
22489
+ result = self._values.get("version_consistency")
22490
+ return typing.cast(typing.Optional["VersionConsistency"], result)
22491
+
22221
22492
  @builtins.property
22222
22493
  def working_directory(self) -> typing.Optional[builtins.str]:
22223
22494
  '''The working directory in which to run commands inside the container.
@@ -23981,6 +24252,7 @@ class Ec2ServiceAttributes:
23981
24252
  "volume_configurations": "volumeConfigurations",
23982
24253
  "task_definition": "taskDefinition",
23983
24254
  "assign_public_ip": "assignPublicIp",
24255
+ "availability_zone_rebalancing": "availabilityZoneRebalancing",
23984
24256
  "daemon": "daemon",
23985
24257
  "placement_constraints": "placementConstraints",
23986
24258
  "placement_strategies": "placementStrategies",
@@ -24011,6 +24283,7 @@ class Ec2ServiceProps(BaseServiceOptions):
24011
24283
  volume_configurations: typing.Optional[typing.Sequence["ServiceManagedVolume"]] = None,
24012
24284
  task_definition: "TaskDefinition",
24013
24285
  assign_public_ip: typing.Optional[builtins.bool] = None,
24286
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
24014
24287
  daemon: typing.Optional[builtins.bool] = None,
24015
24288
  placement_constraints: typing.Optional[typing.Sequence["PlacementConstraint"]] = None,
24016
24289
  placement_strategies: typing.Optional[typing.Sequence["PlacementStrategy"]] = None,
@@ -24038,6 +24311,7 @@ class Ec2ServiceProps(BaseServiceOptions):
24038
24311
  :param volume_configurations: Configuration details for a volume used by the service. This allows you to specify details about the EBS volume that can be attched to ECS tasks. Default: - undefined
24039
24312
  :param task_definition: The task definition to use for tasks in the service. [disable-awslint:ref-via-interface]
24040
24313
  :param assign_public_ip: Specifies whether the task's elastic network interface receives a public IP address. If true, each task will receive a public IP address. This property is only used for tasks that use the awsvpc network mode. Default: false
24314
+ :param availability_zone_rebalancing: Whether to use Availability Zone rebalancing for the service. If enabled: ``maxHealthyPercent`` must be greater than 100; ``daemon`` must be false; if there are any ``placementStrategies``, the first must be "spread across Availability Zones"; there must be no ``placementConstraints`` using ``attribute:ecs.availability-zone``, and the service must not be a target of a Classic Load Balancer. Default: AvailabilityZoneRebalancing.DISABLED
24041
24315
  :param daemon: Specifies whether the service will use the daemon scheduling strategy. If true, the service scheduler deploys exactly one task on each container instance in your cluster. When you are using this strategy, do not specify a desired number of tasks or any task placement strategies. Default: false
24042
24316
  :param placement_constraints: The placement constraints to use for tasks in the service. For more information, see `Amazon ECS Task Placement Constraints <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html>`_. Default: - No constraints.
24043
24317
  :param placement_strategies: The placement strategies to use for tasks in the service. For more information, see `Amazon ECS Task Placement Strategies <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html>`_. Default: - No strategies.
@@ -24094,6 +24368,7 @@ class Ec2ServiceProps(BaseServiceOptions):
24094
24368
  check_type(argname="argument volume_configurations", value=volume_configurations, expected_type=type_hints["volume_configurations"])
24095
24369
  check_type(argname="argument task_definition", value=task_definition, expected_type=type_hints["task_definition"])
24096
24370
  check_type(argname="argument assign_public_ip", value=assign_public_ip, expected_type=type_hints["assign_public_ip"])
24371
+ check_type(argname="argument availability_zone_rebalancing", value=availability_zone_rebalancing, expected_type=type_hints["availability_zone_rebalancing"])
24097
24372
  check_type(argname="argument daemon", value=daemon, expected_type=type_hints["daemon"])
24098
24373
  check_type(argname="argument placement_constraints", value=placement_constraints, expected_type=type_hints["placement_constraints"])
24099
24374
  check_type(argname="argument placement_strategies", value=placement_strategies, expected_type=type_hints["placement_strategies"])
@@ -24137,6 +24412,8 @@ class Ec2ServiceProps(BaseServiceOptions):
24137
24412
  self._values["volume_configurations"] = volume_configurations
24138
24413
  if assign_public_ip is not None:
24139
24414
  self._values["assign_public_ip"] = assign_public_ip
24415
+ if availability_zone_rebalancing is not None:
24416
+ self._values["availability_zone_rebalancing"] = availability_zone_rebalancing
24140
24417
  if daemon is not None:
24141
24418
  self._values["daemon"] = daemon
24142
24419
  if placement_constraints is not None:
@@ -24346,6 +24623,24 @@ class Ec2ServiceProps(BaseServiceOptions):
24346
24623
  result = self._values.get("assign_public_ip")
24347
24624
  return typing.cast(typing.Optional[builtins.bool], result)
24348
24625
 
24626
+ @builtins.property
24627
+ def availability_zone_rebalancing(
24628
+ self,
24629
+ ) -> typing.Optional[AvailabilityZoneRebalancing]:
24630
+ '''Whether to use Availability Zone rebalancing for the service.
24631
+
24632
+ If enabled: ``maxHealthyPercent`` must be greater than 100; ``daemon`` must be false; if there
24633
+ are any ``placementStrategies``, the first must be "spread across Availability Zones"; there
24634
+ must be no ``placementConstraints`` using ``attribute:ecs.availability-zone``, and the
24635
+ service must not be a target of a Classic Load Balancer.
24636
+
24637
+ :default: AvailabilityZoneRebalancing.DISABLED
24638
+
24639
+ :see: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html
24640
+ '''
24641
+ result = self._values.get("availability_zone_rebalancing")
24642
+ return typing.cast(typing.Optional[AvailabilityZoneRebalancing], result)
24643
+
24349
24644
  @builtins.property
24350
24645
  def daemon(self) -> typing.Optional[builtins.bool]:
24351
24646
  '''Specifies whether the service will use the daemon scheduling strategy.
@@ -25923,6 +26218,7 @@ class ExternalServiceAttributes:
25923
26218
  "task_definition_revision": "taskDefinitionRevision",
25924
26219
  "volume_configurations": "volumeConfigurations",
25925
26220
  "task_definition": "taskDefinition",
26221
+ "daemon": "daemon",
25926
26222
  "security_groups": "securityGroups",
25927
26223
  },
25928
26224
  )
@@ -25948,6 +26244,7 @@ class ExternalServiceProps(BaseServiceOptions):
25948
26244
  task_definition_revision: typing.Optional["TaskDefinitionRevision"] = None,
25949
26245
  volume_configurations: typing.Optional[typing.Sequence["ServiceManagedVolume"]] = None,
25950
26246
  task_definition: "TaskDefinition",
26247
+ daemon: typing.Optional[builtins.bool] = None,
25951
26248
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
25952
26249
  ) -> None:
25953
26250
  '''The properties for defining a service using the External launch type.
@@ -25970,6 +26267,7 @@ class ExternalServiceProps(BaseServiceOptions):
25970
26267
  :param task_definition_revision: Revision number for the task definition or ``latest`` to use the latest active task revision. Default: - Uses the revision of the passed task definition deployed by CloudFormation
25971
26268
  :param volume_configurations: Configuration details for a volume used by the service. This allows you to specify details about the EBS volume that can be attched to ECS tasks. Default: - undefined
25972
26269
  :param task_definition: The task definition to use for tasks in the service. [disable-awslint:ref-via-interface]
26270
+ :param daemon: By default, service use REPLICA scheduling strategy, this parameter enable DAEMON scheduling strategy. If true, the service scheduler deploys exactly one task on each container instance in your cluster. When you are using this strategy, do not specify a desired number of tasks or any task placement strategies. Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy. Default: false
25973
26271
  :param security_groups: The security groups to associate with the service. If you do not specify a security group, a new security group is created. Default: - A new security group is created.
25974
26272
 
25975
26273
  :exampleMetadata: infused
@@ -25980,11 +26278,16 @@ class ExternalServiceProps(BaseServiceOptions):
25980
26278
  # task_definition: ecs.TaskDefinition
25981
26279
 
25982
26280
 
25983
- service = ecs.ExternalService(self, "Service",
26281
+ ecs.Ec2Service(self, "Ec2Service",
25984
26282
  cluster=cluster,
25985
26283
  task_definition=task_definition,
25986
- desired_count=5,
25987
- min_healthy_percent=100
26284
+ daemon=True
26285
+ )
26286
+
26287
+ ecs.ExternalService(self, "ExternalService",
26288
+ cluster=cluster,
26289
+ task_definition=task_definition,
26290
+ daemon=True
25988
26291
  )
25989
26292
  '''
25990
26293
  if isinstance(circuit_breaker, dict):
@@ -26017,6 +26320,7 @@ class ExternalServiceProps(BaseServiceOptions):
26017
26320
  check_type(argname="argument task_definition_revision", value=task_definition_revision, expected_type=type_hints["task_definition_revision"])
26018
26321
  check_type(argname="argument volume_configurations", value=volume_configurations, expected_type=type_hints["volume_configurations"])
26019
26322
  check_type(argname="argument task_definition", value=task_definition, expected_type=type_hints["task_definition"])
26323
+ check_type(argname="argument daemon", value=daemon, expected_type=type_hints["daemon"])
26020
26324
  check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
26021
26325
  self._values: typing.Dict[builtins.str, typing.Any] = {
26022
26326
  "cluster": cluster,
@@ -26054,6 +26358,8 @@ class ExternalServiceProps(BaseServiceOptions):
26054
26358
  self._values["task_definition_revision"] = task_definition_revision
26055
26359
  if volume_configurations is not None:
26056
26360
  self._values["volume_configurations"] = volume_configurations
26361
+ if daemon is not None:
26362
+ self._values["daemon"] = daemon
26057
26363
  if security_groups is not None:
26058
26364
  self._values["security_groups"] = security_groups
26059
26365
 
@@ -26242,6 +26548,20 @@ class ExternalServiceProps(BaseServiceOptions):
26242
26548
  assert result is not None, "Required property 'task_definition' is missing"
26243
26549
  return typing.cast("TaskDefinition", result)
26244
26550
 
26551
+ @builtins.property
26552
+ def daemon(self) -> typing.Optional[builtins.bool]:
26553
+ '''By default, service use REPLICA scheduling strategy, this parameter enable DAEMON scheduling strategy.
26554
+
26555
+ If true, the service scheduler deploys exactly one task on each container instance in your cluster.
26556
+
26557
+ When you are using this strategy, do not specify a desired number of tasks or any task placement strategies.
26558
+ Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy.
26559
+
26560
+ :default: false
26561
+ '''
26562
+ result = self._values.get("daemon")
26563
+ return typing.cast(typing.Optional[builtins.bool], result)
26564
+
26245
26565
  @builtins.property
26246
26566
  def security_groups(self) -> typing.Optional[typing.List[_ISecurityGroup_acf8a799]]:
26247
26567
  '''The security groups to associate with the service.
@@ -26743,6 +27063,7 @@ class FargateServiceAttributes:
26743
27063
  "volume_configurations": "volumeConfigurations",
26744
27064
  "task_definition": "taskDefinition",
26745
27065
  "assign_public_ip": "assignPublicIp",
27066
+ "availability_zone_rebalancing": "availabilityZoneRebalancing",
26746
27067
  "platform_version": "platformVersion",
26747
27068
  "security_groups": "securityGroups",
26748
27069
  "vpc_subnets": "vpcSubnets",
@@ -26771,6 +27092,7 @@ class FargateServiceProps(BaseServiceOptions):
26771
27092
  volume_configurations: typing.Optional[typing.Sequence["ServiceManagedVolume"]] = None,
26772
27093
  task_definition: "TaskDefinition",
26773
27094
  assign_public_ip: typing.Optional[builtins.bool] = None,
27095
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
26774
27096
  platform_version: typing.Optional[FargatePlatformVersion] = None,
26775
27097
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
26776
27098
  vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -26796,6 +27118,7 @@ class FargateServiceProps(BaseServiceOptions):
26796
27118
  :param volume_configurations: Configuration details for a volume used by the service. This allows you to specify details about the EBS volume that can be attched to ECS tasks. Default: - undefined
26797
27119
  :param task_definition: The task definition to use for tasks in the service. [disable-awslint:ref-via-interface]
26798
27120
  :param assign_public_ip: Specifies whether the task's elastic network interface receives a public IP address. If true, each task will receive a public IP address. Default: false
27121
+ :param availability_zone_rebalancing: Whether to use Availability Zone rebalancing for the service. If enabled, ``maxHealthyPercent`` must be greater than 100, and the service must not be a target of a Classic Load Balancer. Default: AvailabilityZoneRebalancing.DISABLED
26799
27122
  :param platform_version: The platform version on which to run your service. If one is not specified, the LATEST platform version is used by default. For more information, see `AWS Fargate Platform Versions <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html>`_ in the Amazon Elastic Container Service Developer Guide. Default: Latest
26800
27123
  :param security_groups: The security groups to associate with the service. If you do not specify a security group, a new security group is created. Default: - A new security group is created.
26801
27124
  :param vpc_subnets: The subnets to associate with the service. Default: - Public subnets if ``assignPublicIp`` is set, otherwise the first available one of Private, Isolated, Public, in that order.
@@ -26804,34 +27127,22 @@ class FargateServiceProps(BaseServiceOptions):
26804
27127
 
26805
27128
  Example::
26806
27129
 
26807
- import aws_cdk.aws_cloudwatch as cw
26808
-
26809
27130
  # cluster: ecs.Cluster
26810
27131
  # task_definition: ecs.TaskDefinition
26811
- # elb_alarm: cw.Alarm
27132
+ # vpc: ec2.Vpc
26812
27133
 
27134
+ service = ecs.FargateService(self, "Service", cluster=cluster, task_definition=task_definition, min_healthy_percent=100)
26813
27135
 
26814
- service = ecs.FargateService(self, "Service",
26815
- cluster=cluster,
26816
- task_definition=task_definition,
26817
- min_healthy_percent=100,
26818
- deployment_alarms=ecs.DeploymentAlarmConfig(
26819
- alarm_names=[elb_alarm.alarm_name],
26820
- behavior=ecs.AlarmBehavior.ROLLBACK_ON_ALARM
27136
+ lb = elbv2.ApplicationLoadBalancer(self, "LB", vpc=vpc, internet_facing=True)
27137
+ listener = lb.add_listener("Listener", port=80)
27138
+ service.register_load_balancer_targets(
27139
+ container_name="web",
27140
+ container_port=80,
27141
+ new_target_group_id="ECS",
27142
+ listener=ecs.ListenerConfig.application_listener(listener,
27143
+ protocol=elbv2.ApplicationProtocol.HTTPS
26821
27144
  )
26822
27145
  )
26823
-
26824
- # Defining a deployment alarm after the service has been created
26825
- cpu_alarm_name = "MyCpuMetricAlarm"
26826
- cw.Alarm(self, "CPUAlarm",
26827
- alarm_name=cpu_alarm_name,
26828
- metric=service.metric_cpu_utilization(),
26829
- evaluation_periods=2,
26830
- threshold=80
26831
- )
26832
- service.enable_deployment_alarms([cpu_alarm_name],
26833
- behavior=ecs.AlarmBehavior.FAIL_ON_ALARM
26834
- )
26835
27146
  '''
26836
27147
  if isinstance(circuit_breaker, dict):
26837
27148
  circuit_breaker = DeploymentCircuitBreaker(**circuit_breaker)
@@ -26866,6 +27177,7 @@ class FargateServiceProps(BaseServiceOptions):
26866
27177
  check_type(argname="argument volume_configurations", value=volume_configurations, expected_type=type_hints["volume_configurations"])
26867
27178
  check_type(argname="argument task_definition", value=task_definition, expected_type=type_hints["task_definition"])
26868
27179
  check_type(argname="argument assign_public_ip", value=assign_public_ip, expected_type=type_hints["assign_public_ip"])
27180
+ check_type(argname="argument availability_zone_rebalancing", value=availability_zone_rebalancing, expected_type=type_hints["availability_zone_rebalancing"])
26869
27181
  check_type(argname="argument platform_version", value=platform_version, expected_type=type_hints["platform_version"])
26870
27182
  check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
26871
27183
  check_type(argname="argument vpc_subnets", value=vpc_subnets, expected_type=type_hints["vpc_subnets"])
@@ -26907,6 +27219,8 @@ class FargateServiceProps(BaseServiceOptions):
26907
27219
  self._values["volume_configurations"] = volume_configurations
26908
27220
  if assign_public_ip is not None:
26909
27221
  self._values["assign_public_ip"] = assign_public_ip
27222
+ if availability_zone_rebalancing is not None:
27223
+ self._values["availability_zone_rebalancing"] = availability_zone_rebalancing
26910
27224
  if platform_version is not None:
26911
27225
  self._values["platform_version"] = platform_version
26912
27226
  if security_groups is not None:
@@ -27110,6 +27424,22 @@ class FargateServiceProps(BaseServiceOptions):
27110
27424
  result = self._values.get("assign_public_ip")
27111
27425
  return typing.cast(typing.Optional[builtins.bool], result)
27112
27426
 
27427
+ @builtins.property
27428
+ def availability_zone_rebalancing(
27429
+ self,
27430
+ ) -> typing.Optional[AvailabilityZoneRebalancing]:
27431
+ '''Whether to use Availability Zone rebalancing for the service.
27432
+
27433
+ If enabled, ``maxHealthyPercent`` must be greater than 100, and the service must not be a target
27434
+ of a Classic Load Balancer.
27435
+
27436
+ :default: AvailabilityZoneRebalancing.DISABLED
27437
+
27438
+ :see: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html
27439
+ '''
27440
+ result = self._values.get("availability_zone_rebalancing")
27441
+ return typing.cast(typing.Optional[AvailabilityZoneRebalancing], result)
27442
+
27113
27443
  @builtins.property
27114
27444
  def platform_version(self) -> typing.Optional[FargatePlatformVersion]:
27115
27445
  '''The platform version on which to run your service.
@@ -27945,6 +28275,7 @@ class FirelensLogRouter(
27945
28275
  soft_limit=123
27946
28276
  )],
27947
28277
  user="user",
28278
+ version_consistency=ecs.VersionConsistency.ENABLED,
27948
28279
  working_directory="workingDirectory"
27949
28280
  )
27950
28281
  '''
@@ -27993,6 +28324,7 @@ class FirelensLogRouter(
27993
28324
  system_controls: typing.Optional[typing.Sequence[typing.Union["SystemControl", typing.Dict[builtins.str, typing.Any]]]] = None,
27994
28325
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
27995
28326
  user: typing.Optional[builtins.str] = None,
28327
+ version_consistency: typing.Optional["VersionConsistency"] = None,
27996
28328
  working_directory: typing.Optional[builtins.str] = None,
27997
28329
  ) -> None:
27998
28330
  '''Constructs a new instance of the FirelensLogRouter class.
@@ -28038,6 +28370,7 @@ class FirelensLogRouter(
28038
28370
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
28039
28371
  :param ulimits: An array of ulimits to set in the container.
28040
28372
  :param user: The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run. Default: root
28373
+ :param version_consistency: Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest. If you set the value for a container as disabled, Amazon ECS will not resolve the provided container image tag to a digest and will use the original image URI specified in the container definition for deployment. Default: VersionConsistency.DISABLED if ``image`` is a CDK asset, VersionConsistency.ENABLED otherwise
28041
28374
  :param working_directory: The working directory in which to run commands inside the container. Default: /
28042
28375
  '''
28043
28376
  if __debug__:
@@ -28084,6 +28417,7 @@ class FirelensLogRouter(
28084
28417
  system_controls=system_controls,
28085
28418
  ulimits=ulimits,
28086
28419
  user=user,
28420
+ version_consistency=version_consistency,
28087
28421
  working_directory=working_directory,
28088
28422
  )
28089
28423
 
@@ -28151,6 +28485,7 @@ class FirelensLogRouter(
28151
28485
  "system_controls": "systemControls",
28152
28486
  "ulimits": "ulimits",
28153
28487
  "user": "user",
28488
+ "version_consistency": "versionConsistency",
28154
28489
  "working_directory": "workingDirectory",
28155
28490
  "firelens_config": "firelensConfig",
28156
28491
  },
@@ -28196,6 +28531,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28196
28531
  system_controls: typing.Optional[typing.Sequence[typing.Union["SystemControl", typing.Dict[builtins.str, typing.Any]]]] = None,
28197
28532
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
28198
28533
  user: typing.Optional[builtins.str] = None,
28534
+ version_consistency: typing.Optional["VersionConsistency"] = None,
28199
28535
  working_directory: typing.Optional[builtins.str] = None,
28200
28536
  firelens_config: typing.Union[FirelensConfig, typing.Dict[builtins.str, typing.Any]],
28201
28537
  ) -> None:
@@ -28238,6 +28574,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28238
28574
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
28239
28575
  :param ulimits: An array of ulimits to set in the container.
28240
28576
  :param user: The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run. Default: root
28577
+ :param version_consistency: Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest. If you set the value for a container as disabled, Amazon ECS will not resolve the provided container image tag to a digest and will use the original image URI specified in the container definition for deployment. Default: VersionConsistency.DISABLED if ``image`` is a CDK asset, VersionConsistency.ENABLED otherwise
28241
28578
  :param working_directory: The working directory in which to run commands inside the container. Default: /
28242
28579
  :param firelens_config: Firelens configuration.
28243
28580
 
@@ -28340,6 +28677,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28340
28677
  soft_limit=123
28341
28678
  )],
28342
28679
  user="user",
28680
+ version_consistency=ecs.VersionConsistency.ENABLED,
28343
28681
  working_directory="workingDirectory"
28344
28682
  )
28345
28683
  '''
@@ -28386,6 +28724,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28386
28724
  check_type(argname="argument system_controls", value=system_controls, expected_type=type_hints["system_controls"])
28387
28725
  check_type(argname="argument ulimits", value=ulimits, expected_type=type_hints["ulimits"])
28388
28726
  check_type(argname="argument user", value=user, expected_type=type_hints["user"])
28727
+ check_type(argname="argument version_consistency", value=version_consistency, expected_type=type_hints["version_consistency"])
28389
28728
  check_type(argname="argument working_directory", value=working_directory, expected_type=type_hints["working_directory"])
28390
28729
  check_type(argname="argument firelens_config", value=firelens_config, expected_type=type_hints["firelens_config"])
28391
28730
  self._values: typing.Dict[builtins.str, typing.Any] = {
@@ -28464,6 +28803,8 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28464
28803
  self._values["ulimits"] = ulimits
28465
28804
  if user is not None:
28466
28805
  self._values["user"] = user
28806
+ if version_consistency is not None:
28807
+ self._values["version_consistency"] = version_consistency
28467
28808
  if working_directory is not None:
28468
28809
  self._values["working_directory"] = working_directory
28469
28810
 
@@ -28874,6 +29215,21 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28874
29215
  result = self._values.get("user")
28875
29216
  return typing.cast(typing.Optional[builtins.str], result)
28876
29217
 
29218
+ @builtins.property
29219
+ def version_consistency(self) -> typing.Optional["VersionConsistency"]:
29220
+ '''Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest.
29221
+
29222
+ If you set the value for a container as disabled, Amazon ECS will
29223
+ not resolve the provided container image tag to a digest and will use the
29224
+ original image URI specified in the container definition for deployment.
29225
+
29226
+ :default: VersionConsistency.DISABLED if ``image`` is a CDK asset, VersionConsistency.ENABLED otherwise
29227
+
29228
+ :see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinition.html#cfn-ecs-taskdefinition-containerdefinition-versionconsistency
29229
+ '''
29230
+ result = self._values.get("version_consistency")
29231
+ return typing.cast(typing.Optional["VersionConsistency"], result)
29232
+
28877
29233
  @builtins.property
28878
29234
  def working_directory(self) -> typing.Optional[builtins.str]:
28879
29235
  '''The working directory in which to run commands inside the container.
@@ -28943,6 +29299,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28943
29299
  "system_controls": "systemControls",
28944
29300
  "ulimits": "ulimits",
28945
29301
  "user": "user",
29302
+ "version_consistency": "versionConsistency",
28946
29303
  "working_directory": "workingDirectory",
28947
29304
  "task_definition": "taskDefinition",
28948
29305
  "firelens_config": "firelensConfig",
@@ -28989,6 +29346,7 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
28989
29346
  system_controls: typing.Optional[typing.Sequence[typing.Union["SystemControl", typing.Dict[builtins.str, typing.Any]]]] = None,
28990
29347
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
28991
29348
  user: typing.Optional[builtins.str] = None,
29349
+ version_consistency: typing.Optional["VersionConsistency"] = None,
28992
29350
  working_directory: typing.Optional[builtins.str] = None,
28993
29351
  task_definition: "TaskDefinition",
28994
29352
  firelens_config: typing.Union[FirelensConfig, typing.Dict[builtins.str, typing.Any]],
@@ -29032,6 +29390,7 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
29032
29390
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
29033
29391
  :param ulimits: An array of ulimits to set in the container.
29034
29392
  :param user: The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run. Default: root
29393
+ :param version_consistency: Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest. If you set the value for a container as disabled, Amazon ECS will not resolve the provided container image tag to a digest and will use the original image URI specified in the container definition for deployment. Default: VersionConsistency.DISABLED if ``image`` is a CDK asset, VersionConsistency.ENABLED otherwise
29035
29394
  :param working_directory: The working directory in which to run commands inside the container. Default: /
29036
29395
  :param task_definition: The name of the task definition that includes this container definition. [disable-awslint:ref-via-interface]
29037
29396
  :param firelens_config: Firelens configuration.
@@ -29137,6 +29496,7 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
29137
29496
  soft_limit=123
29138
29497
  )],
29139
29498
  user="user",
29499
+ version_consistency=ecs.VersionConsistency.ENABLED,
29140
29500
  working_directory="workingDirectory"
29141
29501
  )
29142
29502
  '''
@@ -29183,6 +29543,7 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
29183
29543
  check_type(argname="argument system_controls", value=system_controls, expected_type=type_hints["system_controls"])
29184
29544
  check_type(argname="argument ulimits", value=ulimits, expected_type=type_hints["ulimits"])
29185
29545
  check_type(argname="argument user", value=user, expected_type=type_hints["user"])
29546
+ check_type(argname="argument version_consistency", value=version_consistency, expected_type=type_hints["version_consistency"])
29186
29547
  check_type(argname="argument working_directory", value=working_directory, expected_type=type_hints["working_directory"])
29187
29548
  check_type(argname="argument task_definition", value=task_definition, expected_type=type_hints["task_definition"])
29188
29549
  check_type(argname="argument firelens_config", value=firelens_config, expected_type=type_hints["firelens_config"])
@@ -29263,6 +29624,8 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
29263
29624
  self._values["ulimits"] = ulimits
29264
29625
  if user is not None:
29265
29626
  self._values["user"] = user
29627
+ if version_consistency is not None:
29628
+ self._values["version_consistency"] = version_consistency
29266
29629
  if working_directory is not None:
29267
29630
  self._values["working_directory"] = working_directory
29268
29631
 
@@ -29673,6 +30036,21 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
29673
30036
  result = self._values.get("user")
29674
30037
  return typing.cast(typing.Optional[builtins.str], result)
29675
30038
 
30039
+ @builtins.property
30040
+ def version_consistency(self) -> typing.Optional["VersionConsistency"]:
30041
+ '''Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest.
30042
+
30043
+ If you set the value for a container as disabled, Amazon ECS will
30044
+ not resolve the provided container image tag to a digest and will use the
30045
+ original image URI specified in the container definition for deployment.
30046
+
30047
+ :default: VersionConsistency.DISABLED if ``image`` is a CDK asset, VersionConsistency.ENABLED otherwise
30048
+
30049
+ :see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinition.html#cfn-ecs-taskdefinition-containerdefinition-versionconsistency
30050
+ '''
30051
+ result = self._values.get("version_consistency")
30052
+ return typing.cast(typing.Optional["VersionConsistency"], result)
30053
+
29676
30054
  @builtins.property
29677
30055
  def working_directory(self) -> typing.Optional[builtins.str]:
29678
30056
  '''The working directory in which to run commands inside the container.
@@ -34890,6 +35268,7 @@ class ServiceConnectProps:
34890
35268
  "ingress_port_override": "ingressPortOverride",
34891
35269
  "per_request_timeout": "perRequestTimeout",
34892
35270
  "port": "port",
35271
+ "tls": "tls",
34893
35272
  },
34894
35273
  )
34895
35274
  class ServiceConnectService:
@@ -34903,6 +35282,7 @@ class ServiceConnectService:
34903
35282
  ingress_port_override: typing.Optional[jsii.Number] = None,
34904
35283
  per_request_timeout: typing.Optional[_Duration_4839e8c3] = None,
34905
35284
  port: typing.Optional[jsii.Number] = None,
35285
+ tls: typing.Optional[typing.Union["ServiceConnectTlsConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
34906
35286
  ) -> None:
34907
35287
  '''Interface for service connect Service props.
34908
35288
 
@@ -34913,6 +35293,7 @@ class ServiceConnectService:
34913
35293
  :param ingress_port_override: Optional. The port on the Service Connect agent container to use for traffic ingress to this service. Default: - none
34914
35294
  :param per_request_timeout: The amount of time waiting for the upstream to respond with a complete response per request for Service Connect. A value of 0 can be set to disable ``perRequestTimeout``. Can only be set when the ``appProtocol`` for the application container is HTTP/HTTP2/GRPC. If ``idleTimeout`` is set to a time that is less than ``perRequestTimeout``, the connection will close when the ``idleTimeout`` is reached and not the ``perRequestTimeout``. Default: - Duration.seconds(15)
34915
35295
  :param port: The port for clients to use to communicate with this service via Service Connect. Default: the container port specified by the port mapping in portMappingName.
35296
+ :param tls: A reference to an object that represents a Transport Layer Security (TLS) configuration. Default: - none
34916
35297
 
34917
35298
  :exampleMetadata: fixture=_generated
34918
35299
 
@@ -34922,6 +35303,11 @@ class ServiceConnectService:
34922
35303
  # The values are placeholders you should change.
34923
35304
  import aws_cdk as cdk
34924
35305
  from aws_cdk import aws_ecs as ecs
35306
+ from aws_cdk import aws_iam as iam
35307
+ from aws_cdk import aws_kms as kms
35308
+
35309
+ # key: kms.Key
35310
+ # role: iam.Role
34925
35311
 
34926
35312
  service_connect_service = ecs.ServiceConnectService(
34927
35313
  port_mapping_name="portMappingName",
@@ -34932,9 +35318,16 @@ class ServiceConnectService:
34932
35318
  idle_timeout=cdk.Duration.minutes(30),
34933
35319
  ingress_port_override=123,
34934
35320
  per_request_timeout=cdk.Duration.minutes(30),
34935
- port=123
35321
+ port=123,
35322
+ tls=ecs.ServiceConnectTlsConfiguration(
35323
+ aws_pca_authority_arn="awsPcaAuthorityArn",
35324
+ kms_key=key,
35325
+ role=role
35326
+ )
34936
35327
  )
34937
35328
  '''
35329
+ if isinstance(tls, dict):
35330
+ tls = ServiceConnectTlsConfiguration(**tls)
34938
35331
  if __debug__:
34939
35332
  type_hints = typing.get_type_hints(_typecheckingstub__5fc70dc513eac25b19e79ac6e7ba5dc61662a4299bbba170094fabb95b271fd0)
34940
35333
  check_type(argname="argument port_mapping_name", value=port_mapping_name, expected_type=type_hints["port_mapping_name"])
@@ -34944,6 +35337,7 @@ class ServiceConnectService:
34944
35337
  check_type(argname="argument ingress_port_override", value=ingress_port_override, expected_type=type_hints["ingress_port_override"])
34945
35338
  check_type(argname="argument per_request_timeout", value=per_request_timeout, expected_type=type_hints["per_request_timeout"])
34946
35339
  check_type(argname="argument port", value=port, expected_type=type_hints["port"])
35340
+ check_type(argname="argument tls", value=tls, expected_type=type_hints["tls"])
34947
35341
  self._values: typing.Dict[builtins.str, typing.Any] = {
34948
35342
  "port_mapping_name": port_mapping_name,
34949
35343
  }
@@ -34959,6 +35353,8 @@ class ServiceConnectService:
34959
35353
  self._values["per_request_timeout"] = per_request_timeout
34960
35354
  if port is not None:
34961
35355
  self._values["port"] = port
35356
+ if tls is not None:
35357
+ self._values["tls"] = tls
34962
35358
 
34963
35359
  @builtins.property
34964
35360
  def port_mapping_name(self) -> builtins.str:
@@ -35039,6 +35435,15 @@ class ServiceConnectService:
35039
35435
  result = self._values.get("port")
35040
35436
  return typing.cast(typing.Optional[jsii.Number], result)
35041
35437
 
35438
+ @builtins.property
35439
+ def tls(self) -> typing.Optional["ServiceConnectTlsConfiguration"]:
35440
+ '''A reference to an object that represents a Transport Layer Security (TLS) configuration.
35441
+
35442
+ :default: - none
35443
+ '''
35444
+ result = self._values.get("tls")
35445
+ return typing.cast(typing.Optional["ServiceConnectTlsConfiguration"], result)
35446
+
35042
35447
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
35043
35448
  return isinstance(rhs, self.__class__) and rhs._values == self._values
35044
35449
 
@@ -35051,6 +35456,108 @@ class ServiceConnectService:
35051
35456
  )
35052
35457
 
35053
35458
 
35459
+ @jsii.data_type(
35460
+ jsii_type="aws-cdk-lib.aws_ecs.ServiceConnectTlsConfiguration",
35461
+ jsii_struct_bases=[],
35462
+ name_mapping={
35463
+ "aws_pca_authority_arn": "awsPcaAuthorityArn",
35464
+ "kms_key": "kmsKey",
35465
+ "role": "role",
35466
+ },
35467
+ )
35468
+ class ServiceConnectTlsConfiguration:
35469
+ def __init__(
35470
+ self,
35471
+ *,
35472
+ aws_pca_authority_arn: typing.Optional[builtins.str] = None,
35473
+ kms_key: typing.Optional[_IKey_5f11635f] = None,
35474
+ role: typing.Optional[_IRole_235f5d8e] = None,
35475
+ ) -> None:
35476
+ '''TLS configuration for Service Connect service.
35477
+
35478
+ :param aws_pca_authority_arn: The ARN of the certificate root authority that secures your service. Default: - none
35479
+ :param kms_key: The KMS key used for encryption and decryption. Default: - none
35480
+ :param role: The IAM role that's associated with the Service Connect TLS. Default: - none
35481
+
35482
+ :exampleMetadata: infused
35483
+
35484
+ Example::
35485
+
35486
+ # cluster: ecs.Cluster
35487
+ # task_definition: ecs.TaskDefinition
35488
+ # kms_key: kms.IKey
35489
+ # role: iam.IRole
35490
+
35491
+
35492
+ service = ecs.FargateService(self, "FargateService",
35493
+ cluster=cluster,
35494
+ task_definition=task_definition,
35495
+ service_connect_configuration=ecs.ServiceConnectProps(
35496
+ services=[ecs.ServiceConnectService(
35497
+ tls=ecs.ServiceConnectTlsConfiguration(
35498
+ role=role,
35499
+ kms_key=kms_key,
35500
+ aws_pca_authority_arn="arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/123456789012"
35501
+ ),
35502
+ port_mapping_name="api"
35503
+ )
35504
+ ],
35505
+ namespace="sample namespace"
35506
+ )
35507
+ )
35508
+ '''
35509
+ if __debug__:
35510
+ type_hints = typing.get_type_hints(_typecheckingstub__7266405779c519b75a2c1f8c4019cc54ff7bc528da44ee8ce4b42ec354e3b370)
35511
+ check_type(argname="argument aws_pca_authority_arn", value=aws_pca_authority_arn, expected_type=type_hints["aws_pca_authority_arn"])
35512
+ check_type(argname="argument kms_key", value=kms_key, expected_type=type_hints["kms_key"])
35513
+ check_type(argname="argument role", value=role, expected_type=type_hints["role"])
35514
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
35515
+ if aws_pca_authority_arn is not None:
35516
+ self._values["aws_pca_authority_arn"] = aws_pca_authority_arn
35517
+ if kms_key is not None:
35518
+ self._values["kms_key"] = kms_key
35519
+ if role is not None:
35520
+ self._values["role"] = role
35521
+
35522
+ @builtins.property
35523
+ def aws_pca_authority_arn(self) -> typing.Optional[builtins.str]:
35524
+ '''The ARN of the certificate root authority that secures your service.
35525
+
35526
+ :default: - none
35527
+ '''
35528
+ result = self._values.get("aws_pca_authority_arn")
35529
+ return typing.cast(typing.Optional[builtins.str], result)
35530
+
35531
+ @builtins.property
35532
+ def kms_key(self) -> typing.Optional[_IKey_5f11635f]:
35533
+ '''The KMS key used for encryption and decryption.
35534
+
35535
+ :default: - none
35536
+ '''
35537
+ result = self._values.get("kms_key")
35538
+ return typing.cast(typing.Optional[_IKey_5f11635f], result)
35539
+
35540
+ @builtins.property
35541
+ def role(self) -> typing.Optional[_IRole_235f5d8e]:
35542
+ '''The IAM role that's associated with the Service Connect TLS.
35543
+
35544
+ :default: - none
35545
+ '''
35546
+ result = self._values.get("role")
35547
+ return typing.cast(typing.Optional[_IRole_235f5d8e], result)
35548
+
35549
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
35550
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
35551
+
35552
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
35553
+ return not (rhs == self)
35554
+
35555
+ def __repr__(self) -> str:
35556
+ return "ServiceConnectTlsConfiguration(%s)" % ", ".join(
35557
+ k + "=" + repr(v) for k, v in self._values.items()
35558
+ )
35559
+
35560
+
35054
35561
  @jsii.data_type(
35055
35562
  jsii_type="aws-cdk-lib.aws_ecs.ServiceManagedEBSVolumeConfiguration",
35056
35563
  jsii_struct_bases=[],
@@ -36628,20 +37135,32 @@ class TaskDefinition(
36628
37135
 
36629
37136
  Example::
36630
37137
 
36631
- # cluster: ecs.Cluster
36632
37138
  # task_definition: ecs.TaskDefinition
36633
- # vpc: ec2.Vpc
37139
+ # cluster: ecs.Cluster
36634
37140
 
36635
- service = ecs.FargateService(self, "Service", cluster=cluster, task_definition=task_definition, min_healthy_percent=100)
36636
37141
 
36637
- lb = elbv2.ApplicationLoadBalancer(self, "LB", vpc=vpc, internet_facing=True)
36638
- listener = lb.add_listener("Listener", port=80)
36639
- service.register_load_balancer_targets(
36640
- container_name="web",
36641
- container_port=80,
36642
- new_target_group_id="ECS",
36643
- listener=ecs.ListenerConfig.application_listener(listener,
36644
- protocol=elbv2.ApplicationProtocol.HTTPS
37142
+ # Add a container to the task definition
37143
+ specific_container = task_definition.add_container("Container",
37144
+ image=ecs.ContainerImage.from_registry("/aws/aws-example-app"),
37145
+ memory_limit_mi_b=2048
37146
+ )
37147
+
37148
+ # Add a port mapping
37149
+ specific_container.add_port_mappings(
37150
+ container_port=7600,
37151
+ protocol=ecs.Protocol.TCP
37152
+ )
37153
+
37154
+ ecs.Ec2Service(self, "Service",
37155
+ cluster=cluster,
37156
+ task_definition=task_definition,
37157
+ min_healthy_percent=100,
37158
+ cloud_map_options=ecs.CloudMapOptions(
37159
+ # Create SRV records - useful for bridge networking
37160
+ dns_record_type=cloudmap.DnsRecordType.SRV,
37161
+ # Targets port TCP port 7600 `specificContainer`
37162
+ container=specific_container,
37163
+ container_port=7600
36645
37164
  )
36646
37165
  )
36647
37166
  '''
@@ -36672,10 +37191,10 @@ class TaskDefinition(
36672
37191
 
36673
37192
  :param scope: -
36674
37193
  :param id: -
36675
- :param compatibility: The task launch type compatiblity requirement.
37194
+ :param compatibility: The task launch type compatibility requirement.
36676
37195
  :param cpu: The number of cpu units used by the task. If you are using the EC2 launch type, this field is optional and any value can be used. If you are using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the memory parameter: 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) 8192 (8 vCPU) - Available memory values: Between 16384 (16 GB) and 61440 (60 GB) in increments of 4096 (4 GB) 16384 (16 vCPU) - Available memory values: Between 32768 (32 GB) and 122880 (120 GB) in increments of 8192 (8 GB) Default: - CPU units are not specified.
36677
37196
  :param ephemeral_storage_gib: The amount (in GiB) of ephemeral storage to be allocated to the task. Only supported in Fargate platform version 1.4.0 or later. Default: - Undefined, in which case, the task will receive 20GiB ephemeral storage.
36678
- :param inference_accelerators: The inference accelerators to use for the containers in the task. Not supported in Fargate. Default: - No inference accelerators.
37197
+ :param inference_accelerators: (deprecated) The inference accelerators to use for the containers in the task. Not supported in Fargate. Default: - No inference accelerators.
36679
37198
  :param ipc_mode: The IPC resource namespace to use for the containers in the task. Not supported in Fargate and Windows containers. Default: - IpcMode used by the task is not specified
36680
37199
  :param memory_mib: The amount (in MiB) of memory used by the task. If using the EC2 launch type, this field is optional and any value can be used. If using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU) 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU) 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU) Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU) Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU) Between 16384 (16 GB) and 61440 (60 GB) in increments of 4096 (4 GB) - Available cpu values: 8192 (8 vCPU) Between 32768 (32 GB) and 122880 (120 GB) in increments of 8192 (8 GB) - Available cpu values: 16384 (16 vCPU) Default: - Memory used by task is not specified.
36681
37200
  :param network_mode: The networking mode to use for the containers in the task. On Fargate, the only supported networking mode is AwsVpc. Default: - NetworkMode.Bridge for EC2 & External tasks, AwsVpc for Fargate tasks.
@@ -36816,6 +37335,7 @@ class TaskDefinition(
36816
37335
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
36817
37336
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
36818
37337
  user: typing.Optional[builtins.str] = None,
37338
+ version_consistency: typing.Optional["VersionConsistency"] = None,
36819
37339
  working_directory: typing.Optional[builtins.str] = None,
36820
37340
  ) -> ContainerDefinition:
36821
37341
  '''Adds a new container to the task definition.
@@ -36858,6 +37378,7 @@ class TaskDefinition(
36858
37378
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
36859
37379
  :param ulimits: An array of ulimits to set in the container.
36860
37380
  :param user: The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run. Default: root
37381
+ :param version_consistency: Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest. If you set the value for a container as disabled, Amazon ECS will not resolve the provided container image tag to a digest and will use the original image URI specified in the container definition for deployment. Default: VersionConsistency.DISABLED if ``image`` is a CDK asset, VersionConsistency.ENABLED otherwise
36861
37382
  :param working_directory: The working directory in which to run commands inside the container. Default: /
36862
37383
  '''
36863
37384
  if __debug__:
@@ -36901,6 +37422,7 @@ class TaskDefinition(
36901
37422
  system_controls=system_controls,
36902
37423
  ulimits=ulimits,
36903
37424
  user=user,
37425
+ version_consistency=version_consistency,
36904
37426
  working_directory=working_directory,
36905
37427
  )
36906
37428
 
@@ -36963,6 +37485,7 @@ class TaskDefinition(
36963
37485
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
36964
37486
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
36965
37487
  user: typing.Optional[builtins.str] = None,
37488
+ version_consistency: typing.Optional["VersionConsistency"] = None,
36966
37489
  working_directory: typing.Optional[builtins.str] = None,
36967
37490
  ) -> FirelensLogRouter:
36968
37491
  '''Adds a firelens log router to the task definition.
@@ -37006,6 +37529,7 @@ class TaskDefinition(
37006
37529
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
37007
37530
  :param ulimits: An array of ulimits to set in the container.
37008
37531
  :param user: The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run. Default: root
37532
+ :param version_consistency: Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest. If you set the value for a container as disabled, Amazon ECS will not resolve the provided container image tag to a digest and will use the original image URI specified in the container definition for deployment. Default: VersionConsistency.DISABLED if ``image`` is a CDK asset, VersionConsistency.ENABLED otherwise
37009
37533
  :param working_directory: The working directory in which to run commands inside the container. Default: /
37010
37534
  '''
37011
37535
  if __debug__:
@@ -37050,6 +37574,7 @@ class TaskDefinition(
37050
37574
  system_controls=system_controls,
37051
37575
  ulimits=ulimits,
37052
37576
  user=user,
37577
+ version_consistency=version_consistency,
37053
37578
  working_directory=working_directory,
37054
37579
  )
37055
37580
 
@@ -37062,10 +37587,14 @@ class TaskDefinition(
37062
37587
  device_name: typing.Optional[builtins.str] = None,
37063
37588
  device_type: typing.Optional[builtins.str] = None,
37064
37589
  ) -> None:
37065
- '''Adds an inference accelerator to the task definition.
37590
+ '''(deprecated) Adds an inference accelerator to the task definition.
37066
37591
 
37067
37592
  :param device_name: The Elastic Inference accelerator device name. Default: - empty
37068
37593
  :param device_type: The Elastic Inference accelerator type to use. The allowed values are: eia2.medium, eia2.large and eia2.xlarge. Default: - empty
37594
+
37595
+ :deprecated: ECS TaskDefinition's inferenceAccelerator is EOL since April 2024
37596
+
37597
+ :stability: deprecated
37069
37598
  '''
37070
37599
  inference_accelerator = InferenceAccelerator(
37071
37600
  device_name=device_name, device_type=device_type
@@ -37484,10 +38013,10 @@ class TaskDefinitionProps(CommonTaskDefinitionProps):
37484
38013
  :param proxy_configuration: The configuration details for the App Mesh proxy. Default: - No proxy configuration.
37485
38014
  :param task_role: The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf. Default: - A task role is automatically created for you.
37486
38015
  :param volumes: The list of volume definitions for the task. For more information, see `Task Definition Parameter Volumes <https://docs.aws.amazon.com/AmazonECS/latest/developerguide//task_definition_parameters.html#volumes>`_. Default: - No volumes are passed to the Docker daemon on a container instance.
37487
- :param compatibility: The task launch type compatiblity requirement.
38016
+ :param compatibility: The task launch type compatibility requirement.
37488
38017
  :param cpu: The number of cpu units used by the task. If you are using the EC2 launch type, this field is optional and any value can be used. If you are using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the memory parameter: 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) 512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) 1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) 2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) 4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) 8192 (8 vCPU) - Available memory values: Between 16384 (16 GB) and 61440 (60 GB) in increments of 4096 (4 GB) 16384 (16 vCPU) - Available memory values: Between 32768 (32 GB) and 122880 (120 GB) in increments of 8192 (8 GB) Default: - CPU units are not specified.
37489
38018
  :param ephemeral_storage_gib: The amount (in GiB) of ephemeral storage to be allocated to the task. Only supported in Fargate platform version 1.4.0 or later. Default: - Undefined, in which case, the task will receive 20GiB ephemeral storage.
37490
- :param inference_accelerators: The inference accelerators to use for the containers in the task. Not supported in Fargate. Default: - No inference accelerators.
38019
+ :param inference_accelerators: (deprecated) The inference accelerators to use for the containers in the task. Not supported in Fargate. Default: - No inference accelerators.
37491
38020
  :param ipc_mode: The IPC resource namespace to use for the containers in the task. Not supported in Fargate and Windows containers. Default: - IpcMode used by the task is not specified
37492
38021
  :param memory_mib: The amount (in MiB) of memory used by the task. If using the EC2 launch type, this field is optional and any value can be used. If using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU) 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU) 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU) Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU) Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU) Between 16384 (16 GB) and 61440 (60 GB) in increments of 4096 (4 GB) - Available cpu values: 8192 (8 vCPU) Between 32768 (32 GB) and 122880 (120 GB) in increments of 8192 (8 GB) - Available cpu values: 16384 (16 vCPU) Default: - Memory used by task is not specified.
37493
38022
  :param network_mode: The networking mode to use for the containers in the task. On Fargate, the only supported networking mode is AwsVpc. Default: - NetworkMode.Bridge for EC2 & External tasks, AwsVpc for Fargate tasks.
@@ -37648,7 +38177,7 @@ class TaskDefinitionProps(CommonTaskDefinitionProps):
37648
38177
 
37649
38178
  @builtins.property
37650
38179
  def compatibility(self) -> Compatibility:
37651
- '''The task launch type compatiblity requirement.'''
38180
+ '''The task launch type compatibility requirement.'''
37652
38181
  result = self._values.get("compatibility")
37653
38182
  assert result is not None, "Required property 'compatibility' is missing"
37654
38183
  return typing.cast(Compatibility, result)
@@ -37695,11 +38224,15 @@ class TaskDefinitionProps(CommonTaskDefinitionProps):
37695
38224
  def inference_accelerators(
37696
38225
  self,
37697
38226
  ) -> typing.Optional[typing.List[InferenceAccelerator]]:
37698
- '''The inference accelerators to use for the containers in the task.
38227
+ '''(deprecated) The inference accelerators to use for the containers in the task.
37699
38228
 
37700
38229
  Not supported in Fargate.
37701
38230
 
37702
38231
  :default: - No inference accelerators.
38232
+
38233
+ :deprecated: ECS TaskDefinition's inferenceAccelerator is EOL since April 2024
38234
+
38235
+ :stability: deprecated
37703
38236
  '''
37704
38237
  result = self._values.get("inference_accelerators")
37705
38238
  return typing.cast(typing.Optional[typing.List[InferenceAccelerator]], result)
@@ -38281,6 +38814,28 @@ class UlimitName(enum.Enum):
38281
38814
  STACK = "STACK"
38282
38815
 
38283
38816
 
38817
+ @jsii.enum(jsii_type="aws-cdk-lib.aws_ecs.VersionConsistency")
38818
+ class VersionConsistency(enum.Enum):
38819
+ '''State of the container version consistency feature.
38820
+
38821
+ :see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinition.html#cfn-ecs-taskdefinition-containerdefinition-versionconsistency
38822
+ :exampleMetadata: infused
38823
+
38824
+ Example::
38825
+
38826
+ task_definition = ecs.Ec2TaskDefinition(self, "TaskDef")
38827
+ task_definition.add_container("TheContainer",
38828
+ image=ecs.ContainerImage.from_registry("example-image"),
38829
+ version_consistency=ecs.VersionConsistency.DISABLED
38830
+ )
38831
+ '''
38832
+
38833
+ ENABLED = "ENABLED"
38834
+ '''The version consistency feature is enabled for this container.'''
38835
+ DISABLED = "DISABLED"
38836
+ '''The version consistency feature is disabled for this container.'''
38837
+
38838
+
38284
38839
  @jsii.data_type(
38285
38840
  jsii_type="aws-cdk-lib.aws_ecs.Volume",
38286
38841
  jsii_struct_bases=[],
@@ -39389,7 +39944,7 @@ class Cluster(
39389
39944
  statistic: typing.Optional[builtins.str] = None,
39390
39945
  unit: typing.Optional[_Unit_61bc6f70] = None,
39391
39946
  ) -> _Metric_e396a4dc:
39392
- '''This method returns the specifed CloudWatch metric for this cluster.
39947
+ '''This method returns the specified CloudWatch metric for this cluster.
39393
39948
 
39394
39949
  :param metric_name: -
39395
39950
  :param account: Account which this metric comes from. Default: - Deployment account.
@@ -40492,7 +41047,7 @@ class BaseService(
40492
41047
 
40493
41048
  Don't call this. Call ``loadBalancer.addTarget()`` instead.
40494
41049
 
40495
- :param load_balancer: -
41050
+ :param load_balancer: [disable-awslint:ref-via-interface].
40496
41051
  '''
40497
41052
  if __debug__:
40498
41053
  type_hints = typing.get_type_hints(_typecheckingstub__56ff5a0e2823e80ea268c7defc428085c67b793cb31e88397d625cd6370439a1)
@@ -41020,6 +41575,7 @@ class Ec2Service(
41020
41575
  *,
41021
41576
  task_definition: TaskDefinition,
41022
41577
  assign_public_ip: typing.Optional[builtins.bool] = None,
41578
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
41023
41579
  daemon: typing.Optional[builtins.bool] = None,
41024
41580
  placement_constraints: typing.Optional[typing.Sequence[PlacementConstraint]] = None,
41025
41581
  placement_strategies: typing.Optional[typing.Sequence[PlacementStrategy]] = None,
@@ -41049,6 +41605,7 @@ class Ec2Service(
41049
41605
  :param id: -
41050
41606
  :param task_definition: The task definition to use for tasks in the service. [disable-awslint:ref-via-interface]
41051
41607
  :param assign_public_ip: Specifies whether the task's elastic network interface receives a public IP address. If true, each task will receive a public IP address. This property is only used for tasks that use the awsvpc network mode. Default: false
41608
+ :param availability_zone_rebalancing: Whether to use Availability Zone rebalancing for the service. If enabled: ``maxHealthyPercent`` must be greater than 100; ``daemon`` must be false; if there are any ``placementStrategies``, the first must be "spread across Availability Zones"; there must be no ``placementConstraints`` using ``attribute:ecs.availability-zone``, and the service must not be a target of a Classic Load Balancer. Default: AvailabilityZoneRebalancing.DISABLED
41052
41609
  :param daemon: Specifies whether the service will use the daemon scheduling strategy. If true, the service scheduler deploys exactly one task on each container instance in your cluster. When you are using this strategy, do not specify a desired number of tasks or any task placement strategies. Default: false
41053
41610
  :param placement_constraints: The placement constraints to use for tasks in the service. For more information, see `Amazon ECS Task Placement Constraints <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html>`_. Default: - No constraints.
41054
41611
  :param placement_strategies: The placement strategies to use for tasks in the service. For more information, see `Amazon ECS Task Placement Strategies <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html>`_. Default: - No strategies.
@@ -41079,6 +41636,7 @@ class Ec2Service(
41079
41636
  props = Ec2ServiceProps(
41080
41637
  task_definition=task_definition,
41081
41638
  assign_public_ip=assign_public_ip,
41639
+ availability_zone_rebalancing=availability_zone_rebalancing,
41082
41640
  daemon=daemon,
41083
41641
  placement_constraints=placement_constraints,
41084
41642
  placement_strategies=placement_strategies,
@@ -41183,6 +41741,21 @@ class Ec2Service(
41183
41741
  check_type(argname="argument strategies", value=strategies, expected_type=typing.Tuple[type_hints["strategies"], ...]) # pyright: ignore [reportGeneralTypeIssues]
41184
41742
  return typing.cast(None, jsii.invoke(self, "addPlacementStrategies", [*strategies]))
41185
41743
 
41744
+ @jsii.member(jsii_name="attachToClassicLB")
41745
+ def attach_to_classic_lb(self, load_balancer: _LoadBalancer_a894d40e) -> None:
41746
+ '''Registers the service as a target of a Classic Load Balancer (CLB).
41747
+
41748
+ Don't call this. Call ``loadBalancer.addTarget()`` instead.
41749
+
41750
+ :param load_balancer: -
41751
+
41752
+ :override: true
41753
+ '''
41754
+ if __debug__:
41755
+ type_hints = typing.get_type_hints(_typecheckingstub__92dbc7c46013b6831215fcc3302fb341d8b788fd8a9ae3631b63127cde348e55)
41756
+ check_type(argname="argument load_balancer", value=load_balancer, expected_type=type_hints["load_balancer"])
41757
+ return typing.cast(None, jsii.invoke(self, "attachToClassicLB", [load_balancer]))
41758
+
41186
41759
 
41187
41760
  @jsii.implements(IEc2TaskDefinition)
41188
41761
  class Ec2TaskDefinition(
@@ -41362,6 +41935,7 @@ class Ec2TaskDefinition(
41362
41935
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
41363
41936
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
41364
41937
  user: typing.Optional[builtins.str] = None,
41938
+ version_consistency: typing.Optional[VersionConsistency] = None,
41365
41939
  working_directory: typing.Optional[builtins.str] = None,
41366
41940
  ) -> ContainerDefinition:
41367
41941
  '''Tasks running in AWSVPC networking mode requires an additional environment variable for the region to be sourced.
@@ -41406,6 +41980,7 @@ class Ec2TaskDefinition(
41406
41980
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
41407
41981
  :param ulimits: An array of ulimits to set in the container.
41408
41982
  :param user: The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run. Default: root
41983
+ :param version_consistency: Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest. If you set the value for a container as disabled, Amazon ECS will not resolve the provided container image tag to a digest and will use the original image URI specified in the container definition for deployment. Default: VersionConsistency.DISABLED if ``image`` is a CDK asset, VersionConsistency.ENABLED otherwise
41409
41984
  :param working_directory: The working directory in which to run commands inside the container. Default: /
41410
41985
  '''
41411
41986
  if __debug__:
@@ -41449,6 +42024,7 @@ class Ec2TaskDefinition(
41449
42024
  system_controls=system_controls,
41450
42025
  ulimits=ulimits,
41451
42026
  user=user,
42027
+ version_consistency=version_consistency,
41452
42028
  working_directory=working_directory,
41453
42029
  )
41454
42030
 
@@ -41472,11 +42048,16 @@ class ExternalService(
41472
42048
  # task_definition: ecs.TaskDefinition
41473
42049
 
41474
42050
 
41475
- service = ecs.ExternalService(self, "Service",
42051
+ ecs.Ec2Service(self, "Ec2Service",
41476
42052
  cluster=cluster,
41477
42053
  task_definition=task_definition,
41478
- desired_count=5,
41479
- min_healthy_percent=100
42054
+ daemon=True
42055
+ )
42056
+
42057
+ ecs.ExternalService(self, "ExternalService",
42058
+ cluster=cluster,
42059
+ task_definition=task_definition,
42060
+ daemon=True
41480
42061
  )
41481
42062
  '''
41482
42063
 
@@ -41486,6 +42067,7 @@ class ExternalService(
41486
42067
  id: builtins.str,
41487
42068
  *,
41488
42069
  task_definition: TaskDefinition,
42070
+ daemon: typing.Optional[builtins.bool] = None,
41489
42071
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
41490
42072
  cluster: ICluster,
41491
42073
  capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
@@ -41510,6 +42092,7 @@ class ExternalService(
41510
42092
  :param scope: -
41511
42093
  :param id: -
41512
42094
  :param task_definition: The task definition to use for tasks in the service. [disable-awslint:ref-via-interface]
42095
+ :param daemon: By default, service use REPLICA scheduling strategy, this parameter enable DAEMON scheduling strategy. If true, the service scheduler deploys exactly one task on each container instance in your cluster. When you are using this strategy, do not specify a desired number of tasks or any task placement strategies. Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy. Default: false
41513
42096
  :param security_groups: The security groups to associate with the service. If you do not specify a security group, a new security group is created. Default: - A new security group is created.
41514
42097
  :param cluster: The name of the cluster that hosts the service.
41515
42098
  :param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
@@ -41535,6 +42118,7 @@ class ExternalService(
41535
42118
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
41536
42119
  props = ExternalServiceProps(
41537
42120
  task_definition=task_definition,
42121
+ daemon=daemon,
41538
42122
  security_groups=security_groups,
41539
42123
  cluster=cluster,
41540
42124
  capacity_provider_strategies=capacity_provider_strategies,
@@ -41900,34 +42484,22 @@ class FargateService(
41900
42484
 
41901
42485
  Example::
41902
42486
 
41903
- import aws_cdk.aws_cloudwatch as cw
41904
-
41905
42487
  # cluster: ecs.Cluster
41906
42488
  # task_definition: ecs.TaskDefinition
41907
- # elb_alarm: cw.Alarm
42489
+ # vpc: ec2.Vpc
41908
42490
 
42491
+ service = ecs.FargateService(self, "Service", cluster=cluster, task_definition=task_definition, min_healthy_percent=100)
41909
42492
 
41910
- service = ecs.FargateService(self, "Service",
41911
- cluster=cluster,
41912
- task_definition=task_definition,
41913
- min_healthy_percent=100,
41914
- deployment_alarms=ecs.DeploymentAlarmConfig(
41915
- alarm_names=[elb_alarm.alarm_name],
41916
- behavior=ecs.AlarmBehavior.ROLLBACK_ON_ALARM
42493
+ lb = elbv2.ApplicationLoadBalancer(self, "LB", vpc=vpc, internet_facing=True)
42494
+ listener = lb.add_listener("Listener", port=80)
42495
+ service.register_load_balancer_targets(
42496
+ container_name="web",
42497
+ container_port=80,
42498
+ new_target_group_id="ECS",
42499
+ listener=ecs.ListenerConfig.application_listener(listener,
42500
+ protocol=elbv2.ApplicationProtocol.HTTPS
41917
42501
  )
41918
42502
  )
41919
-
41920
- # Defining a deployment alarm after the service has been created
41921
- cpu_alarm_name = "MyCpuMetricAlarm"
41922
- cw.Alarm(self, "CPUAlarm",
41923
- alarm_name=cpu_alarm_name,
41924
- metric=service.metric_cpu_utilization(),
41925
- evaluation_periods=2,
41926
- threshold=80
41927
- )
41928
- service.enable_deployment_alarms([cpu_alarm_name],
41929
- behavior=ecs.AlarmBehavior.FAIL_ON_ALARM
41930
- )
41931
42503
  '''
41932
42504
 
41933
42505
  def __init__(
@@ -41937,6 +42509,7 @@ class FargateService(
41937
42509
  *,
41938
42510
  task_definition: TaskDefinition,
41939
42511
  assign_public_ip: typing.Optional[builtins.bool] = None,
42512
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
41940
42513
  platform_version: typing.Optional[FargatePlatformVersion] = None,
41941
42514
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
41942
42515
  vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -41964,6 +42537,7 @@ class FargateService(
41964
42537
  :param id: -
41965
42538
  :param task_definition: The task definition to use for tasks in the service. [disable-awslint:ref-via-interface]
41966
42539
  :param assign_public_ip: Specifies whether the task's elastic network interface receives a public IP address. If true, each task will receive a public IP address. Default: false
42540
+ :param availability_zone_rebalancing: Whether to use Availability Zone rebalancing for the service. If enabled, ``maxHealthyPercent`` must be greater than 100, and the service must not be a target of a Classic Load Balancer. Default: AvailabilityZoneRebalancing.DISABLED
41967
42541
  :param platform_version: The platform version on which to run your service. If one is not specified, the LATEST platform version is used by default. For more information, see `AWS Fargate Platform Versions <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html>`_ in the Amazon Elastic Container Service Developer Guide. Default: Latest
41968
42542
  :param security_groups: The security groups to associate with the service. If you do not specify a security group, a new security group is created. Default: - A new security group is created.
41969
42543
  :param vpc_subnets: The subnets to associate with the service. Default: - Public subnets if ``assignPublicIp`` is set, otherwise the first available one of Private, Isolated, Public, in that order.
@@ -41992,6 +42566,7 @@ class FargateService(
41992
42566
  props = FargateServiceProps(
41993
42567
  task_definition=task_definition,
41994
42568
  assign_public_ip=assign_public_ip,
42569
+ availability_zone_rebalancing=availability_zone_rebalancing,
41995
42570
  platform_version=platform_version,
41996
42571
  security_groups=security_groups,
41997
42572
  vpc_subnets=vpc_subnets,
@@ -42066,6 +42641,21 @@ class FargateService(
42066
42641
 
42067
42642
  return typing.cast(IBaseService, jsii.sinvoke(cls, "fromFargateServiceAttributes", [scope, id, attrs]))
42068
42643
 
42644
+ @jsii.member(jsii_name="attachToClassicLB")
42645
+ def attach_to_classic_lb(self, load_balancer: _LoadBalancer_a894d40e) -> None:
42646
+ '''Registers the service as a target of a Classic Load Balancer (CLB).
42647
+
42648
+ Don't call this. Call ``loadBalancer.addTarget()`` instead.
42649
+
42650
+ :param load_balancer: -
42651
+
42652
+ :override: true
42653
+ '''
42654
+ if __debug__:
42655
+ type_hints = typing.get_type_hints(_typecheckingstub__41a65f2e7e6448580d3322dee4bc9635bee60d9fd0fb6a801d91c37859e117f4)
42656
+ check_type(argname="argument load_balancer", value=load_balancer, expected_type=type_hints["load_balancer"])
42657
+ return typing.cast(None, jsii.invoke(self, "attachToClassicLB", [load_balancer]))
42658
+
42069
42659
 
42070
42660
  @jsii.implements(IFargateTaskDefinition)
42071
42661
  class FargateTaskDefinition(
@@ -42217,6 +42807,18 @@ class FargateTaskDefinition(
42217
42807
 
42218
42808
  return typing.cast(IFargateTaskDefinition, jsii.sinvoke(cls, "fromFargateTaskDefinitionAttributes", [scope, id, attrs]))
42219
42809
 
42810
+ @builtins.property
42811
+ @jsii.member(jsii_name="cpu")
42812
+ def cpu(self) -> jsii.Number:
42813
+ '''The number of cpu units used by the task.'''
42814
+ return typing.cast(jsii.Number, jsii.get(self, "cpu"))
42815
+
42816
+ @builtins.property
42817
+ @jsii.member(jsii_name="memoryMiB")
42818
+ def memory_mib(self) -> jsii.Number:
42819
+ '''The amount (in MiB) of memory used by the task.'''
42820
+ return typing.cast(jsii.Number, jsii.get(self, "memoryMiB"))
42821
+
42220
42822
  @builtins.property
42221
42823
  @jsii.member(jsii_name="networkMode")
42222
42824
  def network_mode(self) -> NetworkMode:
@@ -42249,6 +42851,7 @@ __all__ = [
42249
42851
  "AssetImageProps",
42250
42852
  "AssociateCloudMapServiceOptions",
42251
42853
  "AuthorizationConfig",
42854
+ "AvailabilityZoneRebalancing",
42252
42855
  "AwsLogDriver",
42253
42856
  "AwsLogDriverMode",
42254
42857
  "AwsLogDriverProps",
@@ -42415,6 +43018,7 @@ __all__ = [
42415
43018
  "ServiceConnect",
42416
43019
  "ServiceConnectProps",
42417
43020
  "ServiceConnectService",
43021
+ "ServiceConnectTlsConfiguration",
42418
43022
  "ServiceManagedEBSVolumeConfiguration",
42419
43023
  "ServiceManagedVolume",
42420
43024
  "ServiceManagedVolumeProps",
@@ -42434,6 +43038,7 @@ __all__ = [
42434
43038
  "TrackCustomMetricProps",
42435
43039
  "Ulimit",
42436
43040
  "UlimitName",
43041
+ "VersionConsistency",
42437
43042
  "Volume",
42438
43043
  "VolumeFrom",
42439
43044
  "WindowsOptimizedVersion",
@@ -43314,7 +43919,7 @@ def _typecheckingstub__251c3999c1586967f7c9091782e6a113831e05b5f853b910cad8c8e75
43314
43919
  def _typecheckingstub__dc71ad10c4d7e167753ff81a7c450165b3118a6f5f0f8c2ad282bc4bc057a60b(
43315
43920
  *,
43316
43921
  log_driver: typing.Optional[builtins.str] = None,
43317
- options: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
43922
+ options: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
43318
43923
  secret_options: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union[CfnService.SecretProperty, typing.Dict[builtins.str, typing.Any]]]]]] = None,
43319
43924
  ) -> None:
43320
43925
  """Type checking stubs"""
@@ -43408,6 +44013,7 @@ def _typecheckingstub__dfccfa8c4140c61b1030fe8ed564cee115f38fe8144d5ff6ac1654634
43408
44013
  snapshot_id: typing.Optional[builtins.str] = None,
43409
44014
  tag_specifications: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union[CfnService.EBSTagSpecificationProperty, typing.Dict[builtins.str, typing.Any]]]]]] = None,
43410
44015
  throughput: typing.Optional[jsii.Number] = None,
44016
+ volume_initialization_rate: typing.Optional[jsii.Number] = None,
43411
44017
  volume_type: typing.Optional[builtins.str] = None,
43412
44018
  ) -> None:
43413
44019
  """Type checking stubs"""
@@ -43644,7 +44250,7 @@ def _typecheckingstub__d367f5be98d90056ca7f199c577c5744b20417ce5d1c8ad339824ec9d
43644
44250
  disable_networking: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
43645
44251
  dns_search_domains: typing.Optional[typing.Sequence[builtins.str]] = None,
43646
44252
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
43647
- docker_labels: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
44253
+ docker_labels: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
43648
44254
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
43649
44255
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
43650
44256
  environment: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union[CfnTaskDefinition.KeyValuePairProperty, typing.Dict[builtins.str, typing.Any]]]]]] = None,
@@ -43702,8 +44308,8 @@ def _typecheckingstub__fa8da109bc6888a0534920dcd1b365d2de33c75ccc0bbb15b5246ab75
43702
44308
  *,
43703
44309
  autoprovision: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
43704
44310
  driver: typing.Optional[builtins.str] = None,
43705
- driver_opts: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
43706
- labels: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
44311
+ driver_opts: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
44312
+ labels: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
43707
44313
  scope: typing.Optional[builtins.str] = None,
43708
44314
  ) -> None:
43709
44315
  """Type checking stubs"""
@@ -43754,7 +44360,7 @@ def _typecheckingstub__ef74e299375c10c97a6bb4455d35f14ea7c21e10b612cd0fb3958fd12
43754
44360
 
43755
44361
  def _typecheckingstub__6a1cd84d62e34083a37bc4c25d849ac547dacc5fe8a4db04170cf83e3cd1e9d3(
43756
44362
  *,
43757
- options: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
44363
+ options: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
43758
44364
  type: typing.Optional[builtins.str] = None,
43759
44365
  ) -> None:
43760
44366
  """Type checking stubs"""
@@ -43826,7 +44432,7 @@ def _typecheckingstub__c0aaf73788be7f1d342c8a05599189d471843835d7b8d191218db6717
43826
44432
  def _typecheckingstub__21877ca71c2d5ead7d497c9d9a61ebef73ab6b2fcae2f5452db9d1dec56c00aa(
43827
44433
  *,
43828
44434
  log_driver: builtins.str,
43829
- options: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
44435
+ options: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
43830
44436
  secret_options: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union[CfnTaskDefinition.SecretProperty, typing.Dict[builtins.str, typing.Any]]]]]] = None,
43831
44437
  ) -> None:
43832
44438
  """Type checking stubs"""
@@ -43880,7 +44486,7 @@ def _typecheckingstub__9f0e59715edb889cdb53a1111c692d2fcadb558bf86158ff87dec568d
43880
44486
  def _typecheckingstub__8ff4a086a815b10fb977e9150a7c099378c03c3a8fe78638f9abfeeaa1b6dad0(
43881
44487
  *,
43882
44488
  enabled: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
43883
- ignored_exit_codes: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[jsii.Number]]] = None,
44489
+ ignored_exit_codes: typing.Optional[typing.Union[typing.Sequence[jsii.Number], _IResolvable_da3f097b]] = None,
43884
44490
  restart_attempt_period: typing.Optional[jsii.Number] = None,
43885
44491
  ) -> None:
43886
44492
  """Type checking stubs"""
@@ -44270,6 +44876,7 @@ def _typecheckingstub__d8756b492e023ad8d33a399196b15b610f709400ce213e179f17dd1f6
44270
44876
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
44271
44877
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
44272
44878
  user: typing.Optional[builtins.str] = None,
44879
+ version_consistency: typing.Optional[VersionConsistency] = None,
44273
44880
  working_directory: typing.Optional[builtins.str] = None,
44274
44881
  ) -> None:
44275
44882
  """Type checking stubs"""
@@ -44403,6 +45010,7 @@ def _typecheckingstub__f2e5f24c1574825a81dd77783d48886a430a675a0e04f03559eca98b5
44403
45010
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
44404
45011
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
44405
45012
  user: typing.Optional[builtins.str] = None,
45013
+ version_consistency: typing.Optional[VersionConsistency] = None,
44406
45014
  working_directory: typing.Optional[builtins.str] = None,
44407
45015
  ) -> None:
44408
45016
  """Type checking stubs"""
@@ -44447,6 +45055,7 @@ def _typecheckingstub__20c974a49c79829fac0811dffaf78c449f92ae136414b96232160d37c
44447
45055
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
44448
45056
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
44449
45057
  user: typing.Optional[builtins.str] = None,
45058
+ version_consistency: typing.Optional[VersionConsistency] = None,
44450
45059
  working_directory: typing.Optional[builtins.str] = None,
44451
45060
  task_definition: TaskDefinition,
44452
45061
  ) -> None:
@@ -44698,6 +45307,7 @@ def _typecheckingstub__95634258086aa3448fbdfd9896017a2cbeb858f382deb61186bb9e22b
44698
45307
  volume_configurations: typing.Optional[typing.Sequence[ServiceManagedVolume]] = None,
44699
45308
  task_definition: TaskDefinition,
44700
45309
  assign_public_ip: typing.Optional[builtins.bool] = None,
45310
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
44701
45311
  daemon: typing.Optional[builtins.bool] = None,
44702
45312
  placement_constraints: typing.Optional[typing.Sequence[PlacementConstraint]] = None,
44703
45313
  placement_strategies: typing.Optional[typing.Sequence[PlacementStrategy]] = None,
@@ -44894,6 +45504,7 @@ def _typecheckingstub__3cc413964caae89bfcfbcabff8356ffe5c054f46824be99731a77b64e
44894
45504
  task_definition_revision: typing.Optional[TaskDefinitionRevision] = None,
44895
45505
  volume_configurations: typing.Optional[typing.Sequence[ServiceManagedVolume]] = None,
44896
45506
  task_definition: TaskDefinition,
45507
+ daemon: typing.Optional[builtins.bool] = None,
44897
45508
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
44898
45509
  ) -> None:
44899
45510
  """Type checking stubs"""
@@ -44952,6 +45563,7 @@ def _typecheckingstub__8290283f61f3e2d289b7e7f81cad1a5d1e9ed9dbc07ccce2b57604682
44952
45563
  volume_configurations: typing.Optional[typing.Sequence[ServiceManagedVolume]] = None,
44953
45564
  task_definition: TaskDefinition,
44954
45565
  assign_public_ip: typing.Optional[builtins.bool] = None,
45566
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
44955
45567
  platform_version: typing.Optional[FargatePlatformVersion] = None,
44956
45568
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
44957
45569
  vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -45049,6 +45661,7 @@ def _typecheckingstub__aa1e4969dd0e00a5737510c273aa9546ad4ce7bc5a8a146f2a37666b0
45049
45661
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
45050
45662
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
45051
45663
  user: typing.Optional[builtins.str] = None,
45664
+ version_consistency: typing.Optional[VersionConsistency] = None,
45052
45665
  working_directory: typing.Optional[builtins.str] = None,
45053
45666
  ) -> None:
45054
45667
  """Type checking stubs"""
@@ -45099,6 +45712,7 @@ def _typecheckingstub__2bb9382e9a7b1b34a020902905c4bf83e2d4970135e7592e5b5a1da62
45099
45712
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
45100
45713
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
45101
45714
  user: typing.Optional[builtins.str] = None,
45715
+ version_consistency: typing.Optional[VersionConsistency] = None,
45102
45716
  working_directory: typing.Optional[builtins.str] = None,
45103
45717
  firelens_config: typing.Union[FirelensConfig, typing.Dict[builtins.str, typing.Any]],
45104
45718
  ) -> None:
@@ -45144,6 +45758,7 @@ def _typecheckingstub__498b2375cb2035a958edbdd10ad5f4352caa5773be14b63a07c337871
45144
45758
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
45145
45759
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
45146
45760
  user: typing.Optional[builtins.str] = None,
45761
+ version_consistency: typing.Optional[VersionConsistency] = None,
45147
45762
  working_directory: typing.Optional[builtins.str] = None,
45148
45763
  task_definition: TaskDefinition,
45149
45764
  firelens_config: typing.Union[FirelensConfig, typing.Dict[builtins.str, typing.Any]],
@@ -45689,6 +46304,16 @@ def _typecheckingstub__5fc70dc513eac25b19e79ac6e7ba5dc61662a4299bbba170094fabb95
45689
46304
  ingress_port_override: typing.Optional[jsii.Number] = None,
45690
46305
  per_request_timeout: typing.Optional[_Duration_4839e8c3] = None,
45691
46306
  port: typing.Optional[jsii.Number] = None,
46307
+ tls: typing.Optional[typing.Union[ServiceConnectTlsConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
46308
+ ) -> None:
46309
+ """Type checking stubs"""
46310
+ pass
46311
+
46312
+ def _typecheckingstub__7266405779c519b75a2c1f8c4019cc54ff7bc528da44ee8ce4b42ec354e3b370(
46313
+ *,
46314
+ aws_pca_authority_arn: typing.Optional[builtins.str] = None,
46315
+ kms_key: typing.Optional[_IKey_5f11635f] = None,
46316
+ role: typing.Optional[_IRole_235f5d8e] = None,
45692
46317
  ) -> None:
45693
46318
  """Type checking stubs"""
45694
46319
  pass
@@ -45895,6 +46520,7 @@ def _typecheckingstub__8fe416001b357a118b80b0f9e3432c5bffbeffe29c2f7e67a02e5589c
45895
46520
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
45896
46521
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
45897
46522
  user: typing.Optional[builtins.str] = None,
46523
+ version_consistency: typing.Optional[VersionConsistency] = None,
45898
46524
  working_directory: typing.Optional[builtins.str] = None,
45899
46525
  ) -> None:
45900
46526
  """Type checking stubs"""
@@ -45947,6 +46573,7 @@ def _typecheckingstub__a448c235107c9543bb055362134e3500d0a20b6f51e433675f952a773
45947
46573
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
45948
46574
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
45949
46575
  user: typing.Optional[builtins.str] = None,
46576
+ version_consistency: typing.Optional[VersionConsistency] = None,
45950
46577
  working_directory: typing.Optional[builtins.str] = None,
45951
46578
  ) -> None:
45952
46579
  """Type checking stubs"""
@@ -46456,6 +47083,7 @@ def _typecheckingstub__1e578461670bd6cdf856f914534e1feff8905e31d33cd7aea2b9f5151
46456
47083
  *,
46457
47084
  task_definition: TaskDefinition,
46458
47085
  assign_public_ip: typing.Optional[builtins.bool] = None,
47086
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
46459
47087
  daemon: typing.Optional[builtins.bool] = None,
46460
47088
  placement_constraints: typing.Optional[typing.Sequence[PlacementConstraint]] = None,
46461
47089
  placement_strategies: typing.Optional[typing.Sequence[PlacementStrategy]] = None,
@@ -46513,6 +47141,12 @@ def _typecheckingstub__102b3ccc22a55022584267b95a6aad5f4562322f31caae888256cf6e5
46513
47141
  """Type checking stubs"""
46514
47142
  pass
46515
47143
 
47144
+ def _typecheckingstub__92dbc7c46013b6831215fcc3302fb341d8b788fd8a9ae3631b63127cde348e55(
47145
+ load_balancer: _LoadBalancer_a894d40e,
47146
+ ) -> None:
47147
+ """Type checking stubs"""
47148
+ pass
47149
+
46516
47150
  def _typecheckingstub__3a26b01aaf87e4ece20469628f4af696fcfbad789e85b4622bd3e2092663b3b4(
46517
47151
  scope: _constructs_77d1e7e8.Construct,
46518
47152
  id: builtins.str,
@@ -46592,6 +47226,7 @@ def _typecheckingstub__e16f7a8ab558d24dc81cd83e043fb5a8b37369f32cee89bd310588535
46592
47226
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
46593
47227
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
46594
47228
  user: typing.Optional[builtins.str] = None,
47229
+ version_consistency: typing.Optional[VersionConsistency] = None,
46595
47230
  working_directory: typing.Optional[builtins.str] = None,
46596
47231
  ) -> None:
46597
47232
  """Type checking stubs"""
@@ -46602,6 +47237,7 @@ def _typecheckingstub__6ceef4de126cbb6bd6f379ba0b53be2fb61c35761f50685b5d228c682
46602
47237
  id: builtins.str,
46603
47238
  *,
46604
47239
  task_definition: TaskDefinition,
47240
+ daemon: typing.Optional[builtins.bool] = None,
46605
47241
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
46606
47242
  cluster: ICluster,
46607
47243
  capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
@@ -46705,6 +47341,7 @@ def _typecheckingstub__0ddac6b19472d00f74c1777e699ce5b239dc49e62ff4ab4674c917bbe
46705
47341
  *,
46706
47342
  task_definition: TaskDefinition,
46707
47343
  assign_public_ip: typing.Optional[builtins.bool] = None,
47344
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
46708
47345
  platform_version: typing.Optional[FargatePlatformVersion] = None,
46709
47346
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
46710
47347
  vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -46748,6 +47385,12 @@ def _typecheckingstub__37b5dcb0db8589a95c60e0ecf7798026d77e370bf80dfe7d964a48907
46748
47385
  """Type checking stubs"""
46749
47386
  pass
46750
47387
 
47388
+ def _typecheckingstub__41a65f2e7e6448580d3322dee4bc9635bee60d9fd0fb6a801d91c37859e117f4(
47389
+ load_balancer: _LoadBalancer_a894d40e,
47390
+ ) -> None:
47391
+ """Type checking stubs"""
47392
+ pass
47393
+
46751
47394
  def _typecheckingstub__d6eac52d828f2df0ab5e16014f889cf23534875319ae4b479cd554d5399de072(
46752
47395
  scope: _constructs_77d1e7e8.Construct,
46753
47396
  id: builtins.str,