aws-cdk-lib 2.177.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 (111) hide show
  1. aws_cdk/__init__.py +95 -61
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.177.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_appconfig/__init__.py +10 -10
  8. aws_cdk/aws_appflow/__init__.py +20 -20
  9. aws_cdk/aws_applicationsignals/__init__.py +8 -8
  10. aws_cdk/aws_appmesh/__init__.py +8 -8
  11. aws_cdk/aws_appsync/__init__.py +10383 -7035
  12. aws_cdk/aws_apptest/__init__.py +4 -4
  13. aws_cdk/aws_aps/__init__.py +135 -0
  14. aws_cdk/aws_athena/__init__.py +10 -10
  15. aws_cdk/aws_backup/__init__.py +14 -14
  16. aws_cdk/aws_batch/__init__.py +185 -22
  17. aws_cdk/aws_bcmdataexports/__init__.py +4 -4
  18. aws_cdk/aws_bedrock/__init__.py +266 -177
  19. aws_cdk/aws_certificatemanager/__init__.py +15 -14
  20. aws_cdk/aws_chatbot/__init__.py +4 -4
  21. aws_cdk/aws_cloudformation/__init__.py +22 -18
  22. aws_cdk/aws_cloudfront/__init__.py +674 -7
  23. aws_cdk/aws_cloudfront_origins/__init__.py +40 -0
  24. aws_cdk/aws_cloudtrail/__init__.py +4 -4
  25. aws_cdk/aws_cloudwatch/__init__.py +53 -53
  26. aws_cdk/aws_codedeploy/__init__.py +2 -2
  27. aws_cdk/aws_codepipeline/__init__.py +24 -6
  28. aws_cdk/aws_codepipeline_actions/__init__.py +2 -2
  29. aws_cdk/aws_cognito/__init__.py +42 -20
  30. aws_cdk/aws_connect/__init__.py +4 -4
  31. aws_cdk/aws_customerprofiles/__init__.py +3 -1
  32. aws_cdk/aws_databrew/__init__.py +16 -16
  33. aws_cdk/aws_datasync/__init__.py +14 -11
  34. aws_cdk/aws_datazone/__init__.py +5 -5
  35. aws_cdk/aws_dms/__init__.py +4 -4
  36. aws_cdk/aws_dynamodb/__init__.py +267 -25
  37. aws_cdk/aws_ec2/__init__.py +1137 -181
  38. aws_cdk/aws_ecs/__init__.py +740 -116
  39. aws_cdk/aws_ecs_patterns/__init__.py +49 -0
  40. aws_cdk/aws_efs/__init__.py +3 -3
  41. aws_cdk/aws_eks/__init__.py +31 -32
  42. aws_cdk/aws_elasticache/__init__.py +10 -10
  43. aws_cdk/aws_elasticloadbalancingv2/__init__.py +47 -18
  44. aws_cdk/aws_elasticsearch/__init__.py +10 -10
  45. aws_cdk/aws_emr/__init__.py +16 -16
  46. aws_cdk/aws_emrserverless/__init__.py +12 -9
  47. aws_cdk/aws_entityresolution/__init__.py +31 -17
  48. aws_cdk/aws_events/__init__.py +12 -12
  49. aws_cdk/aws_fis/__init__.py +16 -16
  50. aws_cdk/aws_fms/__init__.py +7 -3
  51. aws_cdk/aws_glue/__init__.py +1326 -7
  52. aws_cdk/aws_greengrassv2/__init__.py +8 -8
  53. aws_cdk/aws_guardduty/__init__.py +521 -0
  54. aws_cdk/aws_healthlake/__init__.py +10 -2
  55. aws_cdk/aws_imagebuilder/__init__.py +26 -26
  56. aws_cdk/aws_iot/__init__.py +40 -40
  57. aws_cdk/aws_iotanalytics/__init__.py +4 -4
  58. aws_cdk/aws_iotfleetwise/__init__.py +424 -10
  59. aws_cdk/aws_iotsitewise/__init__.py +84 -13
  60. aws_cdk/aws_iottwinmaker/__init__.py +18 -18
  61. aws_cdk/aws_iotwireless/__init__.py +4 -4
  62. aws_cdk/aws_kafkaconnect/__init__.py +10 -10
  63. aws_cdk/aws_kendra/__init__.py +0 -10
  64. aws_cdk/aws_kinesisanalytics/__init__.py +4 -4
  65. aws_cdk/aws_kinesisanalyticsv2/__init__.py +4 -4
  66. aws_cdk/aws_kinesisfirehose/__init__.py +4544 -183
  67. aws_cdk/aws_kms/__init__.py +11 -10
  68. aws_cdk/aws_lambda/__init__.py +34 -4
  69. aws_cdk/aws_lambda_nodejs/__init__.py +24 -5
  70. aws_cdk/aws_launchwizard/__init__.py +10 -10
  71. aws_cdk/aws_logs/__init__.py +19 -15
  72. aws_cdk/aws_mediaconnect/__init__.py +509 -12
  73. aws_cdk/aws_medialive/__init__.py +16 -16
  74. aws_cdk/aws_mediatailor/__init__.py +10 -10
  75. aws_cdk/aws_networkfirewall/__init__.py +12 -12
  76. aws_cdk/aws_notifications/__init__.py +602 -65
  77. aws_cdk/aws_omics/__init__.py +4 -4
  78. aws_cdk/aws_opensearchservice/__init__.py +10 -10
  79. aws_cdk/aws_opsworks/__init__.py +58 -58
  80. aws_cdk/aws_personalize/__init__.py +8 -8
  81. aws_cdk/aws_pipes/__init__.py +20 -20
  82. aws_cdk/aws_qbusiness/__init__.py +119 -0
  83. aws_cdk/aws_quicksight/__init__.py +247 -92
  84. aws_cdk/aws_rds/__init__.py +21 -15
  85. aws_cdk/aws_redshift/__init__.py +10 -10
  86. aws_cdk/aws_resiliencehub/__init__.py +0 -41
  87. aws_cdk/aws_route53/__init__.py +6 -0
  88. aws_cdk/aws_rum/__init__.py +4 -4
  89. aws_cdk/aws_s3/__init__.py +12 -2
  90. aws_cdk/aws_sagemaker/__init__.py +84 -60
  91. aws_cdk/aws_sam/__init__.py +48 -48
  92. aws_cdk/aws_secretsmanager/__init__.py +30 -14
  93. aws_cdk/aws_securityhub/__init__.py +12 -12
  94. aws_cdk/aws_sns/__init__.py +101 -15
  95. aws_cdk/aws_ssmquicksetup/__init__.py +10 -10
  96. aws_cdk/aws_stepfunctions/__init__.py +13207 -4740
  97. aws_cdk/aws_stepfunctions_tasks/__init__.py +77615 -22817
  98. aws_cdk/aws_synthetics/__init__.py +4 -4
  99. aws_cdk/aws_timestream/__init__.py +41 -0
  100. aws_cdk/aws_transfer/__init__.py +9 -10
  101. aws_cdk/aws_wafv2/__init__.py +24 -22
  102. aws_cdk/aws_wisdom/__init__.py +8 -8
  103. aws_cdk/aws_workspacesweb/__init__.py +60 -60
  104. aws_cdk/aws_xray/__init__.py +8 -8
  105. aws_cdk/cx_api/__init__.py +18 -0
  106. {aws_cdk_lib-2.177.0.dist-info → aws_cdk_lib-2.178.0.dist-info}/METADATA +1 -1
  107. {aws_cdk_lib-2.177.0.dist-info → aws_cdk_lib-2.178.0.dist-info}/RECORD +111 -111
  108. {aws_cdk_lib-2.177.0.dist-info → aws_cdk_lib-2.178.0.dist-info}/LICENSE +0 -0
  109. {aws_cdk_lib-2.177.0.dist-info → aws_cdk_lib-2.178.0.dist-info}/NOTICE +0 -0
  110. {aws_cdk_lib-2.177.0.dist-info → aws_cdk_lib-2.178.0.dist-info}/WHEEL +0 -0
  111. {aws_cdk_lib-2.177.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
@@ -8428,7 +8612,7 @@ class CfnService(
8428
8612
  :param scope: Scope in which this resource is defined.
8429
8613
  :param id: Construct identifier for this resource (unique in its scope).
8430
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"
8431
- :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.
8432
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.
8433
8617
  :param deployment_configuration: Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
8434
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.
@@ -8437,20 +8621,20 @@ class CfnService(
8437
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.
8438
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.
8439
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* .
8440
- :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.
8441
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* .
8442
- :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.
8443
- :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.
8444
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"
8445
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`` .
8446
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* .
8447
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.
8448
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* .
8449
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.
8450
- :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.
8451
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: + - = . _ : /
8452
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>`_ .
8453
- :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.
8454
8638
  :param vpc_lattice_configurations: The VPC Lattice configuration for the service being created.
8455
8639
  '''
8456
8640
  if __debug__:
@@ -9784,7 +9968,7 @@ class CfnService(
9784
9968
  self,
9785
9969
  *,
9786
9970
  log_driver: typing.Optional[builtins.str] = None,
9787
- 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,
9788
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,
9789
9973
  ) -> None:
9790
9974
  '''The log configuration for the container.
@@ -9865,7 +10049,7 @@ class CfnService(
9865
10049
  @builtins.property
9866
10050
  def options(
9867
10051
  self,
9868
- ) -> 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]]:
9869
10053
  '''The configuration options to send to the log driver.
9870
10054
 
9871
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:
@@ -9954,7 +10138,7 @@ class CfnService(
9954
10138
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-logconfiguration.html#cfn-ecs-service-logconfiguration-options
9955
10139
  '''
9956
10140
  result = self._values.get("options")
9957
- 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)
9958
10142
 
9959
10143
  @builtins.property
9960
10144
  def secret_options(
@@ -11638,7 +11822,7 @@ class CfnServiceProps:
11638
11822
  '''Properties for defining a ``CfnService``.
11639
11823
 
11640
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"
11641
- :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.
11642
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.
11643
11827
  :param deployment_configuration: Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
11644
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.
@@ -11647,20 +11831,20 @@ class CfnServiceProps:
11647
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.
11648
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.
11649
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* .
11650
- :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.
11651
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* .
11652
- :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.
11653
- :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.
11654
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"
11655
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`` .
11656
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* .
11657
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.
11658
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* .
11659
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.
11660
- :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.
11661
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: + - = . _ : /
11662
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>`_ .
11663
- :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.
11664
11848
  :param vpc_lattice_configurations: The VPC Lattice configuration for the service being created.
11665
11849
 
11666
11850
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html
@@ -11920,7 +12104,10 @@ class CfnServiceProps:
11920
12104
 
11921
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.
11922
12106
 
11923
- 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.
11924
12111
 
11925
12112
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-capacityproviderstrategy
11926
12113
  '''
@@ -12034,6 +12221,9 @@ class CfnServiceProps:
12034
12221
  '''A list of load balancer objects to associate with the service.
12035
12222
 
12036
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.
12037
12227
 
12038
12228
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-loadbalancers
12039
12229
  '''
@@ -12060,6 +12250,9 @@ class CfnServiceProps:
12060
12250
  '''An array of placement constraint objects to use for tasks in your service.
12061
12251
 
12062
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.
12063
12256
 
12064
12257
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-placementconstraints
12065
12258
  '''
@@ -12073,6 +12266,9 @@ class CfnServiceProps:
12073
12266
  '''The placement strategy objects to use for tasks in your service.
12074
12267
 
12075
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.
12076
12272
 
12077
12273
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-placementstrategies
12078
12274
  '''
@@ -12176,7 +12372,7 @@ class CfnServiceProps:
12176
12372
 
12177
12373
  .. epigraph::
12178
12374
 
12179
- 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.
12180
12376
 
12181
12377
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-serviceregistries
12182
12378
  '''
@@ -12230,6 +12426,9 @@ class CfnServiceProps:
12230
12426
  '''The configuration for a volume specified in the task definition as a volume that is configured at launch time.
12231
12427
 
12232
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.
12233
12432
 
12234
12433
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-volumeconfigurations
12235
12434
  '''
@@ -13039,7 +13238,7 @@ class CfnTaskDefinition(
13039
13238
  disable_networking: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
13040
13239
  dns_search_domains: typing.Optional[typing.Sequence[builtins.str]] = None,
13041
13240
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
13042
- 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,
13043
13242
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
13044
13243
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
13045
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,
@@ -13558,7 +13757,7 @@ class CfnTaskDefinition(
13558
13757
  @builtins.property
13559
13758
  def docker_labels(
13560
13759
  self,
13561
- ) -> 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]]:
13562
13761
  '''A key/value map of labels to add to the container.
13563
13762
 
13564
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}}'``
@@ -13566,7 +13765,7 @@ class CfnTaskDefinition(
13566
13765
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinition.html#cfn-ecs-taskdefinition-containerdefinition-dockerlabels
13567
13766
  '''
13568
13767
  result = self._values.get("docker_labels")
13569
- 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)
13570
13769
 
13571
13770
  @builtins.property
13572
13771
  def docker_security_options(self) -> typing.Optional[typing.List[builtins.str]]:
@@ -14279,8 +14478,8 @@ class CfnTaskDefinition(
14279
14478
  *,
14280
14479
  autoprovision: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
14281
14480
  driver: typing.Optional[builtins.str] = None,
14282
- driver_opts: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
14283
- 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,
14284
14483
  scope: typing.Optional[builtins.str] = None,
14285
14484
  ) -> None:
14286
14485
  '''The ``DockerVolumeConfiguration`` property specifies a Docker volume configuration and is used when you use Docker volumes.
@@ -14362,7 +14561,7 @@ class CfnTaskDefinition(
14362
14561
  @builtins.property
14363
14562
  def driver_opts(
14364
14563
  self,
14365
- ) -> 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]]:
14366
14565
  '''A map of Docker driver-specific options passed through.
14367
14566
 
14368
14567
  This parameter maps to ``DriverOpts`` in the docker create-volume command and the ``xxopt`` option to docker volume create.
@@ -14370,12 +14569,12 @@ class CfnTaskDefinition(
14370
14569
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-dockervolumeconfiguration.html#cfn-ecs-taskdefinition-dockervolumeconfiguration-driveropts
14371
14570
  '''
14372
14571
  result = self._values.get("driver_opts")
14373
- 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)
14374
14573
 
14375
14574
  @builtins.property
14376
14575
  def labels(
14377
14576
  self,
14378
- ) -> 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]]:
14379
14578
  '''Custom metadata to add to your Docker volume.
14380
14579
 
14381
14580
  This parameter maps to ``Labels`` in the docker container create command and the ``xxlabel`` option to docker volume create.
@@ -14383,7 +14582,7 @@ class CfnTaskDefinition(
14383
14582
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-dockervolumeconfiguration.html#cfn-ecs-taskdefinition-dockervolumeconfiguration-labels
14384
14583
  '''
14385
14584
  result = self._values.get("labels")
14386
- 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)
14387
14586
 
14388
14587
  @builtins.property
14389
14588
  def scope(self) -> typing.Optional[builtins.str]:
@@ -14885,7 +15084,7 @@ class CfnTaskDefinition(
14885
15084
  def __init__(
14886
15085
  self,
14887
15086
  *,
14888
- 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,
14889
15088
  type: typing.Optional[builtins.str] = None,
14890
15089
  ) -> None:
14891
15090
  '''The FireLens configuration for the container.
@@ -14924,7 +15123,7 @@ class CfnTaskDefinition(
14924
15123
  @builtins.property
14925
15124
  def options(
14926
15125
  self,
14927
- ) -> 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]]:
14928
15127
  '''The options to use when configuring the log router.
14929
15128
 
14930
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.
@@ -14938,7 +15137,7 @@ class CfnTaskDefinition(
14938
15137
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-firelensconfiguration.html#cfn-ecs-taskdefinition-firelensconfiguration-options
14939
15138
  '''
14940
15139
  result = self._values.get("options")
14941
- 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)
14942
15141
 
14943
15142
  @builtins.property
14944
15143
  def type(self) -> typing.Optional[builtins.str]:
@@ -15338,6 +15537,14 @@ class CfnTaskDefinition(
15338
15537
 
15339
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.
15340
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
+
15341
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"``
15342
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"``
15343
15550
 
@@ -15704,7 +15911,7 @@ class CfnTaskDefinition(
15704
15911
  self,
15705
15912
  *,
15706
15913
  log_driver: builtins.str,
15707
- 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,
15708
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,
15709
15916
  ) -> None:
15710
15917
  '''The ``LogConfiguration`` property specifies log configuration options to send to a custom log driver for the container.
@@ -15772,7 +15979,7 @@ class CfnTaskDefinition(
15772
15979
  @builtins.property
15773
15980
  def options(
15774
15981
  self,
15775
- ) -> 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]]:
15776
15983
  '''The configuration options to send to the log driver.
15777
15984
 
15778
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:
@@ -15861,7 +16068,7 @@ class CfnTaskDefinition(
15861
16068
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-logconfiguration.html#cfn-ecs-taskdefinition-logconfiguration-options
15862
16069
  '''
15863
16070
  result = self._values.get("options")
15864
- 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)
15865
16072
 
15866
16073
  @builtins.property
15867
16074
  def secret_options(
@@ -16430,7 +16637,7 @@ class CfnTaskDefinition(
16430
16637
  self,
16431
16638
  *,
16432
16639
  enabled: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
16433
- 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,
16434
16641
  restart_attempt_period: typing.Optional[jsii.Number] = None,
16435
16642
  ) -> None:
16436
16643
  '''You can enable a restart policy for each container defined in your task definition, to overcome transient failures faster and maintain task availability.
@@ -16483,7 +16690,7 @@ class CfnTaskDefinition(
16483
16690
  @builtins.property
16484
16691
  def ignored_exit_codes(
16485
16692
  self,
16486
- ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[jsii.Number]]]:
16693
+ ) -> typing.Optional[typing.Union[typing.List[jsii.Number], _IResolvable_da3f097b]]:
16487
16694
  '''A list of exit codes that Amazon ECS will ignore and not attempt a restart on.
16488
16695
 
16489
16696
  You can specify a maximum of 50 container exit codes. By default, Amazon ECS does not ignore any exit codes.
@@ -16491,7 +16698,7 @@ class CfnTaskDefinition(
16491
16698
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-restartpolicy.html#cfn-ecs-taskdefinition-restartpolicy-ignoredexitcodes
16492
16699
  '''
16493
16700
  result = self._values.get("ignored_exit_codes")
16494
- 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)
16495
16702
 
16496
16703
  @builtins.property
16497
16704
  def restart_attempt_period(self) -> typing.Optional[jsii.Number]:
@@ -20337,6 +20544,7 @@ class ContainerDefinition(
20337
20544
  system_controls: typing.Optional[typing.Sequence[typing.Union["SystemControl", typing.Dict[builtins.str, typing.Any]]]] = None,
20338
20545
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
20339
20546
  user: typing.Optional[builtins.str] = None,
20547
+ version_consistency: typing.Optional["VersionConsistency"] = None,
20340
20548
  working_directory: typing.Optional[builtins.str] = None,
20341
20549
  ) -> None:
20342
20550
  '''Constructs a new instance of the ContainerDefinition class.
@@ -20381,6 +20589,7 @@ class ContainerDefinition(
20381
20589
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
20382
20590
  :param ulimits: An array of ulimits to set in the container.
20383
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
20384
20593
  :param working_directory: The working directory in which to run commands inside the container. Default: /
20385
20594
  '''
20386
20595
  if __debug__:
@@ -20426,6 +20635,7 @@ class ContainerDefinition(
20426
20635
  system_controls=system_controls,
20427
20636
  ulimits=ulimits,
20428
20637
  user=user,
20638
+ version_consistency=version_consistency,
20429
20639
  working_directory=working_directory,
20430
20640
  )
20431
20641
 
@@ -20823,6 +21033,7 @@ class ContainerDefinition(
20823
21033
  "system_controls": "systemControls",
20824
21034
  "ulimits": "ulimits",
20825
21035
  "user": "user",
21036
+ "version_consistency": "versionConsistency",
20826
21037
  "working_directory": "workingDirectory",
20827
21038
  },
20828
21039
  )
@@ -20867,6 +21078,7 @@ class ContainerDefinitionOptions:
20867
21078
  system_controls: typing.Optional[typing.Sequence[typing.Union["SystemControl", typing.Dict[builtins.str, typing.Any]]]] = None,
20868
21079
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
20869
21080
  user: typing.Optional[builtins.str] = None,
21081
+ version_consistency: typing.Optional["VersionConsistency"] = None,
20870
21082
  working_directory: typing.Optional[builtins.str] = None,
20871
21083
  ) -> None:
20872
21084
  '''
@@ -20907,6 +21119,7 @@ class ContainerDefinitionOptions:
20907
21119
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
20908
21120
  :param ulimits: An array of ulimits to set in the container.
20909
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
20910
21123
  :param working_directory: The working directory in which to run commands inside the container. Default: /
20911
21124
 
20912
21125
  :exampleMetadata: infused
@@ -20975,6 +21188,7 @@ class ContainerDefinitionOptions:
20975
21188
  check_type(argname="argument system_controls", value=system_controls, expected_type=type_hints["system_controls"])
20976
21189
  check_type(argname="argument ulimits", value=ulimits, expected_type=type_hints["ulimits"])
20977
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"])
20978
21192
  check_type(argname="argument working_directory", value=working_directory, expected_type=type_hints["working_directory"])
20979
21193
  self._values: typing.Dict[builtins.str, typing.Any] = {
20980
21194
  "image": image,
@@ -21051,6 +21265,8 @@ class ContainerDefinitionOptions:
21051
21265
  self._values["ulimits"] = ulimits
21052
21266
  if user is not None:
21053
21267
  self._values["user"] = user
21268
+ if version_consistency is not None:
21269
+ self._values["version_consistency"] = version_consistency
21054
21270
  if working_directory is not None:
21055
21271
  self._values["working_directory"] = working_directory
21056
21272
 
@@ -21461,6 +21677,21 @@ class ContainerDefinitionOptions:
21461
21677
  result = self._values.get("user")
21462
21678
  return typing.cast(typing.Optional[builtins.str], result)
21463
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
+
21464
21695
  @builtins.property
21465
21696
  def working_directory(self) -> typing.Optional[builtins.str]:
21466
21697
  '''The working directory in which to run commands inside the container.
@@ -21523,6 +21754,7 @@ class ContainerDefinitionOptions:
21523
21754
  "system_controls": "systemControls",
21524
21755
  "ulimits": "ulimits",
21525
21756
  "user": "user",
21757
+ "version_consistency": "versionConsistency",
21526
21758
  "working_directory": "workingDirectory",
21527
21759
  "task_definition": "taskDefinition",
21528
21760
  },
@@ -21568,6 +21800,7 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
21568
21800
  system_controls: typing.Optional[typing.Sequence[typing.Union["SystemControl", typing.Dict[builtins.str, typing.Any]]]] = None,
21569
21801
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
21570
21802
  user: typing.Optional[builtins.str] = None,
21803
+ version_consistency: typing.Optional["VersionConsistency"] = None,
21571
21804
  working_directory: typing.Optional[builtins.str] = None,
21572
21805
  task_definition: "TaskDefinition",
21573
21806
  ) -> None:
@@ -21610,6 +21843,7 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
21610
21843
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
21611
21844
  :param ulimits: An array of ulimits to set in the container.
21612
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
21613
21847
  :param working_directory: The working directory in which to run commands inside the container. Default: /
21614
21848
  :param task_definition: The name of the task definition that includes this container definition. [disable-awslint:ref-via-interface]
21615
21849
 
@@ -21704,6 +21938,7 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
21704
21938
  soft_limit=123
21705
21939
  )],
21706
21940
  user="user",
21941
+ version_consistency=ecs.VersionConsistency.ENABLED,
21707
21942
  working_directory="workingDirectory"
21708
21943
  )
21709
21944
  '''
@@ -21748,6 +21983,7 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
21748
21983
  check_type(argname="argument system_controls", value=system_controls, expected_type=type_hints["system_controls"])
21749
21984
  check_type(argname="argument ulimits", value=ulimits, expected_type=type_hints["ulimits"])
21750
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"])
21751
21987
  check_type(argname="argument working_directory", value=working_directory, expected_type=type_hints["working_directory"])
21752
21988
  check_type(argname="argument task_definition", value=task_definition, expected_type=type_hints["task_definition"])
21753
21989
  self._values: typing.Dict[builtins.str, typing.Any] = {
@@ -21826,6 +22062,8 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
21826
22062
  self._values["ulimits"] = ulimits
21827
22063
  if user is not None:
21828
22064
  self._values["user"] = user
22065
+ if version_consistency is not None:
22066
+ self._values["version_consistency"] = version_consistency
21829
22067
  if working_directory is not None:
21830
22068
  self._values["working_directory"] = working_directory
21831
22069
 
@@ -22236,6 +22474,21 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
22236
22474
  result = self._values.get("user")
22237
22475
  return typing.cast(typing.Optional[builtins.str], result)
22238
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
+
22239
22492
  @builtins.property
22240
22493
  def working_directory(self) -> typing.Optional[builtins.str]:
22241
22494
  '''The working directory in which to run commands inside the container.
@@ -23999,6 +24252,7 @@ class Ec2ServiceAttributes:
23999
24252
  "volume_configurations": "volumeConfigurations",
24000
24253
  "task_definition": "taskDefinition",
24001
24254
  "assign_public_ip": "assignPublicIp",
24255
+ "availability_zone_rebalancing": "availabilityZoneRebalancing",
24002
24256
  "daemon": "daemon",
24003
24257
  "placement_constraints": "placementConstraints",
24004
24258
  "placement_strategies": "placementStrategies",
@@ -24029,6 +24283,7 @@ class Ec2ServiceProps(BaseServiceOptions):
24029
24283
  volume_configurations: typing.Optional[typing.Sequence["ServiceManagedVolume"]] = None,
24030
24284
  task_definition: "TaskDefinition",
24031
24285
  assign_public_ip: typing.Optional[builtins.bool] = None,
24286
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
24032
24287
  daemon: typing.Optional[builtins.bool] = None,
24033
24288
  placement_constraints: typing.Optional[typing.Sequence["PlacementConstraint"]] = None,
24034
24289
  placement_strategies: typing.Optional[typing.Sequence["PlacementStrategy"]] = None,
@@ -24056,6 +24311,7 @@ class Ec2ServiceProps(BaseServiceOptions):
24056
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
24057
24312
  :param task_definition: The task definition to use for tasks in the service. [disable-awslint:ref-via-interface]
24058
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
24059
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
24060
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.
24061
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.
@@ -24112,6 +24368,7 @@ class Ec2ServiceProps(BaseServiceOptions):
24112
24368
  check_type(argname="argument volume_configurations", value=volume_configurations, expected_type=type_hints["volume_configurations"])
24113
24369
  check_type(argname="argument task_definition", value=task_definition, expected_type=type_hints["task_definition"])
24114
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"])
24115
24372
  check_type(argname="argument daemon", value=daemon, expected_type=type_hints["daemon"])
24116
24373
  check_type(argname="argument placement_constraints", value=placement_constraints, expected_type=type_hints["placement_constraints"])
24117
24374
  check_type(argname="argument placement_strategies", value=placement_strategies, expected_type=type_hints["placement_strategies"])
@@ -24155,6 +24412,8 @@ class Ec2ServiceProps(BaseServiceOptions):
24155
24412
  self._values["volume_configurations"] = volume_configurations
24156
24413
  if assign_public_ip is not None:
24157
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
24158
24417
  if daemon is not None:
24159
24418
  self._values["daemon"] = daemon
24160
24419
  if placement_constraints is not None:
@@ -24364,6 +24623,24 @@ class Ec2ServiceProps(BaseServiceOptions):
24364
24623
  result = self._values.get("assign_public_ip")
24365
24624
  return typing.cast(typing.Optional[builtins.bool], result)
24366
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
+
24367
24644
  @builtins.property
24368
24645
  def daemon(self) -> typing.Optional[builtins.bool]:
24369
24646
  '''Specifies whether the service will use the daemon scheduling strategy.
@@ -25941,6 +26218,7 @@ class ExternalServiceAttributes:
25941
26218
  "task_definition_revision": "taskDefinitionRevision",
25942
26219
  "volume_configurations": "volumeConfigurations",
25943
26220
  "task_definition": "taskDefinition",
26221
+ "daemon": "daemon",
25944
26222
  "security_groups": "securityGroups",
25945
26223
  },
25946
26224
  )
@@ -25966,6 +26244,7 @@ class ExternalServiceProps(BaseServiceOptions):
25966
26244
  task_definition_revision: typing.Optional["TaskDefinitionRevision"] = None,
25967
26245
  volume_configurations: typing.Optional[typing.Sequence["ServiceManagedVolume"]] = None,
25968
26246
  task_definition: "TaskDefinition",
26247
+ daemon: typing.Optional[builtins.bool] = None,
25969
26248
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
25970
26249
  ) -> None:
25971
26250
  '''The properties for defining a service using the External launch type.
@@ -25988,6 +26267,7 @@ class ExternalServiceProps(BaseServiceOptions):
25988
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
25989
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
25990
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
25991
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.
25992
26272
 
25993
26273
  :exampleMetadata: infused
@@ -25998,11 +26278,16 @@ class ExternalServiceProps(BaseServiceOptions):
25998
26278
  # task_definition: ecs.TaskDefinition
25999
26279
 
26000
26280
 
26001
- service = ecs.ExternalService(self, "Service",
26281
+ ecs.Ec2Service(self, "Ec2Service",
26002
26282
  cluster=cluster,
26003
26283
  task_definition=task_definition,
26004
- desired_count=5,
26005
- 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
26006
26291
  )
26007
26292
  '''
26008
26293
  if isinstance(circuit_breaker, dict):
@@ -26035,6 +26320,7 @@ class ExternalServiceProps(BaseServiceOptions):
26035
26320
  check_type(argname="argument task_definition_revision", value=task_definition_revision, expected_type=type_hints["task_definition_revision"])
26036
26321
  check_type(argname="argument volume_configurations", value=volume_configurations, expected_type=type_hints["volume_configurations"])
26037
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"])
26038
26324
  check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
26039
26325
  self._values: typing.Dict[builtins.str, typing.Any] = {
26040
26326
  "cluster": cluster,
@@ -26072,6 +26358,8 @@ class ExternalServiceProps(BaseServiceOptions):
26072
26358
  self._values["task_definition_revision"] = task_definition_revision
26073
26359
  if volume_configurations is not None:
26074
26360
  self._values["volume_configurations"] = volume_configurations
26361
+ if daemon is not None:
26362
+ self._values["daemon"] = daemon
26075
26363
  if security_groups is not None:
26076
26364
  self._values["security_groups"] = security_groups
26077
26365
 
@@ -26260,6 +26548,20 @@ class ExternalServiceProps(BaseServiceOptions):
26260
26548
  assert result is not None, "Required property 'task_definition' is missing"
26261
26549
  return typing.cast("TaskDefinition", result)
26262
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
+
26263
26565
  @builtins.property
26264
26566
  def security_groups(self) -> typing.Optional[typing.List[_ISecurityGroup_acf8a799]]:
26265
26567
  '''The security groups to associate with the service.
@@ -26761,6 +27063,7 @@ class FargateServiceAttributes:
26761
27063
  "volume_configurations": "volumeConfigurations",
26762
27064
  "task_definition": "taskDefinition",
26763
27065
  "assign_public_ip": "assignPublicIp",
27066
+ "availability_zone_rebalancing": "availabilityZoneRebalancing",
26764
27067
  "platform_version": "platformVersion",
26765
27068
  "security_groups": "securityGroups",
26766
27069
  "vpc_subnets": "vpcSubnets",
@@ -26789,6 +27092,7 @@ class FargateServiceProps(BaseServiceOptions):
26789
27092
  volume_configurations: typing.Optional[typing.Sequence["ServiceManagedVolume"]] = None,
26790
27093
  task_definition: "TaskDefinition",
26791
27094
  assign_public_ip: typing.Optional[builtins.bool] = None,
27095
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
26792
27096
  platform_version: typing.Optional[FargatePlatformVersion] = None,
26793
27097
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
26794
27098
  vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -26814,6 +27118,7 @@ class FargateServiceProps(BaseServiceOptions):
26814
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
26815
27119
  :param task_definition: The task definition to use for tasks in the service. [disable-awslint:ref-via-interface]
26816
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
26817
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
26818
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.
26819
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.
@@ -26822,34 +27127,22 @@ class FargateServiceProps(BaseServiceOptions):
26822
27127
 
26823
27128
  Example::
26824
27129
 
26825
- import aws_cdk.aws_cloudwatch as cw
26826
-
26827
27130
  # cluster: ecs.Cluster
26828
27131
  # task_definition: ecs.TaskDefinition
26829
- # elb_alarm: cw.Alarm
27132
+ # vpc: ec2.Vpc
26830
27133
 
27134
+ service = ecs.FargateService(self, "Service", cluster=cluster, task_definition=task_definition, min_healthy_percent=100)
26831
27135
 
26832
- service = ecs.FargateService(self, "Service",
26833
- cluster=cluster,
26834
- task_definition=task_definition,
26835
- min_healthy_percent=100,
26836
- deployment_alarms=ecs.DeploymentAlarmConfig(
26837
- alarm_names=[elb_alarm.alarm_name],
26838
- 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
26839
27144
  )
26840
27145
  )
26841
-
26842
- # Defining a deployment alarm after the service has been created
26843
- cpu_alarm_name = "MyCpuMetricAlarm"
26844
- cw.Alarm(self, "CPUAlarm",
26845
- alarm_name=cpu_alarm_name,
26846
- metric=service.metric_cpu_utilization(),
26847
- evaluation_periods=2,
26848
- threshold=80
26849
- )
26850
- service.enable_deployment_alarms([cpu_alarm_name],
26851
- behavior=ecs.AlarmBehavior.FAIL_ON_ALARM
26852
- )
26853
27146
  '''
26854
27147
  if isinstance(circuit_breaker, dict):
26855
27148
  circuit_breaker = DeploymentCircuitBreaker(**circuit_breaker)
@@ -26884,6 +27177,7 @@ class FargateServiceProps(BaseServiceOptions):
26884
27177
  check_type(argname="argument volume_configurations", value=volume_configurations, expected_type=type_hints["volume_configurations"])
26885
27178
  check_type(argname="argument task_definition", value=task_definition, expected_type=type_hints["task_definition"])
26886
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"])
26887
27181
  check_type(argname="argument platform_version", value=platform_version, expected_type=type_hints["platform_version"])
26888
27182
  check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
26889
27183
  check_type(argname="argument vpc_subnets", value=vpc_subnets, expected_type=type_hints["vpc_subnets"])
@@ -26925,6 +27219,8 @@ class FargateServiceProps(BaseServiceOptions):
26925
27219
  self._values["volume_configurations"] = volume_configurations
26926
27220
  if assign_public_ip is not None:
26927
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
26928
27224
  if platform_version is not None:
26929
27225
  self._values["platform_version"] = platform_version
26930
27226
  if security_groups is not None:
@@ -27128,6 +27424,22 @@ class FargateServiceProps(BaseServiceOptions):
27128
27424
  result = self._values.get("assign_public_ip")
27129
27425
  return typing.cast(typing.Optional[builtins.bool], result)
27130
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
+
27131
27443
  @builtins.property
27132
27444
  def platform_version(self) -> typing.Optional[FargatePlatformVersion]:
27133
27445
  '''The platform version on which to run your service.
@@ -27963,6 +28275,7 @@ class FirelensLogRouter(
27963
28275
  soft_limit=123
27964
28276
  )],
27965
28277
  user="user",
28278
+ version_consistency=ecs.VersionConsistency.ENABLED,
27966
28279
  working_directory="workingDirectory"
27967
28280
  )
27968
28281
  '''
@@ -28011,6 +28324,7 @@ class FirelensLogRouter(
28011
28324
  system_controls: typing.Optional[typing.Sequence[typing.Union["SystemControl", typing.Dict[builtins.str, typing.Any]]]] = None,
28012
28325
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
28013
28326
  user: typing.Optional[builtins.str] = None,
28327
+ version_consistency: typing.Optional["VersionConsistency"] = None,
28014
28328
  working_directory: typing.Optional[builtins.str] = None,
28015
28329
  ) -> None:
28016
28330
  '''Constructs a new instance of the FirelensLogRouter class.
@@ -28056,6 +28370,7 @@ class FirelensLogRouter(
28056
28370
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
28057
28371
  :param ulimits: An array of ulimits to set in the container.
28058
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
28059
28374
  :param working_directory: The working directory in which to run commands inside the container. Default: /
28060
28375
  '''
28061
28376
  if __debug__:
@@ -28102,6 +28417,7 @@ class FirelensLogRouter(
28102
28417
  system_controls=system_controls,
28103
28418
  ulimits=ulimits,
28104
28419
  user=user,
28420
+ version_consistency=version_consistency,
28105
28421
  working_directory=working_directory,
28106
28422
  )
28107
28423
 
@@ -28169,6 +28485,7 @@ class FirelensLogRouter(
28169
28485
  "system_controls": "systemControls",
28170
28486
  "ulimits": "ulimits",
28171
28487
  "user": "user",
28488
+ "version_consistency": "versionConsistency",
28172
28489
  "working_directory": "workingDirectory",
28173
28490
  "firelens_config": "firelensConfig",
28174
28491
  },
@@ -28214,6 +28531,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28214
28531
  system_controls: typing.Optional[typing.Sequence[typing.Union["SystemControl", typing.Dict[builtins.str, typing.Any]]]] = None,
28215
28532
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
28216
28533
  user: typing.Optional[builtins.str] = None,
28534
+ version_consistency: typing.Optional["VersionConsistency"] = None,
28217
28535
  working_directory: typing.Optional[builtins.str] = None,
28218
28536
  firelens_config: typing.Union[FirelensConfig, typing.Dict[builtins.str, typing.Any]],
28219
28537
  ) -> None:
@@ -28256,6 +28574,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28256
28574
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
28257
28575
  :param ulimits: An array of ulimits to set in the container.
28258
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
28259
28578
  :param working_directory: The working directory in which to run commands inside the container. Default: /
28260
28579
  :param firelens_config: Firelens configuration.
28261
28580
 
@@ -28358,6 +28677,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28358
28677
  soft_limit=123
28359
28678
  )],
28360
28679
  user="user",
28680
+ version_consistency=ecs.VersionConsistency.ENABLED,
28361
28681
  working_directory="workingDirectory"
28362
28682
  )
28363
28683
  '''
@@ -28404,6 +28724,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28404
28724
  check_type(argname="argument system_controls", value=system_controls, expected_type=type_hints["system_controls"])
28405
28725
  check_type(argname="argument ulimits", value=ulimits, expected_type=type_hints["ulimits"])
28406
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"])
28407
28728
  check_type(argname="argument working_directory", value=working_directory, expected_type=type_hints["working_directory"])
28408
28729
  check_type(argname="argument firelens_config", value=firelens_config, expected_type=type_hints["firelens_config"])
28409
28730
  self._values: typing.Dict[builtins.str, typing.Any] = {
@@ -28482,6 +28803,8 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28482
28803
  self._values["ulimits"] = ulimits
28483
28804
  if user is not None:
28484
28805
  self._values["user"] = user
28806
+ if version_consistency is not None:
28807
+ self._values["version_consistency"] = version_consistency
28485
28808
  if working_directory is not None:
28486
28809
  self._values["working_directory"] = working_directory
28487
28810
 
@@ -28892,6 +29215,21 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28892
29215
  result = self._values.get("user")
28893
29216
  return typing.cast(typing.Optional[builtins.str], result)
28894
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
+
28895
29233
  @builtins.property
28896
29234
  def working_directory(self) -> typing.Optional[builtins.str]:
28897
29235
  '''The working directory in which to run commands inside the container.
@@ -28961,6 +29299,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
28961
29299
  "system_controls": "systemControls",
28962
29300
  "ulimits": "ulimits",
28963
29301
  "user": "user",
29302
+ "version_consistency": "versionConsistency",
28964
29303
  "working_directory": "workingDirectory",
28965
29304
  "task_definition": "taskDefinition",
28966
29305
  "firelens_config": "firelensConfig",
@@ -29007,6 +29346,7 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
29007
29346
  system_controls: typing.Optional[typing.Sequence[typing.Union["SystemControl", typing.Dict[builtins.str, typing.Any]]]] = None,
29008
29347
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
29009
29348
  user: typing.Optional[builtins.str] = None,
29349
+ version_consistency: typing.Optional["VersionConsistency"] = None,
29010
29350
  working_directory: typing.Optional[builtins.str] = None,
29011
29351
  task_definition: "TaskDefinition",
29012
29352
  firelens_config: typing.Union[FirelensConfig, typing.Dict[builtins.str, typing.Any]],
@@ -29050,6 +29390,7 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
29050
29390
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
29051
29391
  :param ulimits: An array of ulimits to set in the container.
29052
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
29053
29394
  :param working_directory: The working directory in which to run commands inside the container. Default: /
29054
29395
  :param task_definition: The name of the task definition that includes this container definition. [disable-awslint:ref-via-interface]
29055
29396
  :param firelens_config: Firelens configuration.
@@ -29155,6 +29496,7 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
29155
29496
  soft_limit=123
29156
29497
  )],
29157
29498
  user="user",
29499
+ version_consistency=ecs.VersionConsistency.ENABLED,
29158
29500
  working_directory="workingDirectory"
29159
29501
  )
29160
29502
  '''
@@ -29201,6 +29543,7 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
29201
29543
  check_type(argname="argument system_controls", value=system_controls, expected_type=type_hints["system_controls"])
29202
29544
  check_type(argname="argument ulimits", value=ulimits, expected_type=type_hints["ulimits"])
29203
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"])
29204
29547
  check_type(argname="argument working_directory", value=working_directory, expected_type=type_hints["working_directory"])
29205
29548
  check_type(argname="argument task_definition", value=task_definition, expected_type=type_hints["task_definition"])
29206
29549
  check_type(argname="argument firelens_config", value=firelens_config, expected_type=type_hints["firelens_config"])
@@ -29281,6 +29624,8 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
29281
29624
  self._values["ulimits"] = ulimits
29282
29625
  if user is not None:
29283
29626
  self._values["user"] = user
29627
+ if version_consistency is not None:
29628
+ self._values["version_consistency"] = version_consistency
29284
29629
  if working_directory is not None:
29285
29630
  self._values["working_directory"] = working_directory
29286
29631
 
@@ -29691,6 +30036,21 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
29691
30036
  result = self._values.get("user")
29692
30037
  return typing.cast(typing.Optional[builtins.str], result)
29693
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
+
29694
30054
  @builtins.property
29695
30055
  def working_directory(self) -> typing.Optional[builtins.str]:
29696
30056
  '''The working directory in which to run commands inside the container.
@@ -34908,6 +35268,7 @@ class ServiceConnectProps:
34908
35268
  "ingress_port_override": "ingressPortOverride",
34909
35269
  "per_request_timeout": "perRequestTimeout",
34910
35270
  "port": "port",
35271
+ "tls": "tls",
34911
35272
  },
34912
35273
  )
34913
35274
  class ServiceConnectService:
@@ -34921,6 +35282,7 @@ class ServiceConnectService:
34921
35282
  ingress_port_override: typing.Optional[jsii.Number] = None,
34922
35283
  per_request_timeout: typing.Optional[_Duration_4839e8c3] = None,
34923
35284
  port: typing.Optional[jsii.Number] = None,
35285
+ tls: typing.Optional[typing.Union["ServiceConnectTlsConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
34924
35286
  ) -> None:
34925
35287
  '''Interface for service connect Service props.
34926
35288
 
@@ -34931,6 +35293,7 @@ class ServiceConnectService:
34931
35293
  :param ingress_port_override: Optional. The port on the Service Connect agent container to use for traffic ingress to this service. Default: - none
34932
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)
34933
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
34934
35297
 
34935
35298
  :exampleMetadata: fixture=_generated
34936
35299
 
@@ -34940,6 +35303,11 @@ class ServiceConnectService:
34940
35303
  # The values are placeholders you should change.
34941
35304
  import aws_cdk as cdk
34942
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
34943
35311
 
34944
35312
  service_connect_service = ecs.ServiceConnectService(
34945
35313
  port_mapping_name="portMappingName",
@@ -34950,9 +35318,16 @@ class ServiceConnectService:
34950
35318
  idle_timeout=cdk.Duration.minutes(30),
34951
35319
  ingress_port_override=123,
34952
35320
  per_request_timeout=cdk.Duration.minutes(30),
34953
- port=123
35321
+ port=123,
35322
+ tls=ecs.ServiceConnectTlsConfiguration(
35323
+ aws_pca_authority_arn="awsPcaAuthorityArn",
35324
+ kms_key=key,
35325
+ role=role
35326
+ )
34954
35327
  )
34955
35328
  '''
35329
+ if isinstance(tls, dict):
35330
+ tls = ServiceConnectTlsConfiguration(**tls)
34956
35331
  if __debug__:
34957
35332
  type_hints = typing.get_type_hints(_typecheckingstub__5fc70dc513eac25b19e79ac6e7ba5dc61662a4299bbba170094fabb95b271fd0)
34958
35333
  check_type(argname="argument port_mapping_name", value=port_mapping_name, expected_type=type_hints["port_mapping_name"])
@@ -34962,6 +35337,7 @@ class ServiceConnectService:
34962
35337
  check_type(argname="argument ingress_port_override", value=ingress_port_override, expected_type=type_hints["ingress_port_override"])
34963
35338
  check_type(argname="argument per_request_timeout", value=per_request_timeout, expected_type=type_hints["per_request_timeout"])
34964
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"])
34965
35341
  self._values: typing.Dict[builtins.str, typing.Any] = {
34966
35342
  "port_mapping_name": port_mapping_name,
34967
35343
  }
@@ -34977,6 +35353,8 @@ class ServiceConnectService:
34977
35353
  self._values["per_request_timeout"] = per_request_timeout
34978
35354
  if port is not None:
34979
35355
  self._values["port"] = port
35356
+ if tls is not None:
35357
+ self._values["tls"] = tls
34980
35358
 
34981
35359
  @builtins.property
34982
35360
  def port_mapping_name(self) -> builtins.str:
@@ -35057,6 +35435,15 @@ class ServiceConnectService:
35057
35435
  result = self._values.get("port")
35058
35436
  return typing.cast(typing.Optional[jsii.Number], result)
35059
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
+
35060
35447
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
35061
35448
  return isinstance(rhs, self.__class__) and rhs._values == self._values
35062
35449
 
@@ -35069,6 +35456,108 @@ class ServiceConnectService:
35069
35456
  )
35070
35457
 
35071
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
+
35072
35561
  @jsii.data_type(
35073
35562
  jsii_type="aws-cdk-lib.aws_ecs.ServiceManagedEBSVolumeConfiguration",
35074
35563
  jsii_struct_bases=[],
@@ -36646,20 +37135,32 @@ class TaskDefinition(
36646
37135
 
36647
37136
  Example::
36648
37137
 
36649
- # cluster: ecs.Cluster
36650
37138
  # task_definition: ecs.TaskDefinition
36651
- # vpc: ec2.Vpc
37139
+ # cluster: ecs.Cluster
36652
37140
 
36653
- service = ecs.FargateService(self, "Service", cluster=cluster, task_definition=task_definition, min_healthy_percent=100)
36654
37141
 
36655
- lb = elbv2.ApplicationLoadBalancer(self, "LB", vpc=vpc, internet_facing=True)
36656
- listener = lb.add_listener("Listener", port=80)
36657
- service.register_load_balancer_targets(
36658
- container_name="web",
36659
- container_port=80,
36660
- new_target_group_id="ECS",
36661
- listener=ecs.ListenerConfig.application_listener(listener,
36662
- 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
36663
37164
  )
36664
37165
  )
36665
37166
  '''
@@ -36690,10 +37191,10 @@ class TaskDefinition(
36690
37191
 
36691
37192
  :param scope: -
36692
37193
  :param id: -
36693
- :param compatibility: The task launch type compatiblity requirement.
37194
+ :param compatibility: The task launch type compatibility requirement.
36694
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.
36695
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.
36696
- :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.
36697
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
36698
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.
36699
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.
@@ -36834,6 +37335,7 @@ class TaskDefinition(
36834
37335
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
36835
37336
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
36836
37337
  user: typing.Optional[builtins.str] = None,
37338
+ version_consistency: typing.Optional["VersionConsistency"] = None,
36837
37339
  working_directory: typing.Optional[builtins.str] = None,
36838
37340
  ) -> ContainerDefinition:
36839
37341
  '''Adds a new container to the task definition.
@@ -36876,6 +37378,7 @@ class TaskDefinition(
36876
37378
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
36877
37379
  :param ulimits: An array of ulimits to set in the container.
36878
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
36879
37382
  :param working_directory: The working directory in which to run commands inside the container. Default: /
36880
37383
  '''
36881
37384
  if __debug__:
@@ -36919,6 +37422,7 @@ class TaskDefinition(
36919
37422
  system_controls=system_controls,
36920
37423
  ulimits=ulimits,
36921
37424
  user=user,
37425
+ version_consistency=version_consistency,
36922
37426
  working_directory=working_directory,
36923
37427
  )
36924
37428
 
@@ -36981,6 +37485,7 @@ class TaskDefinition(
36981
37485
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
36982
37486
  ulimits: typing.Optional[typing.Sequence[typing.Union["Ulimit", typing.Dict[builtins.str, typing.Any]]]] = None,
36983
37487
  user: typing.Optional[builtins.str] = None,
37488
+ version_consistency: typing.Optional["VersionConsistency"] = None,
36984
37489
  working_directory: typing.Optional[builtins.str] = None,
36985
37490
  ) -> FirelensLogRouter:
36986
37491
  '''Adds a firelens log router to the task definition.
@@ -37024,6 +37529,7 @@ class TaskDefinition(
37024
37529
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
37025
37530
  :param ulimits: An array of ulimits to set in the container.
37026
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
37027
37533
  :param working_directory: The working directory in which to run commands inside the container. Default: /
37028
37534
  '''
37029
37535
  if __debug__:
@@ -37068,6 +37574,7 @@ class TaskDefinition(
37068
37574
  system_controls=system_controls,
37069
37575
  ulimits=ulimits,
37070
37576
  user=user,
37577
+ version_consistency=version_consistency,
37071
37578
  working_directory=working_directory,
37072
37579
  )
37073
37580
 
@@ -37080,10 +37587,14 @@ class TaskDefinition(
37080
37587
  device_name: typing.Optional[builtins.str] = None,
37081
37588
  device_type: typing.Optional[builtins.str] = None,
37082
37589
  ) -> None:
37083
- '''Adds an inference accelerator to the task definition.
37590
+ '''(deprecated) Adds an inference accelerator to the task definition.
37084
37591
 
37085
37592
  :param device_name: The Elastic Inference accelerator device name. Default: - empty
37086
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
37087
37598
  '''
37088
37599
  inference_accelerator = InferenceAccelerator(
37089
37600
  device_name=device_name, device_type=device_type
@@ -37502,10 +38013,10 @@ class TaskDefinitionProps(CommonTaskDefinitionProps):
37502
38013
  :param proxy_configuration: The configuration details for the App Mesh proxy. Default: - No proxy configuration.
37503
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.
37504
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.
37505
- :param compatibility: The task launch type compatiblity requirement.
38016
+ :param compatibility: The task launch type compatibility requirement.
37506
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.
37507
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.
37508
- :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.
37509
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
37510
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.
37511
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.
@@ -37666,7 +38177,7 @@ class TaskDefinitionProps(CommonTaskDefinitionProps):
37666
38177
 
37667
38178
  @builtins.property
37668
38179
  def compatibility(self) -> Compatibility:
37669
- '''The task launch type compatiblity requirement.'''
38180
+ '''The task launch type compatibility requirement.'''
37670
38181
  result = self._values.get("compatibility")
37671
38182
  assert result is not None, "Required property 'compatibility' is missing"
37672
38183
  return typing.cast(Compatibility, result)
@@ -37713,11 +38224,15 @@ class TaskDefinitionProps(CommonTaskDefinitionProps):
37713
38224
  def inference_accelerators(
37714
38225
  self,
37715
38226
  ) -> typing.Optional[typing.List[InferenceAccelerator]]:
37716
- '''The inference accelerators to use for the containers in the task.
38227
+ '''(deprecated) The inference accelerators to use for the containers in the task.
37717
38228
 
37718
38229
  Not supported in Fargate.
37719
38230
 
37720
38231
  :default: - No inference accelerators.
38232
+
38233
+ :deprecated: ECS TaskDefinition's inferenceAccelerator is EOL since April 2024
38234
+
38235
+ :stability: deprecated
37721
38236
  '''
37722
38237
  result = self._values.get("inference_accelerators")
37723
38238
  return typing.cast(typing.Optional[typing.List[InferenceAccelerator]], result)
@@ -38299,6 +38814,28 @@ class UlimitName(enum.Enum):
38299
38814
  STACK = "STACK"
38300
38815
 
38301
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
+
38302
38839
  @jsii.data_type(
38303
38840
  jsii_type="aws-cdk-lib.aws_ecs.Volume",
38304
38841
  jsii_struct_bases=[],
@@ -39407,7 +39944,7 @@ class Cluster(
39407
39944
  statistic: typing.Optional[builtins.str] = None,
39408
39945
  unit: typing.Optional[_Unit_61bc6f70] = None,
39409
39946
  ) -> _Metric_e396a4dc:
39410
- '''This method returns the specifed CloudWatch metric for this cluster.
39947
+ '''This method returns the specified CloudWatch metric for this cluster.
39411
39948
 
39412
39949
  :param metric_name: -
39413
39950
  :param account: Account which this metric comes from. Default: - Deployment account.
@@ -40510,7 +41047,7 @@ class BaseService(
40510
41047
 
40511
41048
  Don't call this. Call ``loadBalancer.addTarget()`` instead.
40512
41049
 
40513
- :param load_balancer: -
41050
+ :param load_balancer: [disable-awslint:ref-via-interface].
40514
41051
  '''
40515
41052
  if __debug__:
40516
41053
  type_hints = typing.get_type_hints(_typecheckingstub__56ff5a0e2823e80ea268c7defc428085c67b793cb31e88397d625cd6370439a1)
@@ -41038,6 +41575,7 @@ class Ec2Service(
41038
41575
  *,
41039
41576
  task_definition: TaskDefinition,
41040
41577
  assign_public_ip: typing.Optional[builtins.bool] = None,
41578
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
41041
41579
  daemon: typing.Optional[builtins.bool] = None,
41042
41580
  placement_constraints: typing.Optional[typing.Sequence[PlacementConstraint]] = None,
41043
41581
  placement_strategies: typing.Optional[typing.Sequence[PlacementStrategy]] = None,
@@ -41067,6 +41605,7 @@ class Ec2Service(
41067
41605
  :param id: -
41068
41606
  :param task_definition: The task definition to use for tasks in the service. [disable-awslint:ref-via-interface]
41069
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
41070
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
41071
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.
41072
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.
@@ -41097,6 +41636,7 @@ class Ec2Service(
41097
41636
  props = Ec2ServiceProps(
41098
41637
  task_definition=task_definition,
41099
41638
  assign_public_ip=assign_public_ip,
41639
+ availability_zone_rebalancing=availability_zone_rebalancing,
41100
41640
  daemon=daemon,
41101
41641
  placement_constraints=placement_constraints,
41102
41642
  placement_strategies=placement_strategies,
@@ -41201,6 +41741,21 @@ class Ec2Service(
41201
41741
  check_type(argname="argument strategies", value=strategies, expected_type=typing.Tuple[type_hints["strategies"], ...]) # pyright: ignore [reportGeneralTypeIssues]
41202
41742
  return typing.cast(None, jsii.invoke(self, "addPlacementStrategies", [*strategies]))
41203
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
+
41204
41759
 
41205
41760
  @jsii.implements(IEc2TaskDefinition)
41206
41761
  class Ec2TaskDefinition(
@@ -41380,6 +41935,7 @@ class Ec2TaskDefinition(
41380
41935
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
41381
41936
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
41382
41937
  user: typing.Optional[builtins.str] = None,
41938
+ version_consistency: typing.Optional[VersionConsistency] = None,
41383
41939
  working_directory: typing.Optional[builtins.str] = None,
41384
41940
  ) -> ContainerDefinition:
41385
41941
  '''Tasks running in AWSVPC networking mode requires an additional environment variable for the region to be sourced.
@@ -41424,6 +41980,7 @@ class Ec2TaskDefinition(
41424
41980
  :param system_controls: A list of namespaced kernel parameters to set in the container. Default: - No system controls are set.
41425
41981
  :param ulimits: An array of ulimits to set in the container.
41426
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
41427
41984
  :param working_directory: The working directory in which to run commands inside the container. Default: /
41428
41985
  '''
41429
41986
  if __debug__:
@@ -41467,6 +42024,7 @@ class Ec2TaskDefinition(
41467
42024
  system_controls=system_controls,
41468
42025
  ulimits=ulimits,
41469
42026
  user=user,
42027
+ version_consistency=version_consistency,
41470
42028
  working_directory=working_directory,
41471
42029
  )
41472
42030
 
@@ -41490,11 +42048,16 @@ class ExternalService(
41490
42048
  # task_definition: ecs.TaskDefinition
41491
42049
 
41492
42050
 
41493
- service = ecs.ExternalService(self, "Service",
42051
+ ecs.Ec2Service(self, "Ec2Service",
41494
42052
  cluster=cluster,
41495
42053
  task_definition=task_definition,
41496
- desired_count=5,
41497
- 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
41498
42061
  )
41499
42062
  '''
41500
42063
 
@@ -41504,6 +42067,7 @@ class ExternalService(
41504
42067
  id: builtins.str,
41505
42068
  *,
41506
42069
  task_definition: TaskDefinition,
42070
+ daemon: typing.Optional[builtins.bool] = None,
41507
42071
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
41508
42072
  cluster: ICluster,
41509
42073
  capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
@@ -41528,6 +42092,7 @@ class ExternalService(
41528
42092
  :param scope: -
41529
42093
  :param id: -
41530
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
41531
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.
41532
42097
  :param cluster: The name of the cluster that hosts the service.
41533
42098
  :param capacity_provider_strategies: A list of Capacity Provider strategies used to place a service. Default: - undefined
@@ -41553,6 +42118,7 @@ class ExternalService(
41553
42118
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
41554
42119
  props = ExternalServiceProps(
41555
42120
  task_definition=task_definition,
42121
+ daemon=daemon,
41556
42122
  security_groups=security_groups,
41557
42123
  cluster=cluster,
41558
42124
  capacity_provider_strategies=capacity_provider_strategies,
@@ -41918,34 +42484,22 @@ class FargateService(
41918
42484
 
41919
42485
  Example::
41920
42486
 
41921
- import aws_cdk.aws_cloudwatch as cw
41922
-
41923
42487
  # cluster: ecs.Cluster
41924
42488
  # task_definition: ecs.TaskDefinition
41925
- # elb_alarm: cw.Alarm
42489
+ # vpc: ec2.Vpc
41926
42490
 
42491
+ service = ecs.FargateService(self, "Service", cluster=cluster, task_definition=task_definition, min_healthy_percent=100)
41927
42492
 
41928
- service = ecs.FargateService(self, "Service",
41929
- cluster=cluster,
41930
- task_definition=task_definition,
41931
- min_healthy_percent=100,
41932
- deployment_alarms=ecs.DeploymentAlarmConfig(
41933
- alarm_names=[elb_alarm.alarm_name],
41934
- 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
41935
42501
  )
41936
42502
  )
41937
-
41938
- # Defining a deployment alarm after the service has been created
41939
- cpu_alarm_name = "MyCpuMetricAlarm"
41940
- cw.Alarm(self, "CPUAlarm",
41941
- alarm_name=cpu_alarm_name,
41942
- metric=service.metric_cpu_utilization(),
41943
- evaluation_periods=2,
41944
- threshold=80
41945
- )
41946
- service.enable_deployment_alarms([cpu_alarm_name],
41947
- behavior=ecs.AlarmBehavior.FAIL_ON_ALARM
41948
- )
41949
42503
  '''
41950
42504
 
41951
42505
  def __init__(
@@ -41955,6 +42509,7 @@ class FargateService(
41955
42509
  *,
41956
42510
  task_definition: TaskDefinition,
41957
42511
  assign_public_ip: typing.Optional[builtins.bool] = None,
42512
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
41958
42513
  platform_version: typing.Optional[FargatePlatformVersion] = None,
41959
42514
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
41960
42515
  vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -41982,6 +42537,7 @@ class FargateService(
41982
42537
  :param id: -
41983
42538
  :param task_definition: The task definition to use for tasks in the service. [disable-awslint:ref-via-interface]
41984
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
41985
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
41986
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.
41987
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.
@@ -42010,6 +42566,7 @@ class FargateService(
42010
42566
  props = FargateServiceProps(
42011
42567
  task_definition=task_definition,
42012
42568
  assign_public_ip=assign_public_ip,
42569
+ availability_zone_rebalancing=availability_zone_rebalancing,
42013
42570
  platform_version=platform_version,
42014
42571
  security_groups=security_groups,
42015
42572
  vpc_subnets=vpc_subnets,
@@ -42084,6 +42641,21 @@ class FargateService(
42084
42641
 
42085
42642
  return typing.cast(IBaseService, jsii.sinvoke(cls, "fromFargateServiceAttributes", [scope, id, attrs]))
42086
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
+
42087
42659
 
42088
42660
  @jsii.implements(IFargateTaskDefinition)
42089
42661
  class FargateTaskDefinition(
@@ -42235,6 +42807,18 @@ class FargateTaskDefinition(
42235
42807
 
42236
42808
  return typing.cast(IFargateTaskDefinition, jsii.sinvoke(cls, "fromFargateTaskDefinitionAttributes", [scope, id, attrs]))
42237
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
+
42238
42822
  @builtins.property
42239
42823
  @jsii.member(jsii_name="networkMode")
42240
42824
  def network_mode(self) -> NetworkMode:
@@ -42267,6 +42851,7 @@ __all__ = [
42267
42851
  "AssetImageProps",
42268
42852
  "AssociateCloudMapServiceOptions",
42269
42853
  "AuthorizationConfig",
42854
+ "AvailabilityZoneRebalancing",
42270
42855
  "AwsLogDriver",
42271
42856
  "AwsLogDriverMode",
42272
42857
  "AwsLogDriverProps",
@@ -42433,6 +43018,7 @@ __all__ = [
42433
43018
  "ServiceConnect",
42434
43019
  "ServiceConnectProps",
42435
43020
  "ServiceConnectService",
43021
+ "ServiceConnectTlsConfiguration",
42436
43022
  "ServiceManagedEBSVolumeConfiguration",
42437
43023
  "ServiceManagedVolume",
42438
43024
  "ServiceManagedVolumeProps",
@@ -42452,6 +43038,7 @@ __all__ = [
42452
43038
  "TrackCustomMetricProps",
42453
43039
  "Ulimit",
42454
43040
  "UlimitName",
43041
+ "VersionConsistency",
42455
43042
  "Volume",
42456
43043
  "VolumeFrom",
42457
43044
  "WindowsOptimizedVersion",
@@ -43332,7 +43919,7 @@ def _typecheckingstub__251c3999c1586967f7c9091782e6a113831e05b5f853b910cad8c8e75
43332
43919
  def _typecheckingstub__dc71ad10c4d7e167753ff81a7c450165b3118a6f5f0f8c2ad282bc4bc057a60b(
43333
43920
  *,
43334
43921
  log_driver: typing.Optional[builtins.str] = None,
43335
- 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,
43336
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,
43337
43924
  ) -> None:
43338
43925
  """Type checking stubs"""
@@ -43663,7 +44250,7 @@ def _typecheckingstub__d367f5be98d90056ca7f199c577c5744b20417ce5d1c8ad339824ec9d
43663
44250
  disable_networking: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
43664
44251
  dns_search_domains: typing.Optional[typing.Sequence[builtins.str]] = None,
43665
44252
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
43666
- 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,
43667
44254
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
43668
44255
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
43669
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,
@@ -43721,8 +44308,8 @@ def _typecheckingstub__fa8da109bc6888a0534920dcd1b365d2de33c75ccc0bbb15b5246ab75
43721
44308
  *,
43722
44309
  autoprovision: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
43723
44310
  driver: typing.Optional[builtins.str] = None,
43724
- driver_opts: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
43725
- 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,
43726
44313
  scope: typing.Optional[builtins.str] = None,
43727
44314
  ) -> None:
43728
44315
  """Type checking stubs"""
@@ -43773,7 +44360,7 @@ def _typecheckingstub__ef74e299375c10c97a6bb4455d35f14ea7c21e10b612cd0fb3958fd12
43773
44360
 
43774
44361
  def _typecheckingstub__6a1cd84d62e34083a37bc4c25d849ac547dacc5fe8a4db04170cf83e3cd1e9d3(
43775
44362
  *,
43776
- 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,
43777
44364
  type: typing.Optional[builtins.str] = None,
43778
44365
  ) -> None:
43779
44366
  """Type checking stubs"""
@@ -43845,7 +44432,7 @@ def _typecheckingstub__c0aaf73788be7f1d342c8a05599189d471843835d7b8d191218db6717
43845
44432
  def _typecheckingstub__21877ca71c2d5ead7d497c9d9a61ebef73ab6b2fcae2f5452db9d1dec56c00aa(
43846
44433
  *,
43847
44434
  log_driver: builtins.str,
43848
- 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,
43849
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,
43850
44437
  ) -> None:
43851
44438
  """Type checking stubs"""
@@ -43899,7 +44486,7 @@ def _typecheckingstub__9f0e59715edb889cdb53a1111c692d2fcadb558bf86158ff87dec568d
43899
44486
  def _typecheckingstub__8ff4a086a815b10fb977e9150a7c099378c03c3a8fe78638f9abfeeaa1b6dad0(
43900
44487
  *,
43901
44488
  enabled: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
43902
- 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,
43903
44490
  restart_attempt_period: typing.Optional[jsii.Number] = None,
43904
44491
  ) -> None:
43905
44492
  """Type checking stubs"""
@@ -44289,6 +44876,7 @@ def _typecheckingstub__d8756b492e023ad8d33a399196b15b610f709400ce213e179f17dd1f6
44289
44876
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
44290
44877
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
44291
44878
  user: typing.Optional[builtins.str] = None,
44879
+ version_consistency: typing.Optional[VersionConsistency] = None,
44292
44880
  working_directory: typing.Optional[builtins.str] = None,
44293
44881
  ) -> None:
44294
44882
  """Type checking stubs"""
@@ -44422,6 +45010,7 @@ def _typecheckingstub__f2e5f24c1574825a81dd77783d48886a430a675a0e04f03559eca98b5
44422
45010
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
44423
45011
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
44424
45012
  user: typing.Optional[builtins.str] = None,
45013
+ version_consistency: typing.Optional[VersionConsistency] = None,
44425
45014
  working_directory: typing.Optional[builtins.str] = None,
44426
45015
  ) -> None:
44427
45016
  """Type checking stubs"""
@@ -44466,6 +45055,7 @@ def _typecheckingstub__20c974a49c79829fac0811dffaf78c449f92ae136414b96232160d37c
44466
45055
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
44467
45056
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
44468
45057
  user: typing.Optional[builtins.str] = None,
45058
+ version_consistency: typing.Optional[VersionConsistency] = None,
44469
45059
  working_directory: typing.Optional[builtins.str] = None,
44470
45060
  task_definition: TaskDefinition,
44471
45061
  ) -> None:
@@ -44717,6 +45307,7 @@ def _typecheckingstub__95634258086aa3448fbdfd9896017a2cbeb858f382deb61186bb9e22b
44717
45307
  volume_configurations: typing.Optional[typing.Sequence[ServiceManagedVolume]] = None,
44718
45308
  task_definition: TaskDefinition,
44719
45309
  assign_public_ip: typing.Optional[builtins.bool] = None,
45310
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
44720
45311
  daemon: typing.Optional[builtins.bool] = None,
44721
45312
  placement_constraints: typing.Optional[typing.Sequence[PlacementConstraint]] = None,
44722
45313
  placement_strategies: typing.Optional[typing.Sequence[PlacementStrategy]] = None,
@@ -44913,6 +45504,7 @@ def _typecheckingstub__3cc413964caae89bfcfbcabff8356ffe5c054f46824be99731a77b64e
44913
45504
  task_definition_revision: typing.Optional[TaskDefinitionRevision] = None,
44914
45505
  volume_configurations: typing.Optional[typing.Sequence[ServiceManagedVolume]] = None,
44915
45506
  task_definition: TaskDefinition,
45507
+ daemon: typing.Optional[builtins.bool] = None,
44916
45508
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
44917
45509
  ) -> None:
44918
45510
  """Type checking stubs"""
@@ -44971,6 +45563,7 @@ def _typecheckingstub__8290283f61f3e2d289b7e7f81cad1a5d1e9ed9dbc07ccce2b57604682
44971
45563
  volume_configurations: typing.Optional[typing.Sequence[ServiceManagedVolume]] = None,
44972
45564
  task_definition: TaskDefinition,
44973
45565
  assign_public_ip: typing.Optional[builtins.bool] = None,
45566
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
44974
45567
  platform_version: typing.Optional[FargatePlatformVersion] = None,
44975
45568
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
44976
45569
  vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -45068,6 +45661,7 @@ def _typecheckingstub__aa1e4969dd0e00a5737510c273aa9546ad4ce7bc5a8a146f2a37666b0
45068
45661
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
45069
45662
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
45070
45663
  user: typing.Optional[builtins.str] = None,
45664
+ version_consistency: typing.Optional[VersionConsistency] = None,
45071
45665
  working_directory: typing.Optional[builtins.str] = None,
45072
45666
  ) -> None:
45073
45667
  """Type checking stubs"""
@@ -45118,6 +45712,7 @@ def _typecheckingstub__2bb9382e9a7b1b34a020902905c4bf83e2d4970135e7592e5b5a1da62
45118
45712
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
45119
45713
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
45120
45714
  user: typing.Optional[builtins.str] = None,
45715
+ version_consistency: typing.Optional[VersionConsistency] = None,
45121
45716
  working_directory: typing.Optional[builtins.str] = None,
45122
45717
  firelens_config: typing.Union[FirelensConfig, typing.Dict[builtins.str, typing.Any]],
45123
45718
  ) -> None:
@@ -45163,6 +45758,7 @@ def _typecheckingstub__498b2375cb2035a958edbdd10ad5f4352caa5773be14b63a07c337871
45163
45758
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
45164
45759
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
45165
45760
  user: typing.Optional[builtins.str] = None,
45761
+ version_consistency: typing.Optional[VersionConsistency] = None,
45166
45762
  working_directory: typing.Optional[builtins.str] = None,
45167
45763
  task_definition: TaskDefinition,
45168
45764
  firelens_config: typing.Union[FirelensConfig, typing.Dict[builtins.str, typing.Any]],
@@ -45708,6 +46304,16 @@ def _typecheckingstub__5fc70dc513eac25b19e79ac6e7ba5dc61662a4299bbba170094fabb95
45708
46304
  ingress_port_override: typing.Optional[jsii.Number] = None,
45709
46305
  per_request_timeout: typing.Optional[_Duration_4839e8c3] = None,
45710
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,
45711
46317
  ) -> None:
45712
46318
  """Type checking stubs"""
45713
46319
  pass
@@ -45914,6 +46520,7 @@ def _typecheckingstub__8fe416001b357a118b80b0f9e3432c5bffbeffe29c2f7e67a02e5589c
45914
46520
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
45915
46521
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
45916
46522
  user: typing.Optional[builtins.str] = None,
46523
+ version_consistency: typing.Optional[VersionConsistency] = None,
45917
46524
  working_directory: typing.Optional[builtins.str] = None,
45918
46525
  ) -> None:
45919
46526
  """Type checking stubs"""
@@ -45966,6 +46573,7 @@ def _typecheckingstub__a448c235107c9543bb055362134e3500d0a20b6f51e433675f952a773
45966
46573
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
45967
46574
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
45968
46575
  user: typing.Optional[builtins.str] = None,
46576
+ version_consistency: typing.Optional[VersionConsistency] = None,
45969
46577
  working_directory: typing.Optional[builtins.str] = None,
45970
46578
  ) -> None:
45971
46579
  """Type checking stubs"""
@@ -46475,6 +47083,7 @@ def _typecheckingstub__1e578461670bd6cdf856f914534e1feff8905e31d33cd7aea2b9f5151
46475
47083
  *,
46476
47084
  task_definition: TaskDefinition,
46477
47085
  assign_public_ip: typing.Optional[builtins.bool] = None,
47086
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
46478
47087
  daemon: typing.Optional[builtins.bool] = None,
46479
47088
  placement_constraints: typing.Optional[typing.Sequence[PlacementConstraint]] = None,
46480
47089
  placement_strategies: typing.Optional[typing.Sequence[PlacementStrategy]] = None,
@@ -46532,6 +47141,12 @@ def _typecheckingstub__102b3ccc22a55022584267b95a6aad5f4562322f31caae888256cf6e5
46532
47141
  """Type checking stubs"""
46533
47142
  pass
46534
47143
 
47144
+ def _typecheckingstub__92dbc7c46013b6831215fcc3302fb341d8b788fd8a9ae3631b63127cde348e55(
47145
+ load_balancer: _LoadBalancer_a894d40e,
47146
+ ) -> None:
47147
+ """Type checking stubs"""
47148
+ pass
47149
+
46535
47150
  def _typecheckingstub__3a26b01aaf87e4ece20469628f4af696fcfbad789e85b4622bd3e2092663b3b4(
46536
47151
  scope: _constructs_77d1e7e8.Construct,
46537
47152
  id: builtins.str,
@@ -46611,6 +47226,7 @@ def _typecheckingstub__e16f7a8ab558d24dc81cd83e043fb5a8b37369f32cee89bd310588535
46611
47226
  system_controls: typing.Optional[typing.Sequence[typing.Union[SystemControl, typing.Dict[builtins.str, typing.Any]]]] = None,
46612
47227
  ulimits: typing.Optional[typing.Sequence[typing.Union[Ulimit, typing.Dict[builtins.str, typing.Any]]]] = None,
46613
47228
  user: typing.Optional[builtins.str] = None,
47229
+ version_consistency: typing.Optional[VersionConsistency] = None,
46614
47230
  working_directory: typing.Optional[builtins.str] = None,
46615
47231
  ) -> None:
46616
47232
  """Type checking stubs"""
@@ -46621,6 +47237,7 @@ def _typecheckingstub__6ceef4de126cbb6bd6f379ba0b53be2fb61c35761f50685b5d228c682
46621
47237
  id: builtins.str,
46622
47238
  *,
46623
47239
  task_definition: TaskDefinition,
47240
+ daemon: typing.Optional[builtins.bool] = None,
46624
47241
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
46625
47242
  cluster: ICluster,
46626
47243
  capacity_provider_strategies: typing.Optional[typing.Sequence[typing.Union[CapacityProviderStrategy, typing.Dict[builtins.str, typing.Any]]]] = None,
@@ -46724,6 +47341,7 @@ def _typecheckingstub__0ddac6b19472d00f74c1777e699ce5b239dc49e62ff4ab4674c917bbe
46724
47341
  *,
46725
47342
  task_definition: TaskDefinition,
46726
47343
  assign_public_ip: typing.Optional[builtins.bool] = None,
47344
+ availability_zone_rebalancing: typing.Optional[AvailabilityZoneRebalancing] = None,
46727
47345
  platform_version: typing.Optional[FargatePlatformVersion] = None,
46728
47346
  security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
46729
47347
  vpc_subnets: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -46767,6 +47385,12 @@ def _typecheckingstub__37b5dcb0db8589a95c60e0ecf7798026d77e370bf80dfe7d964a48907
46767
47385
  """Type checking stubs"""
46768
47386
  pass
46769
47387
 
47388
+ def _typecheckingstub__41a65f2e7e6448580d3322dee4bc9635bee60d9fd0fb6a801d91c37859e117f4(
47389
+ load_balancer: _LoadBalancer_a894d40e,
47390
+ ) -> None:
47391
+ """Type checking stubs"""
47392
+ pass
47393
+
46770
47394
  def _typecheckingstub__d6eac52d828f2df0ab5e16014f889cf23534875319ae4b479cd554d5399de072(
46771
47395
  scope: _constructs_77d1e7e8.Construct,
46772
47396
  id: builtins.str,