aws-cdk-lib 2.177.0__py3-none-any.whl → 2.178.1__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.
Files changed (111) hide show
  1. aws_cdk/__init__.py +95 -61
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.177.0.jsii.tgz → aws-cdk-lib@2.178.1.jsii.tgz} +0 -0
  4. aws_cdk/aws_amplifyuibuilder/__init__.py +8 -8
  5. aws_cdk/aws_apigateway/__init__.py +97 -97
  6. aws_cdk/aws_apigatewayv2/__init__.py +35 -10
  7. aws_cdk/aws_appconfig/__init__.py +10 -10
  8. aws_cdk/aws_appflow/__init__.py +20 -20
  9. aws_cdk/aws_applicationsignals/__init__.py +8 -8
  10. aws_cdk/aws_appmesh/__init__.py +8 -8
  11. aws_cdk/aws_appsync/__init__.py +10383 -7035
  12. aws_cdk/aws_apptest/__init__.py +4 -4
  13. aws_cdk/aws_aps/__init__.py +135 -0
  14. aws_cdk/aws_athena/__init__.py +10 -10
  15. aws_cdk/aws_backup/__init__.py +14 -14
  16. aws_cdk/aws_batch/__init__.py +185 -22
  17. aws_cdk/aws_bcmdataexports/__init__.py +4 -4
  18. aws_cdk/aws_bedrock/__init__.py +266 -177
  19. aws_cdk/aws_certificatemanager/__init__.py +15 -14
  20. aws_cdk/aws_chatbot/__init__.py +4 -4
  21. aws_cdk/aws_cloudformation/__init__.py +22 -18
  22. aws_cdk/aws_cloudfront/__init__.py +674 -7
  23. aws_cdk/aws_cloudfront_origins/__init__.py +40 -0
  24. aws_cdk/aws_cloudtrail/__init__.py +4 -4
  25. aws_cdk/aws_cloudwatch/__init__.py +53 -53
  26. aws_cdk/aws_codedeploy/__init__.py +2 -2
  27. aws_cdk/aws_codepipeline/__init__.py +24 -6
  28. aws_cdk/aws_codepipeline_actions/__init__.py +2 -2
  29. aws_cdk/aws_cognito/__init__.py +42 -20
  30. aws_cdk/aws_connect/__init__.py +4 -4
  31. aws_cdk/aws_customerprofiles/__init__.py +3 -1
  32. aws_cdk/aws_databrew/__init__.py +16 -16
  33. aws_cdk/aws_datasync/__init__.py +14 -11
  34. aws_cdk/aws_datazone/__init__.py +5 -5
  35. aws_cdk/aws_dms/__init__.py +4 -4
  36. aws_cdk/aws_dynamodb/__init__.py +267 -25
  37. aws_cdk/aws_ec2/__init__.py +1137 -181
  38. aws_cdk/aws_ecs/__init__.py +740 -116
  39. aws_cdk/aws_ecs_patterns/__init__.py +49 -0
  40. aws_cdk/aws_efs/__init__.py +3 -3
  41. aws_cdk/aws_eks/__init__.py +31 -32
  42. aws_cdk/aws_elasticache/__init__.py +10 -10
  43. aws_cdk/aws_elasticloadbalancingv2/__init__.py +47 -18
  44. aws_cdk/aws_elasticsearch/__init__.py +10 -10
  45. aws_cdk/aws_emr/__init__.py +16 -16
  46. aws_cdk/aws_emrserverless/__init__.py +12 -9
  47. aws_cdk/aws_entityresolution/__init__.py +31 -17
  48. aws_cdk/aws_events/__init__.py +12 -12
  49. aws_cdk/aws_fis/__init__.py +16 -16
  50. aws_cdk/aws_fms/__init__.py +7 -3
  51. aws_cdk/aws_glue/__init__.py +1326 -7
  52. aws_cdk/aws_greengrassv2/__init__.py +8 -8
  53. aws_cdk/aws_guardduty/__init__.py +521 -0
  54. aws_cdk/aws_healthlake/__init__.py +10 -2
  55. aws_cdk/aws_imagebuilder/__init__.py +26 -26
  56. aws_cdk/aws_iot/__init__.py +40 -40
  57. aws_cdk/aws_iotanalytics/__init__.py +4 -4
  58. aws_cdk/aws_iotfleetwise/__init__.py +424 -10
  59. aws_cdk/aws_iotsitewise/__init__.py +84 -13
  60. aws_cdk/aws_iottwinmaker/__init__.py +18 -18
  61. aws_cdk/aws_iotwireless/__init__.py +4 -4
  62. aws_cdk/aws_kafkaconnect/__init__.py +10 -10
  63. aws_cdk/aws_kendra/__init__.py +0 -10
  64. aws_cdk/aws_kinesisanalytics/__init__.py +4 -4
  65. aws_cdk/aws_kinesisanalyticsv2/__init__.py +4 -4
  66. aws_cdk/aws_kinesisfirehose/__init__.py +4544 -183
  67. aws_cdk/aws_kms/__init__.py +11 -10
  68. aws_cdk/aws_lambda/__init__.py +34 -4
  69. aws_cdk/aws_lambda_nodejs/__init__.py +24 -5
  70. aws_cdk/aws_launchwizard/__init__.py +10 -10
  71. aws_cdk/aws_logs/__init__.py +19 -15
  72. aws_cdk/aws_mediaconnect/__init__.py +509 -12
  73. aws_cdk/aws_medialive/__init__.py +16 -16
  74. aws_cdk/aws_mediatailor/__init__.py +10 -10
  75. aws_cdk/aws_networkfirewall/__init__.py +12 -12
  76. aws_cdk/aws_notifications/__init__.py +602 -65
  77. aws_cdk/aws_omics/__init__.py +4 -4
  78. aws_cdk/aws_opensearchservice/__init__.py +10 -10
  79. aws_cdk/aws_opsworks/__init__.py +58 -58
  80. aws_cdk/aws_personalize/__init__.py +8 -8
  81. aws_cdk/aws_pipes/__init__.py +20 -20
  82. aws_cdk/aws_qbusiness/__init__.py +119 -0
  83. aws_cdk/aws_quicksight/__init__.py +247 -92
  84. aws_cdk/aws_rds/__init__.py +21 -15
  85. aws_cdk/aws_redshift/__init__.py +10 -10
  86. aws_cdk/aws_resiliencehub/__init__.py +0 -41
  87. aws_cdk/aws_route53/__init__.py +6 -0
  88. aws_cdk/aws_rum/__init__.py +4 -4
  89. aws_cdk/aws_s3/__init__.py +12 -2
  90. aws_cdk/aws_sagemaker/__init__.py +84 -60
  91. aws_cdk/aws_sam/__init__.py +48 -48
  92. aws_cdk/aws_secretsmanager/__init__.py +30 -14
  93. aws_cdk/aws_securityhub/__init__.py +12 -12
  94. aws_cdk/aws_sns/__init__.py +101 -15
  95. aws_cdk/aws_ssmquicksetup/__init__.py +10 -10
  96. aws_cdk/aws_stepfunctions/__init__.py +13207 -4740
  97. aws_cdk/aws_stepfunctions_tasks/__init__.py +77615 -22817
  98. aws_cdk/aws_synthetics/__init__.py +4 -4
  99. aws_cdk/aws_timestream/__init__.py +41 -0
  100. aws_cdk/aws_transfer/__init__.py +9 -10
  101. aws_cdk/aws_wafv2/__init__.py +24 -22
  102. aws_cdk/aws_wisdom/__init__.py +8 -8
  103. aws_cdk/aws_workspacesweb/__init__.py +60 -60
  104. aws_cdk/aws_xray/__init__.py +8 -8
  105. aws_cdk/cx_api/__init__.py +18 -0
  106. {aws_cdk_lib-2.177.0.dist-info → aws_cdk_lib-2.178.1.dist-info}/METADATA +1 -1
  107. {aws_cdk_lib-2.177.0.dist-info → aws_cdk_lib-2.178.1.dist-info}/RECORD +111 -111
  108. {aws_cdk_lib-2.177.0.dist-info → aws_cdk_lib-2.178.1.dist-info}/LICENSE +0 -0
  109. {aws_cdk_lib-2.177.0.dist-info → aws_cdk_lib-2.178.1.dist-info}/NOTICE +0 -0
  110. {aws_cdk_lib-2.177.0.dist-info → aws_cdk_lib-2.178.1.dist-info}/WHEEL +0 -0
  111. {aws_cdk_lib-2.177.0.dist-info → aws_cdk_lib-2.178.1.dist-info}/top_level.txt +0 -0
@@ -620,6 +620,24 @@ cloudfront.Distribution(self, "myDist",
620
620
  )
621
621
  ```
622
622
 
623
+ ### Selection Criteria: Media Quality Based with AWS Elemental MediaPackageV2
624
+
625
+ You can setup your origin group to be configured for media quality based failover with your AWS Elemental MediaPackageV2 endpoints.
626
+ You can achieve this behavior in the CDK, again using the `OriginGroup` class:
627
+
628
+ ```python
629
+ cloudfront.Distribution(self, "myDist",
630
+ default_behavior=cloudfront.BehaviorOptions(
631
+ origin=origins.OriginGroup(
632
+ primary_origin=origins.HttpOrigin("<AWS Elemental MediaPackageV2 origin 1>"),
633
+ fallback_origin=origins.HttpOrigin("<AWS Elemental MediaPackageV2 origin 2>"),
634
+ fallback_status_codes=[404],
635
+ selection_criteria=cloudfront.OriginSelectionCriteria.MEDIA_QUALITY_BASED
636
+ )
637
+ )
638
+ )
639
+ ```
640
+
623
641
  ## From an API Gateway REST API
624
642
 
625
643
  Origins can be created from an API Gateway REST API. It is recommended to use a
@@ -752,6 +770,7 @@ from ..aws_cloudfront import (
752
770
  OriginBindOptions as _OriginBindOptions_088c2b51,
753
771
  OriginProps as _OriginProps_0675928d,
754
772
  OriginProtocolPolicy as _OriginProtocolPolicy_967ed73c,
773
+ OriginSelectionCriteria as _OriginSelectionCriteria_ba6d3e21,
755
774
  OriginSslPolicy as _OriginSslPolicy_d65cede2,
756
775
  )
757
776
  from ..aws_elasticloadbalancingv2 import ILoadBalancerV2 as _ILoadBalancerV2_4c5c0fbb
@@ -2336,16 +2355,19 @@ class OriginGroup(
2336
2355
  fallback_origin: _IOrigin_83d4c1fa,
2337
2356
  primary_origin: _IOrigin_83d4c1fa,
2338
2357
  fallback_status_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
2358
+ selection_criteria: typing.Optional[_OriginSelectionCriteria_ba6d3e21] = None,
2339
2359
  ) -> None:
2340
2360
  '''
2341
2361
  :param fallback_origin: The fallback origin that should serve requests when the primary fails.
2342
2362
  :param primary_origin: The primary origin that should serve requests for this group.
2343
2363
  :param fallback_status_codes: The list of HTTP status codes that, when returned from the primary origin, would cause querying the fallback origin. Default: - 500, 502, 503 and 504
2364
+ :param selection_criteria: The selection criteria for the origin group. Default: - OriginSelectionCriteria.DEFAULT
2344
2365
  '''
2345
2366
  props = OriginGroupProps(
2346
2367
  fallback_origin=fallback_origin,
2347
2368
  primary_origin=primary_origin,
2348
2369
  fallback_status_codes=fallback_status_codes,
2370
+ selection_criteria=selection_criteria,
2349
2371
  )
2350
2372
 
2351
2373
  jsii.create(self.__class__, self, [props])
@@ -2381,6 +2403,7 @@ class OriginGroup(
2381
2403
  "fallback_origin": "fallbackOrigin",
2382
2404
  "primary_origin": "primaryOrigin",
2383
2405
  "fallback_status_codes": "fallbackStatusCodes",
2406
+ "selection_criteria": "selectionCriteria",
2384
2407
  },
2385
2408
  )
2386
2409
  class OriginGroupProps:
@@ -2390,12 +2413,14 @@ class OriginGroupProps:
2390
2413
  fallback_origin: _IOrigin_83d4c1fa,
2391
2414
  primary_origin: _IOrigin_83d4c1fa,
2392
2415
  fallback_status_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
2416
+ selection_criteria: typing.Optional[_OriginSelectionCriteria_ba6d3e21] = None,
2393
2417
  ) -> None:
2394
2418
  '''Construction properties for ``OriginGroup``.
2395
2419
 
2396
2420
  :param fallback_origin: The fallback origin that should serve requests when the primary fails.
2397
2421
  :param primary_origin: The primary origin that should serve requests for this group.
2398
2422
  :param fallback_status_codes: The list of HTTP status codes that, when returned from the primary origin, would cause querying the fallback origin. Default: - 500, 502, 503 and 504
2423
+ :param selection_criteria: The selection criteria for the origin group. Default: - OriginSelectionCriteria.DEFAULT
2399
2424
 
2400
2425
  :exampleMetadata: infused
2401
2426
 
@@ -2418,12 +2443,15 @@ class OriginGroupProps:
2418
2443
  check_type(argname="argument fallback_origin", value=fallback_origin, expected_type=type_hints["fallback_origin"])
2419
2444
  check_type(argname="argument primary_origin", value=primary_origin, expected_type=type_hints["primary_origin"])
2420
2445
  check_type(argname="argument fallback_status_codes", value=fallback_status_codes, expected_type=type_hints["fallback_status_codes"])
2446
+ check_type(argname="argument selection_criteria", value=selection_criteria, expected_type=type_hints["selection_criteria"])
2421
2447
  self._values: typing.Dict[builtins.str, typing.Any] = {
2422
2448
  "fallback_origin": fallback_origin,
2423
2449
  "primary_origin": primary_origin,
2424
2450
  }
2425
2451
  if fallback_status_codes is not None:
2426
2452
  self._values["fallback_status_codes"] = fallback_status_codes
2453
+ if selection_criteria is not None:
2454
+ self._values["selection_criteria"] = selection_criteria
2427
2455
 
2428
2456
  @builtins.property
2429
2457
  def fallback_origin(self) -> _IOrigin_83d4c1fa:
@@ -2448,6 +2476,17 @@ class OriginGroupProps:
2448
2476
  result = self._values.get("fallback_status_codes")
2449
2477
  return typing.cast(typing.Optional[typing.List[jsii.Number]], result)
2450
2478
 
2479
+ @builtins.property
2480
+ def selection_criteria(self) -> typing.Optional[_OriginSelectionCriteria_ba6d3e21]:
2481
+ '''The selection criteria for the origin group.
2482
+
2483
+ :default: - OriginSelectionCriteria.DEFAULT
2484
+
2485
+ :see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/high_availability_origin_failover.html#concept_origin_groups.creating
2486
+ '''
2487
+ result = self._values.get("selection_criteria")
2488
+ return typing.cast(typing.Optional[_OriginSelectionCriteria_ba6d3e21], result)
2489
+
2451
2490
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
2452
2491
  return isinstance(rhs, self.__class__) and rhs._values == self._values
2453
2492
 
@@ -4435,6 +4474,7 @@ def _typecheckingstub__3d6baf80fcac5a22fc2c985c83f9022e23b11075b338c076ac86172ff
4435
4474
  fallback_origin: _IOrigin_83d4c1fa,
4436
4475
  primary_origin: _IOrigin_83d4c1fa,
4437
4476
  fallback_status_codes: typing.Optional[typing.Sequence[jsii.Number]] = None,
4477
+ selection_criteria: typing.Optional[_OriginSelectionCriteria_ba6d3e21] = None,
4438
4478
  ) -> None:
4439
4479
  """Type checking stubs"""
4440
4480
  pass
@@ -1170,7 +1170,7 @@ class CfnDashboard(
1170
1170
  *,
1171
1171
  query_statement: builtins.str,
1172
1172
  query_parameters: typing.Optional[typing.Sequence[builtins.str]] = None,
1173
- view_properties: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
1173
+ view_properties: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
1174
1174
  ) -> None:
1175
1175
  '''Contains information about a widget on a CloudTrail Lake dashboard.
1176
1176
 
@@ -1239,7 +1239,7 @@ class CfnDashboard(
1239
1239
  @builtins.property
1240
1240
  def view_properties(
1241
1241
  self,
1242
- ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]]:
1242
+ ) -> typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]]:
1243
1243
  '''The view properties for the widget.
1244
1244
 
1245
1245
  For more information about view properties, see `View properties for widgets <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/lake-widget-properties.html>`_ in the *AWS CloudTrail User Guide* .
@@ -1247,7 +1247,7 @@ class CfnDashboard(
1247
1247
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudtrail-dashboard-widget.html#cfn-cloudtrail-dashboard-widget-viewproperties
1248
1248
  '''
1249
1249
  result = self._values.get("view_properties")
1250
- return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]], result)
1250
+ return typing.cast(typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]], result)
1251
1251
 
1252
1252
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
1253
1253
  return isinstance(rhs, self.__class__) and rhs._values == self._values
@@ -5277,7 +5277,7 @@ def _typecheckingstub__dc8abf1361e0023c8b0a4cba28dced78eff4f36aa3c868efa3feed153
5277
5277
  *,
5278
5278
  query_statement: builtins.str,
5279
5279
  query_parameters: typing.Optional[typing.Sequence[builtins.str]] = None,
5280
- view_properties: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Mapping[builtins.str, builtins.str]]] = None,
5280
+ view_properties: typing.Optional[typing.Union[typing.Mapping[builtins.str, builtins.str], _IResolvable_da3f097b]] = None,
5281
5281
  ) -> None:
5282
5282
  """Type checking stubs"""
5283
5283
  pass
@@ -1194,7 +1194,7 @@ class AlarmStatusWidgetProps:
1194
1194
  :param alarms: CloudWatch Alarms to show in widget.
1195
1195
  :param height: Height of the widget. Default: 3
1196
1196
  :param sort_by: Specifies how to sort the alarms in the widget. Default: - alphabetical order
1197
- :param states: Use this field to filter the list of alarms displayed in the widget to only those alarms currently in the specified states. You can specify one or more alarm states in the value for this field. The alarm states that you can specify are ALARM, INSUFFICIENT_DATA, and OK. If you omit this field or specify an empty array, all the alarms specifed in alarms are displayed. Default: - all the alarms specified in alarms are displayed.
1197
+ :param states: Use this field to filter the list of alarms displayed in the widget to only those alarms currently in the specified states. You can specify one or more alarm states in the value for this field. The alarm states that you can specify are ALARM, INSUFFICIENT_DATA, and OK. If you omit this field or specify an empty array, all the alarms specified in alarms are displayed. Default: - all the alarms specified in alarms are displayed.
1198
1198
  :param title: The title of the widget. Default: 'Alarm Status'
1199
1199
  :param width: Width of the widget, in a grid of 24 units wide. Default: 6
1200
1200
 
@@ -1265,7 +1265,7 @@ class AlarmStatusWidgetProps:
1265
1265
  You can specify one or more alarm states in the value for this field.
1266
1266
  The alarm states that you can specify are ALARM, INSUFFICIENT_DATA, and OK.
1267
1267
 
1268
- If you omit this field or specify an empty array, all the alarms specifed in alarms are displayed.
1268
+ If you omit this field or specify an empty array, all the alarms specified in alarms are displayed.
1269
1269
 
1270
1270
  :default: - all the alarms specified in alarms are displayed.
1271
1271
  '''
@@ -10847,19 +10847,23 @@ class Statistic(enum.Enum):
10847
10847
 
10848
10848
  Example::
10849
10849
 
10850
- # matchmaking_rule_set: gamelift.MatchmakingRuleSet
10850
+ import aws_cdk.aws_cloudwatch as cloudwatch
10851
10851
 
10852
- # Alarm that triggers when the per-second average of not placed matches exceed 10%
10853
- rule_evaluation_ratio = cloudwatch.MathExpression(
10854
- expression="1 - (ruleEvaluationsPassed / ruleEvaluationsFailed)",
10852
+ # delivery_stream: firehose.DeliveryStream
10853
+
10854
+
10855
+ # Alarm that triggers when the per-second average of incoming bytes exceeds 90% of the current service limit
10856
+ incoming_bytes_percent_of_limit = cloudwatch.MathExpression(
10857
+ expression="incomingBytes / 300 / bytePerSecLimit",
10855
10858
  using_metrics={
10856
- "rule_evaluations_passed": matchmaking_rule_set.metric_rule_evaluations_passed(statistic=cloudwatch.Statistic.SUM),
10857
- "rule_evaluations_failed": matchmaking_rule_set.metric("ruleEvaluationsFailed")
10859
+ "incoming_bytes": delivery_stream.metric_incoming_bytes(statistic=cloudwatch.Statistic.SUM),
10860
+ "byte_per_sec_limit": delivery_stream.metric("BytesPerSecondLimit")
10858
10861
  }
10859
10862
  )
10863
+
10860
10864
  cloudwatch.Alarm(self, "Alarm",
10861
- metric=rule_evaluation_ratio,
10862
- threshold=0.1,
10865
+ metric=incoming_bytes_percent_of_limit,
10866
+ threshold=0.9,
10863
10867
  evaluation_periods=3
10864
10868
  )
10865
10869
  '''
@@ -12590,31 +12594,29 @@ class AlarmProps(CreateAlarmOptions):
12590
12594
 
12591
12595
  Example::
12592
12596
 
12593
- import aws_cdk.aws_cloudwatch as cloudwatch
12597
+ # log_group: logs.LogGroup
12594
12598
 
12595
- # alias: lambda.Alias
12599
+ mf = logs.MetricFilter(self, "MetricFilter",
12600
+ log_group=log_group,
12601
+ metric_namespace="MyApp",
12602
+ metric_name="Latency",
12603
+ filter_pattern=logs.FilterPattern.exists("$.latency"),
12604
+ metric_value="$.latency",
12605
+ dimensions={
12606
+ "ErrorCode": "$.errorCode"
12607
+ },
12608
+ unit=cloudwatch.Unit.MILLISECONDS
12609
+ )
12596
12610
 
12597
- # or add alarms to an existing group
12598
- # blue_green_alias: lambda.Alias
12611
+ # expose a metric from the metric filter
12612
+ metric = mf.metric()
12599
12613
 
12600
- alarm = cloudwatch.Alarm(self, "Errors",
12601
- comparison_operator=cloudwatch.ComparisonOperator.GREATER_THAN_THRESHOLD,
12602
- threshold=1,
12603
- evaluation_periods=1,
12604
- metric=alias.metric_errors()
12605
- )
12606
- deployment_group = codedeploy.LambdaDeploymentGroup(self, "BlueGreenDeployment",
12607
- alias=alias,
12608
- deployment_config=codedeploy.LambdaDeploymentConfig.LINEAR_10PERCENT_EVERY_1MINUTE,
12609
- alarms=[alarm
12610
- ]
12614
+ # you can use the metric to create a new alarm
12615
+ cloudwatch.Alarm(self, "alarm from metric filter",
12616
+ metric=metric,
12617
+ threshold=100,
12618
+ evaluation_periods=2
12611
12619
  )
12612
- deployment_group.add_alarm(cloudwatch.Alarm(self, "BlueGreenErrors",
12613
- comparison_operator=cloudwatch.ComparisonOperator.GREATER_THAN_THRESHOLD,
12614
- threshold=1,
12615
- evaluation_periods=1,
12616
- metric=blue_green_alias.metric_errors()
12617
- ))
12618
12620
  '''
12619
12621
  if __debug__:
12620
12622
  type_hints = typing.get_type_hints(_typecheckingstub__b2e7c873c118fbc1f6cf26e1bb5bd3d8549040c626a6450f2d686bb07b87266b)
@@ -14628,7 +14630,7 @@ class AlarmStatusWidget(
14628
14630
  :param alarms: CloudWatch Alarms to show in widget.
14629
14631
  :param height: Height of the widget. Default: 3
14630
14632
  :param sort_by: Specifies how to sort the alarms in the widget. Default: - alphabetical order
14631
- :param states: Use this field to filter the list of alarms displayed in the widget to only those alarms currently in the specified states. You can specify one or more alarm states in the value for this field. The alarm states that you can specify are ALARM, INSUFFICIENT_DATA, and OK. If you omit this field or specify an empty array, all the alarms specifed in alarms are displayed. Default: - all the alarms specified in alarms are displayed.
14633
+ :param states: Use this field to filter the list of alarms displayed in the widget to only those alarms currently in the specified states. You can specify one or more alarm states in the value for this field. The alarm states that you can specify are ALARM, INSUFFICIENT_DATA, and OK. If you omit this field or specify an empty array, all the alarms specified in alarms are displayed. Default: - all the alarms specified in alarms are displayed.
14632
14634
  :param title: The title of the widget. Default: 'Alarm Status'
14633
14635
  :param width: Width of the widget, in a grid of 24 units wide. Default: 6
14634
14636
  '''
@@ -14859,31 +14861,29 @@ class Alarm(
14859
14861
 
14860
14862
  Example::
14861
14863
 
14862
- import aws_cdk.aws_cloudwatch as cloudwatch
14864
+ # log_group: logs.LogGroup
14863
14865
 
14864
- # alias: lambda.Alias
14866
+ mf = logs.MetricFilter(self, "MetricFilter",
14867
+ log_group=log_group,
14868
+ metric_namespace="MyApp",
14869
+ metric_name="Latency",
14870
+ filter_pattern=logs.FilterPattern.exists("$.latency"),
14871
+ metric_value="$.latency",
14872
+ dimensions={
14873
+ "ErrorCode": "$.errorCode"
14874
+ },
14875
+ unit=cloudwatch.Unit.MILLISECONDS
14876
+ )
14865
14877
 
14866
- # or add alarms to an existing group
14867
- # blue_green_alias: lambda.Alias
14878
+ # expose a metric from the metric filter
14879
+ metric = mf.metric()
14868
14880
 
14869
- alarm = cloudwatch.Alarm(self, "Errors",
14870
- comparison_operator=cloudwatch.ComparisonOperator.GREATER_THAN_THRESHOLD,
14871
- threshold=1,
14872
- evaluation_periods=1,
14873
- metric=alias.metric_errors()
14874
- )
14875
- deployment_group = codedeploy.LambdaDeploymentGroup(self, "BlueGreenDeployment",
14876
- alias=alias,
14877
- deployment_config=codedeploy.LambdaDeploymentConfig.LINEAR_10PERCENT_EVERY_1MINUTE,
14878
- alarms=[alarm
14879
- ]
14881
+ # you can use the metric to create a new alarm
14882
+ cloudwatch.Alarm(self, "alarm from metric filter",
14883
+ metric=metric,
14884
+ threshold=100,
14885
+ evaluation_periods=2
14880
14886
  )
14881
- deployment_group.add_alarm(cloudwatch.Alarm(self, "BlueGreenErrors",
14882
- comparison_operator=cloudwatch.ComparisonOperator.GREATER_THAN_THRESHOLD,
14883
- threshold=1,
14884
- evaluation_periods=1,
14885
- metric=blue_green_alias.metric_errors()
14886
- ))
14887
14887
  '''
14888
14888
 
14889
14889
  def __init__(
@@ -5893,7 +5893,7 @@ class EcsBlueGreenDeploymentConfig:
5893
5893
  :param listener: The load balancer listener used to serve production traffic and to shift production traffic from the 'blue' ECS task set to the 'green' ECS task set during a blue-green deployment.
5894
5894
  :param deployment_approval_wait_time: Specify how long CodeDeploy waits for approval to continue a blue-green deployment before it stops the deployment. After provisioning the 'green' ECS task set and re-routing test traffic, CodeDeploy can wait for approval before continuing the deployment and re-routing production traffic. During this wait time, validation such as manual testing or running integration tests can occur using the test traffic port, prior to exposing the new 'green' task set to production traffic. To approve the deployment, validation steps use the CodeDeploy [ContinueDeployment API(https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_ContinueDeployment.html). If the ContinueDeployment API is not called within the wait time period, CodeDeploy will stop the deployment. By default, CodeDeploy will not wait for deployment approval. After re-routing test traffic to the 'green' ECS task set and running any 'AfterAllowTestTraffic' and 'BeforeAllowTraffic' lifecycle hooks, the deployment will immediately re-route production traffic to the 'green' ECS task set. Default: 0
5895
5895
  :param termination_wait_time: Specify how long CodeDeploy waits before it terminates the original 'blue' ECS task set when a blue-green deployment is complete. During this wait time, CodeDeploy will continue to monitor any CloudWatch alarms specified for the deployment group, and the deployment group can be configured to automatically roll back if those alarms fire. Once CodeDeploy begins to terminate the 'blue' ECS task set, the deployment can no longer be rolled back, manually or automatically. By default, the deployment will immediately terminate the 'blue' ECS task set after production traffic is successfully routed to the 'green' ECS task set. Default: 0
5896
- :param test_listener: The load balancer listener used to route test traffic to the 'green' ECS task set during a blue-green deployment. During a blue-green deployment, validation can occur after test traffic has been re-routed and before production traffic has been re-routed to the 'green' ECS task set. You can specify one or more Lambda funtions in the deployment's AppSpec file that run during the AfterAllowTestTraffic hook. The functions can run validation tests. If a validation test fails, a deployment rollback is triggered. If the validation tests succeed, the next hook in the deployment lifecycle, BeforeAllowTraffic, is triggered. If a test listener is not specified, the deployment will proceed to routing the production listener to the 'green' ECS task set and will skip the AfterAllowTestTraffic hook. Default: No test listener will be added
5896
+ :param test_listener: The load balancer listener used to route test traffic to the 'green' ECS task set during a blue-green deployment. During a blue-green deployment, validation can occur after test traffic has been re-routed and before production traffic has been re-routed to the 'green' ECS task set. You can specify one or more Lambda functions in the deployment's AppSpec file that run during the AfterAllowTestTraffic hook. The functions can run validation tests. If a validation test fails, a deployment rollback is triggered. If the validation tests succeed, the next hook in the deployment lifecycle, BeforeAllowTraffic, is triggered. If a test listener is not specified, the deployment will proceed to routing the production listener to the 'green' ECS task set and will skip the AfterAllowTestTraffic hook. Default: No test listener will be added
5897
5897
 
5898
5898
  :see: https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-ecs
5899
5899
  :exampleMetadata: infused
@@ -6008,7 +6008,7 @@ class EcsBlueGreenDeploymentConfig:
6008
6008
  '''The load balancer listener used to route test traffic to the 'green' ECS task set during a blue-green deployment.
6009
6009
 
6010
6010
  During a blue-green deployment, validation can occur after test traffic has been re-routed and before production
6011
- traffic has been re-routed to the 'green' ECS task set. You can specify one or more Lambda funtions in the
6011
+ traffic has been re-routed to the 'green' ECS task set. You can specify one or more Lambda functions in the
6012
6012
  deployment's AppSpec file that run during the AfterAllowTestTraffic hook. The functions can run validation tests.
6013
6013
  If a validation test fails, a deployment rollback is triggered. If the validation tests succeed, the next hook in
6014
6014
  the deployment lifecycle, BeforeAllowTraffic, is triggered.
@@ -3560,6 +3560,8 @@ class CfnPipeline(
3560
3560
  ) -> None:
3561
3561
  '''The conditions for making checks for entry to a stage.
3562
3562
 
3563
+ For more information about conditions, see `Stage conditions <https://docs.aws.amazon.com/codepipeline/latest/userguide/stage-conditions.html>`_ and `How do stage conditions work? <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts-how-it-works-conditions.html>`_ .
3564
+
3563
3565
  :param conditions: The conditions that are configured as entry conditions.
3564
3566
 
3565
3567
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-beforeentryconditions.html
@@ -3704,7 +3706,7 @@ class CfnPipeline(
3704
3706
  ) -> None:
3705
3707
  '''The condition for the stage.
3706
3708
 
3707
- A condition is made up of the rules and the result for the condition. For more information about conditions, see `Stage conditions <https://docs.aws.amazon.com/codepipeline/latest/userguide/stage-conditions.html>`_ . For more information about rules, see the `AWS CodePipeline rule reference <https://docs.aws.amazon.com/codepipeline/latest/userguide/rule-reference.html>`_ .
3709
+ A condition is made up of the rules and the result for the condition. For more information about conditions, see `Stage conditions <https://docs.aws.amazon.com/codepipeline/latest/userguide/stage-conditions.html>`_ and `How do stage conditions work? <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts-how-it-works-conditions.html>`_ .. For more information about rules, see the `AWS CodePipeline rule reference <https://docs.aws.amazon.com/codepipeline/latest/userguide/rule-reference.html>`_ .
3708
3710
 
3709
3711
  :param result: The action to be done when the condition is met. For example, rolling back an execution for a failure condition.
3710
3712
  :param rules: The rules that make up the condition.
@@ -3877,7 +3879,9 @@ class CfnPipeline(
3877
3879
  ) -> None:
3878
3880
  '''The configuration that specifies the result, such as rollback, to occur upon stage failure.
3879
3881
 
3880
- :param conditions: The conditions that are configured as failure conditions.
3882
+ For more information about conditions, see `Stage conditions <https://docs.aws.amazon.com/codepipeline/latest/userguide/stage-conditions.html>`_ and `How do stage conditions work? <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts-how-it-works-conditions.html>`_ .
3883
+
3884
+ :param conditions: The conditions that are configured as failure conditions. For more information about conditions, see `Stage conditions <https://docs.aws.amazon.com/codepipeline/latest/userguide/stage-conditions.html>`_ and `How do stage conditions work? <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts-how-it-works-conditions.html>`_ .
3881
3885
  :param result: The specified result for when the failure conditions are met, such as rolling back the stage.
3882
3886
  :param retry_configuration: The retry configuration specifies automatic retry for a failed stage, along with the configured retry mode.
3883
3887
 
@@ -3937,6 +3941,8 @@ class CfnPipeline(
3937
3941
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, typing.List[typing.Union[_IResolvable_da3f097b, "CfnPipeline.ConditionProperty"]]]]:
3938
3942
  '''The conditions that are configured as failure conditions.
3939
3943
 
3944
+ For more information about conditions, see `Stage conditions <https://docs.aws.amazon.com/codepipeline/latest/userguide/stage-conditions.html>`_ and `How do stage conditions work? <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts-how-it-works-conditions.html>`_ .
3945
+
3940
3946
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-failureconditions.html#cfn-codepipeline-pipeline-failureconditions-conditions
3941
3947
  '''
3942
3948
  result = self._values.get("conditions")
@@ -4260,8 +4266,14 @@ class CfnPipeline(
4260
4266
  ) -> None:
4261
4267
  '''The event criteria for the pull request trigger configuration, such as the lists of branches or file paths to include and exclude.
4262
4268
 
4269
+ The following are valid values for the events for this filter:
4270
+
4271
+ - CLOSED
4272
+ - OPEN
4273
+ - UPDATED
4274
+
4263
4275
  :param branches: The field that specifies to filter on branches for the pull request trigger configuration.
4264
- :param events: The field that specifies which pull request events to filter on (opened, updated, closed) for the trigger configuration.
4276
+ :param events: The field that specifies which pull request events to filter on (OPEN, UPDATED, CLOSED) for the trigger configuration.
4265
4277
  :param file_paths: The field that specifies to filter on file paths for the pull request trigger configuration.
4266
4278
 
4267
4279
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-gitpullrequestfilter.html
@@ -4311,7 +4323,7 @@ class CfnPipeline(
4311
4323
 
4312
4324
  @builtins.property
4313
4325
  def events(self) -> typing.Optional[typing.List[builtins.str]]:
4314
- '''The field that specifies which pull request events to filter on (opened, updated, closed) for the trigger configuration.
4326
+ '''The field that specifies which pull request events to filter on (OPEN, UPDATED, CLOSED) for the trigger configuration.
4315
4327
 
4316
4328
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-gitpullrequestfilter.html#cfn-codepipeline-pipeline-gitpullrequestfilter-events
4317
4329
  '''
@@ -4838,7 +4850,7 @@ class CfnPipeline(
4838
4850
  ) -> None:
4839
4851
  '''Represents information about the rule to be created for an associated condition.
4840
4852
 
4841
- An example would be creating a new rule for an entry condition, such as a rule that checks for a test result before allowing the run to enter the deployment stage. For more information about conditions, see `Stage conditions <https://docs.aws.amazon.com/codepipeline/latest/userguide/stage-conditions.html>`_ . For more information about rules, see the `AWS CodePipeline rule reference <https://docs.aws.amazon.com/codepipeline/latest/userguide/rule-reference.html>`_ .
4853
+ An example would be creating a new rule for an entry condition, such as a rule that checks for a test result before allowing the run to enter the deployment stage. For more information about conditions, see `Stage conditions <https://docs.aws.amazon.com/codepipeline/latest/userguide/stage-conditions.html>`_ and `How do stage conditions work? <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts-how-it-works-conditions.html>`_ . For more information about rules, see the `AWS CodePipeline rule reference <https://docs.aws.amazon.com/codepipeline/latest/userguide/rule-reference.html>`_ .
4842
4854
 
4843
4855
  :param commands: The shell commands to run with your commands rule in CodePipeline. All commands are supported except multi-line formats. While CodeBuild logs and permissions are used, you do not need to create any resources in CodeBuild. .. epigraph:: Using compute time for this action will incur separate charges in AWS CodeBuild .
4844
4856
  :param configuration: The action configuration fields for the rule.
@@ -5005,9 +5017,11 @@ class CfnPipeline(
5005
5017
  ) -> None:
5006
5018
  '''The ID for the rule type, which is made up of the combined values for category, owner, provider, and version.
5007
5019
 
5020
+ For more information about conditions, see `Stage conditions <https://docs.aws.amazon.com/codepipeline/latest/userguide/stage-conditions.html>`_ . For more information about rules, see the `AWS CodePipeline rule reference <https://docs.aws.amazon.com/codepipeline/latest/userguide/rule-reference.html>`_ .
5021
+
5008
5022
  :param category: A category defines what kind of rule can be run in the stage, and constrains the provider type for the rule. The valid category is ``Rule`` .
5009
5023
  :param owner: The creator of the rule being called. The valid value for the ``Owner`` field in the rule category is ``AWS`` .
5010
- :param provider: The rule provider, such as the ``DeploymentWindow`` rule.
5024
+ :param provider: The rule provider, such as the ``DeploymentWindow`` rule. For a list of rule provider names, see the rules listed in the `AWS CodePipeline rule reference <https://docs.aws.amazon.com/codepipeline/latest/userguide/rule-reference.html>`_ .
5011
5025
  :param version: A string that describes the rule version.
5012
5026
 
5013
5027
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-ruletypeid.html
@@ -5068,6 +5082,8 @@ class CfnPipeline(
5068
5082
  def provider(self) -> typing.Optional[builtins.str]:
5069
5083
  '''The rule provider, such as the ``DeploymentWindow`` rule.
5070
5084
 
5085
+ For a list of rule provider names, see the rules listed in the `AWS CodePipeline rule reference <https://docs.aws.amazon.com/codepipeline/latest/userguide/rule-reference.html>`_ .
5086
+
5071
5087
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-ruletypeid.html#cfn-codepipeline-pipeline-ruletypeid-provider
5072
5088
  '''
5073
5089
  result = self._values.get("provider")
@@ -5426,6 +5442,8 @@ class CfnPipeline(
5426
5442
  ) -> None:
5427
5443
  '''The conditions for making checks that, if met, succeed a stage.
5428
5444
 
5445
+ For more information about conditions, see `Stage conditions <https://docs.aws.amazon.com/codepipeline/latest/userguide/stage-conditions.html>`_ and `How do stage conditions work? <https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts-how-it-works-conditions.html>`_ .
5446
+
5429
5447
  :param conditions: The conditions that are success conditions.
5430
5448
 
5431
5449
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-successconditions.html
@@ -104,7 +104,7 @@ a `customEventRule` which needs an event pattern (see [here](https://docs.aws.am
104
104
 
105
105
  ```python
106
106
  # repo: codecommit.Repository
107
- # lambda_funtion: lambda.Function
107
+ # lambda_function: lambda.Function
108
108
  event_pattern = {
109
109
  "detail-type": ["CodeCommit Repository State Change"],
110
110
  "resources": ["foo"],
@@ -122,7 +122,7 @@ source_action = codepipeline_actions.CodeCommitSourceAction(
122
122
  output=source_output,
123
123
  custom_event_rule={
124
124
  "event_pattern": event_pattern,
125
- "target": targets.LambdaFunction(lambda_funtion)
125
+ "target": targets.LambdaFunction(lambda_function)
126
126
  }
127
127
  )
128
128
  ```