Class: AWSCDK::APIGateway::MethodDeploymentOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::MethodDeploymentOptions
- Defined in:
- api_gateway/method_deployment_options.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cache_data_encrypted ⇒ Boolean?
readonly
Indicates whether the cached responses are encrypted.
-
#cache_ttl ⇒ AWSCDK::Duration?
readonly
Specifies the time to live (TTL), in seconds, for cached responses.
-
#caching_enabled ⇒ Boolean?
readonly
Specifies whether responses should be cached and returned for requests.
-
#data_trace_enabled ⇒ Boolean?
readonly
Specifies whether data trace logging is enabled for this method.
-
#logging_level ⇒ AWSCDK::APIGateway::MethodLoggingLevel?
readonly
Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.
-
#metrics_enabled ⇒ Boolean?
readonly
Specifies whether Amazon CloudWatch metrics are enabled for this method.
-
#throttling_burst_limit ⇒ Numeric?
readonly
Specifies the throttling burst limit.
-
#throttling_rate_limit ⇒ Numeric?
readonly
Specifies the throttling rate limit.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cache_data_encrypted: nil, cache_ttl: nil, caching_enabled: nil, data_trace_enabled: nil, logging_level: nil, metrics_enabled: nil, throttling_burst_limit: nil, throttling_rate_limit: nil) ⇒ MethodDeploymentOptions
constructor
A new instance of MethodDeploymentOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cache_data_encrypted: nil, cache_ttl: nil, caching_enabled: nil, data_trace_enabled: nil, logging_level: nil, metrics_enabled: nil, throttling_burst_limit: nil, throttling_rate_limit: nil) ⇒ MethodDeploymentOptions
Returns a new instance of MethodDeploymentOptions.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'api_gateway/method_deployment_options.rb', line 14 def initialize(cache_data_encrypted: nil, cache_ttl: nil, caching_enabled: nil, data_trace_enabled: nil, logging_level: nil, metrics_enabled: nil, throttling_burst_limit: nil, throttling_rate_limit: nil) @cache_data_encrypted = cache_data_encrypted Jsii::Type.check_type(@cache_data_encrypted, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "cacheDataEncrypted") unless @cache_data_encrypted.nil? @cache_ttl = cache_ttl Jsii::Type.check_type(@cache_ttl, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "cacheTtl") unless @cache_ttl.nil? @caching_enabled = caching_enabled Jsii::Type.check_type(@caching_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "cachingEnabled") unless @caching_enabled.nil? @data_trace_enabled = data_trace_enabled Jsii::Type.check_type(@data_trace_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "dataTraceEnabled") unless @data_trace_enabled.nil? @logging_level = logging_level Jsii::Type.check_type(@logging_level, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5NZXRob2RMb2dnaW5nTGV2ZWwifQ==")), "loggingLevel") unless @logging_level.nil? @metrics_enabled = metrics_enabled Jsii::Type.check_type(@metrics_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "metricsEnabled") unless @metrics_enabled.nil? @throttling_burst_limit = throttling_burst_limit Jsii::Type.check_type(@throttling_burst_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "throttlingBurstLimit") unless @throttling_burst_limit.nil? @throttling_rate_limit = throttling_rate_limit Jsii::Type.check_type(@throttling_rate_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "throttlingRateLimit") unless @throttling_rate_limit.nil? end |
Instance Attribute Details
#cache_data_encrypted ⇒ Boolean? (readonly)
Default: false
Indicates whether the cached responses are encrypted.
37 38 39 |
# File 'api_gateway/method_deployment_options.rb', line 37 def cache_data_encrypted @cache_data_encrypted end |
#cache_ttl ⇒ AWSCDK::Duration? (readonly)
Default: Duration.minutes(5)
Specifies the time to live (TTL), in seconds, for cached responses.
The higher the TTL, the longer the response will be cached.
46 47 48 |
# File 'api_gateway/method_deployment_options.rb', line 46 def cache_ttl @cache_ttl end |
#caching_enabled ⇒ Boolean? (readonly)
Default: - Caching is Disabled.
Specifies whether responses should be cached and returned for requests.
A cache cluster must be enabled on the stage for responses to be cached.
54 55 56 |
# File 'api_gateway/method_deployment_options.rb', line 54 def caching_enabled @caching_enabled end |
#data_trace_enabled ⇒ Boolean? (readonly)
Default: false
Specifies whether data trace logging is enabled for this method.
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.
63 64 65 |
# File 'api_gateway/method_deployment_options.rb', line 63 def data_trace_enabled @data_trace_enabled end |
#logging_level ⇒ AWSCDK::APIGateway::MethodLoggingLevel? (readonly)
Default: - Off
Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.
68 69 70 |
# File 'api_gateway/method_deployment_options.rb', line 68 def logging_level @logging_level end |
#metrics_enabled ⇒ Boolean? (readonly)
Default: false
Specifies whether Amazon CloudWatch metrics are enabled for this method.
73 74 75 |
# File 'api_gateway/method_deployment_options.rb', line 73 def metrics_enabled @metrics_enabled end |
#throttling_burst_limit ⇒ Numeric? (readonly)
Default: - No additional restriction.
Specifies the throttling burst limit.
The total rate of all requests in your AWS account is limited to 5,000 requests.
81 82 83 |
# File 'api_gateway/method_deployment_options.rb', line 81 def throttling_burst_limit @throttling_burst_limit end |
#throttling_rate_limit ⇒ Numeric? (readonly)
Default: - No additional restriction.
Specifies the throttling rate limit.
The total rate of all requests in your AWS account is limited to 10,000 requests per second (rps).
89 90 91 |
# File 'api_gateway/method_deployment_options.rb', line 89 def throttling_rate_limit @throttling_rate_limit end |
Class Method Details
.jsii_properties ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'api_gateway/method_deployment_options.rb', line 91 def self.jsii_properties { :cache_data_encrypted => "cacheDataEncrypted", :cache_ttl => "cacheTtl", :caching_enabled => "cachingEnabled", :data_trace_enabled => "dataTraceEnabled", :logging_level => "loggingLevel", :metrics_enabled => "metricsEnabled", :throttling_burst_limit => "throttlingBurstLimit", :throttling_rate_limit => "throttlingRateLimit", } end |
Instance Method Details
#to_jsii ⇒ Object
104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'api_gateway/method_deployment_options.rb', line 104 def to_jsii result = {} result.merge!({ "cacheDataEncrypted" => @cache_data_encrypted, "cacheTtl" => @cache_ttl, "cachingEnabled" => @caching_enabled, "dataTraceEnabled" => @data_trace_enabled, "loggingLevel" => @logging_level, "metricsEnabled" => @metrics_enabled, "throttlingBurstLimit" => @throttling_burst_limit, "throttlingRateLimit" => @throttling_rate_limit, }) result.compact end |