Interface IMethodDeploymentOptions
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
public interface IMethodDeploymentOptions
Examples
var api = new RestApi(this, "books");
var deployment = new Deployment(this, "my-deployment", new DeploymentProps { Api = api });
var stage = new Stage(this, "my-stage", new StageProps {
Deployment = deployment,
MethodOptions = new Dictionary<string, MethodDeploymentOptions> {
{ "/*/*", new MethodDeploymentOptions { // This special path applies to all resource paths and all HTTP methods
ThrottlingRateLimit = 100,
ThrottlingBurstLimit = 200 } }
}
});
Remarks
ExampleMetadata: infused
Properties
CacheDataEncrypted
Indicates whether the cached responses are encrypted.
bool? CacheDataEncrypted { get; }
Property Value
- bool?
Remarks
Default: false
CacheTtl
Specifies the time to live (TTL), in seconds, for cached responses.
Duration? CacheTtl { get; }
Property Value
- Duration
Remarks
The higher the TTL, the longer the response will be cached.
Default: Duration.minutes(5)
See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html
CachingEnabled
Specifies whether responses should be cached and returned for requests.
bool? CachingEnabled { get; }
Property Value
- bool?
Remarks
A cache cluster must be enabled on the stage for responses to be cached.
Default: - Caching is Disabled.
DataTraceEnabled
Specifies whether data trace logging is enabled for this method.
bool? DataTraceEnabled { get; }
Property Value
- bool?
Remarks
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
LoggingLevel
Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.
MethodLoggingLevel? LoggingLevel { get; }
Property Value
Remarks
Default: - Off
MetricsEnabled
Specifies whether Amazon CloudWatch metrics are enabled for this method.
bool? MetricsEnabled { get; }
Property Value
- bool?
Remarks
Default: false
ThrottlingBurstLimit
Specifies the throttling burst limit.
double? ThrottlingBurstLimit { get; }
Property Value
Remarks
The total rate of all requests in your AWS account is limited to 5,000 requests.
Default: - No additional restriction.
See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html
ThrottlingRateLimit
Specifies the throttling rate limit.
double? ThrottlingRateLimit { get; }
Property Value
Remarks
The total rate of all requests in your AWS account is limited to 10,000 requests per second (rps).
Default: - No additional restriction.
See: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html