@cuemby/equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
68 lines • 3.42 kB
JavaScript
;
// *** 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.MetalBGPSession = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides a resource to manage BGP sessions in Equinix Metal Host. Refer to [Equinix Metal BGP documentation](https://metal.equinix.com/developers/docs/networking/local-global-bgp/) for more details.
*
* You need to have BGP config enabled in your project.
*
* BGP session must be linked to a device running [BIRD](https://bird.network.cz) or other BGP routing daemon which will control route advertisements via the session to Equinix Metal's upstream routers.
*/
class MetalBGPSession extends pulumi.CustomResource {
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["addressFamily"] = state ? state.addressFamily : undefined;
resourceInputs["defaultRoute"] = state ? state.defaultRoute : undefined;
resourceInputs["deviceId"] = state ? state.deviceId : undefined;
resourceInputs["status"] = state ? state.status : undefined;
}
else {
const args = argsOrState;
if ((!args || args.addressFamily === undefined) && !opts.urn) {
throw new Error("Missing required property 'addressFamily'");
}
if ((!args || args.deviceId === undefined) && !opts.urn) {
throw new Error("Missing required property 'deviceId'");
}
resourceInputs["addressFamily"] = args ? args.addressFamily : undefined;
resourceInputs["defaultRoute"] = args ? args.defaultRoute : undefined;
resourceInputs["deviceId"] = args ? args.deviceId : undefined;
resourceInputs["status"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(MetalBGPSession.__pulumiType, name, resourceInputs, opts);
}
/**
* Get an existing MetalBGPSession 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 MetalBGPSession(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of MetalBGPSession. 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'] === MetalBGPSession.__pulumiType;
}
}
exports.MetalBGPSession = MetalBGPSession;
/** @internal */
MetalBGPSession.__pulumiType = 'equinix:index/metalBGPSession:MetalBGPSession';
//# sourceMappingURL=metalBGPSession.js.map