Show / Hide Table of Contents

Class MethodDeploymentOptions

Inheritance
System.Object
MethodDeploymentOptions
Implements
IMethodDeploymentOptions
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class MethodDeploymentOptions : Object, IMethodDeploymentOptions
Syntax (vb)
Public Class MethodDeploymentOptions
    Inherits Object
    Implements IMethodDeploymentOptions
Remarks

ExampleMetadata: infused

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 } }
    }
});

Synopsis

Constructors

MethodDeploymentOptions()

Properties

CacheDataEncrypted

Indicates whether the cached responses are encrypted.

CacheTtl

Specifies the time to live (TTL), in seconds, for cached responses.

CachingEnabled

Specifies whether responses should be cached and returned for requests.

DataTraceEnabled

Specifies whether data trace logging is enabled for this method.

LoggingLevel

Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.

MetricsEnabled

Specifies whether Amazon CloudWatch metrics are enabled for this method.

ThrottlingBurstLimit

Specifies the throttling burst limit.

ThrottlingRateLimit

Specifies the throttling rate limit.

Constructors

MethodDeploymentOptions()

public MethodDeploymentOptions()

Properties

CacheDataEncrypted

Indicates whether the cached responses are encrypted.

public Nullable<bool> CacheDataEncrypted { get; set; }
Property Value

System.Nullable<System.Boolean>

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 Nullable<bool> CachingEnabled { get; set; }
Property Value

System.Nullable<System.Boolean>

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 Nullable<bool> DataTraceEnabled { get; set; }
Property Value

System.Nullable<System.Boolean>

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 Nullable<MethodLoggingLevel> LoggingLevel { get; set; }
Property Value

System.Nullable<MethodLoggingLevel>

Remarks

Default: - Off

MetricsEnabled

Specifies whether Amazon CloudWatch metrics are enabled for this method.

public Nullable<bool> MetricsEnabled { get; set; }
Property Value

System.Nullable<System.Boolean>

Remarks

Default: false

ThrottlingBurstLimit

Specifies the throttling burst limit.

public Nullable<double> ThrottlingBurstLimit { get; set; }
Property Value

System.Nullable<System.Double>

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 Nullable<double> ThrottlingRateLimit { get; set; }
Property Value

System.Nullable<System.Double>

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

Implements

IMethodDeploymentOptions
Back to top Generated by DocFX