@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
94 lines • 3.96 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.BasePathMapping = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Connects a custom domain name registered via `aws.apigateway.DomainName`
* with a deployed API so that its methods can be called via the
* custom domain name.
*
* ## Import
*
* For a non-root `base_path`:
*
* For a non-root `base_path` and a private custom domain name:
*
* Using `pulumi import`, import `aws_api_gateway_base_path_mapping` using the domain name and base path or domain name, base path and domain name ID (for private custom domain names). For example:
*
* For an empty `base_path` or, in other words, a root path (`/`):
*
* ```sh
* $ pulumi import aws:apigateway/basePathMapping:BasePathMapping example example.com/
* ```
* For a non-root `base_path`:
*
* ```sh
* $ pulumi import aws:apigateway/basePathMapping:BasePathMapping example example.com/base-path
* ```
* For a non-root `base_path` and a private custom domain name:
*
* ```sh
* $ pulumi import aws:apigateway/basePathMapping:BasePathMapping example api.internal.example.com/base-path/abcde12345
* ```
*/
class BasePathMapping extends pulumi.CustomResource {
/**
* Get an existing BasePathMapping resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new BasePathMapping(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of BasePathMapping. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === BasePathMapping.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["basePath"] = state?.basePath;
resourceInputs["domainName"] = state?.domainName;
resourceInputs["domainNameId"] = state?.domainNameId;
resourceInputs["region"] = state?.region;
resourceInputs["restApi"] = state?.restApi;
resourceInputs["stageName"] = state?.stageName;
}
else {
const args = argsOrState;
if (args?.domainName === undefined && !opts.urn) {
throw new Error("Missing required property 'domainName'");
}
if (args?.restApi === undefined && !opts.urn) {
throw new Error("Missing required property 'restApi'");
}
resourceInputs["basePath"] = args?.basePath;
resourceInputs["domainName"] = args?.domainName;
resourceInputs["domainNameId"] = args?.domainNameId;
resourceInputs["region"] = args?.region;
resourceInputs["restApi"] = args?.restApi;
resourceInputs["stageName"] = args?.stageName;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(BasePathMapping.__pulumiType, name, resourceInputs, opts);
}
}
exports.BasePathMapping = BasePathMapping;
/** @internal */
BasePathMapping.__pulumiType = 'aws:apigateway/basePathMapping:BasePathMapping';
//# sourceMappingURL=basePathMapping.js.map