UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

100 lines 4.65 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.BgpPeer = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage direct connect bgp peer * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const foo = new volcengine.direct_connect.BgpPeer("foo", { * description: "tf-test", * remoteAsn: 2000, * virtualInterfaceId: "dcv-62vi13v131tsn3gd6il****", * }); * ``` * * ## Import * * DirectConnectBgpPeer can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:direct_connect/bgpPeer:BgpPeer default bgp-2752hz4teko3k7fap8u4c**** * ``` */ class BgpPeer extends pulumi.CustomResource { /** * Get an existing BgpPeer 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 BgpPeer(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of BgpPeer. 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'] === BgpPeer.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accountId"] = state ? state.accountId : undefined; resourceInputs["authKey"] = state ? state.authKey : undefined; resourceInputs["bgpPeerId"] = state ? state.bgpPeerId : undefined; resourceInputs["bgpPeerName"] = state ? state.bgpPeerName : undefined; resourceInputs["creationTime"] = state ? state.creationTime : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["localAsn"] = state ? state.localAsn : undefined; resourceInputs["remoteAsn"] = state ? state.remoteAsn : undefined; resourceInputs["sessionStatus"] = state ? state.sessionStatus : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; resourceInputs["virtualInterfaceId"] = state ? state.virtualInterfaceId : undefined; } else { const args = argsOrState; if ((!args || args.remoteAsn === undefined) && !opts.urn) { throw new Error("Missing required property 'remoteAsn'"); } if ((!args || args.virtualInterfaceId === undefined) && !opts.urn) { throw new Error("Missing required property 'virtualInterfaceId'"); } resourceInputs["authKey"] = args ? args.authKey : undefined; resourceInputs["bgpPeerName"] = args ? args.bgpPeerName : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["remoteAsn"] = args ? args.remoteAsn : undefined; resourceInputs["virtualInterfaceId"] = args ? args.virtualInterfaceId : undefined; resourceInputs["accountId"] = undefined /*out*/; resourceInputs["bgpPeerId"] = undefined /*out*/; resourceInputs["creationTime"] = undefined /*out*/; resourceInputs["localAsn"] = undefined /*out*/; resourceInputs["sessionStatus"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(BgpPeer.__pulumiType, name, resourceInputs, opts); } } exports.BgpPeer = BgpPeer; /** @internal */ BgpPeer.__pulumiType = 'volcengine:direct_connect/bgpPeer:BgpPeer'; //# sourceMappingURL=bgpPeer.js.map