@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
88 lines • 3.62 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.EndpointGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a V2 Neutron Endpoint Group resource within OpenStack.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const group1 = new openstack.vpnaas.EndpointGroup("group_1", {
* name: "Group 1",
* type: "cidr",
* endpoints: [
* "10.2.0.0/24",
* "10.3.0.0/24",
* ],
* });
* ```
*
* ## Import
*
* Groups can be imported using the `id`, e.g.
*
* ```sh
* $ pulumi import openstack:vpnaas/endpointGroup:EndpointGroup group_1 832cb7f3-59fe-40cf-8f64-8350ffc03272
* ```
*/
class EndpointGroup extends pulumi.CustomResource {
/**
* Get an existing EndpointGroup 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 EndpointGroup(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of EndpointGroup. 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'] === EndpointGroup.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["endpoints"] = state ? state.endpoints : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["tenantId"] = state ? state.tenantId : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["valueSpecs"] = state ? state.valueSpecs : undefined;
}
else {
const args = argsOrState;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["endpoints"] = args ? args.endpoints : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["tenantId"] = args ? args.tenantId : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["valueSpecs"] = args ? args.valueSpecs : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(EndpointGroup.__pulumiType, name, resourceInputs, opts);
}
}
exports.EndpointGroup = EndpointGroup;
/** @internal */
EndpointGroup.__pulumiType = 'openstack:vpnaas/endpointGroup:EndpointGroup';
//# sourceMappingURL=endpointGroup.js.map