All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.netapp.kotlin.VolumeArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.netapp.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.netapp.VolumeArgs.builder
import com.pulumi.gcp.netapp.kotlin.inputs.VolumeBackupConfigArgs
import com.pulumi.gcp.netapp.kotlin.inputs.VolumeBackupConfigArgsBuilder
import com.pulumi.gcp.netapp.kotlin.inputs.VolumeExportPolicyArgs
import com.pulumi.gcp.netapp.kotlin.inputs.VolumeExportPolicyArgsBuilder
import com.pulumi.gcp.netapp.kotlin.inputs.VolumeRestoreParametersArgs
import com.pulumi.gcp.netapp.kotlin.inputs.VolumeRestoreParametersArgsBuilder
import com.pulumi.gcp.netapp.kotlin.inputs.VolumeSnapshotPolicyArgs
import com.pulumi.gcp.netapp.kotlin.inputs.VolumeSnapshotPolicyArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * 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",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.compute.get_network(name="test-network")
 * default_storage_pool = gcp.netapp.StoragePool("default",
 *     name="test-pool",
 *     location="us-west2",
 *     service_level="PREMIUM",
 *     capacity_gib="2048",
 *     network=default.id)
 * test_volume = gcp.netapp.Volume("test_volume",
 *     location="us-west2",
 *     name="test-volume",
 *     capacity_gib="100",
 *     share_name="test-volume",
 *     storage_pool=default_storage_pool.name,
 *     protocols=["NFSV3"],
 *     deletion_policy="DEFAULT")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = Gcp.Compute.GetNetwork.Invoke(new()
 *     {
 *         Name = "test-network",
 *     });
 *     var defaultStoragePool = new Gcp.Netapp.StoragePool("default", new()
 *     {
 *         Name = "test-pool",
 *         Location = "us-west2",
 *         ServiceLevel = "PREMIUM",
 *         CapacityGib = "2048",
 *         Network = @default.Apply(@default => @default.Apply(getNetworkResult => getNetworkResult.Id)),
 *     });
 *     var testVolume = new Gcp.Netapp.Volume("test_volume", new()
 *     {
 *         Location = "us-west2",
 *         Name = "test-volume",
 *         CapacityGib = "100",
 *         ShareName = "test-volume",
 *         StoragePool = defaultStoragePool.Name,
 *         Protocols = new[]
 *         {
 *             "NFSV3",
 *         },
 *         DeletionPolicy = "DEFAULT",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/netapp"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_default, err := compute.LookupNetwork(ctx, &compute.LookupNetworkArgs{
 * 			Name: "test-network",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		defaultStoragePool, err := netapp.NewStoragePool(ctx, "default", &netapp.StoragePoolArgs{
 * 			Name:         pulumi.String("test-pool"),
 * 			Location:     pulumi.String("us-west2"),
 * 			ServiceLevel: pulumi.String("PREMIUM"),
 * 			CapacityGib:  pulumi.String("2048"),
 * 			Network:      pulumi.String(_default.Id),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = netapp.NewVolume(ctx, "test_volume", &netapp.VolumeArgs{
 * 			Location:    pulumi.String("us-west2"),
 * 			Name:        pulumi.String("test-volume"),
 * 			CapacityGib: pulumi.String("100"),
 * 			ShareName:   pulumi.String("test-volume"),
 * 			StoragePool: defaultStoragePool.Name,
 * 			Protocols: pulumi.StringArray{
 * 				pulumi.String("NFSV3"),
 * 			},
 * 			DeletionPolicy: pulumi.String("DEFAULT"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.ComputeFunctions;
 * import com.pulumi.gcp.compute.inputs.GetNetworkArgs;
 * import com.pulumi.gcp.netapp.StoragePool;
 * import com.pulumi.gcp.netapp.StoragePoolArgs;
 * import com.pulumi.gcp.netapp.Volume;
 * import com.pulumi.gcp.netapp.VolumeArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         final var default = ComputeFunctions.getNetwork(GetNetworkArgs.builder()
 *             .name("test-network")
 *             .build());
 *         var defaultStoragePool = new StoragePool("defaultStoragePool", StoragePoolArgs.builder()
 *             .name("test-pool")
 *             .location("us-west2")
 *             .serviceLevel("PREMIUM")
 *             .capacityGib("2048")
 *             .network(default_.id())
 *             .build());
 *         var testVolume = new Volume("testVolume", VolumeArgs.builder()
 *             .location("us-west2")
 *             .name("test-volume")
 *             .capacityGib("100")
 *             .shareName("test-volume")
 *             .storagePool(defaultStoragePool.name())
 *             .protocols("NFSV3")
 *             .deletionPolicy("DEFAULT")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   defaultStoragePool:
 *     type: gcp:netapp:StoragePool
 *     name: default
 *     properties:
 *       name: test-pool
 *       location: us-west2
 *       serviceLevel: PREMIUM
 *       capacityGib: '2048'
 *       network: ${default.id}
 *   testVolume:
 *     type: gcp:netapp:Volume
 *     name: test_volume
 *     properties:
 *       location: us-west2
 *       name: test-volume
 *       capacityGib: '100'
 *       shareName: test-volume
 *       storagePool: ${defaultStoragePool.name}
 *       protocols:
 *         - NFSV3
 *       deletionPolicy: DEFAULT
 * variables:
 *   default:
 *     fn::invoke:
 *       Function: gcp:compute:getNetwork
 *       Arguments:
 *         name: test-network
 * ```
 * 
 * ## 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}}
 * ```
 * @property backupConfig Backup configuration for the volume.
 * Structure is documented below.
 * @property capacityGib Capacity of the volume (in GiB).
 * @property deletionPolicy Policy to determine if the volume should be deleted forcefully.
 * Volumes may have nested snapshot resources. Deleting such a volume will fail.
 * Setting this parameter to FORCE will delete volumes including nested snapshots.
 * @property description An optional description of this resource.
 * @property exportPolicy Export policy of the volume for NFSV3 and/or NFSV4.1 access.
 * Structure is documented below.
 * @property kerberosEnabled Flag indicating if the volume is a kerberos volume or not, export policy rules control kerberos security modes (krb5, krb5i, krb5p).
 * @property labels Labels as key value pairs. Example: `{ "owner": "Bob", "department": "finance", "purpose": "testing" }`.
 * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
 * Please refer to the field `effective_labels` for all of the labels present on the resource.
 * @property location Name of the pool location. Usually a region name, expect for some STANDARD service level pools which require a zone name.
 * @property name The name of the volume. Needs to be unique per location.
 * - - -
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property protocols The protocol of the volume. Allowed combinations are `['NFSV3']`, `['NFSV4']`, `['SMB']`, `['NFSV3', 'NFSV4']`, `['SMB', 'NFSV3']` and `['SMB', 'NFSV4']`.
 * Each value may be one of: `NFSV3`, `NFSV4`, `SMB`.
 * @property restoreParameters Used to create this volume from a snapshot (= cloning) or an backup.
 * Structure is documented below.
 * @property restrictedActions List of actions that are restricted on this volume.
 * Each value may be one of: `DELETE`.
 * @property securityStyle Security Style of the Volume. Use UNIX to use UNIX or NFSV4 ACLs for file permissions.
 * Use NTFS to use NTFS ACLs for file permissions. Can only be set for volumes which use SMB together with NFS as protocol.
 * Possible values are: `NTFS`, `UNIX`.
 * @property shareName Share name (SMB) or export path (NFS) of the volume. Needs to be unique per location.
 * @property smbSettings Settings for volumes with SMB access.
 * Each value may be one of: `ENCRYPT_DATA`, `BROWSABLE`, `CHANGE_NOTIFY`, `NON_BROWSABLE`, `OPLOCKS`, `SHOW_SNAPSHOT`, `SHOW_PREVIOUS_VERSIONS`, `ACCESS_BASED_ENUMERATION`, `CONTINUOUSLY_AVAILABLE`.
 * @property snapshotDirectory If enabled, a NFS volume will contain a read-only .snapshot directory which provides access to each of the volume's snapshots. Will enable "Previous Versions" support for SMB.
 * @property snapshotPolicy Snapshot policy defines the schedule for automatic snapshot creation.
 * To disable automatic snapshot creation you have to remove the whole snapshot_policy block.
 * Structure is documented below.
 * @property storagePool Name of the storage pool to create the volume in. Pool needs enough spare capacity to accomodate the volume.
 * @property unixPermissions Unix permission the mount point will be created with. Default is 0770. Applicable for UNIX security style volumes only.
 */
public data class VolumeArgs(
    public val backupConfig: Output? = null,
    public val capacityGib: Output? = null,
    public val deletionPolicy: Output? = null,
    public val description: Output? = null,
    public val exportPolicy: Output? = null,
    public val kerberosEnabled: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val project: Output? = null,
    public val protocols: Output>? = null,
    public val restoreParameters: Output? = null,
    public val restrictedActions: Output>? = null,
    public val securityStyle: Output? = null,
    public val shareName: Output? = null,
    public val smbSettings: Output>? = null,
    public val snapshotDirectory: Output? = null,
    public val snapshotPolicy: Output? = null,
    public val storagePool: Output? = null,
    public val unixPermissions: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.netapp.VolumeArgs =
        com.pulumi.gcp.netapp.VolumeArgs.builder()
            .backupConfig(backupConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .capacityGib(capacityGib?.applyValue({ args0 -> args0 }))
            .deletionPolicy(deletionPolicy?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .exportPolicy(exportPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .kerberosEnabled(kerberosEnabled?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .protocols(protocols?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .restoreParameters(restoreParameters?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .restrictedActions(restrictedActions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .securityStyle(securityStyle?.applyValue({ args0 -> args0 }))
            .shareName(shareName?.applyValue({ args0 -> args0 }))
            .smbSettings(smbSettings?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .snapshotDirectory(snapshotDirectory?.applyValue({ args0 -> args0 }))
            .snapshotPolicy(snapshotPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .storagePool(storagePool?.applyValue({ args0 -> args0 }))
            .unixPermissions(unixPermissions?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VolumeArgs].
 */
@PulumiTagMarker
public class VolumeArgsBuilder internal constructor() {
    private var backupConfig: Output? = null

    private var capacityGib: Output? = null

    private var deletionPolicy: Output? = null

    private var description: Output? = null

    private var exportPolicy: Output? = null

    private var kerberosEnabled: Output? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var name: Output? = null

    private var project: Output? = null

    private var protocols: Output>? = null

    private var restoreParameters: Output? = null

    private var restrictedActions: Output>? = null

    private var securityStyle: Output? = null

    private var shareName: Output? = null

    private var smbSettings: Output>? = null

    private var snapshotDirectory: Output? = null

    private var snapshotPolicy: Output? = null

    private var storagePool: Output? = null

    private var unixPermissions: Output? = null

    /**
     * @param value Backup configuration for the volume.
     * Structure is documented below.
     */
    @JvmName("guhhlemkrxslnhgg")
    public suspend fun backupConfig(`value`: Output) {
        this.backupConfig = value
    }

    /**
     * @param value Capacity of the volume (in GiB).
     */
    @JvmName("upyjwpimmsibadmp")
    public suspend fun capacityGib(`value`: Output) {
        this.capacityGib = value
    }

    /**
     * @param value Policy to determine if the volume should be deleted forcefully.
     * Volumes may have nested snapshot resources. Deleting such a volume will fail.
     * Setting this parameter to FORCE will delete volumes including nested snapshots.
     */
    @JvmName("hkemwjyfbyjkbijh")
    public suspend fun deletionPolicy(`value`: Output) {
        this.deletionPolicy = value
    }

    /**
     * @param value An optional description of this resource.
     */
    @JvmName("vgpdjqkcibchhbed")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Export policy of the volume for NFSV3 and/or NFSV4.1 access.
     * Structure is documented below.
     */
    @JvmName("darmfkdlovtylcax")
    public suspend fun exportPolicy(`value`: Output) {
        this.exportPolicy = value
    }

    /**
     * @param value Flag indicating if the volume is a kerberos volume or not, export policy rules control kerberos security modes (krb5, krb5i, krb5p).
     */
    @JvmName("nfqkcajxmqcueamv")
    public suspend fun kerberosEnabled(`value`: Output) {
        this.kerberosEnabled = value
    }

    /**
     * @param value Labels as key value pairs. Example: `{ "owner": "Bob", "department": "finance", "purpose": "testing" }`.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("urrhnhkcrnvuecos")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value Name of the pool location. Usually a region name, expect for some STANDARD service level pools which require a zone name.
     */
    @JvmName("ykoqvcgianyecslq")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name of the volume. Needs to be unique per location.
     * - - -
     */
    @JvmName("rpakkmvvlephdlao")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("okgfuajvjkykwpjh")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value The protocol of the volume. Allowed combinations are `['NFSV3']`, `['NFSV4']`, `['SMB']`, `['NFSV3', 'NFSV4']`, `['SMB', 'NFSV3']` and `['SMB', 'NFSV4']`.
     * Each value may be one of: `NFSV3`, `NFSV4`, `SMB`.
     */
    @JvmName("etuvahsrycurnkqq")
    public suspend fun protocols(`value`: Output>) {
        this.protocols = value
    }

    @JvmName("hcyqilxtpxwkvsgn")
    public suspend fun protocols(vararg values: Output) {
        this.protocols = Output.all(values.asList())
    }

    /**
     * @param values The protocol of the volume. Allowed combinations are `['NFSV3']`, `['NFSV4']`, `['SMB']`, `['NFSV3', 'NFSV4']`, `['SMB', 'NFSV3']` and `['SMB', 'NFSV4']`.
     * Each value may be one of: `NFSV3`, `NFSV4`, `SMB`.
     */
    @JvmName("ajywqlydnbrxwrbv")
    public suspend fun protocols(values: List>) {
        this.protocols = Output.all(values)
    }

    /**
     * @param value Used to create this volume from a snapshot (= cloning) or an backup.
     * Structure is documented below.
     */
    @JvmName("loktwoiovmpquboq")
    public suspend fun restoreParameters(`value`: Output) {
        this.restoreParameters = value
    }

    /**
     * @param value List of actions that are restricted on this volume.
     * Each value may be one of: `DELETE`.
     */
    @JvmName("xypqylrkwttgsebk")
    public suspend fun restrictedActions(`value`: Output>) {
        this.restrictedActions = value
    }

    @JvmName("pcbidtbdfpsyfgid")
    public suspend fun restrictedActions(vararg values: Output) {
        this.restrictedActions = Output.all(values.asList())
    }

    /**
     * @param values List of actions that are restricted on this volume.
     * Each value may be one of: `DELETE`.
     */
    @JvmName("uuatucrdnjlexcod")
    public suspend fun restrictedActions(values: List>) {
        this.restrictedActions = Output.all(values)
    }

    /**
     * @param value Security Style of the Volume. Use UNIX to use UNIX or NFSV4 ACLs for file permissions.
     * Use NTFS to use NTFS ACLs for file permissions. Can only be set for volumes which use SMB together with NFS as protocol.
     * Possible values are: `NTFS`, `UNIX`.
     */
    @JvmName("vtmetoviefdwblvw")
    public suspend fun securityStyle(`value`: Output) {
        this.securityStyle = value
    }

    /**
     * @param value Share name (SMB) or export path (NFS) of the volume. Needs to be unique per location.
     */
    @JvmName("nxksgbyubpksvvmk")
    public suspend fun shareName(`value`: Output) {
        this.shareName = value
    }

    /**
     * @param value Settings for volumes with SMB access.
     * Each value may be one of: `ENCRYPT_DATA`, `BROWSABLE`, `CHANGE_NOTIFY`, `NON_BROWSABLE`, `OPLOCKS`, `SHOW_SNAPSHOT`, `SHOW_PREVIOUS_VERSIONS`, `ACCESS_BASED_ENUMERATION`, `CONTINUOUSLY_AVAILABLE`.
     */
    @JvmName("iqewgveofcporeqc")
    public suspend fun smbSettings(`value`: Output>) {
        this.smbSettings = value
    }

    @JvmName("yewpaninupvvvwly")
    public suspend fun smbSettings(vararg values: Output) {
        this.smbSettings = Output.all(values.asList())
    }

    /**
     * @param values Settings for volumes with SMB access.
     * Each value may be one of: `ENCRYPT_DATA`, `BROWSABLE`, `CHANGE_NOTIFY`, `NON_BROWSABLE`, `OPLOCKS`, `SHOW_SNAPSHOT`, `SHOW_PREVIOUS_VERSIONS`, `ACCESS_BASED_ENUMERATION`, `CONTINUOUSLY_AVAILABLE`.
     */
    @JvmName("iampgxkjgwkeahid")
    public suspend fun smbSettings(values: List>) {
        this.smbSettings = Output.all(values)
    }

    /**
     * @param value If enabled, a NFS volume will contain a read-only .snapshot directory which provides access to each of the volume's snapshots. Will enable "Previous Versions" support for SMB.
     */
    @JvmName("cpixpbwcgfskoyre")
    public suspend fun snapshotDirectory(`value`: Output) {
        this.snapshotDirectory = value
    }

    /**
     * @param value Snapshot policy defines the schedule for automatic snapshot creation.
     * To disable automatic snapshot creation you have to remove the whole snapshot_policy block.
     * Structure is documented below.
     */
    @JvmName("fbqudohiuymssmrn")
    public suspend fun snapshotPolicy(`value`: Output) {
        this.snapshotPolicy = value
    }

    /**
     * @param value Name of the storage pool to create the volume in. Pool needs enough spare capacity to accomodate the volume.
     */
    @JvmName("dkvtumymvpgepiou")
    public suspend fun storagePool(`value`: Output) {
        this.storagePool = value
    }

    /**
     * @param value Unix permission the mount point will be created with. Default is 0770. Applicable for UNIX security style volumes only.
     */
    @JvmName("hnsndorjirvxvhug")
    public suspend fun unixPermissions(`value`: Output) {
        this.unixPermissions = value
    }

    /**
     * @param value Backup configuration for the volume.
     * Structure is documented below.
     */
    @JvmName("leiyxggjbkgnantw")
    public suspend fun backupConfig(`value`: VolumeBackupConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backupConfig = mapped
    }

    /**
     * @param argument Backup configuration for the volume.
     * Structure is documented below.
     */
    @JvmName("nnapebxqjwsxmtoq")
    public suspend fun backupConfig(argument: suspend VolumeBackupConfigArgsBuilder.() -> Unit) {
        val toBeMapped = VolumeBackupConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.backupConfig = mapped
    }

    /**
     * @param value Capacity of the volume (in GiB).
     */
    @JvmName("hiarahlgluctjtje")
    public suspend fun capacityGib(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.capacityGib = mapped
    }

    /**
     * @param value Policy to determine if the volume should be deleted forcefully.
     * Volumes may have nested snapshot resources. Deleting such a volume will fail.
     * Setting this parameter to FORCE will delete volumes including nested snapshots.
     */
    @JvmName("qskpiyxgfxgpxuhn")
    public suspend fun deletionPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deletionPolicy = mapped
    }

    /**
     * @param value An optional description of this resource.
     */
    @JvmName("xqofqwfyccyuhxhp")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Export policy of the volume for NFSV3 and/or NFSV4.1 access.
     * Structure is documented below.
     */
    @JvmName("lulbjphlrmaqlnvp")
    public suspend fun exportPolicy(`value`: VolumeExportPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.exportPolicy = mapped
    }

    /**
     * @param argument Export policy of the volume for NFSV3 and/or NFSV4.1 access.
     * Structure is documented below.
     */
    @JvmName("qaqmroongxxgdqbh")
    public suspend fun exportPolicy(argument: suspend VolumeExportPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = VolumeExportPolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.exportPolicy = mapped
    }

    /**
     * @param value Flag indicating if the volume is a kerberos volume or not, export policy rules control kerberos security modes (krb5, krb5i, krb5p).
     */
    @JvmName("pgtkgosjijvqyrew")
    public suspend fun kerberosEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kerberosEnabled = mapped
    }

    /**
     * @param value Labels as key value pairs. Example: `{ "owner": "Bob", "department": "finance", "purpose": "testing" }`.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("weefcqqddlnddwjc")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Labels as key value pairs. Example: `{ "owner": "Bob", "department": "finance", "purpose": "testing" }`.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("fgugwpqiykotseiy")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value Name of the pool location. Usually a region name, expect for some STANDARD service level pools which require a zone name.
     */
    @JvmName("pymoanoypapuhfqk")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The name of the volume. Needs to be unique per location.
     * - - -
     */
    @JvmName("kpdmuscutdvcbkvt")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("npqdcdywaojhejmb")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value The protocol of the volume. Allowed combinations are `['NFSV3']`, `['NFSV4']`, `['SMB']`, `['NFSV3', 'NFSV4']`, `['SMB', 'NFSV3']` and `['SMB', 'NFSV4']`.
     * Each value may be one of: `NFSV3`, `NFSV4`, `SMB`.
     */
    @JvmName("ocieogdexapuorxj")
    public suspend fun protocols(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protocols = mapped
    }

    /**
     * @param values The protocol of the volume. Allowed combinations are `['NFSV3']`, `['NFSV4']`, `['SMB']`, `['NFSV3', 'NFSV4']`, `['SMB', 'NFSV3']` and `['SMB', 'NFSV4']`.
     * Each value may be one of: `NFSV3`, `NFSV4`, `SMB`.
     */
    @JvmName("pbiclstnympikgqj")
    public suspend fun protocols(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocols = mapped
    }

    /**
     * @param value Used to create this volume from a snapshot (= cloning) or an backup.
     * Structure is documented below.
     */
    @JvmName("dglvxxvkbkfkmhue")
    public suspend fun restoreParameters(`value`: VolumeRestoreParametersArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.restoreParameters = mapped
    }

    /**
     * @param argument Used to create this volume from a snapshot (= cloning) or an backup.
     * Structure is documented below.
     */
    @JvmName("psqfbcrfmsbyodhd")
    public suspend fun restoreParameters(argument: suspend VolumeRestoreParametersArgsBuilder.() -> Unit) {
        val toBeMapped = VolumeRestoreParametersArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.restoreParameters = mapped
    }

    /**
     * @param value List of actions that are restricted on this volume.
     * Each value may be one of: `DELETE`.
     */
    @JvmName("xkkjdhuapvbipueq")
    public suspend fun restrictedActions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.restrictedActions = mapped
    }

    /**
     * @param values List of actions that are restricted on this volume.
     * Each value may be one of: `DELETE`.
     */
    @JvmName("rmeuifrumtllyhmf")
    public suspend fun restrictedActions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.restrictedActions = mapped
    }

    /**
     * @param value Security Style of the Volume. Use UNIX to use UNIX or NFSV4 ACLs for file permissions.
     * Use NTFS to use NTFS ACLs for file permissions. Can only be set for volumes which use SMB together with NFS as protocol.
     * Possible values are: `NTFS`, `UNIX`.
     */
    @JvmName("aadjsxkmtjawpmpv")
    public suspend fun securityStyle(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityStyle = mapped
    }

    /**
     * @param value Share name (SMB) or export path (NFS) of the volume. Needs to be unique per location.
     */
    @JvmName("qadmhxnyxmthtieb")
    public suspend fun shareName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.shareName = mapped
    }

    /**
     * @param value Settings for volumes with SMB access.
     * Each value may be one of: `ENCRYPT_DATA`, `BROWSABLE`, `CHANGE_NOTIFY`, `NON_BROWSABLE`, `OPLOCKS`, `SHOW_SNAPSHOT`, `SHOW_PREVIOUS_VERSIONS`, `ACCESS_BASED_ENUMERATION`, `CONTINUOUSLY_AVAILABLE`.
     */
    @JvmName("gghhiwthblyvdtpv")
    public suspend fun smbSettings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.smbSettings = mapped
    }

    /**
     * @param values Settings for volumes with SMB access.
     * Each value may be one of: `ENCRYPT_DATA`, `BROWSABLE`, `CHANGE_NOTIFY`, `NON_BROWSABLE`, `OPLOCKS`, `SHOW_SNAPSHOT`, `SHOW_PREVIOUS_VERSIONS`, `ACCESS_BASED_ENUMERATION`, `CONTINUOUSLY_AVAILABLE`.
     */
    @JvmName("imasppsvhcbubsnf")
    public suspend fun smbSettings(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.smbSettings = mapped
    }

    /**
     * @param value If enabled, a NFS volume will contain a read-only .snapshot directory which provides access to each of the volume's snapshots. Will enable "Previous Versions" support for SMB.
     */
    @JvmName("irtydqemwxenlsnm")
    public suspend fun snapshotDirectory(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.snapshotDirectory = mapped
    }

    /**
     * @param value Snapshot policy defines the schedule for automatic snapshot creation.
     * To disable automatic snapshot creation you have to remove the whole snapshot_policy block.
     * Structure is documented below.
     */
    @JvmName("pvwvvolfercsosdp")
    public suspend fun snapshotPolicy(`value`: VolumeSnapshotPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.snapshotPolicy = mapped
    }

    /**
     * @param argument Snapshot policy defines the schedule for automatic snapshot creation.
     * To disable automatic snapshot creation you have to remove the whole snapshot_policy block.
     * Structure is documented below.
     */
    @JvmName("ufldapvnqrtfsumk")
    public suspend fun snapshotPolicy(argument: suspend VolumeSnapshotPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = VolumeSnapshotPolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.snapshotPolicy = mapped
    }

    /**
     * @param value Name of the storage pool to create the volume in. Pool needs enough spare capacity to accomodate the volume.
     */
    @JvmName("utggfrlofslthpje")
    public suspend fun storagePool(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storagePool = mapped
    }

    /**
     * @param value Unix permission the mount point will be created with. Default is 0770. Applicable for UNIX security style volumes only.
     */
    @JvmName("ujgfqghgjwhupjco")
    public suspend fun unixPermissions(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.unixPermissions = mapped
    }

    internal fun build(): VolumeArgs = VolumeArgs(
        backupConfig = backupConfig,
        capacityGib = capacityGib,
        deletionPolicy = deletionPolicy,
        description = description,
        exportPolicy = exportPolicy,
        kerberosEnabled = kerberosEnabled,
        labels = labels,
        location = location,
        name = name,
        project = project,
        protocols = protocols,
        restoreParameters = restoreParameters,
        restrictedActions = restrictedActions,
        securityStyle = securityStyle,
        shareName = shareName,
        smbSettings = smbSettings,
        snapshotDirectory = snapshotDirectory,
        snapshotPolicy = snapshotPolicy,
        storagePool = storagePool,
        unixPermissions = unixPermissions,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy