@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
93 lines • 4.6 kB
JavaScript
;
// *** 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.BgpvpnNetworkAssociateV2 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages a V2 BGP VPN network association resource within OpenStack.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const association1 = new openstack.bgpvpn.NetworkAssociateV2("association_1", {
* bgpvpnId: "e7189337-5684-46ee-bcb1-44f1a57066c9",
* networkId: "de83d56c-4d2f-44f7-ac24-af393252204f",
* });
* ```
*
* ## Import
*
* BGP VPN network associations can be imported using the BGP VPN ID and BGP VPN
*
* network association ID separated by a slash, e.g.:
*
* hcl
*
* ```sh
* $ pulumi import openstack:index/bgpvpnNetworkAssociateV2:BgpvpnNetworkAssociateV2 association_1 2145aaa9-edaa-44fb-9815-e47a96677a72/67bb952a-f9d1-4fc8-ae84-082253a879d4
* ```
*
* @deprecated openstack.index/bgpvpnnetworkassociatev2.BgpvpnNetworkAssociateV2 has been deprecated in favor of openstack.bgpvpn/networkassociatev2.NetworkAssociateV2
*/
class BgpvpnNetworkAssociateV2 extends pulumi.CustomResource {
/**
* Get an existing BgpvpnNetworkAssociateV2 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) {
pulumi.log.warn("BgpvpnNetworkAssociateV2 is deprecated: openstack.index/bgpvpnnetworkassociatev2.BgpvpnNetworkAssociateV2 has been deprecated in favor of openstack.bgpvpn/networkassociatev2.NetworkAssociateV2");
return new BgpvpnNetworkAssociateV2(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of BgpvpnNetworkAssociateV2. 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'] === BgpvpnNetworkAssociateV2.__pulumiType;
}
/** @deprecated openstack.index/bgpvpnnetworkassociatev2.BgpvpnNetworkAssociateV2 has been deprecated in favor of openstack.bgpvpn/networkassociatev2.NetworkAssociateV2 */
constructor(name, argsOrState, opts) {
pulumi.log.warn("BgpvpnNetworkAssociateV2 is deprecated: openstack.index/bgpvpnnetworkassociatev2.BgpvpnNetworkAssociateV2 has been deprecated in favor of openstack.bgpvpn/networkassociatev2.NetworkAssociateV2");
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["bgpvpnId"] = state ? state.bgpvpnId : undefined;
resourceInputs["networkId"] = state ? state.networkId : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
resourceInputs["region"] = state ? state.region : undefined;
}
else {
const args = argsOrState;
if ((!args || args.bgpvpnId === undefined) && !opts.urn) {
throw new Error("Missing required property 'bgpvpnId'");
}
if ((!args || args.networkId === undefined) && !opts.urn) {
throw new Error("Missing required property 'networkId'");
}
resourceInputs["bgpvpnId"] = args ? args.bgpvpnId : undefined;
resourceInputs["networkId"] = args ? args.networkId : undefined;
resourceInputs["projectId"] = args ? args.projectId : undefined;
resourceInputs["region"] = args ? args.region : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(BgpvpnNetworkAssociateV2.__pulumiType, name, resourceInputs, opts);
}
}
exports.BgpvpnNetworkAssociateV2 = BgpvpnNetworkAssociateV2;
/** @internal */
BgpvpnNetworkAssociateV2.__pulumiType = 'openstack:index/bgpvpnNetworkAssociateV2:BgpvpnNetworkAssociateV2';
//# sourceMappingURL=bgpvpnNetworkAssociateV2.js.map