UNPKG

@pulumi/aws

Version:

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

110 lines 5.1 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.DxGatewayAttachment = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a Network Manager Direct Connect Gateway Attachment. * * Use this resource to create and manage a Direct Connect Gateway attachment to a Cloud WAN core network. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.networkmanager.DxGatewayAttachment("test", { * coreNetworkId: testAwsNetworkmanagerCoreNetworkPolicyAttachment.coreNetworkId, * directConnectGatewayArn: `arn:aws:directconnect::${current.accountId}:dx-gateway/${testAwsDxGateway.id}`, * edgeLocations: [currentAwsRegion.region], * }); * ``` * * ## Import * * Using `pulumi import`, import Network Manager DX Gateway Attachment using the `id`. For example: * * ```sh * $ pulumi import aws:networkmanager/dxGatewayAttachment:DxGatewayAttachment example attachment-1a2b3c4d5e6f7g * ``` */ class DxGatewayAttachment extends pulumi.CustomResource { /** * Get an existing DxGatewayAttachment 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 DxGatewayAttachment(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of DxGatewayAttachment. 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'] === DxGatewayAttachment.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["attachmentPolicyRuleNumber"] = state?.attachmentPolicyRuleNumber; resourceInputs["attachmentType"] = state?.attachmentType; resourceInputs["coreNetworkArn"] = state?.coreNetworkArn; resourceInputs["coreNetworkId"] = state?.coreNetworkId; resourceInputs["directConnectGatewayArn"] = state?.directConnectGatewayArn; resourceInputs["edgeLocations"] = state?.edgeLocations; resourceInputs["ownerAccountId"] = state?.ownerAccountId; resourceInputs["segmentName"] = state?.segmentName; resourceInputs["state"] = state?.state; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["timeouts"] = state?.timeouts; } else { const args = argsOrState; if (args?.coreNetworkId === undefined && !opts.urn) { throw new Error("Missing required property 'coreNetworkId'"); } if (args?.directConnectGatewayArn === undefined && !opts.urn) { throw new Error("Missing required property 'directConnectGatewayArn'"); } if (args?.edgeLocations === undefined && !opts.urn) { throw new Error("Missing required property 'edgeLocations'"); } resourceInputs["coreNetworkId"] = args?.coreNetworkId; resourceInputs["directConnectGatewayArn"] = args?.directConnectGatewayArn; resourceInputs["edgeLocations"] = args?.edgeLocations; resourceInputs["tags"] = args?.tags; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["arn"] = undefined /*out*/; resourceInputs["attachmentPolicyRuleNumber"] = undefined /*out*/; resourceInputs["attachmentType"] = undefined /*out*/; resourceInputs["coreNetworkArn"] = undefined /*out*/; resourceInputs["ownerAccountId"] = undefined /*out*/; resourceInputs["segmentName"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DxGatewayAttachment.__pulumiType, name, resourceInputs, opts); } } exports.DxGatewayAttachment = DxGatewayAttachment; /** @internal */ DxGatewayAttachment.__pulumiType = 'aws:networkmanager/dxGatewayAttachment:DxGatewayAttachment'; //# sourceMappingURL=dxGatewayAttachment.js.map