@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
86 lines • 4.18 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.QuoteSetV3 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a V3 block storage quotaset 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.
*
* ## Import
*
* Quotasets can be imported using the `project_id/region`, e.g.
*
* ```sh
* $ pulumi import openstack:blockstorage/quoteSetV3:QuoteSetV3 quotaset_1 2a0f2240-c5e6-41de-896d-e80d97428d6b/region_1
* ```
*/
class QuoteSetV3 extends pulumi.CustomResource {
/**
* Get an existing QuoteSetV3 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 QuoteSetV3(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of QuoteSetV3. 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'] === QuoteSetV3.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["backupGigabytes"] = state ? state.backupGigabytes : undefined;
resourceInputs["backups"] = state ? state.backups : undefined;
resourceInputs["gigabytes"] = state ? state.gigabytes : undefined;
resourceInputs["groups"] = state ? state.groups : undefined;
resourceInputs["perVolumeGigabytes"] = state ? state.perVolumeGigabytes : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["snapshots"] = state ? state.snapshots : undefined;
resourceInputs["volumeTypeQuota"] = state ? state.volumeTypeQuota : undefined;
resourceInputs["volumes"] = state ? state.volumes : undefined;
}
else {
const args = argsOrState;
if ((!args || args.projectId === undefined) && !opts.urn) {
throw new Error("Missing required property 'projectId'");
}
resourceInputs["backupGigabytes"] = args ? args.backupGigabytes : undefined;
resourceInputs["backups"] = args ? args.backups : undefined;
resourceInputs["gigabytes"] = args ? args.gigabytes : undefined;
resourceInputs["groups"] = args ? args.groups : undefined;
resourceInputs["perVolumeGigabytes"] = args ? args.perVolumeGigabytes : undefined;
resourceInputs["projectId"] = args ? args.projectId : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["snapshots"] = args ? args.snapshots : undefined;
resourceInputs["volumeTypeQuota"] = args ? args.volumeTypeQuota : undefined;
resourceInputs["volumes"] = args ? args.volumes : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(QuoteSetV3.__pulumiType, name, resourceInputs, opts);
}
}
exports.QuoteSetV3 = QuoteSetV3;
/** @internal */
QuoteSetV3.__pulumiType = 'openstack:blockstorage/quoteSetV3:QuoteSetV3';
//# sourceMappingURL=quoteSetV3.js.map