How to use the cloudform.ApiGateway function in cloudform

To help you get started, we’ve selected a few cloudform examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github matthewkeil / nomad-devops / dist / aws / apiGateway / DomainName.js View on Github external
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const cloudform_1 = require("cloudform");
exports.DomainName = new cloudform_1.ApiGateway.DomainName({
    DomainName: cloudform_1.Fn.Join(".", [cloudform_1.Fn.Ref("SubDomain"), cloudform_1.Fn.ImportValue("RootDomain")]),
    CertificateArn: cloudform_1.Fn.ImportValue("Certificate")
}).dependsOn("ApiGateway");
github matthewkeil / nomad-devops / dist / aws / apiGateway / BasePathMapping.js View on Github external
exports.BasePathMapping = (branch) => {
    const basePathMapping = new cloudform_1.ApiGateway.BasePathMapping({
        RestApiId: cloudform_1.Fn.Ref("ApiGateway"),
        DomainName: cloudform_1.Fn.Join(".", [cloudform_1.Fn.Ref("SubDomain"), config_1.config.ROOT_DOMAIN]),
        BasePath: cloudform_1.Fn.Ref("BasePath"),
        Stage: cloudform_1.Fn.Ref("GitHubBranch")
    });
    if (branch === "master") {
        basePathMapping.dependsOn("DomainName");
    }
    else {
        basePathMapping.dependsOn("ApiGatewayStage");
    }
    return basePathMapping;
};