Class: AWSCDK::APIGateway::StageProps
- Inherits:
-
StageOptions
- Object
- StageOptions
- AWSCDK::APIGateway::StageProps
- Defined in:
- api_gateway/stage_props.rb
Instance Attribute Summary collapse
-
#access_log_destination ⇒ AWSCDK::APIGateway::IAccessLogDestination?
readonly
The CloudWatch Logs log group or Firehose delivery stream where to write access logs.
-
#access_log_format ⇒ AWSCDK::APIGateway::AccessLogFormat?
readonly
A single line format of access logs of data, as specified by selected $content variables.
-
#cache_cluster_enabled ⇒ Boolean?
readonly
Indicates whether cache clustering is enabled for the stage.
-
#cache_cluster_size ⇒ String?
readonly
The stage's cache cluster size.
-
#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.
-
#client_certificate_id ⇒ String?
readonly
The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage.
-
#data_trace_enabled ⇒ Boolean?
readonly
Specifies whether data trace logging is enabled for this method.
-
#deployment ⇒ AWSCDK::APIGateway::Deployment
readonly
The deployment that this stage points to [disable-awslint:ref-via-interface].
-
#description ⇒ String?
readonly
A description of the purpose of the stage.
-
#documentation_version ⇒ String?
readonly
The version identifier of the API documentation snapshot.
-
#logging_level ⇒ AWSCDK::APIGateway::MethodLoggingLevel?
readonly
Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.
-
#method_options ⇒ Hash{String => AWSCDK::APIGateway::MethodDeploymentOptions}?
readonly
Method deployment options for specific resources/methods.
-
#metrics_enabled ⇒ Boolean?
readonly
Specifies whether Amazon CloudWatch metrics are enabled for this method.
-
#stage_name ⇒ String?
readonly
The name of the stage, which API Gateway uses as the first path segment in the invoked Uniform Resource Identifier (URI).
-
#throttling_burst_limit ⇒ Numeric?
readonly
Specifies the throttling burst limit.
-
#throttling_rate_limit ⇒ Numeric?
readonly
Specifies the throttling rate limit.
-
#tracing_enabled ⇒ Boolean?
readonly
Specifies whether Amazon X-Ray tracing is enabled for this method.
-
#variables ⇒ Hash{String => String}?
readonly
A map that defines the stage variables.
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, access_log_destination: nil, access_log_format: nil, cache_cluster_enabled: nil, cache_cluster_size: nil, client_certificate_id: nil, description: nil, documentation_version: nil, method_options: nil, stage_name: nil, tracing_enabled: nil, variables: nil, deployment:) ⇒ StageProps
constructor
A new instance of StageProps.
- #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, access_log_destination: nil, access_log_format: nil, cache_cluster_enabled: nil, cache_cluster_size: nil, client_certificate_id: nil, description: nil, documentation_version: nil, method_options: nil, stage_name: nil, tracing_enabled: nil, variables: nil, deployment:) ⇒ StageProps
Returns a new instance of StageProps.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'api_gateway/stage_props.rb', line 26 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, access_log_destination: nil, access_log_format: nil, cache_cluster_enabled: nil, cache_cluster_size: nil, client_certificate_id: nil, description: nil, documentation_version: nil, method_options: nil, stage_name: nil, tracing_enabled: nil, variables: nil, deployment:) @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? @access_log_destination = access_log_destination Jsii::Type.check_type(@access_log_destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5JQWNjZXNzTG9nRGVzdGluYXRpb24ifQ==")), "accessLogDestination") unless @access_log_destination.nil? @access_log_format = access_log_format Jsii::Type.check_type(@access_log_format, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5BY2Nlc3NMb2dGb3JtYXQifQ==")), "accessLogFormat") unless @access_log_format.nil? @cache_cluster_enabled = cache_cluster_enabled Jsii::Type.check_type(@cache_cluster_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "cacheClusterEnabled") unless @cache_cluster_enabled.nil? @cache_cluster_size = cache_cluster_size Jsii::Type.check_type(@cache_cluster_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cacheClusterSize") unless @cache_cluster_size.nil? @client_certificate_id = client_certificate_id Jsii::Type.check_type(@client_certificate_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clientCertificateId") unless @client_certificate_id.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @documentation_version = documentation_version Jsii::Type.check_type(@documentation_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "documentationVersion") unless @documentation_version.nil? @method_options = .is_a?(Hash) ? .transform_values { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::APIGateway::MethodDeploymentOptions.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@method_options, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5Lk1ldGhvZERlcGxveW1lbnRPcHRpb25zIn0sImtpbmQiOiJtYXAifX0=")), "methodOptions") unless @method_options.nil? @stage_name = stage_name Jsii::Type.check_type(@stage_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stageName") unless @stage_name.nil? @tracing_enabled = tracing_enabled Jsii::Type.check_type(@tracing_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "tracingEnabled") unless @tracing_enabled.nil? @variables = variables Jsii::Type.check_type(@variables, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "variables") unless @variables.nil? @deployment = deployment Jsii::Type.check_type(@deployment, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5EZXBsb3ltZW50In0=")), "deployment") end |
Instance Attribute Details
#access_log_destination ⇒ AWSCDK::APIGateway::IAccessLogDestination? (readonly)
Default: - No destination
The CloudWatch Logs log group or Firehose delivery stream where to write access logs.
130 131 132 |
# File 'api_gateway/stage_props.rb', line 130 def access_log_destination @access_log_destination end |
#access_log_format ⇒ AWSCDK::APIGateway::AccessLogFormat? (readonly)
Default: - Common Log Format
A single line format of access logs of data, as specified by selected $content variables.
The format must include either AccessLogFormat.contextRequestId()
or AccessLogFormat.contextExtendedRequestId().
139 140 141 |
# File 'api_gateway/stage_props.rb', line 139 def access_log_format @access_log_format end |
#cache_cluster_enabled ⇒ Boolean? (readonly)
Default: - Disabled for the stage.
Indicates whether cache clustering is enabled for the stage.
144 145 146 |
# File 'api_gateway/stage_props.rb', line 144 def cache_cluster_enabled @cache_cluster_enabled end |
#cache_cluster_size ⇒ String? (readonly)
Default: 0.5
The stage's cache cluster size.
149 150 151 |
# File 'api_gateway/stage_props.rb', line 149 def cache_cluster_size @cache_cluster_size end |
#cache_data_encrypted ⇒ Boolean? (readonly)
Default: false
Indicates whether the cached responses are encrypted.
73 74 75 |
# File 'api_gateway/stage_props.rb', line 73 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.
82 83 84 |
# File 'api_gateway/stage_props.rb', line 82 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.
90 91 92 |
# File 'api_gateway/stage_props.rb', line 90 def caching_enabled @caching_enabled end |
#client_certificate_id ⇒ String? (readonly)
Default: - None.
The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage.
154 155 156 |
# File 'api_gateway/stage_props.rb', line 154 def client_certificate_id @client_certificate_id 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.
99 100 101 |
# File 'api_gateway/stage_props.rb', line 99 def data_trace_enabled @data_trace_enabled end |
#deployment ⇒ AWSCDK::APIGateway::Deployment (readonly)
The deployment that this stage points to [disable-awslint:ref-via-interface].
195 196 197 |
# File 'api_gateway/stage_props.rb', line 195 def deployment @deployment end |
#description ⇒ String? (readonly)
Default: - No description.
A description of the purpose of the stage.
159 160 161 |
# File 'api_gateway/stage_props.rb', line 159 def description @description end |
#documentation_version ⇒ String? (readonly)
Default: - No documentation version.
The version identifier of the API documentation snapshot.
164 165 166 |
# File 'api_gateway/stage_props.rb', line 164 def documentation_version @documentation_version 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.
104 105 106 |
# File 'api_gateway/stage_props.rb', line 104 def logging_level @logging_level end |
#method_options ⇒ Hash{String => AWSCDK::APIGateway::MethodDeploymentOptions}? (readonly)
Default: - Common options will be used.
Method deployment options for specific resources/methods.
These will
override common options defined in StageOptions#methodOptions.
172 173 174 |
# File 'api_gateway/stage_props.rb', line 172 def @method_options end |
#metrics_enabled ⇒ Boolean? (readonly)
Default: false
Specifies whether Amazon CloudWatch metrics are enabled for this method.
109 110 111 |
# File 'api_gateway/stage_props.rb', line 109 def metrics_enabled @metrics_enabled end |
#stage_name ⇒ String? (readonly)
Default: - "prod"
The name of the stage, which API Gateway uses as the first path segment in the invoked Uniform Resource Identifier (URI).
177 178 179 |
# File 'api_gateway/stage_props.rb', line 177 def stage_name @stage_name 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.
117 118 119 |
# File 'api_gateway/stage_props.rb', line 117 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).
125 126 127 |
# File 'api_gateway/stage_props.rb', line 125 def throttling_rate_limit @throttling_rate_limit end |
#tracing_enabled ⇒ Boolean? (readonly)
Default: false
Specifies whether Amazon X-Ray tracing is enabled for this method.
182 183 184 |
# File 'api_gateway/stage_props.rb', line 182 def tracing_enabled @tracing_enabled end |
#variables ⇒ Hash{String => String}? (readonly)
Default: - No stage variables.
A map that defines the stage variables.
Variable names must consist of alphanumeric characters, and the values must match the following regular expression: [A-Za-z0-9-._~:/?#&=,]+.
191 192 193 |
# File 'api_gateway/stage_props.rb', line 191 def variables @variables end |
Class Method Details
.jsii_properties ⇒ Object
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'api_gateway/stage_props.rb', line 197 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", :access_log_destination => "accessLogDestination", :access_log_format => "accessLogFormat", :cache_cluster_enabled => "cacheClusterEnabled", :cache_cluster_size => "cacheClusterSize", :client_certificate_id => "clientCertificateId", :description => "description", :documentation_version => "documentationVersion", :method_options => "methodOptions", :stage_name => "stageName", :tracing_enabled => "tracingEnabled", :variables => "variables", :deployment => "deployment", } end |
Instance Method Details
#to_jsii ⇒ Object
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'api_gateway/stage_props.rb', line 222 def to_jsii result = {} result.merge!(super) 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, "accessLogDestination" => @access_log_destination, "accessLogFormat" => @access_log_format, "cacheClusterEnabled" => @cache_cluster_enabled, "cacheClusterSize" => @cache_cluster_size, "clientCertificateId" => @client_certificate_id, "description" => @description, "documentationVersion" => @documentation_version, "methodOptions" => @method_options, "stageName" => @stage_name, "tracingEnabled" => @tracing_enabled, "variables" => @variables, "deployment" => @deployment, }) result.compact end |