Class: Jets::Resource::ApiGateway::BasePath::Mapping

Inherits:
Base
  • Object
show all
Defined in:
lib/jets/resource/api_gateway/base_path/mapping.rb

Instance Method Summary collapse

Methods inherited from Base

#replacements, #resource

Instance Method Details

#definitionObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/jets/resource/api_gateway/base_path/mapping.rb', line 21

def definition
  function_logical_id = "BasePathFunction" # lambda function that supports custom resource
  {
    base_path_mapping: {
      type: "Custom::BasePathMapping",
      properties: {
        service_token: "!GetAtt #{function_logical_id}.Arn",
        # base_path: '', # empty path represents root
        # domain_name: "!Ref DomainName",
        # rest_api_id: "!Ref RestApi", # since this is in the Deployment template
        # stage: Deployment.stage_name,
      },
      depends_on: Jets::Resource::ApiGateway::Deployment.logical_id,
    }
  }
end

#outputsObject



38
39
40
41
42
# File 'lib/jets/resource/api_gateway/base_path/mapping.rb', line 38

def outputs
  {
    "BasePathMapping" => "!Ref BasePathMapping",
  }
end