@pulumi/openstack
Version: 
A Pulumi package for creating and managing OpenStack cloud resources.
103 lines • 3.69 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.VolumeTypeV3 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Manages a V3 block storage volume type resource within OpenStack.
 *
 * > **Note:** This usually requires admin privileges.
 *
 * ## Example Usage
 *
 * ### Basic Volume Type
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as openstack from "@pulumi/openstack";
 *
 * const volumeType1 = new openstack.blockstorage.VolumeTypeV3("volume_type_1", {
 *     name: "volume_type_1",
 *     description: "Volume type 1",
 *     extraSpecs: {
 *         capabilities: "gpu",
 *         volume_backend_name: "ssd",
 *     },
 * });
 * ```
 *
 * ### Volume Type with multiattach enabled
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as openstack from "@pulumi/openstack";
 *
 * const multiattach = new openstack.blockstorage.VolumeTypeV3("multiattach", {
 *     name: "multiattach",
 *     description: "Multiattach-enabled volume type",
 *     extraSpecs: {
 *         multiattach: "<is> True",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Volume types can be imported using the `volume_type_id`, e.g.
 *
 * ```sh
 * $ pulumi import openstack:blockstorage/volumeTypeV3:VolumeTypeV3 volume_type_1 941793f0-0a34-4bc4-b72e-a6326ae58283
 * ```
 */
class VolumeTypeV3 extends pulumi.CustomResource {
    /**
     * Get an existing VolumeTypeV3 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 VolumeTypeV3(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of VolumeTypeV3.  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'] === VolumeTypeV3.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["description"] = state?.description;
            resourceInputs["extraSpecs"] = state?.extraSpecs;
            resourceInputs["isPublic"] = state?.isPublic;
            resourceInputs["name"] = state?.name;
            resourceInputs["region"] = state?.region;
        }
        else {
            const args = argsOrState;
            resourceInputs["description"] = args?.description;
            resourceInputs["extraSpecs"] = args?.extraSpecs;
            resourceInputs["isPublic"] = args?.isPublic;
            resourceInputs["name"] = args?.name;
            resourceInputs["region"] = args?.region;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(VolumeTypeV3.__pulumiType, name, resourceInputs, opts);
    }
}
exports.VolumeTypeV3 = VolumeTypeV3;
/** @internal */
VolumeTypeV3.__pulumiType = 'openstack:blockstorage/volumeTypeV3:VolumeTypeV3';
//# sourceMappingURL=volumeTypeV3.js.map