aws-cdk-lib.aws_apigateway.ThrottleSettings

interface ThrottleSettings

LanguageType name
.NETAmazon.CDK.AWS.APIGateway.ThrottleSettings
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#ThrottleSettings
Javasoftware.amazon.awscdk.services.apigateway.ThrottleSettings
Pythonaws_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

NameTypeDescription
burstLimit?numberThe maximum API request rate limit over a time ranging from one to a few seconds.
rateLimit?numberThe 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).