interface ThrottleSettings
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.APIGateway.ThrottleSettings |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#ThrottleSettings |
Java | software.amazon.awscdk.services.apigateway.ThrottleSettings |
Python | aws_cdk.aws_apigateway.ThrottleSettings |
TypeScript (source) | aws-cdk-lib » aws_apigateway » ThrottleSettings |
Container for defining throttling parameters to API stages or methods.
Example
declare const integration: apigateway.LambdaIntegration;
const api = new apigateway.RestApi(this, 'hello-api');
const v1 = api.root.addResource('v1');
const echo = v1.addResource('echo');
const echoMethod = echo.addMethod('GET', integration, { apiKeyRequired: true });
const plan = api.addUsagePlan('UsagePlan', {
name: 'Easy',
throttle: {
rateLimit: 10,
burstLimit: 2
}
});
const key = api.addApiKey('ApiKey');
plan.addApiKey(key);
Properties
Name | Type | Description |
---|---|---|
burst | number | The maximum API request rate limit over a time ranging from one to a few seconds. |
rate | number | The API request steady-state rate limit (average requests per second over an extended period of time). |
burstLimit?
Type:
number
(optional, default: none)
The maximum API request rate limit over a time ranging from one to a few seconds.
rateLimit?
Type:
number
(optional, default: none)
The API request steady-state rate limit (average requests per second over an extended period of time).