UNPKG

@pulumi/aws

Version:

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

105 lines 5.47 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.GatewayAssociationProposal = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a Direct Connect Gateway Association Proposal, typically for enabling cross-account associations. For single account associations, see the `aws.directconnect.GatewayAssociation` resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.directconnect.GatewayAssociationProposal("example", { * dxGatewayId: exampleAwsDxGateway.id, * dxGatewayOwnerAccountId: exampleAwsDxGateway.ownerAccountId, * associatedGatewayId: exampleAwsVpnGateway.id, * }); * ``` * * ## Import * * Using a proposal ID, Direct Connect Gateway ID and associated gateway ID separated by `/`: * * __With `pulumi import`__, import Direct Connect Gateway Association Proposals using either a proposal ID or proposal ID, Direct Connect Gateway ID and associated gateway ID separated by `/`. For example: * * Using a proposal ID: * * ```sh * $ pulumi import aws:directconnect/gatewayAssociationProposal:GatewayAssociationProposal example ac90e981-b718-4364-872d-65478c84fafe * ``` * Using a proposal ID, Direct Connect Gateway ID and associated gateway ID separated by `/`: * * ```sh * $ pulumi import aws:directconnect/gatewayAssociationProposal:GatewayAssociationProposal example ac90e981-b718-4364-872d-65478c84fafe/abcd1234-dcba-5678-be23-cdef9876ab45/vgw-12345678 * ``` * The latter case is useful when a previous proposal has been accepted and deleted by AWS. * The `aws_dx_gateway_association_proposal` resource will then represent a pseudo-proposal for the same Direct Connect Gateway and associated gateway. If no previous proposal is available, use a tool like [`uuidgen`](http://manpages.ubuntu.com/manpages/bionic/man1/uuidgen.1.html) to generate a new random pseudo-proposal ID. */ class GatewayAssociationProposal extends pulumi.CustomResource { /** * Get an existing GatewayAssociationProposal 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 GatewayAssociationProposal(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of GatewayAssociationProposal. 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'] === GatewayAssociationProposal.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["allowedPrefixes"] = state?.allowedPrefixes; resourceInputs["associatedGatewayId"] = state?.associatedGatewayId; resourceInputs["associatedGatewayOwnerAccountId"] = state?.associatedGatewayOwnerAccountId; resourceInputs["associatedGatewayType"] = state?.associatedGatewayType; resourceInputs["dxGatewayId"] = state?.dxGatewayId; resourceInputs["dxGatewayOwnerAccountId"] = state?.dxGatewayOwnerAccountId; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.associatedGatewayId === undefined && !opts.urn) { throw new Error("Missing required property 'associatedGatewayId'"); } if (args?.dxGatewayId === undefined && !opts.urn) { throw new Error("Missing required property 'dxGatewayId'"); } if (args?.dxGatewayOwnerAccountId === undefined && !opts.urn) { throw new Error("Missing required property 'dxGatewayOwnerAccountId'"); } resourceInputs["allowedPrefixes"] = args?.allowedPrefixes; resourceInputs["associatedGatewayId"] = args?.associatedGatewayId; resourceInputs["dxGatewayId"] = args?.dxGatewayId; resourceInputs["dxGatewayOwnerAccountId"] = args?.dxGatewayOwnerAccountId; resourceInputs["region"] = args?.region; resourceInputs["associatedGatewayOwnerAccountId"] = undefined /*out*/; resourceInputs["associatedGatewayType"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(GatewayAssociationProposal.__pulumiType, name, resourceInputs, opts); } } exports.GatewayAssociationProposal = GatewayAssociationProposal; /** @internal */ GatewayAssociationProposal.__pulumiType = 'aws:directconnect/gatewayAssociationProposal:GatewayAssociationProposal'; //# sourceMappingURL=gatewayAssociationProposal.js.map