UNPKG

@pulumi/aws

Version:

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

86 lines 3.74 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.LinkAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a Network Manager link association. Associates a link to a device. A device can be associated to multiple links and a link can be associated to multiple devices. The device and link must be in the same global network and the same site. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.networkmanager.LinkAssociation("example", { * globalNetworkId: exampleAwsNetworkmanagerGlobalNetwork.id, * linkId: exampleAwsNetworkmanagerLink.id, * deviceId: exampleAwsNetworkmanagerDevice.id, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_networkmanager_link_association` using the global network ID, link ID and device ID. For example: * * ```sh * $ pulumi import aws:networkmanager/linkAssociation:LinkAssociation example global-network-0d47f6t230mz46dy4,link-444555aaabbb11223,device-07f6fd08867abc123 * ``` */ class LinkAssociation extends pulumi.CustomResource { /** * Get an existing LinkAssociation 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 LinkAssociation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of LinkAssociation. 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'] === LinkAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["deviceId"] = state?.deviceId; resourceInputs["globalNetworkId"] = state?.globalNetworkId; resourceInputs["linkId"] = state?.linkId; } else { const args = argsOrState; if (args?.deviceId === undefined && !opts.urn) { throw new Error("Missing required property 'deviceId'"); } if (args?.globalNetworkId === undefined && !opts.urn) { throw new Error("Missing required property 'globalNetworkId'"); } if (args?.linkId === undefined && !opts.urn) { throw new Error("Missing required property 'linkId'"); } resourceInputs["deviceId"] = args?.deviceId; resourceInputs["globalNetworkId"] = args?.globalNetworkId; resourceInputs["linkId"] = args?.linkId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(LinkAssociation.__pulumiType, name, resourceInputs, opts); } } exports.LinkAssociation = LinkAssociation; /** @internal */ LinkAssociation.__pulumiType = 'aws:networkmanager/linkAssociation:LinkAssociation'; //# sourceMappingURL=linkAssociation.js.map