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
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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forMethodDeploymentOptions
static final class
An implementation forMethodDeploymentOptions
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Boolean
Indicates whether the cached responses are encrypted.default Duration
Specifies the time to live (TTL), in seconds, for cached responses.default Boolean
Specifies whether responses should be cached and returned for requests.default Boolean
Specifies whether data trace logging is enabled for this method.default MethodLoggingLevel
Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.default Boolean
Specifies whether Amazon CloudWatch metrics are enabled for this method.default Number
Specifies the throttling burst limit.default Number
Specifies the throttling rate limit.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCacheDataEncrypted
Indicates whether the cached responses are encrypted.Default: false
-
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)
-
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
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
Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.Default: - Off
-
getMetricsEnabled
Specifies whether Amazon CloudWatch metrics are enabled for this method.Default: false
-
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.
-
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.
-
builder
- Returns:
- a
MethodDeploymentOptions.Builder
ofMethodDeploymentOptions
-