UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

217 lines • 10.6 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.Volume = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * A volume is a file system container in a storage pool that stores application, database, and user data. * * You can create a volume's capacity using the available capacity in the storage pool and you can define and resize the capacity without disruption to any processes. * * Storage pool settings apply to the volumes contained within them automatically. * * To get more information about Volume, see: * * * [API documentation](https://cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.volumes) * * How-to Guides * * [Documentation](https://cloud.google.com/netapp/volumes/docs/configure-and-use/volumes/overview) * * [Quickstart](https://cloud.google.com/netapp/volumes/docs/get-started/quickstarts/create-volume) * * ## Example Usage * * ### Netapp Volume Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = gcp.compute.getNetwork({ * name: "test-network", * }); * const defaultStoragePool = new gcp.netapp.StoragePool("default", { * name: "test-pool", * location: "us-west2", * serviceLevel: "PREMIUM", * capacityGib: "2048", * network: _default.then(_default => _default.id), * }); * const testVolume = new gcp.netapp.Volume("test_volume", { * location: "us-west2", * name: "test-volume", * capacityGib: "100", * shareName: "test-volume", * storagePool: defaultStoragePool.name, * protocols: ["NFSV3"], * deletionPolicy: "DEFAULT", * }); * ``` * * ## Import * * Volume can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/volumes/{{name}}` * * * `{{project}}/{{location}}/{{name}}` * * * `{{location}}/{{name}}` * * When using the `pulumi import` command, Volume can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:netapp/volume:Volume default projects/{{project}}/locations/{{location}}/volumes/{{name}} * ``` * * ```sh * $ pulumi import gcp:netapp/volume:Volume default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:netapp/volume:Volume default {{location}}/{{name}} * ``` */ class Volume extends pulumi.CustomResource { /** * Get an existing Volume 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 Volume(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Volume. 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'] === Volume.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["activeDirectory"] = state?.activeDirectory; resourceInputs["backupConfig"] = state?.backupConfig; resourceInputs["capacityGib"] = state?.capacityGib; resourceInputs["coldTierSizeGib"] = state?.coldTierSizeGib; resourceInputs["createTime"] = state?.createTime; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["description"] = state?.description; resourceInputs["effectiveLabels"] = state?.effectiveLabels; resourceInputs["encryptionType"] = state?.encryptionType; resourceInputs["exportPolicy"] = state?.exportPolicy; resourceInputs["hasReplication"] = state?.hasReplication; resourceInputs["hybridReplicationParameters"] = state?.hybridReplicationParameters; resourceInputs["kerberosEnabled"] = state?.kerberosEnabled; resourceInputs["kmsConfig"] = state?.kmsConfig; resourceInputs["labels"] = state?.labels; resourceInputs["largeCapacity"] = state?.largeCapacity; resourceInputs["ldapEnabled"] = state?.ldapEnabled; resourceInputs["location"] = state?.location; resourceInputs["mountOptions"] = state?.mountOptions; resourceInputs["multipleEndpoints"] = state?.multipleEndpoints; resourceInputs["name"] = state?.name; resourceInputs["network"] = state?.network; resourceInputs["project"] = state?.project; resourceInputs["protocols"] = state?.protocols; resourceInputs["psaRange"] = state?.psaRange; resourceInputs["pulumiLabels"] = state?.pulumiLabels; resourceInputs["replicaZone"] = state?.replicaZone; resourceInputs["restoreParameters"] = state?.restoreParameters; resourceInputs["restrictedActions"] = state?.restrictedActions; resourceInputs["securityStyle"] = state?.securityStyle; resourceInputs["serviceLevel"] = state?.serviceLevel; resourceInputs["shareName"] = state?.shareName; resourceInputs["smbSettings"] = state?.smbSettings; resourceInputs["snapshotDirectory"] = state?.snapshotDirectory; resourceInputs["snapshotPolicy"] = state?.snapshotPolicy; resourceInputs["state"] = state?.state; resourceInputs["stateDetails"] = state?.stateDetails; resourceInputs["storagePool"] = state?.storagePool; resourceInputs["throughputMibps"] = state?.throughputMibps; resourceInputs["tieringPolicy"] = state?.tieringPolicy; resourceInputs["unixPermissions"] = state?.unixPermissions; resourceInputs["usedGib"] = state?.usedGib; resourceInputs["zone"] = state?.zone; } else { const args = argsOrState; if (args?.capacityGib === undefined && !opts.urn) { throw new Error("Missing required property 'capacityGib'"); } if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } if (args?.protocols === undefined && !opts.urn) { throw new Error("Missing required property 'protocols'"); } if (args?.shareName === undefined && !opts.urn) { throw new Error("Missing required property 'shareName'"); } if (args?.storagePool === undefined && !opts.urn) { throw new Error("Missing required property 'storagePool'"); } resourceInputs["backupConfig"] = args?.backupConfig; resourceInputs["capacityGib"] = args?.capacityGib; resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["description"] = args?.description; resourceInputs["exportPolicy"] = args?.exportPolicy; resourceInputs["hybridReplicationParameters"] = args?.hybridReplicationParameters; resourceInputs["kerberosEnabled"] = args?.kerberosEnabled; resourceInputs["labels"] = args?.labels; resourceInputs["largeCapacity"] = args?.largeCapacity; resourceInputs["location"] = args?.location; resourceInputs["multipleEndpoints"] = args?.multipleEndpoints; resourceInputs["name"] = args?.name; resourceInputs["project"] = args?.project; resourceInputs["protocols"] = args?.protocols; resourceInputs["restoreParameters"] = args?.restoreParameters; resourceInputs["restrictedActions"] = args?.restrictedActions; resourceInputs["securityStyle"] = args?.securityStyle; resourceInputs["shareName"] = args?.shareName; resourceInputs["smbSettings"] = args?.smbSettings; resourceInputs["snapshotDirectory"] = args?.snapshotDirectory; resourceInputs["snapshotPolicy"] = args?.snapshotPolicy; resourceInputs["storagePool"] = args?.storagePool; resourceInputs["throughputMibps"] = args?.throughputMibps; resourceInputs["tieringPolicy"] = args?.tieringPolicy; resourceInputs["unixPermissions"] = args?.unixPermissions; resourceInputs["activeDirectory"] = undefined /*out*/; resourceInputs["coldTierSizeGib"] = undefined /*out*/; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["effectiveLabels"] = undefined /*out*/; resourceInputs["encryptionType"] = undefined /*out*/; resourceInputs["hasReplication"] = undefined /*out*/; resourceInputs["kmsConfig"] = undefined /*out*/; resourceInputs["ldapEnabled"] = undefined /*out*/; resourceInputs["mountOptions"] = undefined /*out*/; resourceInputs["network"] = undefined /*out*/; resourceInputs["psaRange"] = undefined /*out*/; resourceInputs["pulumiLabels"] = undefined /*out*/; resourceInputs["replicaZone"] = undefined /*out*/; resourceInputs["serviceLevel"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["stateDetails"] = undefined /*out*/; resourceInputs["usedGib"] = undefined /*out*/; resourceInputs["zone"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Volume.__pulumiType, name, resourceInputs, opts); } } exports.Volume = Volume; /** @internal */ Volume.__pulumiType = 'gcp:netapp/volume:Volume'; //# sourceMappingURL=volume.js.map