@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
98 lines • 5.26 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.QuotaSetV2 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a V2 compute 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_name`, e.g.
*
* ```sh
* $ pulumi import openstack:compute/quotaSetV2:QuotaSetV2 quotaset_1 2a0f2240-c5e6-41de-896d-e80d97428d6b/region_1
* ```
*/
class QuotaSetV2 extends pulumi.CustomResource {
/**
* Get an existing QuotaSetV2 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 QuotaSetV2(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of QuotaSetV2. 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'] === QuotaSetV2.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["cores"] = state ? state.cores : undefined;
resourceInputs["fixedIps"] = state ? state.fixedIps : undefined;
resourceInputs["floatingIps"] = state ? state.floatingIps : undefined;
resourceInputs["injectedFileContentBytes"] = state ? state.injectedFileContentBytes : undefined;
resourceInputs["injectedFilePathBytes"] = state ? state.injectedFilePathBytes : undefined;
resourceInputs["injectedFiles"] = state ? state.injectedFiles : undefined;
resourceInputs["instances"] = state ? state.instances : undefined;
resourceInputs["keyPairs"] = state ? state.keyPairs : undefined;
resourceInputs["metadataItems"] = state ? state.metadataItems : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
resourceInputs["ram"] = state ? state.ram : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["securityGroupRules"] = state ? state.securityGroupRules : undefined;
resourceInputs["securityGroups"] = state ? state.securityGroups : undefined;
resourceInputs["serverGroupMembers"] = state ? state.serverGroupMembers : undefined;
resourceInputs["serverGroups"] = state ? state.serverGroups : undefined;
}
else {
const args = argsOrState;
if ((!args || args.projectId === undefined) && !opts.urn) {
throw new Error("Missing required property 'projectId'");
}
resourceInputs["cores"] = args ? args.cores : undefined;
resourceInputs["fixedIps"] = args ? args.fixedIps : undefined;
resourceInputs["floatingIps"] = args ? args.floatingIps : undefined;
resourceInputs["injectedFileContentBytes"] = args ? args.injectedFileContentBytes : undefined;
resourceInputs["injectedFilePathBytes"] = args ? args.injectedFilePathBytes : undefined;
resourceInputs["injectedFiles"] = args ? args.injectedFiles : undefined;
resourceInputs["instances"] = args ? args.instances : undefined;
resourceInputs["keyPairs"] = args ? args.keyPairs : undefined;
resourceInputs["metadataItems"] = args ? args.metadataItems : undefined;
resourceInputs["projectId"] = args ? args.projectId : undefined;
resourceInputs["ram"] = args ? args.ram : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["securityGroupRules"] = args ? args.securityGroupRules : undefined;
resourceInputs["securityGroups"] = args ? args.securityGroups : undefined;
resourceInputs["serverGroupMembers"] = args ? args.serverGroupMembers : undefined;
resourceInputs["serverGroups"] = args ? args.serverGroups : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(QuotaSetV2.__pulumiType, name, resourceInputs, opts);
}
}
exports.QuotaSetV2 = QuotaSetV2;
/** @internal */
QuotaSetV2.__pulumiType = 'openstack:compute/quotaSetV2:QuotaSetV2';
//# sourceMappingURL=quotaSetV2.js.map