Interface MethodDeploymentOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
StageOptions, StageProps
All Known Implementing Classes:
MethodDeploymentOptions.Jsii$Proxy, StageOptions.Jsii$Proxy, StageProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:11.893Z") @Stability(Stable) public interface MethodDeploymentOptions extends software.amazon.jsii.JsiiSerializable
Example:

 RestApi api = new RestApi(this, "books");
 Deployment deployment = Deployment.Builder.create(this, "my-deployment").api(api).build();
 Stage stage = Stage.Builder.create(this, "my-stage")
         .deployment(deployment)
         .methodOptions(Map.of(
                 "/*/*", MethodDeploymentOptions.builder() // This special path applies to all resource paths and all HTTP methods
                         .throttlingRateLimit(100)
                         .throttlingBurstLimit(200).build()))
         .build();
 
  • Method Details

    • getCacheDataEncrypted

      @Stability(Stable) @Nullable default Boolean getCacheDataEncrypted()
      Indicates whether the cached responses are encrypted.

      Default: false

    • getCacheTtl

      @Stability(Stable) @Nullable default Duration getCacheTtl()
      Specifies the time to live (TTL), in seconds, for cached responses.

      The higher the TTL, the longer the response will be cached.

      Default: Duration.minutes(5)

      See Also:
    • getCachingEnabled

      @Stability(Stable) @Nullable default Boolean getCachingEnabled()
      Specifies whether responses should be cached and returned for requests.

      A cache cluster must be enabled on the stage for responses to be cached.

      Default: - Caching is Disabled.

    • getDataTraceEnabled

      @Stability(Stable) @Nullable default Boolean getDataTraceEnabled()
      Specifies whether data trace logging is enabled for this method.

      When enabled, API gateway will log the full API requests and responses. This can be useful to troubleshoot APIs, but can result in logging sensitive data. We recommend that you don't enable this feature for production APIs.

      Default: false

    • getLoggingLevel

      @Stability(Stable) @Nullable default MethodLoggingLevel getLoggingLevel()
      Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.

      Default: - Off

    • getMetricsEnabled

      @Stability(Stable) @Nullable default Boolean getMetricsEnabled()
      Specifies whether Amazon CloudWatch metrics are enabled for this method.

      Default: false

    • getThrottlingBurstLimit

      @Stability(Stable) @Nullable default Number getThrottlingBurstLimit()
      Specifies the throttling burst limit.

      The total rate of all requests in your AWS account is limited to 5,000 requests.

      Default: - No additional restriction.

      See Also:
    • getThrottlingRateLimit

      @Stability(Stable) @Nullable default Number getThrottlingRateLimit()
      Specifies the throttling rate limit.

      The total rate of all requests in your AWS account is limited to 10,000 requests per second (rps).

      Default: - No additional restriction.

      See Also:
    • builder

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