UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

98 lines 4.18 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.BgpPeerV2 = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a V2 Neutron BGP Peer resource within OpenStack. * * This resource allows you to configure a BGP peer that can be associated with a * BGP speaker to exchange routing information. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const peer1 = new openstack.networking.BgpPeerV2("peer_1", { * name: "bgp_peer_1", * peerIp: "192.0.2.10", * remoteAs: 65001, * authType: "md5", * password: "supersecret", * }); * ``` * * ## Import * * BGP peers can be imported using their ID: * * ```sh * $ pulumi import openstack:networking/bgpPeerV2:BgpPeerV2 peer1 a1b2c3d4-e5f6-7890-abcd-1234567890ef * ``` */ class BgpPeerV2 extends pulumi.CustomResource { /** * Get an existing BgpPeerV2 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 BgpPeerV2(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of BgpPeerV2. 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'] === BgpPeerV2.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["authType"] = state ? state.authType : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["password"] = state ? state.password : undefined; resourceInputs["peerIp"] = state ? state.peerIp : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["remoteAs"] = state ? state.remoteAs : undefined; resourceInputs["tenantId"] = state ? state.tenantId : undefined; } else { const args = argsOrState; if ((!args || args.peerIp === undefined) && !opts.urn) { throw new Error("Missing required property 'peerIp'"); } if ((!args || args.remoteAs === undefined) && !opts.urn) { throw new Error("Missing required property 'remoteAs'"); } resourceInputs["authType"] = args ? args.authType : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined; resourceInputs["peerIp"] = args ? args.peerIp : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["remoteAs"] = args ? args.remoteAs : undefined; resourceInputs["tenantId"] = args ? args.tenantId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["password"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(BgpPeerV2.__pulumiType, name, resourceInputs, opts); } } exports.BgpPeerV2 = BgpPeerV2; /** @internal */ BgpPeerV2.__pulumiType = 'openstack:networking/bgpPeerV2:BgpPeerV2'; //# sourceMappingURL=bgpPeerV2.js.map