UNPKG

@equinix-labs/pulumi-equinix

Version:

A Pulumi package for creating and managing equinix cloud resources.

110 lines 5.18 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.Bgp = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource `equinix.networkedge.Bgp` allows creation and management of Equinix Network Edge BGP peering configurations. * * ## Example Usage * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as equinix from "@equinix-labs/pulumi-equinix"; * * const test = new equinix.networkedge.Bgp("test", { * connectionId: "54014acf-9730-4b55-a791-459283d05fb1", * localIpAddress: "10.1.1.1/30", * localAsn: 12345, * remoteIpAddress: "10.1.1.2", * remoteAsn: 66123, * authenticationKey: "secret", * }); * ``` * * ## Import * * This resource can be imported using an existing ID: * * ```sh * $ pulumi import equinix:networkedge/bgp:Bgp example {existing_id} * ``` */ class Bgp extends pulumi.CustomResource { /** * Get an existing Bgp 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 Bgp(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Bgp. 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'] === Bgp.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["authenticationKey"] = state ? state.authenticationKey : undefined; resourceInputs["connectionId"] = state ? state.connectionId : undefined; resourceInputs["deviceId"] = state ? state.deviceId : undefined; resourceInputs["localAsn"] = state ? state.localAsn : undefined; resourceInputs["localIpAddress"] = state ? state.localIpAddress : undefined; resourceInputs["provisioningStatus"] = state ? state.provisioningStatus : undefined; resourceInputs["remoteAsn"] = state ? state.remoteAsn : undefined; resourceInputs["remoteIpAddress"] = state ? state.remoteIpAddress : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["uuid"] = state ? state.uuid : undefined; } else { const args = argsOrState; if ((!args || args.connectionId === undefined) && !opts.urn) { throw new Error("Missing required property 'connectionId'"); } if ((!args || args.localAsn === undefined) && !opts.urn) { throw new Error("Missing required property 'localAsn'"); } if ((!args || args.localIpAddress === undefined) && !opts.urn) { throw new Error("Missing required property 'localIpAddress'"); } if ((!args || args.remoteAsn === undefined) && !opts.urn) { throw new Error("Missing required property 'remoteAsn'"); } if ((!args || args.remoteIpAddress === undefined) && !opts.urn) { throw new Error("Missing required property 'remoteIpAddress'"); } resourceInputs["authenticationKey"] = (args === null || args === void 0 ? void 0 : args.authenticationKey) ? pulumi.secret(args.authenticationKey) : undefined; resourceInputs["connectionId"] = args ? args.connectionId : undefined; resourceInputs["localAsn"] = args ? args.localAsn : undefined; resourceInputs["localIpAddress"] = args ? args.localIpAddress : undefined; resourceInputs["remoteAsn"] = args ? args.remoteAsn : undefined; resourceInputs["remoteIpAddress"] = args ? args.remoteIpAddress : undefined; resourceInputs["deviceId"] = undefined /*out*/; resourceInputs["provisioningStatus"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["uuid"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["authenticationKey"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Bgp.__pulumiType, name, resourceInputs, opts); } } exports.Bgp = Bgp; /** @internal */ Bgp.__pulumiType = 'equinix:networkedge/bgp:Bgp'; //# sourceMappingURL=bgp.js.map