RateLimitedApiKeyProps
- class aws_cdk.aws_apigateway.RateLimitedApiKeyProps(*, default_cors_preflight_options=None, default_integration=None, default_method_options=None, api_key_name=None, description=None, value=None, customer_id=None, enabled=None, generate_distinct_id=None, resources=None, stages=None, api_stages=None, quota=None, throttle=None)
Bases:
ApiKeyProps
RateLimitedApiKey properties.
- Parameters:
default_cors_preflight_options (
Union
[CorsOptions
,Dict
[str
,Any
],None
]) – Adds a CORS preflight OPTIONS method to this resource and all child resources. You can add CORS at the resource-level usingaddCorsPreflight
. Default: - CORS is disableddefault_integration (
Optional
[Integration
]) – An integration to use as a default for all methods created within this API unless an integration is specified. Default: - Inherited from parent.default_method_options (
Union
[MethodOptions
,Dict
[str
,Any
],None
]) – Method options to use as a default for all methods created within this API unless custom options are specified. Default: - Inherited from parent.api_key_name (
Optional
[str
]) – 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: automically generated namedescription (
Optional
[str
]) – A description of the purpose of the API key. Default: nonevalue (
Optional
[str
]) – The value of the API key. Must be at least 20 characters long. Default: nonecustomer_id (
Optional
[str
]) – An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace. Default: noneenabled (
Optional
[bool
]) – Indicates whether the API key can be used by clients. Default: truegenerate_distinct_id (
Optional
[bool
]) – Specifies whether the key identifier is distinct from the created API key value. Default: falseresources (
Optional
[Sequence
[IRestApi
]]) – (deprecated) A list of resources this api key is associated with. Default: nonestages (
Optional
[Sequence
[IStage
]]) – A list of Stages this api key is associated with. Default: - the api key is not associated with any stagesapi_stages (
Optional
[Sequence
[Union
[UsagePlanPerApiStage
,Dict
[str
,Any
]]]]) – API Stages to be associated with the RateLimitedApiKey. If you already prepared UsagePlan resource explicitly, you should usestages
property. If you prefer to prepare UsagePlan resource implicitly via RateLimitedApiKey, or you should specify throttle settings at each stage individually, you should useapiStages
property. Default: nonequota (
Union
[QuotaSettings
,Dict
[str
,Any
],None
]) – Number of requests clients can make in a given time period. Default: nonethrottle (
Union
[ThrottleSettings
,Dict
[str
,Any
],None
]) – Overall throttle settings for the API. Default: none
- ExampleMetadata:
infused
Example:
# api: apigateway.RestApi key = apigateway.RateLimitedApiKey(self, "rate-limited-api-key", customer_id="hello-customer", api_stages=[apigateway.UsagePlanPerApiStage(stage=api.deployment_stage)], quota=apigateway.QuotaSettings( limit=10000, period=apigateway.Period.MONTH ) )
Attributes
- 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:
automically generated name
- Link:
- 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 useapiStages
property.- Default:
none
- customer_id
An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
- default_cors_preflight_options
Adds a CORS preflight OPTIONS method to this resource and all child resources.
You can add CORS at the resource-level using
addCorsPreflight
.- Default:
CORS is disabled
- default_integration
An integration to use as a default for all methods created within this API unless an integration is specified.
- Default:
Inherited from parent.
- default_method_options
Method options to use as a default for all methods created within this API unless custom options are specified.
- Default:
Inherited from parent.
- description
A description of the purpose of the API key.
- enabled
Indicates whether the API key can be used by clients.
- generate_distinct_id
Specifies whether the key identifier is distinct from the created API key value.
- quota
Number of requests clients can make in a given time period.
- Default:
none
- resources
(deprecated) A list of resources this api key is associated with.
- Default:
none
- Deprecated:
use
stages
instead
- Stability:
deprecated
- stages
A list of Stages this api key is associated with.
- Default:
the api key is not associated with any stages
- throttle
Overall throttle settings for the API.
- Default:
none
- value
The value of the API key.
Must be at least 20 characters long.