aws-cdk-lib 2.73.0__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 (111) 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.73.0.jsii.tgz → aws-cdk-lib@2.76.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_amplifyuibuilder/__init__.py +182 -214
  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_batch/__init__.py +9 -2
  14. aws_cdk/aws_billingconductor/__init__.py +12 -7
  15. aws_cdk/aws_budgets/__init__.py +8 -17
  16. aws_cdk/aws_certificatemanager/__init__.py +7 -4
  17. aws_cdk/aws_cloudfront/__init__.py +14 -11
  18. aws_cdk/aws_cloudfront_origins/__init__.py +18 -8
  19. aws_cdk/aws_cloudtrail/__init__.py +7 -14
  20. aws_cdk/aws_cloudwatch/__init__.py +63 -35
  21. aws_cdk/aws_codebuild/__init__.py +10 -13
  22. aws_cdk/aws_codecommit/__init__.py +0 -1
  23. aws_cdk/aws_codedeploy/__init__.py +165 -162
  24. aws_cdk/aws_codegurureviewer/__init__.py +4 -4
  25. aws_cdk/aws_codepipeline/__init__.py +0 -4
  26. aws_cdk/aws_codepipeline_actions/__init__.py +16 -164
  27. aws_cdk/aws_cognito/__init__.py +195 -100
  28. aws_cdk/aws_config/__init__.py +28 -51
  29. aws_cdk/aws_connectcampaigns/__init__.py +5 -6
  30. aws_cdk/aws_databrew/__init__.py +5 -6
  31. aws_cdk/aws_dlm/__init__.py +33 -71
  32. aws_cdk/aws_docdb/__init__.py +20 -76
  33. aws_cdk/aws_dynamodb/__init__.py +29 -22
  34. aws_cdk/aws_ec2/__init__.py +2414 -603
  35. aws_cdk/aws_ecr/__init__.py +1 -2
  36. aws_cdk/aws_ecr_assets/__init__.py +27 -14
  37. aws_cdk/aws_ecs/__init__.py +458 -163
  38. aws_cdk/aws_ecs_patterns/__init__.py +13 -11
  39. aws_cdk/aws_eks/__init__.py +13 -8
  40. aws_cdk/aws_elasticloadbalancing/__init__.py +16 -9
  41. aws_cdk/aws_elasticloadbalancingv2/__init__.py +142 -82
  42. aws_cdk/aws_elasticloadbalancingv2_actions/__init__.py +126 -61
  43. aws_cdk/aws_elasticsearch/__init__.py +0 -7
  44. aws_cdk/aws_emr/__init__.py +7 -16
  45. aws_cdk/aws_emrserverless/__init__.py +14 -18
  46. aws_cdk/aws_events/__init__.py +33 -29
  47. aws_cdk/aws_events_targets/__init__.py +248 -89
  48. aws_cdk/aws_frauddetector/__init__.py +3 -4
  49. aws_cdk/aws_fsx/__init__.py +13 -7
  50. aws_cdk/aws_gamelift/__init__.py +11 -20
  51. aws_cdk/aws_grafana/__init__.py +4 -4
  52. aws_cdk/aws_iam/__init__.py +21 -25
  53. aws_cdk/aws_imagebuilder/__init__.py +58 -80
  54. aws_cdk/aws_internetmonitor/__init__.py +18 -10
  55. aws_cdk/aws_iot/__init__.py +16 -10
  56. aws_cdk/aws_iotcoredeviceadvisor/__init__.py +16 -26
  57. aws_cdk/aws_iotevents/__init__.py +6 -4
  58. aws_cdk/aws_iotfleetwise/__init__.py +27 -40
  59. aws_cdk/aws_iotsitewise/__init__.py +8 -5
  60. aws_cdk/aws_iotwireless/__init__.py +14 -9
  61. aws_cdk/aws_kinesisfirehose/__init__.py +21 -38
  62. aws_cdk/aws_lambda/__init__.py +76 -53
  63. aws_cdk/aws_lambda_event_sources/__init__.py +6 -21
  64. aws_cdk/aws_logs/__init__.py +5 -7
  65. aws_cdk/aws_macie/__init__.py +28 -23
  66. aws_cdk/aws_mediaconnect/__init__.py +5 -8
  67. aws_cdk/aws_mediaconvert/__init__.py +2 -2
  68. aws_cdk/aws_medialive/__init__.py +2 -4
  69. aws_cdk/aws_mediapackage/__init__.py +9 -18
  70. aws_cdk/aws_memorydb/__init__.py +5 -10
  71. aws_cdk/aws_mwaa/__init__.py +8 -4
  72. aws_cdk/aws_neptune/__init__.py +4 -4
  73. aws_cdk/aws_networkfirewall/__init__.py +8 -4
  74. aws_cdk/aws_networkmanager/__init__.py +4 -4
  75. aws_cdk/aws_nimblestudio/__init__.py +25 -45
  76. aws_cdk/aws_opensearchservice/__init__.py +0 -1
  77. aws_cdk/aws_panorama/__init__.py +11 -12
  78. aws_cdk/aws_personalize/__init__.py +46 -72
  79. aws_cdk/aws_pinpoint/__init__.py +36 -65
  80. aws_cdk/aws_quicksight/__init__.py +9972 -13374
  81. aws_cdk/aws_rds/__init__.py +53 -22
  82. aws_cdk/aws_route53/__init__.py +8 -16
  83. aws_cdk/aws_route53_targets/__init__.py +2 -4
  84. aws_cdk/aws_s3/__init__.py +41 -90
  85. aws_cdk/aws_s3_notifications/__init__.py +0 -3
  86. aws_cdk/aws_sagemaker/__init__.py +16 -10
  87. aws_cdk/aws_secretsmanager/__init__.py +17 -14
  88. aws_cdk/aws_servicecatalog/__init__.py +60 -83
  89. aws_cdk/aws_servicediscovery/__init__.py +4 -6
  90. aws_cdk/aws_ses/__init__.py +734 -28
  91. aws_cdk/aws_sns/__init__.py +4 -8
  92. aws_cdk/aws_ssm/__init__.py +19 -23
  93. aws_cdk/aws_ssmcontacts/__init__.py +10 -6
  94. aws_cdk/aws_ssmincidents/__init__.py +2 -1
  95. aws_cdk/aws_sso/__init__.py +4 -4
  96. aws_cdk/aws_stepfunctions/__init__.py +6 -15
  97. aws_cdk/aws_stepfunctions_tasks/__init__.py +51 -24
  98. aws_cdk/aws_timestream/__init__.py +22 -28
  99. aws_cdk/aws_transfer/__init__.py +188 -86
  100. aws_cdk/aws_wafv2/__init__.py +54 -38
  101. aws_cdk/aws_xray/__init__.py +15 -22
  102. aws_cdk/cloud_assembly_schema/__init__.py +14 -6
  103. aws_cdk/custom_resources/__init__.py +2 -3
  104. aws_cdk/pipelines/__init__.py +104 -134
  105. aws_cdk/triggers/__init__.py +46 -61
  106. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/METADATA +47 -92
  107. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/RECORD +111 -111
  108. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/LICENSE +0 -0
  109. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/NOTICE +0 -0
  110. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/WHEEL +0 -0
  111. {aws_cdk_lib-2.73.0.dist-info → aws_cdk_lib-2.76.0.dist-info}/top_level.txt +0 -0
@@ -79,12 +79,19 @@ class CfnComputeEnvironment(
79
79
  - Remove the earlier compute environment from your job queue.
80
80
  - Delete the earlier compute environment.
81
81
 
82
- In April 2022, AWS Batch added enhanced support for updating compute environments. For more information, see `Updating compute environments <https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html>`_ in the *AWS Batch User Guide* . To use the enhanced updating of compute environments to update AMIs, follow these rules:
82
+ In April 2022, AWS Batch added enhanced support for updating compute environments. For example, the ``UpdateComputeEnvironent`` API lets you use the ``ReplaceComputeEnvironment`` property to dynamically update compute environment parameters such as the launch template or instance type without replacement. For more information, see `Updating compute environments <https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html>`_ in the *AWS Batch User Guide* .
83
+
84
+ To use the enhanced updating of compute environments to update AMIs, follow these rules:
83
85
 
84
86
  - Either do not set the `ServiceRole <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html#cfn-batch-computeenvironment-servicerole>`_ property or set it to the *AWSServiceRoleForBatch* service-linked role.
85
87
  - Set the `AllocationStrategy <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-allocationstrategy>`_ property to ``BEST_FIT_PROGRESSIVE`` or ``SPOT_CAPACITY_OPTIMIZED`` .
86
88
  - Set the `ReplaceComputeEnvironment <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-computeenvironment.html#cfn-batch-computeenvironment-replacecomputeenvironment>`_ property to ``false`` .
87
- - Set the `UpdateToLatestImageVersion <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-updatetolatestimageversion>`_ property to ``true`` .
89
+
90
+ .. epigraph::
91
+
92
+ Set the ``ReplaceComputeEnvironment`` property to ``false`` if the compute environment uses the ``BEST_FIT`` allocation strategy. > If the ``ReplaceComputeEnvironment`` property is set to ``false`` , you might receive an error message when you update the CFN template for a compute environment. This issue occurs if the updated ``desiredvcpus`` value is less than the current ``desiredvcpus`` value. As a workaround, delete the ``desiredvcpus`` value from the updated template or use the ``minvcpus`` property to manage the number of vCPUs. For information, see `Error message when you update the ``DesiredvCpus`` setting <https://docs.aws.amazon.com/batch/latest/userguide/troubleshooting.html#error-desired-vcpus-update>`_ .
93
+
94
+ - Set the `UpdateToLatestImageVersion <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-updatetolatestimageversion>`_ property to ``true`` . This property is used when you update a compute environment. The `UpdateToLatestImageVersion <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-updatetolatestimageversion>`_ property is ignored when you create a compute environment.
88
95
  - Either do not specify an image ID in `ImageId <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-imageid>`_ or `ImageIdOverride <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-ec2configurationobject.html#cfn-batch-computeenvironment-ec2configurationobject-imageidoverride>`_ properties, or in the launch template identified by the `Launch Template <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html#cfn-batch-computeenvironment-computeresources-launchtemplate>`_ property. In that case AWS Batch will select the latest Amazon ECS optimized AMI supported by AWS Batch at the time the infrastructure update is initiated. Alternatively you can specify the AMI ID in the ``ImageId`` or ``ImageIdOverride`` properties, or the launch template identified by the ``LaunchTemplate`` properties. Changing any of these properties will trigger an infrastructure update.
89
96
 
90
97
  If these rules are followed, any update that triggers an infrastructure update will cause the AMI ID to be re-selected. If the `Version <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-launchtemplatespecification.html#cfn-batch-computeenvironment-launchtemplatespecification-version>`_ property of the `LaunchTemplateSpecification <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-launchtemplatespecification.html>`_ is set to ``$Latest`` or ``$Default`` , the latest or default version of the launch template will be evaluated up at the time of the infrastructure update, even if the ``LaunchTemplateSpecification`` was not updated.
@@ -1726,7 +1726,7 @@ class CfnPricingRule(
1726
1726
  :param billing_entity: The seller of services provided by AWS , their affiliates, or third-party providers selling services via AWS Marketplace .
1727
1727
  :param description: The pricing rule description.
1728
1728
  :param modifier_percentage: A percentage modifier applied on the public pricing rates.
1729
- :param operation: ``AWS::BillingConductor::PricingRule.Operation``.
1729
+ :param operation: Operation is the specific AWS action covered by this line item. This describes the specific usage of the line item.
1730
1730
  :param service: If the ``Scope`` attribute is ``SERVICE`` , this attribute indicates which service the ``PricingRule`` is applicable for.
1731
1731
  :param tags: A map that contains tag keys and tag values that are attached to a pricing rule.
1732
1732
  :param tiering: The set of tiering configurations for the pricing rule.
@@ -1931,7 +1931,9 @@ class CfnPricingRule(
1931
1931
  @builtins.property
1932
1932
  @jsii.member(jsii_name="operation")
1933
1933
  def operation(self) -> typing.Optional[builtins.str]:
1934
- '''``AWS::BillingConductor::PricingRule.Operation``.
1934
+ '''Operation is the specific AWS action covered by this line item.
1935
+
1936
+ This describes the specific usage of the line item.
1935
1937
 
1936
1938
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billingconductor-pricingrule.html#cfn-billingconductor-pricingrule-operation
1937
1939
  '''
@@ -2008,8 +2010,9 @@ class CfnPricingRule(
2008
2010
  *,
2009
2011
  activated: typing.Union[builtins.bool, _IResolvable_da3f097b],
2010
2012
  ) -> None:
2011
- '''
2012
- :param activated: ``CfnPricingRule.FreeTierProperty.Activated``.
2013
+ '''The possible AWS Free Tier configurations.
2014
+
2015
+ :param activated: Activate or deactivate AWS Free Tier.
2013
2016
 
2014
2017
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billingconductor-pricingrule-freetier.html
2015
2018
  :exampleMetadata: fixture=_generated
@@ -2033,7 +2036,7 @@ class CfnPricingRule(
2033
2036
 
2034
2037
  @builtins.property
2035
2038
  def activated(self) -> typing.Union[builtins.bool, _IResolvable_da3f097b]:
2036
- '''``CfnPricingRule.FreeTierProperty.Activated``.
2039
+ '''Activate or deactivate AWS Free Tier.
2037
2040
 
2038
2041
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billingconductor-pricingrule-freetier.html#cfn-billingconductor-pricingrule-freetier-activated
2039
2042
  '''
@@ -2152,7 +2155,7 @@ class CfnPricingRuleProps:
2152
2155
  :param billing_entity: The seller of services provided by AWS , their affiliates, or third-party providers selling services via AWS Marketplace .
2153
2156
  :param description: The pricing rule description.
2154
2157
  :param modifier_percentage: A percentage modifier applied on the public pricing rates.
2155
- :param operation: ``AWS::BillingConductor::PricingRule.Operation``.
2158
+ :param operation: Operation is the specific AWS action covered by this line item. This describes the specific usage of the line item.
2156
2159
  :param service: If the ``Scope`` attribute is ``SERVICE`` , this attribute indicates which service the ``PricingRule`` is applicable for.
2157
2160
  :param tags: A map that contains tag keys and tag values that are attached to a pricing rule.
2158
2161
  :param tiering: The set of tiering configurations for the pricing rule.
@@ -2284,7 +2287,9 @@ class CfnPricingRuleProps:
2284
2287
 
2285
2288
  @builtins.property
2286
2289
  def operation(self) -> typing.Optional[builtins.str]:
2287
- '''``AWS::BillingConductor::PricingRule.Operation``.
2290
+ '''Operation is the specific AWS action covered by this line item.
2291
+
2292
+ This describes the specific usage of the line item.
2288
2293
 
2289
2294
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-billingconductor-pricingrule.html#cfn-billingconductor-pricingrule-operation
2290
2295
  '''
@@ -249,10 +249,9 @@ class CfnBudget(
249
249
  auto_adjust_type: builtins.str,
250
250
  historical_options: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnBudget.HistoricalOptionsProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
251
251
  ) -> None:
252
- '''The parameters that determine the budget amount for an auto-adjusting budget.
253
-
254
- :param auto_adjust_type: The string that defines whether your budget auto-adjusts based on historical or forecasted data.
255
- :param historical_options: The parameters that define or describe the historical data that your auto-adjusting budget is based on.
252
+ '''
253
+ :param auto_adjust_type: ``CfnBudget.AutoAdjustDataProperty.AutoAdjustType``.
254
+ :param historical_options: ``CfnBudget.AutoAdjustDataProperty.HistoricalOptions``.
256
255
 
257
256
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-autoadjustdata.html
258
257
  :exampleMetadata: fixture=_generated
@@ -284,7 +283,7 @@ class CfnBudget(
284
283
 
285
284
  @builtins.property
286
285
  def auto_adjust_type(self) -> builtins.str:
287
- '''The string that defines whether your budget auto-adjusts based on historical or forecasted data.
286
+ '''``CfnBudget.AutoAdjustDataProperty.AutoAdjustType``.
288
287
 
289
288
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-autoadjustdata.html#cfn-budgets-budget-autoadjustdata-autoadjusttype
290
289
  '''
@@ -296,7 +295,7 @@ class CfnBudget(
296
295
  def historical_options(
297
296
  self,
298
297
  ) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnBudget.HistoricalOptionsProperty"]]:
299
- '''The parameters that define or describe the historical data that your auto-adjusting budget is based on.
298
+ '''``CfnBudget.AutoAdjustDataProperty.HistoricalOptions``.
300
299
 
301
300
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-autoadjustdata.html#cfn-budgets-budget-autoadjustdata-historicaloptions
302
301
  '''
@@ -852,9 +851,8 @@ class CfnBudget(
852
851
  )
853
852
  class HistoricalOptionsProperty:
854
853
  def __init__(self, *, budget_adjustment_period: jsii.Number) -> None:
855
- '''The parameters that define or describe the historical data that your auto-adjusting budget is based on.
856
-
857
- :param budget_adjustment_period: The number of budget periods included in the moving-average calculation that determines your auto-adjusted budget amount. The maximum value depends on the ``TimeUnit`` granularity of the budget: - For the ``DAILY`` granularity, the maximum value is ``60`` . - For the ``MONTHLY`` granularity, the maximum value is ``12`` . - For the ``QUARTERLY`` granularity, the maximum value is ``4`` . - For the ``ANNUALLY`` granularity, the maximum value is ``1`` .
854
+ '''
855
+ :param budget_adjustment_period: ``CfnBudget.HistoricalOptionsProperty.BudgetAdjustmentPeriod``.
858
856
 
859
857
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-historicaloptions.html
860
858
  :exampleMetadata: fixture=_generated
@@ -878,14 +876,7 @@ class CfnBudget(
878
876
 
879
877
  @builtins.property
880
878
  def budget_adjustment_period(self) -> jsii.Number:
881
- '''The number of budget periods included in the moving-average calculation that determines your auto-adjusted budget amount.
882
-
883
- The maximum value depends on the ``TimeUnit`` granularity of the budget:
884
-
885
- - For the ``DAILY`` granularity, the maximum value is ``60`` .
886
- - For the ``MONTHLY`` granularity, the maximum value is ``12`` .
887
- - For the ``QUARTERLY`` granularity, the maximum value is ``4`` .
888
- - For the ``ANNUALLY`` granularity, the maximum value is ``1`` .
879
+ '''``CfnBudget.HistoricalOptionsProperty.BudgetAdjustmentPeriod``.
889
880
 
890
881
  :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-historicaloptions.html#cfn-budgets-budget-historicaloptions-budgetadjustmentperiod
891
882
  '''
@@ -99,7 +99,10 @@ in order to access the cross stack/region certificate.
99
99
  > **This feature is currently experimental**
100
100
 
101
101
  ```python
102
- # Example automatically generated from non-compiling source. May contain errors.
102
+ from aws_cdk import aws_cloudfront as cloudfront, aws_cloudfront_origins as origins
103
+ # app: App
104
+
105
+
103
106
  stack1 = Stack(app, "Stack1",
104
107
  env=Environment(
105
108
  region="us-east-1"
@@ -119,9 +122,9 @@ stack2 = Stack(app, "Stack2",
119
122
  )
120
123
 
121
124
  cloudfront.Distribution(stack2, "Distribution",
122
- default_behavior={
123
- "origin": origins.HttpOrigin("example.com")
124
- },
125
+ default_behavior=cloudfront.BehaviorOptions(
126
+ origin=origins.HttpOrigin("example.com")
127
+ ),
125
128
  domain_names=["dev.example.com"],
126
129
  certificate=cert
127
130
  )
@@ -128,7 +128,12 @@ enabled it is possible to do something like creating a CloudFront distribution i
128
128
  an ACM certificate in `us-east-1`.
129
129
 
130
130
  ```python
131
- # Example automatically generated from non-compiling source. May contain errors.
131
+ import aws_cdk.aws_certificatemanager as acm
132
+ import aws_cdk.aws_route53 as route53
133
+
134
+ # app: App
135
+
136
+
132
137
  stack1 = Stack(app, "Stack1",
133
138
  env=Environment(
134
139
  region="us-east-1"
@@ -20959,20 +20964,18 @@ class Distribution(
20959
20964
 
20960
20965
  Example::
20961
20966
 
20962
- # Adding an existing Lambda@Edge function created in a different stack
20963
- # to a CloudFront distribution.
20964
20967
  # s3_bucket: s3.Bucket
20965
-
20966
- function_version = lambda_.Version.from_version_arn(self, "Version", "arn:aws:lambda:us-east-1:123456789012:function:functionName:1")
20967
-
20968
+ # Add a cloudfront Function to a Distribution
20969
+ cf_function = cloudfront.Function(self, "Function",
20970
+ code=cloudfront.FunctionCode.from_inline("function handler(event) { return event.request }")
20971
+ )
20968
20972
  cloudfront.Distribution(self, "distro",
20969
20973
  default_behavior=cloudfront.BehaviorOptions(
20970
20974
  origin=origins.S3Origin(s3_bucket),
20971
- edge_lambdas=[cloudfront.EdgeLambda(
20972
- function_version=function_version,
20973
- event_type=cloudfront.LambdaEdgeEventType.VIEWER_REQUEST
20974
- )
20975
- ]
20975
+ function_associations=[cloudfront.FunctionAssociation(
20976
+ function=cf_function,
20977
+ event_type=cloudfront.FunctionEventType.VIEWER_REQUEST
20978
+ )]
20976
20979
  )
20977
20980
  )
20978
20981
  '''
@@ -179,15 +179,25 @@ class HttpOrigin(
179
179
 
180
180
  Example::
181
181
 
182
- my_bucket = s3.Bucket(self, "myBucket")
183
- cloudfront.Distribution(self, "myDist",
182
+ # Validating signed URLs or signed cookies with Trusted Key Groups
183
+
184
+ # public key in PEM format
185
+ # public_key: str
186
+
187
+ pub_key = cloudfront.PublicKey(self, "MyPubKey",
188
+ encoded_key=public_key
189
+ )
190
+
191
+ key_group = cloudfront.KeyGroup(self, "MyKeyGroup",
192
+ items=[pub_key
193
+ ]
194
+ )
195
+
196
+ cloudfront.Distribution(self, "Dist",
184
197
  default_behavior=cloudfront.BehaviorOptions(
185
- origin=origins.OriginGroup(
186
- primary_origin=origins.S3Origin(my_bucket),
187
- fallback_origin=origins.HttpOrigin("www.example.com"),
188
- # optional, defaults to: 500, 502, 503 and 504
189
- fallback_status_codes=[404]
190
- )
198
+ origin=origins.HttpOrigin("www.example.com"),
199
+ trusted_key_groups=[key_group
200
+ ]
191
201
  )
192
202
  )
193
203
  '''
@@ -196,9 +196,8 @@ Set `InsightSelector` to enable Insight.
196
196
  Insights selector values can be `ApiCallRateInsight`, `ApiErrorRateInsight`, or both.
197
197
 
198
198
  ```python
199
- # Example automatically generated from non-compiling source. May contain errors.
200
- Trail(stack, "Insights",
201
- insight_types=[InsightType.API_CALL_RATE, InsightType.API_ERROR_RATE
199
+ cloudtrail.Trail(self, "Insights",
200
+ insight_types=[cloudtrail.InsightType.API_CALL_RATE, cloudtrail.InsightType.API_ERROR_RATE
202
201
  ]
203
202
  )
204
203
  ```
@@ -269,7 +268,6 @@ class AddEventSelectorOptions:
269
268
 
270
269
  Example::
271
270
 
272
- # Example automatically generated from non-compiling source. May contain errors.
273
271
  import aws_cdk.aws_cloudtrail as cloudtrail
274
272
 
275
273
  # source_bucket: s3.Bucket
@@ -3020,15 +3018,14 @@ class InsightType(
3020
3018
  ):
3021
3019
  '''Util element for InsightSelector.
3022
3020
 
3023
- :exampleMetadata: fixture=_generated
3021
+ :exampleMetadata: infused
3024
3022
 
3025
3023
  Example::
3026
3024
 
3027
- # The code below shows an example of how to instantiate this type.
3028
- # The values are placeholders you should change.
3029
- from aws_cdk import aws_cloudtrail as cloudtrail
3030
-
3031
- insight_type = cloudtrail.InsightType.API_CALL_RATE
3025
+ cloudtrail.Trail(self, "Insights",
3026
+ insight_types=[cloudtrail.InsightType.API_CALL_RATE, cloudtrail.InsightType.API_ERROR_RATE
3027
+ ]
3028
+ )
3032
3029
  '''
3033
3030
 
3034
3031
  def __init__(self, value: builtins.str) -> None:
@@ -3190,10 +3187,6 @@ class Trail(
3190
3187
 
3191
3188
  const cloudTrail = new CloudTrail(this, 'MyTrail');
3192
3189
 
3193
- NOTE the above example creates an UNENCRYPTED bucket by default,
3194
- If you are required to use an Encrypted bucket you can supply a preconfigured bucket
3195
- via TrailProps
3196
-
3197
3190
  :exampleMetadata: infused
3198
3191
 
3199
3192
  Example::
@@ -182,7 +182,9 @@ The most common values are provided in the `cloudwatch.Stats` class. You can pro
182
182
  Read more at [CloudWatch statistics definitions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html).
183
183
 
184
184
  ```python
185
- # Example automatically generated from non-compiling source. May contain errors.
185
+ # hosted_zone: route53.HostedZone
186
+
187
+
186
188
  cloudwatch.Metric(
187
189
  namespace="AWS/Route53",
188
190
  metric_name="DNSQueries",
@@ -190,7 +192,7 @@ cloudwatch.Metric(
190
192
  "HostedZoneId": hosted_zone.hosted_zone_id
191
193
  },
192
194
  statistic=cloudwatch.Stats.SAMPLE_COUNT,
193
- period=cloudwatch.Duration.minutes(5)
195
+ period=Duration.minutes(5)
194
196
  )
195
197
 
196
198
  cloudwatch.Metric(
@@ -200,7 +202,7 @@ cloudwatch.Metric(
200
202
  "HostedZoneId": hosted_zone.hosted_zone_id
201
203
  },
202
204
  statistic=cloudwatch.Stats.p(99),
203
- period=cloudwatch.Duration.minutes(5)
205
+ period=Duration.minutes(5)
204
206
  )
205
207
 
206
208
  cloudwatch.Metric(
@@ -210,7 +212,7 @@ cloudwatch.Metric(
210
212
  "HostedZoneId": hosted_zone.hosted_zone_id
211
213
  },
212
214
  statistic="TS(7.5%:90%)",
213
- period=cloudwatch.Duration.minutes(5)
215
+ period=Duration.minutes(5)
214
216
  )
215
217
  ```
216
218
 
@@ -344,9 +346,8 @@ cloudwatch.CompositeAlarm(self, "MyAwesomeCompositeAlarm",
344
346
  If you want to disable actions of a Composite Alarm based on a certain condition, you can use [Actions Suppression](https://www.amazonaws.cn/en/new/2022/amazon-cloudwatch-supports-composite-alarm-actions-suppression/).
345
347
 
346
348
  ```python
347
- # Example automatically generated from non-compiling source. May contain errors.
348
- # child_alarm1: cloudwatch.Alarm
349
- # child_alarm2: cloudwatch.Alarm
349
+ # alarm1: cloudwatch.Alarm
350
+ # alarm2: cloudwatch.Alarm
350
351
  # on_alarm_action: cloudwatch.IAlarmAction
351
352
  # on_ok_action: cloudwatch.IAlarmAction
352
353
  # actions_suppressor: cloudwatch.Alarm
@@ -358,8 +359,8 @@ my_composite_alarm = cloudwatch.CompositeAlarm(self, "MyAwesomeCompositeAlarm",
358
359
  alarm_rule=alarm_rule,
359
360
  actions_suppressor=actions_suppressor
360
361
  )
361
- my_composite_alarm.add_alarm_actions(on_alarm_action)
362
- my_composire_alarm.add_ok_action(on_ok_action)
362
+ my_composite_alarm.add_alarm_action(on_alarm_action)
363
+ my_composite_alarm.add_ok_action(on_ok_action)
363
364
  ```
364
365
 
365
366
  In the provided example, if `actionsSuppressor` is in `ALARM` state, `onAlarmAction` won't be triggered even if `myCompositeAlarm` goes into `ALARM` state.
@@ -572,13 +573,12 @@ dashboard.add_widgets(cloudwatch.TextWidget(
572
573
  Optionally set the TextWidget background to be transparent
573
574
 
574
575
  ```python
575
- # Example automatically generated from non-compiling source. May contain errors.
576
576
  # dashboard: cloudwatch.Dashboard
577
577
 
578
578
 
579
579
  dashboard.add_widgets(cloudwatch.TextWidget(
580
580
  markdown="# Key Performance Indicators",
581
- background=TextWidgetBackground.TRANSPARENT
581
+ background=cloudwatch.TextWidgetBackground.TRANSPARENT
582
582
  ))
583
583
  ```
584
584
 
@@ -706,15 +706,14 @@ You can add a widget after object instantiation with the method
706
706
  ### Interval duration for dashboard
707
707
 
708
708
  Interval duration for metrics in dashboard. You can specify `defaultInterval` with
709
- the relative time(eg. 7 days) as `cdk.Duration.days(7)`.
709
+ the relative time(eg. 7 days) as `Duration.days(7)`.
710
710
 
711
711
  ```python
712
- # Example automatically generated from non-compiling source. May contain errors.
713
712
  import aws_cdk.aws_cloudwatch as cw
714
713
 
715
714
 
716
- dashboard = cw.Dashboard(stack, "Dash",
717
- default_interval=cdk.Duration.days(7)
715
+ dashboard = cw.Dashboard(self, "Dash",
716
+ default_interval=Duration.days(7)
718
717
  )
719
718
  ```
720
719
 
@@ -6831,12 +6830,11 @@ class Dashboard(
6831
6830
 
6832
6831
  Example::
6833
6832
 
6834
- # Example automatically generated from non-compiling source. May contain errors.
6835
6833
  import aws_cdk.aws_cloudwatch as cw
6836
6834
 
6837
6835
 
6838
- dashboard = cw.Dashboard(stack, "Dash",
6839
- default_interval=cdk.Duration.days(7)
6836
+ dashboard = cw.Dashboard(self, "Dash",
6837
+ default_interval=Duration.days(7)
6840
6838
  )
6841
6839
  '''
6842
6840
 
@@ -6949,12 +6947,11 @@ class DashboardProps:
6949
6947
 
6950
6948
  Example::
6951
6949
 
6952
- # Example automatically generated from non-compiling source. May contain errors.
6953
6950
  import aws_cdk.aws_cloudwatch as cw
6954
6951
 
6955
6952
 
6956
- dashboard = cw.Dashboard(stack, "Dash",
6957
- default_interval=cdk.Duration.days(7)
6953
+ dashboard = cw.Dashboard(self, "Dash",
6954
+ default_interval=Duration.days(7)
6958
6955
  )
6959
6956
  '''
6960
6957
  if __debug__:
@@ -8795,19 +8792,23 @@ class MetricOptions(CommonMetricOptions):
8795
8792
 
8796
8793
  Example::
8797
8794
 
8798
- # matchmaking_rule_set: gamelift.MatchmakingRuleSet
8795
+ import aws_cdk.aws_cloudwatch as cloudwatch
8796
+
8797
+ # delivery_stream: firehose.DeliveryStream
8798
+
8799
8799
 
8800
- # Alarm that triggers when the per-second average of not placed matches exceed 10%
8801
- rule_evaluation_ratio = cloudwatch.MathExpression(
8802
- expression="1 - (ruleEvaluationsPassed / ruleEvaluationsFailed)",
8800
+ # Alarm that triggers when the per-second average of incoming bytes exceeds 90% of the current service limit
8801
+ incoming_bytes_percent_of_limit = cloudwatch.MathExpression(
8802
+ expression="incomingBytes / 300 / bytePerSecLimit",
8803
8803
  using_metrics={
8804
- "rule_evaluations_passed": matchmaking_rule_set.metric_rule_evaluations_passed(statistic=cloudwatch.Statistic.SUM),
8805
- "rule_evaluations_failed": matchmaking_rule_set.metric("ruleEvaluationsFailed")
8804
+ "incoming_bytes": delivery_stream.metric_incoming_bytes(statistic=cloudwatch.Statistic.SUM),
8805
+ "byte_per_sec_limit": delivery_stream.metric("BytesPerSecondLimit")
8806
8806
  }
8807
8807
  )
8808
+
8808
8809
  cloudwatch.Alarm(self, "Alarm",
8809
- metric=rule_evaluation_ratio,
8810
- threshold=0.1,
8810
+ metric=incoming_bytes_percent_of_limit,
8811
+ threshold=0.9,
8811
8812
  evaluation_periods=3
8812
8813
  )
8813
8814
  '''
@@ -10301,13 +10302,12 @@ class TextWidgetBackground(enum.Enum):
10301
10302
 
10302
10303
  Example::
10303
10304
 
10304
- # Example automatically generated from non-compiling source. May contain errors.
10305
10305
  # dashboard: cloudwatch.Dashboard
10306
10306
 
10307
10307
 
10308
10308
  dashboard.add_widgets(cloudwatch.TextWidget(
10309
10309
  markdown="# Key Performance Indicators",
10310
- background=TextWidgetBackground.TRANSPARENT
10310
+ background=cloudwatch.TextWidgetBackground.TRANSPARENT
10311
10311
  ))
10312
10312
  '''
10313
10313
 
@@ -10432,7 +10432,7 @@ class TreatMissingData(enum.Enum):
10432
10432
  runtime=lambda_.Runtime.NODEJS_18_X,
10433
10433
  handler="index.handler",
10434
10434
  code=lambda_.Code.from_asset(path.join(__dirname, "lambda-handler")),
10435
- timeout=cdk.Duration.minutes(5)
10435
+ timeout=Duration.minutes(5)
10436
10436
  )
10437
10437
 
10438
10438
  if fn.timeout:
@@ -10466,7 +10466,6 @@ class Unit(enum.Enum):
10466
10466
 
10467
10467
  Example::
10468
10468
 
10469
- # Example automatically generated from non-compiling source. May contain errors.
10470
10469
  # log_group: logs.LogGroup
10471
10470
 
10472
10471
  mf = logs.MetricFilter(self, "MetricFilter",
@@ -10478,7 +10477,7 @@ class Unit(enum.Enum):
10478
10477
  dimensions={
10479
10478
  "ErrorCode": "$.errorCode"
10480
10479
  },
10481
- unit=Unit.MILLISECONDS
10480
+ unit=cloudwatch.Unit.MILLISECONDS
10482
10481
  )
10483
10482
 
10484
10483
  # expose a metric from the metric filter
@@ -12614,7 +12613,7 @@ class CompositeAlarm(
12614
12613
 
12615
12614
  :param scope: The parent creating construct (usually ``this``).
12616
12615
  :param id: The construct's name.
12617
- :param composite_alarm_arn: Composite Alarm ARN (i.e. arn:aws:cloudwatch:::alarm/CompositeAlarmName).
12616
+ :param composite_alarm_arn: Composite Alarm ARN (i.e. arn:aws:cloudwatch:::alarm:CompositeAlarmName).
12618
12617
  '''
12619
12618
  if __debug__:
12620
12619
  type_hints = typing.get_type_hints(_typecheckingstub__dfb039403469bae811c18af1008f632188c3f4e24312b57fe3c23c7e5e1405fc)
@@ -12771,6 +12770,27 @@ class Alarm(
12771
12770
  check_type(argname="argument alarm_arn", value=alarm_arn, expected_type=type_hints["alarm_arn"])
12772
12771
  return typing.cast(IAlarm, jsii.sinvoke(cls, "fromAlarmArn", [scope, id, alarm_arn]))
12773
12772
 
12773
+ @jsii.member(jsii_name="fromAlarmName")
12774
+ @builtins.classmethod
12775
+ def from_alarm_name(
12776
+ cls,
12777
+ scope: _constructs_77d1e7e8.Construct,
12778
+ id: builtins.str,
12779
+ alarm_name: builtins.str,
12780
+ ) -> IAlarm:
12781
+ '''Import an existing CloudWatch alarm provided an Name.
12782
+
12783
+ :param scope: The parent creating construct (usually ``this``).
12784
+ :param id: The construct's name.
12785
+ :param alarm_name: Alarm Name.
12786
+ '''
12787
+ if __debug__:
12788
+ type_hints = typing.get_type_hints(_typecheckingstub__0f69e87f80e55b26f710e5c03872b4814d854ded266dd530cb19c3aeb9cae0b2)
12789
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
12790
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
12791
+ check_type(argname="argument alarm_name", value=alarm_name, expected_type=type_hints["alarm_name"])
12792
+ return typing.cast(IAlarm, jsii.sinvoke(cls, "fromAlarmName", [scope, id, alarm_name]))
12793
+
12774
12794
  @jsii.member(jsii_name="addAlarmAction")
12775
12795
  def add_alarm_action(self, *actions: IAlarmAction) -> None:
12776
12796
  '''Trigger this action if the alarm fires.
@@ -14354,6 +14374,14 @@ def _typecheckingstub__f8a5a6150e68ee9e26c8b7ebe6f92594c12f9b3cda4195d76462b9910
14354
14374
  """Type checking stubs"""
14355
14375
  pass
14356
14376
 
14377
+ def _typecheckingstub__0f69e87f80e55b26f710e5c03872b4814d854ded266dd530cb19c3aeb9cae0b2(
14378
+ scope: _constructs_77d1e7e8.Construct,
14379
+ id: builtins.str,
14380
+ alarm_name: builtins.str,
14381
+ ) -> None:
14382
+ """Type checking stubs"""
14383
+ pass
14384
+
14357
14385
  def _typecheckingstub__35e42b79cd71f370c96d9123c26abff1c323e3360845e3957f3fa6b0bb344dde(
14358
14386
  *actions: IAlarmAction,
14359
14387
  ) -> None:
@@ -122,9 +122,8 @@ The build spec can be provided from a number of different sources
122
122
  You can specify a specific filename that exists within the project's source artifact to use as the buildspec.
123
123
 
124
124
  ```python
125
- # Example automatically generated from non-compiling source. May contain errors.
126
125
  project = codebuild.Project(self, "MyProject",
127
- build_spec=codebuild.BuildSpec.from_source_file_name("my-buildspec.yml"),
126
+ build_spec=codebuild.BuildSpec.from_source_filename("my-buildspec.yml"),
128
127
  source=codebuild.Source.git_hub(
129
128
  owner="awslabs",
130
129
  repo="aws-cdk"
@@ -468,7 +467,7 @@ Example:
468
467
  ```python
469
468
  codebuild.Project(self, "Project",
470
469
  environment=codebuild.BuildEnvironment(
471
- build_image=codebuild.LinuxBuildImage.STANDARD_6_0
470
+ build_image=codebuild.LinuxBuildImage.STANDARD_7_0
472
471
  ),
473
472
  ssm_session_permissions=True,
474
473
  build_spec=codebuild.BuildSpec.from_object({
@@ -1352,7 +1351,6 @@ class BuildEnvironment:
1352
1351
 
1353
1352
  Example::
1354
1353
 
1355
- # Example automatically generated from non-compiling source. May contain errors.
1356
1354
  # vpc: ec2.Vpc
1357
1355
  # my_security_group: ec2.SecurityGroup
1358
1356
 
@@ -1565,7 +1563,6 @@ class BuildEnvironmentVariable:
1565
1563
 
1566
1564
  Example::
1567
1565
 
1568
- # Example automatically generated from non-compiling source. May contain errors.
1569
1566
  # later:
1570
1567
  # project: codebuild.PipelineProject
1571
1568
  source_output = codepipeline.Artifact()
@@ -7252,7 +7249,6 @@ class ComputeType(enum.Enum):
7252
7249
 
7253
7250
  Example::
7254
7251
 
7255
- # Example automatically generated from non-compiling source. May contain errors.
7256
7252
  # vpc: ec2.Vpc
7257
7253
  # my_security_group: ec2.SecurityGroup
7258
7254
 
@@ -9728,7 +9724,6 @@ class LinuxBuildImage(
9728
9724
 
9729
9725
  Example::
9730
9726
 
9731
- # Example automatically generated from non-compiling source. May contain errors.
9732
9727
  pipeline = pipelines.CodePipeline(self, "Pipeline",
9733
9728
  synth=pipelines.ShellStep("Synth",
9734
9729
  input=pipelines.CodePipelineSource.connection("my-org/my-app", "main",
@@ -10008,6 +10003,12 @@ class LinuxBuildImage(
10008
10003
  '''The ``aws/codebuild/standard:6.0`` build image.'''
10009
10004
  return typing.cast(IBuildImage, jsii.sget(cls, "STANDARD_6_0"))
10010
10005
 
10006
+ @jsii.python.classproperty
10007
+ @jsii.member(jsii_name="STANDARD_7_0")
10008
+ def STANDARD_7_0(cls) -> IBuildImage:
10009
+ '''The ``aws/codebuild/standard:7.0`` build image.'''
10010
+ return typing.cast(IBuildImage, jsii.sget(cls, "STANDARD_7_0"))
10011
+
10011
10012
  @builtins.property
10012
10013
  @jsii.member(jsii_name="defaultComputeType")
10013
10014
  def default_compute_type(self) -> ComputeType:
@@ -10287,7 +10288,6 @@ class PipelineProjectProps(CommonProjectProps):
10287
10288
 
10288
10289
  Example::
10289
10290
 
10290
- # Example automatically generated from non-compiling source. May contain errors.
10291
10291
  # Create a Cloudfront Web Distribution
10292
10292
  import aws_cdk.aws_cloudfront as cloudfront
10293
10293
  # distribution: cloudfront.Distribution
@@ -12757,9 +12757,8 @@ class Source(
12757
12757
 
12758
12758
  Example::
12759
12759
 
12760
- # Example automatically generated from non-compiling source. May contain errors.
12761
12760
  project = codebuild.Project(self, "MyProject",
12762
- build_spec=codebuild.BuildSpec.from_source_file_name("my-buildspec.yml"),
12761
+ build_spec=codebuild.BuildSpec.from_source_filename("my-buildspec.yml"),
12763
12762
  source=codebuild.Source.git_hub(
12764
12763
  owner="awslabs",
12765
12764
  repo="aws-cdk"
@@ -14408,9 +14407,8 @@ class GitHubSourceProps(SourceProps):
14408
14407
 
14409
14408
  Example::
14410
14409
 
14411
- # Example automatically generated from non-compiling source. May contain errors.
14412
14410
  project = codebuild.Project(self, "MyProject",
14413
- build_spec=codebuild.BuildSpec.from_source_file_name("my-buildspec.yml"),
14411
+ build_spec=codebuild.BuildSpec.from_source_filename("my-buildspec.yml"),
14414
14412
  source=codebuild.Source.git_hub(
14415
14413
  owner="awslabs",
14416
14414
  repo="aws-cdk"
@@ -14920,7 +14918,6 @@ class PipelineProject(
14920
14918
 
14921
14919
  Example::
14922
14920
 
14923
- # Example automatically generated from non-compiling source. May contain errors.
14924
14921
  # Create a Cloudfront Web Distribution
14925
14922
  import aws_cdk.aws_cloudfront as cloudfront
14926
14923
  # distribution: cloudfront.Distribution
@@ -2378,7 +2378,6 @@ class Repository(
2378
2378
 
2379
2379
  Example::
2380
2380
 
2381
- # Example automatically generated from non-compiling source. May contain errors.
2382
2381
  # project: codebuild.PipelineProject
2383
2382
 
2384
2383
  repository = codecommit.Repository(self, "MyRepository",