Class: AWSCDK::APIGateway::BasePathMappingProps
- Inherits:
-
BasePathMappingOptions
- Object
- BasePathMappingOptions
- AWSCDK::APIGateway::BasePathMappingProps
- Defined in:
- api_gateway/base_path_mapping_props.rb
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). -
#domain_name ⇒ AWSCDK::Interfaces::AWSApigateway::IDomainNameRef
readonly
The DomainName to associate with this base path mapping.
-
#rest_api ⇒ AWSCDK::Interfaces::AWSApigateway::IRestAPIRef
readonly
The RestApi resource to target.
-
#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, domain_name:, rest_api:) ⇒ BasePathMappingProps
constructor
A new instance of BasePathMappingProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(attach_to_stage: nil, base_path: nil, stage: nil, domain_name:, rest_api:) ⇒ BasePathMappingProps
Returns a new instance of BasePathMappingProps.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'api_gateway/base_path_mapping_props.rb', line 11 def initialize(attach_to_stage: nil, base_path: nil, stage: nil, domain_name:, rest_api:) @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? @domain_name = domain_name Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5LklEb21haW5OYW1lUmVmIn0=")), "domainName") @rest_api = rest_api Jsii::Type.check_type(@rest_api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5LklSZXN0QXBpUmVmIn0=")), "restApi") 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.
31 32 33 |
# File 'api_gateway/base_path_mapping_props.rb', line 31 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.
36 37 38 |
# File 'api_gateway/base_path_mapping_props.rb', line 36 def base_path @base_path end |
#domain_name ⇒ AWSCDK::Interfaces::AWSApigateway::IDomainNameRef (readonly)
The DomainName to associate with this base path mapping.
45 46 47 |
# File 'api_gateway/base_path_mapping_props.rb', line 45 def domain_name @domain_name end |
#rest_api ⇒ AWSCDK::Interfaces::AWSApigateway::IRestAPIRef (readonly)
The RestApi resource to target.
49 50 51 |
# File 'api_gateway/base_path_mapping_props.rb', line 49 def rest_api @rest_api 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].
41 42 43 |
# File 'api_gateway/base_path_mapping_props.rb', line 41 def stage @stage end |
Class Method Details
.jsii_properties ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'api_gateway/base_path_mapping_props.rb', line 51 def self.jsii_properties { :attach_to_stage => "attachToStage", :base_path => "basePath", :stage => "stage", :domain_name => "domainName", :rest_api => "restApi", } end |
Instance Method Details
#to_jsii ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'api_gateway/base_path_mapping_props.rb', line 61 def to_jsii result = {} result.merge!(super) result.merge!({ "attachToStage" => @attach_to_stage, "basePath" => @base_path, "stage" => @stage, "domainName" => @domain_name, "restApi" => @rest_api, }) result.compact end |