aws-cdk-lib 2.186.0__py3-none-any.whl → 2.187.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 (62) hide show
  1. aws_cdk/__init__.py +281 -116
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.186.0.jsii.tgz → aws-cdk-lib@2.187.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_amplify/__init__.py +124 -0
  5. aws_cdk/aws_apigateway/__init__.py +48 -2
  6. aws_cdk/aws_appsync/__init__.py +14 -5
  7. aws_cdk/aws_bedrock/__init__.py +32 -22
  8. aws_cdk/aws_cassandra/__init__.py +2 -2
  9. aws_cdk/aws_cloudfront/__init__.py +11 -0
  10. aws_cdk/aws_cloudtrail/__init__.py +4 -18
  11. aws_cdk/aws_cloudwatch/__init__.py +50 -50
  12. aws_cdk/aws_codebuild/__init__.py +9 -0
  13. aws_cdk/aws_config/__init__.py +2 -5
  14. aws_cdk/aws_datazone/__init__.py +287 -226
  15. aws_cdk/aws_detective/__init__.py +3 -3
  16. aws_cdk/aws_dynamodb/__init__.py +37 -0
  17. aws_cdk/aws_ec2/__init__.py +154 -12
  18. aws_cdk/aws_ecr/__init__.py +143 -0
  19. aws_cdk/aws_ecr_assets/__init__.py +115 -4
  20. aws_cdk/aws_ecs/__init__.py +51 -0
  21. aws_cdk/aws_eks/__init__.py +114 -0
  22. aws_cdk/aws_events/__init__.py +8 -11
  23. aws_cdk/aws_forecast/__init__.py +1 -1
  24. aws_cdk/aws_fsx/__init__.py +2 -2
  25. aws_cdk/aws_gamelift/__init__.py +6 -6
  26. aws_cdk/aws_identitystore/__init__.py +16 -16
  27. aws_cdk/aws_iotsitewise/__init__.py +623 -0
  28. aws_cdk/aws_kms/__init__.py +10 -11
  29. aws_cdk/aws_lakeformation/__init__.py +3 -3
  30. aws_cdk/aws_lambda/__init__.py +105 -4
  31. aws_cdk/aws_lambda_event_sources/__init__.py +65 -3
  32. aws_cdk/aws_lambda_nodejs/__init__.py +5 -24
  33. aws_cdk/aws_lex/__init__.py +981 -5
  34. aws_cdk/aws_mediaconnect/__init__.py +714 -290
  35. aws_cdk/aws_mwaa/__init__.py +9 -9
  36. aws_cdk/aws_networkfirewall/__init__.py +44 -0
  37. aws_cdk/aws_omics/__init__.py +216 -0
  38. aws_cdk/aws_quicksight/__init__.py +244 -39
  39. aws_cdk/aws_rds/__init__.py +102 -10
  40. aws_cdk/aws_route53/__init__.py +2 -2
  41. aws_cdk/aws_route53recoverycontrol/__init__.py +43 -2
  42. aws_cdk/aws_s3_assets/__init__.py +70 -1
  43. aws_cdk/aws_s3_deployment/__init__.py +4 -0
  44. aws_cdk/aws_sagemaker/__init__.py +6 -4
  45. aws_cdk/aws_scheduler_targets/__init__.py +4 -16
  46. aws_cdk/aws_securitylake/__init__.py +2 -2
  47. aws_cdk/aws_servicecatalog/__init__.py +4 -0
  48. aws_cdk/aws_sns/__init__.py +1 -1
  49. aws_cdk/aws_stepfunctions/__init__.py +23 -17
  50. aws_cdk/aws_stepfunctions_tasks/__init__.py +4 -0
  51. aws_cdk/aws_synthetics/__init__.py +9 -0
  52. aws_cdk/aws_systemsmanagersap/__init__.py +150 -0
  53. aws_cdk/aws_wafv2/__init__.py +464 -1138
  54. aws_cdk/cloud_assembly_schema/__init__.py +60 -10
  55. aws_cdk/cx_api/__init__.py +15 -0
  56. aws_cdk/pipelines/__init__.py +20 -2
  57. {aws_cdk_lib-2.186.0.dist-info → aws_cdk_lib-2.187.0.dist-info}/METADATA +4 -4
  58. {aws_cdk_lib-2.186.0.dist-info → aws_cdk_lib-2.187.0.dist-info}/RECORD +62 -62
  59. {aws_cdk_lib-2.186.0.dist-info → aws_cdk_lib-2.187.0.dist-info}/WHEEL +1 -1
  60. {aws_cdk_lib-2.186.0.dist-info → aws_cdk_lib-2.187.0.dist-info}/LICENSE +0 -0
  61. {aws_cdk_lib-2.186.0.dist-info → aws_cdk_lib-2.187.0.dist-info}/NOTICE +0 -0
  62. {aws_cdk_lib-2.186.0.dist-info → aws_cdk_lib-2.187.0.dist-info}/top_level.txt +0 -0
@@ -10847,23 +10847,19 @@ class Statistic(enum.Enum):
10847
10847
 
10848
10848
  Example::
10849
10849
 
10850
- import aws_cdk.aws_cloudwatch as cloudwatch
10851
-
10852
- # delivery_stream: firehose.DeliveryStream
10853
-
10850
+ # matchmaking_rule_set: gamelift.MatchmakingRuleSet
10854
10851
 
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",
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)",
10858
10855
  using_metrics={
10859
- "incoming_bytes": delivery_stream.metric_incoming_bytes(statistic=cloudwatch.Statistic.SUM),
10860
- "byte_per_sec_limit": delivery_stream.metric("BytesPerSecondLimit")
10856
+ "rule_evaluations_passed": matchmaking_rule_set.metric_rule_evaluations_passed(statistic=cloudwatch.Statistic.SUM),
10857
+ "rule_evaluations_failed": matchmaking_rule_set.metric("ruleEvaluationsFailed")
10861
10858
  }
10862
10859
  )
10863
-
10864
10860
  cloudwatch.Alarm(self, "Alarm",
10865
- metric=incoming_bytes_percent_of_limit,
10866
- threshold=0.9,
10861
+ metric=rule_evaluation_ratio,
10862
+ threshold=0.1,
10867
10863
  evaluation_periods=3
10868
10864
  )
10869
10865
  '''
@@ -12594,29 +12590,31 @@ class AlarmProps(CreateAlarmOptions):
12594
12590
 
12595
12591
  Example::
12596
12592
 
12597
- # log_group: logs.LogGroup
12593
+ import aws_cdk.aws_cloudwatch as cloudwatch
12598
12594
 
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
- )
12595
+ # alias: lambda.Alias
12610
12596
 
12611
- # expose a metric from the metric filter
12612
- metric = mf.metric()
12597
+ # or add alarms to an existing group
12598
+ # blue_green_alias: lambda.Alias
12613
12599
 
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
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()
12619
12605
  )
12606
+ deployment_group = codedeploy.LambdaDeploymentGroup(self, "BlueGreenDeployment",
12607
+ alias=alias,
12608
+ deployment_config=codedeploy.LambdaDeploymentConfig.LINEAR_10PERCENT_EVERY_1MINUTE,
12609
+ alarms=[alarm
12610
+ ]
12611
+ )
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
+ ))
12620
12618
  '''
12621
12619
  if __debug__:
12622
12620
  type_hints = typing.get_type_hints(_typecheckingstub__b2e7c873c118fbc1f6cf26e1bb5bd3d8549040c626a6450f2d686bb07b87266b)
@@ -14861,29 +14859,31 @@ class Alarm(
14861
14859
 
14862
14860
  Example::
14863
14861
 
14864
- # log_group: logs.LogGroup
14862
+ import aws_cdk.aws_cloudwatch as cloudwatch
14865
14863
 
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
- )
14864
+ # alias: lambda.Alias
14877
14865
 
14878
- # expose a metric from the metric filter
14879
- metric = mf.metric()
14866
+ # or add alarms to an existing group
14867
+ # blue_green_alias: lambda.Alias
14880
14868
 
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
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
+ ]
14886
14880
  )
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__(
@@ -12108,6 +12108,7 @@ class LinuxBuildImage(
12108
12108
  cache_disabled: typing.Optional[builtins.bool] = None,
12109
12109
  cache_from: typing.Optional[typing.Sequence[typing.Union[_DockerCacheOption_58ef18ca, typing.Dict[builtins.str, typing.Any]]]] = None,
12110
12110
  cache_to: typing.Optional[typing.Union[_DockerCacheOption_58ef18ca, typing.Dict[builtins.str, typing.Any]]] = None,
12111
+ display_name: typing.Optional[builtins.str] = None,
12111
12112
  file: typing.Optional[builtins.str] = None,
12112
12113
  invalidation: typing.Optional[typing.Union[_DockerImageAssetInvalidationOptions_4deb8d45, typing.Dict[builtins.str, typing.Any]]] = None,
12113
12114
  network_mode: typing.Optional[_NetworkMode_897e5081] = None,
@@ -12131,6 +12132,7 @@ class LinuxBuildImage(
12131
12132
  :param cache_disabled: Disable the cache and pass ``--no-cache`` to the ``docker build`` command. Default: - cache is used
12132
12133
  :param cache_from: Cache from options to pass to the ``docker build`` command. Default: - no cache from options are passed to the build command
12133
12134
  :param cache_to: Cache to options to pass to the ``docker build`` command. Default: - no cache to options are passed to the build command
12135
+ :param display_name: A display name for this asset. If supplied, the display name will be used in locations where the asset identifier is printed, like in the CLI progress information. If the same asset is added multiple times, the display name of the first occurrence is used. If ``assetName`` is given, it will also be used as the default ``displayName``. Otherwise, the default is the construct path of the ImageAsset construct, with respect to the enclosing stack. If the asset is produced by a construct helper function (such as ``lambda.Code.fromAssetImage()``), this will look like ``MyFunction/AssetImage``. We use the stack-relative construct path so that in the common case where you have multiple stacks with the same asset, we won't show something like ``/MyBetaStack/MyFunction/Code`` when you are actually deploying to production. Default: - Stack-relative construct path
12134
12136
  :param file: Path to the Dockerfile (relative to the directory). Default: 'Dockerfile'
12135
12137
  :param invalidation: Options to control which parameters are used to invalidate the asset hash. Default: - hash all parameters
12136
12138
  :param network_mode: Networking mode for the RUN commands during build. Support docker API 1.25+. Default: - no networking mode specified (the default networking mode ``NetworkMode.DEFAULT`` will be used)
@@ -12155,6 +12157,7 @@ class LinuxBuildImage(
12155
12157
  cache_disabled=cache_disabled,
12156
12158
  cache_from=cache_from,
12157
12159
  cache_to=cache_to,
12160
+ display_name=display_name,
12158
12161
  file=file,
12159
12162
  invalidation=invalidation,
12160
12163
  network_mode=network_mode,
@@ -12807,6 +12810,7 @@ class MacBuildImage(
12807
12810
  "params_key": "params"
12808
12811
  }
12809
12812
  ),
12813
+ display_name="displayName",
12810
12814
  exclude=["exclude"],
12811
12815
  extra_hash="extraHash",
12812
12816
  file="file",
@@ -12846,6 +12850,7 @@ class MacBuildImage(
12846
12850
  cache_disabled: typing.Optional[builtins.bool] = None,
12847
12851
  cache_from: typing.Optional[typing.Sequence[typing.Union[_DockerCacheOption_58ef18ca, typing.Dict[builtins.str, typing.Any]]]] = None,
12848
12852
  cache_to: typing.Optional[typing.Union[_DockerCacheOption_58ef18ca, typing.Dict[builtins.str, typing.Any]]] = None,
12853
+ display_name: typing.Optional[builtins.str] = None,
12849
12854
  file: typing.Optional[builtins.str] = None,
12850
12855
  invalidation: typing.Optional[typing.Union[_DockerImageAssetInvalidationOptions_4deb8d45, typing.Dict[builtins.str, typing.Any]]] = None,
12851
12856
  network_mode: typing.Optional[_NetworkMode_897e5081] = None,
@@ -12869,6 +12874,7 @@ class MacBuildImage(
12869
12874
  :param cache_disabled: Disable the cache and pass ``--no-cache`` to the ``docker build`` command. Default: - cache is used
12870
12875
  :param cache_from: Cache from options to pass to the ``docker build`` command. Default: - no cache from options are passed to the build command
12871
12876
  :param cache_to: Cache to options to pass to the ``docker build`` command. Default: - no cache to options are passed to the build command
12877
+ :param display_name: A display name for this asset. If supplied, the display name will be used in locations where the asset identifier is printed, like in the CLI progress information. If the same asset is added multiple times, the display name of the first occurrence is used. If ``assetName`` is given, it will also be used as the default ``displayName``. Otherwise, the default is the construct path of the ImageAsset construct, with respect to the enclosing stack. If the asset is produced by a construct helper function (such as ``lambda.Code.fromAssetImage()``), this will look like ``MyFunction/AssetImage``. We use the stack-relative construct path so that in the common case where you have multiple stacks with the same asset, we won't show something like ``/MyBetaStack/MyFunction/Code`` when you are actually deploying to production. Default: - Stack-relative construct path
12872
12878
  :param file: Path to the Dockerfile (relative to the directory). Default: 'Dockerfile'
12873
12879
  :param invalidation: Options to control which parameters are used to invalidate the asset hash. Default: - hash all parameters
12874
12880
  :param network_mode: Networking mode for the RUN commands during build. Support docker API 1.25+. Default: - no networking mode specified (the default networking mode ``NetworkMode.DEFAULT`` will be used)
@@ -12893,6 +12899,7 @@ class MacBuildImage(
12893
12899
  cache_disabled=cache_disabled,
12894
12900
  cache_from=cache_from,
12895
12901
  cache_to=cache_to,
12902
+ display_name=display_name,
12896
12903
  file=file,
12897
12904
  invalidation=invalidation,
12898
12905
  network_mode=network_mode,
@@ -19797,6 +19804,7 @@ def _typecheckingstub__c4ce5766deb0a7d190b79fe8c16f4eb758ab6db30a15dc2ea68692833
19797
19804
  cache_disabled: typing.Optional[builtins.bool] = None,
19798
19805
  cache_from: typing.Optional[typing.Sequence[typing.Union[_DockerCacheOption_58ef18ca, typing.Dict[builtins.str, typing.Any]]]] = None,
19799
19806
  cache_to: typing.Optional[typing.Union[_DockerCacheOption_58ef18ca, typing.Dict[builtins.str, typing.Any]]] = None,
19807
+ display_name: typing.Optional[builtins.str] = None,
19800
19808
  file: typing.Optional[builtins.str] = None,
19801
19809
  invalidation: typing.Optional[typing.Union[_DockerImageAssetInvalidationOptions_4deb8d45, typing.Dict[builtins.str, typing.Any]]] = None,
19802
19810
  network_mode: typing.Optional[_NetworkMode_897e5081] = None,
@@ -19864,6 +19872,7 @@ def _typecheckingstub__aa924aa0600b9706b95a62c612f337f8dde0f0df7d5d3b8c5b48b7279
19864
19872
  cache_disabled: typing.Optional[builtins.bool] = None,
19865
19873
  cache_from: typing.Optional[typing.Sequence[typing.Union[_DockerCacheOption_58ef18ca, typing.Dict[builtins.str, typing.Any]]]] = None,
19866
19874
  cache_to: typing.Optional[typing.Union[_DockerCacheOption_58ef18ca, typing.Dict[builtins.str, typing.Any]]] = None,
19875
+ display_name: typing.Optional[builtins.str] = None,
19867
19876
  file: typing.Optional[builtins.str] = None,
19868
19877
  invalidation: typing.Optional[typing.Union[_DockerImageAssetInvalidationOptions_4deb8d45, typing.Dict[builtins.str, typing.Any]]] = None,
19869
19878
  network_mode: typing.Optional[_NetworkMode_897e5081] = None,
@@ -698,7 +698,7 @@ class CfnConfigRule(
698
698
  :param evaluation_modes: The modes the AWS Config rule can be evaluated in. The valid values are distinct objects. By default, the value is Detective evaluation mode only.
699
699
  :param input_parameters: A string, in JSON format, that is passed to the AWS Config rule Lambda function.
700
700
  :param maximum_execution_frequency: The maximum frequency with which AWS Config runs evaluations for a rule. You can specify a value for ``MaximumExecutionFrequency`` when: - You are using an AWS managed rule that is triggered at a periodic frequency. - Your custom rule is triggered when AWS Config delivers the configuration snapshot. For more information, see `ConfigSnapshotDeliveryProperties <https://docs.aws.amazon.com/config/latest/APIReference/API_ConfigSnapshotDeliveryProperties.html>`_ . .. epigraph:: By default, rules with a periodic trigger are evaluated every 24 hours. To change the frequency, specify a valid value for the ``MaximumExecutionFrequency`` parameter.
701
- :param scope: Defines which resources can trigger an evaluation for the rule. The scope can include one or more resource types, a combination of one resource type and one resource ID, or a combination of a tag key and value. Specify a scope to constrain the resources that can trigger an evaluation for the rule. If you do not specify a scope, evaluations are triggered when any resource in the recording group changes. .. epigraph:: Scope is only supported for change-triggered rules. Scope is not supported for periodic or hybrid rules.
701
+ :param scope: Defines which resources can trigger an evaluation for the rule. The scope can include one or more resource types, a combination of one resource type and one resource ID, or a combination of a tag key and value. Specify a scope to constrain the resources that can trigger an evaluation for the rule. If you do not specify a scope, evaluations are triggered when any resource in the recording group changes.
702
702
  '''
703
703
  if __debug__:
704
704
  type_hints = typing.get_type_hints(_typecheckingstub__deecc74e0a0f7e54fde16a159ece5d8f96f56f6b8aca025003adcc1d931d5d00)
@@ -1512,7 +1512,7 @@ class CfnConfigRuleProps:
1512
1512
  :param evaluation_modes: The modes the AWS Config rule can be evaluated in. The valid values are distinct objects. By default, the value is Detective evaluation mode only.
1513
1513
  :param input_parameters: A string, in JSON format, that is passed to the AWS Config rule Lambda function.
1514
1514
  :param maximum_execution_frequency: The maximum frequency with which AWS Config runs evaluations for a rule. You can specify a value for ``MaximumExecutionFrequency`` when: - You are using an AWS managed rule that is triggered at a periodic frequency. - Your custom rule is triggered when AWS Config delivers the configuration snapshot. For more information, see `ConfigSnapshotDeliveryProperties <https://docs.aws.amazon.com/config/latest/APIReference/API_ConfigSnapshotDeliveryProperties.html>`_ . .. epigraph:: By default, rules with a periodic trigger are evaluated every 24 hours. To change the frequency, specify a valid value for the ``MaximumExecutionFrequency`` parameter.
1515
- :param scope: Defines which resources can trigger an evaluation for the rule. The scope can include one or more resource types, a combination of one resource type and one resource ID, or a combination of a tag key and value. Specify a scope to constrain the resources that can trigger an evaluation for the rule. If you do not specify a scope, evaluations are triggered when any resource in the recording group changes. .. epigraph:: Scope is only supported for change-triggered rules. Scope is not supported for periodic or hybrid rules.
1515
+ :param scope: Defines which resources can trigger an evaluation for the rule. The scope can include one or more resource types, a combination of one resource type and one resource ID, or a combination of a tag key and value. Specify a scope to constrain the resources that can trigger an evaluation for the rule. If you do not specify a scope, evaluations are triggered when any resource in the recording group changes.
1516
1516
 
1517
1517
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-configrule.html
1518
1518
  :exampleMetadata: fixture=_generated
@@ -1682,9 +1682,6 @@ class CfnConfigRuleProps:
1682
1682
  '''Defines which resources can trigger an evaluation for the rule.
1683
1683
 
1684
1684
  The scope can include one or more resource types, a combination of one resource type and one resource ID, or a combination of a tag key and value. Specify a scope to constrain the resources that can trigger an evaluation for the rule. If you do not specify a scope, evaluations are triggered when any resource in the recording group changes.
1685
- .. epigraph::
1686
-
1687
- Scope is only supported for change-triggered rules. Scope is not supported for periodic or hybrid rules.
1688
1685
 
1689
1686
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-config-configrule.html#cfn-config-configrule-scope
1690
1687
  '''