MethodSettingProperty Struct
The MethodSetting property type configures settings for all methods in a stage.
If you modify this property type, you must create a new deployment for your API.
The MethodSettings property of the Amazon API Gateway Deployment StageDescription property type contains a list of MethodSetting property types.
| Source | |
|---|---|
| Type last changed |
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,
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigateway as apigateway
method_setting_property = apigateway.CfnDeployment.MethodSettingProperty(
cache_data_encrypted=False,
cache_ttl_in_seconds=123,
caching_enabled=False,
data_trace_enabled=False,
http_method="httpMethod",
logging_level="loggingLevel",
metrics_enabled=False,
resource_path="resourcePath",
throttling_burst_limit=123,
throttling_rate_limit=123
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigateway.*;
MethodSettingProperty methodSettingProperty = MethodSettingProperty.builder()
.cacheDataEncrypted(false)
.cacheTtlInSeconds(123)
.cachingEnabled(false)
.dataTraceEnabled(false)
.httpMethod("httpMethod")
.loggingLevel("loggingLevel")
.metricsEnabled(false)
.resourcePath("resourcePath")
.throttlingBurstLimit(123)
.throttlingRateLimit(123)
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGateway;
var methodSettingProperty = new MethodSettingProperty {
CacheDataEncrypted = false,
CacheTtlInSeconds = 123,
CachingEnabled = false,
DataTraceEnabled = false,
HttpMethod = "httpMethod",
LoggingLevel = "loggingLevel",
MetricsEnabled = false,
ResourcePath = "resourcePath",
ThrottlingBurstLimit = 123,
ThrottlingRateLimit = 123
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
methodSettingProperty := &MethodSettingProperty{
CacheDataEncrypted: jsii.Boolean(false),
CacheTtlInSeconds: jsii.Number(123),
CachingEnabled: jsii.Boolean(false),
DataTraceEnabled: jsii.Boolean(false),
HttpMethod: jsii.String("httpMethod"),
LoggingLevel: jsii.String("loggingLevel"),
MetricsEnabled: jsii.Boolean(false),
ResourcePath: jsii.String("resourcePath"),
ThrottlingBurstLimit: jsii.Number(123),
ThrottlingRateLimit: jsii.Number(123),
}
Properties
cacheDataEncryptedoptionalboolean | IResolvablecache_data_encryptedoptionaltyping.Union[bool, IResolvable]cacheDataEncryptedoptionalBooleanCacheDataEncryptedoptionalboolCacheDataEncryptedoptionalinterface{} #cacheTtlInSecondsoptionalnumbercache_ttl_in_secondsoptionalint | floatcacheTtlInSecondsoptionalNumberCacheTtlInSecondsoptionaldoubleCacheTtlInSecondsoptional*float64 #The higher the TTL, the longer the response will be cached.
cachingEnabledoptionalboolean | IResolvablecaching_enabledoptionaltyping.Union[bool, IResolvable]cachingEnabledoptionalBooleanCachingEnabledoptionalboolCachingEnabledoptionalinterface{} #A cache cluster must be enabled on the stage for responses to be cached.
dataTraceEnabledoptionalboolean | IResolvabledata_trace_enabledoptionaltyping.Union[bool, IResolvable]dataTraceEnabledoptionalBooleanDataTraceEnabledoptionalboolDataTraceEnabledoptionalinterface{} #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.
httpMethodoptionalstringhttp_methodoptionalstrhttpMethodoptionalStringHttpMethodoptionalstringHttpMethodoptional*string #loggingLeveloptionalstringlogging_leveloptionalstrloggingLeveloptionalStringLoggingLeveloptionalstringLoggingLeveloptional*string #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.
metricsEnabledoptionalboolean | IResolvablemetrics_enabledoptionaltyping.Union[bool, IResolvable]metricsEnabledoptionalBooleanMetricsEnabledoptionalboolMetricsEnabledoptionalinterface{} #resourcePathoptionalstringresource_pathoptionalstrresourcePathoptionalStringResourcePathoptionalstringResourcePathoptional*string #notes
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 ( / ).
throttlingBurstLimitoptionalnumberthrottling_burst_limitoptionalint | floatthrottlingBurstLimitoptionalNumberThrottlingBurstLimitoptionaldoubleThrottlingBurstLimitoptional*float64 #throttlingRateLimitoptionalnumberthrottling_rate_limitoptionalint | floatthrottlingRateLimitoptionalNumberThrottlingRateLimitoptionaldoubleThrottlingRateLimitoptional*float64 #