Table of Contents

Interface IThrottleSettings

Namespace
Amazon.CDK.AWS.APIGateway
Assembly
Amazon.CDK.AWS.APIGateway.dll

Container for defining throttling parameters to API stages or methods.

public interface IThrottleSettings

Examples

LambdaIntegration integration;


             var api = new RestApi(this, "hello-api");

             var v1 = api.Root.AddResource("v1");
             var echo = v1.AddResource("echo");
             var echoMethod = echo.AddMethod("GET", integration, new MethodOptions { ApiKeyRequired = true });

             var plan = api.AddUsagePlan("UsagePlan", new UsagePlanProps {
                 Name = "Easy",
                 Throttle = new ThrottleSettings {
                     RateLimit = 10,
                     BurstLimit = 2
                 }
             });

             var key = api.AddApiKey("ApiKey");
             plan.AddApiKey(key);

Remarks

Properties

BurstLimit

The maximum API request rate limit over a time ranging from one to a few seconds.

double? BurstLimit { get; }

Property Value

double?

Remarks

Default: none

RateLimit

The API request steady-state rate limit (average requests per second over an extended period of time).

double? RateLimit { get; }

Property Value

double?

Remarks

Default: none