aws-cdk-lib 2.75.1__py3-none-any.whl → 2.76.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 (98) hide show
  1. aws_cdk/__init__.py +245 -259
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.75.1.jsii.tgz → aws-cdk-lib@2.76.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_amplifyuibuilder/__init__.py +184 -216
  5. aws_cdk/aws_apigateway/__init__.py +95 -148
  6. aws_cdk/aws_appconfig/__init__.py +8 -4
  7. aws_cdk/aws_appflow/__init__.py +27 -52
  8. aws_cdk/aws_appmesh/__init__.py +91 -200
  9. aws_cdk/aws_apprunner/__init__.py +4 -16
  10. aws_cdk/aws_appstream/__init__.py +18 -82
  11. aws_cdk/aws_athena/__init__.py +18 -32
  12. aws_cdk/aws_backup/__init__.py +48 -86
  13. aws_cdk/aws_billingconductor/__init__.py +12 -7
  14. aws_cdk/aws_budgets/__init__.py +8 -17
  15. aws_cdk/aws_certificatemanager/__init__.py +7 -4
  16. aws_cdk/aws_cloudfront/__init__.py +14 -11
  17. aws_cdk/aws_cloudfront_origins/__init__.py +18 -8
  18. aws_cdk/aws_cloudtrail/__init__.py +7 -10
  19. aws_cdk/aws_cloudwatch/__init__.py +63 -35
  20. aws_cdk/aws_codebuild/__init__.py +10 -13
  21. aws_cdk/aws_codecommit/__init__.py +0 -1
  22. aws_cdk/aws_codedeploy/__init__.py +165 -162
  23. aws_cdk/aws_codepipeline/__init__.py +0 -4
  24. aws_cdk/aws_codepipeline_actions/__init__.py +16 -164
  25. aws_cdk/aws_cognito/__init__.py +195 -100
  26. aws_cdk/aws_config/__init__.py +28 -51
  27. aws_cdk/aws_connectcampaigns/__init__.py +5 -6
  28. aws_cdk/aws_databrew/__init__.py +5 -6
  29. aws_cdk/aws_dlm/__init__.py +33 -71
  30. aws_cdk/aws_docdb/__init__.py +20 -76
  31. aws_cdk/aws_dynamodb/__init__.py +7 -14
  32. aws_cdk/aws_ec2/__init__.py +1846 -421
  33. aws_cdk/aws_ecr/__init__.py +1 -2
  34. aws_cdk/aws_ecr_assets/__init__.py +27 -14
  35. aws_cdk/aws_ecs/__init__.py +241 -111
  36. aws_cdk/aws_ecs_patterns/__init__.py +13 -11
  37. aws_cdk/aws_eks/__init__.py +13 -8
  38. aws_cdk/aws_elasticloadbalancing/__init__.py +16 -9
  39. aws_cdk/aws_elasticloadbalancingv2/__init__.py +142 -82
  40. aws_cdk/aws_elasticloadbalancingv2_actions/__init__.py +126 -61
  41. aws_cdk/aws_elasticsearch/__init__.py +0 -7
  42. aws_cdk/aws_emr/__init__.py +7 -16
  43. aws_cdk/aws_emrserverless/__init__.py +14 -18
  44. aws_cdk/aws_events/__init__.py +33 -29
  45. aws_cdk/aws_events_targets/__init__.py +248 -89
  46. aws_cdk/aws_frauddetector/__init__.py +3 -4
  47. aws_cdk/aws_fsx/__init__.py +13 -7
  48. aws_cdk/aws_gamelift/__init__.py +11 -20
  49. aws_cdk/aws_iam/__init__.py +21 -25
  50. aws_cdk/aws_imagebuilder/__init__.py +58 -80
  51. aws_cdk/aws_iot/__init__.py +16 -10
  52. aws_cdk/aws_iotcoredeviceadvisor/__init__.py +16 -26
  53. aws_cdk/aws_iotevents/__init__.py +6 -4
  54. aws_cdk/aws_iotfleetwise/__init__.py +27 -40
  55. aws_cdk/aws_iotsitewise/__init__.py +8 -5
  56. aws_cdk/aws_kinesisfirehose/__init__.py +21 -38
  57. aws_cdk/aws_lambda/__init__.py +59 -48
  58. aws_cdk/aws_lambda_event_sources/__init__.py +6 -21
  59. aws_cdk/aws_logs/__init__.py +5 -7
  60. aws_cdk/aws_macie/__init__.py +22 -15
  61. aws_cdk/aws_mediaconnect/__init__.py +5 -8
  62. aws_cdk/aws_medialive/__init__.py +2 -4
  63. aws_cdk/aws_mediapackage/__init__.py +9 -18
  64. aws_cdk/aws_memorydb/__init__.py +5 -10
  65. aws_cdk/aws_mwaa/__init__.py +8 -4
  66. aws_cdk/aws_nimblestudio/__init__.py +25 -45
  67. aws_cdk/aws_opensearchservice/__init__.py +0 -1
  68. aws_cdk/aws_panorama/__init__.py +11 -12
  69. aws_cdk/aws_personalize/__init__.py +46 -72
  70. aws_cdk/aws_pinpoint/__init__.py +36 -65
  71. aws_cdk/aws_quicksight/__init__.py +9972 -13374
  72. aws_cdk/aws_rds/__init__.py +23 -22
  73. aws_cdk/aws_route53/__init__.py +8 -16
  74. aws_cdk/aws_route53_targets/__init__.py +2 -4
  75. aws_cdk/aws_s3/__init__.py +25 -85
  76. aws_cdk/aws_s3_notifications/__init__.py +0 -3
  77. aws_cdk/aws_sagemaker/__init__.py +6 -2
  78. aws_cdk/aws_secretsmanager/__init__.py +17 -14
  79. aws_cdk/aws_servicecatalog/__init__.py +58 -82
  80. aws_cdk/aws_servicediscovery/__init__.py +4 -6
  81. aws_cdk/aws_ses/__init__.py +21 -34
  82. aws_cdk/aws_sns/__init__.py +4 -8
  83. aws_cdk/aws_ssm/__init__.py +19 -23
  84. aws_cdk/aws_ssmcontacts/__init__.py +10 -6
  85. aws_cdk/aws_stepfunctions/__init__.py +3 -12
  86. aws_cdk/aws_stepfunctions_tasks/__init__.py +7 -12
  87. aws_cdk/aws_timestream/__init__.py +22 -28
  88. aws_cdk/aws_xray/__init__.py +15 -22
  89. aws_cdk/cloud_assembly_schema/__init__.py +14 -6
  90. aws_cdk/custom_resources/__init__.py +2 -3
  91. aws_cdk/pipelines/__init__.py +84 -134
  92. aws_cdk/triggers/__init__.py +46 -61
  93. {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/METADATA +47 -92
  94. {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/RECORD +98 -98
  95. {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/LICENSE +0 -0
  96. {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/NOTICE +0 -0
  97. {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/WHEEL +0 -0
  98. {aws_cdk_lib-2.75.1.dist-info → aws_cdk_lib-2.76.0.dist-info}/top_level.txt +0 -0
@@ -134,8 +134,6 @@ With Application Load Balancer or Network Load Balancer,
134
134
  you provide a Target Group as the load balancer:
135
135
 
136
136
  ```python
137
- import aws_cdk.aws_elasticloadbalancingv2 as elbv2
138
-
139
137
  # alb: elbv2.ApplicationLoadBalancer
140
138
 
141
139
  listener = alb.add_listener("Listener", port=80)
@@ -310,12 +308,11 @@ you can do so with the LambdaDeploymentConfig construct,
310
308
  letting you specify precisely how fast a new function version is deployed.
311
309
 
312
310
  ```python
313
- # Example automatically generated from non-compiling source. May contain errors.
314
311
  # application: codedeploy.LambdaApplication
315
312
  # alias: lambda.Alias
316
313
  config = codedeploy.LambdaDeploymentConfig(self, "CustomConfig",
317
- traffic_routing_config=codedeploy.TimeBasedCanaryTrafficRoutingConfig(
318
- interval=cdk.Duration.minutes(15),
314
+ traffic_routing=codedeploy.TimeBasedCanaryTrafficRouting(
315
+ interval=Duration.minutes(15),
319
316
  percentage=5
320
317
  )
321
318
  )
@@ -329,10 +326,9 @@ deployment_group = codedeploy.LambdaDeploymentGroup(self, "BlueGreenDeployment",
329
326
  You can specify a custom name for your deployment config, but if you do you will not be able to update the interval/percentage through CDK.
330
327
 
331
328
  ```python
332
- # Example automatically generated from non-compiling source. May contain errors.
333
329
  config = codedeploy.LambdaDeploymentConfig(self, "CustomConfig",
334
- traffic_routing_config=codedeploy.TimeBasedCanaryTrafficRoutingConfig(
335
- interval=cdk.Duration.minutes(15),
330
+ traffic_routing=codedeploy.TimeBasedCanaryTrafficRouting(
331
+ interval=Duration.minutes(15),
336
332
  percentage=5
337
333
  ),
338
334
  deployment_config_name="MyDeploymentConfig"
@@ -380,7 +376,6 @@ monitor, and validate before shifting 100% of traffic to the new version.
380
376
  To create a new CodeDeploy Deployment Group that deploys to an ECS service:
381
377
 
382
378
  ```python
383
- # Example automatically generated from non-compiling source. May contain errors.
384
379
  # my_application: codedeploy.EcsApplication
385
380
  # cluster: ecs.Cluster
386
381
  # task_definition: ecs.FargateTaskDefinition
@@ -392,12 +387,12 @@ To create a new CodeDeploy Deployment Group that deploys to an ECS service:
392
387
  service = ecs.FargateService(self, "Service",
393
388
  cluster=cluster,
394
389
  task_definition=task_definition,
395
- deployment_controller={
396
- "type": ecs.DeploymentControllerType.CODE_DEPLOY
397
- }
390
+ deployment_controller=ecs.DeploymentController(
391
+ type=ecs.DeploymentControllerType.CODE_DEPLOY
392
+ )
398
393
  )
399
394
 
400
- codedeploy.EcsDeploymentGroup(stack, "BlueGreenDG",
395
+ codedeploy.EcsDeploymentGroup(self, "BlueGreenDG",
401
396
  service=service,
402
397
  blue_green_deployment_config=codedeploy.EcsBlueGreenDeploymentConfig(
403
398
  blue_target_group=blue_target_group,
@@ -435,41 +430,45 @@ as well as alarms set for the number HTTP 5xx responses seen in each of the blue
435
430
  and green target groups.
436
431
 
437
432
  ```python
438
- # Example automatically generated from non-compiling source. May contain errors.
439
433
  import aws_cdk.aws_cloudwatch as cloudwatch
440
434
 
435
+ # service: ecs.FargateService
436
+ # blue_target_group: elbv2.ApplicationTargetGroup
437
+ # green_target_group: elbv2.ApplicationTargetGroup
438
+ # listener: elbv2.IApplicationListener
439
+
441
440
 
442
441
  # Alarm on the number of unhealthy ECS tasks in each target group
443
- blue_unhealthy_hosts = cloudwatch.Alarm(stack, "BlueUnhealthyHosts",
444
- alarm_name=stack.stack_name + "-Unhealthy-Hosts-Blue",
442
+ blue_unhealthy_hosts = cloudwatch.Alarm(self, "BlueUnhealthyHosts",
443
+ alarm_name=Stack.of(self).stack_name + "-Unhealthy-Hosts-Blue",
445
444
  metric=blue_target_group.metric_unhealthy_host_count(),
446
445
  threshold=1,
447
446
  evaluation_periods=2
448
447
  )
449
448
 
450
- green_unhealthy_hosts = cloudwatch.Alarm(stack, "GreenUnhealthyHosts",
451
- alarm_name=stack.stack_name + "-Unhealthy-Hosts-Green",
449
+ green_unhealthy_hosts = cloudwatch.Alarm(self, "GreenUnhealthyHosts",
450
+ alarm_name=Stack.of(self).stack_name + "-Unhealthy-Hosts-Green",
452
451
  metric=green_target_group.metric_unhealthy_host_count(),
453
452
  threshold=1,
454
453
  evaluation_periods=2
455
454
  )
456
455
 
457
456
  # Alarm on the number of HTTP 5xx responses returned by each target group
458
- blue_api_failure = cloudwatch.Alarm(stack, "Blue5xx",
459
- alarm_name=stack.stack_name + "-Http-5xx-Blue",
460
- metric=blue_target_group.metric_http_code_target(elbv2.HttpCodeTarget.TARGET_5XX_COUNT, period=cdk.Duration.minutes(1)),
457
+ blue_api_failure = cloudwatch.Alarm(self, "Blue5xx",
458
+ alarm_name=Stack.of(self).stack_name + "-Http-5xx-Blue",
459
+ metric=blue_target_group.metric_http_code_target(elbv2.HttpCodeTarget.TARGET_5XX_COUNT, period=Duration.minutes(1)),
461
460
  threshold=1,
462
461
  evaluation_periods=1
463
462
  )
464
463
 
465
- green_api_failure = cloudwatch.Alarm(stack, "Green5xx",
466
- alarm_name=stack.stack_name + "-Http-5xx-Green",
467
- metric=green_target_group.metric_http_code_target(elbv2.HttpCodeTarget.TARGET_5XX_COUNT, period=cdk.Duration.minutes(1)),
464
+ green_api_failure = cloudwatch.Alarm(self, "Green5xx",
465
+ alarm_name=Stack.of(self).stack_name + "-Http-5xx-Green",
466
+ metric=green_target_group.metric_http_code_target(elbv2.HttpCodeTarget.TARGET_5XX_COUNT, period=Duration.minutes(1)),
468
467
  threshold=1,
469
468
  evaluation_periods=1
470
469
  )
471
470
 
472
- codedeploy.EcsDeploymentGroup(stack, "BlueGreenDG",
471
+ codedeploy.EcsDeploymentGroup(self, "BlueGreenDG",
473
472
  # CodeDeploy will monitor these alarms during a deployment and automatically roll back
474
473
  alarms=[blue_unhealthy_hosts, green_unhealthy_hosts, blue_api_failure, green_api_failure],
475
474
  auto_rollback=codedeploy.AutoRollbackConfig(
@@ -496,7 +495,6 @@ During a blue-green deployment, CodeDeploy can then shift 100% of test traffic o
496
495
  task set/target group prior to shifting any production traffic during the deployment.
497
496
 
498
497
  ```python
499
- # Example automatically generated from non-compiling source. May contain errors.
500
498
  # my_application: codedeploy.EcsApplication
501
499
  # service: ecs.FargateService
502
500
  # blue_target_group: elbv2.ITargetGroup
@@ -505,7 +503,7 @@ task set/target group prior to shifting any production traffic during the deploy
505
503
  # test_listener: elbv2.IApplicationListener
506
504
 
507
505
 
508
- codedeploy.EcsDeploymentGroup(stack, "BlueGreenDG",
506
+ codedeploy.EcsDeploymentGroup(self, "BlueGreenDG",
509
507
  service=service,
510
508
  blue_green_deployment_config=codedeploy.EcsBlueGreenDeploymentConfig(
511
509
  blue_target_group=blue_target_group,
@@ -537,8 +535,14 @@ If the ContinueDeployment API is not called within the approval wait time period
537
535
  deployment and can automatically roll back the deployment.
538
536
 
539
537
  ```python
540
- # Example automatically generated from non-compiling source. May contain errors.
541
- codedeploy.EcsDeploymentGroup(stack, "BlueGreenDG",
538
+ # service: ecs.FargateService
539
+ # blue_target_group: elbv2.ITargetGroup
540
+ # green_target_group: elbv2.ITargetGroup
541
+ # listener: elbv2.IApplicationListener
542
+ # test_listener: elbv2.IApplicationListener
543
+
544
+
545
+ codedeploy.EcsDeploymentGroup(self, "BlueGreenDG",
542
546
  auto_rollback=codedeploy.AutoRollbackConfig(
543
547
  # CodeDeploy will automatically roll back if the 8-hour approval period times out and the deployment stops
544
548
  stopped_deployment=True
@@ -563,8 +567,19 @@ is complete in order to let the deployment "bake" a while. During this bake time
563
567
  CloudWatch alarms specified for the deployment group and will automatically roll back if those alarms go into a failed state.
564
568
 
565
569
  ```python
566
- # Example automatically generated from non-compiling source. May contain errors.
567
- codedeploy.EcsDeploymentGroup(stack, "BlueGreenDG",
570
+ from aws_cdk import aws_cloudwatch as cloudwatch
571
+
572
+ # service: ecs.FargateService
573
+ # blue_target_group: elbv2.ITargetGroup
574
+ # green_target_group: elbv2.ITargetGroup
575
+ # listener: elbv2.IApplicationListener
576
+ # blue_unhealthy_hosts: cloudwatch.Alarm
577
+ # green_unhealthy_hosts: cloudwatch.Alarm
578
+ # blue_api_failure: cloudwatch.Alarm
579
+ # green_api_failure: cloudwatch.Alarm
580
+
581
+
582
+ codedeploy.EcsDeploymentGroup(self, "BlueGreenDG",
568
583
  service=service,
569
584
  blue_green_deployment_config=codedeploy.EcsBlueGreenDeploymentConfig(
570
585
  blue_target_group=blue_target_group,
@@ -607,10 +622,9 @@ you can do so with the EcsDeploymentConfig construct,
607
622
  letting you specify precisely how fast an ECS service is deployed.
608
623
 
609
624
  ```python
610
- # Example automatically generated from non-compiling source. May contain errors.
611
625
  codedeploy.EcsDeploymentConfig(self, "CustomConfig",
612
- traffic_routing_config=codedeploy.TimeBasedCanaryTrafficRoutingConfig(
613
- interval=cdk.Duration.minutes(15),
626
+ traffic_routing=codedeploy.TimeBasedCanaryTrafficRouting(
627
+ interval=Duration.minutes(15),
614
628
  percentage=5
615
629
  )
616
630
  )
@@ -619,10 +633,9 @@ codedeploy.EcsDeploymentConfig(self, "CustomConfig",
619
633
  You can specify a custom name for your deployment config, but if you do you will not be able to update the interval/percentage through CDK.
620
634
 
621
635
  ```python
622
- # Example automatically generated from non-compiling source. May contain errors.
623
636
  config = codedeploy.EcsDeploymentConfig(self, "CustomConfig",
624
- traffic_routing_config=codedeploy.TimeBasedCanaryTrafficRoutingConfig(
625
- interval=cdk.Duration.minutes(15),
637
+ traffic_routing=codedeploy.TimeBasedCanaryTrafficRouting(
638
+ interval=Duration.minutes(15),
626
639
  percentage=5
627
640
  ),
628
641
  deployment_config_name="MyDeploymentConfig"
@@ -642,53 +655,58 @@ deployment_config = codedeploy.EcsDeploymentConfig.from_ecs_deployment_config_na
642
655
  An experimental construct is available on the Construct Hub called [@cdklabs/cdk-ecs-codedeploy](https://constructs.dev/packages/@cdklabs/cdk-ecs-codedeploy) that manages ECS CodeDeploy deployments.
643
656
 
644
657
  ```python
645
- # Example automatically generated from non-compiling source. May contain errors.
646
- # deployment_group: codeDeploy.IEcsDeploymentGroup
658
+ # deployment_group: codedeploy.IEcsDeploymentGroup
647
659
  # task_definition: ecs.ITaskDefinition
648
660
 
649
661
 
650
- EcsDeployment(
651
- deployment_group=deployment_group,
652
- target_service={
662
+ EcsDeployment({
663
+ "deployment_group": deployment_group,
664
+ "target_service": {
653
665
  "task_definition": task_definition,
654
666
  "container_name": "mycontainer",
655
667
  "container_port": 80
656
668
  }
657
- )
669
+ })
658
670
  ```
659
671
 
660
672
  The deployment will use the AutoRollbackConfig for the EcsDeploymentGroup unless it is overridden in the deployment:
661
673
 
662
674
  ```python
663
- # Example automatically generated from non-compiling source. May contain errors.
664
- EcsDeployment(
665
- deployment_group=deployment_group,
666
- target_service={
675
+ # deployment_group: codedeploy.IEcsDeploymentGroup
676
+ # task_definition: ecs.ITaskDefinition
677
+
678
+
679
+ EcsDeployment({
680
+ "deployment_group": deployment_group,
681
+ "target_service": {
667
682
  "task_definition": task_definition,
668
683
  "container_name": "mycontainer",
669
684
  "container_port": 80
670
685
  },
671
- auto_rollback={
686
+ "auto_rollback": {
672
687
  "failed_deployment": True,
673
688
  "deployment_in_alarm": True,
674
689
  "stopped_deployment": False
675
690
  }
676
- )
691
+ })
677
692
  ```
678
693
 
679
694
  By default, the CodeDeploy Deployment will timeout after 30 minutes. The timeout value can be overridden:
680
695
 
681
696
  ```python
682
- # Example automatically generated from non-compiling source. May contain errors.
683
- EcsDeployment(
684
- deployment_group=deployment_group,
685
- target_service={
697
+ # deployment_group: codedeploy.IEcsDeploymentGroup
698
+ # task_definition: ecs.ITaskDefinition
699
+
700
+
701
+ EcsDeployment({
702
+ "deployment_group": deployment_group,
703
+ "target_service": {
686
704
  "task_definition": task_definition,
687
705
  "container_name": "mycontainer",
688
706
  "container_port": 80
689
707
  },
690
- timeout=Duration.minutes(60)
691
- )
708
+ "timeout": Duration.minutes(60)
709
+ })
692
710
  ```
693
711
  '''
694
712
  import abc
@@ -2271,8 +2289,8 @@ class CfnDeploymentGroup(
2271
2289
  :param load_balancer_info: Information about the load balancer to use in a deployment. For more information, see `Integrating CodeDeploy with Elastic Load Balancing <https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-elastic-load-balancing.html>`_ in the *AWS CodeDeploy User Guide* .
2272
2290
  :param on_premises_instance_tag_filters: The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group. CodeDeploy includes all on-premises instances identified by any of the tags you specify in this deployment group. To register on-premises instances with CodeDeploy , see `Working with On-Premises Instances for CodeDeploy <https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-on-premises.html>`_ in the *AWS CodeDeploy User Guide* . Duplicates are not allowed. You can specify ``OnPremisesInstanceTagFilters`` or ``OnPremisesInstanceTagSet`` , but not both.
2273
2291
  :param on_premises_tag_set: Information about groups of tags applied to on-premises instances. The deployment group includes only on-premises instances identified by all the tag groups. You can specify ``OnPremisesInstanceTagFilters`` or ``OnPremisesInstanceTagSet`` , but not both.
2274
- :param outdated_instances_strategy: Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. If this option is set to ``UPDATE`` or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances. If this option is set to ``IGNORE`` , CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.
2275
- :param tags: The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define.
2292
+ :param outdated_instances_strategy: ``AWS::CodeDeploy::DeploymentGroup.OutdatedInstancesStrategy``.
2293
+ :param tags: ``AWS::CodeDeploy::DeploymentGroup.Tags``.
2276
2294
  :param trigger_configurations: Information about triggers associated with the deployment group. Duplicates are not allowed
2277
2295
  '''
2278
2296
  if __debug__:
@@ -2341,9 +2359,7 @@ class CfnDeploymentGroup(
2341
2359
  @builtins.property
2342
2360
  @jsii.member(jsii_name="tags")
2343
2361
  def tags(self) -> _TagManager_0a598cb3:
2344
- '''The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them.
2345
-
2346
- Each tag consists of a key and an optional value, both of which you define.
2362
+ '''``AWS::CodeDeploy::DeploymentGroup.Tags``.
2347
2363
 
2348
2364
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-tags
2349
2365
  '''
@@ -2707,11 +2723,7 @@ class CfnDeploymentGroup(
2707
2723
  @builtins.property
2708
2724
  @jsii.member(jsii_name="outdatedInstancesStrategy")
2709
2725
  def outdated_instances_strategy(self) -> typing.Optional[builtins.str]:
2710
- '''Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.
2711
-
2712
- If this option is set to ``UPDATE`` or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.
2713
-
2714
- If this option is set to ``IGNORE`` , CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.
2726
+ '''``AWS::CodeDeploy::DeploymentGroup.OutdatedInstancesStrategy``.
2715
2727
 
2716
2728
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-outdatedinstancesstrategy
2717
2729
  '''
@@ -3964,7 +3976,7 @@ class CfnDeploymentGroup(
3964
3976
 
3965
3977
  :param elb_info_list: An array that contains information about the load balancer to use for load balancing in a deployment. In Elastic Load Balancing, load balancers are used with Classic Load Balancers. .. epigraph:: Adding more than one load balancer to the array is not supported.
3966
3978
  :param target_group_info_list: An array that contains information about the target group to use for load balancing in a deployment. In Elastic Load Balancing , target groups are used with Application Load Balancers . .. epigraph:: Adding more than one target group to the array is not supported.
3967
- :param target_group_pair_info_list: The target group pair information. This is an array of ``TargeGroupPairInfo`` objects with a maximum size of one.
3979
+ :param target_group_pair_info_list: ``CfnDeploymentGroup.LoadBalancerInfoProperty.TargetGroupPairInfoList``.
3968
3980
 
3969
3981
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-loadbalancerinfo.html
3970
3982
  :exampleMetadata: fixture=_generated
@@ -4044,9 +4056,7 @@ class CfnDeploymentGroup(
4044
4056
  def target_group_pair_info_list(
4045
4057
  self,
4046
4058
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnDeploymentGroup.TargetGroupPairInfoProperty"]]]]:
4047
- '''The target group pair information.
4048
-
4049
- This is an array of ``TargeGroupPairInfo`` objects with a maximum size of one.
4059
+ '''``CfnDeploymentGroup.LoadBalancerInfoProperty.TargetGroupPairInfoList``.
4050
4060
 
4051
4061
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-loadbalancerinfo.html#cfn-codedeploy-deploymentgroup-loadbalancerinfo-targetgrouppairinfolist
4052
4062
  '''
@@ -4617,13 +4627,10 @@ class CfnDeploymentGroup(
4617
4627
  target_groups: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union["CfnDeploymentGroup.TargetGroupInfoProperty", typing.Dict[builtins.str, typing.Any]]]]]] = None,
4618
4628
  test_traffic_route: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnDeploymentGroup.TrafficRouteProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
4619
4629
  ) -> None:
4620
- '''Information about two target groups and how traffic is routed during an Amazon ECS deployment.
4621
-
4622
- An optional test traffic route can be specified.
4623
-
4624
- :param prod_traffic_route: The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.
4625
- :param target_groups: One pair of target groups. One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.
4626
- :param test_traffic_route: An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can occur while test traffic is served during a deployment.
4630
+ '''
4631
+ :param prod_traffic_route: ``CfnDeploymentGroup.TargetGroupPairInfoProperty.ProdTrafficRoute``.
4632
+ :param target_groups: ``CfnDeploymentGroup.TargetGroupPairInfoProperty.TargetGroups``.
4633
+ :param test_traffic_route: ``CfnDeploymentGroup.TargetGroupPairInfoProperty.TestTrafficRoute``.
4627
4634
 
4628
4635
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-targetgrouppairinfo.html
4629
4636
  :exampleMetadata: fixture=_generated
@@ -4663,7 +4670,7 @@ class CfnDeploymentGroup(
4663
4670
  def prod_traffic_route(
4664
4671
  self,
4665
4672
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnDeploymentGroup.TrafficRouteProperty"]]:
4666
- '''The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.
4673
+ '''``CfnDeploymentGroup.TargetGroupPairInfoProperty.ProdTrafficRoute``.
4667
4674
 
4668
4675
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-targetgrouppairinfo.html#cfn-codedeploy-deploymentgroup-targetgrouppairinfo-prodtrafficroute
4669
4676
  '''
@@ -4674,9 +4681,7 @@ class CfnDeploymentGroup(
4674
4681
  def target_groups(
4675
4682
  self,
4676
4683
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnDeploymentGroup.TargetGroupInfoProperty"]]]]:
4677
- '''One pair of target groups.
4678
-
4679
- One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.
4684
+ '''``CfnDeploymentGroup.TargetGroupPairInfoProperty.TargetGroups``.
4680
4685
 
4681
4686
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-targetgrouppairinfo.html#cfn-codedeploy-deploymentgroup-targetgrouppairinfo-targetgroups
4682
4687
  '''
@@ -4687,9 +4692,7 @@ class CfnDeploymentGroup(
4687
4692
  def test_traffic_route(
4688
4693
  self,
4689
4694
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnDeploymentGroup.TrafficRouteProperty"]]:
4690
- '''An optional path used by a load balancer to route test traffic after an Amazon ECS deployment.
4691
-
4692
- Validation can occur while test traffic is served during a deployment.
4695
+ '''``CfnDeploymentGroup.TargetGroupPairInfoProperty.TestTrafficRoute``.
4693
4696
 
4694
4697
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-targetgrouppairinfo.html#cfn-codedeploy-deploymentgroup-targetgrouppairinfo-testtrafficroute
4695
4698
  '''
@@ -4718,11 +4721,8 @@ class CfnDeploymentGroup(
4718
4721
  *,
4719
4722
  listener_arns: typing.Optional[typing.Sequence[builtins.str]] = None,
4720
4723
  ) -> None:
4721
- '''Information about a listener.
4722
-
4723
- The listener contains the path used to route traffic that is received from the load balancer to a target group.
4724
-
4725
- :param listener_arns: The Amazon Resource Name (ARN) of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.
4724
+ '''
4725
+ :param listener_arns: ``CfnDeploymentGroup.TrafficRouteProperty.ListenerArns``.
4726
4726
 
4727
4727
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-trafficroute.html
4728
4728
  :exampleMetadata: fixture=_generated
@@ -4746,9 +4746,7 @@ class CfnDeploymentGroup(
4746
4746
 
4747
4747
  @builtins.property
4748
4748
  def listener_arns(self) -> typing.Optional[typing.List[builtins.str]]:
4749
- '''The Amazon Resource Name (ARN) of one listener.
4750
-
4751
- The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one.
4749
+ '''``CfnDeploymentGroup.TrafficRouteProperty.ListenerArns``.
4752
4750
 
4753
4751
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-trafficroute.html#cfn-codedeploy-deploymentgroup-trafficroute-listenerarns
4754
4752
  '''
@@ -4923,8 +4921,8 @@ class CfnDeploymentGroupProps:
4923
4921
  :param load_balancer_info: Information about the load balancer to use in a deployment. For more information, see `Integrating CodeDeploy with Elastic Load Balancing <https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-elastic-load-balancing.html>`_ in the *AWS CodeDeploy User Guide* .
4924
4922
  :param on_premises_instance_tag_filters: The on-premises instance tags already applied to on-premises instances that you want to include in the deployment group. CodeDeploy includes all on-premises instances identified by any of the tags you specify in this deployment group. To register on-premises instances with CodeDeploy , see `Working with On-Premises Instances for CodeDeploy <https://docs.aws.amazon.com/codedeploy/latest/userguide/instances-on-premises.html>`_ in the *AWS CodeDeploy User Guide* . Duplicates are not allowed. You can specify ``OnPremisesInstanceTagFilters`` or ``OnPremisesInstanceTagSet`` , but not both.
4925
4923
  :param on_premises_tag_set: Information about groups of tags applied to on-premises instances. The deployment group includes only on-premises instances identified by all the tag groups. You can specify ``OnPremisesInstanceTagFilters`` or ``OnPremisesInstanceTagSet`` , but not both.
4926
- :param outdated_instances_strategy: Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. If this option is set to ``UPDATE`` or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances. If this option is set to ``IGNORE`` , CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.
4927
- :param tags: The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them. Each tag consists of a key and an optional value, both of which you define.
4924
+ :param outdated_instances_strategy: ``AWS::CodeDeploy::DeploymentGroup.OutdatedInstancesStrategy``.
4925
+ :param tags: ``AWS::CodeDeploy::DeploymentGroup.Tags``.
4928
4926
  :param trigger_configurations: Information about triggers associated with the deployment group. Duplicates are not allowed
4929
4927
 
4930
4928
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html
@@ -5328,11 +5326,7 @@ class CfnDeploymentGroupProps:
5328
5326
 
5329
5327
  @builtins.property
5330
5328
  def outdated_instances_strategy(self) -> typing.Optional[builtins.str]:
5331
- '''Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision.
5332
-
5333
- If this option is set to ``UPDATE`` or is unspecified, CodeDeploy initiates one or more 'auto-update outdated instances' deployments to apply the deployed application revision to the new Amazon EC2 instances.
5334
-
5335
- If this option is set to ``IGNORE`` , CodeDeploy does not initiate a deployment to update the new Amazon EC2 instances. This may result in instances having different revisions.
5329
+ '''``AWS::CodeDeploy::DeploymentGroup.OutdatedInstancesStrategy``.
5336
5330
 
5337
5331
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-outdatedinstancesstrategy
5338
5332
  '''
@@ -5341,9 +5335,7 @@ class CfnDeploymentGroupProps:
5341
5335
 
5342
5336
  @builtins.property
5343
5337
  def tags(self) -> typing.Optional[typing.List[_CfnTag_f6864754]]:
5344
- '''The metadata that you apply to CodeDeploy deployment groups to help you organize and categorize them.
5345
-
5346
- Each tag consists of a key and an optional value, both of which you define.
5338
+ '''``AWS::CodeDeploy::DeploymentGroup.Tags``.
5347
5339
 
5348
5340
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html#cfn-codedeploy-deploymentgroup-tags
5349
5341
  '''
@@ -5625,7 +5617,6 @@ class EcsBlueGreenDeploymentConfig:
5625
5617
 
5626
5618
  Example::
5627
5619
 
5628
- # Example automatically generated from non-compiling source. May contain errors.
5629
5620
  # my_application: codedeploy.EcsApplication
5630
5621
  # cluster: ecs.Cluster
5631
5622
  # task_definition: ecs.FargateTaskDefinition
@@ -5637,12 +5628,12 @@ class EcsBlueGreenDeploymentConfig:
5637
5628
  service = ecs.FargateService(self, "Service",
5638
5629
  cluster=cluster,
5639
5630
  task_definition=task_definition,
5640
- deployment_controller={
5641
- "type": ecs.DeploymentControllerType.CODE_DEPLOY
5642
- }
5631
+ deployment_controller=ecs.DeploymentController(
5632
+ type=ecs.DeploymentControllerType.CODE_DEPLOY
5633
+ )
5643
5634
  )
5644
5635
 
5645
- codedeploy.EcsDeploymentGroup(stack, "BlueGreenDG",
5636
+ codedeploy.EcsDeploymentGroup(self, "BlueGreenDG",
5646
5637
  service=service,
5647
5638
  blue_green_deployment_config=codedeploy.EcsBlueGreenDeploymentConfig(
5648
5639
  blue_target_group=blue_target_group,
@@ -5783,10 +5774,9 @@ class EcsDeploymentConfigProps(BaseDeploymentConfigOptions):
5783
5774
 
5784
5775
  Example::
5785
5776
 
5786
- # Example automatically generated from non-compiling source. May contain errors.
5787
5777
  codedeploy.EcsDeploymentConfig(self, "CustomConfig",
5788
- traffic_routing_config=codedeploy.TimeBasedCanaryTrafficRoutingConfig(
5789
- interval=cdk.Duration.minutes(15),
5778
+ traffic_routing=codedeploy.TimeBasedCanaryTrafficRouting(
5779
+ interval=Duration.minutes(15),
5790
5780
  percentage=5
5791
5781
  )
5792
5782
  )
@@ -5958,7 +5948,6 @@ class EcsDeploymentGroupProps:
5958
5948
 
5959
5949
  Example::
5960
5950
 
5961
- # Example automatically generated from non-compiling source. May contain errors.
5962
5951
  # my_application: codedeploy.EcsApplication
5963
5952
  # cluster: ecs.Cluster
5964
5953
  # task_definition: ecs.FargateTaskDefinition
@@ -5970,12 +5959,12 @@ class EcsDeploymentGroupProps:
5970
5959
  service = ecs.FargateService(self, "Service",
5971
5960
  cluster=cluster,
5972
5961
  task_definition=task_definition,
5973
- deployment_controller={
5974
- "type": ecs.DeploymentControllerType.CODE_DEPLOY
5975
- }
5962
+ deployment_controller=ecs.DeploymentController(
5963
+ type=ecs.DeploymentControllerType.CODE_DEPLOY
5964
+ )
5976
5965
  )
5977
5966
 
5978
- codedeploy.EcsDeploymentGroup(stack, "BlueGreenDG",
5967
+ codedeploy.EcsDeploymentGroup(self, "BlueGreenDG",
5979
5968
  service=service,
5980
5969
  blue_green_deployment_config=codedeploy.EcsBlueGreenDeploymentConfig(
5981
5970
  blue_target_group=blue_target_group,
@@ -7010,12 +6999,11 @@ class LambdaDeploymentConfigProps(BaseDeploymentConfigOptions):
7010
6999
 
7011
7000
  Example::
7012
7001
 
7013
- # Example automatically generated from non-compiling source. May contain errors.
7014
7002
  # application: codedeploy.LambdaApplication
7015
7003
  # alias: lambda.Alias
7016
7004
  config = codedeploy.LambdaDeploymentConfig(self, "CustomConfig",
7017
- traffic_routing_config=codedeploy.TimeBasedCanaryTrafficRoutingConfig(
7018
- interval=cdk.Duration.minutes(15),
7005
+ traffic_routing=codedeploy.TimeBasedCanaryTrafficRouting(
7006
+ interval=Duration.minutes(15),
7019
7007
  percentage=5
7020
7008
  )
7021
7009
  )
@@ -7077,12 +7065,11 @@ class LambdaDeploymentGroup(
7077
7065
 
7078
7066
  Example::
7079
7067
 
7080
- # Example automatically generated from non-compiling source. May contain errors.
7081
7068
  # application: codedeploy.LambdaApplication
7082
7069
  # alias: lambda.Alias
7083
7070
  config = codedeploy.LambdaDeploymentConfig(self, "CustomConfig",
7084
- traffic_routing_config=codedeploy.TimeBasedCanaryTrafficRoutingConfig(
7085
- interval=cdk.Duration.minutes(15),
7071
+ traffic_routing=codedeploy.TimeBasedCanaryTrafficRouting(
7072
+ interval=Duration.minutes(15),
7086
7073
  percentage=5
7087
7074
  )
7088
7075
  )
@@ -8291,15 +8278,16 @@ class ServerDeploymentGroupProps:
8291
8278
 
8292
8279
  Example::
8293
8280
 
8294
- import aws_cdk.aws_elasticloadbalancingv2 as elbv2
8281
+ import aws_cdk.aws_elasticloadbalancing as elb
8295
8282
 
8296
- # alb: elbv2.ApplicationLoadBalancer
8283
+ # lb: elb.LoadBalancer
8297
8284
 
8298
- listener = alb.add_listener("Listener", port=80)
8299
- target_group = listener.add_targets("Fleet", port=80)
8285
+ lb.add_listener(
8286
+ external_port=80
8287
+ )
8300
8288
 
8301
8289
  deployment_group = codedeploy.ServerDeploymentGroup(self, "DeploymentGroup",
8302
- load_balancer=codedeploy.LoadBalancer.application(target_group)
8290
+ load_balancer=codedeploy.LoadBalancer.classic(lb)
8303
8291
  )
8304
8292
  '''
8305
8293
  if isinstance(auto_rollback, dict):
@@ -8501,18 +8489,16 @@ class TimeBasedCanaryTrafficRoutingProps(BaseTrafficShiftingConfigProps):
8501
8489
  :param interval: The amount of time between traffic shifts.
8502
8490
  :param percentage: The percentage to increase traffic on each traffic shift.
8503
8491
 
8504
- :exampleMetadata: fixture=_generated
8492
+ :exampleMetadata: infused
8505
8493
 
8506
8494
  Example::
8507
8495
 
8508
- # The code below shows an example of how to instantiate this type.
8509
- # The values are placeholders you should change.
8510
- import aws_cdk as cdk
8511
- from aws_cdk import aws_codedeploy as codedeploy
8512
-
8513
- time_based_canary_traffic_routing_props = codedeploy.TimeBasedCanaryTrafficRoutingProps(
8514
- interval=cdk.Duration.minutes(30),
8515
- percentage=123
8496
+ config = codedeploy.LambdaDeploymentConfig(self, "CustomConfig",
8497
+ traffic_routing=codedeploy.TimeBasedCanaryTrafficRouting(
8498
+ interval=Duration.minutes(15),
8499
+ percentage=5
8500
+ ),
8501
+ deployment_config_name="MyDeploymentConfig"
8516
8502
  )
8517
8503
  '''
8518
8504
  if __debug__:
@@ -8622,15 +8608,17 @@ class TrafficRouting(
8622
8608
  ):
8623
8609
  '''Represents how traffic is shifted during a CodeDeploy deployment.
8624
8610
 
8625
- :exampleMetadata: fixture=_generated
8611
+ :exampleMetadata: infused
8626
8612
 
8627
8613
  Example::
8628
8614
 
8629
- # The code below shows an example of how to instantiate this type.
8630
- # The values are placeholders you should change.
8631
- from aws_cdk import aws_codedeploy as codedeploy
8632
-
8633
- traffic_routing = codedeploy.TrafficRouting.all_at_once()
8615
+ config = codedeploy.LambdaDeploymentConfig(self, "CustomConfig",
8616
+ traffic_routing=codedeploy.TimeBasedCanaryTrafficRouting(
8617
+ interval=Duration.minutes(15),
8618
+ percentage=5
8619
+ ),
8620
+ deployment_config_name="MyDeploymentConfig"
8621
+ )
8634
8622
  '''
8635
8623
 
8636
8624
  def __init__(self) -> None:
@@ -9142,19 +9130,27 @@ class EcsDeploymentConfig(
9142
9130
 
9143
9131
  Example::
9144
9132
 
9145
- # Example automatically generated from non-compiling source. May contain errors.
9146
- codedeploy.EcsDeploymentGroup(stack, "BlueGreenDG",
9133
+ # service: ecs.FargateService
9134
+ # blue_target_group: elbv2.ITargetGroup
9135
+ # green_target_group: elbv2.ITargetGroup
9136
+ # listener: elbv2.IApplicationListener
9137
+ # test_listener: elbv2.IApplicationListener
9138
+
9139
+
9140
+ codedeploy.EcsDeploymentGroup(self, "BlueGreenDG",
9141
+ auto_rollback=codedeploy.AutoRollbackConfig(
9142
+ # CodeDeploy will automatically roll back if the 8-hour approval period times out and the deployment stops
9143
+ stopped_deployment=True
9144
+ ),
9147
9145
  service=service,
9148
9146
  blue_green_deployment_config=codedeploy.EcsBlueGreenDeploymentConfig(
9147
+ # The deployment will wait for approval for up to 8 hours before stopping the deployment
9148
+ deployment_approval_wait_time=Duration.hours(8),
9149
9149
  blue_target_group=blue_target_group,
9150
9150
  green_target_group=green_target_group,
9151
9151
  listener=listener,
9152
- # CodeDeploy will wait for 30 minutes after completing the blue-green deployment before it terminates the blue tasks
9153
- termination_wait_time=Duration.minutes(30)
9152
+ test_listener=test_listener
9154
9153
  ),
9155
- # CodeDeploy will continue to monitor these alarms during the 30-minute bake time and will automatically
9156
- # roll back if they go into a failed state at any point during the deployment.
9157
- alarms=[blue_unhealthy_hosts, green_unhealthy_hosts, blue_api_failure, green_api_failure],
9158
9154
  deployment_config=codedeploy.EcsDeploymentConfig.CANARY_10PERCENT_5MINUTES
9159
9155
  )
9160
9156
  '''
@@ -9257,22 +9253,28 @@ class EcsDeploymentGroup(
9257
9253
 
9258
9254
  Example::
9259
9255
 
9260
- # Example automatically generated from non-compiling source. May contain errors.
9261
9256
  # my_application: codedeploy.EcsApplication
9262
- # service: ecs.FargateService
9257
+ # cluster: ecs.Cluster
9258
+ # task_definition: ecs.FargateTaskDefinition
9263
9259
  # blue_target_group: elbv2.ITargetGroup
9264
9260
  # green_target_group: elbv2.ITargetGroup
9265
9261
  # listener: elbv2.IApplicationListener
9266
- # test_listener: elbv2.IApplicationListener
9267
9262
 
9268
9263
 
9269
- codedeploy.EcsDeploymentGroup(stack, "BlueGreenDG",
9264
+ service = ecs.FargateService(self, "Service",
9265
+ cluster=cluster,
9266
+ task_definition=task_definition,
9267
+ deployment_controller=ecs.DeploymentController(
9268
+ type=ecs.DeploymentControllerType.CODE_DEPLOY
9269
+ )
9270
+ )
9271
+
9272
+ codedeploy.EcsDeploymentGroup(self, "BlueGreenDG",
9270
9273
  service=service,
9271
9274
  blue_green_deployment_config=codedeploy.EcsBlueGreenDeploymentConfig(
9272
9275
  blue_target_group=blue_target_group,
9273
9276
  green_target_group=green_target_group,
9274
- listener=listener,
9275
- test_listener=test_listener
9277
+ listener=listener
9276
9278
  ),
9277
9279
  deployment_config=codedeploy.EcsDeploymentConfig.CANARY_10PERCENT_5MINUTES
9278
9280
  )
@@ -9414,12 +9416,11 @@ class LambdaDeploymentConfig(
9414
9416
 
9415
9417
  Example::
9416
9418
 
9417
- # Example automatically generated from non-compiling source. May contain errors.
9418
9419
  # application: codedeploy.LambdaApplication
9419
9420
  # alias: lambda.Alias
9420
9421
  config = codedeploy.LambdaDeploymentConfig(self, "CustomConfig",
9421
- traffic_routing_config=codedeploy.TimeBasedCanaryTrafficRoutingConfig(
9422
- interval=cdk.Duration.minutes(15),
9422
+ traffic_routing=codedeploy.TimeBasedCanaryTrafficRouting(
9423
+ interval=Duration.minutes(15),
9423
9424
  percentage=5
9424
9425
  )
9425
9426
  )
@@ -9677,15 +9678,17 @@ class TimeBasedCanaryTrafficRouting(
9677
9678
  ):
9678
9679
  '''Define a traffic routing config of type 'TimeBasedCanary'.
9679
9680
 
9680
- :exampleMetadata: fixture=_generated
9681
+ :exampleMetadata: infused
9681
9682
 
9682
9683
  Example::
9683
9684
 
9684
- # The code below shows an example of how to instantiate this type.
9685
- # The values are placeholders you should change.
9686
- from aws_cdk import aws_codedeploy as codedeploy
9687
-
9688
- time_based_canary_traffic_routing = codedeploy.TimeBasedCanaryTrafficRouting.all_at_once()
9685
+ config = codedeploy.LambdaDeploymentConfig(self, "CustomConfig",
9686
+ traffic_routing=codedeploy.TimeBasedCanaryTrafficRouting(
9687
+ interval=Duration.minutes(15),
9688
+ percentage=5
9689
+ ),
9690
+ deployment_config_name="MyDeploymentConfig"
9691
+ )
9689
9692
  '''
9690
9693
 
9691
9694
  def __init__(