UsagePlanProps
- class aws_cdk.aws_apigateway.UsagePlanProps(*, api_stages=None, description=None, name=None, quota=None, throttle=None)
Bases:
object
- Parameters:
api_stages (
Optional
[Sequence
[Union
[UsagePlanPerApiStage
,Dict
[str
,Any
]]]]) – API Stages to be associated with the usage plan. Default: nonedescription (
Optional
[str
]) – Represents usage plan purpose. Default: nonename (
Optional
[str
]) – Name for this usage plan. 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:
# integration: apigateway.LambdaIntegration api = apigateway.RestApi(self, "hello-api") v1 = api.root.add_resource("v1") echo = v1.add_resource("echo") echo_method = echo.add_method("GET", integration, api_key_required=True) plan = api.add_usage_plan("UsagePlan", name="Easy", throttle=apigateway.ThrottleSettings( rate_limit=10, burst_limit=2 ) ) key = api.add_api_key("ApiKey") plan.add_api_key(key)
Attributes
- api_stages
API Stages to be associated with the usage plan.
- Default:
none
- description
Represents usage plan purpose.
- Default:
none
- name
Name for this usage plan.
- Default:
none
- quota
Number of requests clients can make in a given time period.
- Default:
none
- throttle
Overall throttle settings for the API.
- Default:
none