Class: AWSCDK::APIGateway::CfnStageProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::CfnStageProps
- Defined in:
- api_gateway/cfn_stage_props.rb
Overview
Properties for defining a CfnStage.
Instance Attribute Summary collapse
-
#access_log_setting ⇒ AWSCDK::IResolvable, ...
readonly
Access log settings, including the access log format and access log destination ARN.
-
#cache_cluster_enabled ⇒ Boolean, ...
readonly
Specifies whether a cache cluster is enabled for the stage.
-
#cache_cluster_size ⇒ String?
readonly
The stage's cache capacity in GB.
-
#canary_setting ⇒ AWSCDK::IResolvable, ...
readonly
Settings for the canary deployment in this stage.
-
#client_certificate_id ⇒ String, ...
readonly
The identifier of a client certificate for an API stage.
-
#deployment_id ⇒ String, ...
readonly
The identifier of the Deployment that the stage points to.
-
#description ⇒ String?
readonly
The stage's description.
-
#documentation_version ⇒ String?
readonly
The version of the associated API documentation.
-
#method_settings ⇒ AWSCDK::IResolvable, ...
readonly
A map that defines the method settings for a Stage resource.
-
#rest_api_id ⇒ String, AWSCDK::Interfaces::AWSApigateway::IRestAPIRef
readonly
The string identifier of the associated RestApi.
-
#stage_name ⇒ String?
readonly
The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to API Gateway.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The collection of tags.
-
#tracing_enabled ⇒ Boolean, ...
readonly
Specifies whether active tracing with X-ray is enabled for the Stage.
-
#variables ⇒ AWSCDK::IResolvable, ...
readonly
A map (string-to-string map) that defines the stage variables, where the variable name is the key and the variable value is the value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(rest_api_id:, access_log_setting: nil, cache_cluster_enabled: nil, cache_cluster_size: nil, canary_setting: nil, client_certificate_id: nil, deployment_id: nil, description: nil, documentation_version: nil, method_settings: nil, stage_name: nil, tags: nil, tracing_enabled: nil, variables: nil) ⇒ CfnStageProps
constructor
A new instance of CfnStageProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(rest_api_id:, access_log_setting: nil, cache_cluster_enabled: nil, cache_cluster_size: nil, canary_setting: nil, client_certificate_id: nil, deployment_id: nil, description: nil, documentation_version: nil, method_settings: nil, stage_name: nil, tags: nil, tracing_enabled: nil, variables: nil) ⇒ CfnStageProps
Returns a new instance of CfnStageProps.
23 24 25 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 |
# File 'api_gateway/cfn_stage_props.rb', line 23 def initialize(rest_api_id:, access_log_setting: nil, cache_cluster_enabled: nil, cache_cluster_size: nil, canary_setting: nil, client_certificate_id: nil, deployment_id: nil, description: nil, documentation_version: nil, method_settings: nil, stage_name: nil, tags: nil, tracing_enabled: nil, variables: nil) @rest_api_id = rest_api_id Jsii::Type.check_type(@rest_api_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5LklSZXN0QXBpUmVmIn1dfX0=")), "restApiId") @access_log_setting = access_log_setting.is_a?(Hash) ? ::AWSCDK::APIGateway::CfnStage::AccessLogSettingProperty.new(**access_log_setting.transform_keys(&:to_sym)) : access_log_setting Jsii::Type.check_type(@access_log_setting, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5LkNmblN0YWdlLkFjY2Vzc0xvZ1NldHRpbmdQcm9wZXJ0eSJ9XX19")), "accessLogSetting") unless @access_log_setting.nil? @cache_cluster_enabled = cache_cluster_enabled Jsii::Type.check_type(@cache_cluster_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "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? @canary_setting = canary_setting.is_a?(Hash) ? ::AWSCDK::APIGateway::CfnStage::CanarySettingProperty.new(**canary_setting.transform_keys(&:to_sym)) : canary_setting Jsii::Type.check_type(@canary_setting, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5LkNmblN0YWdlLkNhbmFyeVNldHRpbmdQcm9wZXJ0eSJ9XX19")), "canarySetting") unless @canary_setting.nil? @client_certificate_id = client_certificate_id Jsii::Type.check_type(@client_certificate_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5LklDbGllbnRDZXJ0aWZpY2F0ZVJlZiJ9XX19")), "clientCertificateId") unless @client_certificate_id.nil? @deployment_id = deployment_id Jsii::Type.check_type(@deployment_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5LklEZXBsb3ltZW50UmVmIn1dfX0=")), "deploymentId") unless @deployment_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_settings = method_settings Jsii::Type.check_type(@method_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5DZm5TdGFnZS5NZXRob2RTZXR0aW5nUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "methodSettings") unless @method_settings.nil? @stage_name = stage_name Jsii::Type.check_type(@stage_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stageName") unless @stage_name.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @tracing_enabled = tracing_enabled Jsii::Type.check_type(@tracing_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "tracingEnabled") unless @tracing_enabled.nil? @variables = variables Jsii::Type.check_type(@variables, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "variables") unless @variables.nil? end |
Instance Attribute Details
#access_log_setting ⇒ AWSCDK::IResolvable, ... (readonly)
Access log settings, including the access log format and access log destination ARN.
63 64 65 |
# File 'api_gateway/cfn_stage_props.rb', line 63 def access_log_setting @access_log_setting end |
#cache_cluster_enabled ⇒ Boolean, ... (readonly)
Specifies whether a cache cluster is enabled for the stage.
To activate a method-level cache, set CachingEnabled to true for a method.
70 71 72 |
# File 'api_gateway/cfn_stage_props.rb', line 70 def cache_cluster_enabled @cache_cluster_enabled end |
#cache_cluster_size ⇒ String? (readonly)
The stage's cache capacity in GB.
For more information about choosing a cache size, see Enabling API caching to enhance responsiveness .
77 78 79 |
# File 'api_gateway/cfn_stage_props.rb', line 77 def cache_cluster_size @cache_cluster_size end |
#canary_setting ⇒ AWSCDK::IResolvable, ... (readonly)
Settings for the canary deployment in this stage.
82 83 84 |
# File 'api_gateway/cfn_stage_props.rb', line 82 def canary_setting @canary_setting end |
#client_certificate_id ⇒ String, ... (readonly)
The identifier of a client certificate for an API stage.
87 88 89 |
# File 'api_gateway/cfn_stage_props.rb', line 87 def client_certificate_id @client_certificate_id end |
#deployment_id ⇒ String, ... (readonly)
The identifier of the Deployment that the stage points to.
92 93 94 |
# File 'api_gateway/cfn_stage_props.rb', line 92 def deployment_id @deployment_id end |
#description ⇒ String? (readonly)
The stage's description.
97 98 99 |
# File 'api_gateway/cfn_stage_props.rb', line 97 def description @description end |
#documentation_version ⇒ String? (readonly)
The version of the associated API documentation.
102 103 104 |
# File 'api_gateway/cfn_stage_props.rb', line 102 def documentation_version @documentation_version end |
#method_settings ⇒ AWSCDK::IResolvable, ... (readonly)
A map that defines the method settings for a Stage resource.
Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\* /\* for overriding all methods in the stage.
109 110 111 |
# File 'api_gateway/cfn_stage_props.rb', line 109 def method_settings @method_settings end |
#rest_api_id ⇒ String, AWSCDK::Interfaces::AWSApigateway::IRestAPIRef (readonly)
The string identifier of the associated RestApi.
58 59 60 |
# File 'api_gateway/cfn_stage_props.rb', line 58 def rest_api_id @rest_api_id end |
#stage_name ⇒ String? (readonly)
The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to API Gateway.
Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.
116 117 118 |
# File 'api_gateway/cfn_stage_props.rb', line 116 def stage_name @stage_name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The collection of tags.
Each tag element is associated with a given resource.
123 124 125 |
# File 'api_gateway/cfn_stage_props.rb', line 123 def @tags end |
#tracing_enabled ⇒ Boolean, ... (readonly)
Specifies whether active tracing with X-ray is enabled for the Stage.
128 129 130 |
# File 'api_gateway/cfn_stage_props.rb', line 128 def tracing_enabled @tracing_enabled end |
#variables ⇒ AWSCDK::IResolvable, ... (readonly)
A map (string-to-string map) that defines the stage variables, where the variable name is the key and the variable value is the value.
Variable names are limited to alphanumeric characters. Values must match the following regular expression: [A-Za-z0-9-._~:/?#&=,]+ .
135 136 137 |
# File 'api_gateway/cfn_stage_props.rb', line 135 def variables @variables end |
Class Method Details
.jsii_properties ⇒ Object
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'api_gateway/cfn_stage_props.rb', line 137 def self.jsii_properties { :rest_api_id => "restApiId", :access_log_setting => "accessLogSetting", :cache_cluster_enabled => "cacheClusterEnabled", :cache_cluster_size => "cacheClusterSize", :canary_setting => "canarySetting", :client_certificate_id => "clientCertificateId", :deployment_id => "deploymentId", :description => "description", :documentation_version => "documentationVersion", :method_settings => "methodSettings", :stage_name => "stageName", :tags => "tags", :tracing_enabled => "tracingEnabled", :variables => "variables", } end |
Instance Method Details
#to_jsii ⇒ Object
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'api_gateway/cfn_stage_props.rb', line 156 def to_jsii result = {} result.merge!({ "restApiId" => @rest_api_id, "accessLogSetting" => @access_log_setting, "cacheClusterEnabled" => @cache_cluster_enabled, "cacheClusterSize" => @cache_cluster_size, "canarySetting" => @canary_setting, "clientCertificateId" => @client_certificate_id, "deploymentId" => @deployment_id, "description" => @description, "documentationVersion" => @documentation_version, "methodSettings" => @method_settings, "stageName" => @stage_name, "tags" => @tags, "tracingEnabled" => @tracing_enabled, "variables" => @variables, }) result.compact end |