aws-cdk-lib 2.159.1__py3-none-any.whl → 2.161.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 (58) hide show
  1. aws_cdk/__init__.py +281 -33
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.159.1.jsii.tgz → aws-cdk-lib@2.161.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_apigatewayv2/__init__.py +13 -14
  5. aws_cdk/aws_autoscaling/__init__.py +2 -2
  6. aws_cdk/aws_b2bi/__init__.py +2283 -672
  7. aws_cdk/aws_batch/__init__.py +9 -5
  8. aws_cdk/aws_bedrock/__init__.py +52 -20
  9. aws_cdk/aws_cloudformation/__init__.py +9 -9
  10. aws_cdk/aws_cloudtrail/__init__.py +97 -183
  11. aws_cdk/aws_cloudwatch/__init__.py +38 -42
  12. aws_cdk/aws_codepipeline_actions/__init__.py +4 -4
  13. aws_cdk/aws_cognito/__init__.py +18 -0
  14. aws_cdk/aws_datasync/__init__.py +1 -1
  15. aws_cdk/aws_dynamodb/__init__.py +4 -4
  16. aws_cdk/aws_ec2/__init__.py +138 -12
  17. aws_cdk/aws_ecs/__init__.py +517 -6
  18. aws_cdk/aws_eks/__init__.py +118 -2
  19. aws_cdk/aws_elasticloadbalancingv2/__init__.py +5 -3
  20. aws_cdk/aws_glue/__init__.py +386 -0
  21. aws_cdk/aws_iotfleetwise/__init__.py +49 -49
  22. aws_cdk/aws_iottwinmaker/__init__.py +4 -4
  23. aws_cdk/aws_iotwireless/__init__.py +2 -1
  24. aws_cdk/aws_kinesisfirehose/__init__.py +52 -76
  25. aws_cdk/aws_kms/__init__.py +4 -4
  26. aws_cdk/aws_lambda/__init__.py +385 -244
  27. aws_cdk/aws_logs/__init__.py +455 -24
  28. aws_cdk/aws_mediaconnect/__init__.py +6 -4
  29. aws_cdk/aws_medialive/__init__.py +36 -0
  30. aws_cdk/aws_organizations/__init__.py +4 -3
  31. aws_cdk/aws_pipes/__init__.py +2 -2
  32. aws_cdk/aws_quicksight/__init__.py +1086 -6
  33. aws_cdk/aws_rds/__init__.py +182 -3
  34. aws_cdk/aws_route53resolver/__init__.py +3 -17
  35. aws_cdk/aws_s3/__init__.py +24 -15
  36. aws_cdk/aws_s3_deployment/__init__.py +45 -0
  37. aws_cdk/aws_s3express/__init__.py +314 -4
  38. aws_cdk/aws_sagemaker/__init__.py +44 -4
  39. aws_cdk/aws_secretsmanager/__init__.py +14 -7
  40. aws_cdk/aws_securityhub/__init__.py +16 -14
  41. aws_cdk/aws_ses/__init__.py +52 -18
  42. aws_cdk/aws_sqs/__init__.py +16 -14
  43. aws_cdk/aws_ssm/__init__.py +6 -2
  44. aws_cdk/aws_stepfunctions/__init__.py +412 -32
  45. aws_cdk/aws_synthetics/__init__.py +46 -0
  46. aws_cdk/aws_waf/__init__.py +33 -22
  47. aws_cdk/aws_wafregional/__init__.py +36 -24
  48. aws_cdk/aws_workspacesweb/__init__.py +54 -3
  49. aws_cdk/cloud_assembly_schema/__init__.py +1304 -417
  50. aws_cdk/cloudformation_include/__init__.py +28 -0
  51. aws_cdk/cx_api/__init__.py +129 -0
  52. aws_cdk/pipelines/__init__.py +4 -4
  53. {aws_cdk_lib-2.159.1.dist-info → aws_cdk_lib-2.161.0.dist-info}/METADATA +4 -4
  54. {aws_cdk_lib-2.159.1.dist-info → aws_cdk_lib-2.161.0.dist-info}/RECORD +58 -58
  55. {aws_cdk_lib-2.159.1.dist-info → aws_cdk_lib-2.161.0.dist-info}/LICENSE +0 -0
  56. {aws_cdk_lib-2.159.1.dist-info → aws_cdk_lib-2.161.0.dist-info}/NOTICE +0 -0
  57. {aws_cdk_lib-2.159.1.dist-info → aws_cdk_lib-2.161.0.dist-info}/WHEEL +0 -0
  58. {aws_cdk_lib-2.159.1.dist-info → aws_cdk_lib-2.161.0.dist-info}/top_level.txt +0 -0
@@ -631,6 +631,23 @@ task_definition.add_container("container",
631
631
  )
632
632
  ```
633
633
 
634
+ ### Restart policy
635
+
636
+ To enable a restart policy for the container, set `enableRestartPolicy` to true and also specify
637
+ `restartIgnoredExitCodes` and `restartAttemptPeriod` if necessary.
638
+
639
+ ```python
640
+ # task_definition: ecs.TaskDefinition
641
+
642
+
643
+ task_definition.add_container("container",
644
+ image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample"),
645
+ enable_restart_policy=True,
646
+ restart_ignored_exit_codes=[0, 127],
647
+ restart_attempt_period=Duration.seconds(360)
648
+ )
649
+ ```
650
+
634
651
  ## Docker labels
635
652
 
636
653
  You can add labels to the container with the `dockerLabels` property or with the `addDockerLabel` method:
@@ -6166,6 +6183,10 @@ class CfnCapacityProvider(
6166
6183
  ) -> None:
6167
6184
  '''The managed scaling settings for the Auto Scaling group capacity provider.
6168
6185
 
6186
+ When managed scaling is turned on, Amazon ECS manages the scale-in and scale-out actions of the Auto Scaling group. Amazon ECS manages a target tracking scaling policy using an Amazon ECS managed CloudWatch metric with the specified ``targetCapacity`` value as the target value for the metric. For more information, see `Using managed scaling <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html#asg-capacity-providers-managed-scaling>`_ in the *Amazon Elastic Container Service Developer Guide* .
6187
+
6188
+ If managed scaling is off, the user must manage the scaling of the Auto Scaling group.
6189
+
6169
6190
  :param instance_warmup_period: The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group. If this parameter is omitted, the default value of ``300`` seconds is used.
6170
6191
  :param maximum_scaling_step_size: The maximum number of Amazon EC2 instances that Amazon ECS will scale out at one time. If this parameter is omitted, the default value of ``10000`` is used.
6171
6192
  :param minimum_scaling_step_size: The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one time. The scale in process is not affected by this parameter If this parameter is omitted, the default value of ``1`` is used. When additional capacity is required, Amazon ECS will scale up the minimum scaling step size even if the actual demand is less than the minimum scaling step size. If you use a capacity provider with an Auto Scaling group configured with more than one Amazon EC2 instance type or Availability Zone, Amazon ECS will scale up by the exact minimum scaling step size value and will ignore both the maximum scaling step size as well as the capacity demand.
@@ -9631,7 +9652,7 @@ class CfnService(
9631
9652
  - For tasks that are on AWS Fargate , because you don't have access to the underlying infrastructure your tasks are hosted on, any additional software needed must be installed outside of the task. For example, the Fluentd output aggregators or a remote host running Logstash to send Gelf logs to.
9632
9653
 
9633
9654
  :param log_driver: The log driver to use for the container. For tasks on AWS Fargate , the supported log drivers are ``awslogs`` , ``splunk`` , and ``awsfirelens`` . For tasks hosted on Amazon EC2 instances, the supported log drivers are ``awslogs`` , ``fluentd`` , ``gelf`` , ``json-file`` , ``journald`` , ``syslog`` , ``splunk`` , and ``awsfirelens`` . For more information about using the ``awslogs`` log driver, see `Send Amazon ECS logs to CloudWatch <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html>`_ in the *Amazon Elastic Container Service Developer Guide* . For more information about using the ``awsfirelens`` log driver, see `Send Amazon ECS logs to an AWS service or AWS Partner <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html>`_ . .. epigraph:: If you have a custom driver that isn't listed, you can fork the Amazon ECS container agent project that's `available on GitHub <https://docs.aws.amazon.com/https://github.com/aws/amazon-ecs-agent>`_ and customize it to work with that driver. We encourage you to submit pull requests for changes that you would like to have included. However, we don't currently provide support for running modified copies of this software.
9634
- :param options: The configuration options to send to the log driver. This parameter requires version 1.19 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}}'``
9655
+ :param options: The configuration options to send to the log driver. 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: - **awslogs-create-group** - Required: No Specify whether you want the log group to be created automatically. If this option isn't specified, it defaults to ``false`` . .. epigraph:: Your IAM policy must include the ``logs:CreateLogGroup`` permission before you attempt to use ``awslogs-create-group`` . - **awslogs-region** - Required: Yes Specify the AWS Region that the ``awslogs`` log driver is to send your Docker logs to. You can choose to send all of your logs from clusters in different Regions to a single region in CloudWatch Logs. This is so that they're all visible in one location. Otherwise, you can separate them by Region for more granularity. Make sure that the specified log group exists in the Region that you specify with this option. - **awslogs-group** - Required: Yes Make sure to specify a log group that the ``awslogs`` log driver sends its log streams to. - **awslogs-stream-prefix** - Required: Yes, when using the Fargate launch type.Optional for the EC2 launch type, required for the Fargate launch type. Use the ``awslogs-stream-prefix`` option to associate a log stream with the specified prefix, the container name, and the ID of the Amazon ECS task that the container belongs to. If you specify a prefix with this option, then the log stream takes the format ``prefix-name/container-name/ecs-task-id`` . If you don't specify a prefix with this option, then the log stream is named after the container ID that's assigned by the Docker daemon on the container instance. Because it's difficult to trace logs back to the container that sent them with just the Docker container ID (which is only available on the container instance), we recommend that you specify a prefix with this option. For Amazon ECS services, you can use the service name as the prefix. Doing so, you can trace log streams to the service that the container belongs to, the name of the container that sent them, and the ID of the task that the container belongs to. You must specify a stream-prefix for your logs to have your logs appear in the Log pane when using the Amazon ECS console. - **awslogs-datetime-format** - Required: No This option defines a multiline start pattern in Python ``strftime`` format. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages. One example of a use case for using this format is for parsing output such as a stack dump, which might otherwise be logged in multiple entries. The correct pattern allows it to be captured in a single entry. For more information, see `awslogs-datetime-format <https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/awslogs/#awslogs-datetime-format>`_ . You cannot configure both the ``awslogs-datetime-format`` and ``awslogs-multiline-pattern`` options. .. epigraph:: Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance. - **awslogs-multiline-pattern** - Required: No This option defines a multiline start pattern that uses a regular expression. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages. For more information, see `awslogs-multiline-pattern <https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/awslogs/#awslogs-multiline-pattern>`_ . This option is ignored if ``awslogs-datetime-format`` is also configured. You cannot configure both the ``awslogs-datetime-format`` and ``awslogs-multiline-pattern`` options. .. epigraph:: Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance. - **mode** - Required: No Valid values: ``non-blocking`` | ``blocking`` This option defines the delivery mode of log messages from the container to CloudWatch Logs. The delivery mode you choose affects application availability when the flow of logs from container to CloudWatch is interrupted. If you use the ``blocking`` mode and the flow of logs to CloudWatch is interrupted, calls from container code to write to the ``stdout`` and ``stderr`` streams will block. The logging thread of the application will block as a result. This may cause the application to become unresponsive and lead to container healthcheck failure. If you use the ``non-blocking`` mode, the container's logs are instead stored in an in-memory intermediate buffer configured with the ``max-buffer-size`` option. This prevents the application from becoming unresponsive when logs cannot be sent to CloudWatch. We recommend using this mode if you want to ensure service availability and are okay with some log loss. For more information, see `Preventing log loss with non-blocking mode in the ``awslogs`` container log driver <https://docs.aws.amazon.com/containers/preventing-log-loss-with-non-blocking-mode-in-the-awslogs-container-log-driver/>`_ . - **max-buffer-size** - Required: No Default value: ``1m`` When ``non-blocking`` mode is used, the ``max-buffer-size`` log option controls the size of the buffer that's used for intermediate message storage. Make sure to specify an adequate buffer size based on your application. When the buffer fills up, further logs cannot be stored. Logs that cannot be stored are lost. To route logs using the ``splunk`` log router, you need to specify a ``splunk-token`` and a ``splunk-url`` . When you use the ``awsfirelens`` log router to route logs to an AWS Service or AWS Partner Network destination for log storage and analytics, you can set the ``log-driver-buffer-limit`` option to limit the number of events that are buffered in memory, before being sent to the log router container. It can help to resolve potential log loss issue because high throughput might result in memory running out for the buffer inside of Docker. Other options you can specify when using ``awsfirelens`` to route logs depend on the destination. When you export logs to Amazon Data Firehose, you can specify the AWS Region with ``region`` and a name for the log stream with ``delivery_stream`` . When you export logs to Amazon Kinesis Data Streams, you can specify an AWS Region with ``region`` and a data stream name with ``stream`` . When you export logs to Amazon OpenSearch Service, you can specify options like ``Name`` , ``Host`` (OpenSearch Service endpoint without protocol), ``Port`` , ``Index`` , ``Type`` , ``Aws_auth`` , ``Aws_region`` , ``Suppress_Type_Name`` , and ``tls`` . When you export logs to Amazon S3, you can specify the bucket using the ``bucket`` option. You can also specify ``region`` , ``total_file_size`` , ``upload_timeout`` , and ``use_put_object`` as options. This parameter requires version 1.19 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}}'``
9635
9656
  :param secret_options: The secrets to pass to the log configuration. For more information, see `Specifying sensitive data <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
9636
9657
 
9637
9658
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-logconfiguration.html
@@ -9693,6 +9714,87 @@ class CfnService(
9693
9714
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]]:
9694
9715
  '''The configuration options to send to the log driver.
9695
9716
 
9717
+ 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:
9718
+
9719
+ - **awslogs-create-group** - Required: No
9720
+
9721
+ Specify whether you want the log group to be created automatically. If this option isn't specified, it defaults to ``false`` .
9722
+ .. epigraph::
9723
+
9724
+ Your IAM policy must include the ``logs:CreateLogGroup`` permission before you attempt to use ``awslogs-create-group`` .
9725
+
9726
+ - **awslogs-region** - Required: Yes
9727
+
9728
+ Specify the AWS Region that the ``awslogs`` log driver is to send your Docker logs to. You can choose to send all of your logs from clusters in different Regions to a single region in CloudWatch Logs. This is so that they're all visible in one location. Otherwise, you can separate them by Region for more granularity. Make sure that the specified log group exists in the Region that you specify with this option.
9729
+
9730
+ - **awslogs-group** - Required: Yes
9731
+
9732
+ Make sure to specify a log group that the ``awslogs`` log driver sends its log streams to.
9733
+
9734
+ - **awslogs-stream-prefix** - Required: Yes, when using the Fargate launch type.Optional for the EC2 launch type, required for the Fargate launch type.
9735
+
9736
+ Use the ``awslogs-stream-prefix`` option to associate a log stream with the specified prefix, the container name, and the ID of the Amazon ECS task that the container belongs to. If you specify a prefix with this option, then the log stream takes the format ``prefix-name/container-name/ecs-task-id`` .
9737
+
9738
+ If you don't specify a prefix with this option, then the log stream is named after the container ID that's assigned by the Docker daemon on the container instance. Because it's difficult to trace logs back to the container that sent them with just the Docker container ID (which is only available on the container instance), we recommend that you specify a prefix with this option.
9739
+
9740
+ For Amazon ECS services, you can use the service name as the prefix. Doing so, you can trace log streams to the service that the container belongs to, the name of the container that sent them, and the ID of the task that the container belongs to.
9741
+
9742
+ You must specify a stream-prefix for your logs to have your logs appear in the Log pane when using the Amazon ECS console.
9743
+
9744
+ - **awslogs-datetime-format** - Required: No
9745
+
9746
+ This option defines a multiline start pattern in Python ``strftime`` format. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages.
9747
+
9748
+ One example of a use case for using this format is for parsing output such as a stack dump, which might otherwise be logged in multiple entries. The correct pattern allows it to be captured in a single entry.
9749
+
9750
+ For more information, see `awslogs-datetime-format <https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/awslogs/#awslogs-datetime-format>`_ .
9751
+
9752
+ You cannot configure both the ``awslogs-datetime-format`` and ``awslogs-multiline-pattern`` options.
9753
+ .. epigraph::
9754
+
9755
+ Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance.
9756
+
9757
+ - **awslogs-multiline-pattern** - Required: No
9758
+
9759
+ This option defines a multiline start pattern that uses a regular expression. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages.
9760
+
9761
+ For more information, see `awslogs-multiline-pattern <https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/awslogs/#awslogs-multiline-pattern>`_ .
9762
+
9763
+ This option is ignored if ``awslogs-datetime-format`` is also configured.
9764
+
9765
+ You cannot configure both the ``awslogs-datetime-format`` and ``awslogs-multiline-pattern`` options.
9766
+ .. epigraph::
9767
+
9768
+ Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance.
9769
+
9770
+ - **mode** - Required: No
9771
+
9772
+ Valid values: ``non-blocking`` | ``blocking``
9773
+
9774
+ This option defines the delivery mode of log messages from the container to CloudWatch Logs. The delivery mode you choose affects application availability when the flow of logs from container to CloudWatch is interrupted.
9775
+
9776
+ If you use the ``blocking`` mode and the flow of logs to CloudWatch is interrupted, calls from container code to write to the ``stdout`` and ``stderr`` streams will block. The logging thread of the application will block as a result. This may cause the application to become unresponsive and lead to container healthcheck failure.
9777
+
9778
+ If you use the ``non-blocking`` mode, the container's logs are instead stored in an in-memory intermediate buffer configured with the ``max-buffer-size`` option. This prevents the application from becoming unresponsive when logs cannot be sent to CloudWatch. We recommend using this mode if you want to ensure service availability and are okay with some log loss. For more information, see `Preventing log loss with non-blocking mode in the ``awslogs`` container log driver <https://docs.aws.amazon.com/containers/preventing-log-loss-with-non-blocking-mode-in-the-awslogs-container-log-driver/>`_ .
9779
+
9780
+ - **max-buffer-size** - Required: No
9781
+
9782
+ Default value: ``1m``
9783
+
9784
+ When ``non-blocking`` mode is used, the ``max-buffer-size`` log option controls the size of the buffer that's used for intermediate message storage. Make sure to specify an adequate buffer size based on your application. When the buffer fills up, further logs cannot be stored. Logs that cannot be stored are lost.
9785
+
9786
+ To route logs using the ``splunk`` log router, you need to specify a ``splunk-token`` and a ``splunk-url`` .
9787
+
9788
+ When you use the ``awsfirelens`` log router to route logs to an AWS Service or AWS Partner Network destination for log storage and analytics, you can set the ``log-driver-buffer-limit`` option to limit the number of events that are buffered in memory, before being sent to the log router container. It can help to resolve potential log loss issue because high throughput might result in memory running out for the buffer inside of Docker.
9789
+
9790
+ Other options you can specify when using ``awsfirelens`` to route logs depend on the destination. When you export logs to Amazon Data Firehose, you can specify the AWS Region with ``region`` and a name for the log stream with ``delivery_stream`` .
9791
+
9792
+ When you export logs to Amazon Kinesis Data Streams, you can specify an AWS Region with ``region`` and a data stream name with ``stream`` .
9793
+
9794
+ When you export logs to Amazon OpenSearch Service, you can specify options like ``Name`` , ``Host`` (OpenSearch Service endpoint without protocol), ``Port`` , ``Index`` , ``Type`` , ``Aws_auth`` , ``Aws_region`` , ``Suppress_Type_Name`` , and ``tls`` .
9795
+
9796
+ When you export logs to Amazon S3, you can specify the bucket using the ``bucket`` option. You can also specify ``region`` , ``total_file_size`` , ``upload_timeout`` , and ``use_put_object`` as options.
9797
+
9696
9798
  This parameter requires version 1.19 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}}'``
9697
9799
 
9698
9800
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-logconfiguration.html#cfn-ecs-service-logconfiguration-options
@@ -15258,7 +15360,7 @@ class CfnTaskDefinition(
15258
15360
  '''The ``LogConfiguration`` property specifies log configuration options to send to a custom log driver for the container.
15259
15361
 
15260
15362
  :param log_driver: The log driver to use for the container. For tasks on AWS Fargate , the supported log drivers are ``awslogs`` , ``splunk`` , and ``awsfirelens`` . For tasks hosted on Amazon EC2 instances, the supported log drivers are ``awslogs`` , ``fluentd`` , ``gelf`` , ``json-file`` , ``journald`` , ``syslog`` , ``splunk`` , and ``awsfirelens`` . For more information about using the ``awslogs`` log driver, see `Send Amazon ECS logs to CloudWatch <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html>`_ in the *Amazon Elastic Container Service Developer Guide* . For more information about using the ``awsfirelens`` log driver, see `Send Amazon ECS logs to an AWS service or AWS Partner <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html>`_ . .. epigraph:: If you have a custom driver that isn't listed, you can fork the Amazon ECS container agent project that's `available on GitHub <https://docs.aws.amazon.com/https://github.com/aws/amazon-ecs-agent>`_ and customize it to work with that driver. We encourage you to submit pull requests for changes that you would like to have included. However, we don't currently provide support for running modified copies of this software.
15261
- :param options: The configuration options to send to the log driver. This parameter requires version 1.19 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}}'``
15363
+ :param options: The configuration options to send to the log driver. 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: - **awslogs-create-group** - Required: No Specify whether you want the log group to be created automatically. If this option isn't specified, it defaults to ``false`` . .. epigraph:: Your IAM policy must include the ``logs:CreateLogGroup`` permission before you attempt to use ``awslogs-create-group`` . - **awslogs-region** - Required: Yes Specify the AWS Region that the ``awslogs`` log driver is to send your Docker logs to. You can choose to send all of your logs from clusters in different Regions to a single region in CloudWatch Logs. This is so that they're all visible in one location. Otherwise, you can separate them by Region for more granularity. Make sure that the specified log group exists in the Region that you specify with this option. - **awslogs-group** - Required: Yes Make sure to specify a log group that the ``awslogs`` log driver sends its log streams to. - **awslogs-stream-prefix** - Required: Yes, when using the Fargate launch type.Optional for the EC2 launch type, required for the Fargate launch type. Use the ``awslogs-stream-prefix`` option to associate a log stream with the specified prefix, the container name, and the ID of the Amazon ECS task that the container belongs to. If you specify a prefix with this option, then the log stream takes the format ``prefix-name/container-name/ecs-task-id`` . If you don't specify a prefix with this option, then the log stream is named after the container ID that's assigned by the Docker daemon on the container instance. Because it's difficult to trace logs back to the container that sent them with just the Docker container ID (which is only available on the container instance), we recommend that you specify a prefix with this option. For Amazon ECS services, you can use the service name as the prefix. Doing so, you can trace log streams to the service that the container belongs to, the name of the container that sent them, and the ID of the task that the container belongs to. You must specify a stream-prefix for your logs to have your logs appear in the Log pane when using the Amazon ECS console. - **awslogs-datetime-format** - Required: No This option defines a multiline start pattern in Python ``strftime`` format. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages. One example of a use case for using this format is for parsing output such as a stack dump, which might otherwise be logged in multiple entries. The correct pattern allows it to be captured in a single entry. For more information, see `awslogs-datetime-format <https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/awslogs/#awslogs-datetime-format>`_ . You cannot configure both the ``awslogs-datetime-format`` and ``awslogs-multiline-pattern`` options. .. epigraph:: Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance. - **awslogs-multiline-pattern** - Required: No This option defines a multiline start pattern that uses a regular expression. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages. For more information, see `awslogs-multiline-pattern <https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/awslogs/#awslogs-multiline-pattern>`_ . This option is ignored if ``awslogs-datetime-format`` is also configured. You cannot configure both the ``awslogs-datetime-format`` and ``awslogs-multiline-pattern`` options. .. epigraph:: Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance. - **mode** - Required: No Valid values: ``non-blocking`` | ``blocking`` This option defines the delivery mode of log messages from the container to CloudWatch Logs. The delivery mode you choose affects application availability when the flow of logs from container to CloudWatch is interrupted. If you use the ``blocking`` mode and the flow of logs to CloudWatch is interrupted, calls from container code to write to the ``stdout`` and ``stderr`` streams will block. The logging thread of the application will block as a result. This may cause the application to become unresponsive and lead to container healthcheck failure. If you use the ``non-blocking`` mode, the container's logs are instead stored in an in-memory intermediate buffer configured with the ``max-buffer-size`` option. This prevents the application from becoming unresponsive when logs cannot be sent to CloudWatch. We recommend using this mode if you want to ensure service availability and are okay with some log loss. For more information, see `Preventing log loss with non-blocking mode in the ``awslogs`` container log driver <https://docs.aws.amazon.com/containers/preventing-log-loss-with-non-blocking-mode-in-the-awslogs-container-log-driver/>`_ . - **max-buffer-size** - Required: No Default value: ``1m`` When ``non-blocking`` mode is used, the ``max-buffer-size`` log option controls the size of the buffer that's used for intermediate message storage. Make sure to specify an adequate buffer size based on your application. When the buffer fills up, further logs cannot be stored. Logs that cannot be stored are lost. To route logs using the ``splunk`` log router, you need to specify a ``splunk-token`` and a ``splunk-url`` . When you use the ``awsfirelens`` log router to route logs to an AWS Service or AWS Partner Network destination for log storage and analytics, you can set the ``log-driver-buffer-limit`` option to limit the number of events that are buffered in memory, before being sent to the log router container. It can help to resolve potential log loss issue because high throughput might result in memory running out for the buffer inside of Docker. Other options you can specify when using ``awsfirelens`` to route logs depend on the destination. When you export logs to Amazon Data Firehose, you can specify the AWS Region with ``region`` and a name for the log stream with ``delivery_stream`` . When you export logs to Amazon Kinesis Data Streams, you can specify an AWS Region with ``region`` and a data stream name with ``stream`` . When you export logs to Amazon OpenSearch Service, you can specify options like ``Name`` , ``Host`` (OpenSearch Service endpoint without protocol), ``Port`` , ``Index`` , ``Type`` , ``Aws_auth`` , ``Aws_region`` , ``Suppress_Type_Name`` , and ``tls`` . When you export logs to Amazon S3, you can specify the bucket using the ``bucket`` option. You can also specify ``region`` , ``total_file_size`` , ``upload_timeout`` , and ``use_put_object`` as options. This parameter requires version 1.19 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}}'``
15262
15364
  :param secret_options: The secrets to pass to the log configuration. For more information, see `Specifying sensitive data <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html>`_ in the *Amazon Elastic Container Service Developer Guide* .
15263
15365
 
15264
15366
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-logconfiguration.html
@@ -15323,6 +15425,87 @@ class CfnTaskDefinition(
15323
15425
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]]:
15324
15426
  '''The configuration options to send to the log driver.
15325
15427
 
15428
+ 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:
15429
+
15430
+ - **awslogs-create-group** - Required: No
15431
+
15432
+ Specify whether you want the log group to be created automatically. If this option isn't specified, it defaults to ``false`` .
15433
+ .. epigraph::
15434
+
15435
+ Your IAM policy must include the ``logs:CreateLogGroup`` permission before you attempt to use ``awslogs-create-group`` .
15436
+
15437
+ - **awslogs-region** - Required: Yes
15438
+
15439
+ Specify the AWS Region that the ``awslogs`` log driver is to send your Docker logs to. You can choose to send all of your logs from clusters in different Regions to a single region in CloudWatch Logs. This is so that they're all visible in one location. Otherwise, you can separate them by Region for more granularity. Make sure that the specified log group exists in the Region that you specify with this option.
15440
+
15441
+ - **awslogs-group** - Required: Yes
15442
+
15443
+ Make sure to specify a log group that the ``awslogs`` log driver sends its log streams to.
15444
+
15445
+ - **awslogs-stream-prefix** - Required: Yes, when using the Fargate launch type.Optional for the EC2 launch type, required for the Fargate launch type.
15446
+
15447
+ Use the ``awslogs-stream-prefix`` option to associate a log stream with the specified prefix, the container name, and the ID of the Amazon ECS task that the container belongs to. If you specify a prefix with this option, then the log stream takes the format ``prefix-name/container-name/ecs-task-id`` .
15448
+
15449
+ If you don't specify a prefix with this option, then the log stream is named after the container ID that's assigned by the Docker daemon on the container instance. Because it's difficult to trace logs back to the container that sent them with just the Docker container ID (which is only available on the container instance), we recommend that you specify a prefix with this option.
15450
+
15451
+ For Amazon ECS services, you can use the service name as the prefix. Doing so, you can trace log streams to the service that the container belongs to, the name of the container that sent them, and the ID of the task that the container belongs to.
15452
+
15453
+ You must specify a stream-prefix for your logs to have your logs appear in the Log pane when using the Amazon ECS console.
15454
+
15455
+ - **awslogs-datetime-format** - Required: No
15456
+
15457
+ This option defines a multiline start pattern in Python ``strftime`` format. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages.
15458
+
15459
+ One example of a use case for using this format is for parsing output such as a stack dump, which might otherwise be logged in multiple entries. The correct pattern allows it to be captured in a single entry.
15460
+
15461
+ For more information, see `awslogs-datetime-format <https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/awslogs/#awslogs-datetime-format>`_ .
15462
+
15463
+ You cannot configure both the ``awslogs-datetime-format`` and ``awslogs-multiline-pattern`` options.
15464
+ .. epigraph::
15465
+
15466
+ Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance.
15467
+
15468
+ - **awslogs-multiline-pattern** - Required: No
15469
+
15470
+ This option defines a multiline start pattern that uses a regular expression. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages.
15471
+
15472
+ For more information, see `awslogs-multiline-pattern <https://docs.aws.amazon.com/https://docs.docker.com/config/containers/logging/awslogs/#awslogs-multiline-pattern>`_ .
15473
+
15474
+ This option is ignored if ``awslogs-datetime-format`` is also configured.
15475
+
15476
+ You cannot configure both the ``awslogs-datetime-format`` and ``awslogs-multiline-pattern`` options.
15477
+ .. epigraph::
15478
+
15479
+ Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance.
15480
+
15481
+ - **mode** - Required: No
15482
+
15483
+ Valid values: ``non-blocking`` | ``blocking``
15484
+
15485
+ This option defines the delivery mode of log messages from the container to CloudWatch Logs. The delivery mode you choose affects application availability when the flow of logs from container to CloudWatch is interrupted.
15486
+
15487
+ If you use the ``blocking`` mode and the flow of logs to CloudWatch is interrupted, calls from container code to write to the ``stdout`` and ``stderr`` streams will block. The logging thread of the application will block as a result. This may cause the application to become unresponsive and lead to container healthcheck failure.
15488
+
15489
+ If you use the ``non-blocking`` mode, the container's logs are instead stored in an in-memory intermediate buffer configured with the ``max-buffer-size`` option. This prevents the application from becoming unresponsive when logs cannot be sent to CloudWatch. We recommend using this mode if you want to ensure service availability and are okay with some log loss. For more information, see `Preventing log loss with non-blocking mode in the ``awslogs`` container log driver <https://docs.aws.amazon.com/containers/preventing-log-loss-with-non-blocking-mode-in-the-awslogs-container-log-driver/>`_ .
15490
+
15491
+ - **max-buffer-size** - Required: No
15492
+
15493
+ Default value: ``1m``
15494
+
15495
+ When ``non-blocking`` mode is used, the ``max-buffer-size`` log option controls the size of the buffer that's used for intermediate message storage. Make sure to specify an adequate buffer size based on your application. When the buffer fills up, further logs cannot be stored. Logs that cannot be stored are lost.
15496
+
15497
+ To route logs using the ``splunk`` log router, you need to specify a ``splunk-token`` and a ``splunk-url`` .
15498
+
15499
+ When you use the ``awsfirelens`` log router to route logs to an AWS Service or AWS Partner Network destination for log storage and analytics, you can set the ``log-driver-buffer-limit`` option to limit the number of events that are buffered in memory, before being sent to the log router container. It can help to resolve potential log loss issue because high throughput might result in memory running out for the buffer inside of Docker.
15500
+
15501
+ Other options you can specify when using ``awsfirelens`` to route logs depend on the destination. When you export logs to Amazon Data Firehose, you can specify the AWS Region with ``region`` and a name for the log stream with ``delivery_stream`` .
15502
+
15503
+ When you export logs to Amazon Kinesis Data Streams, you can specify an AWS Region with ``region`` and a data stream name with ``stream`` .
15504
+
15505
+ When you export logs to Amazon OpenSearch Service, you can specify options like ``Name`` , ``Host`` (OpenSearch Service endpoint without protocol), ``Port`` , ``Index`` , ``Type`` , ``Aws_auth`` , ``Aws_region`` , ``Suppress_Type_Name`` , and ``tls`` .
15506
+
15507
+ When you export logs to Amazon S3, you can specify the bucket using the ``bucket`` option. You can also specify ``region`` , ``total_file_size`` , ``upload_timeout`` , and ``use_put_object`` as options.
15508
+
15326
15509
  This parameter requires version 1.19 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}}'``
15327
15510
 
15328
15511
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-logconfiguration.html#cfn-ecs-taskdefinition-logconfiguration-options
@@ -19557,6 +19740,7 @@ class ContainerDefinition(
19557
19740
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
19558
19741
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
19559
19742
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
19743
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
19560
19744
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
19561
19745
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
19562
19746
  environment_files: typing.Optional[typing.Sequence["EnvironmentFile"]] = None,
@@ -19575,6 +19759,8 @@ class ContainerDefinition(
19575
19759
  privileged: typing.Optional[builtins.bool] = None,
19576
19760
  pseudo_terminal: typing.Optional[builtins.bool] = None,
19577
19761
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
19762
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
19763
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
19578
19764
  secrets: typing.Optional[typing.Mapping[builtins.str, "Secret"]] = None,
19579
19765
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
19580
19766
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -19598,6 +19784,7 @@ class ContainerDefinition(
19598
19784
  :param dns_servers: A list of DNS servers that are presented to the container. Default: - Default DNS servers.
19599
19785
  :param docker_labels: A key/value map of labels to add to the container. Default: - No labels.
19600
19786
  :param docker_security_options: A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. Default: - No security labels.
19787
+ :param enable_restart_policy: Enable a restart policy for a container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task. Default: - false unless ``restartIgnoredExitCodes`` or ``restartAttemptPeriod`` is set.
19601
19788
  :param entry_point: The ENTRYPOINT value to pass to the container. Default: - Entry point configured in container.
19602
19789
  :param environment: The environment variables to pass to the container. Default: - No environment variables.
19603
19790
  :param environment_files: The environment files to pass to the container. Default: - No environment files.
@@ -19616,6 +19803,8 @@ class ContainerDefinition(
19616
19803
  :param privileged: Specifies whether the container is marked as privileged. When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). Default: false
19617
19804
  :param pseudo_terminal: When this parameter is true, a TTY is allocated. This parameter maps to Tty in the "Create a container section" of the Docker Remote API and the --tty option to ``docker run``. Default: - false
19618
19805
  :param readonly_root_filesystem: When this parameter is true, the container is given read-only access to its root file system. Default: false
19806
+ :param restart_attempt_period: A period of time that the container must run for before a restart can be attempted. A container can be restarted only once every ``restartAttemptPeriod`` seconds. If a container isn't able to run for this time period and exits early, it will not be restarted. This property can't be used if ``enableRestartPolicy`` is set to false. You can set a minimum ``restartAttemptPeriod`` of 60 seconds and a maximum ``restartAttemptPeriod`` of 1800 seconds. Default: - Duration.seconds(300) if ``enableRestartPolicy`` is true, otherwise no period.
19807
+ :param restart_ignored_exit_codes: A list of exit codes that Amazon ECS will ignore and not attempt a restart on. This property can't be used if ``enableRestartPolicy`` is set to false. You can specify a maximum of 50 container exit codes. Default: - No exit codes are ignored.
19619
19808
  :param secrets: The secret environment variables to pass to the container. Default: - No secret environment variables.
19620
19809
  :param start_timeout: Time duration (in seconds) to wait before giving up on resolving dependencies for a container. Default: - none
19621
19810
  :param stop_timeout: Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. Default: - none
@@ -19640,6 +19829,7 @@ class ContainerDefinition(
19640
19829
  dns_servers=dns_servers,
19641
19830
  docker_labels=docker_labels,
19642
19831
  docker_security_options=docker_security_options,
19832
+ enable_restart_policy=enable_restart_policy,
19643
19833
  entry_point=entry_point,
19644
19834
  environment=environment,
19645
19835
  environment_files=environment_files,
@@ -19658,6 +19848,8 @@ class ContainerDefinition(
19658
19848
  privileged=privileged,
19659
19849
  pseudo_terminal=pseudo_terminal,
19660
19850
  readonly_root_filesystem=readonly_root_filesystem,
19851
+ restart_attempt_period=restart_attempt_period,
19852
+ restart_ignored_exit_codes=restart_ignored_exit_codes,
19661
19853
  secrets=secrets,
19662
19854
  start_timeout=start_timeout,
19663
19855
  stop_timeout=stop_timeout,
@@ -20034,6 +20226,7 @@ class ContainerDefinition(
20034
20226
  "dns_servers": "dnsServers",
20035
20227
  "docker_labels": "dockerLabels",
20036
20228
  "docker_security_options": "dockerSecurityOptions",
20229
+ "enable_restart_policy": "enableRestartPolicy",
20037
20230
  "entry_point": "entryPoint",
20038
20231
  "environment": "environment",
20039
20232
  "environment_files": "environmentFiles",
@@ -20052,6 +20245,8 @@ class ContainerDefinition(
20052
20245
  "privileged": "privileged",
20053
20246
  "pseudo_terminal": "pseudoTerminal",
20054
20247
  "readonly_root_filesystem": "readonlyRootFilesystem",
20248
+ "restart_attempt_period": "restartAttemptPeriod",
20249
+ "restart_ignored_exit_codes": "restartIgnoredExitCodes",
20055
20250
  "secrets": "secrets",
20056
20251
  "start_timeout": "startTimeout",
20057
20252
  "stop_timeout": "stopTimeout",
@@ -20075,6 +20270,7 @@ class ContainerDefinitionOptions:
20075
20270
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
20076
20271
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
20077
20272
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
20273
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
20078
20274
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
20079
20275
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
20080
20276
  environment_files: typing.Optional[typing.Sequence["EnvironmentFile"]] = None,
@@ -20093,6 +20289,8 @@ class ContainerDefinitionOptions:
20093
20289
  privileged: typing.Optional[builtins.bool] = None,
20094
20290
  pseudo_terminal: typing.Optional[builtins.bool] = None,
20095
20291
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
20292
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
20293
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
20096
20294
  secrets: typing.Optional[typing.Mapping[builtins.str, "Secret"]] = None,
20097
20295
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
20098
20296
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -20112,6 +20310,7 @@ class ContainerDefinitionOptions:
20112
20310
  :param dns_servers: A list of DNS servers that are presented to the container. Default: - Default DNS servers.
20113
20311
  :param docker_labels: A key/value map of labels to add to the container. Default: - No labels.
20114
20312
  :param docker_security_options: A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. Default: - No security labels.
20313
+ :param enable_restart_policy: Enable a restart policy for a container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task. Default: - false unless ``restartIgnoredExitCodes`` or ``restartAttemptPeriod`` is set.
20115
20314
  :param entry_point: The ENTRYPOINT value to pass to the container. Default: - Entry point configured in container.
20116
20315
  :param environment: The environment variables to pass to the container. Default: - No environment variables.
20117
20316
  :param environment_files: The environment files to pass to the container. Default: - No environment files.
@@ -20130,6 +20329,8 @@ class ContainerDefinitionOptions:
20130
20329
  :param privileged: Specifies whether the container is marked as privileged. When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). Default: false
20131
20330
  :param pseudo_terminal: When this parameter is true, a TTY is allocated. This parameter maps to Tty in the "Create a container section" of the Docker Remote API and the --tty option to ``docker run``. Default: - false
20132
20331
  :param readonly_root_filesystem: When this parameter is true, the container is given read-only access to its root file system. Default: false
20332
+ :param restart_attempt_period: A period of time that the container must run for before a restart can be attempted. A container can be restarted only once every ``restartAttemptPeriod`` seconds. If a container isn't able to run for this time period and exits early, it will not be restarted. This property can't be used if ``enableRestartPolicy`` is set to false. You can set a minimum ``restartAttemptPeriod`` of 60 seconds and a maximum ``restartAttemptPeriod`` of 1800 seconds. Default: - Duration.seconds(300) if ``enableRestartPolicy`` is true, otherwise no period.
20333
+ :param restart_ignored_exit_codes: A list of exit codes that Amazon ECS will ignore and not attempt a restart on. This property can't be used if ``enableRestartPolicy`` is set to false. You can specify a maximum of 50 container exit codes. Default: - No exit codes are ignored.
20133
20334
  :param secrets: The secret environment variables to pass to the container. Default: - No secret environment variables.
20134
20335
  :param start_timeout: Time duration (in seconds) to wait before giving up on resolving dependencies for a container. Default: - none
20135
20336
  :param stop_timeout: Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. Default: - none
@@ -20184,6 +20385,7 @@ class ContainerDefinitionOptions:
20184
20385
  check_type(argname="argument dns_servers", value=dns_servers, expected_type=type_hints["dns_servers"])
20185
20386
  check_type(argname="argument docker_labels", value=docker_labels, expected_type=type_hints["docker_labels"])
20186
20387
  check_type(argname="argument docker_security_options", value=docker_security_options, expected_type=type_hints["docker_security_options"])
20388
+ check_type(argname="argument enable_restart_policy", value=enable_restart_policy, expected_type=type_hints["enable_restart_policy"])
20187
20389
  check_type(argname="argument entry_point", value=entry_point, expected_type=type_hints["entry_point"])
20188
20390
  check_type(argname="argument environment", value=environment, expected_type=type_hints["environment"])
20189
20391
  check_type(argname="argument environment_files", value=environment_files, expected_type=type_hints["environment_files"])
@@ -20202,6 +20404,8 @@ class ContainerDefinitionOptions:
20202
20404
  check_type(argname="argument privileged", value=privileged, expected_type=type_hints["privileged"])
20203
20405
  check_type(argname="argument pseudo_terminal", value=pseudo_terminal, expected_type=type_hints["pseudo_terminal"])
20204
20406
  check_type(argname="argument readonly_root_filesystem", value=readonly_root_filesystem, expected_type=type_hints["readonly_root_filesystem"])
20407
+ check_type(argname="argument restart_attempt_period", value=restart_attempt_period, expected_type=type_hints["restart_attempt_period"])
20408
+ check_type(argname="argument restart_ignored_exit_codes", value=restart_ignored_exit_codes, expected_type=type_hints["restart_ignored_exit_codes"])
20205
20409
  check_type(argname="argument secrets", value=secrets, expected_type=type_hints["secrets"])
20206
20410
  check_type(argname="argument start_timeout", value=start_timeout, expected_type=type_hints["start_timeout"])
20207
20411
  check_type(argname="argument stop_timeout", value=stop_timeout, expected_type=type_hints["stop_timeout"])
@@ -20230,6 +20434,8 @@ class ContainerDefinitionOptions:
20230
20434
  self._values["docker_labels"] = docker_labels
20231
20435
  if docker_security_options is not None:
20232
20436
  self._values["docker_security_options"] = docker_security_options
20437
+ if enable_restart_policy is not None:
20438
+ self._values["enable_restart_policy"] = enable_restart_policy
20233
20439
  if entry_point is not None:
20234
20440
  self._values["entry_point"] = entry_point
20235
20441
  if environment is not None:
@@ -20266,6 +20472,10 @@ class ContainerDefinitionOptions:
20266
20472
  self._values["pseudo_terminal"] = pseudo_terminal
20267
20473
  if readonly_root_filesystem is not None:
20268
20474
  self._values["readonly_root_filesystem"] = readonly_root_filesystem
20475
+ if restart_attempt_period is not None:
20476
+ self._values["restart_attempt_period"] = restart_attempt_period
20477
+ if restart_ignored_exit_codes is not None:
20478
+ self._values["restart_ignored_exit_codes"] = restart_ignored_exit_codes
20269
20479
  if secrets is not None:
20270
20480
  self._values["secrets"] = secrets
20271
20481
  if start_timeout is not None:
@@ -20385,6 +20595,19 @@ class ContainerDefinitionOptions:
20385
20595
  result = self._values.get("docker_security_options")
20386
20596
  return typing.cast(typing.Optional[typing.List[builtins.str]], result)
20387
20597
 
20598
+ @builtins.property
20599
+ def enable_restart_policy(self) -> typing.Optional[builtins.bool]:
20600
+ '''Enable a restart policy for a container.
20601
+
20602
+ When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task.
20603
+
20604
+ :default: - false unless ``restartIgnoredExitCodes`` or ``restartAttemptPeriod`` is set.
20605
+
20606
+ :see: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-restart-policy.html
20607
+ '''
20608
+ result = self._values.get("enable_restart_policy")
20609
+ return typing.cast(typing.Optional[builtins.bool], result)
20610
+
20388
20611
  @builtins.property
20389
20612
  def entry_point(self) -> typing.Optional[typing.List[builtins.str]]:
20390
20613
  '''The ENTRYPOINT value to pass to the container.
@@ -20588,6 +20811,36 @@ class ContainerDefinitionOptions:
20588
20811
  result = self._values.get("readonly_root_filesystem")
20589
20812
  return typing.cast(typing.Optional[builtins.bool], result)
20590
20813
 
20814
+ @builtins.property
20815
+ def restart_attempt_period(self) -> typing.Optional[_Duration_4839e8c3]:
20816
+ '''A period of time that the container must run for before a restart can be attempted.
20817
+
20818
+ A container can be restarted only once every ``restartAttemptPeriod`` seconds.
20819
+ If a container isn't able to run for this time period and exits early, it will not be restarted.
20820
+
20821
+ This property can't be used if ``enableRestartPolicy`` is set to false.
20822
+
20823
+ You can set a minimum ``restartAttemptPeriod`` of 60 seconds and a maximum ``restartAttemptPeriod``
20824
+ of 1800 seconds.
20825
+
20826
+ :default: - Duration.seconds(300) if ``enableRestartPolicy`` is true, otherwise no period.
20827
+ '''
20828
+ result = self._values.get("restart_attempt_period")
20829
+ return typing.cast(typing.Optional[_Duration_4839e8c3], result)
20830
+
20831
+ @builtins.property
20832
+ def restart_ignored_exit_codes(self) -> typing.Optional[typing.List[jsii.Number]]:
20833
+ '''A list of exit codes that Amazon ECS will ignore and not attempt a restart on.
20834
+
20835
+ This property can't be used if ``enableRestartPolicy`` is set to false.
20836
+
20837
+ You can specify a maximum of 50 container exit codes.
20838
+
20839
+ :default: - No exit codes are ignored.
20840
+ '''
20841
+ result = self._values.get("restart_ignored_exit_codes")
20842
+ return typing.cast(typing.Optional[typing.List[jsii.Number]], result)
20843
+
20591
20844
  @builtins.property
20592
20845
  def secrets(self) -> typing.Optional[typing.Mapping[builtins.str, "Secret"]]:
20593
20846
  '''The secret environment variables to pass to the container.
@@ -20680,6 +20933,7 @@ class ContainerDefinitionOptions:
20680
20933
  "dns_servers": "dnsServers",
20681
20934
  "docker_labels": "dockerLabels",
20682
20935
  "docker_security_options": "dockerSecurityOptions",
20936
+ "enable_restart_policy": "enableRestartPolicy",
20683
20937
  "entry_point": "entryPoint",
20684
20938
  "environment": "environment",
20685
20939
  "environment_files": "environmentFiles",
@@ -20698,6 +20952,8 @@ class ContainerDefinitionOptions:
20698
20952
  "privileged": "privileged",
20699
20953
  "pseudo_terminal": "pseudoTerminal",
20700
20954
  "readonly_root_filesystem": "readonlyRootFilesystem",
20955
+ "restart_attempt_period": "restartAttemptPeriod",
20956
+ "restart_ignored_exit_codes": "restartIgnoredExitCodes",
20701
20957
  "secrets": "secrets",
20702
20958
  "start_timeout": "startTimeout",
20703
20959
  "stop_timeout": "stopTimeout",
@@ -20722,6 +20978,7 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
20722
20978
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
20723
20979
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
20724
20980
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
20981
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
20725
20982
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
20726
20983
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
20727
20984
  environment_files: typing.Optional[typing.Sequence["EnvironmentFile"]] = None,
@@ -20740,6 +20997,8 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
20740
20997
  privileged: typing.Optional[builtins.bool] = None,
20741
20998
  pseudo_terminal: typing.Optional[builtins.bool] = None,
20742
20999
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
21000
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
21001
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
20743
21002
  secrets: typing.Optional[typing.Mapping[builtins.str, "Secret"]] = None,
20744
21003
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
20745
21004
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -20761,6 +21020,7 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
20761
21020
  :param dns_servers: A list of DNS servers that are presented to the container. Default: - Default DNS servers.
20762
21021
  :param docker_labels: A key/value map of labels to add to the container. Default: - No labels.
20763
21022
  :param docker_security_options: A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. Default: - No security labels.
21023
+ :param enable_restart_policy: Enable a restart policy for a container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task. Default: - false unless ``restartIgnoredExitCodes`` or ``restartAttemptPeriod`` is set.
20764
21024
  :param entry_point: The ENTRYPOINT value to pass to the container. Default: - Entry point configured in container.
20765
21025
  :param environment: The environment variables to pass to the container. Default: - No environment variables.
20766
21026
  :param environment_files: The environment files to pass to the container. Default: - No environment files.
@@ -20779,6 +21039,8 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
20779
21039
  :param privileged: Specifies whether the container is marked as privileged. When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). Default: false
20780
21040
  :param pseudo_terminal: When this parameter is true, a TTY is allocated. This parameter maps to Tty in the "Create a container section" of the Docker Remote API and the --tty option to ``docker run``. Default: - false
20781
21041
  :param readonly_root_filesystem: When this parameter is true, the container is given read-only access to its root file system. Default: false
21042
+ :param restart_attempt_period: A period of time that the container must run for before a restart can be attempted. A container can be restarted only once every ``restartAttemptPeriod`` seconds. If a container isn't able to run for this time period and exits early, it will not be restarted. This property can't be used if ``enableRestartPolicy`` is set to false. You can set a minimum ``restartAttemptPeriod`` of 60 seconds and a maximum ``restartAttemptPeriod`` of 1800 seconds. Default: - Duration.seconds(300) if ``enableRestartPolicy`` is true, otherwise no period.
21043
+ :param restart_ignored_exit_codes: A list of exit codes that Amazon ECS will ignore and not attempt a restart on. This property can't be used if ``enableRestartPolicy`` is set to false. You can specify a maximum of 50 container exit codes. Default: - No exit codes are ignored.
20782
21044
  :param secrets: The secret environment variables to pass to the container. Default: - No secret environment variables.
20783
21045
  :param start_timeout: Time duration (in seconds) to wait before giving up on resolving dependencies for a container. Default: - none
20784
21046
  :param stop_timeout: Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. Default: - none
@@ -20822,6 +21084,7 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
20822
21084
  "docker_labels_key": "dockerLabels"
20823
21085
  },
20824
21086
  docker_security_options=["dockerSecurityOptions"],
21087
+ enable_restart_policy=False,
20825
21088
  entry_point=["entryPoint"],
20826
21089
  environment={
20827
21090
  "environment_key": "environment"
@@ -20861,6 +21124,8 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
20861
21124
  privileged=False,
20862
21125
  pseudo_terminal=False,
20863
21126
  readonly_root_filesystem=False,
21127
+ restart_attempt_period=cdk.Duration.minutes(30),
21128
+ restart_ignored_exit_codes=[123],
20864
21129
  secrets={
20865
21130
  "secrets_key": secret
20866
21131
  },
@@ -20893,6 +21158,7 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
20893
21158
  check_type(argname="argument dns_servers", value=dns_servers, expected_type=type_hints["dns_servers"])
20894
21159
  check_type(argname="argument docker_labels", value=docker_labels, expected_type=type_hints["docker_labels"])
20895
21160
  check_type(argname="argument docker_security_options", value=docker_security_options, expected_type=type_hints["docker_security_options"])
21161
+ check_type(argname="argument enable_restart_policy", value=enable_restart_policy, expected_type=type_hints["enable_restart_policy"])
20896
21162
  check_type(argname="argument entry_point", value=entry_point, expected_type=type_hints["entry_point"])
20897
21163
  check_type(argname="argument environment", value=environment, expected_type=type_hints["environment"])
20898
21164
  check_type(argname="argument environment_files", value=environment_files, expected_type=type_hints["environment_files"])
@@ -20911,6 +21177,8 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
20911
21177
  check_type(argname="argument privileged", value=privileged, expected_type=type_hints["privileged"])
20912
21178
  check_type(argname="argument pseudo_terminal", value=pseudo_terminal, expected_type=type_hints["pseudo_terminal"])
20913
21179
  check_type(argname="argument readonly_root_filesystem", value=readonly_root_filesystem, expected_type=type_hints["readonly_root_filesystem"])
21180
+ check_type(argname="argument restart_attempt_period", value=restart_attempt_period, expected_type=type_hints["restart_attempt_period"])
21181
+ check_type(argname="argument restart_ignored_exit_codes", value=restart_ignored_exit_codes, expected_type=type_hints["restart_ignored_exit_codes"])
20914
21182
  check_type(argname="argument secrets", value=secrets, expected_type=type_hints["secrets"])
20915
21183
  check_type(argname="argument start_timeout", value=start_timeout, expected_type=type_hints["start_timeout"])
20916
21184
  check_type(argname="argument stop_timeout", value=stop_timeout, expected_type=type_hints["stop_timeout"])
@@ -20941,6 +21209,8 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
20941
21209
  self._values["docker_labels"] = docker_labels
20942
21210
  if docker_security_options is not None:
20943
21211
  self._values["docker_security_options"] = docker_security_options
21212
+ if enable_restart_policy is not None:
21213
+ self._values["enable_restart_policy"] = enable_restart_policy
20944
21214
  if entry_point is not None:
20945
21215
  self._values["entry_point"] = entry_point
20946
21216
  if environment is not None:
@@ -20977,6 +21247,10 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
20977
21247
  self._values["pseudo_terminal"] = pseudo_terminal
20978
21248
  if readonly_root_filesystem is not None:
20979
21249
  self._values["readonly_root_filesystem"] = readonly_root_filesystem
21250
+ if restart_attempt_period is not None:
21251
+ self._values["restart_attempt_period"] = restart_attempt_period
21252
+ if restart_ignored_exit_codes is not None:
21253
+ self._values["restart_ignored_exit_codes"] = restart_ignored_exit_codes
20980
21254
  if secrets is not None:
20981
21255
  self._values["secrets"] = secrets
20982
21256
  if start_timeout is not None:
@@ -21096,6 +21370,19 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
21096
21370
  result = self._values.get("docker_security_options")
21097
21371
  return typing.cast(typing.Optional[typing.List[builtins.str]], result)
21098
21372
 
21373
+ @builtins.property
21374
+ def enable_restart_policy(self) -> typing.Optional[builtins.bool]:
21375
+ '''Enable a restart policy for a container.
21376
+
21377
+ When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task.
21378
+
21379
+ :default: - false unless ``restartIgnoredExitCodes`` or ``restartAttemptPeriod`` is set.
21380
+
21381
+ :see: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-restart-policy.html
21382
+ '''
21383
+ result = self._values.get("enable_restart_policy")
21384
+ return typing.cast(typing.Optional[builtins.bool], result)
21385
+
21099
21386
  @builtins.property
21100
21387
  def entry_point(self) -> typing.Optional[typing.List[builtins.str]]:
21101
21388
  '''The ENTRYPOINT value to pass to the container.
@@ -21299,6 +21586,36 @@ class ContainerDefinitionProps(ContainerDefinitionOptions):
21299
21586
  result = self._values.get("readonly_root_filesystem")
21300
21587
  return typing.cast(typing.Optional[builtins.bool], result)
21301
21588
 
21589
+ @builtins.property
21590
+ def restart_attempt_period(self) -> typing.Optional[_Duration_4839e8c3]:
21591
+ '''A period of time that the container must run for before a restart can be attempted.
21592
+
21593
+ A container can be restarted only once every ``restartAttemptPeriod`` seconds.
21594
+ If a container isn't able to run for this time period and exits early, it will not be restarted.
21595
+
21596
+ This property can't be used if ``enableRestartPolicy`` is set to false.
21597
+
21598
+ You can set a minimum ``restartAttemptPeriod`` of 60 seconds and a maximum ``restartAttemptPeriod``
21599
+ of 1800 seconds.
21600
+
21601
+ :default: - Duration.seconds(300) if ``enableRestartPolicy`` is true, otherwise no period.
21602
+ '''
21603
+ result = self._values.get("restart_attempt_period")
21604
+ return typing.cast(typing.Optional[_Duration_4839e8c3], result)
21605
+
21606
+ @builtins.property
21607
+ def restart_ignored_exit_codes(self) -> typing.Optional[typing.List[jsii.Number]]:
21608
+ '''A list of exit codes that Amazon ECS will ignore and not attempt a restart on.
21609
+
21610
+ This property can't be used if ``enableRestartPolicy`` is set to false.
21611
+
21612
+ You can specify a maximum of 50 container exit codes.
21613
+
21614
+ :default: - No exit codes are ignored.
21615
+ '''
21616
+ result = self._values.get("restart_ignored_exit_codes")
21617
+ return typing.cast(typing.Optional[typing.List[jsii.Number]], result)
21618
+
21302
21619
  @builtins.property
21303
21620
  def secrets(self) -> typing.Optional[typing.Mapping[builtins.str, "Secret"]]:
21304
21621
  '''The secret environment variables to pass to the container.
@@ -26929,6 +27246,7 @@ class FirelensLogRouter(
26929
27246
  "docker_labels_key": "dockerLabels"
26930
27247
  },
26931
27248
  docker_security_options=["dockerSecurityOptions"],
27249
+ enable_restart_policy=False,
26932
27250
  entry_point=["entryPoint"],
26933
27251
  environment={
26934
27252
  "environment_key": "environment"
@@ -26968,6 +27286,8 @@ class FirelensLogRouter(
26968
27286
  privileged=False,
26969
27287
  pseudo_terminal=False,
26970
27288
  readonly_root_filesystem=False,
27289
+ restart_attempt_period=cdk.Duration.minutes(30),
27290
+ restart_ignored_exit_codes=[123],
26971
27291
  secrets={
26972
27292
  "secrets_key": secret
26973
27293
  },
@@ -27004,6 +27324,7 @@ class FirelensLogRouter(
27004
27324
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
27005
27325
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
27006
27326
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
27327
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
27007
27328
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
27008
27329
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
27009
27330
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -27022,6 +27343,8 @@ class FirelensLogRouter(
27022
27343
  privileged: typing.Optional[builtins.bool] = None,
27023
27344
  pseudo_terminal: typing.Optional[builtins.bool] = None,
27024
27345
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
27346
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
27347
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
27025
27348
  secrets: typing.Optional[typing.Mapping[builtins.str, "Secret"]] = None,
27026
27349
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
27027
27350
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -27046,6 +27369,7 @@ class FirelensLogRouter(
27046
27369
  :param dns_servers: A list of DNS servers that are presented to the container. Default: - Default DNS servers.
27047
27370
  :param docker_labels: A key/value map of labels to add to the container. Default: - No labels.
27048
27371
  :param docker_security_options: A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. Default: - No security labels.
27372
+ :param enable_restart_policy: Enable a restart policy for a container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task. Default: - false unless ``restartIgnoredExitCodes`` or ``restartAttemptPeriod`` is set.
27049
27373
  :param entry_point: The ENTRYPOINT value to pass to the container. Default: - Entry point configured in container.
27050
27374
  :param environment: The environment variables to pass to the container. Default: - No environment variables.
27051
27375
  :param environment_files: The environment files to pass to the container. Default: - No environment files.
@@ -27064,6 +27388,8 @@ class FirelensLogRouter(
27064
27388
  :param privileged: Specifies whether the container is marked as privileged. When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). Default: false
27065
27389
  :param pseudo_terminal: When this parameter is true, a TTY is allocated. This parameter maps to Tty in the "Create a container section" of the Docker Remote API and the --tty option to ``docker run``. Default: - false
27066
27390
  :param readonly_root_filesystem: When this parameter is true, the container is given read-only access to its root file system. Default: false
27391
+ :param restart_attempt_period: A period of time that the container must run for before a restart can be attempted. A container can be restarted only once every ``restartAttemptPeriod`` seconds. If a container isn't able to run for this time period and exits early, it will not be restarted. This property can't be used if ``enableRestartPolicy`` is set to false. You can set a minimum ``restartAttemptPeriod`` of 60 seconds and a maximum ``restartAttemptPeriod`` of 1800 seconds. Default: - Duration.seconds(300) if ``enableRestartPolicy`` is true, otherwise no period.
27392
+ :param restart_ignored_exit_codes: A list of exit codes that Amazon ECS will ignore and not attempt a restart on. This property can't be used if ``enableRestartPolicy`` is set to false. You can specify a maximum of 50 container exit codes. Default: - No exit codes are ignored.
27067
27393
  :param secrets: The secret environment variables to pass to the container. Default: - No secret environment variables.
27068
27394
  :param start_timeout: Time duration (in seconds) to wait before giving up on resolving dependencies for a container. Default: - none
27069
27395
  :param stop_timeout: Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. Default: - none
@@ -27089,6 +27415,7 @@ class FirelensLogRouter(
27089
27415
  dns_servers=dns_servers,
27090
27416
  docker_labels=docker_labels,
27091
27417
  docker_security_options=docker_security_options,
27418
+ enable_restart_policy=enable_restart_policy,
27092
27419
  entry_point=entry_point,
27093
27420
  environment=environment,
27094
27421
  environment_files=environment_files,
@@ -27107,6 +27434,8 @@ class FirelensLogRouter(
27107
27434
  privileged=privileged,
27108
27435
  pseudo_terminal=pseudo_terminal,
27109
27436
  readonly_root_filesystem=readonly_root_filesystem,
27437
+ restart_attempt_period=restart_attempt_period,
27438
+ restart_ignored_exit_codes=restart_ignored_exit_codes,
27110
27439
  secrets=secrets,
27111
27440
  start_timeout=start_timeout,
27112
27441
  stop_timeout=stop_timeout,
@@ -27153,6 +27482,7 @@ class FirelensLogRouter(
27153
27482
  "dns_servers": "dnsServers",
27154
27483
  "docker_labels": "dockerLabels",
27155
27484
  "docker_security_options": "dockerSecurityOptions",
27485
+ "enable_restart_policy": "enableRestartPolicy",
27156
27486
  "entry_point": "entryPoint",
27157
27487
  "environment": "environment",
27158
27488
  "environment_files": "environmentFiles",
@@ -27171,6 +27501,8 @@ class FirelensLogRouter(
27171
27501
  "privileged": "privileged",
27172
27502
  "pseudo_terminal": "pseudoTerminal",
27173
27503
  "readonly_root_filesystem": "readonlyRootFilesystem",
27504
+ "restart_attempt_period": "restartAttemptPeriod",
27505
+ "restart_ignored_exit_codes": "restartIgnoredExitCodes",
27174
27506
  "secrets": "secrets",
27175
27507
  "start_timeout": "startTimeout",
27176
27508
  "stop_timeout": "stopTimeout",
@@ -27195,6 +27527,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27195
27527
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
27196
27528
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
27197
27529
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
27530
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
27198
27531
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
27199
27532
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
27200
27533
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -27213,6 +27546,8 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27213
27546
  privileged: typing.Optional[builtins.bool] = None,
27214
27547
  pseudo_terminal: typing.Optional[builtins.bool] = None,
27215
27548
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
27549
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
27550
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
27216
27551
  secrets: typing.Optional[typing.Mapping[builtins.str, "Secret"]] = None,
27217
27552
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
27218
27553
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -27234,6 +27569,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27234
27569
  :param dns_servers: A list of DNS servers that are presented to the container. Default: - Default DNS servers.
27235
27570
  :param docker_labels: A key/value map of labels to add to the container. Default: - No labels.
27236
27571
  :param docker_security_options: A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. Default: - No security labels.
27572
+ :param enable_restart_policy: Enable a restart policy for a container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task. Default: - false unless ``restartIgnoredExitCodes`` or ``restartAttemptPeriod`` is set.
27237
27573
  :param entry_point: The ENTRYPOINT value to pass to the container. Default: - Entry point configured in container.
27238
27574
  :param environment: The environment variables to pass to the container. Default: - No environment variables.
27239
27575
  :param environment_files: The environment files to pass to the container. Default: - No environment files.
@@ -27252,6 +27588,8 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27252
27588
  :param privileged: Specifies whether the container is marked as privileged. When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). Default: false
27253
27589
  :param pseudo_terminal: When this parameter is true, a TTY is allocated. This parameter maps to Tty in the "Create a container section" of the Docker Remote API and the --tty option to ``docker run``. Default: - false
27254
27590
  :param readonly_root_filesystem: When this parameter is true, the container is given read-only access to its root file system. Default: false
27591
+ :param restart_attempt_period: A period of time that the container must run for before a restart can be attempted. A container can be restarted only once every ``restartAttemptPeriod`` seconds. If a container isn't able to run for this time period and exits early, it will not be restarted. This property can't be used if ``enableRestartPolicy`` is set to false. You can set a minimum ``restartAttemptPeriod`` of 60 seconds and a maximum ``restartAttemptPeriod`` of 1800 seconds. Default: - Duration.seconds(300) if ``enableRestartPolicy`` is true, otherwise no period.
27592
+ :param restart_ignored_exit_codes: A list of exit codes that Amazon ECS will ignore and not attempt a restart on. This property can't be used if ``enableRestartPolicy`` is set to false. You can specify a maximum of 50 container exit codes. Default: - No exit codes are ignored.
27255
27593
  :param secrets: The secret environment variables to pass to the container. Default: - No secret environment variables.
27256
27594
  :param start_timeout: Time duration (in seconds) to wait before giving up on resolving dependencies for a container. Default: - none
27257
27595
  :param stop_timeout: Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. Default: - none
@@ -27303,6 +27641,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27303
27641
  "docker_labels_key": "dockerLabels"
27304
27642
  },
27305
27643
  docker_security_options=["dockerSecurityOptions"],
27644
+ enable_restart_policy=False,
27306
27645
  entry_point=["entryPoint"],
27307
27646
  environment={
27308
27647
  "environment_key": "environment"
@@ -27342,6 +27681,8 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27342
27681
  privileged=False,
27343
27682
  pseudo_terminal=False,
27344
27683
  readonly_root_filesystem=False,
27684
+ restart_attempt_period=cdk.Duration.minutes(30),
27685
+ restart_ignored_exit_codes=[123],
27345
27686
  secrets={
27346
27687
  "secrets_key": secret
27347
27688
  },
@@ -27376,6 +27717,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27376
27717
  check_type(argname="argument dns_servers", value=dns_servers, expected_type=type_hints["dns_servers"])
27377
27718
  check_type(argname="argument docker_labels", value=docker_labels, expected_type=type_hints["docker_labels"])
27378
27719
  check_type(argname="argument docker_security_options", value=docker_security_options, expected_type=type_hints["docker_security_options"])
27720
+ check_type(argname="argument enable_restart_policy", value=enable_restart_policy, expected_type=type_hints["enable_restart_policy"])
27379
27721
  check_type(argname="argument entry_point", value=entry_point, expected_type=type_hints["entry_point"])
27380
27722
  check_type(argname="argument environment", value=environment, expected_type=type_hints["environment"])
27381
27723
  check_type(argname="argument environment_files", value=environment_files, expected_type=type_hints["environment_files"])
@@ -27394,6 +27736,8 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27394
27736
  check_type(argname="argument privileged", value=privileged, expected_type=type_hints["privileged"])
27395
27737
  check_type(argname="argument pseudo_terminal", value=pseudo_terminal, expected_type=type_hints["pseudo_terminal"])
27396
27738
  check_type(argname="argument readonly_root_filesystem", value=readonly_root_filesystem, expected_type=type_hints["readonly_root_filesystem"])
27739
+ check_type(argname="argument restart_attempt_period", value=restart_attempt_period, expected_type=type_hints["restart_attempt_period"])
27740
+ check_type(argname="argument restart_ignored_exit_codes", value=restart_ignored_exit_codes, expected_type=type_hints["restart_ignored_exit_codes"])
27397
27741
  check_type(argname="argument secrets", value=secrets, expected_type=type_hints["secrets"])
27398
27742
  check_type(argname="argument start_timeout", value=start_timeout, expected_type=type_hints["start_timeout"])
27399
27743
  check_type(argname="argument stop_timeout", value=stop_timeout, expected_type=type_hints["stop_timeout"])
@@ -27424,6 +27768,8 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27424
27768
  self._values["docker_labels"] = docker_labels
27425
27769
  if docker_security_options is not None:
27426
27770
  self._values["docker_security_options"] = docker_security_options
27771
+ if enable_restart_policy is not None:
27772
+ self._values["enable_restart_policy"] = enable_restart_policy
27427
27773
  if entry_point is not None:
27428
27774
  self._values["entry_point"] = entry_point
27429
27775
  if environment is not None:
@@ -27460,6 +27806,10 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27460
27806
  self._values["pseudo_terminal"] = pseudo_terminal
27461
27807
  if readonly_root_filesystem is not None:
27462
27808
  self._values["readonly_root_filesystem"] = readonly_root_filesystem
27809
+ if restart_attempt_period is not None:
27810
+ self._values["restart_attempt_period"] = restart_attempt_period
27811
+ if restart_ignored_exit_codes is not None:
27812
+ self._values["restart_ignored_exit_codes"] = restart_ignored_exit_codes
27463
27813
  if secrets is not None:
27464
27814
  self._values["secrets"] = secrets
27465
27815
  if start_timeout is not None:
@@ -27579,6 +27929,19 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27579
27929
  result = self._values.get("docker_security_options")
27580
27930
  return typing.cast(typing.Optional[typing.List[builtins.str]], result)
27581
27931
 
27932
+ @builtins.property
27933
+ def enable_restart_policy(self) -> typing.Optional[builtins.bool]:
27934
+ '''Enable a restart policy for a container.
27935
+
27936
+ When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task.
27937
+
27938
+ :default: - false unless ``restartIgnoredExitCodes`` or ``restartAttemptPeriod`` is set.
27939
+
27940
+ :see: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-restart-policy.html
27941
+ '''
27942
+ result = self._values.get("enable_restart_policy")
27943
+ return typing.cast(typing.Optional[builtins.bool], result)
27944
+
27582
27945
  @builtins.property
27583
27946
  def entry_point(self) -> typing.Optional[typing.List[builtins.str]]:
27584
27947
  '''The ENTRYPOINT value to pass to the container.
@@ -27782,6 +28145,36 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27782
28145
  result = self._values.get("readonly_root_filesystem")
27783
28146
  return typing.cast(typing.Optional[builtins.bool], result)
27784
28147
 
28148
+ @builtins.property
28149
+ def restart_attempt_period(self) -> typing.Optional[_Duration_4839e8c3]:
28150
+ '''A period of time that the container must run for before a restart can be attempted.
28151
+
28152
+ A container can be restarted only once every ``restartAttemptPeriod`` seconds.
28153
+ If a container isn't able to run for this time period and exits early, it will not be restarted.
28154
+
28155
+ This property can't be used if ``enableRestartPolicy`` is set to false.
28156
+
28157
+ You can set a minimum ``restartAttemptPeriod`` of 60 seconds and a maximum ``restartAttemptPeriod``
28158
+ of 1800 seconds.
28159
+
28160
+ :default: - Duration.seconds(300) if ``enableRestartPolicy`` is true, otherwise no period.
28161
+ '''
28162
+ result = self._values.get("restart_attempt_period")
28163
+ return typing.cast(typing.Optional[_Duration_4839e8c3], result)
28164
+
28165
+ @builtins.property
28166
+ def restart_ignored_exit_codes(self) -> typing.Optional[typing.List[jsii.Number]]:
28167
+ '''A list of exit codes that Amazon ECS will ignore and not attempt a restart on.
28168
+
28169
+ This property can't be used if ``enableRestartPolicy`` is set to false.
28170
+
28171
+ You can specify a maximum of 50 container exit codes.
28172
+
28173
+ :default: - No exit codes are ignored.
28174
+ '''
28175
+ result = self._values.get("restart_ignored_exit_codes")
28176
+ return typing.cast(typing.Optional[typing.List[jsii.Number]], result)
28177
+
27785
28178
  @builtins.property
27786
28179
  def secrets(self) -> typing.Optional[typing.Mapping[builtins.str, "Secret"]]:
27787
28180
  '''The secret environment variables to pass to the container.
@@ -27881,6 +28274,7 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27881
28274
  "dns_servers": "dnsServers",
27882
28275
  "docker_labels": "dockerLabels",
27883
28276
  "docker_security_options": "dockerSecurityOptions",
28277
+ "enable_restart_policy": "enableRestartPolicy",
27884
28278
  "entry_point": "entryPoint",
27885
28279
  "environment": "environment",
27886
28280
  "environment_files": "environmentFiles",
@@ -27899,6 +28293,8 @@ class FirelensLogRouterDefinitionOptions(ContainerDefinitionOptions):
27899
28293
  "privileged": "privileged",
27900
28294
  "pseudo_terminal": "pseudoTerminal",
27901
28295
  "readonly_root_filesystem": "readonlyRootFilesystem",
28296
+ "restart_attempt_period": "restartAttemptPeriod",
28297
+ "restart_ignored_exit_codes": "restartIgnoredExitCodes",
27902
28298
  "secrets": "secrets",
27903
28299
  "start_timeout": "startTimeout",
27904
28300
  "stop_timeout": "stopTimeout",
@@ -27924,6 +28320,7 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
27924
28320
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
27925
28321
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
27926
28322
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
28323
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
27927
28324
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
27928
28325
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
27929
28326
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -27942,6 +28339,8 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
27942
28339
  privileged: typing.Optional[builtins.bool] = None,
27943
28340
  pseudo_terminal: typing.Optional[builtins.bool] = None,
27944
28341
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
28342
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
28343
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
27945
28344
  secrets: typing.Optional[typing.Mapping[builtins.str, "Secret"]] = None,
27946
28345
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
27947
28346
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -27964,6 +28363,7 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
27964
28363
  :param dns_servers: A list of DNS servers that are presented to the container. Default: - Default DNS servers.
27965
28364
  :param docker_labels: A key/value map of labels to add to the container. Default: - No labels.
27966
28365
  :param docker_security_options: A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. Default: - No security labels.
28366
+ :param enable_restart_policy: Enable a restart policy for a container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task. Default: - false unless ``restartIgnoredExitCodes`` or ``restartAttemptPeriod`` is set.
27967
28367
  :param entry_point: The ENTRYPOINT value to pass to the container. Default: - Entry point configured in container.
27968
28368
  :param environment: The environment variables to pass to the container. Default: - No environment variables.
27969
28369
  :param environment_files: The environment files to pass to the container. Default: - No environment files.
@@ -27982,6 +28382,8 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
27982
28382
  :param privileged: Specifies whether the container is marked as privileged. When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). Default: false
27983
28383
  :param pseudo_terminal: When this parameter is true, a TTY is allocated. This parameter maps to Tty in the "Create a container section" of the Docker Remote API and the --tty option to ``docker run``. Default: - false
27984
28384
  :param readonly_root_filesystem: When this parameter is true, the container is given read-only access to its root file system. Default: false
28385
+ :param restart_attempt_period: A period of time that the container must run for before a restart can be attempted. A container can be restarted only once every ``restartAttemptPeriod`` seconds. If a container isn't able to run for this time period and exits early, it will not be restarted. This property can't be used if ``enableRestartPolicy`` is set to false. You can set a minimum ``restartAttemptPeriod`` of 60 seconds and a maximum ``restartAttemptPeriod`` of 1800 seconds. Default: - Duration.seconds(300) if ``enableRestartPolicy`` is true, otherwise no period.
28386
+ :param restart_ignored_exit_codes: A list of exit codes that Amazon ECS will ignore and not attempt a restart on. This property can't be used if ``enableRestartPolicy`` is set to false. You can specify a maximum of 50 container exit codes. Default: - No exit codes are ignored.
27985
28387
  :param secrets: The secret environment variables to pass to the container. Default: - No secret environment variables.
27986
28388
  :param start_timeout: Time duration (in seconds) to wait before giving up on resolving dependencies for a container. Default: - none
27987
28389
  :param stop_timeout: Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. Default: - none
@@ -28036,6 +28438,7 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
28036
28438
  "docker_labels_key": "dockerLabels"
28037
28439
  },
28038
28440
  docker_security_options=["dockerSecurityOptions"],
28441
+ enable_restart_policy=False,
28039
28442
  entry_point=["entryPoint"],
28040
28443
  environment={
28041
28444
  "environment_key": "environment"
@@ -28075,6 +28478,8 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
28075
28478
  privileged=False,
28076
28479
  pseudo_terminal=False,
28077
28480
  readonly_root_filesystem=False,
28481
+ restart_attempt_period=cdk.Duration.minutes(30),
28482
+ restart_ignored_exit_codes=[123],
28078
28483
  secrets={
28079
28484
  "secrets_key": secret
28080
28485
  },
@@ -28109,6 +28514,7 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
28109
28514
  check_type(argname="argument dns_servers", value=dns_servers, expected_type=type_hints["dns_servers"])
28110
28515
  check_type(argname="argument docker_labels", value=docker_labels, expected_type=type_hints["docker_labels"])
28111
28516
  check_type(argname="argument docker_security_options", value=docker_security_options, expected_type=type_hints["docker_security_options"])
28517
+ check_type(argname="argument enable_restart_policy", value=enable_restart_policy, expected_type=type_hints["enable_restart_policy"])
28112
28518
  check_type(argname="argument entry_point", value=entry_point, expected_type=type_hints["entry_point"])
28113
28519
  check_type(argname="argument environment", value=environment, expected_type=type_hints["environment"])
28114
28520
  check_type(argname="argument environment_files", value=environment_files, expected_type=type_hints["environment_files"])
@@ -28127,6 +28533,8 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
28127
28533
  check_type(argname="argument privileged", value=privileged, expected_type=type_hints["privileged"])
28128
28534
  check_type(argname="argument pseudo_terminal", value=pseudo_terminal, expected_type=type_hints["pseudo_terminal"])
28129
28535
  check_type(argname="argument readonly_root_filesystem", value=readonly_root_filesystem, expected_type=type_hints["readonly_root_filesystem"])
28536
+ check_type(argname="argument restart_attempt_period", value=restart_attempt_period, expected_type=type_hints["restart_attempt_period"])
28537
+ check_type(argname="argument restart_ignored_exit_codes", value=restart_ignored_exit_codes, expected_type=type_hints["restart_ignored_exit_codes"])
28130
28538
  check_type(argname="argument secrets", value=secrets, expected_type=type_hints["secrets"])
28131
28539
  check_type(argname="argument start_timeout", value=start_timeout, expected_type=type_hints["start_timeout"])
28132
28540
  check_type(argname="argument stop_timeout", value=stop_timeout, expected_type=type_hints["stop_timeout"])
@@ -28159,6 +28567,8 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
28159
28567
  self._values["docker_labels"] = docker_labels
28160
28568
  if docker_security_options is not None:
28161
28569
  self._values["docker_security_options"] = docker_security_options
28570
+ if enable_restart_policy is not None:
28571
+ self._values["enable_restart_policy"] = enable_restart_policy
28162
28572
  if entry_point is not None:
28163
28573
  self._values["entry_point"] = entry_point
28164
28574
  if environment is not None:
@@ -28195,6 +28605,10 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
28195
28605
  self._values["pseudo_terminal"] = pseudo_terminal
28196
28606
  if readonly_root_filesystem is not None:
28197
28607
  self._values["readonly_root_filesystem"] = readonly_root_filesystem
28608
+ if restart_attempt_period is not None:
28609
+ self._values["restart_attempt_period"] = restart_attempt_period
28610
+ if restart_ignored_exit_codes is not None:
28611
+ self._values["restart_ignored_exit_codes"] = restart_ignored_exit_codes
28198
28612
  if secrets is not None:
28199
28613
  self._values["secrets"] = secrets
28200
28614
  if start_timeout is not None:
@@ -28314,6 +28728,19 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
28314
28728
  result = self._values.get("docker_security_options")
28315
28729
  return typing.cast(typing.Optional[typing.List[builtins.str]], result)
28316
28730
 
28731
+ @builtins.property
28732
+ def enable_restart_policy(self) -> typing.Optional[builtins.bool]:
28733
+ '''Enable a restart policy for a container.
28734
+
28735
+ When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task.
28736
+
28737
+ :default: - false unless ``restartIgnoredExitCodes`` or ``restartAttemptPeriod`` is set.
28738
+
28739
+ :see: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-restart-policy.html
28740
+ '''
28741
+ result = self._values.get("enable_restart_policy")
28742
+ return typing.cast(typing.Optional[builtins.bool], result)
28743
+
28317
28744
  @builtins.property
28318
28745
  def entry_point(self) -> typing.Optional[typing.List[builtins.str]]:
28319
28746
  '''The ENTRYPOINT value to pass to the container.
@@ -28517,6 +28944,36 @@ class FirelensLogRouterProps(ContainerDefinitionProps):
28517
28944
  result = self._values.get("readonly_root_filesystem")
28518
28945
  return typing.cast(typing.Optional[builtins.bool], result)
28519
28946
 
28947
+ @builtins.property
28948
+ def restart_attempt_period(self) -> typing.Optional[_Duration_4839e8c3]:
28949
+ '''A period of time that the container must run for before a restart can be attempted.
28950
+
28951
+ A container can be restarted only once every ``restartAttemptPeriod`` seconds.
28952
+ If a container isn't able to run for this time period and exits early, it will not be restarted.
28953
+
28954
+ This property can't be used if ``enableRestartPolicy`` is set to false.
28955
+
28956
+ You can set a minimum ``restartAttemptPeriod`` of 60 seconds and a maximum ``restartAttemptPeriod``
28957
+ of 1800 seconds.
28958
+
28959
+ :default: - Duration.seconds(300) if ``enableRestartPolicy`` is true, otherwise no period.
28960
+ '''
28961
+ result = self._values.get("restart_attempt_period")
28962
+ return typing.cast(typing.Optional[_Duration_4839e8c3], result)
28963
+
28964
+ @builtins.property
28965
+ def restart_ignored_exit_codes(self) -> typing.Optional[typing.List[jsii.Number]]:
28966
+ '''A list of exit codes that Amazon ECS will ignore and not attempt a restart on.
28967
+
28968
+ This property can't be used if ``enableRestartPolicy`` is set to false.
28969
+
28970
+ You can specify a maximum of 50 container exit codes.
28971
+
28972
+ :default: - No exit codes are ignored.
28973
+ '''
28974
+ result = self._values.get("restart_ignored_exit_codes")
28975
+ return typing.cast(typing.Optional[typing.List[jsii.Number]], result)
28976
+
28520
28977
  @builtins.property
28521
28978
  def secrets(self) -> typing.Optional[typing.Mapping[builtins.str, "Secret"]]:
28522
28979
  '''The secret environment variables to pass to the container.
@@ -35250,8 +35707,8 @@ class TagParameterContainerImage(
35250
35707
  # This is the Stack containing a simple ECS Service that uses the provided ContainerImage.
35251
35708
  #
35252
35709
  class EcsAppStack(cdk.Stack):
35253
- def __init__(self, scope, id, *, image, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None, crossRegionReferences=None, permissionsBoundary=None, suppressTemplateIndentation=None):
35254
- super().__init__(scope, id, image=image, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting, crossRegionReferences=crossRegionReferences, permissionsBoundary=permissionsBoundary, suppressTemplateIndentation=suppressTemplateIndentation)
35710
+ def __init__(self, scope, id, *, image, description=None, env=None, stackName=None, tags=None, notificationArns=None, synthesizer=None, terminationProtection=None, analyticsReporting=None, crossRegionReferences=None, permissionsBoundary=None, suppressTemplateIndentation=None):
35711
+ super().__init__(scope, id, image=image, description=description, env=env, stackName=stackName, tags=tags, notificationArns=notificationArns, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting, crossRegionReferences=crossRegionReferences, permissionsBoundary=permissionsBoundary, suppressTemplateIndentation=suppressTemplateIndentation)
35255
35712
 
35256
35713
  task_definition = ecs.TaskDefinition(self, "TaskDefinition",
35257
35714
  compatibility=ecs.Compatibility.FARGATE,
@@ -35275,8 +35732,8 @@ class TagParameterContainerImage(
35275
35732
  #
35276
35733
  class PipelineStack(cdk.Stack):
35277
35734
 
35278
- def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None, crossRegionReferences=None, permissionsBoundary=None, suppressTemplateIndentation=None):
35279
- super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting, crossRegionReferences=crossRegionReferences, permissionsBoundary=permissionsBoundary, suppressTemplateIndentation=suppressTemplateIndentation)
35735
+ def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, notificationArns=None, synthesizer=None, terminationProtection=None, analyticsReporting=None, crossRegionReferences=None, permissionsBoundary=None, suppressTemplateIndentation=None):
35736
+ super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, notificationArns=notificationArns, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting, crossRegionReferences=crossRegionReferences, permissionsBoundary=permissionsBoundary, suppressTemplateIndentation=suppressTemplateIndentation)
35280
35737
 
35281
35738
  # ********* ECS part ****************
35282
35739
 
@@ -35618,6 +36075,7 @@ class TaskDefinition(
35618
36075
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
35619
36076
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
35620
36077
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
36078
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
35621
36079
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
35622
36080
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
35623
36081
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -35636,6 +36094,8 @@ class TaskDefinition(
35636
36094
  privileged: typing.Optional[builtins.bool] = None,
35637
36095
  pseudo_terminal: typing.Optional[builtins.bool] = None,
35638
36096
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
36097
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
36098
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
35639
36099
  secrets: typing.Optional[typing.Mapping[builtins.str, Secret]] = None,
35640
36100
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
35641
36101
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -35657,6 +36117,7 @@ class TaskDefinition(
35657
36117
  :param dns_servers: A list of DNS servers that are presented to the container. Default: - Default DNS servers.
35658
36118
  :param docker_labels: A key/value map of labels to add to the container. Default: - No labels.
35659
36119
  :param docker_security_options: A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. Default: - No security labels.
36120
+ :param enable_restart_policy: Enable a restart policy for a container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task. Default: - false unless ``restartIgnoredExitCodes`` or ``restartAttemptPeriod`` is set.
35660
36121
  :param entry_point: The ENTRYPOINT value to pass to the container. Default: - Entry point configured in container.
35661
36122
  :param environment: The environment variables to pass to the container. Default: - No environment variables.
35662
36123
  :param environment_files: The environment files to pass to the container. Default: - No environment files.
@@ -35675,6 +36136,8 @@ class TaskDefinition(
35675
36136
  :param privileged: Specifies whether the container is marked as privileged. When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). Default: false
35676
36137
  :param pseudo_terminal: When this parameter is true, a TTY is allocated. This parameter maps to Tty in the "Create a container section" of the Docker Remote API and the --tty option to ``docker run``. Default: - false
35677
36138
  :param readonly_root_filesystem: When this parameter is true, the container is given read-only access to its root file system. Default: false
36139
+ :param restart_attempt_period: A period of time that the container must run for before a restart can be attempted. A container can be restarted only once every ``restartAttemptPeriod`` seconds. If a container isn't able to run for this time period and exits early, it will not be restarted. This property can't be used if ``enableRestartPolicy`` is set to false. You can set a minimum ``restartAttemptPeriod`` of 60 seconds and a maximum ``restartAttemptPeriod`` of 1800 seconds. Default: - Duration.seconds(300) if ``enableRestartPolicy`` is true, otherwise no period.
36140
+ :param restart_ignored_exit_codes: A list of exit codes that Amazon ECS will ignore and not attempt a restart on. This property can't be used if ``enableRestartPolicy`` is set to false. You can specify a maximum of 50 container exit codes. Default: - No exit codes are ignored.
35678
36141
  :param secrets: The secret environment variables to pass to the container. Default: - No secret environment variables.
35679
36142
  :param start_timeout: Time duration (in seconds) to wait before giving up on resolving dependencies for a container. Default: - none
35680
36143
  :param stop_timeout: Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. Default: - none
@@ -35697,6 +36160,7 @@ class TaskDefinition(
35697
36160
  dns_servers=dns_servers,
35698
36161
  docker_labels=docker_labels,
35699
36162
  docker_security_options=docker_security_options,
36163
+ enable_restart_policy=enable_restart_policy,
35700
36164
  entry_point=entry_point,
35701
36165
  environment=environment,
35702
36166
  environment_files=environment_files,
@@ -35715,6 +36179,8 @@ class TaskDefinition(
35715
36179
  privileged=privileged,
35716
36180
  pseudo_terminal=pseudo_terminal,
35717
36181
  readonly_root_filesystem=readonly_root_filesystem,
36182
+ restart_attempt_period=restart_attempt_period,
36183
+ restart_ignored_exit_codes=restart_ignored_exit_codes,
35718
36184
  secrets=secrets,
35719
36185
  start_timeout=start_timeout,
35720
36186
  stop_timeout=stop_timeout,
@@ -35756,6 +36222,7 @@ class TaskDefinition(
35756
36222
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
35757
36223
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
35758
36224
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
36225
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
35759
36226
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
35760
36227
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
35761
36228
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -35774,6 +36241,8 @@ class TaskDefinition(
35774
36241
  privileged: typing.Optional[builtins.bool] = None,
35775
36242
  pseudo_terminal: typing.Optional[builtins.bool] = None,
35776
36243
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
36244
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
36245
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
35777
36246
  secrets: typing.Optional[typing.Mapping[builtins.str, Secret]] = None,
35778
36247
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
35779
36248
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -35796,6 +36265,7 @@ class TaskDefinition(
35796
36265
  :param dns_servers: A list of DNS servers that are presented to the container. Default: - Default DNS servers.
35797
36266
  :param docker_labels: A key/value map of labels to add to the container. Default: - No labels.
35798
36267
  :param docker_security_options: A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. Default: - No security labels.
36268
+ :param enable_restart_policy: Enable a restart policy for a container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task. Default: - false unless ``restartIgnoredExitCodes`` or ``restartAttemptPeriod`` is set.
35799
36269
  :param entry_point: The ENTRYPOINT value to pass to the container. Default: - Entry point configured in container.
35800
36270
  :param environment: The environment variables to pass to the container. Default: - No environment variables.
35801
36271
  :param environment_files: The environment files to pass to the container. Default: - No environment files.
@@ -35814,6 +36284,8 @@ class TaskDefinition(
35814
36284
  :param privileged: Specifies whether the container is marked as privileged. When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). Default: false
35815
36285
  :param pseudo_terminal: When this parameter is true, a TTY is allocated. This parameter maps to Tty in the "Create a container section" of the Docker Remote API and the --tty option to ``docker run``. Default: - false
35816
36286
  :param readonly_root_filesystem: When this parameter is true, the container is given read-only access to its root file system. Default: false
36287
+ :param restart_attempt_period: A period of time that the container must run for before a restart can be attempted. A container can be restarted only once every ``restartAttemptPeriod`` seconds. If a container isn't able to run for this time period and exits early, it will not be restarted. This property can't be used if ``enableRestartPolicy`` is set to false. You can set a minimum ``restartAttemptPeriod`` of 60 seconds and a maximum ``restartAttemptPeriod`` of 1800 seconds. Default: - Duration.seconds(300) if ``enableRestartPolicy`` is true, otherwise no period.
36288
+ :param restart_ignored_exit_codes: A list of exit codes that Amazon ECS will ignore and not attempt a restart on. This property can't be used if ``enableRestartPolicy`` is set to false. You can specify a maximum of 50 container exit codes. Default: - No exit codes are ignored.
35817
36289
  :param secrets: The secret environment variables to pass to the container. Default: - No secret environment variables.
35818
36290
  :param start_timeout: Time duration (in seconds) to wait before giving up on resolving dependencies for a container. Default: - none
35819
36291
  :param stop_timeout: Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. Default: - none
@@ -35837,6 +36309,7 @@ class TaskDefinition(
35837
36309
  dns_servers=dns_servers,
35838
36310
  docker_labels=docker_labels,
35839
36311
  docker_security_options=docker_security_options,
36312
+ enable_restart_policy=enable_restart_policy,
35840
36313
  entry_point=entry_point,
35841
36314
  environment=environment,
35842
36315
  environment_files=environment_files,
@@ -35855,6 +36328,8 @@ class TaskDefinition(
35855
36328
  privileged=privileged,
35856
36329
  pseudo_terminal=pseudo_terminal,
35857
36330
  readonly_root_filesystem=readonly_root_filesystem,
36331
+ restart_attempt_period=restart_attempt_period,
36332
+ restart_ignored_exit_codes=restart_ignored_exit_codes,
35858
36333
  secrets=secrets,
35859
36334
  start_timeout=start_timeout,
35860
36335
  stop_timeout=stop_timeout,
@@ -40056,6 +40531,7 @@ class Ec2TaskDefinition(
40056
40531
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
40057
40532
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
40058
40533
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
40534
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
40059
40535
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
40060
40536
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
40061
40537
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -40074,6 +40550,8 @@ class Ec2TaskDefinition(
40074
40550
  privileged: typing.Optional[builtins.bool] = None,
40075
40551
  pseudo_terminal: typing.Optional[builtins.bool] = None,
40076
40552
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
40553
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
40554
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
40077
40555
  secrets: typing.Optional[typing.Mapping[builtins.str, Secret]] = None,
40078
40556
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
40079
40557
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -40097,6 +40575,7 @@ class Ec2TaskDefinition(
40097
40575
  :param dns_servers: A list of DNS servers that are presented to the container. Default: - Default DNS servers.
40098
40576
  :param docker_labels: A key/value map of labels to add to the container. Default: - No labels.
40099
40577
  :param docker_security_options: A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. Default: - No security labels.
40578
+ :param enable_restart_policy: Enable a restart policy for a container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task. Default: - false unless ``restartIgnoredExitCodes`` or ``restartAttemptPeriod`` is set.
40100
40579
  :param entry_point: The ENTRYPOINT value to pass to the container. Default: - Entry point configured in container.
40101
40580
  :param environment: The environment variables to pass to the container. Default: - No environment variables.
40102
40581
  :param environment_files: The environment files to pass to the container. Default: - No environment files.
@@ -40115,6 +40594,8 @@ class Ec2TaskDefinition(
40115
40594
  :param privileged: Specifies whether the container is marked as privileged. When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). Default: false
40116
40595
  :param pseudo_terminal: When this parameter is true, a TTY is allocated. This parameter maps to Tty in the "Create a container section" of the Docker Remote API and the --tty option to ``docker run``. Default: - false
40117
40596
  :param readonly_root_filesystem: When this parameter is true, the container is given read-only access to its root file system. Default: false
40597
+ :param restart_attempt_period: A period of time that the container must run for before a restart can be attempted. A container can be restarted only once every ``restartAttemptPeriod`` seconds. If a container isn't able to run for this time period and exits early, it will not be restarted. This property can't be used if ``enableRestartPolicy`` is set to false. You can set a minimum ``restartAttemptPeriod`` of 60 seconds and a maximum ``restartAttemptPeriod`` of 1800 seconds. Default: - Duration.seconds(300) if ``enableRestartPolicy`` is true, otherwise no period.
40598
+ :param restart_ignored_exit_codes: A list of exit codes that Amazon ECS will ignore and not attempt a restart on. This property can't be used if ``enableRestartPolicy`` is set to false. You can specify a maximum of 50 container exit codes. Default: - No exit codes are ignored.
40118
40599
  :param secrets: The secret environment variables to pass to the container. Default: - No secret environment variables.
40119
40600
  :param start_timeout: Time duration (in seconds) to wait before giving up on resolving dependencies for a container. Default: - none
40120
40601
  :param stop_timeout: Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. Default: - none
@@ -40137,6 +40618,7 @@ class Ec2TaskDefinition(
40137
40618
  dns_servers=dns_servers,
40138
40619
  docker_labels=docker_labels,
40139
40620
  docker_security_options=docker_security_options,
40621
+ enable_restart_policy=enable_restart_policy,
40140
40622
  entry_point=entry_point,
40141
40623
  environment=environment,
40142
40624
  environment_files=environment_files,
@@ -40155,6 +40637,8 @@ class Ec2TaskDefinition(
40155
40637
  privileged=privileged,
40156
40638
  pseudo_terminal=pseudo_terminal,
40157
40639
  readonly_root_filesystem=readonly_root_filesystem,
40640
+ restart_attempt_period=restart_attempt_period,
40641
+ restart_ignored_exit_codes=restart_ignored_exit_codes,
40158
40642
  secrets=secrets,
40159
40643
  start_timeout=start_timeout,
40160
40644
  stop_timeout=stop_timeout,
@@ -42889,6 +43373,7 @@ def _typecheckingstub__d8756b492e023ad8d33a399196b15b610f709400ce213e179f17dd1f6
42889
43373
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
42890
43374
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
42891
43375
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
43376
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
42892
43377
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
42893
43378
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
42894
43379
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -42907,6 +43392,8 @@ def _typecheckingstub__d8756b492e023ad8d33a399196b15b610f709400ce213e179f17dd1f6
42907
43392
  privileged: typing.Optional[builtins.bool] = None,
42908
43393
  pseudo_terminal: typing.Optional[builtins.bool] = None,
42909
43394
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
43395
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
43396
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
42910
43397
  secrets: typing.Optional[typing.Mapping[builtins.str, Secret]] = None,
42911
43398
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
42912
43399
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -43019,6 +43506,7 @@ def _typecheckingstub__f2e5f24c1574825a81dd77783d48886a430a675a0e04f03559eca98b5
43019
43506
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
43020
43507
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
43021
43508
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
43509
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
43022
43510
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
43023
43511
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
43024
43512
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -43037,6 +43525,8 @@ def _typecheckingstub__f2e5f24c1574825a81dd77783d48886a430a675a0e04f03559eca98b5
43037
43525
  privileged: typing.Optional[builtins.bool] = None,
43038
43526
  pseudo_terminal: typing.Optional[builtins.bool] = None,
43039
43527
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
43528
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
43529
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
43040
43530
  secrets: typing.Optional[typing.Mapping[builtins.str, Secret]] = None,
43041
43531
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
43042
43532
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -43060,6 +43550,7 @@ def _typecheckingstub__20c974a49c79829fac0811dffaf78c449f92ae136414b96232160d37c
43060
43550
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
43061
43551
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
43062
43552
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
43553
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
43063
43554
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
43064
43555
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
43065
43556
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -43078,6 +43569,8 @@ def _typecheckingstub__20c974a49c79829fac0811dffaf78c449f92ae136414b96232160d37c
43078
43569
  privileged: typing.Optional[builtins.bool] = None,
43079
43570
  pseudo_terminal: typing.Optional[builtins.bool] = None,
43080
43571
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
43572
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
43573
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
43081
43574
  secrets: typing.Optional[typing.Mapping[builtins.str, Secret]] = None,
43082
43575
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
43083
43576
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -43655,6 +44148,7 @@ def _typecheckingstub__aa1e4969dd0e00a5737510c273aa9546ad4ce7bc5a8a146f2a37666b0
43655
44148
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
43656
44149
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
43657
44150
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
44151
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
43658
44152
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
43659
44153
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
43660
44154
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -43673,6 +44167,8 @@ def _typecheckingstub__aa1e4969dd0e00a5737510c273aa9546ad4ce7bc5a8a146f2a37666b0
43673
44167
  privileged: typing.Optional[builtins.bool] = None,
43674
44168
  pseudo_terminal: typing.Optional[builtins.bool] = None,
43675
44169
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
44170
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
44171
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
43676
44172
  secrets: typing.Optional[typing.Mapping[builtins.str, Secret]] = None,
43677
44173
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
43678
44174
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -43702,6 +44198,7 @@ def _typecheckingstub__2bb9382e9a7b1b34a020902905c4bf83e2d4970135e7592e5b5a1da62
43702
44198
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
43703
44199
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
43704
44200
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
44201
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
43705
44202
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
43706
44203
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
43707
44204
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -43720,6 +44217,8 @@ def _typecheckingstub__2bb9382e9a7b1b34a020902905c4bf83e2d4970135e7592e5b5a1da62
43720
44217
  privileged: typing.Optional[builtins.bool] = None,
43721
44218
  pseudo_terminal: typing.Optional[builtins.bool] = None,
43722
44219
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
44220
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
44221
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
43723
44222
  secrets: typing.Optional[typing.Mapping[builtins.str, Secret]] = None,
43724
44223
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
43725
44224
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -43744,6 +44243,7 @@ def _typecheckingstub__498b2375cb2035a958edbdd10ad5f4352caa5773be14b63a07c337871
43744
44243
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
43745
44244
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
43746
44245
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
44246
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
43747
44247
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
43748
44248
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
43749
44249
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -43762,6 +44262,8 @@ def _typecheckingstub__498b2375cb2035a958edbdd10ad5f4352caa5773be14b63a07c337871
43762
44262
  privileged: typing.Optional[builtins.bool] = None,
43763
44263
  pseudo_terminal: typing.Optional[builtins.bool] = None,
43764
44264
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
44265
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
44266
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
43765
44267
  secrets: typing.Optional[typing.Mapping[builtins.str, Secret]] = None,
43766
44268
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
43767
44269
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -44484,6 +44986,7 @@ def _typecheckingstub__8fe416001b357a118b80b0f9e3432c5bffbeffe29c2f7e67a02e5589c
44484
44986
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
44485
44987
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
44486
44988
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
44989
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
44487
44990
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
44488
44991
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
44489
44992
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -44502,6 +45005,8 @@ def _typecheckingstub__8fe416001b357a118b80b0f9e3432c5bffbeffe29c2f7e67a02e5589c
44502
45005
  privileged: typing.Optional[builtins.bool] = None,
44503
45006
  pseudo_terminal: typing.Optional[builtins.bool] = None,
44504
45007
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
45008
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
45009
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
44505
45010
  secrets: typing.Optional[typing.Mapping[builtins.str, Secret]] = None,
44506
45011
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
44507
45012
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -44533,6 +45038,7 @@ def _typecheckingstub__a448c235107c9543bb055362134e3500d0a20b6f51e433675f952a773
44533
45038
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
44534
45039
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
44535
45040
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
45041
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
44536
45042
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
44537
45043
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
44538
45044
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -44551,6 +45057,8 @@ def _typecheckingstub__a448c235107c9543bb055362134e3500d0a20b6f51e433675f952a773
44551
45057
  privileged: typing.Optional[builtins.bool] = None,
44552
45058
  pseudo_terminal: typing.Optional[builtins.bool] = None,
44553
45059
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
45060
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
45061
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
44554
45062
  secrets: typing.Optional[typing.Mapping[builtins.str, Secret]] = None,
44555
45063
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
44556
45064
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,
@@ -45165,6 +45673,7 @@ def _typecheckingstub__e16f7a8ab558d24dc81cd83e043fb5a8b37369f32cee89bd310588535
45165
45673
  dns_servers: typing.Optional[typing.Sequence[builtins.str]] = None,
45166
45674
  docker_labels: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
45167
45675
  docker_security_options: typing.Optional[typing.Sequence[builtins.str]] = None,
45676
+ enable_restart_policy: typing.Optional[builtins.bool] = None,
45168
45677
  entry_point: typing.Optional[typing.Sequence[builtins.str]] = None,
45169
45678
  environment: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
45170
45679
  environment_files: typing.Optional[typing.Sequence[EnvironmentFile]] = None,
@@ -45183,6 +45692,8 @@ def _typecheckingstub__e16f7a8ab558d24dc81cd83e043fb5a8b37369f32cee89bd310588535
45183
45692
  privileged: typing.Optional[builtins.bool] = None,
45184
45693
  pseudo_terminal: typing.Optional[builtins.bool] = None,
45185
45694
  readonly_root_filesystem: typing.Optional[builtins.bool] = None,
45695
+ restart_attempt_period: typing.Optional[_Duration_4839e8c3] = None,
45696
+ restart_ignored_exit_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
45186
45697
  secrets: typing.Optional[typing.Mapping[builtins.str, Secret]] = None,
45187
45698
  start_timeout: typing.Optional[_Duration_4839e8c3] = None,
45188
45699
  stop_timeout: typing.Optional[_Duration_4839e8c3] = None,