aws-cdk-lib 2.178.2__py3-none-any.whl → 2.180.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 (70) hide show
  1. aws_cdk/__init__.py +83 -41
  2. aws_cdk/_jsii/__init__.py +1 -2
  3. aws_cdk/_jsii/{aws-cdk-lib@2.178.2.jsii.tgz → aws-cdk-lib@2.180.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_acmpca/__init__.py +47 -0
  5. aws_cdk/aws_apigateway/__init__.py +176 -35
  6. aws_cdk/aws_apigatewayv2/__init__.py +151 -32
  7. aws_cdk/aws_apigatewayv2_integrations/__init__.py +348 -0
  8. aws_cdk/aws_applicationautoscaling/__init__.py +8 -8
  9. aws_cdk/aws_appsync/__init__.py +10 -7
  10. aws_cdk/aws_backup/__init__.py +89 -0
  11. aws_cdk/aws_batch/__init__.py +89 -50
  12. aws_cdk/aws_bedrock/__init__.py +506 -62
  13. aws_cdk/aws_cloudfront/__init__.py +1037 -146
  14. aws_cdk/aws_cloudfront_origins/__init__.py +1338 -144
  15. aws_cdk/aws_cloudtrail/__init__.py +4 -8
  16. aws_cdk/aws_cloudwatch/__init__.py +1 -1
  17. aws_cdk/aws_codebuild/__init__.py +218 -2
  18. aws_cdk/aws_codepipeline/__init__.py +113 -28
  19. aws_cdk/aws_codepipeline_actions/__init__.py +554 -63
  20. aws_cdk/aws_codestar/__init__.py +2 -1
  21. aws_cdk/aws_cognito/__init__.py +676 -29
  22. aws_cdk/aws_connect/__init__.py +257 -0
  23. aws_cdk/aws_datasync/__init__.py +279 -50
  24. aws_cdk/aws_deadline/__init__.py +683 -6
  25. aws_cdk/aws_directoryservice/__init__.py +9 -4
  26. aws_cdk/aws_dlm/__init__.py +2 -2
  27. aws_cdk/aws_dms/__init__.py +3 -3
  28. aws_cdk/aws_dynamodb/__init__.py +0 -54
  29. aws_cdk/aws_ec2/__init__.py +402 -130
  30. aws_cdk/aws_ecs/__init__.py +28 -43
  31. aws_cdk/aws_efs/__init__.py +1 -1
  32. aws_cdk/aws_eks/__init__.py +560 -182
  33. aws_cdk/aws_elasticloadbalancingv2/__init__.py +112 -27
  34. aws_cdk/aws_emrcontainers/__init__.py +44 -1
  35. aws_cdk/aws_events/__init__.py +17 -26
  36. aws_cdk/aws_events_targets/__init__.py +303 -16
  37. aws_cdk/aws_fms/__init__.py +5 -5
  38. aws_cdk/aws_fsx/__init__.py +5 -4
  39. aws_cdk/aws_glue/__init__.py +161 -0
  40. aws_cdk/aws_groundstation/__init__.py +23 -1
  41. aws_cdk/aws_iam/__init__.py +15 -15
  42. aws_cdk/aws_iot/__init__.py +7 -0
  43. aws_cdk/aws_ivs/__init__.py +254 -77
  44. aws_cdk/aws_kinesis/__init__.py +689 -35
  45. aws_cdk/aws_lambda/__init__.py +10 -15
  46. aws_cdk/aws_lambda_event_sources/__init__.py +175 -2
  47. aws_cdk/aws_logs/__init__.py +62 -13
  48. aws_cdk/aws_medialive/__init__.py +314 -4
  49. aws_cdk/aws_opensearchserverless/__init__.py +19 -0
  50. aws_cdk/aws_pinpoint/__init__.py +14 -9
  51. aws_cdk/aws_rds/__init__.py +246 -82
  52. aws_cdk/aws_s3/__init__.py +287 -9
  53. aws_cdk/aws_s3objectlambda/__init__.py +2 -2
  54. aws_cdk/aws_ses/__init__.py +228 -8
  55. aws_cdk/aws_ssm/__init__.py +4 -5
  56. aws_cdk/aws_stepfunctions/__init__.py +301 -70
  57. aws_cdk/aws_stepfunctions_tasks/__init__.py +269 -163
  58. aws_cdk/aws_supportapp/__init__.py +7 -7
  59. aws_cdk/aws_transfer/__init__.py +820 -2
  60. aws_cdk/aws_wafv2/__init__.py +17 -9
  61. aws_cdk/custom_resources/__init__.py +23 -26
  62. aws_cdk/cx_api/__init__.py +16 -0
  63. aws_cdk/pipelines/__init__.py +2 -2
  64. {aws_cdk_lib-2.178.2.dist-info → aws_cdk_lib-2.180.0.dist-info}/METADATA +1 -2
  65. {aws_cdk_lib-2.178.2.dist-info → aws_cdk_lib-2.180.0.dist-info}/RECORD +69 -70
  66. aws_cdk/lambda_layer_kubectl/__init__.py +0 -107
  67. {aws_cdk_lib-2.178.2.dist-info → aws_cdk_lib-2.180.0.dist-info}/LICENSE +0 -0
  68. {aws_cdk_lib-2.178.2.dist-info → aws_cdk_lib-2.180.0.dist-info}/NOTICE +0 -0
  69. {aws_cdk_lib-2.178.2.dist-info → aws_cdk_lib-2.180.0.dist-info}/WHEEL +0 -0
  70. {aws_cdk_lib-2.178.2.dist-info → aws_cdk_lib-2.180.0.dist-info}/top_level.txt +0 -0
@@ -591,7 +591,7 @@ The following example shows how to use a rate limited api key :
591
591
 
592
592
  key = apigateway.RateLimitedApiKey(self, "rate-limited-api-key",
593
593
  customer_id="hello-customer",
594
- stages=[api.deployment_stage],
594
+ api_stages=[apigateway.UsagePlanPerApiStage(stage=api.deployment_stage)],
595
595
  quota=apigateway.QuotaSettings(
596
596
  limit=10000,
597
597
  period=apigateway.Period.MONTH
@@ -1684,6 +1684,21 @@ By performing this association, we can invoke the API gateway using the followin
1684
1684
  https://{rest-api-id}-{vpce-id}.execute-api.{region}.amazonaws.com/{stage}
1685
1685
  ```
1686
1686
 
1687
+ To restrict access to the API Gateway to only the VPC endpoint, you can use the `grantInvokeFromVpcEndpointsOnly` method to [add resource policies](https://docs.aws.amazon.com/apigateway/latest/developerguide/private-api-tutorial.html#private-api-tutorial-attach-resource-policy) to the API Gateway:
1688
+
1689
+ ```python
1690
+ # api_gw_vpc_endpoint: ec2.IVpcEndpoint
1691
+
1692
+
1693
+ api = apigateway.RestApi(self, "PrivateApi",
1694
+ endpoint_configuration=apigateway.EndpointConfiguration(
1695
+ types=[apigateway.EndpointType.PRIVATE],
1696
+ vpc_endpoints=[api_gw_vpc_endpoint]
1697
+ )
1698
+ )
1699
+ api.grant_invoke_from_vpc_endpoints_only([api_gw_vpc_endpoint])
1700
+ ```
1701
+
1687
1702
  ## Private Integrations
1688
1703
 
1689
1704
  A private integration makes it simple to expose HTTP/HTTPS resources behind an
@@ -1912,10 +1927,13 @@ from ..aws_elasticloadbalancingv2 import (
1912
1927
  INetworkLoadBalancer as _INetworkLoadBalancer_96e17101
1913
1928
  )
1914
1929
  from ..aws_iam import (
1930
+ AddToResourcePolicyResult as _AddToResourcePolicyResult_1d0a53ad,
1915
1931
  Grant as _Grant_a7ae64f8,
1916
1932
  IGrantable as _IGrantable_71c4f5de,
1933
+ IResourceWithPolicy as _IResourceWithPolicy_720d64fc,
1917
1934
  IRole as _IRole_235f5d8e,
1918
1935
  PolicyDocument as _PolicyDocument_3ac34393,
1936
+ PolicyStatement as _PolicyStatement_0fe33853,
1919
1937
  )
1920
1938
  from ..aws_kinesisfirehose import CfnDeliveryStream as _CfnDeliveryStream_8f3b1735
1921
1939
  from ..aws_kms import IKey as _IKey_5f11635f
@@ -14829,7 +14847,7 @@ class CorsOptions:
14829
14847
  status_code: typing.Optional[jsii.Number] = None,
14830
14848
  ) -> None:
14831
14849
  '''
14832
- :param allow_origins: Specifies the list of origins that are allowed to make requests to this resource. If you wish to allow all origins, specify ``Cors.ALL_ORIGINS`` or ``[ * ]``. Responses will include the ``Access-Control-Allow-Origin`` response header. If ``Cors.ALL_ORIGINS`` is specified, the ``Vary: Origin`` response header will also be included.
14850
+ :param allow_origins: Specifies the list of origins that are allowed to make requests to this resource. If you wish to allow all origins, specify ``Cors.ALL_ORIGINS`` or ``[ * ]``. Responses will include the ``Access-Control-Allow-Origin`` response header. If specific origins are specified (not ``Cors.ALL_ORIGINS``), the ``Vary: Origin`` response header will also be included.
14833
14851
  :param allow_credentials: The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request's credentials mode (Request.credentials) is "include". When a request's credentials mode (Request.credentials) is "include", browsers will only expose the response to frontend JavaScript code if the Access-Control-Allow-Credentials value is true. Credentials are cookies, authorization headers or TLS client certificates. Default: false
14834
14852
  :param allow_headers: The Access-Control-Allow-Headers response header is used in response to a preflight request which includes the Access-Control-Request-Headers to indicate which HTTP headers can be used during the actual request. Default: Cors.DEFAULT_HEADERS
14835
14853
  :param allow_methods: The Access-Control-Allow-Methods response header specifies the method or methods allowed when accessing the resource in response to a preflight request. If ``ANY`` is specified, it will be expanded to ``Cors.ALL_METHODS``. Default: Cors.ALL_METHODS
@@ -14885,8 +14903,8 @@ class CorsOptions:
14885
14903
  ``[ * ]``.
14886
14904
 
14887
14905
  Responses will include the ``Access-Control-Allow-Origin`` response header.
14888
- If ``Cors.ALL_ORIGINS`` is specified, the ``Vary: Origin`` response header will
14889
- also be included.
14906
+ If specific origins are specified (not ``Cors.ALL_ORIGINS``), the ``Vary: Origin``
14907
+ response header will also be included.
14890
14908
 
14891
14909
  :see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
14892
14910
  '''
@@ -15664,9 +15682,13 @@ class EndpointConfiguration:
15664
15682
 
15665
15683
  Example::
15666
15684
 
15685
+ # some_endpoint: ec2.IVpcEndpoint
15686
+
15687
+
15667
15688
  api = apigateway.RestApi(self, "api",
15668
15689
  endpoint_configuration=apigateway.EndpointConfiguration(
15669
- types=[apigateway.EndpointType.EDGE]
15690
+ types=[apigateway.EndpointType.PRIVATE],
15691
+ vpc_endpoints=[some_endpoint]
15670
15692
  )
15671
15693
  )
15672
15694
  '''
@@ -15718,12 +15740,14 @@ class EndpointType(enum.Enum):
15718
15740
 
15719
15741
  Example::
15720
15742
 
15721
- # api_definition: apigateway.ApiDefinition
15743
+ # some_endpoint: ec2.IVpcEndpoint
15722
15744
 
15723
15745
 
15724
- api = apigateway.SpecRestApi(self, "ExampleRestApi",
15725
- api_definition=api_definition,
15726
- endpoint_types=[apigateway.EndpointType.PRIVATE]
15746
+ api = apigateway.RestApi(self, "api",
15747
+ endpoint_configuration=apigateway.EndpointConfiguration(
15748
+ types=[apigateway.EndpointType.PRIVATE],
15749
+ vpc_endpoints=[some_endpoint]
15750
+ )
15727
15751
  )
15728
15752
  '''
15729
15753
 
@@ -16437,7 +16461,7 @@ class IResource(_IResource_c80c4260, typing_extensions.Protocol):
16437
16461
  resource that has a different origin (domain, protocol, or port) from its
16438
16462
  own.
16439
16463
 
16440
- :param allow_origins: Specifies the list of origins that are allowed to make requests to this resource. If you wish to allow all origins, specify ``Cors.ALL_ORIGINS`` or ``[ * ]``. Responses will include the ``Access-Control-Allow-Origin`` response header. If ``Cors.ALL_ORIGINS`` is specified, the ``Vary: Origin`` response header will also be included.
16464
+ :param allow_origins: Specifies the list of origins that are allowed to make requests to this resource. If you wish to allow all origins, specify ``Cors.ALL_ORIGINS`` or ``[ * ]``. Responses will include the ``Access-Control-Allow-Origin`` response header. If specific origins are specified (not ``Cors.ALL_ORIGINS``), the ``Vary: Origin`` response header will also be included.
16441
16465
  :param allow_credentials: The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request's credentials mode (Request.credentials) is "include". When a request's credentials mode (Request.credentials) is "include", browsers will only expose the response to frontend JavaScript code if the Access-Control-Allow-Credentials value is true. Credentials are cookies, authorization headers or TLS client certificates. Default: false
16442
16466
  :param allow_headers: The Access-Control-Allow-Headers response header is used in response to a preflight request which includes the Access-Control-Request-Headers to indicate which HTTP headers can be used during the actual request. Default: Cors.DEFAULT_HEADERS
16443
16467
  :param allow_methods: The Access-Control-Allow-Methods response header specifies the method or methods allowed when accessing the resource in response to a preflight request. If ``ANY`` is specified, it will be expanded to ``Cors.ALL_METHODS``. Default: Cors.ALL_METHODS
@@ -16628,7 +16652,7 @@ class _IResourceProxy(
16628
16652
  resource that has a different origin (domain, protocol, or port) from its
16629
16653
  own.
16630
16654
 
16631
- :param allow_origins: Specifies the list of origins that are allowed to make requests to this resource. If you wish to allow all origins, specify ``Cors.ALL_ORIGINS`` or ``[ * ]``. Responses will include the ``Access-Control-Allow-Origin`` response header. If ``Cors.ALL_ORIGINS`` is specified, the ``Vary: Origin`` response header will also be included.
16655
+ :param allow_origins: Specifies the list of origins that are allowed to make requests to this resource. If you wish to allow all origins, specify ``Cors.ALL_ORIGINS`` or ``[ * ]``. Responses will include the ``Access-Control-Allow-Origin`` response header. If specific origins are specified (not ``Cors.ALL_ORIGINS``), the ``Vary: Origin`` response header will also be included.
16632
16656
  :param allow_credentials: The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request's credentials mode (Request.credentials) is "include". When a request's credentials mode (Request.credentials) is "include", browsers will only expose the response to frontend JavaScript code if the Access-Control-Allow-Credentials value is true. Credentials are cookies, authorization headers or TLS client certificates. Default: false
16633
16657
  :param allow_headers: The Access-Control-Allow-Headers response header is used in response to a preflight request which includes the Access-Control-Request-Headers to indicate which HTTP headers can be used during the actual request. Default: Cors.DEFAULT_HEADERS
16634
16658
  :param allow_methods: The Access-Control-Allow-Methods response header specifies the method or methods allowed when accessing the resource in response to a preflight request. If ``ANY`` is specified, it will be expanded to ``Cors.ALL_METHODS``. Default: Cors.ALL_METHODS
@@ -21470,7 +21494,7 @@ class Period(enum.Enum):
21470
21494
 
21471
21495
  key = apigateway.RateLimitedApiKey(self, "rate-limited-api-key",
21472
21496
  customer_id="hello-customer",
21473
- stages=[api.deployment_stage],
21497
+ api_stages=[apigateway.UsagePlanPerApiStage(stage=api.deployment_stage)],
21474
21498
  quota=apigateway.QuotaSettings(
21475
21499
  limit=10000,
21476
21500
  period=apigateway.Period.MONTH
@@ -21511,7 +21535,7 @@ class QuotaSettings:
21511
21535
 
21512
21536
  key = apigateway.RateLimitedApiKey(self, "rate-limited-api-key",
21513
21537
  customer_id="hello-customer",
21514
- stages=[api.deployment_stage],
21538
+ api_stages=[apigateway.UsagePlanPerApiStage(stage=api.deployment_stage)],
21515
21539
  quota=apigateway.QuotaSettings(
21516
21540
  limit=10000,
21517
21541
  period=apigateway.Period.MONTH
@@ -21588,7 +21612,7 @@ class RateLimitedApiKey(
21588
21612
 
21589
21613
  key = apigateway.RateLimitedApiKey(self, "rate-limited-api-key",
21590
21614
  customer_id="hello-customer",
21591
- stages=[api.deployment_stage],
21615
+ api_stages=[apigateway.UsagePlanPerApiStage(stage=api.deployment_stage)],
21592
21616
  quota=apigateway.QuotaSettings(
21593
21617
  limit=10000,
21594
21618
  period=apigateway.Period.MONTH
@@ -21619,7 +21643,7 @@ class RateLimitedApiKey(
21619
21643
  '''
21620
21644
  :param scope: -
21621
21645
  :param id: -
21622
- :param api_stages: API Stages to be associated with the RateLimitedApiKey. Default: none
21646
+ :param api_stages: API Stages to be associated with the RateLimitedApiKey. If you already prepared UsagePlan resource explicitly, you should use ``stages`` property. If you prefer to prepare UsagePlan resource implicitly via RateLimitedApiKey, or you should specify throttle settings at each stage individually, you should use ``apiStages`` property. Default: none
21623
21647
  :param quota: Number of requests clients can make in a given time period. Default: none
21624
21648
  :param throttle: Overall throttle settings for the API. Default: none
21625
21649
  :param customer_id: An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace. Default: none
@@ -22652,7 +22676,7 @@ class ResourceBase(
22652
22676
  resource that has a different origin (domain, protocol, or port) from its
22653
22677
  own.
22654
22678
 
22655
- :param allow_origins: Specifies the list of origins that are allowed to make requests to this resource. If you wish to allow all origins, specify ``Cors.ALL_ORIGINS`` or ``[ * ]``. Responses will include the ``Access-Control-Allow-Origin`` response header. If ``Cors.ALL_ORIGINS`` is specified, the ``Vary: Origin`` response header will also be included.
22679
+ :param allow_origins: Specifies the list of origins that are allowed to make requests to this resource. If you wish to allow all origins, specify ``Cors.ALL_ORIGINS`` or ``[ * ]``. Responses will include the ``Access-Control-Allow-Origin`` response header. If specific origins are specified (not ``Cors.ALL_ORIGINS``), the ``Vary: Origin`` response header will also be included.
22656
22680
  :param allow_credentials: The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request's credentials mode (Request.credentials) is "include". When a request's credentials mode (Request.credentials) is "include", browsers will only expose the response to frontend JavaScript code if the Access-Control-Allow-Credentials value is true. Credentials are cookies, authorization headers or TLS client certificates. Default: false
22657
22681
  :param allow_headers: The Access-Control-Allow-Headers response header is used in response to a preflight request which includes the Access-Control-Request-Headers to indicate which HTTP headers can be used during the actual request. Default: Cors.DEFAULT_HEADERS
22658
22682
  :param allow_methods: The Access-Control-Allow-Methods response header specifies the method or methods allowed when accessing the resource in response to a preflight request. If ``ANY`` is specified, it will be expanded to ``Cors.ALL_METHODS``. Default: Cors.ALL_METHODS
@@ -23534,7 +23558,7 @@ class RestApiAttributes:
23534
23558
  )
23535
23559
 
23536
23560
 
23537
- @jsii.implements(IRestApi)
23561
+ @jsii.implements(IRestApi, _IResourceWithPolicy_720d64fc)
23538
23562
  class RestApiBase(
23539
23563
  _Resource_45bc6135,
23540
23564
  metaclass=jsii.JSIIAbstractClass,
@@ -23716,6 +23740,18 @@ class RestApiBase(
23716
23740
 
23717
23741
  return typing.cast("GatewayResponse", jsii.invoke(self, "addGatewayResponse", [id, options]))
23718
23742
 
23743
+ @jsii.member(jsii_name="addToResourcePolicy")
23744
+ @abc.abstractmethod
23745
+ def add_to_resource_policy(
23746
+ self,
23747
+ statement: _PolicyStatement_0fe33853,
23748
+ ) -> _AddToResourcePolicyResult_1d0a53ad:
23749
+ '''Add a statement to the resource's resource policy.
23750
+
23751
+ :param statement: -
23752
+ '''
23753
+ ...
23754
+
23719
23755
  @jsii.member(jsii_name="addUsagePlan")
23720
23756
  def add_usage_plan(
23721
23757
  self,
@@ -23769,6 +23805,22 @@ class RestApiBase(
23769
23805
  check_type(argname="argument stage", value=stage, expected_type=type_hints["stage"])
23770
23806
  return typing.cast(builtins.str, jsii.invoke(self, "arnForExecuteApi", [method, path, stage]))
23771
23807
 
23808
+ @jsii.member(jsii_name="grantInvokeFromVpcEndpointsOnly")
23809
+ def grant_invoke_from_vpc_endpoints_only(
23810
+ self,
23811
+ vpc_endpoints: typing.Sequence[_IVpcEndpoint_d8ea9bc3],
23812
+ ) -> None:
23813
+ '''Add a resource policy that only allows API execution from a VPC Endpoint to create a private API.
23814
+
23815
+ :param vpc_endpoints: the interface VPC endpoints to grant access to.
23816
+
23817
+ :see: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-resource-policies-examples.html#apigateway-resource-policies-source-vpc-example
23818
+ '''
23819
+ if __debug__:
23820
+ type_hints = typing.get_type_hints(_typecheckingstub__d9c72e763e6fd8bee0fdc38b4c6d9a51728ddb7d71c8f2cc4723eeecc90240d6)
23821
+ check_type(argname="argument vpc_endpoints", value=vpc_endpoints, expected_type=type_hints["vpc_endpoints"])
23822
+ return typing.cast(None, jsii.invoke(self, "grantInvokeFromVpcEndpointsOnly", [vpc_endpoints]))
23823
+
23772
23824
  @jsii.member(jsii_name="metric")
23773
23825
  def metric(
23774
23826
  self,
@@ -24236,11 +24288,40 @@ class RestApiBase(
24236
24288
  check_type(argname="argument value", value=value, expected_type=type_hints["value"])
24237
24289
  jsii.set(self, "cloudWatchAccount", value) # pyright: ignore[reportArgumentType]
24238
24290
 
24291
+ @builtins.property
24292
+ @jsii.member(jsii_name="resourcePolicy")
24293
+ def _resource_policy(self) -> typing.Optional[_PolicyDocument_3ac34393]:
24294
+ return typing.cast(typing.Optional[_PolicyDocument_3ac34393], jsii.get(self, "resourcePolicy"))
24295
+
24296
+ @_resource_policy.setter
24297
+ def _resource_policy(
24298
+ self,
24299
+ value: typing.Optional[_PolicyDocument_3ac34393],
24300
+ ) -> None:
24301
+ if __debug__:
24302
+ type_hints = typing.get_type_hints(_typecheckingstub__055b7d6b7f5983f0cbe73bf5302adcab621abc6451932928f4fc669ed6ce3182)
24303
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
24304
+ jsii.set(self, "resourcePolicy", value) # pyright: ignore[reportArgumentType]
24305
+
24239
24306
 
24240
24307
  class _RestApiBaseProxy(
24241
24308
  RestApiBase,
24242
24309
  jsii.proxy_for(_Resource_45bc6135), # type: ignore[misc]
24243
24310
  ):
24311
+ @jsii.member(jsii_name="addToResourcePolicy")
24312
+ def add_to_resource_policy(
24313
+ self,
24314
+ statement: _PolicyStatement_0fe33853,
24315
+ ) -> _AddToResourcePolicyResult_1d0a53ad:
24316
+ '''Add a statement to the resource's resource policy.
24317
+
24318
+ :param statement: -
24319
+ '''
24320
+ if __debug__:
24321
+ type_hints = typing.get_type_hints(_typecheckingstub__e5b96ed4eaeba0605aea131fd9bd60ab19b56a3504a62607ee5eff63a4b41ae8)
24322
+ check_type(argname="argument statement", value=statement, expected_type=type_hints["statement"])
24323
+ return typing.cast(_AddToResourcePolicyResult_1d0a53ad, jsii.invoke(self, "addToResourcePolicy", [statement]))
24324
+
24244
24325
  @builtins.property
24245
24326
  @jsii.member(jsii_name="restApiId")
24246
24327
  def rest_api_id(self) -> builtins.str:
@@ -24721,25 +24802,15 @@ class RestApiProps(ResourceOptions, RestApiBaseProps):
24721
24802
 
24722
24803
  Example::
24723
24804
 
24724
- destination_bucket = s3.Bucket(self, "Bucket")
24725
- delivery_stream_role = iam.Role(self, "Role",
24726
- assumed_by=iam.ServicePrincipal("firehose.amazonaws.com")
24727
- )
24728
-
24729
- stream = firehose.CfnDeliveryStream(self, "MyStream",
24730
- delivery_stream_name="amazon-apigateway-delivery-stream",
24731
- s3_destination_configuration=firehose.CfnDeliveryStream.S3DestinationConfigurationProperty(
24732
- bucket_arn=destination_bucket.bucket_arn,
24733
- role_arn=delivery_stream_role.role_arn
24734
- )
24805
+ state_machine = stepfunctions.StateMachine(self, "MyStateMachine",
24806
+ state_machine_type=stepfunctions.StateMachineType.EXPRESS,
24807
+ definition=stepfunctions.Chain.start(stepfunctions.Pass(self, "Pass"))
24735
24808
  )
24736
24809
 
24737
- api = apigateway.RestApi(self, "books",
24738
- deploy_options=apigateway.StageOptions(
24739
- access_log_destination=apigateway.FirehoseLogDestination(stream),
24740
- access_log_format=apigateway.AccessLogFormat.json_with_standard_fields()
24741
- )
24810
+ api = apigateway.RestApi(self, "Api",
24811
+ rest_api_name="MyApi"
24742
24812
  )
24813
+ api.root.add_method("GET", apigateway.StepFunctionsIntegration.start_execution(state_machine))
24743
24814
  '''
24744
24815
  if isinstance(default_cors_preflight_options, dict):
24745
24816
  default_cors_preflight_options = CorsOptions(**default_cors_preflight_options)
@@ -25565,6 +25636,24 @@ class SpecRestApi(
25565
25636
 
25566
25637
  jsii.create(self.__class__, self, [scope, id, props])
25567
25638
 
25639
+ @jsii.member(jsii_name="addToResourcePolicy")
25640
+ def add_to_resource_policy(
25641
+ self,
25642
+ statement: _PolicyStatement_0fe33853,
25643
+ ) -> _AddToResourcePolicyResult_1d0a53ad:
25644
+ '''Adds a statement to the resource policy associated with this rest api.
25645
+
25646
+ A resource policy will be automatically created upon the first call to ``addToResourcePolicy``.
25647
+
25648
+ Note that this does not work with imported rest api.
25649
+
25650
+ :param statement: The policy statement to add.
25651
+ '''
25652
+ if __debug__:
25653
+ type_hints = typing.get_type_hints(_typecheckingstub__a598fa29dde7454edf374298a15d782fc9a7cfb24aea9c673988425532fdfaa8)
25654
+ check_type(argname="argument statement", value=statement, expected_type=type_hints["statement"])
25655
+ return typing.cast(_AddToResourcePolicyResult_1d0a53ad, jsii.invoke(self, "addToResourcePolicy", [statement]))
25656
+
25568
25657
  @builtins.property
25569
25658
  @jsii.member(jsii_name="restApiId")
25570
25659
  def rest_api_id(self) -> builtins.str:
@@ -31391,7 +31480,7 @@ class RateLimitedApiKeyProps(ApiKeyProps):
31391
31480
  :param generate_distinct_id: Specifies whether the key identifier is distinct from the created API key value. Default: false
31392
31481
  :param resources: (deprecated) A list of resources this api key is associated with. Default: none
31393
31482
  :param stages: A list of Stages this api key is associated with. Default: - the api key is not associated with any stages
31394
- :param api_stages: API Stages to be associated with the RateLimitedApiKey. Default: none
31483
+ :param api_stages: API Stages to be associated with the RateLimitedApiKey. If you already prepared UsagePlan resource explicitly, you should use ``stages`` property. If you prefer to prepare UsagePlan resource implicitly via RateLimitedApiKey, or you should specify throttle settings at each stage individually, you should use ``apiStages`` property. Default: none
31395
31484
  :param quota: Number of requests clients can make in a given time period. Default: none
31396
31485
  :param throttle: Overall throttle settings for the API. Default: none
31397
31486
 
@@ -31404,7 +31493,7 @@ class RateLimitedApiKeyProps(ApiKeyProps):
31404
31493
 
31405
31494
  key = apigateway.RateLimitedApiKey(self, "rate-limited-api-key",
31406
31495
  customer_id="hello-customer",
31407
- stages=[api.deployment_stage],
31496
+ api_stages=[apigateway.UsagePlanPerApiStage(stage=api.deployment_stage)],
31408
31497
  quota=apigateway.QuotaSettings(
31409
31498
  limit=10000,
31410
31499
  period=apigateway.Period.MONTH
@@ -31590,6 +31679,10 @@ class RateLimitedApiKeyProps(ApiKeyProps):
31590
31679
  def api_stages(self) -> typing.Optional[typing.List[UsagePlanPerApiStage]]:
31591
31680
  '''API Stages to be associated with the RateLimitedApiKey.
31592
31681
 
31682
+ If you already prepared UsagePlan resource explicitly, you should use ``stages`` property.
31683
+ If you prefer to prepare UsagePlan resource implicitly via RateLimitedApiKey,
31684
+ or you should specify throttle settings at each stage individually, you should use ``apiStages`` property.
31685
+
31593
31686
  :default: none
31594
31687
  '''
31595
31688
  result = self._values.get("api_stages")
@@ -32115,6 +32208,24 @@ class RestApi(
32115
32208
 
32116
32209
  return typing.cast(RequestValidator, jsii.invoke(self, "addRequestValidator", [id, props]))
32117
32210
 
32211
+ @jsii.member(jsii_name="addToResourcePolicy")
32212
+ def add_to_resource_policy(
32213
+ self,
32214
+ statement: _PolicyStatement_0fe33853,
32215
+ ) -> _AddToResourcePolicyResult_1d0a53ad:
32216
+ '''Adds a statement to the resource policy associated with this rest api.
32217
+
32218
+ A resource policy will be automatically created upon the first call to ``addToResourcePolicy``.
32219
+
32220
+ Note that this does not work with imported rest api.
32221
+
32222
+ :param statement: The policy statement to add.
32223
+ '''
32224
+ if __debug__:
32225
+ type_hints = typing.get_type_hints(_typecheckingstub__52663697f28f1fd364df71313e30a1c7fde152016b3381ce552603f8a5dfc54f)
32226
+ check_type(argname="argument statement", value=statement, expected_type=type_hints["statement"])
32227
+ return typing.cast(_AddToResourcePolicyResult_1d0a53ad, jsii.invoke(self, "addToResourcePolicy", [statement]))
32228
+
32118
32229
  @builtins.property
32119
32230
  @jsii.member(jsii_name="methods")
32120
32231
  def methods(self) -> typing.List[Method]:
@@ -36046,6 +36157,12 @@ def _typecheckingstub__8ee391044c8afeacec6635a772559caff651608cf2a1be322b25e001d
36046
36157
  """Type checking stubs"""
36047
36158
  pass
36048
36159
 
36160
+ def _typecheckingstub__d9c72e763e6fd8bee0fdc38b4c6d9a51728ddb7d71c8f2cc4723eeecc90240d6(
36161
+ vpc_endpoints: typing.Sequence[_IVpcEndpoint_d8ea9bc3],
36162
+ ) -> None:
36163
+ """Type checking stubs"""
36164
+ pass
36165
+
36049
36166
  def _typecheckingstub__83e0007c5bc1aeac14243c8f05dab576ffb55853642cfe1f4a1352b59dda08cf(
36050
36167
  metric_name: builtins.str,
36051
36168
  *,
@@ -36081,6 +36198,18 @@ def _typecheckingstub__7f2c768d74b0b943c1a251d6140ff29b65485077acf73526ebf83da3d
36081
36198
  """Type checking stubs"""
36082
36199
  pass
36083
36200
 
36201
+ def _typecheckingstub__055b7d6b7f5983f0cbe73bf5302adcab621abc6451932928f4fc669ed6ce3182(
36202
+ value: typing.Optional[_PolicyDocument_3ac34393],
36203
+ ) -> None:
36204
+ """Type checking stubs"""
36205
+ pass
36206
+
36207
+ def _typecheckingstub__e5b96ed4eaeba0605aea131fd9bd60ab19b56a3504a62607ee5eff63a4b41ae8(
36208
+ statement: _PolicyStatement_0fe33853,
36209
+ ) -> None:
36210
+ """Type checking stubs"""
36211
+ pass
36212
+
36084
36213
  def _typecheckingstub__f8db41d1cbb038cc89af89c87ca398274183966ac93d18298a50a87996e9aab5(
36085
36214
  *,
36086
36215
  cloud_watch_role: typing.Optional[builtins.bool] = None,
@@ -36186,6 +36315,12 @@ def _typecheckingstub__4722b635be09e87466169ef31b6610061f0fa16d1cff99382f0584fde
36186
36315
  """Type checking stubs"""
36187
36316
  pass
36188
36317
 
36318
+ def _typecheckingstub__a598fa29dde7454edf374298a15d782fc9a7cfb24aea9c673988425532fdfaa8(
36319
+ statement: _PolicyStatement_0fe33853,
36320
+ ) -> None:
36321
+ """Type checking stubs"""
36322
+ pass
36323
+
36189
36324
  def _typecheckingstub__4506705cb637aa3098ad358d76fa29dd7a218f7542020d2e9dbfe8182f9cc797(
36190
36325
  *,
36191
36326
  cloud_watch_role: typing.Optional[builtins.bool] = None,
@@ -36921,6 +37056,12 @@ def _typecheckingstub__c7e66eb05224fabb309270e01184adec5effecc24f4bae236c407a527
36921
37056
  """Type checking stubs"""
36922
37057
  pass
36923
37058
 
37059
+ def _typecheckingstub__52663697f28f1fd364df71313e30a1c7fde152016b3381ce552603f8a5dfc54f(
37060
+ statement: _PolicyStatement_0fe33853,
37061
+ ) -> None:
37062
+ """Type checking stubs"""
37063
+ pass
37064
+
36924
37065
  def _typecheckingstub__d2e28fbc4cf23b8af8415c85c3b3fef473c187c8b6a1d16ed48d739acfa4bbed(
36925
37066
  endpoint: _IEndpoint_58fe201a,
36926
37067
  *,