Class UsagePlanProps
Inheritance
System.Object
UsagePlanProps
Implements
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class UsagePlanProps : Object, IUsagePlanProps
Syntax (vb)
Public Class UsagePlanProps
Inherits Object
Implements IUsagePlanProps
Remarks
ExampleMetadata: infused
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);
Synopsis
Constructors
UsagePlanProps() |
Properties
ApiStages | API Stages to be associated with the usage plan. |
Description | Represents usage plan purpose. |
Name | Name for this usage plan. |
Quota | Number of requests clients can make in a given time period. |
Throttle | Overall throttle settings for the API. |
Constructors
UsagePlanProps()
public UsagePlanProps()
Properties
ApiStages
API Stages to be associated with the usage plan.
public IUsagePlanPerApiStage[] ApiStages { get; set; }
Property Value
Remarks
Default: none
Description
Represents usage plan purpose.
public string Description { get; set; }
Property Value
System.String
Remarks
Default: none
Name
Name for this usage plan.
public string Name { get; set; }
Property Value
System.String
Remarks
Default: none
Quota
Number of requests clients can make in a given time period.
public IQuotaSettings Quota { get; set; }
Property Value
Remarks
Default: none
Throttle
Overall throttle settings for the API.
public IThrottleSettings Throttle { get; set; }
Property Value
Remarks
Default: none