Interface UsagePlanProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
UsagePlanProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:45.133Z")
@Stability(Stable)
public interface UsagePlanProps
extends software.amazon.jsii.JsiiSerializable
Example:
LambdaIntegration integration; RestApi api = new RestApi(this, "hello-api"); Resource v1 = api.root.addResource("v1"); Resource echo = v1.addResource("echo"); Method echoMethod = echo.addMethod("GET", integration, MethodOptions.builder().apiKeyRequired(true).build()); UsagePlan plan = api.addUsagePlan("UsagePlan", UsagePlanProps.builder() .name("Easy") .throttle(ThrottleSettings.builder() .rateLimit(10) .burstLimit(2) .build()) .build()); IApiKey key = api.addApiKey("ApiKey"); plan.addApiKey(key);
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forUsagePlanProps
static final class
An implementation forUsagePlanProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic UsagePlanProps.Builder
builder()
default IApiKey
Deprecated.default List<UsagePlanPerApiStage>
API Stages to be associated with the usage plan.default String
Represents usage plan purpose.default String
getName()
Name for this usage plan.default QuotaSettings
getQuota()
Number of requests clients can make in a given time period.default ThrottleSettings
Overall throttle settings for the API.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getApiKey
Deprecated.useaddApiKey()
(deprecated) ApiKey to be associated with the usage plan.Default: none
-
getApiStages
API Stages to be associated with the usage plan.Default: none
-
getDescription
Represents usage plan purpose.Default: none
-
getName
Name for this usage plan.Default: none
-
getQuota
Number of requests clients can make in a given time period.Default: none
-
getThrottle
Overall throttle settings for the API.Default: none
-
builder
- Returns:
- a
UsagePlanProps.Builder
ofUsagePlanProps
-
addApiKey()