UNPKG

@equinix-labs/pulumi-equinix

Version:

A Pulumi package for creating and managing equinix cloud resources.

110 lines 4.68 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.DeviceLink = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource `equinix.networkedge.DeviceLink` allows creation and management of Equinix Network Edge virtual network device links. * * ## Example Usage * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as equinix from "@equinix-labs/pulumi-equinix"; * * const test = new equinix.networkedge.DeviceLink("test", { * name: "test-link", * subnet: "192.168.40.64/27", * projectId: "a86d7112-d740-4758-9c9c-31e66373746b", * devices: [ * { * id: testEquinixNetworkDevice.uuid, * asn: 22111, * interfaceId: 6, * }, * { * id: testEquinixNetworkDevice.secondaryDevice[0].uuid, * asn: 22333, * interfaceId: 7, * }, * ], * links: [{ * accountNumber: testEquinixNetworkDevice.accountNumber, * srcMetroCode: testEquinixNetworkDevice.metroCode, * dstMetroCode: testEquinixNetworkDevice.secondaryDevice[0].metroCode, * throughput: "50", * throughputUnit: "Mbps", * }], * }); * ``` * * ## Import * * This resource can be imported using an existing ID: * * ```sh * $ pulumi import equinix:networkedge/deviceLink:DeviceLink example {existing_id} * ``` */ class DeviceLink extends pulumi.CustomResource { /** * Get an existing DeviceLink 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 DeviceLink(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of DeviceLink. 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'] === DeviceLink.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["devices"] = state ? state.devices : undefined; resourceInputs["links"] = state ? state.links : undefined; resourceInputs["metroLinks"] = state ? state.metroLinks : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["redundancyType"] = state ? state.redundancyType : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["subnet"] = state ? state.subnet : undefined; resourceInputs["uuid"] = state ? state.uuid : undefined; } else { const args = argsOrState; if ((!args || args.devices === undefined) && !opts.urn) { throw new Error("Missing required property 'devices'"); } resourceInputs["devices"] = args ? args.devices : undefined; resourceInputs["links"] = args ? args.links : undefined; resourceInputs["metroLinks"] = args ? args.metroLinks : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["redundancyType"] = args ? args.redundancyType : undefined; resourceInputs["subnet"] = args ? args.subnet : undefined; resourceInputs["status"] = undefined /*out*/; resourceInputs["uuid"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DeviceLink.__pulumiType, name, resourceInputs, opts); } } exports.DeviceLink = DeviceLink; /** @internal */ DeviceLink.__pulumiType = 'equinix:networkedge/deviceLink:DeviceLink'; //# sourceMappingURL=deviceLink.js.map