@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
107 lines • 4.22 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.Quota = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a V2 load balancer quota resource within OpenStack.
*
* > **Note:** This usually requires admin privileges.
*
* > **Note:** This resource has a no-op deletion so no actual actions will be done against the OpenStack
* API in case of delete call.
*
* > **Note:** This resource has attributes that depend on octavia minor versions.
* Please ensure your Openstack cloud supports the required minor version.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const project1 = new openstack.identity.Project("project_1", {name: "project_1"});
* const quota1 = new openstack.loadbalancer.Quota("quota_1", {
* projectId: project1.id,
* loadbalancer: 6,
* listener: 7,
* member: 8,
* pool: 9,
* healthMonitor: 10,
* l7Policy: 11,
* l7Rule: 12,
* });
* ```
*
* ## Import
*
* Quotas can be imported using the `project_id/region_name`, where region_name is the
* one defined is the Openstack credentials that are in use. E.g.
*
* ```sh
* $ pulumi import openstack:loadbalancer/quota:Quota quota_1 2a0f2240-c5e6-41de-896d-e80d97428d6b/region_1
* ```
*/
class Quota extends pulumi.CustomResource {
/**
* Get an existing Quota 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 Quota(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Quota. 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'] === Quota.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["healthMonitor"] = state?.healthMonitor;
resourceInputs["l7Policy"] = state?.l7Policy;
resourceInputs["l7Rule"] = state?.l7Rule;
resourceInputs["listener"] = state?.listener;
resourceInputs["loadbalancer"] = state?.loadbalancer;
resourceInputs["member"] = state?.member;
resourceInputs["pool"] = state?.pool;
resourceInputs["projectId"] = state?.projectId;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.projectId === undefined && !opts.urn) {
throw new Error("Missing required property 'projectId'");
}
resourceInputs["healthMonitor"] = args?.healthMonitor;
resourceInputs["l7Policy"] = args?.l7Policy;
resourceInputs["l7Rule"] = args?.l7Rule;
resourceInputs["listener"] = args?.listener;
resourceInputs["loadbalancer"] = args?.loadbalancer;
resourceInputs["member"] = args?.member;
resourceInputs["pool"] = args?.pool;
resourceInputs["projectId"] = args?.projectId;
resourceInputs["region"] = args?.region;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Quota.__pulumiType, name, resourceInputs, opts);
}
}
exports.Quota = Quota;
/** @internal */
Quota.__pulumiType = 'openstack:loadbalancer/quota:Quota';
//# sourceMappingURL=quota.js.map