Class: AWSCDK::APIGateway::APIMappingOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gateway/api_mapping_options.rb

Overview

Options for creating an api mapping.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_path: nil) ⇒ APIMappingOptions

Returns a new instance of APIMappingOptions.

Parameters:

  • base_path (String, nil) (defaults to: nil)

    The api 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.



8
9
10
11
# File 'api_gateway/api_mapping_options.rb', line 8

def initialize(base_path: nil)
  @base_path = base_path
  Jsii::Type.check_type(@base_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "basePath") unless @base_path.nil?
end

Instance Attribute Details

#base_pathString? (readonly)

Note:

Default: - map requests from the domain root (e.g. example.com).

The api 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.

If this is undefined, a mapping will be added for the empty path. Any request that does not match a mapping will get sent to the API that has been mapped to the empty path.

Returns:

  • (String, nil)


21
22
23
# File 'api_gateway/api_mapping_options.rb', line 21

def base_path
  @base_path
end

Class Method Details

.jsii_propertiesObject



23
24
25
26
27
# File 'api_gateway/api_mapping_options.rb', line 23

def self.jsii_properties
  {
    :base_path => "basePath",
  }
end

Instance Method Details

#to_jsiiObject



29
30
31
32
33
34
35
# File 'api_gateway/api_mapping_options.rb', line 29

def to_jsii
  result = {}
  result.merge!({
    "basePath" => @base_path,
  })
  result.compact
end