UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

88 lines 4.24 kB
"use strict"; // *** 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 a V2 networking 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. * * ## Import * * Quotas can be imported using the `project_id/region_name`, e.g. * * ```sh * $ pulumi import openstack:networking/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, Object.assign(Object.assign({}, 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["floatingip"] = state ? state.floatingip : undefined; resourceInputs["network"] = state ? state.network : undefined; resourceInputs["port"] = state ? state.port : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["rbacPolicy"] = state ? state.rbacPolicy : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["router"] = state ? state.router : undefined; resourceInputs["securityGroup"] = state ? state.securityGroup : undefined; resourceInputs["securityGroupRule"] = state ? state.securityGroupRule : undefined; resourceInputs["subnet"] = state ? state.subnet : undefined; resourceInputs["subnetpool"] = state ? state.subnetpool : undefined; } else { const args = argsOrState; if ((!args || args.projectId === undefined) && !opts.urn) { throw new Error("Missing required property 'projectId'"); } resourceInputs["floatingip"] = args ? args.floatingip : undefined; resourceInputs["network"] = args ? args.network : undefined; resourceInputs["port"] = args ? args.port : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["rbacPolicy"] = args ? args.rbacPolicy : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["router"] = args ? args.router : undefined; resourceInputs["securityGroup"] = args ? args.securityGroup : undefined; resourceInputs["securityGroupRule"] = args ? args.securityGroupRule : undefined; resourceInputs["subnet"] = args ? args.subnet : undefined; resourceInputs["subnetpool"] = args ? args.subnetpool : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(QuotaV2.__pulumiType, name, resourceInputs, opts); } } exports.QuotaV2 = QuotaV2; /** @internal */ QuotaV2.__pulumiType = 'openstack:networking/quotaV2:QuotaV2'; //# sourceMappingURL=quotaV2.js.map