Class MethodDeploymentOptions
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
public class MethodDeploymentOptions : IMethodDeploymentOptions
- Inheritance
-
MethodDeploymentOptions
- Implements
- Inherited Members
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
Constructors
MethodDeploymentOptions()
public MethodDeploymentOptions()
Properties
CacheDataEncrypted
Indicates whether the cached responses are encrypted.
public bool? CacheDataEncrypted { get; set; }
Property Value
- bool?
Remarks
Default: false
CacheTtl
Specifies the time to live (TTL), in seconds, for cached responses.
public Duration? CacheTtl { get; set; }
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.
public bool? CachingEnabled { get; set; }
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.
public bool? DataTraceEnabled { get; set; }
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.
public MethodLoggingLevel? LoggingLevel { get; set; }
Property Value
Remarks
Default: - Off
MetricsEnabled
Specifies whether Amazon CloudWatch metrics are enabled for this method.
public bool? MetricsEnabled { get; set; }
Property Value
- bool?
Remarks
Default: false
ThrottlingBurstLimit
Specifies the throttling burst limit.
public double? ThrottlingBurstLimit { get; set; }
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.
public double? ThrottlingRateLimit { get; set; }
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