Sha256: f965f7d0cc4ddff768c5f8080bb9818c5f8ee2135b4ead1f37b5f6665f9593a9

Contents?: true

Size: 810 Bytes

Versions: 15

Compression:

Stored size: 810 Bytes

Contents

module Jets::Cfn::Resource::Nested::Api
  class Mapping < Base
    # interface method
    def definition
      {
        ApiMapping: {
          Type: "AWS::CloudFormation::Stack",
          Properties: {
            TemplateURL: template_url,
            Parameters: parameters,
          },
          DependsOn: depends_on,
        }
      }
    end

    def parameters
      p = {
        GemLayer: "!Ref GemLayer",
        IamRole: "!GetAtt IamRole.Arn",
        RestApi: "!GetAtt ApiGateway.Outputs.RestApi",
        S3Bucket: "!Ref S3Bucket",
      }
      p[:DomainName] = "!GetAtt ApiGateway.Outputs.DomainName" if Jets.custom_domain?
      p[:BasePath] = Jets.config.domain.base_path
      p
    end

    def depends_on
      [Jets::Cfn::Resource::ApiGateway::Deployment.logical_id]
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
jets-5.0.13 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.12 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.11 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.10 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.9 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.8 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.7 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.6 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.5 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.4 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.3 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.2 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.1 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.0 lib/jets/cfn/resource/nested/api/mapping.rb
jets-5.0.0.beta1 lib/jets/cfn/resource/nested/api/mapping.rb