UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

81 lines 3.02 kB
"use strict"; // *** 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.Gateway = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a Direct Connect Gateway. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.directconnect.Gateway("example", { * name: "tf-dxg-example", * amazonSideAsn: "64512", * }); * ``` * * ## Import * * Using `pulumi import`, import Direct Connect Gateways using the gateway `id`. For example: * * ```sh * $ pulumi import aws:directconnect/gateway:Gateway test abcd1234-dcba-5678-be23-cdef9876ab45 * ``` */ class Gateway extends pulumi.CustomResource { /** * Get an existing Gateway 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 Gateway(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Gateway. 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'] === Gateway.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["amazonSideAsn"] = state?.amazonSideAsn; resourceInputs["arn"] = state?.arn; resourceInputs["name"] = state?.name; resourceInputs["ownerAccountId"] = state?.ownerAccountId; } else { const args = argsOrState; if (args?.amazonSideAsn === undefined && !opts.urn) { throw new Error("Missing required property 'amazonSideAsn'"); } resourceInputs["amazonSideAsn"] = args?.amazonSideAsn; resourceInputs["name"] = args?.name; resourceInputs["arn"] = undefined /*out*/; resourceInputs["ownerAccountId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Gateway.__pulumiType, name, resourceInputs, opts); } } exports.Gateway = Gateway; /** @internal */ Gateway.__pulumiType = 'aws:directconnect/gateway:Gateway'; //# sourceMappingURL=gateway.js.map