Interface IUsagePlanProps
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
public interface IUsagePlanProps
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
ExampleMetadata: infused
Properties
ApiKey
(deprecated) ApiKey to be associated with the usage plan.
[Obsolete("use `addApiKey()`")]
IApiKey? ApiKey { get; }
Property Value
Remarks
Default: none
Stability: Deprecated
ApiStages
API Stages to be associated with the usage plan.
IUsagePlanPerApiStage[]? ApiStages { get; }
Property Value
Remarks
Default: none
Description
Represents usage plan purpose.
string? Description { get; }
Property Value
Remarks
Default: none
Name
Name for this usage plan.
string? Name { get; }
Property Value
Remarks
Default: none
Quota
Number of requests clients can make in a given time period.
IQuotaSettings? Quota { get; }
Property Value
Remarks
Default: none
Throttle
Overall throttle settings for the API.
IThrottleSettings? Throttle { get; }
Property Value
Remarks
Default: none