Class: AWSCDK::SAM::CfnAPIProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::SAM::CfnAPIProps
- Defined in:
- sam/cfn_api_props.rb
Overview
Properties for defining a CfnApi.
Instance Attribute Summary collapse
- #access_log_setting ⇒ AWSCDK::IResolvable, ... readonly
- #always_deploy ⇒ Boolean, ... readonly
- #auth ⇒ AWSCDK::IResolvable, ... readonly
- #binary_media_types ⇒ Array<String>? readonly
- #cache_cluster_enabled ⇒ Boolean, ... readonly
- #cache_cluster_size ⇒ String? readonly
- #canary_setting ⇒ AWSCDK::IResolvable, ... readonly
- #cors ⇒ String, ... readonly
- #definition_body ⇒ Object? readonly
- #definition_uri ⇒ String, ... readonly
- #description ⇒ String? readonly
- #disable_execute_api_endpoint ⇒ Boolean, ... readonly
- #domain ⇒ AWSCDK::IResolvable, ... readonly
- #endpoint_configuration ⇒ String, ... readonly
- #gateway_responses ⇒ Object? readonly
- #method_settings ⇒ Array<Object>, ... readonly
- #minimum_compression_size ⇒ Numeric? readonly
- #models ⇒ Object? readonly
- #name ⇒ String? readonly
- #open_api_version ⇒ String? readonly
- #stage_name ⇒ String readonly
- #tags ⇒ Hash{String => String}? readonly
- #tracing_enabled ⇒ Boolean, ... readonly
- #variables ⇒ AWSCDK::IResolvable, ... readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(stage_name:, access_log_setting: nil, always_deploy: nil, auth: nil, binary_media_types: nil, cache_cluster_enabled: nil, cache_cluster_size: nil, canary_setting: nil, cors: nil, definition_body: nil, definition_uri: nil, description: nil, disable_execute_api_endpoint: nil, domain: nil, endpoint_configuration: nil, gateway_responses: nil, method_settings: nil, minimum_compression_size: nil, models: nil, name: nil, open_api_version: nil, tags: nil, tracing_enabled: nil, variables: nil) ⇒ CfnAPIProps
constructor
A new instance of CfnAPIProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(stage_name:, access_log_setting: nil, always_deploy: nil, auth: nil, binary_media_types: nil, cache_cluster_enabled: nil, cache_cluster_size: nil, canary_setting: nil, cors: nil, definition_body: nil, definition_uri: nil, description: nil, disable_execute_api_endpoint: nil, domain: nil, endpoint_configuration: nil, gateway_responses: nil, method_settings: nil, minimum_compression_size: nil, models: nil, name: nil, open_api_version: nil, tags: nil, tracing_enabled: nil, variables: nil) ⇒ CfnAPIProps
Returns a new instance of CfnAPIProps.
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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'sam/cfn_api_props.rb', line 33 def initialize(stage_name:, access_log_setting: nil, always_deploy: nil, auth: nil, binary_media_types: nil, cache_cluster_enabled: nil, cache_cluster_size: nil, canary_setting: nil, cors: nil, definition_body: nil, definition_uri: nil, description: nil, disable_execute_api_endpoint: nil, domain: nil, endpoint_configuration: nil, gateway_responses: nil, method_settings: nil, minimum_compression_size: nil, models: nil, name: nil, open_api_version: nil, tags: nil, tracing_enabled: nil, variables: nil) @stage_name = stage_name Jsii::Type.check_type(@stage_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stageName") @access_log_setting = access_log_setting.is_a?(Hash) ? ::AWSCDK::SAM::CfnAPI::AccessLogSettingProperty.new(**access_log_setting.transform_keys(&:to_sym)) : access_log_setting Jsii::Type.check_type(@access_log_setting, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYW0uQ2ZuQXBpLkFjY2Vzc0xvZ1NldHRpbmdQcm9wZXJ0eSJ9XX19")), "accessLogSetting") unless @access_log_setting.nil? @always_deploy = always_deploy Jsii::Type.check_type(@always_deploy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "alwaysDeploy") unless @always_deploy.nil? @auth = auth.is_a?(Hash) ? ::AWSCDK::SAM::CfnAPI::AuthProperty.new(**auth.transform_keys(&:to_sym)) : auth Jsii::Type.check_type(@auth, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYW0uQ2ZuQXBpLkF1dGhQcm9wZXJ0eSJ9XX19")), "auth") unless @auth.nil? @binary_media_types = binary_media_types Jsii::Type.check_type(@binary_media_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "binaryMediaTypes") unless @binary_media_types.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::SAM::CfnAPI::CanarySettingProperty.new(**canary_setting.transform_keys(&:to_sym)) : canary_setting Jsii::Type.check_type(@canary_setting, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYW0uQ2ZuQXBpLkNhbmFyeVNldHRpbmdQcm9wZXJ0eSJ9XX19")), "canarySetting") unless @canary_setting.nil? @cors = cors.is_a?(Hash) ? ::AWSCDK::SAM::CfnAPI::CorsConfigurationProperty.new(**cors.transform_keys(&:to_sym)) : cors Jsii::Type.check_type(@cors, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5JUmVzb2x2YWJsZSJ9LHsiZnFuIjoiYXdzLWNkay1saWIuYXdzX3NhbS5DZm5BcGkuQ29yc0NvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "cors") unless @cors.nil? @definition_body = definition_body Jsii::Type.check_type(@definition_body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "definitionBody") unless @definition_body.nil? @definition_uri = definition_uri.is_a?(Hash) ? ::AWSCDK::SAM::CfnAPI::S3LocationProperty.new(**definition_uri.transform_keys(&:to_sym)) : definition_uri Jsii::Type.check_type(@definition_uri, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5JUmVzb2x2YWJsZSJ9LHsiZnFuIjoiYXdzLWNkay1saWIuYXdzX3NhbS5DZm5BcGkuUzNMb2NhdGlvblByb3BlcnR5In1dfX0=")), "definitionUri") unless @definition_uri.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @disable_execute_api_endpoint = disable_execute_api_endpoint Jsii::Type.check_type(@disable_execute_api_endpoint, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "disableExecuteApiEndpoint") unless @disable_execute_api_endpoint.nil? @domain = domain.is_a?(Hash) ? ::AWSCDK::SAM::CfnAPI::DomainConfigurationProperty.new(**domain.transform_keys(&:to_sym)) : domain Jsii::Type.check_type(@domain, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zYW0uQ2ZuQXBpLkRvbWFpbkNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "domain") unless @domain.nil? @endpoint_configuration = endpoint_configuration.is_a?(Hash) ? ::AWSCDK::SAM::CfnAPI::EndpointConfigurationProperty.new(**endpoint_configuration.transform_keys(&:to_sym)) : endpoint_configuration Jsii::Type.check_type(@endpoint_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5JUmVzb2x2YWJsZSJ9LHsiZnFuIjoiYXdzLWNkay1saWIuYXdzX3NhbS5DZm5BcGkuRW5kcG9pbnRDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "endpointConfiguration") unless @endpoint_configuration.nil? @gateway_responses = gateway_responses Jsii::Type.check_type(@gateway_responses, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "gatewayResponses") unless @gateway_responses.nil? @method_settings = method_settings Jsii::Type.check_type(@method_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siY29sbGVjdGlvbiI6eyJlbGVtZW50dHlwZSI6eyJwcmltaXRpdmUiOiJhbnkifSwia2luZCI6ImFycmF5In19LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "methodSettings") unless @method_settings.nil? @minimum_compression_size = minimum_compression_size Jsii::Type.check_type(@minimum_compression_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minimumCompressionSize") unless @minimum_compression_size.nil? @models = models Jsii::Type.check_type(@models, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "models") unless @models.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @open_api_version = open_api_version Jsii::Type.check_type(@open_api_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "openApiVersion") unless @open_api_version.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "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)
89 90 91 |
# File 'sam/cfn_api_props.rb', line 89 def access_log_setting @access_log_setting end |
#always_deploy ⇒ Boolean, ... (readonly)
92 93 94 |
# File 'sam/cfn_api_props.rb', line 92 def always_deploy @always_deploy end |
#auth ⇒ AWSCDK::IResolvable, ... (readonly)
95 96 97 |
# File 'sam/cfn_api_props.rb', line 95 def auth @auth end |
#binary_media_types ⇒ Array<String>? (readonly)
98 99 100 |
# File 'sam/cfn_api_props.rb', line 98 def binary_media_types @binary_media_types end |
#cache_cluster_enabled ⇒ Boolean, ... (readonly)
101 102 103 |
# File 'sam/cfn_api_props.rb', line 101 def cache_cluster_enabled @cache_cluster_enabled end |
#cache_cluster_size ⇒ String? (readonly)
104 105 106 |
# File 'sam/cfn_api_props.rb', line 104 def cache_cluster_size @cache_cluster_size end |
#canary_setting ⇒ AWSCDK::IResolvable, ... (readonly)
107 108 109 |
# File 'sam/cfn_api_props.rb', line 107 def canary_setting @canary_setting end |
#cors ⇒ String, ... (readonly)
110 111 112 |
# File 'sam/cfn_api_props.rb', line 110 def cors @cors end |
#definition_body ⇒ Object? (readonly)
113 114 115 |
# File 'sam/cfn_api_props.rb', line 113 def definition_body @definition_body end |
#definition_uri ⇒ String, ... (readonly)
116 117 118 |
# File 'sam/cfn_api_props.rb', line 116 def definition_uri @definition_uri end |
#description ⇒ String? (readonly)
119 120 121 |
# File 'sam/cfn_api_props.rb', line 119 def description @description end |
#disable_execute_api_endpoint ⇒ Boolean, ... (readonly)
122 123 124 |
# File 'sam/cfn_api_props.rb', line 122 def disable_execute_api_endpoint @disable_execute_api_endpoint end |
#domain ⇒ AWSCDK::IResolvable, ... (readonly)
125 126 127 |
# File 'sam/cfn_api_props.rb', line 125 def domain @domain end |
#endpoint_configuration ⇒ String, ... (readonly)
128 129 130 |
# File 'sam/cfn_api_props.rb', line 128 def endpoint_configuration @endpoint_configuration end |
#gateway_responses ⇒ Object? (readonly)
131 132 133 |
# File 'sam/cfn_api_props.rb', line 131 def gateway_responses @gateway_responses end |
#method_settings ⇒ Array<Object>, ... (readonly)
134 135 136 |
# File 'sam/cfn_api_props.rb', line 134 def method_settings @method_settings end |
#minimum_compression_size ⇒ Numeric? (readonly)
137 138 139 |
# File 'sam/cfn_api_props.rb', line 137 def minimum_compression_size @minimum_compression_size end |
#models ⇒ Object? (readonly)
140 141 142 |
# File 'sam/cfn_api_props.rb', line 140 def models @models end |
#name ⇒ String? (readonly)
143 144 145 |
# File 'sam/cfn_api_props.rb', line 143 def name @name end |
#open_api_version ⇒ String? (readonly)
146 147 148 |
# File 'sam/cfn_api_props.rb', line 146 def open_api_version @open_api_version end |
#stage_name ⇒ String (readonly)
86 87 88 |
# File 'sam/cfn_api_props.rb', line 86 def stage_name @stage_name end |
#tags ⇒ Hash{String => String}? (readonly)
149 150 151 |
# File 'sam/cfn_api_props.rb', line 149 def @tags end |
#tracing_enabled ⇒ Boolean, ... (readonly)
152 153 154 |
# File 'sam/cfn_api_props.rb', line 152 def tracing_enabled @tracing_enabled end |
#variables ⇒ AWSCDK::IResolvable, ... (readonly)
155 156 157 |
# File 'sam/cfn_api_props.rb', line 155 def variables @variables end |
Class Method Details
.jsii_properties ⇒ Object
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'sam/cfn_api_props.rb', line 157 def self.jsii_properties { :stage_name => "stageName", :access_log_setting => "accessLogSetting", :always_deploy => "alwaysDeploy", :auth => "auth", :binary_media_types => "binaryMediaTypes", :cache_cluster_enabled => "cacheClusterEnabled", :cache_cluster_size => "cacheClusterSize", :canary_setting => "canarySetting", :cors => "cors", :definition_body => "definitionBody", :definition_uri => "definitionUri", :description => "description", :disable_execute_api_endpoint => "disableExecuteApiEndpoint", :domain => "domain", :endpoint_configuration => "endpointConfiguration", :gateway_responses => "gatewayResponses", :method_settings => "methodSettings", :minimum_compression_size => "minimumCompressionSize", :models => "models", :name => "name", :open_api_version => "openApiVersion", :tags => "tags", :tracing_enabled => "tracingEnabled", :variables => "variables", } end |
Instance Method Details
#to_jsii ⇒ Object
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'sam/cfn_api_props.rb', line 186 def to_jsii result = {} result.merge!({ "stageName" => @stage_name, "accessLogSetting" => @access_log_setting, "alwaysDeploy" => @always_deploy, "auth" => @auth, "binaryMediaTypes" => @binary_media_types, "cacheClusterEnabled" => @cache_cluster_enabled, "cacheClusterSize" => @cache_cluster_size, "canarySetting" => @canary_setting, "cors" => @cors, "definitionBody" => @definition_body, "definitionUri" => @definition_uri, "description" => @description, "disableExecuteApiEndpoint" => @disable_execute_api_endpoint, "domain" => @domain, "endpointConfiguration" => @endpoint_configuration, "gatewayResponses" => @gateway_responses, "methodSettings" => @method_settings, "minimumCompressionSize" => @minimum_compression_size, "models" => @models, "name" => @name, "openApiVersion" => @open_api_version, "tags" => @tags, "tracingEnabled" => @tracing_enabled, "variables" => @variables, }) result.compact end |