Class: AWSCDK::APIGateway::BasePathMappingOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::BasePathMappingOptions
- Defined in:
- api_gateway/base_path_mapping_options.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attach_to_stage ⇒ Boolean?
readonly
Whether to attach the base path mapping to a stage.
-
#base_path ⇒ String?
readonly
The base path name that callers of the API must provide in the URL after the domain name (e.g.
example.com/base-path). -
#stage ⇒ AWSCDK::APIGateway::Stage?
readonly
The Deployment stage of API [disable-awslint:ref-via-interface].
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attach_to_stage: nil, base_path: nil, stage: nil) ⇒ BasePathMappingOptions
constructor
A new instance of BasePathMappingOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(attach_to_stage: nil, base_path: nil, stage: nil) ⇒ BasePathMappingOptions
Returns a new instance of BasePathMappingOptions.
9 10 11 12 13 14 15 16 |
# File 'api_gateway/base_path_mapping_options.rb', line 9 def initialize(attach_to_stage: nil, base_path: nil, stage: nil) @attach_to_stage = attach_to_stage Jsii::Type.check_type(@attach_to_stage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "attachToStage") unless @attach_to_stage.nil? @base_path = base_path Jsii::Type.check_type(@base_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "basePath") unless @base_path.nil? @stage = stage Jsii::Type.check_type(@stage, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5TdGFnZSJ9")), "stage") unless @stage.nil? end |
Instance Attribute Details
#attach_to_stage ⇒ Boolean? (readonly)
Default: - true
Whether to attach the base path mapping to a stage.
Use this property to create a base path mapping without attaching it to the Rest API default stage.
This property is ignored if stage is provided.
25 26 27 |
# File 'api_gateway/base_path_mapping_options.rb', line 25 def attach_to_stage @attach_to_stage end |
#base_path ⇒ String? (readonly)
Default: - map requests from the domain root (e.g. example.com). If this is undefined, no additional mappings will be allowed on this domain name.
The base path name that callers of the API must provide in the URL after the domain name (e.g. example.com/base-path). If you specify this property, it can't be an empty string.
30 31 32 |
# File 'api_gateway/base_path_mapping_options.rb', line 30 def base_path @base_path end |
#stage ⇒ AWSCDK::APIGateway::Stage? (readonly)
Default: - map to deploymentStage of restApi otherwise stage needs to pass in URL
The Deployment stage of API [disable-awslint:ref-via-interface].
35 36 37 |
# File 'api_gateway/base_path_mapping_options.rb', line 35 def stage @stage end |
Class Method Details
.jsii_properties ⇒ Object
37 38 39 40 41 42 43 |
# File 'api_gateway/base_path_mapping_options.rb', line 37 def self.jsii_properties { :attach_to_stage => "attachToStage", :base_path => "basePath", :stage => "stage", } end |
Instance Method Details
#to_jsii ⇒ Object
45 46 47 48 49 50 51 52 53 |
# File 'api_gateway/base_path_mapping_options.rb', line 45 def to_jsii result = {} result.merge!({ "attachToStage" => @attach_to_stage, "basePath" => @base_path, "stage" => @stage, }) result.compact end |