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);
 
  • Method Details

    • getApiKey

      @Stability(Deprecated) @Deprecated @Nullable default IApiKey getApiKey()
      Deprecated.
      use addApiKey()
      (deprecated) ApiKey to be associated with the usage plan.

      Default: none

    • getApiStages

      @Stability(Stable) @Nullable default List<UsagePlanPerApiStage> getApiStages()
      API Stages to be associated with the usage plan.

      Default: none

    • getDescription

      @Stability(Stable) @Nullable default String getDescription()
      Represents usage plan purpose.

      Default: none

    • getName

      @Stability(Stable) @Nullable default String getName()
      Name for this usage plan.

      Default: none

    • getQuota

      @Stability(Stable) @Nullable default QuotaSettings getQuota()
      Number of requests clients can make in a given time period.

      Default: none

    • getThrottle

      @Stability(Stable) @Nullable default ThrottleSettings getThrottle()
      Overall throttle settings for the API.

      Default: none

    • builder

      @Stability(Stable) static UsagePlanProps.Builder builder()
      Returns:
      a UsagePlanProps.Builder of UsagePlanProps