aws-cdk-lib 2.211.0__py3-none-any.whl → 2.212.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 (46) hide show
  1. aws_cdk/__init__.py +398 -43
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.211.0.jsii.tgz → aws-cdk-lib@2.212.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_apigateway/__init__.py +2 -0
  5. aws_cdk/aws_apigatewayv2/__init__.py +1798 -74
  6. aws_cdk/aws_appintegrations/__init__.py +395 -0
  7. aws_cdk/aws_arcregionswitch/__init__.py +118 -0
  8. aws_cdk/aws_batch/__init__.py +4 -4
  9. aws_cdk/aws_bedrock/__init__.py +18 -0
  10. aws_cdk/aws_billingconductor/__init__.py +3 -3
  11. aws_cdk/aws_cloudfront/__init__.py +19 -0
  12. aws_cdk/aws_codebuild/__init__.py +122 -0
  13. aws_cdk/aws_codepipeline/__init__.py +51 -50
  14. aws_cdk/aws_connect/__init__.py +40 -15
  15. aws_cdk/aws_deadline/__init__.py +16 -5
  16. aws_cdk/aws_dynamodb/__init__.py +86 -16
  17. aws_cdk/aws_ec2/__init__.py +266 -55
  18. aws_cdk/aws_ecs/__init__.py +7 -9
  19. aws_cdk/aws_eks/__init__.py +6 -4
  20. aws_cdk/aws_elasticloadbalancingv2/__init__.py +2 -2
  21. aws_cdk/aws_gameliftstreams/__init__.py +7 -6
  22. aws_cdk/aws_glue/__init__.py +18 -9
  23. aws_cdk/aws_guardduty/__init__.py +1233 -113
  24. aws_cdk/aws_imagebuilder/__init__.py +34 -20
  25. aws_cdk/aws_inspectorv2/__init__.py +1516 -0
  26. aws_cdk/aws_ivs/__init__.py +1 -1
  27. aws_cdk/aws_lakeformation/__init__.py +1 -1
  28. aws_cdk/aws_lambda/__init__.py +6 -6
  29. aws_cdk/aws_omics/__init__.py +1 -1
  30. aws_cdk/aws_opensearchservice/__init__.py +128 -0
  31. aws_cdk/aws_pcs/__init__.py +16 -8
  32. aws_cdk/aws_quicksight/__init__.py +81 -83
  33. aws_cdk/aws_rds/__init__.py +31 -163
  34. aws_cdk/aws_s3express/__init__.py +7 -3
  35. aws_cdk/aws_s3tables/__init__.py +2 -2
  36. aws_cdk/aws_sagemaker/__init__.py +62 -20
  37. aws_cdk/aws_sqs/__init__.py +4 -3
  38. aws_cdk/aws_stepfunctions_tasks/__init__.py +16 -9
  39. aws_cdk/aws_synthetics/__init__.py +116 -0
  40. aws_cdk/cx_api/__init__.py +22 -0
  41. {aws_cdk_lib-2.211.0.dist-info → aws_cdk_lib-2.212.0.dist-info}/METADATA +329 -9
  42. {aws_cdk_lib-2.211.0.dist-info → aws_cdk_lib-2.212.0.dist-info}/RECORD +46 -46
  43. {aws_cdk_lib-2.211.0.dist-info → aws_cdk_lib-2.212.0.dist-info}/LICENSE +0 -0
  44. {aws_cdk_lib-2.211.0.dist-info → aws_cdk_lib-2.212.0.dist-info}/NOTICE +0 -0
  45. {aws_cdk_lib-2.211.0.dist-info → aws_cdk_lib-2.212.0.dist-info}/WHEEL +0 -0
  46. {aws_cdk_lib-2.211.0.dist-info → aws_cdk_lib-2.212.0.dist-info}/top_level.txt +0 -0
@@ -21,6 +21,7 @@ r'''
21
21
 
22
22
  * [Manage Connections Permission](#manage-connections-permission)
23
23
  * [Managing access to WebSocket APIs](#managing-access-to-websocket-apis)
24
+ * [Usage Plan and API Keys](#usage-plan-and-api-keys)
24
25
 
25
26
  ## Introduction
26
27
 
@@ -605,6 +606,155 @@ apigwv2.HttpStage(self, "Stage",
605
606
  detailed_metrics_enabled=True
606
607
  )
607
608
  ```
609
+
610
+ ## Usage Plan and API Keys
611
+
612
+ A usage plan specifies who can access one or more deployed WebSocket API stages, and the rate at which they can be accessed. The plan uses API keys to
613
+ identify API clients and meters access to the associated API stages for each key. Usage plans also allow configuring throttling limits and quota limits that are
614
+ enforced on individual client API keys.
615
+
616
+ The following example shows how to create and associate a usage plan and an API key for WebSocket APIs:
617
+
618
+ ```python
619
+ api_key = apigwv2.ApiKey(self, "ApiKey")
620
+
621
+ usage_plan = apigwv2.UsagePlan(self, "UsagePlan",
622
+ usage_plan_name="WebSocketUsagePlan",
623
+ throttle=apigwv2.ThrottleSettings(
624
+ rate_limit=10,
625
+ burst_limit=2
626
+ )
627
+ )
628
+
629
+ usage_plan.add_api_key(api_key)
630
+ ```
631
+
632
+ To associate a plan to a given WebSocketAPI stage:
633
+
634
+ ```python
635
+ api = apigwv2.WebSocketApi(self, "my-api")
636
+ stage = apigwv2.WebSocketStage(self, "my-stage",
637
+ web_socket_api=api,
638
+ stage_name="dev"
639
+ )
640
+
641
+ usage_plan = apigwv2.UsagePlan(self, "my-usage-plan",
642
+ usage_plan_name="Basic"
643
+ )
644
+
645
+ usage_plan.add_api_stage(
646
+ api=api,
647
+ stage=stage
648
+ )
649
+ ```
650
+
651
+ Existing usage plans can be imported into a CDK app using its id.
652
+
653
+ ```python
654
+ usage_plan = apigwv2.UsagePlan.from_usage_plan_id(self, "imported-usage-plan", "<usage-plan-id>")
655
+ ```
656
+
657
+ The name and value of the API Key can be specified at creation; if not provided, a name and a value will be automatically generated by API Gateway.
658
+
659
+ ```python
660
+ # Auto-generated name and value
661
+ auto_key = apigwv2.ApiKey(self, "AutoKey")
662
+
663
+ # Explicit name and value
664
+ explicit_key = apigwv2.ApiKey(self, "ExplicitKey",
665
+ api_key_name="MyWebSocketApiKey",
666
+ value="MyApiKeyThatIsAtLeast20Characters"
667
+ )
668
+ ```
669
+
670
+ Existing API keys can also be imported into a CDK app using its id.
671
+
672
+ ```python
673
+ imported_key = apigwv2.ApiKey.from_api_key_id(self, "imported-key", "<api-key-id>")
674
+ ```
675
+
676
+ The "grant" methods can be used to give prepackaged sets of permissions to other resources. The
677
+ following code provides read permission to an API key.
678
+
679
+ ```python
680
+ import aws_cdk.aws_iam as iam
681
+
682
+
683
+ user = iam.User(self, "User")
684
+ api_key = apigwv2.ApiKey(self, "ApiKey",
685
+ customer_id="test-customer"
686
+ )
687
+ api_key.grant_read(user)
688
+ ```
689
+
690
+ ### Adding an API Key to an imported WebSocketApi
691
+
692
+ API Keys for WebSocket APIs are associated through Usage Plans, not directly to stages. When you import a WebSocketApi, you need to create a Usage Plan that references the
693
+ imported stage and then associate the API key with that Usage Plan.
694
+
695
+ ```python
696
+ # web_socket_api: apigwv2.IWebSocketApi
697
+
698
+
699
+ imported_stage = apigwv2.WebSocketStage.from_web_socket_stage_attributes(self, "imported-stage",
700
+ stage_name="myStage",
701
+ api=web_socket_api
702
+ )
703
+
704
+ api_key = apigwv2.ApiKey(self, "MyApiKey")
705
+
706
+ usage_plan = apigwv2.UsagePlan(self, "MyUsagePlan",
707
+ api_stages=[apigwv2.UsagePlanPerApiStage(api=web_socket_api, stage=imported_stage)]
708
+ )
709
+
710
+ usage_plan.add_api_key(api_key)
711
+ ```
712
+
713
+ ### Multiple API Keys
714
+
715
+ It is possible to specify multiple API keys for a given Usage Plan, by calling `usagePlan.addApiKey()`.
716
+
717
+ When using multiple API keys, you may need to ensure that the CloudFormation logical ids of the API keys remain consistent across deployments. You can set the logical id as part of the `addApiKey()` method
718
+
719
+ ```python
720
+ # usage_plan: apigwv2.UsagePlan
721
+ # api_key: apigwv2.ApiKey
722
+
723
+
724
+ usage_plan.add_api_key(api_key,
725
+ override_logical_id="MyCustomLogicalId"
726
+ )
727
+ ```
728
+
729
+ ### Rate Limited API Key
730
+
731
+ In scenarios where you need to create a single api key and configure rate limiting for it, you can use `RateLimitedApiKey`.
732
+ This construct lets you specify rate limiting properties which should be applied only to the api key being created.
733
+ The API key created has the specified rate limits, such as quota and throttles, applied.
734
+
735
+ The following example shows how to use a rate limited api key :
736
+
737
+ ```python
738
+ # api: apigwv2.WebSocketApi
739
+ # stage: apigwv2.WebSocketStage
740
+
741
+
742
+ key = apigwv2.RateLimitedApiKey(self, "rate-limited-api-key",
743
+ customer_id="test-customer",
744
+ api_stages=[apigwv2.UsagePlanPerApiStage(
745
+ api=api,
746
+ stage=stage
747
+ )],
748
+ quota=apigwv2.QuotaSettings(
749
+ limit=10000,
750
+ period=apigwv2.Period.MONTH
751
+ ),
752
+ throttle=apigwv2.ThrottleSettings(
753
+ rate_limit=100,
754
+ burst_limit=200
755
+ )
756
+ )
757
+ ```
608
758
  '''
609
759
  from pkgutil import extend_path
610
760
  __path__ = extend_path(__path__, __name__)
@@ -721,6 +871,309 @@ class AccessLogDestinationConfig:
721
871
  )
722
872
 
723
873
 
874
+ @jsii.data_type(
875
+ jsii_type="aws-cdk-lib.aws_apigatewayv2.AddApiKeyOptions",
876
+ jsii_struct_bases=[],
877
+ name_mapping={"override_logical_id": "overrideLogicalId"},
878
+ )
879
+ class AddApiKeyOptions:
880
+ def __init__(
881
+ self,
882
+ *,
883
+ override_logical_id: typing.Optional[builtins.str] = None,
884
+ ) -> None:
885
+ '''Options to the UsagePlan.addApiKey() method.
886
+
887
+ :param override_logical_id: Override the CloudFormation logical id of the AWS::ApiGateway::UsagePlanKey resource. Default: - autogenerated by the CDK
888
+
889
+ :exampleMetadata: infused
890
+
891
+ Example::
892
+
893
+ # usage_plan: apigwv2.UsagePlan
894
+ # api_key: apigwv2.ApiKey
895
+
896
+
897
+ usage_plan.add_api_key(api_key,
898
+ override_logical_id="MyCustomLogicalId"
899
+ )
900
+ '''
901
+ if __debug__:
902
+ type_hints = typing.get_type_hints(_typecheckingstub__0941f7d28f81063a43bd13461ff2c77b07dbc27ccb33f1747ba86e63cb135cfa)
903
+ check_type(argname="argument override_logical_id", value=override_logical_id, expected_type=type_hints["override_logical_id"])
904
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
905
+ if override_logical_id is not None:
906
+ self._values["override_logical_id"] = override_logical_id
907
+
908
+ @builtins.property
909
+ def override_logical_id(self) -> typing.Optional[builtins.str]:
910
+ '''Override the CloudFormation logical id of the AWS::ApiGateway::UsagePlanKey resource.
911
+
912
+ :default: - autogenerated by the CDK
913
+ '''
914
+ result = self._values.get("override_logical_id")
915
+ return typing.cast(typing.Optional[builtins.str], result)
916
+
917
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
918
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
919
+
920
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
921
+ return not (rhs == self)
922
+
923
+ def __repr__(self) -> str:
924
+ return "AddApiKeyOptions(%s)" % ", ".join(
925
+ k + "=" + repr(v) for k, v in self._values.items()
926
+ )
927
+
928
+
929
+ @jsii.data_type(
930
+ jsii_type="aws-cdk-lib.aws_apigatewayv2.ApiKeyOptions",
931
+ jsii_struct_bases=[],
932
+ name_mapping={
933
+ "api_key_name": "apiKeyName",
934
+ "description": "description",
935
+ "value": "value",
936
+ },
937
+ )
938
+ class ApiKeyOptions:
939
+ def __init__(
940
+ self,
941
+ *,
942
+ api_key_name: typing.Optional[builtins.str] = None,
943
+ description: typing.Optional[builtins.str] = None,
944
+ value: typing.Optional[builtins.str] = None,
945
+ ) -> None:
946
+ '''The options for creating an API Key.
947
+
948
+ :param api_key_name: A name for the API key. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name. Default: automatically generated name
949
+ :param description: A description of the purpose of the API key. Default: none
950
+ :param value: The value of the API key. Must be at least 20 characters long. Default: none
951
+
952
+ :exampleMetadata: fixture=_generated
953
+
954
+ Example::
955
+
956
+ # The code below shows an example of how to instantiate this type.
957
+ # The values are placeholders you should change.
958
+ from aws_cdk import aws_apigatewayv2 as apigatewayv2
959
+
960
+ api_key_options = apigatewayv2.ApiKeyOptions(
961
+ api_key_name="apiKeyName",
962
+ description="description",
963
+ value="value"
964
+ )
965
+ '''
966
+ if __debug__:
967
+ type_hints = typing.get_type_hints(_typecheckingstub__7a705f0b737f132294a153b02c31b4d08ac0e91a2d1357048ce93fa1d3dcc0aa)
968
+ check_type(argname="argument api_key_name", value=api_key_name, expected_type=type_hints["api_key_name"])
969
+ check_type(argname="argument description", value=description, expected_type=type_hints["description"])
970
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
971
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
972
+ if api_key_name is not None:
973
+ self._values["api_key_name"] = api_key_name
974
+ if description is not None:
975
+ self._values["description"] = description
976
+ if value is not None:
977
+ self._values["value"] = value
978
+
979
+ @builtins.property
980
+ def api_key_name(self) -> typing.Optional[builtins.str]:
981
+ '''A name for the API key.
982
+
983
+ If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.
984
+
985
+ :default: automatically generated name
986
+
987
+ :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-name
988
+ '''
989
+ result = self._values.get("api_key_name")
990
+ return typing.cast(typing.Optional[builtins.str], result)
991
+
992
+ @builtins.property
993
+ def description(self) -> typing.Optional[builtins.str]:
994
+ '''A description of the purpose of the API key.
995
+
996
+ :default: none
997
+
998
+ :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-description
999
+ '''
1000
+ result = self._values.get("description")
1001
+ return typing.cast(typing.Optional[builtins.str], result)
1002
+
1003
+ @builtins.property
1004
+ def value(self) -> typing.Optional[builtins.str]:
1005
+ '''The value of the API key.
1006
+
1007
+ Must be at least 20 characters long.
1008
+
1009
+ :default: none
1010
+
1011
+ :link: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-value
1012
+ '''
1013
+ result = self._values.get("value")
1014
+ return typing.cast(typing.Optional[builtins.str], result)
1015
+
1016
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1017
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1018
+
1019
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1020
+ return not (rhs == self)
1021
+
1022
+ def __repr__(self) -> str:
1023
+ return "ApiKeyOptions(%s)" % ", ".join(
1024
+ k + "=" + repr(v) for k, v in self._values.items()
1025
+ )
1026
+
1027
+
1028
+ @jsii.data_type(
1029
+ jsii_type="aws-cdk-lib.aws_apigatewayv2.ApiKeyProps",
1030
+ jsii_struct_bases=[ApiKeyOptions],
1031
+ name_mapping={
1032
+ "api_key_name": "apiKeyName",
1033
+ "description": "description",
1034
+ "value": "value",
1035
+ "customer_id": "customerId",
1036
+ "enabled": "enabled",
1037
+ "generate_distinct_id": "generateDistinctId",
1038
+ },
1039
+ )
1040
+ class ApiKeyProps(ApiKeyOptions):
1041
+ def __init__(
1042
+ self,
1043
+ *,
1044
+ api_key_name: typing.Optional[builtins.str] = None,
1045
+ description: typing.Optional[builtins.str] = None,
1046
+ value: typing.Optional[builtins.str] = None,
1047
+ customer_id: typing.Optional[builtins.str] = None,
1048
+ enabled: typing.Optional[builtins.bool] = None,
1049
+ generate_distinct_id: typing.Optional[builtins.bool] = None,
1050
+ ) -> None:
1051
+ '''ApiKey Properties.
1052
+
1053
+ :param api_key_name: A name for the API key. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name. Default: automatically generated name
1054
+ :param description: A description of the purpose of the API key. Default: none
1055
+ :param value: The value of the API key. Must be at least 20 characters long. Default: none
1056
+ :param customer_id: An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace. Default: none
1057
+ :param enabled: Indicates whether the API key can be used by clients. Default: true
1058
+ :param generate_distinct_id: Specifies whether the key identifier is distinct from the created API key value. Default: false
1059
+
1060
+ :exampleMetadata: infused
1061
+
1062
+ Example::
1063
+
1064
+ # Auto-generated name and value
1065
+ auto_key = apigwv2.ApiKey(self, "AutoKey")
1066
+
1067
+ # Explicit name and value
1068
+ explicit_key = apigwv2.ApiKey(self, "ExplicitKey",
1069
+ api_key_name="MyWebSocketApiKey",
1070
+ value="MyApiKeyThatIsAtLeast20Characters"
1071
+ )
1072
+ '''
1073
+ if __debug__:
1074
+ type_hints = typing.get_type_hints(_typecheckingstub__8f84fc0c61e7fd558c82b45bbc4bcd6801e5a01a36339712c0577607b261c786)
1075
+ check_type(argname="argument api_key_name", value=api_key_name, expected_type=type_hints["api_key_name"])
1076
+ check_type(argname="argument description", value=description, expected_type=type_hints["description"])
1077
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
1078
+ check_type(argname="argument customer_id", value=customer_id, expected_type=type_hints["customer_id"])
1079
+ check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
1080
+ check_type(argname="argument generate_distinct_id", value=generate_distinct_id, expected_type=type_hints["generate_distinct_id"])
1081
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
1082
+ if api_key_name is not None:
1083
+ self._values["api_key_name"] = api_key_name
1084
+ if description is not None:
1085
+ self._values["description"] = description
1086
+ if value is not None:
1087
+ self._values["value"] = value
1088
+ if customer_id is not None:
1089
+ self._values["customer_id"] = customer_id
1090
+ if enabled is not None:
1091
+ self._values["enabled"] = enabled
1092
+ if generate_distinct_id is not None:
1093
+ self._values["generate_distinct_id"] = generate_distinct_id
1094
+
1095
+ @builtins.property
1096
+ def api_key_name(self) -> typing.Optional[builtins.str]:
1097
+ '''A name for the API key.
1098
+
1099
+ If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.
1100
+
1101
+ :default: automatically generated name
1102
+
1103
+ :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-name
1104
+ '''
1105
+ result = self._values.get("api_key_name")
1106
+ return typing.cast(typing.Optional[builtins.str], result)
1107
+
1108
+ @builtins.property
1109
+ def description(self) -> typing.Optional[builtins.str]:
1110
+ '''A description of the purpose of the API key.
1111
+
1112
+ :default: none
1113
+
1114
+ :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-description
1115
+ '''
1116
+ result = self._values.get("description")
1117
+ return typing.cast(typing.Optional[builtins.str], result)
1118
+
1119
+ @builtins.property
1120
+ def value(self) -> typing.Optional[builtins.str]:
1121
+ '''The value of the API key.
1122
+
1123
+ Must be at least 20 characters long.
1124
+
1125
+ :default: none
1126
+
1127
+ :link: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-value
1128
+ '''
1129
+ result = self._values.get("value")
1130
+ return typing.cast(typing.Optional[builtins.str], result)
1131
+
1132
+ @builtins.property
1133
+ def customer_id(self) -> typing.Optional[builtins.str]:
1134
+ '''An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
1135
+
1136
+ :default: none
1137
+
1138
+ :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-customerid
1139
+ '''
1140
+ result = self._values.get("customer_id")
1141
+ return typing.cast(typing.Optional[builtins.str], result)
1142
+
1143
+ @builtins.property
1144
+ def enabled(self) -> typing.Optional[builtins.bool]:
1145
+ '''Indicates whether the API key can be used by clients.
1146
+
1147
+ :default: true
1148
+
1149
+ :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-enabled
1150
+ '''
1151
+ result = self._values.get("enabled")
1152
+ return typing.cast(typing.Optional[builtins.bool], result)
1153
+
1154
+ @builtins.property
1155
+ def generate_distinct_id(self) -> typing.Optional[builtins.bool]:
1156
+ '''Specifies whether the key identifier is distinct from the created API key value.
1157
+
1158
+ :default: false
1159
+
1160
+ :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-generatedistinctid
1161
+ '''
1162
+ result = self._values.get("generate_distinct_id")
1163
+ return typing.cast(typing.Optional[builtins.bool], result)
1164
+
1165
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1166
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1167
+
1168
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1169
+ return not (rhs == self)
1170
+
1171
+ def __repr__(self) -> str:
1172
+ return "ApiKeyProps(%s)" % ", ".join(
1173
+ k + "=" + repr(v) for k, v in self._values.items()
1174
+ )
1175
+
1176
+
724
1177
  @jsii.data_type(
725
1178
  jsii_type="aws-cdk-lib.aws_apigatewayv2.ApiMappingAttributes",
726
1179
  jsii_struct_bases=[],
@@ -11926,6 +12379,58 @@ class _IApiProxy(
11926
12379
  typing.cast(typing.Any, IApi).__jsii_proxy_class__ = lambda : _IApiProxy
11927
12380
 
11928
12381
 
12382
+ @jsii.interface(jsii_type="aws-cdk-lib.aws_apigatewayv2.IApiKey")
12383
+ class IApiKey(_IResource_c80c4260, typing_extensions.Protocol):
12384
+ '''API keys are alphanumeric string values that you distribute to app developer customers to grant access to your API.'''
12385
+
12386
+ @builtins.property
12387
+ @jsii.member(jsii_name="keyArn")
12388
+ def key_arn(self) -> builtins.str:
12389
+ '''The API key ARN.
12390
+
12391
+ :attribute: true
12392
+ '''
12393
+ ...
12394
+
12395
+ @builtins.property
12396
+ @jsii.member(jsii_name="keyId")
12397
+ def key_id(self) -> builtins.str:
12398
+ '''The API key ID.
12399
+
12400
+ :attribute: true
12401
+ '''
12402
+ ...
12403
+
12404
+
12405
+ class _IApiKeyProxy(
12406
+ jsii.proxy_for(_IResource_c80c4260), # type: ignore[misc]
12407
+ ):
12408
+ '''API keys are alphanumeric string values that you distribute to app developer customers to grant access to your API.'''
12409
+
12410
+ __jsii_type__: typing.ClassVar[str] = "aws-cdk-lib.aws_apigatewayv2.IApiKey"
12411
+
12412
+ @builtins.property
12413
+ @jsii.member(jsii_name="keyArn")
12414
+ def key_arn(self) -> builtins.str:
12415
+ '''The API key ARN.
12416
+
12417
+ :attribute: true
12418
+ '''
12419
+ return typing.cast(builtins.str, jsii.get(self, "keyArn"))
12420
+
12421
+ @builtins.property
12422
+ @jsii.member(jsii_name="keyId")
12423
+ def key_id(self) -> builtins.str:
12424
+ '''The API key ID.
12425
+
12426
+ :attribute: true
12427
+ '''
12428
+ return typing.cast(builtins.str, jsii.get(self, "keyId"))
12429
+
12430
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
12431
+ typing.cast(typing.Any, IApiKey).__jsii_proxy_class__ = lambda : _IApiKeyProxy
12432
+
12433
+
11929
12434
  @jsii.interface(jsii_type="aws-cdk-lib.aws_apigatewayv2.IApiMapping")
11930
12435
  class IApiMapping(_IResource_c80c4260, typing_extensions.Protocol):
11931
12436
  '''Represents an ApiGatewayV2 ApiMapping resource.
@@ -13107,10 +13612,77 @@ class _IStageProxy(
13107
13612
  visible=visible,
13108
13613
  )
13109
13614
 
13110
- return typing.cast(_Metric_e396a4dc, jsii.invoke(self, "metric", [metric_name, props]))
13615
+ return typing.cast(_Metric_e396a4dc, jsii.invoke(self, "metric", [metric_name, props]))
13616
+
13617
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
13618
+ typing.cast(typing.Any, IStage).__jsii_proxy_class__ = lambda : _IStageProxy
13619
+
13620
+
13621
+ @jsii.interface(jsii_type="aws-cdk-lib.aws_apigatewayv2.IUsagePlan")
13622
+ class IUsagePlan(_IResource_c80c4260, typing_extensions.Protocol):
13623
+ '''A UsagePlan, either managed by this CDK app, or imported.'''
13624
+
13625
+ @builtins.property
13626
+ @jsii.member(jsii_name="usagePlanId")
13627
+ def usage_plan_id(self) -> builtins.str:
13628
+ '''Id of the usage plan.
13629
+
13630
+ :attribute: true
13631
+ '''
13632
+ ...
13633
+
13634
+ @jsii.member(jsii_name="addApiKey")
13635
+ def add_api_key(
13636
+ self,
13637
+ api_key: IApiKey,
13638
+ *,
13639
+ override_logical_id: typing.Optional[builtins.str] = None,
13640
+ ) -> None:
13641
+ '''Adds an ApiKey.
13642
+
13643
+ :param api_key: the api key to associate with this usage plan.
13644
+ :param override_logical_id: Override the CloudFormation logical id of the AWS::ApiGateway::UsagePlanKey resource. Default: - autogenerated by the CDK
13645
+ '''
13646
+ ...
13647
+
13648
+
13649
+ class _IUsagePlanProxy(
13650
+ jsii.proxy_for(_IResource_c80c4260), # type: ignore[misc]
13651
+ ):
13652
+ '''A UsagePlan, either managed by this CDK app, or imported.'''
13653
+
13654
+ __jsii_type__: typing.ClassVar[str] = "aws-cdk-lib.aws_apigatewayv2.IUsagePlan"
13655
+
13656
+ @builtins.property
13657
+ @jsii.member(jsii_name="usagePlanId")
13658
+ def usage_plan_id(self) -> builtins.str:
13659
+ '''Id of the usage plan.
13660
+
13661
+ :attribute: true
13662
+ '''
13663
+ return typing.cast(builtins.str, jsii.get(self, "usagePlanId"))
13664
+
13665
+ @jsii.member(jsii_name="addApiKey")
13666
+ def add_api_key(
13667
+ self,
13668
+ api_key: IApiKey,
13669
+ *,
13670
+ override_logical_id: typing.Optional[builtins.str] = None,
13671
+ ) -> None:
13672
+ '''Adds an ApiKey.
13673
+
13674
+ :param api_key: the api key to associate with this usage plan.
13675
+ :param override_logical_id: Override the CloudFormation logical id of the AWS::ApiGateway::UsagePlanKey resource. Default: - autogenerated by the CDK
13676
+ '''
13677
+ if __debug__:
13678
+ type_hints = typing.get_type_hints(_typecheckingstub__4feb0fa4d2b3aa6f0e443abfac19ee78cf632f1573ba5c6ccfa6fb8619018bcb)
13679
+ check_type(argname="argument api_key", value=api_key, expected_type=type_hints["api_key"])
13680
+ options = AddApiKeyOptions(override_logical_id=override_logical_id)
13681
+
13682
+ return typing.cast(None, jsii.invoke(self, "addApiKey", [api_key, options]))
13111
13683
 
13112
13684
  # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
13113
- typing.cast(typing.Any, IStage).__jsii_proxy_class__ = lambda : _IStageProxy
13685
+ typing.cast(typing.Any, IUsagePlan).__jsii_proxy_class__ = lambda : _IUsagePlanProxy
13114
13686
 
13115
13687
 
13116
13688
  @jsii.interface(jsii_type="aws-cdk-lib.aws_apigatewayv2.IVpcLink")
@@ -13925,32 +14497,505 @@ class PayloadFormatVersion(
13925
14497
  def custom(cls, version: builtins.str) -> "PayloadFormatVersion":
13926
14498
  '''A custom payload version.
13927
14499
 
13928
- Typically used if there is a version number that the CDK doesn't support yet
14500
+ Typically used if there is a version number that the CDK doesn't support yet
14501
+
14502
+ :param version: -
14503
+ '''
14504
+ if __debug__:
14505
+ type_hints = typing.get_type_hints(_typecheckingstub__a53d9648a03276b93776e272dffc7b5b30a9504625fd8b3e8e2c463dff76f46e)
14506
+ check_type(argname="argument version", value=version, expected_type=type_hints["version"])
14507
+ return typing.cast("PayloadFormatVersion", jsii.sinvoke(cls, "custom", [version]))
14508
+
14509
+ @jsii.python.classproperty
14510
+ @jsii.member(jsii_name="VERSION_1_0")
14511
+ def VERSION_1_0(cls) -> "PayloadFormatVersion":
14512
+ '''Version 1.0.'''
14513
+ return typing.cast("PayloadFormatVersion", jsii.sget(cls, "VERSION_1_0"))
14514
+
14515
+ @jsii.python.classproperty
14516
+ @jsii.member(jsii_name="VERSION_2_0")
14517
+ def VERSION_2_0(cls) -> "PayloadFormatVersion":
14518
+ '''Version 2.0.'''
14519
+ return typing.cast("PayloadFormatVersion", jsii.sget(cls, "VERSION_2_0"))
14520
+
14521
+ @builtins.property
14522
+ @jsii.member(jsii_name="version")
14523
+ def version(self) -> builtins.str:
14524
+ '''version as a string.'''
14525
+ return typing.cast(builtins.str, jsii.get(self, "version"))
14526
+
14527
+
14528
+ @jsii.enum(jsii_type="aws-cdk-lib.aws_apigatewayv2.Period")
14529
+ class Period(enum.Enum):
14530
+ '''Time period for which quota settings apply.
14531
+
14532
+ :exampleMetadata: infused
14533
+
14534
+ Example::
14535
+
14536
+ # api: apigwv2.WebSocketApi
14537
+ # stage: apigwv2.WebSocketStage
14538
+
14539
+
14540
+ key = apigwv2.RateLimitedApiKey(self, "rate-limited-api-key",
14541
+ customer_id="test-customer",
14542
+ api_stages=[apigwv2.UsagePlanPerApiStage(
14543
+ api=api,
14544
+ stage=stage
14545
+ )],
14546
+ quota=apigwv2.QuotaSettings(
14547
+ limit=10000,
14548
+ period=apigwv2.Period.MONTH
14549
+ ),
14550
+ throttle=apigwv2.ThrottleSettings(
14551
+ rate_limit=100,
14552
+ burst_limit=200
14553
+ )
14554
+ )
14555
+ '''
14556
+
14557
+ DAY = "DAY"
14558
+ '''The quota resets every day.'''
14559
+ WEEK = "WEEK"
14560
+ '''The quota resets every week.'''
14561
+ MONTH = "MONTH"
14562
+ '''The quota resets every month.'''
14563
+
14564
+
14565
+ @jsii.data_type(
14566
+ jsii_type="aws-cdk-lib.aws_apigatewayv2.QuotaSettings",
14567
+ jsii_struct_bases=[],
14568
+ name_mapping={"limit": "limit", "offset": "offset", "period": "period"},
14569
+ )
14570
+ class QuotaSettings:
14571
+ def __init__(
14572
+ self,
14573
+ *,
14574
+ limit: typing.Optional[jsii.Number] = None,
14575
+ offset: typing.Optional[jsii.Number] = None,
14576
+ period: typing.Optional[Period] = None,
14577
+ ) -> None:
14578
+ '''Specifies the maximum number of requests that clients can make to API Gateway APIs.
14579
+
14580
+ :param limit: The maximum number of requests that users can make within the specified time period. Default: none
14581
+ :param offset: For the initial time period, the number of requests to subtract from the specified limit. Default: none
14582
+ :param period: The time period for which the maximum limit of requests applies. Default: none
14583
+
14584
+ :exampleMetadata: infused
14585
+
14586
+ Example::
14587
+
14588
+ # api: apigwv2.WebSocketApi
14589
+ # stage: apigwv2.WebSocketStage
14590
+
14591
+
14592
+ key = apigwv2.RateLimitedApiKey(self, "rate-limited-api-key",
14593
+ customer_id="test-customer",
14594
+ api_stages=[apigwv2.UsagePlanPerApiStage(
14595
+ api=api,
14596
+ stage=stage
14597
+ )],
14598
+ quota=apigwv2.QuotaSettings(
14599
+ limit=10000,
14600
+ period=apigwv2.Period.MONTH
14601
+ ),
14602
+ throttle=apigwv2.ThrottleSettings(
14603
+ rate_limit=100,
14604
+ burst_limit=200
14605
+ )
14606
+ )
14607
+ '''
14608
+ if __debug__:
14609
+ type_hints = typing.get_type_hints(_typecheckingstub__389f76c9bffb156f327520f7fb1eb3786b6c053de75cac1df18d9cac22ff10e6)
14610
+ check_type(argname="argument limit", value=limit, expected_type=type_hints["limit"])
14611
+ check_type(argname="argument offset", value=offset, expected_type=type_hints["offset"])
14612
+ check_type(argname="argument period", value=period, expected_type=type_hints["period"])
14613
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
14614
+ if limit is not None:
14615
+ self._values["limit"] = limit
14616
+ if offset is not None:
14617
+ self._values["offset"] = offset
14618
+ if period is not None:
14619
+ self._values["period"] = period
14620
+
14621
+ @builtins.property
14622
+ def limit(self) -> typing.Optional[jsii.Number]:
14623
+ '''The maximum number of requests that users can make within the specified time period.
14624
+
14625
+ :default: none
14626
+ '''
14627
+ result = self._values.get("limit")
14628
+ return typing.cast(typing.Optional[jsii.Number], result)
14629
+
14630
+ @builtins.property
14631
+ def offset(self) -> typing.Optional[jsii.Number]:
14632
+ '''For the initial time period, the number of requests to subtract from the specified limit.
14633
+
14634
+ :default: none
14635
+ '''
14636
+ result = self._values.get("offset")
14637
+ return typing.cast(typing.Optional[jsii.Number], result)
14638
+
14639
+ @builtins.property
14640
+ def period(self) -> typing.Optional[Period]:
14641
+ '''The time period for which the maximum limit of requests applies.
14642
+
14643
+ :default: none
14644
+ '''
14645
+ result = self._values.get("period")
14646
+ return typing.cast(typing.Optional[Period], result)
14647
+
14648
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
14649
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
14650
+
14651
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
14652
+ return not (rhs == self)
14653
+
14654
+ def __repr__(self) -> str:
14655
+ return "QuotaSettings(%s)" % ", ".join(
14656
+ k + "=" + repr(v) for k, v in self._values.items()
14657
+ )
14658
+
14659
+
14660
+ @jsii.implements(IApiKey)
14661
+ class RateLimitedApiKey(
14662
+ _Resource_45bc6135,
14663
+ metaclass=jsii.JSIIMeta,
14664
+ jsii_type="aws-cdk-lib.aws_apigatewayv2.RateLimitedApiKey",
14665
+ ):
14666
+ '''An API Gateway ApiKey, for which a rate limiting configuration can be specified.
14667
+
14668
+ :resource: AWS::ApiGateway::ApiKey
14669
+ :exampleMetadata: infused
14670
+
14671
+ Example::
14672
+
14673
+ # api: apigwv2.WebSocketApi
14674
+ # stage: apigwv2.WebSocketStage
14675
+
14676
+
14677
+ key = apigwv2.RateLimitedApiKey(self, "rate-limited-api-key",
14678
+ customer_id="test-customer",
14679
+ api_stages=[apigwv2.UsagePlanPerApiStage(
14680
+ api=api,
14681
+ stage=stage
14682
+ )],
14683
+ quota=apigwv2.QuotaSettings(
14684
+ limit=10000,
14685
+ period=apigwv2.Period.MONTH
14686
+ ),
14687
+ throttle=apigwv2.ThrottleSettings(
14688
+ rate_limit=100,
14689
+ burst_limit=200
14690
+ )
14691
+ )
14692
+ '''
14693
+
14694
+ def __init__(
14695
+ self,
14696
+ scope: _constructs_77d1e7e8.Construct,
14697
+ id: builtins.str,
14698
+ *,
14699
+ api_stages: typing.Optional[typing.Sequence[typing.Union["UsagePlanPerApiStage", typing.Dict[builtins.str, typing.Any]]]] = None,
14700
+ quota: typing.Optional[typing.Union[QuotaSettings, typing.Dict[builtins.str, typing.Any]]] = None,
14701
+ throttle: typing.Optional[typing.Union["ThrottleSettings", typing.Dict[builtins.str, typing.Any]]] = None,
14702
+ customer_id: typing.Optional[builtins.str] = None,
14703
+ enabled: typing.Optional[builtins.bool] = None,
14704
+ generate_distinct_id: typing.Optional[builtins.bool] = None,
14705
+ api_key_name: typing.Optional[builtins.str] = None,
14706
+ description: typing.Optional[builtins.str] = None,
14707
+ value: typing.Optional[builtins.str] = None,
14708
+ ) -> None:
14709
+ '''
14710
+ :param scope: -
14711
+ :param id: -
14712
+ :param api_stages: API Stages to be associated with the RateLimitedApiKey. Default: none
14713
+ :param quota: Number of requests clients can make in a given time period. Default: none
14714
+ :param throttle: Overall throttle settings for the API. Default: none
14715
+ :param customer_id: An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace. Default: none
14716
+ :param enabled: Indicates whether the API key can be used by clients. Default: true
14717
+ :param generate_distinct_id: Specifies whether the key identifier is distinct from the created API key value. Default: false
14718
+ :param api_key_name: A name for the API key. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name. Default: automatically generated name
14719
+ :param description: A description of the purpose of the API key. Default: none
14720
+ :param value: The value of the API key. Must be at least 20 characters long. Default: none
14721
+ '''
14722
+ if __debug__:
14723
+ type_hints = typing.get_type_hints(_typecheckingstub__572a1cdbe73f523ab11fbfefb643d76b815fde625cf2ad61720c812e98d9dfe3)
14724
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
14725
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
14726
+ props = RateLimitedApiKeyProps(
14727
+ api_stages=api_stages,
14728
+ quota=quota,
14729
+ throttle=throttle,
14730
+ customer_id=customer_id,
14731
+ enabled=enabled,
14732
+ generate_distinct_id=generate_distinct_id,
14733
+ api_key_name=api_key_name,
14734
+ description=description,
14735
+ value=value,
14736
+ )
14737
+
14738
+ jsii.create(self.__class__, self, [scope, id, props])
14739
+
14740
+ @jsii.member(jsii_name="grantRead")
14741
+ def grant_read(self, grantee: _IGrantable_71c4f5de) -> _Grant_a7ae64f8:
14742
+ '''Permits the IAM principal all read operations through this key.
14743
+
14744
+ :param grantee: The principal to grant access to.
14745
+ '''
14746
+ if __debug__:
14747
+ type_hints = typing.get_type_hints(_typecheckingstub__28c60e4a8e61709e5f61997104043903178afb5475d6f9b2228b53f119383675)
14748
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
14749
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantRead", [grantee]))
14750
+
14751
+ @jsii.member(jsii_name="grantReadWrite")
14752
+ def grant_read_write(self, grantee: _IGrantable_71c4f5de) -> _Grant_a7ae64f8:
14753
+ '''Permits the IAM principal all read and write operations through this key.
14754
+
14755
+ :param grantee: The principal to grant access to.
14756
+ '''
14757
+ if __debug__:
14758
+ type_hints = typing.get_type_hints(_typecheckingstub__5c816a8984b9edeedfec843ede15881183785d76c9b0dadcd9c8d226383c7277)
14759
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
14760
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantReadWrite", [grantee]))
14761
+
14762
+ @jsii.member(jsii_name="grantWrite")
14763
+ def grant_write(self, grantee: _IGrantable_71c4f5de) -> _Grant_a7ae64f8:
14764
+ '''Permits the IAM principal all write operations through this key.
14765
+
14766
+ :param grantee: The principal to grant access to.
14767
+ '''
14768
+ if __debug__:
14769
+ type_hints = typing.get_type_hints(_typecheckingstub__2ff79bd17198356348211d47ed321f48be3c130579981227c653a29c050fc0dd)
14770
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
14771
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantWrite", [grantee]))
14772
+
14773
+ @jsii.python.classproperty
14774
+ @jsii.member(jsii_name="PROPERTY_INJECTION_ID")
14775
+ def PROPERTY_INJECTION_ID(cls) -> builtins.str:
14776
+ '''Uniquely identifies this class.'''
14777
+ return typing.cast(builtins.str, jsii.sget(cls, "PROPERTY_INJECTION_ID"))
14778
+
14779
+ @builtins.property
14780
+ @jsii.member(jsii_name="keyArn")
14781
+ def key_arn(self) -> builtins.str:
14782
+ '''The API key ARN.'''
14783
+ return typing.cast(builtins.str, jsii.get(self, "keyArn"))
14784
+
14785
+ @builtins.property
14786
+ @jsii.member(jsii_name="keyId")
14787
+ def key_id(self) -> builtins.str:
14788
+ '''The API key ID.'''
14789
+ return typing.cast(builtins.str, jsii.get(self, "keyId"))
14790
+
14791
+
14792
+ @jsii.data_type(
14793
+ jsii_type="aws-cdk-lib.aws_apigatewayv2.RateLimitedApiKeyProps",
14794
+ jsii_struct_bases=[ApiKeyProps],
14795
+ name_mapping={
14796
+ "api_key_name": "apiKeyName",
14797
+ "description": "description",
14798
+ "value": "value",
14799
+ "customer_id": "customerId",
14800
+ "enabled": "enabled",
14801
+ "generate_distinct_id": "generateDistinctId",
14802
+ "api_stages": "apiStages",
14803
+ "quota": "quota",
14804
+ "throttle": "throttle",
14805
+ },
14806
+ )
14807
+ class RateLimitedApiKeyProps(ApiKeyProps):
14808
+ def __init__(
14809
+ self,
14810
+ *,
14811
+ api_key_name: typing.Optional[builtins.str] = None,
14812
+ description: typing.Optional[builtins.str] = None,
14813
+ value: typing.Optional[builtins.str] = None,
14814
+ customer_id: typing.Optional[builtins.str] = None,
14815
+ enabled: typing.Optional[builtins.bool] = None,
14816
+ generate_distinct_id: typing.Optional[builtins.bool] = None,
14817
+ api_stages: typing.Optional[typing.Sequence[typing.Union["UsagePlanPerApiStage", typing.Dict[builtins.str, typing.Any]]]] = None,
14818
+ quota: typing.Optional[typing.Union[QuotaSettings, typing.Dict[builtins.str, typing.Any]]] = None,
14819
+ throttle: typing.Optional[typing.Union["ThrottleSettings", typing.Dict[builtins.str, typing.Any]]] = None,
14820
+ ) -> None:
14821
+ '''RateLimitedApiKey properties.
14822
+
14823
+ :param api_key_name: A name for the API key. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name. Default: automatically generated name
14824
+ :param description: A description of the purpose of the API key. Default: none
14825
+ :param value: The value of the API key. Must be at least 20 characters long. Default: none
14826
+ :param customer_id: An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace. Default: none
14827
+ :param enabled: Indicates whether the API key can be used by clients. Default: true
14828
+ :param generate_distinct_id: Specifies whether the key identifier is distinct from the created API key value. Default: false
14829
+ :param api_stages: API Stages to be associated with the RateLimitedApiKey. Default: none
14830
+ :param quota: Number of requests clients can make in a given time period. Default: none
14831
+ :param throttle: Overall throttle settings for the API. Default: none
14832
+
14833
+ :exampleMetadata: infused
14834
+
14835
+ Example::
14836
+
14837
+ # api: apigwv2.WebSocketApi
14838
+ # stage: apigwv2.WebSocketStage
14839
+
14840
+
14841
+ key = apigwv2.RateLimitedApiKey(self, "rate-limited-api-key",
14842
+ customer_id="test-customer",
14843
+ api_stages=[apigwv2.UsagePlanPerApiStage(
14844
+ api=api,
14845
+ stage=stage
14846
+ )],
14847
+ quota=apigwv2.QuotaSettings(
14848
+ limit=10000,
14849
+ period=apigwv2.Period.MONTH
14850
+ ),
14851
+ throttle=apigwv2.ThrottleSettings(
14852
+ rate_limit=100,
14853
+ burst_limit=200
14854
+ )
14855
+ )
14856
+ '''
14857
+ if isinstance(quota, dict):
14858
+ quota = QuotaSettings(**quota)
14859
+ if isinstance(throttle, dict):
14860
+ throttle = ThrottleSettings(**throttle)
14861
+ if __debug__:
14862
+ type_hints = typing.get_type_hints(_typecheckingstub__6e548d95c67601d1846a7247a02ee697fc027c348e58bd8b62a648333ec0f5b5)
14863
+ check_type(argname="argument api_key_name", value=api_key_name, expected_type=type_hints["api_key_name"])
14864
+ check_type(argname="argument description", value=description, expected_type=type_hints["description"])
14865
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
14866
+ check_type(argname="argument customer_id", value=customer_id, expected_type=type_hints["customer_id"])
14867
+ check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
14868
+ check_type(argname="argument generate_distinct_id", value=generate_distinct_id, expected_type=type_hints["generate_distinct_id"])
14869
+ check_type(argname="argument api_stages", value=api_stages, expected_type=type_hints["api_stages"])
14870
+ check_type(argname="argument quota", value=quota, expected_type=type_hints["quota"])
14871
+ check_type(argname="argument throttle", value=throttle, expected_type=type_hints["throttle"])
14872
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
14873
+ if api_key_name is not None:
14874
+ self._values["api_key_name"] = api_key_name
14875
+ if description is not None:
14876
+ self._values["description"] = description
14877
+ if value is not None:
14878
+ self._values["value"] = value
14879
+ if customer_id is not None:
14880
+ self._values["customer_id"] = customer_id
14881
+ if enabled is not None:
14882
+ self._values["enabled"] = enabled
14883
+ if generate_distinct_id is not None:
14884
+ self._values["generate_distinct_id"] = generate_distinct_id
14885
+ if api_stages is not None:
14886
+ self._values["api_stages"] = api_stages
14887
+ if quota is not None:
14888
+ self._values["quota"] = quota
14889
+ if throttle is not None:
14890
+ self._values["throttle"] = throttle
14891
+
14892
+ @builtins.property
14893
+ def api_key_name(self) -> typing.Optional[builtins.str]:
14894
+ '''A name for the API key.
14895
+
14896
+ If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.
14897
+
14898
+ :default: automatically generated name
14899
+
14900
+ :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-name
14901
+ '''
14902
+ result = self._values.get("api_key_name")
14903
+ return typing.cast(typing.Optional[builtins.str], result)
14904
+
14905
+ @builtins.property
14906
+ def description(self) -> typing.Optional[builtins.str]:
14907
+ '''A description of the purpose of the API key.
14908
+
14909
+ :default: none
14910
+
14911
+ :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-description
14912
+ '''
14913
+ result = self._values.get("description")
14914
+ return typing.cast(typing.Optional[builtins.str], result)
14915
+
14916
+ @builtins.property
14917
+ def value(self) -> typing.Optional[builtins.str]:
14918
+ '''The value of the API key.
14919
+
14920
+ Must be at least 20 characters long.
14921
+
14922
+ :default: none
14923
+
14924
+ :link: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-value
14925
+ '''
14926
+ result = self._values.get("value")
14927
+ return typing.cast(typing.Optional[builtins.str], result)
14928
+
14929
+ @builtins.property
14930
+ def customer_id(self) -> typing.Optional[builtins.str]:
14931
+ '''An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
14932
+
14933
+ :default: none
14934
+
14935
+ :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-customerid
14936
+ '''
14937
+ result = self._values.get("customer_id")
14938
+ return typing.cast(typing.Optional[builtins.str], result)
14939
+
14940
+ @builtins.property
14941
+ def enabled(self) -> typing.Optional[builtins.bool]:
14942
+ '''Indicates whether the API key can be used by clients.
14943
+
14944
+ :default: true
14945
+
14946
+ :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-enabled
14947
+ '''
14948
+ result = self._values.get("enabled")
14949
+ return typing.cast(typing.Optional[builtins.bool], result)
14950
+
14951
+ @builtins.property
14952
+ def generate_distinct_id(self) -> typing.Optional[builtins.bool]:
14953
+ '''Specifies whether the key identifier is distinct from the created API key value.
14954
+
14955
+ :default: false
14956
+
14957
+ :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-generatedistinctid
14958
+ '''
14959
+ result = self._values.get("generate_distinct_id")
14960
+ return typing.cast(typing.Optional[builtins.bool], result)
14961
+
14962
+ @builtins.property
14963
+ def api_stages(self) -> typing.Optional[typing.List["UsagePlanPerApiStage"]]:
14964
+ '''API Stages to be associated with the RateLimitedApiKey.
14965
+
14966
+ :default: none
14967
+ '''
14968
+ result = self._values.get("api_stages")
14969
+ return typing.cast(typing.Optional[typing.List["UsagePlanPerApiStage"]], result)
14970
+
14971
+ @builtins.property
14972
+ def quota(self) -> typing.Optional[QuotaSettings]:
14973
+ '''Number of requests clients can make in a given time period.
14974
+
14975
+ :default: none
14976
+ '''
14977
+ result = self._values.get("quota")
14978
+ return typing.cast(typing.Optional[QuotaSettings], result)
13929
14979
 
13930
- :param version: -
14980
+ @builtins.property
14981
+ def throttle(self) -> typing.Optional["ThrottleSettings"]:
14982
+ '''Overall throttle settings for the API.
14983
+
14984
+ :default: none
13931
14985
  '''
13932
- if __debug__:
13933
- type_hints = typing.get_type_hints(_typecheckingstub__a53d9648a03276b93776e272dffc7b5b30a9504625fd8b3e8e2c463dff76f46e)
13934
- check_type(argname="argument version", value=version, expected_type=type_hints["version"])
13935
- return typing.cast("PayloadFormatVersion", jsii.sinvoke(cls, "custom", [version]))
14986
+ result = self._values.get("throttle")
14987
+ return typing.cast(typing.Optional["ThrottleSettings"], result)
13936
14988
 
13937
- @jsii.python.classproperty
13938
- @jsii.member(jsii_name="VERSION_1_0")
13939
- def VERSION_1_0(cls) -> "PayloadFormatVersion":
13940
- '''Version 1.0.'''
13941
- return typing.cast("PayloadFormatVersion", jsii.sget(cls, "VERSION_1_0"))
14989
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
14990
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
13942
14991
 
13943
- @jsii.python.classproperty
13944
- @jsii.member(jsii_name="VERSION_2_0")
13945
- def VERSION_2_0(cls) -> "PayloadFormatVersion":
13946
- '''Version 2.0.'''
13947
- return typing.cast("PayloadFormatVersion", jsii.sget(cls, "VERSION_2_0"))
14992
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
14993
+ return not (rhs == self)
13948
14994
 
13949
- @builtins.property
13950
- @jsii.member(jsii_name="version")
13951
- def version(self) -> builtins.str:
13952
- '''version as a string.'''
13953
- return typing.cast(builtins.str, jsii.get(self, "version"))
14995
+ def __repr__(self) -> str:
14996
+ return "RateLimitedApiKeyProps(%s)" % ", ".join(
14997
+ k + "=" + repr(v) for k, v in self._values.items()
14998
+ )
13954
14999
 
13955
15000
 
13956
15001
  @jsii.enum(jsii_type="aws-cdk-lib.aws_apigatewayv2.SecurityPolicy")
@@ -14202,52 +15247,388 @@ class ThrottleSettings:
14202
15247
  ) -> None:
14203
15248
  '''Container for defining throttling parameters to API stages.
14204
15249
 
14205
- :param burst_limit: The maximum API request rate limit over a time ranging from one to a few seconds. Default: none
14206
- :param rate_limit: The API request steady-state rate limit (average requests per second over an extended period of time). Default: none
15250
+ :param burst_limit: The maximum API request rate limit over a time ranging from one to a few seconds. Default: none
15251
+ :param rate_limit: The API request steady-state rate limit (average requests per second over an extended period of time). Default: none
15252
+
15253
+ :exampleMetadata: infused
15254
+
15255
+ Example::
15256
+
15257
+ api_key = apigwv2.ApiKey(self, "ApiKey")
15258
+
15259
+ usage_plan = apigwv2.UsagePlan(self, "UsagePlan",
15260
+ usage_plan_name="WebSocketUsagePlan",
15261
+ throttle=apigwv2.ThrottleSettings(
15262
+ rate_limit=10,
15263
+ burst_limit=2
15264
+ )
15265
+ )
15266
+
15267
+ usage_plan.add_api_key(api_key)
15268
+ '''
15269
+ if __debug__:
15270
+ type_hints = typing.get_type_hints(_typecheckingstub__05ad6ca26340cecc4f71b6ccbf9e9a3f2f4b4aaba5752582219c37ea0e30d878)
15271
+ check_type(argname="argument burst_limit", value=burst_limit, expected_type=type_hints["burst_limit"])
15272
+ check_type(argname="argument rate_limit", value=rate_limit, expected_type=type_hints["rate_limit"])
15273
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
15274
+ if burst_limit is not None:
15275
+ self._values["burst_limit"] = burst_limit
15276
+ if rate_limit is not None:
15277
+ self._values["rate_limit"] = rate_limit
15278
+
15279
+ @builtins.property
15280
+ def burst_limit(self) -> typing.Optional[jsii.Number]:
15281
+ '''The maximum API request rate limit over a time ranging from one to a few seconds.
15282
+
15283
+ :default: none
15284
+ '''
15285
+ result = self._values.get("burst_limit")
15286
+ return typing.cast(typing.Optional[jsii.Number], result)
15287
+
15288
+ @builtins.property
15289
+ def rate_limit(self) -> typing.Optional[jsii.Number]:
15290
+ '''The API request steady-state rate limit (average requests per second over an extended period of time).
15291
+
15292
+ :default: none
15293
+ '''
15294
+ result = self._values.get("rate_limit")
15295
+ return typing.cast(typing.Optional[jsii.Number], result)
15296
+
15297
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
15298
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
15299
+
15300
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
15301
+ return not (rhs == self)
15302
+
15303
+ def __repr__(self) -> str:
15304
+ return "ThrottleSettings(%s)" % ", ".join(
15305
+ k + "=" + repr(v) for k, v in self._values.items()
15306
+ )
15307
+
15308
+
15309
+ @jsii.implements(IUsagePlan)
15310
+ class UsagePlan(
15311
+ _Resource_45bc6135,
15312
+ metaclass=jsii.JSIIMeta,
15313
+ jsii_type="aws-cdk-lib.aws_apigatewayv2.UsagePlan",
15314
+ ):
15315
+ '''A UsagePlan.
15316
+
15317
+ :resource: AWS::ApiGateway::UsagePlan
15318
+ :exampleMetadata: infused
15319
+
15320
+ Example::
15321
+
15322
+ api_key = apigwv2.ApiKey(self, "ApiKey")
15323
+
15324
+ usage_plan = apigwv2.UsagePlan(self, "UsagePlan",
15325
+ usage_plan_name="WebSocketUsagePlan",
15326
+ throttle=apigwv2.ThrottleSettings(
15327
+ rate_limit=10,
15328
+ burst_limit=2
15329
+ )
15330
+ )
15331
+
15332
+ usage_plan.add_api_key(api_key)
15333
+ '''
15334
+
15335
+ def __init__(
15336
+ self,
15337
+ scope: _constructs_77d1e7e8.Construct,
15338
+ id: builtins.str,
15339
+ *,
15340
+ api_stages: typing.Optional[typing.Sequence[typing.Union["UsagePlanPerApiStage", typing.Dict[builtins.str, typing.Any]]]] = None,
15341
+ description: typing.Optional[builtins.str] = None,
15342
+ quota: typing.Optional[typing.Union[QuotaSettings, typing.Dict[builtins.str, typing.Any]]] = None,
15343
+ throttle: typing.Optional[typing.Union[ThrottleSettings, typing.Dict[builtins.str, typing.Any]]] = None,
15344
+ usage_plan_name: typing.Optional[builtins.str] = None,
15345
+ ) -> None:
15346
+ '''
15347
+ :param scope: -
15348
+ :param id: -
15349
+ :param api_stages: API Stages to be associated with the usage plan. Default: none
15350
+ :param description: Represents usage plan purpose. Default: none
15351
+ :param quota: Number of requests clients can make in a given time period. Default: none
15352
+ :param throttle: Overall throttle settings for the API. Default: none
15353
+ :param usage_plan_name: Name for this usage plan. Default: none
15354
+ '''
15355
+ if __debug__:
15356
+ type_hints = typing.get_type_hints(_typecheckingstub__9c44a8270fda500e46d4376c78e5434b821d32274b06bed98229286ec47af912)
15357
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
15358
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
15359
+ props = UsagePlanProps(
15360
+ api_stages=api_stages,
15361
+ description=description,
15362
+ quota=quota,
15363
+ throttle=throttle,
15364
+ usage_plan_name=usage_plan_name,
15365
+ )
15366
+
15367
+ jsii.create(self.__class__, self, [scope, id, props])
15368
+
15369
+ @jsii.member(jsii_name="fromUsagePlanId")
15370
+ @builtins.classmethod
15371
+ def from_usage_plan_id(
15372
+ cls,
15373
+ scope: _constructs_77d1e7e8.Construct,
15374
+ id: builtins.str,
15375
+ usage_plan_id: builtins.str,
15376
+ ) -> IUsagePlan:
15377
+ '''Import an externally defined usage plan using its ARN.
15378
+
15379
+ :param scope: the construct that will "own" the imported usage plan.
15380
+ :param id: the id of the imported usage plan in the construct tree.
15381
+ :param usage_plan_id: the id of an existing usage plan.
15382
+ '''
15383
+ if __debug__:
15384
+ type_hints = typing.get_type_hints(_typecheckingstub__9903279f47ccd34953dfccff0e79862896fbecac5df5b4c485f95f32e4803558)
15385
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
15386
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
15387
+ check_type(argname="argument usage_plan_id", value=usage_plan_id, expected_type=type_hints["usage_plan_id"])
15388
+ return typing.cast(IUsagePlan, jsii.sinvoke(cls, "fromUsagePlanId", [scope, id, usage_plan_id]))
15389
+
15390
+ @jsii.member(jsii_name="addApiKey")
15391
+ def add_api_key(
15392
+ self,
15393
+ api_key: IApiKey,
15394
+ *,
15395
+ override_logical_id: typing.Optional[builtins.str] = None,
15396
+ ) -> None:
15397
+ '''Adds an ApiKey.
15398
+
15399
+ :param api_key: the api key to associate with this usage plan.
15400
+ :param override_logical_id: Override the CloudFormation logical id of the AWS::ApiGateway::UsagePlanKey resource. Default: - autogenerated by the CDK
15401
+ '''
15402
+ if __debug__:
15403
+ type_hints = typing.get_type_hints(_typecheckingstub__892ce11886a70d15231181494f2d96dd60dca39f438ede2530803c668aab974a)
15404
+ check_type(argname="argument api_key", value=api_key, expected_type=type_hints["api_key"])
15405
+ options = AddApiKeyOptions(override_logical_id=override_logical_id)
15406
+
15407
+ return typing.cast(None, jsii.invoke(self, "addApiKey", [api_key, options]))
15408
+
15409
+ @jsii.member(jsii_name="addApiStage")
15410
+ def add_api_stage(
15411
+ self,
15412
+ *,
15413
+ api: typing.Optional[IWebSocketApi] = None,
15414
+ stage: typing.Optional[IWebSocketStage] = None,
15415
+ ) -> None:
15416
+ '''Adds an apiStage.
15417
+
15418
+ :param api: The WebSocket API to associate with the usage plan. Default: none
15419
+ :param stage: [disable-awslint:ref-via-interface]. Default: none
15420
+ '''
15421
+ api_stage = UsagePlanPerApiStage(api=api, stage=stage)
15422
+
15423
+ return typing.cast(None, jsii.invoke(self, "addApiStage", [api_stage]))
15424
+
15425
+ @jsii.python.classproperty
15426
+ @jsii.member(jsii_name="PROPERTY_INJECTION_ID")
15427
+ def PROPERTY_INJECTION_ID(cls) -> builtins.str:
15428
+ '''Uniquely identifies this class.'''
15429
+ return typing.cast(builtins.str, jsii.sget(cls, "PROPERTY_INJECTION_ID"))
15430
+
15431
+ @builtins.property
15432
+ @jsii.member(jsii_name="usagePlanId")
15433
+ def usage_plan_id(self) -> builtins.str:
15434
+ '''Id of the usage plan.
15435
+
15436
+ :attribute: true
15437
+ '''
15438
+ return typing.cast(builtins.str, jsii.get(self, "usagePlanId"))
15439
+
15440
+
15441
+ @jsii.data_type(
15442
+ jsii_type="aws-cdk-lib.aws_apigatewayv2.UsagePlanPerApiStage",
15443
+ jsii_struct_bases=[],
15444
+ name_mapping={"api": "api", "stage": "stage"},
15445
+ )
15446
+ class UsagePlanPerApiStage:
15447
+ def __init__(
15448
+ self,
15449
+ *,
15450
+ api: typing.Optional[IWebSocketApi] = None,
15451
+ stage: typing.Optional[IWebSocketStage] = None,
15452
+ ) -> None:
15453
+ '''Represents the API stages that a usage plan applies to.
15454
+
15455
+ :param api: The WebSocket API to associate with the usage plan. Default: none
15456
+ :param stage: [disable-awslint:ref-via-interface]. Default: none
15457
+
15458
+ :exampleMetadata: infused
15459
+
15460
+ Example::
15461
+
15462
+ api = apigwv2.WebSocketApi(self, "my-api")
15463
+ stage = apigwv2.WebSocketStage(self, "my-stage",
15464
+ web_socket_api=api,
15465
+ stage_name="dev"
15466
+ )
15467
+
15468
+ usage_plan = apigwv2.UsagePlan(self, "my-usage-plan",
15469
+ usage_plan_name="Basic"
15470
+ )
15471
+
15472
+ usage_plan.add_api_stage(
15473
+ api=api,
15474
+ stage=stage
15475
+ )
15476
+ '''
15477
+ if __debug__:
15478
+ type_hints = typing.get_type_hints(_typecheckingstub__9167cbb0fc31fdca6b0d63f3c3394dad8530b4e18ee7a76dc830fe05762c83b0)
15479
+ check_type(argname="argument api", value=api, expected_type=type_hints["api"])
15480
+ check_type(argname="argument stage", value=stage, expected_type=type_hints["stage"])
15481
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
15482
+ if api is not None:
15483
+ self._values["api"] = api
15484
+ if stage is not None:
15485
+ self._values["stage"] = stage
15486
+
15487
+ @builtins.property
15488
+ def api(self) -> typing.Optional[IWebSocketApi]:
15489
+ '''The WebSocket API to associate with the usage plan.
15490
+
15491
+ :default: none
15492
+ '''
15493
+ result = self._values.get("api")
15494
+ return typing.cast(typing.Optional[IWebSocketApi], result)
15495
+
15496
+ @builtins.property
15497
+ def stage(self) -> typing.Optional[IWebSocketStage]:
15498
+ '''[disable-awslint:ref-via-interface].
15499
+
15500
+ :default: none
15501
+ '''
15502
+ result = self._values.get("stage")
15503
+ return typing.cast(typing.Optional[IWebSocketStage], result)
15504
+
15505
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
15506
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
15507
+
15508
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
15509
+ return not (rhs == self)
15510
+
15511
+ def __repr__(self) -> str:
15512
+ return "UsagePlanPerApiStage(%s)" % ", ".join(
15513
+ k + "=" + repr(v) for k, v in self._values.items()
15514
+ )
15515
+
15516
+
15517
+ @jsii.data_type(
15518
+ jsii_type="aws-cdk-lib.aws_apigatewayv2.UsagePlanProps",
15519
+ jsii_struct_bases=[],
15520
+ name_mapping={
15521
+ "api_stages": "apiStages",
15522
+ "description": "description",
15523
+ "quota": "quota",
15524
+ "throttle": "throttle",
15525
+ "usage_plan_name": "usagePlanName",
15526
+ },
15527
+ )
15528
+ class UsagePlanProps:
15529
+ def __init__(
15530
+ self,
15531
+ *,
15532
+ api_stages: typing.Optional[typing.Sequence[typing.Union[UsagePlanPerApiStage, typing.Dict[builtins.str, typing.Any]]]] = None,
15533
+ description: typing.Optional[builtins.str] = None,
15534
+ quota: typing.Optional[typing.Union[QuotaSettings, typing.Dict[builtins.str, typing.Any]]] = None,
15535
+ throttle: typing.Optional[typing.Union[ThrottleSettings, typing.Dict[builtins.str, typing.Any]]] = None,
15536
+ usage_plan_name: typing.Optional[builtins.str] = None,
15537
+ ) -> None:
15538
+ '''Properties for defining an API Gateway Usage Plan for WebSocket APIs.
15539
+
15540
+ :param api_stages: API Stages to be associated with the usage plan. Default: none
15541
+ :param description: Represents usage plan purpose. Default: none
15542
+ :param quota: Number of requests clients can make in a given time period. Default: none
15543
+ :param throttle: Overall throttle settings for the API. Default: none
15544
+ :param usage_plan_name: Name for this usage plan. Default: none
15545
+
15546
+ :exampleMetadata: infused
15547
+
15548
+ Example::
15549
+
15550
+ api = apigwv2.WebSocketApi(self, "my-api")
15551
+ stage = apigwv2.WebSocketStage(self, "my-stage",
15552
+ web_socket_api=api,
15553
+ stage_name="dev"
15554
+ )
15555
+
15556
+ usage_plan = apigwv2.UsagePlan(self, "my-usage-plan",
15557
+ usage_plan_name="Basic"
15558
+ )
15559
+
15560
+ usage_plan.add_api_stage(
15561
+ api=api,
15562
+ stage=stage
15563
+ )
15564
+ '''
15565
+ if isinstance(quota, dict):
15566
+ quota = QuotaSettings(**quota)
15567
+ if isinstance(throttle, dict):
15568
+ throttle = ThrottleSettings(**throttle)
15569
+ if __debug__:
15570
+ type_hints = typing.get_type_hints(_typecheckingstub__b1b0eb1f59edcc1e5a9d1e11fa7f21e101c738b5672a0443acc881f463fb1423)
15571
+ check_type(argname="argument api_stages", value=api_stages, expected_type=type_hints["api_stages"])
15572
+ check_type(argname="argument description", value=description, expected_type=type_hints["description"])
15573
+ check_type(argname="argument quota", value=quota, expected_type=type_hints["quota"])
15574
+ check_type(argname="argument throttle", value=throttle, expected_type=type_hints["throttle"])
15575
+ check_type(argname="argument usage_plan_name", value=usage_plan_name, expected_type=type_hints["usage_plan_name"])
15576
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
15577
+ if api_stages is not None:
15578
+ self._values["api_stages"] = api_stages
15579
+ if description is not None:
15580
+ self._values["description"] = description
15581
+ if quota is not None:
15582
+ self._values["quota"] = quota
15583
+ if throttle is not None:
15584
+ self._values["throttle"] = throttle
15585
+ if usage_plan_name is not None:
15586
+ self._values["usage_plan_name"] = usage_plan_name
15587
+
15588
+ @builtins.property
15589
+ def api_stages(self) -> typing.Optional[typing.List[UsagePlanPerApiStage]]:
15590
+ '''API Stages to be associated with the usage plan.
15591
+
15592
+ :default: none
15593
+ '''
15594
+ result = self._values.get("api_stages")
15595
+ return typing.cast(typing.Optional[typing.List[UsagePlanPerApiStage]], result)
15596
+
15597
+ @builtins.property
15598
+ def description(self) -> typing.Optional[builtins.str]:
15599
+ '''Represents usage plan purpose.
14207
15600
 
14208
- :exampleMetadata: infused
15601
+ :default: none
15602
+ '''
15603
+ result = self._values.get("description")
15604
+ return typing.cast(typing.Optional[builtins.str], result)
14209
15605
 
14210
- Example::
15606
+ @builtins.property
15607
+ def quota(self) -> typing.Optional[QuotaSettings]:
15608
+ '''Number of requests clients can make in a given time period.
14211
15609
 
14212
- # api: apigwv2.HttpApi
14213
-
14214
-
14215
- apigwv2.HttpStage(self, "Stage",
14216
- http_api=api,
14217
- throttle=apigwv2.ThrottleSettings(
14218
- rate_limit=1000,
14219
- burst_limit=1000
14220
- ),
14221
- detailed_metrics_enabled=True
14222
- )
15610
+ :default: none
14223
15611
  '''
14224
- if __debug__:
14225
- type_hints = typing.get_type_hints(_typecheckingstub__05ad6ca26340cecc4f71b6ccbf9e9a3f2f4b4aaba5752582219c37ea0e30d878)
14226
- check_type(argname="argument burst_limit", value=burst_limit, expected_type=type_hints["burst_limit"])
14227
- check_type(argname="argument rate_limit", value=rate_limit, expected_type=type_hints["rate_limit"])
14228
- self._values: typing.Dict[builtins.str, typing.Any] = {}
14229
- if burst_limit is not None:
14230
- self._values["burst_limit"] = burst_limit
14231
- if rate_limit is not None:
14232
- self._values["rate_limit"] = rate_limit
15612
+ result = self._values.get("quota")
15613
+ return typing.cast(typing.Optional[QuotaSettings], result)
14233
15614
 
14234
15615
  @builtins.property
14235
- def burst_limit(self) -> typing.Optional[jsii.Number]:
14236
- '''The maximum API request rate limit over a time ranging from one to a few seconds.
15616
+ def throttle(self) -> typing.Optional[ThrottleSettings]:
15617
+ '''Overall throttle settings for the API.
14237
15618
 
14238
15619
  :default: none
14239
15620
  '''
14240
- result = self._values.get("burst_limit")
14241
- return typing.cast(typing.Optional[jsii.Number], result)
15621
+ result = self._values.get("throttle")
15622
+ return typing.cast(typing.Optional[ThrottleSettings], result)
14242
15623
 
14243
15624
  @builtins.property
14244
- def rate_limit(self) -> typing.Optional[jsii.Number]:
14245
- '''The API request steady-state rate limit (average requests per second over an extended period of time).
15625
+ def usage_plan_name(self) -> typing.Optional[builtins.str]:
15626
+ '''Name for this usage plan.
14246
15627
 
14247
15628
  :default: none
14248
15629
  '''
14249
- result = self._values.get("rate_limit")
14250
- return typing.cast(typing.Optional[jsii.Number], result)
15630
+ result = self._values.get("usage_plan_name")
15631
+ return typing.cast(typing.Optional[builtins.str], result)
14251
15632
 
14252
15633
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
14253
15634
  return isinstance(rhs, self.__class__) and rhs._values == self._values
@@ -14256,7 +15637,7 @@ class ThrottleSettings:
14256
15637
  return not (rhs == self)
14257
15638
 
14258
15639
  def __repr__(self) -> str:
14259
- return "ThrottleSettings(%s)" % ", ".join(
15640
+ return "UsagePlanProps(%s)" % ", ".join(
14260
15641
  k + "=" + repr(v) for k, v in self._values.items()
14261
15642
  )
14262
15643
 
@@ -16682,20 +18063,21 @@ class WebSocketStage(
16682
18063
 
16683
18064
  Example::
16684
18065
 
16685
- from aws_cdk.aws_apigatewayv2_integrations import WebSocketLambdaIntegration
16686
-
16687
- # message_handler: lambda.Function
18066
+ # web_socket_api: apigwv2.IWebSocketApi
16688
18067
 
16689
18068
 
16690
- web_socket_api = apigwv2.WebSocketApi(self, "mywsapi")
16691
- apigwv2.WebSocketStage(self, "mystage",
16692
- web_socket_api=web_socket_api,
16693
- stage_name="dev",
16694
- auto_deploy=True
18069
+ imported_stage = apigwv2.WebSocketStage.from_web_socket_stage_attributes(self, "imported-stage",
18070
+ stage_name="myStage",
18071
+ api=web_socket_api
16695
18072
  )
16696
- web_socket_api.add_route("sendMessage",
16697
- integration=WebSocketLambdaIntegration("SendMessageIntegration", message_handler)
18073
+
18074
+ api_key = apigwv2.ApiKey(self, "MyApiKey")
18075
+
18076
+ usage_plan = apigwv2.UsagePlan(self, "MyUsagePlan",
18077
+ api_stages=[apigwv2.UsagePlanPerApiStage(api=web_socket_api, stage=imported_stage)]
16698
18078
  )
18079
+
18080
+ usage_plan.add_api_key(api_key)
16699
18081
  '''
16700
18082
 
16701
18083
  def __init__(
@@ -16901,20 +18283,25 @@ class WebSocketStageAttributes(StageAttributes):
16901
18283
  :param stage_name: The name of the stage.
16902
18284
  :param api: The API to which this stage is associated.
16903
18285
 
16904
- :exampleMetadata: fixture=_generated
18286
+ :exampleMetadata: infused
16905
18287
 
16906
18288
  Example::
16907
18289
 
16908
- # The code below shows an example of how to instantiate this type.
16909
- # The values are placeholders you should change.
16910
- from aws_cdk import aws_apigatewayv2 as apigatewayv2
18290
+ # web_socket_api: apigwv2.IWebSocketApi
16911
18291
 
16912
- # web_socket_api: apigatewayv2.WebSocketApi
16913
18292
 
16914
- web_socket_stage_attributes = apigatewayv2.WebSocketStageAttributes(
16915
- api=web_socket_api,
16916
- stage_name="stageName"
18293
+ imported_stage = apigwv2.WebSocketStage.from_web_socket_stage_attributes(self, "imported-stage",
18294
+ stage_name="myStage",
18295
+ api=web_socket_api
18296
+ )
18297
+
18298
+ api_key = apigwv2.ApiKey(self, "MyApiKey")
18299
+
18300
+ usage_plan = apigwv2.UsagePlan(self, "MyUsagePlan",
18301
+ api_stages=[apigwv2.UsagePlanPerApiStage(api=web_socket_api, stage=imported_stage)]
16917
18302
  )
18303
+
18304
+ usage_plan.add_api_key(api_key)
16918
18305
  '''
16919
18306
  if __debug__:
16920
18307
  type_hints = typing.get_type_hints(_typecheckingstub__66ef15ad422b243bd7d761fe83ba5889c94c75b085fc8898f13f5fdbdf2f9a98)
@@ -17268,6 +18655,147 @@ class AddRoutesOptions(BatchHttpRouteOptions):
17268
18655
  )
17269
18656
 
17270
18657
 
18658
+ @jsii.implements(IApiKey)
18659
+ class ApiKey(
18660
+ _Resource_45bc6135,
18661
+ metaclass=jsii.JSIIMeta,
18662
+ jsii_type="aws-cdk-lib.aws_apigatewayv2.ApiKey",
18663
+ ):
18664
+ '''An API Gateway ApiKey.
18665
+
18666
+ An ApiKey can be distributed to API clients that are connecting to
18667
+ WebSocket APIs that require API key authentication. The key is used
18668
+ to authenticate WebSocket connections and associate them with usage plans
18669
+ for throttling and quota management.
18670
+
18671
+ :resource: AWS::ApiGateway::ApiKey
18672
+ :exampleMetadata: infused
18673
+
18674
+ Example::
18675
+
18676
+ api_key = apigwv2.ApiKey(self, "ApiKey")
18677
+
18678
+ usage_plan = apigwv2.UsagePlan(self, "UsagePlan",
18679
+ usage_plan_name="WebSocketUsagePlan",
18680
+ throttle=apigwv2.ThrottleSettings(
18681
+ rate_limit=10,
18682
+ burst_limit=2
18683
+ )
18684
+ )
18685
+
18686
+ usage_plan.add_api_key(api_key)
18687
+ '''
18688
+
18689
+ def __init__(
18690
+ self,
18691
+ scope: _constructs_77d1e7e8.Construct,
18692
+ id: builtins.str,
18693
+ *,
18694
+ customer_id: typing.Optional[builtins.str] = None,
18695
+ enabled: typing.Optional[builtins.bool] = None,
18696
+ generate_distinct_id: typing.Optional[builtins.bool] = None,
18697
+ api_key_name: typing.Optional[builtins.str] = None,
18698
+ description: typing.Optional[builtins.str] = None,
18699
+ value: typing.Optional[builtins.str] = None,
18700
+ ) -> None:
18701
+ '''
18702
+ :param scope: -
18703
+ :param id: -
18704
+ :param customer_id: An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace. Default: none
18705
+ :param enabled: Indicates whether the API key can be used by clients. Default: true
18706
+ :param generate_distinct_id: Specifies whether the key identifier is distinct from the created API key value. Default: false
18707
+ :param api_key_name: A name for the API key. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name. Default: automatically generated name
18708
+ :param description: A description of the purpose of the API key. Default: none
18709
+ :param value: The value of the API key. Must be at least 20 characters long. Default: none
18710
+ '''
18711
+ if __debug__:
18712
+ type_hints = typing.get_type_hints(_typecheckingstub__18c2dfbb6541b5bea91e0bd851d692e9bbad202ded4cba74973cb8a90161036c)
18713
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
18714
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
18715
+ props = ApiKeyProps(
18716
+ customer_id=customer_id,
18717
+ enabled=enabled,
18718
+ generate_distinct_id=generate_distinct_id,
18719
+ api_key_name=api_key_name,
18720
+ description=description,
18721
+ value=value,
18722
+ )
18723
+
18724
+ jsii.create(self.__class__, self, [scope, id, props])
18725
+
18726
+ @jsii.member(jsii_name="fromApiKeyId")
18727
+ @builtins.classmethod
18728
+ def from_api_key_id(
18729
+ cls,
18730
+ scope: _constructs_77d1e7e8.Construct,
18731
+ id: builtins.str,
18732
+ api_key_id: builtins.str,
18733
+ ) -> IApiKey:
18734
+ '''Import an ApiKey by its Id.
18735
+
18736
+ :param scope: -
18737
+ :param id: -
18738
+ :param api_key_id: -
18739
+ '''
18740
+ if __debug__:
18741
+ type_hints = typing.get_type_hints(_typecheckingstub__f76f41cb204d2ae2963a27d942e6861e29eae70b4ed5762816d1b6f31b1477c5)
18742
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
18743
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
18744
+ check_type(argname="argument api_key_id", value=api_key_id, expected_type=type_hints["api_key_id"])
18745
+ return typing.cast(IApiKey, jsii.sinvoke(cls, "fromApiKeyId", [scope, id, api_key_id]))
18746
+
18747
+ @jsii.member(jsii_name="grantRead")
18748
+ def grant_read(self, grantee: _IGrantable_71c4f5de) -> _Grant_a7ae64f8:
18749
+ '''Permits the IAM principal all read operations through this key.
18750
+
18751
+ :param grantee: The principal to grant access to.
18752
+ '''
18753
+ if __debug__:
18754
+ type_hints = typing.get_type_hints(_typecheckingstub__ce9b01bd26cfea509e4d7bbddd06eb09db4a7f429082af90962d5b5c3825ab7d)
18755
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
18756
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantRead", [grantee]))
18757
+
18758
+ @jsii.member(jsii_name="grantReadWrite")
18759
+ def grant_read_write(self, grantee: _IGrantable_71c4f5de) -> _Grant_a7ae64f8:
18760
+ '''Permits the IAM principal all read and write operations through this key.
18761
+
18762
+ :param grantee: The principal to grant access to.
18763
+ '''
18764
+ if __debug__:
18765
+ type_hints = typing.get_type_hints(_typecheckingstub__1927f55f5fccf80e91c10574698a5522929c80cae47332c837e9dfd8f8e053c2)
18766
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
18767
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantReadWrite", [grantee]))
18768
+
18769
+ @jsii.member(jsii_name="grantWrite")
18770
+ def grant_write(self, grantee: _IGrantable_71c4f5de) -> _Grant_a7ae64f8:
18771
+ '''Permits the IAM principal all write operations through this key.
18772
+
18773
+ :param grantee: The principal to grant access to.
18774
+ '''
18775
+ if __debug__:
18776
+ type_hints = typing.get_type_hints(_typecheckingstub__eb3bf1a09f37630c026370072be172a15006c00dde871dbc489e7fb912fbe310)
18777
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
18778
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantWrite", [grantee]))
18779
+
18780
+ @jsii.python.classproperty
18781
+ @jsii.member(jsii_name="PROPERTY_INJECTION_ID")
18782
+ def PROPERTY_INJECTION_ID(cls) -> builtins.str:
18783
+ '''Uniquely identifies this class.'''
18784
+ return typing.cast(builtins.str, jsii.sget(cls, "PROPERTY_INJECTION_ID"))
18785
+
18786
+ @builtins.property
18787
+ @jsii.member(jsii_name="keyArn")
18788
+ def key_arn(self) -> builtins.str:
18789
+ '''The API key ARN.'''
18790
+ return typing.cast(builtins.str, jsii.get(self, "keyArn"))
18791
+
18792
+ @builtins.property
18793
+ @jsii.member(jsii_name="keyId")
18794
+ def key_id(self) -> builtins.str:
18795
+ '''The API key ID.'''
18796
+ return typing.cast(builtins.str, jsii.get(self, "keyId"))
18797
+
18798
+
17271
18799
  @jsii.implements(IApiMapping)
17272
18800
  class ApiMapping(
17273
18801
  _Resource_45bc6135,
@@ -20428,7 +21956,11 @@ class HttpStage(
20428
21956
 
20429
21957
  __all__ = [
20430
21958
  "AccessLogDestinationConfig",
21959
+ "AddApiKeyOptions",
20431
21960
  "AddRoutesOptions",
21961
+ "ApiKey",
21962
+ "ApiKeyOptions",
21963
+ "ApiKeyProps",
20432
21964
  "ApiMapping",
20433
21965
  "ApiMappingAttributes",
20434
21966
  "ApiMappingProps",
@@ -20501,6 +22033,7 @@ __all__ = [
20501
22033
  "IAccessLogDestination",
20502
22034
  "IAccessLogSettings",
20503
22035
  "IApi",
22036
+ "IApiKey",
20504
22037
  "IApiMapping",
20505
22038
  "IAuthorizer",
20506
22039
  "IDomainName",
@@ -20514,6 +22047,7 @@ __all__ = [
20514
22047
  "IMappingValue",
20515
22048
  "IRoute",
20516
22049
  "IStage",
22050
+ "IUsagePlan",
20517
22051
  "IVpcLink",
20518
22052
  "IWebSocketApi",
20519
22053
  "IWebSocketAuthorizer",
@@ -20529,10 +22063,17 @@ __all__ = [
20529
22063
  "ParameterMapping",
20530
22064
  "PassthroughBehavior",
20531
22065
  "PayloadFormatVersion",
22066
+ "Period",
22067
+ "QuotaSettings",
22068
+ "RateLimitedApiKey",
22069
+ "RateLimitedApiKeyProps",
20532
22070
  "SecurityPolicy",
20533
22071
  "StageAttributes",
20534
22072
  "StageOptions",
20535
22073
  "ThrottleSettings",
22074
+ "UsagePlan",
22075
+ "UsagePlanPerApiStage",
22076
+ "UsagePlanProps",
20536
22077
  "VpcLink",
20537
22078
  "VpcLinkAttributes",
20538
22079
  "VpcLinkProps",
@@ -20570,6 +22111,34 @@ def _typecheckingstub__8b68ef5fb39547463ffa4e3d85b867bf69e399a3812672f092c1af8a4
20570
22111
  """Type checking stubs"""
20571
22112
  pass
20572
22113
 
22114
+ def _typecheckingstub__0941f7d28f81063a43bd13461ff2c77b07dbc27ccb33f1747ba86e63cb135cfa(
22115
+ *,
22116
+ override_logical_id: typing.Optional[builtins.str] = None,
22117
+ ) -> None:
22118
+ """Type checking stubs"""
22119
+ pass
22120
+
22121
+ def _typecheckingstub__7a705f0b737f132294a153b02c31b4d08ac0e91a2d1357048ce93fa1d3dcc0aa(
22122
+ *,
22123
+ api_key_name: typing.Optional[builtins.str] = None,
22124
+ description: typing.Optional[builtins.str] = None,
22125
+ value: typing.Optional[builtins.str] = None,
22126
+ ) -> None:
22127
+ """Type checking stubs"""
22128
+ pass
22129
+
22130
+ def _typecheckingstub__8f84fc0c61e7fd558c82b45bbc4bcd6801e5a01a36339712c0577607b261c786(
22131
+ *,
22132
+ api_key_name: typing.Optional[builtins.str] = None,
22133
+ description: typing.Optional[builtins.str] = None,
22134
+ value: typing.Optional[builtins.str] = None,
22135
+ customer_id: typing.Optional[builtins.str] = None,
22136
+ enabled: typing.Optional[builtins.bool] = None,
22137
+ generate_distinct_id: typing.Optional[builtins.bool] = None,
22138
+ ) -> None:
22139
+ """Type checking stubs"""
22140
+ pass
22141
+
20573
22142
  def _typecheckingstub__87e51f8314eb457688965754ef962ccc6b34cd3477e30e0b5c48927231e6e450(
20574
22143
  *,
20575
22144
  api_mapping_id: builtins.str,
@@ -22312,6 +23881,14 @@ def _typecheckingstub__d4b9c7a822660da49cf87c3fc29340609a45b07f2b21e9c3832e9a550
22312
23881
  """Type checking stubs"""
22313
23882
  pass
22314
23883
 
23884
+ def _typecheckingstub__4feb0fa4d2b3aa6f0e443abfac19ee78cf632f1573ba5c6ccfa6fb8619018bcb(
23885
+ api_key: IApiKey,
23886
+ *,
23887
+ override_logical_id: typing.Optional[builtins.str] = None,
23888
+ ) -> None:
23889
+ """Type checking stubs"""
23890
+ pass
23891
+
22315
23892
  def _typecheckingstub__331fd0db1f61e3b086b38ed9cad76e580f9f7392bb87bb910e5961df862b2ca9(
22316
23893
  role: _IRole_235f5d8e,
22317
23894
  ) -> None:
@@ -22452,6 +24029,65 @@ def _typecheckingstub__a53d9648a03276b93776e272dffc7b5b30a9504625fd8b3e8e2c463df
22452
24029
  """Type checking stubs"""
22453
24030
  pass
22454
24031
 
24032
+ def _typecheckingstub__389f76c9bffb156f327520f7fb1eb3786b6c053de75cac1df18d9cac22ff10e6(
24033
+ *,
24034
+ limit: typing.Optional[jsii.Number] = None,
24035
+ offset: typing.Optional[jsii.Number] = None,
24036
+ period: typing.Optional[Period] = None,
24037
+ ) -> None:
24038
+ """Type checking stubs"""
24039
+ pass
24040
+
24041
+ def _typecheckingstub__572a1cdbe73f523ab11fbfefb643d76b815fde625cf2ad61720c812e98d9dfe3(
24042
+ scope: _constructs_77d1e7e8.Construct,
24043
+ id: builtins.str,
24044
+ *,
24045
+ api_stages: typing.Optional[typing.Sequence[typing.Union[UsagePlanPerApiStage, typing.Dict[builtins.str, typing.Any]]]] = None,
24046
+ quota: typing.Optional[typing.Union[QuotaSettings, typing.Dict[builtins.str, typing.Any]]] = None,
24047
+ throttle: typing.Optional[typing.Union[ThrottleSettings, typing.Dict[builtins.str, typing.Any]]] = None,
24048
+ customer_id: typing.Optional[builtins.str] = None,
24049
+ enabled: typing.Optional[builtins.bool] = None,
24050
+ generate_distinct_id: typing.Optional[builtins.bool] = None,
24051
+ api_key_name: typing.Optional[builtins.str] = None,
24052
+ description: typing.Optional[builtins.str] = None,
24053
+ value: typing.Optional[builtins.str] = None,
24054
+ ) -> None:
24055
+ """Type checking stubs"""
24056
+ pass
24057
+
24058
+ def _typecheckingstub__28c60e4a8e61709e5f61997104043903178afb5475d6f9b2228b53f119383675(
24059
+ grantee: _IGrantable_71c4f5de,
24060
+ ) -> None:
24061
+ """Type checking stubs"""
24062
+ pass
24063
+
24064
+ def _typecheckingstub__5c816a8984b9edeedfec843ede15881183785d76c9b0dadcd9c8d226383c7277(
24065
+ grantee: _IGrantable_71c4f5de,
24066
+ ) -> None:
24067
+ """Type checking stubs"""
24068
+ pass
24069
+
24070
+ def _typecheckingstub__2ff79bd17198356348211d47ed321f48be3c130579981227c653a29c050fc0dd(
24071
+ grantee: _IGrantable_71c4f5de,
24072
+ ) -> None:
24073
+ """Type checking stubs"""
24074
+ pass
24075
+
24076
+ def _typecheckingstub__6e548d95c67601d1846a7247a02ee697fc027c348e58bd8b62a648333ec0f5b5(
24077
+ *,
24078
+ api_key_name: typing.Optional[builtins.str] = None,
24079
+ description: typing.Optional[builtins.str] = None,
24080
+ value: typing.Optional[builtins.str] = None,
24081
+ customer_id: typing.Optional[builtins.str] = None,
24082
+ enabled: typing.Optional[builtins.bool] = None,
24083
+ generate_distinct_id: typing.Optional[builtins.bool] = None,
24084
+ api_stages: typing.Optional[typing.Sequence[typing.Union[UsagePlanPerApiStage, typing.Dict[builtins.str, typing.Any]]]] = None,
24085
+ quota: typing.Optional[typing.Union[QuotaSettings, typing.Dict[builtins.str, typing.Any]]] = None,
24086
+ throttle: typing.Optional[typing.Union[ThrottleSettings, typing.Dict[builtins.str, typing.Any]]] = None,
24087
+ ) -> None:
24088
+ """Type checking stubs"""
24089
+ pass
24090
+
22455
24091
  def _typecheckingstub__6e40657661365d1f987be571ab8023633c7e4116f50e9a7122d3a476e9b80a5b(
22456
24092
  *,
22457
24093
  stage_name: builtins.str,
@@ -22480,6 +24116,54 @@ def _typecheckingstub__05ad6ca26340cecc4f71b6ccbf9e9a3f2f4b4aaba5752582219c37ea0
22480
24116
  """Type checking stubs"""
22481
24117
  pass
22482
24118
 
24119
+ def _typecheckingstub__9c44a8270fda500e46d4376c78e5434b821d32274b06bed98229286ec47af912(
24120
+ scope: _constructs_77d1e7e8.Construct,
24121
+ id: builtins.str,
24122
+ *,
24123
+ api_stages: typing.Optional[typing.Sequence[typing.Union[UsagePlanPerApiStage, typing.Dict[builtins.str, typing.Any]]]] = None,
24124
+ description: typing.Optional[builtins.str] = None,
24125
+ quota: typing.Optional[typing.Union[QuotaSettings, typing.Dict[builtins.str, typing.Any]]] = None,
24126
+ throttle: typing.Optional[typing.Union[ThrottleSettings, typing.Dict[builtins.str, typing.Any]]] = None,
24127
+ usage_plan_name: typing.Optional[builtins.str] = None,
24128
+ ) -> None:
24129
+ """Type checking stubs"""
24130
+ pass
24131
+
24132
+ def _typecheckingstub__9903279f47ccd34953dfccff0e79862896fbecac5df5b4c485f95f32e4803558(
24133
+ scope: _constructs_77d1e7e8.Construct,
24134
+ id: builtins.str,
24135
+ usage_plan_id: builtins.str,
24136
+ ) -> None:
24137
+ """Type checking stubs"""
24138
+ pass
24139
+
24140
+ def _typecheckingstub__892ce11886a70d15231181494f2d96dd60dca39f438ede2530803c668aab974a(
24141
+ api_key: IApiKey,
24142
+ *,
24143
+ override_logical_id: typing.Optional[builtins.str] = None,
24144
+ ) -> None:
24145
+ """Type checking stubs"""
24146
+ pass
24147
+
24148
+ def _typecheckingstub__9167cbb0fc31fdca6b0d63f3c3394dad8530b4e18ee7a76dc830fe05762c83b0(
24149
+ *,
24150
+ api: typing.Optional[IWebSocketApi] = None,
24151
+ stage: typing.Optional[IWebSocketStage] = None,
24152
+ ) -> None:
24153
+ """Type checking stubs"""
24154
+ pass
24155
+
24156
+ def _typecheckingstub__b1b0eb1f59edcc1e5a9d1e11fa7f21e101c738b5672a0443acc881f463fb1423(
24157
+ *,
24158
+ api_stages: typing.Optional[typing.Sequence[typing.Union[UsagePlanPerApiStage, typing.Dict[builtins.str, typing.Any]]]] = None,
24159
+ description: typing.Optional[builtins.str] = None,
24160
+ quota: typing.Optional[typing.Union[QuotaSettings, typing.Dict[builtins.str, typing.Any]]] = None,
24161
+ throttle: typing.Optional[typing.Union[ThrottleSettings, typing.Dict[builtins.str, typing.Any]]] = None,
24162
+ usage_plan_name: typing.Optional[builtins.str] = None,
24163
+ ) -> None:
24164
+ """Type checking stubs"""
24165
+ pass
24166
+
22483
24167
  def _typecheckingstub__fbb2a4db39618c2d297b1697d524767a581ac4642c8c11e547be18b2311d9920(
22484
24168
  scope: _constructs_77d1e7e8.Construct,
22485
24169
  id: builtins.str,
@@ -22888,6 +24572,46 @@ def _typecheckingstub__34561766c812822f47fe25e397c094ff6c4e8ebdecb2a857bcc289f99
22888
24572
  """Type checking stubs"""
22889
24573
  pass
22890
24574
 
24575
+ def _typecheckingstub__18c2dfbb6541b5bea91e0bd851d692e9bbad202ded4cba74973cb8a90161036c(
24576
+ scope: _constructs_77d1e7e8.Construct,
24577
+ id: builtins.str,
24578
+ *,
24579
+ customer_id: typing.Optional[builtins.str] = None,
24580
+ enabled: typing.Optional[builtins.bool] = None,
24581
+ generate_distinct_id: typing.Optional[builtins.bool] = None,
24582
+ api_key_name: typing.Optional[builtins.str] = None,
24583
+ description: typing.Optional[builtins.str] = None,
24584
+ value: typing.Optional[builtins.str] = None,
24585
+ ) -> None:
24586
+ """Type checking stubs"""
24587
+ pass
24588
+
24589
+ def _typecheckingstub__f76f41cb204d2ae2963a27d942e6861e29eae70b4ed5762816d1b6f31b1477c5(
24590
+ scope: _constructs_77d1e7e8.Construct,
24591
+ id: builtins.str,
24592
+ api_key_id: builtins.str,
24593
+ ) -> None:
24594
+ """Type checking stubs"""
24595
+ pass
24596
+
24597
+ def _typecheckingstub__ce9b01bd26cfea509e4d7bbddd06eb09db4a7f429082af90962d5b5c3825ab7d(
24598
+ grantee: _IGrantable_71c4f5de,
24599
+ ) -> None:
24600
+ """Type checking stubs"""
24601
+ pass
24602
+
24603
+ def _typecheckingstub__1927f55f5fccf80e91c10574698a5522929c80cae47332c837e9dfd8f8e053c2(
24604
+ grantee: _IGrantable_71c4f5de,
24605
+ ) -> None:
24606
+ """Type checking stubs"""
24607
+ pass
24608
+
24609
+ def _typecheckingstub__eb3bf1a09f37630c026370072be172a15006c00dde871dbc489e7fb912fbe310(
24610
+ grantee: _IGrantable_71c4f5de,
24611
+ ) -> None:
24612
+ """Type checking stubs"""
24613
+ pass
24614
+
22891
24615
  def _typecheckingstub__20562f173d26f5b2f63b53ea1553375396a2401df8e153d3e4cbaf824bffd090(
22892
24616
  scope: _constructs_77d1e7e8.Construct,
22893
24617
  id: builtins.str,