aws-cdk-lib.aws_apigateway.CfnDeployment.MethodSettingProperty

interface MethodSettingProperty

LanguageType name
.NETAmazon.CDK.AWS.APIGateway.CfnDeployment.MethodSettingProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#CfnDeployment_MethodSettingProperty
Javasoftware.amazon.awscdk.services.apigateway.CfnDeployment.MethodSettingProperty
Pythonaws_cdk.aws_apigateway.CfnDeployment.MethodSettingProperty
TypeScript aws-cdk-lib » aws_apigateway » CfnDeployment » MethodSettingProperty

The MethodSetting property type configures settings for all methods in a stage.

The MethodSettings property of the Amazon API Gateway Deployment StageDescription property type contains a list of MethodSetting property types.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigateway as apigateway } from 'aws-cdk-lib';
const methodSettingProperty: apigateway.CfnDeployment.MethodSettingProperty = {
  cacheDataEncrypted: false,
  cacheTtlInSeconds: 123,
  cachingEnabled: false,
  dataTraceEnabled: false,
  httpMethod: 'httpMethod',
  loggingLevel: 'loggingLevel',
  metricsEnabled: false,
  resourcePath: 'resourcePath',
  throttlingBurstLimit: 123,
  throttlingRateLimit: 123,
};

Properties

NameTypeDescription
cacheDataEncrypted?boolean | IResolvableSpecifies whether the cached responses are encrypted.
cacheTtlInSeconds?numberSpecifies the time to live (TTL), in seconds, for cached responses.
cachingEnabled?boolean | IResolvableSpecifies whether responses should be cached and returned for requests.
dataTraceEnabled?boolean | IResolvableSpecifies whether data trace logging is enabled for this method, which affects the log entries pushed to Amazon CloudWatch Logs.
httpMethod?stringThe HTTP method.
loggingLevel?stringSpecifies the logging level for this method, which affects the log entries pushed to Amazon CloudWatch Logs.
metricsEnabled?boolean | IResolvableSpecifies whether Amazon CloudWatch metrics are enabled for this method.
resourcePath?stringThe resource path for this method.
throttlingBurstLimit?numberSpecifies the throttling burst limit.
throttlingRateLimit?numberSpecifies the throttling rate limit.

cacheDataEncrypted?

Type: boolean | IResolvable (optional)

Specifies whether the cached responses are encrypted.


cacheTtlInSeconds?

Type: number (optional)

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

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


cachingEnabled?

Type: boolean | IResolvable (optional)

Specifies whether responses should be cached and returned for requests.

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


dataTraceEnabled?

Type: boolean | IResolvable (optional)

Specifies whether data trace logging is enabled for this method, which affects the log entries pushed to Amazon CloudWatch Logs.


httpMethod?

Type: string (optional)

The HTTP method.


loggingLevel?

Type: string (optional)

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

Valid values are OFF , ERROR , and INFO . Choose ERROR to write only error-level entries to CloudWatch Logs, or choose INFO to include all ERROR events as well as extra informational events.


metricsEnabled?

Type: boolean | IResolvable (optional)

Specifies whether Amazon CloudWatch metrics are enabled for this method.


resourcePath?

Type: string (optional)

The resource path for this method.

Forward slashes ( / ) are encoded as ~1 and the initial slash must include a forward slash. For example, the path value /resource/subresource must be encoded as /~1resource~1subresource . To specify the root path, use only a slash ( / ).


throttlingBurstLimit?

Type: number (optional)

Specifies the throttling burst limit.


throttlingRateLimit?

Type: number (optional)

Specifies the throttling rate limit.