aws-cdk-lib 2.176.0__py3-none-any.whl → 2.177.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 (44) hide show
  1. aws_cdk/__init__.py +11 -1
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.176.0.jsii.tgz → aws-cdk-lib@2.177.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_apigatewayv2_integrations/__init__.py +2 -2
  5. aws_cdk/aws_appsync/__init__.py +4 -3
  6. aws_cdk/aws_batch/__init__.py +4 -2
  7. aws_cdk/aws_bedrock/__init__.py +5395 -2508
  8. aws_cdk/aws_cloudfront/__init__.py +12 -2
  9. aws_cdk/aws_cloudfront_origins/__init__.py +33 -2
  10. aws_cdk/aws_codepipeline/__init__.py +35 -0
  11. aws_cdk/aws_cognito/__init__.py +162 -139
  12. aws_cdk/aws_customerprofiles/__init__.py +3 -3
  13. aws_cdk/aws_datazone/__init__.py +195 -125
  14. aws_cdk/aws_ec2/__init__.py +5 -3
  15. aws_cdk/aws_ecs/__init__.py +27 -8
  16. aws_cdk/aws_efs/__init__.py +5 -5
  17. aws_cdk/aws_eks/__init__.py +24 -3
  18. aws_cdk/aws_emrserverless/__init__.py +86 -0
  19. aws_cdk/aws_fms/__init__.py +42 -0
  20. aws_cdk/aws_gamelift/__init__.py +8 -10
  21. aws_cdk/aws_iam/__init__.py +8 -0
  22. aws_cdk/aws_imagebuilder/__init__.py +62 -48
  23. aws_cdk/aws_lambda/__init__.py +13 -0
  24. aws_cdk/aws_logs/__init__.py +59 -59
  25. aws_cdk/aws_notifications/__init__.py +1390 -0
  26. aws_cdk/aws_notificationscontacts/__init__.py +593 -0
  27. aws_cdk/aws_rds/__init__.py +16 -22
  28. aws_cdk/aws_redshift/__init__.py +9 -5
  29. aws_cdk/aws_route53/__init__.py +4 -4
  30. aws_cdk/aws_route53_targets/__init__.py +15 -15
  31. aws_cdk/aws_s3/__init__.py +789 -0
  32. aws_cdk/aws_s3_notifications/__init__.py +5 -5
  33. aws_cdk/aws_s3tables/__init__.py +2 -2
  34. aws_cdk/aws_sns/__init__.py +39 -0
  35. aws_cdk/aws_ssm/__init__.py +5 -5
  36. aws_cdk/aws_synthetics/__init__.py +105 -32
  37. aws_cdk/cloud_assembly_schema/__init__.py +63 -4
  38. aws_cdk/cx_api/__init__.py +44 -4
  39. {aws_cdk_lib-2.176.0.dist-info → aws_cdk_lib-2.177.0.dist-info}/METADATA +3 -3
  40. {aws_cdk_lib-2.176.0.dist-info → aws_cdk_lib-2.177.0.dist-info}/RECORD +44 -42
  41. {aws_cdk_lib-2.176.0.dist-info → aws_cdk_lib-2.177.0.dist-info}/LICENSE +0 -0
  42. {aws_cdk_lib-2.176.0.dist-info → aws_cdk_lib-2.177.0.dist-info}/NOTICE +0 -0
  43. {aws_cdk_lib-2.176.0.dist-info → aws_cdk_lib-2.177.0.dist-info}/WHEEL +0 -0
  44. {aws_cdk_lib-2.176.0.dist-info → aws_cdk_lib-2.177.0.dist-info}/top_level.txt +0 -0
@@ -1347,6 +1347,8 @@ class AccessLevel(enum.Enum):
1347
1347
 
1348
1348
  READ = "READ"
1349
1349
  '''Grants read permissions to CloudFront Distribution.'''
1350
+ LIST = "LIST"
1351
+ '''Grants list permissions to CloudFront Distribution.'''
1350
1352
  WRITE = "WRITE"
1351
1353
  '''Grants write permission to CloudFront Distribution.'''
1352
1354
  DELETE = "DELETE"
@@ -2699,6 +2701,8 @@ class CfnAnycastIpList(
2699
2701
  ):
2700
2702
  '''An Anycast static IP list.
2701
2703
 
2704
+ For more information, see `Request Anycast static IPs to use for allowlisting <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/request-static-ips.html>`_ in the *Amazon CloudFront Developer Guide* .
2705
+
2702
2706
  :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudfront-anycastiplist.html
2703
2707
  :cloudformationResource: AWS::CloudFront::AnycastIpList
2704
2708
  :exampleMetadata: fixture=_generated
@@ -2880,6 +2884,8 @@ class CfnAnycastIpList(
2880
2884
  ) -> None:
2881
2885
  '''An Anycast static IP list.
2882
2886
 
2887
+ For more information, see `Request Anycast static IPs to use for allowlisting <https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/request-static-ips.html>`_ in the *Amazon CloudFront Developer Guide* .
2888
+
2883
2889
  :param anycast_ips: The static IP addresses that are allocated to the Anycast static IP list.
2884
2890
  :param arn: The Amazon Resource Name (ARN) of the Anycast static IP list.
2885
2891
  :param id: The ID of the Anycast static IP list.
@@ -21519,7 +21525,7 @@ class ResponseHeadersCorsBehavior:
21519
21525
 
21520
21526
  :param access_control_allow_credentials: A Boolean that CloudFront uses as the value for the Access-Control-Allow-Credentials HTTP response header.
21521
21527
  :param access_control_allow_headers: A list of HTTP header names that CloudFront includes as values for the Access-Control-Allow-Headers HTTP response header. You can specify ``['*']`` to allow all headers.
21522
- :param access_control_allow_methods: A list of HTTP methods that CloudFront includes as values for the Access-Control-Allow-Methods HTTP response header.
21528
+ :param access_control_allow_methods: A list of HTTP methods that CloudFront includes as values for the Access-Control-Allow-Methods HTTP response header. Allowed methods: ``'GET'``, ``'DELETE'``, ``'HEAD'``, ``'OPTIONS'``, ``'PATCH'``, ``'POST'``, and ``'PUT'``. You can specify ``['ALL']`` to allow all methods.
21523
21529
  :param access_control_allow_origins: A list of origins (domain names) that CloudFront can use as the value for the Access-Control-Allow-Origin HTTP response header. You can specify ``['*']`` to allow all origins.
21524
21530
  :param origin_override: A Boolean that determines whether CloudFront overrides HTTP response headers received from the origin with the ones specified in this response headers policy.
21525
21531
  :param access_control_expose_headers: A list of HTTP headers that CloudFront includes as values for the Access-Control-Expose-Headers HTTP response header. You can specify ``['*']`` to expose all headers. Default: - no headers exposed
@@ -21614,7 +21620,11 @@ class ResponseHeadersCorsBehavior:
21614
21620
 
21615
21621
  @builtins.property
21616
21622
  def access_control_allow_methods(self) -> typing.List[builtins.str]:
21617
- '''A list of HTTP methods that CloudFront includes as values for the Access-Control-Allow-Methods HTTP response header.'''
21623
+ '''A list of HTTP methods that CloudFront includes as values for the Access-Control-Allow-Methods HTTP response header.
21624
+
21625
+ Allowed methods: ``'GET'``, ``'DELETE'``, ``'HEAD'``, ``'OPTIONS'``, ``'PATCH'``, ``'POST'``, and ``'PUT'``.
21626
+ You can specify ``['ALL']`` to allow all methods.
21627
+ '''
21618
21628
  result = self._values.get("access_control_allow_methods")
21619
21629
  assert result is not None, "Required property 'access_control_allow_methods' is missing"
21620
21630
  return typing.cast(typing.List[builtins.str], result)
@@ -74,7 +74,7 @@ cloudfront.Distribution(self, "myDist",
74
74
 
75
75
  When creating a standard S3 origin using `origins.S3BucketOrigin.withOriginAccessControl()`, an [Origin Access Control resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-originaccesscontrol-originaccesscontrolconfig.html) is automatically created with the origin type set to `s3` and signing behavior set to `always`.
76
76
 
77
- You can grant read, write or delete access to the OAC using the `originAccessLevels` property:
77
+ You can grant read, list, write or delete access to the OAC using the `originAccessLevels` property:
78
78
 
79
79
  ```python
80
80
  my_bucket = s3.Bucket(self, "myBucket")
@@ -83,6 +83,8 @@ s3_origin = origins.S3BucketOrigin.with_origin_access_control(my_bucket,
83
83
  )
84
84
  ```
85
85
 
86
+ For details of list permission, see [Setting up OAC with LIST permission](#setting-up-oac-with-list-permission).
87
+
86
88
  You can also pass in a custom S3 origin access control:
87
89
 
88
90
  ```python
@@ -336,6 +338,29 @@ See CloudFront docs on [Giving the origin access control permission to access th
336
338
  > Note: If your bucket previously used OAI, you will need to manually remove the policy statement
337
339
  > that gives the OAI access to your bucket after setting up OAC.
338
340
 
341
+ #### Setting up OAC with LIST permission
342
+
343
+ By default, S3 origin returns 403 Forbidden HTTP response when the requested object does not exist.
344
+ When you want to receive 404 Not Found, specify `AccessLevel.LIST` in `originAccessLevels` to add `s3:ListBucket` permission in the bucket policy.
345
+
346
+ This is useful to distinguish between responses blocked by WAF (403) and responses where the file does not exist (404).
347
+
348
+ ```python
349
+ my_bucket = s3.Bucket(self, "myBucket")
350
+ s3_origin = origins.S3BucketOrigin.with_origin_access_control(my_bucket,
351
+ origin_access_levels=[cloudfront.AccessLevel.READ, cloudfront.AccessLevel.LIST]
352
+ )
353
+ cloudfront.Distribution(self, "distribution",
354
+ default_behavior=cloudfront.BehaviorOptions(
355
+ origin=s3_origin
356
+ ),
357
+ default_root_object="index.html"
358
+ )
359
+ ```
360
+
361
+ When the origin is associated to the default behavior, it is highly recommended to specify `defaultRootObject` distribution property.
362
+ Without it, the root path `https://xxxx.cloudfront.net/` will return the list of the S3 object keys.
363
+
339
364
  #### Setting up an OAI (legacy)
340
365
 
341
366
  Setup an S3 origin with origin access identity (legacy) as follows:
@@ -3171,7 +3196,13 @@ class S3BucketOriginWithOACProps(S3BucketOriginBaseProps):
3171
3196
 
3172
3197
  my_bucket = s3.Bucket(self, "myBucket")
3173
3198
  s3_origin = origins.S3BucketOrigin.with_origin_access_control(my_bucket,
3174
- origin_access_levels=[cloudfront.AccessLevel.READ, cloudfront.AccessLevel.WRITE, cloudfront.AccessLevel.DELETE]
3199
+ origin_access_levels=[cloudfront.AccessLevel.READ, cloudfront.AccessLevel.LIST]
3200
+ )
3201
+ cloudfront.Distribution(self, "distribution",
3202
+ default_behavior=cloudfront.BehaviorOptions(
3203
+ origin=s3_origin
3204
+ ),
3205
+ default_root_object="index.html"
3175
3206
  )
3176
3207
  '''
3177
3208
  if __debug__:
@@ -2499,6 +2499,7 @@ class CfnPipeline(
2499
2499
  conditions=[codepipeline.CfnPipeline.ConditionProperty(
2500
2500
  result="result",
2501
2501
  rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
2502
+ commands=["commands"],
2502
2503
  configuration=configuration,
2503
2504
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
2504
2505
  name="name"
@@ -2523,6 +2524,7 @@ class CfnPipeline(
2523
2524
  conditions=[codepipeline.CfnPipeline.ConditionProperty(
2524
2525
  result="result",
2525
2526
  rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
2527
+ commands=["commands"],
2526
2528
  configuration=configuration,
2527
2529
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
2528
2530
  name="name"
@@ -2547,6 +2549,7 @@ class CfnPipeline(
2547
2549
  conditions=[codepipeline.CfnPipeline.ConditionProperty(
2548
2550
  result="result",
2549
2551
  rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
2552
+ commands=["commands"],
2550
2553
  configuration=configuration,
2551
2554
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
2552
2555
  name="name"
@@ -3574,6 +3577,7 @@ class CfnPipeline(
3574
3577
  conditions=[codepipeline.CfnPipeline.ConditionProperty(
3575
3578
  result="result",
3576
3579
  rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
3580
+ commands=["commands"],
3577
3581
  configuration=configuration,
3578
3582
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
3579
3583
  name="name"
@@ -3719,6 +3723,7 @@ class CfnPipeline(
3719
3723
  condition_property = codepipeline.CfnPipeline.ConditionProperty(
3720
3724
  result="result",
3721
3725
  rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
3726
+ commands=["commands"],
3722
3727
  configuration=configuration,
3723
3728
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
3724
3729
  name="name"
@@ -3891,6 +3896,7 @@ class CfnPipeline(
3891
3896
  conditions=[codepipeline.CfnPipeline.ConditionProperty(
3892
3897
  result="result",
3893
3898
  rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
3899
+ commands=["commands"],
3894
3900
  configuration=configuration,
3895
3901
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
3896
3902
  name="name"
@@ -4809,6 +4815,7 @@ class CfnPipeline(
4809
4815
  jsii_type="aws-cdk-lib.aws_codepipeline.CfnPipeline.RuleDeclarationProperty",
4810
4816
  jsii_struct_bases=[],
4811
4817
  name_mapping={
4818
+ "commands": "commands",
4812
4819
  "configuration": "configuration",
4813
4820
  "input_artifacts": "inputArtifacts",
4814
4821
  "name": "name",
@@ -4821,6 +4828,7 @@ class CfnPipeline(
4821
4828
  def __init__(
4822
4829
  self,
4823
4830
  *,
4831
+ commands: typing.Optional[typing.Sequence[builtins.str]] = None,
4824
4832
  configuration: typing.Any = None,
4825
4833
  input_artifacts: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union["CfnPipeline.InputArtifactProperty", typing.Dict[builtins.str, typing.Any]]]]]] = None,
4826
4834
  name: typing.Optional[builtins.str] = None,
@@ -4832,6 +4840,7 @@ class CfnPipeline(
4832
4840
 
4833
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>`_ .
4834
4842
 
4843
+ :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 .
4835
4844
  :param configuration: The action configuration fields for the rule.
4836
4845
  :param input_artifacts: The input artifacts fields for the rule, such as specifying an input file for the rule.
4837
4846
  :param name: The name of the rule that is created for the condition, such as ``VariableCheck`` .
@@ -4851,6 +4860,7 @@ class CfnPipeline(
4851
4860
  # configuration: Any
4852
4861
 
4853
4862
  rule_declaration_property = codepipeline.CfnPipeline.RuleDeclarationProperty(
4863
+ commands=["commands"],
4854
4864
  configuration=configuration,
4855
4865
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
4856
4866
  name="name"
@@ -4868,6 +4878,7 @@ class CfnPipeline(
4868
4878
  '''
4869
4879
  if __debug__:
4870
4880
  type_hints = typing.get_type_hints(_typecheckingstub__8b4c62f005bd4f9080fa5e8c7f7671821e7ac1c9314d5d3b1130fbf53e40fa51)
4881
+ check_type(argname="argument commands", value=commands, expected_type=type_hints["commands"])
4871
4882
  check_type(argname="argument configuration", value=configuration, expected_type=type_hints["configuration"])
4872
4883
  check_type(argname="argument input_artifacts", value=input_artifacts, expected_type=type_hints["input_artifacts"])
4873
4884
  check_type(argname="argument name", value=name, expected_type=type_hints["name"])
@@ -4875,6 +4886,8 @@ class CfnPipeline(
4875
4886
  check_type(argname="argument role_arn", value=role_arn, expected_type=type_hints["role_arn"])
4876
4887
  check_type(argname="argument rule_type_id", value=rule_type_id, expected_type=type_hints["rule_type_id"])
4877
4888
  self._values: typing.Dict[builtins.str, typing.Any] = {}
4889
+ if commands is not None:
4890
+ self._values["commands"] = commands
4878
4891
  if configuration is not None:
4879
4892
  self._values["configuration"] = configuration
4880
4893
  if input_artifacts is not None:
@@ -4888,6 +4901,20 @@ class CfnPipeline(
4888
4901
  if rule_type_id is not None:
4889
4902
  self._values["rule_type_id"] = rule_type_id
4890
4903
 
4904
+ @builtins.property
4905
+ def commands(self) -> typing.Optional[typing.List[builtins.str]]:
4906
+ '''The shell commands to run with your commands rule in CodePipeline.
4907
+
4908
+ 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.
4909
+ .. epigraph::
4910
+
4911
+ Using compute time for this action will incur separate charges in AWS CodeBuild .
4912
+
4913
+ :see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-ruledeclaration.html#cfn-codepipeline-pipeline-ruledeclaration-commands
4914
+ '''
4915
+ result = self._values.get("commands")
4916
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
4917
+
4891
4918
  @builtins.property
4892
4919
  def configuration(self) -> typing.Any:
4893
4920
  '''The action configuration fields for the rule.
@@ -5145,6 +5172,7 @@ class CfnPipeline(
5145
5172
  conditions=[codepipeline.CfnPipeline.ConditionProperty(
5146
5173
  result="result",
5147
5174
  rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
5175
+ commands=["commands"],
5148
5176
  configuration=configuration,
5149
5177
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
5150
5178
  name="name"
@@ -5169,6 +5197,7 @@ class CfnPipeline(
5169
5197
  conditions=[codepipeline.CfnPipeline.ConditionProperty(
5170
5198
  result="result",
5171
5199
  rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
5200
+ commands=["commands"],
5172
5201
  configuration=configuration,
5173
5202
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
5174
5203
  name="name"
@@ -5193,6 +5222,7 @@ class CfnPipeline(
5193
5222
  conditions=[codepipeline.CfnPipeline.ConditionProperty(
5194
5223
  result="result",
5195
5224
  rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
5225
+ commands=["commands"],
5196
5226
  configuration=configuration,
5197
5227
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
5198
5228
  name="name"
@@ -5413,6 +5443,7 @@ class CfnPipeline(
5413
5443
  conditions=[codepipeline.CfnPipeline.ConditionProperty(
5414
5444
  result="result",
5415
5445
  rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
5446
+ commands=["commands"],
5416
5447
  configuration=configuration,
5417
5448
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
5418
5449
  name="name"
@@ -5653,6 +5684,7 @@ class CfnPipelineProps:
5653
5684
  conditions=[codepipeline.CfnPipeline.ConditionProperty(
5654
5685
  result="result",
5655
5686
  rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
5687
+ commands=["commands"],
5656
5688
  configuration=configuration,
5657
5689
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
5658
5690
  name="name"
@@ -5677,6 +5709,7 @@ class CfnPipelineProps:
5677
5709
  conditions=[codepipeline.CfnPipeline.ConditionProperty(
5678
5710
  result="result",
5679
5711
  rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
5712
+ commands=["commands"],
5680
5713
  configuration=configuration,
5681
5714
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
5682
5715
  name="name"
@@ -5701,6 +5734,7 @@ class CfnPipelineProps:
5701
5734
  conditions=[codepipeline.CfnPipeline.ConditionProperty(
5702
5735
  result="result",
5703
5736
  rules=[codepipeline.CfnPipeline.RuleDeclarationProperty(
5737
+ commands=["commands"],
5704
5738
  configuration=configuration,
5705
5739
  input_artifacts=[codepipeline.CfnPipeline.InputArtifactProperty(
5706
5740
  name="name"
@@ -10978,6 +11012,7 @@ def _typecheckingstub__ffc8deb7765afd70d3fe572ffa86634cd8936e44aafd092f3182c532d
10978
11012
 
10979
11013
  def _typecheckingstub__8b4c62f005bd4f9080fa5e8c7f7671821e7ac1c9314d5d3b1130fbf53e40fa51(
10980
11014
  *,
11015
+ commands: typing.Optional[typing.Sequence[builtins.str]] = None,
10981
11016
  configuration: typing.Any = None,
10982
11017
  input_artifacts: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union[CfnPipeline.InputArtifactProperty, typing.Dict[builtins.str, typing.Any]]]]]] = None,
10983
11018
  name: typing.Optional[builtins.str] = None,