interface MethodSettingProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.APIGateway.CfnDeployment.MethodSettingProperty |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#CfnDeployment_MethodSettingProperty |
![]() | software.amazon.awscdk.services.apigateway.CfnDeployment.MethodSettingProperty |
![]() | aws_cdk.aws_apigateway.CfnDeployment.MethodSettingProperty |
![]() | 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
Name | Type | Description |
---|---|---|
cache | boolean | IResolvable | Specifies whether the cached responses are encrypted. |
cache | number | Specifies the time to live (TTL), in seconds, for cached responses. |
caching | boolean | IResolvable | Specifies whether responses should be cached and returned for requests. |
data | boolean | IResolvable | Specifies whether data trace logging is enabled for this method, which affects the log entries pushed to Amazon CloudWatch Logs. |
http | string | The HTTP method. |
logging | string | Specifies the logging level for this method, which affects the log entries pushed to Amazon CloudWatch Logs. |
metrics | boolean | IResolvable | Specifies whether Amazon CloudWatch metrics are enabled for this method. |
resource | string | The resource path for this method. |
throttling | number | Specifies the throttling burst limit. |
throttling | number | Specifies 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.
This can be useful to troubleshoot APIs, but can result in logging sensitive data. We recommend that you don't enable this option for production APIs.
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.