Class CfnStage.MethodSettingProperty.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.CfnStage.MethodSettingProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnStage.MethodSettingProperty>
- Enclosing interface:
CfnStage.MethodSettingProperty
@Stability(Stable)
public static final class CfnStage.MethodSettingProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnStage.MethodSettingProperty>
A builder for
CfnStage.MethodSettingProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.cacheDataEncrypted(Boolean cacheDataEncrypted) Sets the value ofCfnStage.MethodSettingProperty.getCacheDataEncrypted()cacheDataEncrypted(IResolvable cacheDataEncrypted) Sets the value ofCfnStage.MethodSettingProperty.getCacheDataEncrypted()cacheTtlInSeconds(Number cacheTtlInSeconds) Sets the value ofCfnStage.MethodSettingProperty.getCacheTtlInSeconds()cachingEnabled(Boolean cachingEnabled) Sets the value ofCfnStage.MethodSettingProperty.getCachingEnabled()cachingEnabled(IResolvable cachingEnabled) Sets the value ofCfnStage.MethodSettingProperty.getCachingEnabled()dataTraceEnabled(Boolean dataTraceEnabled) Sets the value ofCfnStage.MethodSettingProperty.getDataTraceEnabled()dataTraceEnabled(IResolvable dataTraceEnabled) Sets the value ofCfnStage.MethodSettingProperty.getDataTraceEnabled()httpMethod(String httpMethod) Sets the value ofCfnStage.MethodSettingProperty.getHttpMethod()loggingLevel(String loggingLevel) Sets the value ofCfnStage.MethodSettingProperty.getLoggingLevel()metricsEnabled(Boolean metricsEnabled) Sets the value ofCfnStage.MethodSettingProperty.getMetricsEnabled()metricsEnabled(IResolvable metricsEnabled) Sets the value ofCfnStage.MethodSettingProperty.getMetricsEnabled()resourcePath(String resourcePath) Sets the value ofCfnStage.MethodSettingProperty.getResourcePath()throttlingBurstLimit(Number throttlingBurstLimit) Sets the value ofCfnStage.MethodSettingProperty.getThrottlingBurstLimit()throttlingRateLimit(Number throttlingRateLimit) Sets the value ofCfnStage.MethodSettingProperty.getThrottlingRateLimit()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cacheDataEncrypted
@Stability(Stable) public CfnStage.MethodSettingProperty.Builder cacheDataEncrypted(Boolean cacheDataEncrypted) Sets the value ofCfnStage.MethodSettingProperty.getCacheDataEncrypted()- Parameters:
cacheDataEncrypted- Specifies whether the cached responses are encrypted.- Returns:
this
-
cacheDataEncrypted
@Stability(Stable) public CfnStage.MethodSettingProperty.Builder cacheDataEncrypted(IResolvable cacheDataEncrypted) Sets the value ofCfnStage.MethodSettingProperty.getCacheDataEncrypted()- Parameters:
cacheDataEncrypted- Specifies whether the cached responses are encrypted.- Returns:
this
-
cacheTtlInSeconds
@Stability(Stable) public CfnStage.MethodSettingProperty.Builder cacheTtlInSeconds(Number cacheTtlInSeconds) Sets the value ofCfnStage.MethodSettingProperty.getCacheTtlInSeconds()- Parameters:
cacheTtlInSeconds- Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached.- Returns:
this
-
cachingEnabled
@Stability(Stable) public CfnStage.MethodSettingProperty.Builder cachingEnabled(Boolean cachingEnabled) Sets the value ofCfnStage.MethodSettingProperty.getCachingEnabled()- Parameters:
cachingEnabled- Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached.- Returns:
this
-
cachingEnabled
@Stability(Stable) public CfnStage.MethodSettingProperty.Builder cachingEnabled(IResolvable cachingEnabled) Sets the value ofCfnStage.MethodSettingProperty.getCachingEnabled()- Parameters:
cachingEnabled- Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached.- Returns:
this
-
dataTraceEnabled
@Stability(Stable) public CfnStage.MethodSettingProperty.Builder dataTraceEnabled(Boolean dataTraceEnabled) Sets the value ofCfnStage.MethodSettingProperty.getDataTraceEnabled()- Parameters:
dataTraceEnabled- 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.- Returns:
this
-
dataTraceEnabled
@Stability(Stable) public CfnStage.MethodSettingProperty.Builder dataTraceEnabled(IResolvable dataTraceEnabled) Sets the value ofCfnStage.MethodSettingProperty.getDataTraceEnabled()- Parameters:
dataTraceEnabled- 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.- Returns:
this
-
httpMethod
Sets the value ofCfnStage.MethodSettingProperty.getHttpMethod()- Parameters:
httpMethod- The HTTP method. To apply settings to multiple resources and methods, specify an asterisk (*) for theHttpMethodand/*for theResourcePath. This parameter is required when you specify aMethodSetting.- Returns:
this
-
loggingLevel
Sets the value ofCfnStage.MethodSettingProperty.getLoggingLevel()- Parameters:
loggingLevel- Specifies the logging level for this method, which affects the log entries pushed to Amazon CloudWatch Logs. Valid values areOFF,ERROR, andINFO. ChooseERRORto write only error-level entries to CloudWatch Logs, or chooseINFOto include allERRORevents as well as extra informational events.- Returns:
this
-
metricsEnabled
@Stability(Stable) public CfnStage.MethodSettingProperty.Builder metricsEnabled(Boolean metricsEnabled) Sets the value ofCfnStage.MethodSettingProperty.getMetricsEnabled()- Parameters:
metricsEnabled- Specifies whether Amazon CloudWatch metrics are enabled for this method.- Returns:
this
-
metricsEnabled
@Stability(Stable) public CfnStage.MethodSettingProperty.Builder metricsEnabled(IResolvable metricsEnabled) Sets the value ofCfnStage.MethodSettingProperty.getMetricsEnabled()- Parameters:
metricsEnabled- Specifies whether Amazon CloudWatch metrics are enabled for this method.- Returns:
this
-
resourcePath
Sets the value ofCfnStage.MethodSettingProperty.getResourcePath()- Parameters:
resourcePath- The resource path for this method. Forward slashes (/) are encoded as~1and the initial slash must include a forward slash. For example, the path value/resource/subresourcemust be encoded as/~1resource~1subresource. To specify the root path, use only a slash (/). To apply settings to multiple resources and methods, specify an asterisk (*) for theHttpMethodand/*for theResourcePath. This parameter is required when you specify aMethodSetting.- Returns:
this
-
throttlingBurstLimit
@Stability(Stable) public CfnStage.MethodSettingProperty.Builder throttlingBurstLimit(Number throttlingBurstLimit) Sets the value ofCfnStage.MethodSettingProperty.getThrottlingBurstLimit()- Parameters:
throttlingBurstLimit- Specifies the throttling burst limit.- Returns:
this
-
throttlingRateLimit
@Stability(Stable) public CfnStage.MethodSettingProperty.Builder throttlingRateLimit(Number throttlingRateLimit) Sets the value ofCfnStage.MethodSettingProperty.getThrottlingRateLimit()- Parameters:
throttlingRateLimit- Specifies the throttling rate limit.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnStage.MethodSettingProperty>- Returns:
- a new instance of
CfnStage.MethodSettingProperty - Throws:
NullPointerException- if any required attribute was not provided
-