@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
80 lines • 3.33 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.QuotaV2 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages DNS quota in OpenStack DNS Service.
*
* > **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
*
* Quotas can be imported using the `project_id/region_name`, e.g.
*
* ```sh
* $ pulumi import openstack:dns/quotaV2:QuotaV2 quota_1 2a0f2240-c5e6-41de-896d-e80d97428d6b/region_1
* ```
*/
class QuotaV2 extends pulumi.CustomResource {
/**
* Get an existing QuotaV2 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 QuotaV2(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of QuotaV2. 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'] === QuotaV2.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["apiExportSize"] = state?.apiExportSize;
resourceInputs["projectId"] = state?.projectId;
resourceInputs["recordsetRecords"] = state?.recordsetRecords;
resourceInputs["region"] = state?.region;
resourceInputs["zoneRecords"] = state?.zoneRecords;
resourceInputs["zoneRecordsets"] = state?.zoneRecordsets;
resourceInputs["zones"] = state?.zones;
}
else {
const args = argsOrState;
if (args?.projectId === undefined && !opts.urn) {
throw new Error("Missing required property 'projectId'");
}
resourceInputs["apiExportSize"] = args?.apiExportSize;
resourceInputs["projectId"] = args?.projectId;
resourceInputs["recordsetRecords"] = args?.recordsetRecords;
resourceInputs["region"] = args?.region;
resourceInputs["zoneRecords"] = args?.zoneRecords;
resourceInputs["zoneRecordsets"] = args?.zoneRecordsets;
resourceInputs["zones"] = args?.zones;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(QuotaV2.__pulumiType, name, resourceInputs, opts);
}
}
exports.QuotaV2 = QuotaV2;
/** @internal */
QuotaV2.__pulumiType = 'openstack:dns/quotaV2:QuotaV2';
//# sourceMappingURL=quotaV2.js.map