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

com.pulumi.gcp.compute.kotlin.DiskArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.compute.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.DiskArgs.builder
import com.pulumi.gcp.compute.kotlin.inputs.DiskAsyncPrimaryDiskArgs
import com.pulumi.gcp.compute.kotlin.inputs.DiskAsyncPrimaryDiskArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.DiskDiskEncryptionKeyArgs
import com.pulumi.gcp.compute.kotlin.inputs.DiskDiskEncryptionKeyArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.DiskGuestOsFeatureArgs
import com.pulumi.gcp.compute.kotlin.inputs.DiskGuestOsFeatureArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.DiskSourceImageEncryptionKeyArgs
import com.pulumi.gcp.compute.kotlin.inputs.DiskSourceImageEncryptionKeyArgsBuilder
import com.pulumi.gcp.compute.kotlin.inputs.DiskSourceSnapshotEncryptionKeyArgs
import com.pulumi.gcp.compute.kotlin.inputs.DiskSourceSnapshotEncryptionKeyArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Persistent disks are durable storage devices that function similarly to
 * the physical disks in a desktop or a server. Compute Engine manages the
 * hardware behind these devices to ensure data redundancy and optimize
 * performance for you. Persistent disks are available as either standard
 * hard disk drives (HDD) or solid-state drives (SSD).
 * Persistent disks are located independently from your virtual machine
 * instances, so you can detach or move persistent disks to keep your data
 * even after you delete your instances. Persistent disk performance scales
 * automatically with size, so you can resize your existing persistent disks
 * or add more persistent disks to an instance to meet your performance and
 * storage space requirements.
 * Add a persistent disk to your instance when you need reliable and
 * affordable storage with consistent performance characteristics.
 * To get more information about Disk, see:
 * * [API documentation](https://cloud.google.com/compute/docs/reference/v1/disks)
 * * How-to Guides
 *     * [Adding a persistent disk](https://cloud.google.com/compute/docs/disks/add-persistent-disk)
 * ## Example Usage
 * ### Disk Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.compute.Disk("default", {
 *     name: "test-disk",
 *     type: "pd-ssd",
 *     zone: "us-central1-a",
 *     image: "debian-11-bullseye-v20220719",
 *     labels: {
 *         environment: "dev",
 *     },
 *     physicalBlockSizeBytes: 4096,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.compute.Disk("default",
 *     name="test-disk",
 *     type="pd-ssd",
 *     zone="us-central1-a",
 *     image="debian-11-bullseye-v20220719",
 *     labels={
 *         "environment": "dev",
 *     },
 *     physical_block_size_bytes=4096)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.Compute.Disk("default", new()
 *     {
 *         Name = "test-disk",
 *         Type = "pd-ssd",
 *         Zone = "us-central1-a",
 *         Image = "debian-11-bullseye-v20220719",
 *         Labels =
 *         {
 *             { "environment", "dev" },
 *         },
 *         PhysicalBlockSizeBytes = 4096,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := compute.NewDisk(ctx, "default", &compute.DiskArgs{
 * 			Name:  pulumi.String("test-disk"),
 * 			Type:  pulumi.String("pd-ssd"),
 * 			Zone:  pulumi.String("us-central1-a"),
 * 			Image: pulumi.String("debian-11-bullseye-v20220719"),
 * 			Labels: pulumi.StringMap{
 * 				"environment": pulumi.String("dev"),
 * 			},
 * 			PhysicalBlockSizeBytes: pulumi.Int(4096),
 * 		})
 * 		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.Disk;
 * import com.pulumi.gcp.compute.DiskArgs;
 * 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) {
 *         var default_ = new Disk("default", DiskArgs.builder()
 *             .name("test-disk")
 *             .type("pd-ssd")
 *             .zone("us-central1-a")
 *             .image("debian-11-bullseye-v20220719")
 *             .labels(Map.of("environment", "dev"))
 *             .physicalBlockSizeBytes(4096)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:compute:Disk
 *     properties:
 *       name: test-disk
 *       type: pd-ssd
 *       zone: us-central1-a
 *       image: debian-11-bullseye-v20220719
 *       labels:
 *         environment: dev
 *       physicalBlockSizeBytes: 4096
 * ```
 * 
 * ### Disk Async
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const primary = new gcp.compute.Disk("primary", {
 *     name: "async-test-disk",
 *     type: "pd-ssd",
 *     zone: "us-central1-a",
 *     physicalBlockSizeBytes: 4096,
 * });
 * const secondary = new gcp.compute.Disk("secondary", {
 *     name: "async-secondary-test-disk",
 *     type: "pd-ssd",
 *     zone: "us-east1-c",
 *     asyncPrimaryDisk: {
 *         disk: primary.id,
 *     },
 *     physicalBlockSizeBytes: 4096,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * primary = gcp.compute.Disk("primary",
 *     name="async-test-disk",
 *     type="pd-ssd",
 *     zone="us-central1-a",
 *     physical_block_size_bytes=4096)
 * secondary = gcp.compute.Disk("secondary",
 *     name="async-secondary-test-disk",
 *     type="pd-ssd",
 *     zone="us-east1-c",
 *     async_primary_disk={
 *         "disk": primary.id,
 *     },
 *     physical_block_size_bytes=4096)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var primary = new Gcp.Compute.Disk("primary", new()
 *     {
 *         Name = "async-test-disk",
 *         Type = "pd-ssd",
 *         Zone = "us-central1-a",
 *         PhysicalBlockSizeBytes = 4096,
 *     });
 *     var secondary = new Gcp.Compute.Disk("secondary", new()
 *     {
 *         Name = "async-secondary-test-disk",
 *         Type = "pd-ssd",
 *         Zone = "us-east1-c",
 *         AsyncPrimaryDisk = new Gcp.Compute.Inputs.DiskAsyncPrimaryDiskArgs
 *         {
 *             Disk = primary.Id,
 *         },
 *         PhysicalBlockSizeBytes = 4096,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		primary, err := compute.NewDisk(ctx, "primary", &compute.DiskArgs{
 * 			Name:                   pulumi.String("async-test-disk"),
 * 			Type:                   pulumi.String("pd-ssd"),
 * 			Zone:                   pulumi.String("us-central1-a"),
 * 			PhysicalBlockSizeBytes: pulumi.Int(4096),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewDisk(ctx, "secondary", &compute.DiskArgs{
 * 			Name: pulumi.String("async-secondary-test-disk"),
 * 			Type: pulumi.String("pd-ssd"),
 * 			Zone: pulumi.String("us-east1-c"),
 * 			AsyncPrimaryDisk: &compute.DiskAsyncPrimaryDiskArgs{
 * 				Disk: primary.ID(),
 * 			},
 * 			PhysicalBlockSizeBytes: pulumi.Int(4096),
 * 		})
 * 		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.Disk;
 * import com.pulumi.gcp.compute.DiskArgs;
 * import com.pulumi.gcp.compute.inputs.DiskAsyncPrimaryDiskArgs;
 * 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) {
 *         var primary = new Disk("primary", DiskArgs.builder()
 *             .name("async-test-disk")
 *             .type("pd-ssd")
 *             .zone("us-central1-a")
 *             .physicalBlockSizeBytes(4096)
 *             .build());
 *         var secondary = new Disk("secondary", DiskArgs.builder()
 *             .name("async-secondary-test-disk")
 *             .type("pd-ssd")
 *             .zone("us-east1-c")
 *             .asyncPrimaryDisk(DiskAsyncPrimaryDiskArgs.builder()
 *                 .disk(primary.id())
 *                 .build())
 *             .physicalBlockSizeBytes(4096)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   primary:
 *     type: gcp:compute:Disk
 *     properties:
 *       name: async-test-disk
 *       type: pd-ssd
 *       zone: us-central1-a
 *       physicalBlockSizeBytes: 4096
 *   secondary:
 *     type: gcp:compute:Disk
 *     properties:
 *       name: async-secondary-test-disk
 *       type: pd-ssd
 *       zone: us-east1-c
 *       asyncPrimaryDisk:
 *         disk: ${primary.id}
 *       physicalBlockSizeBytes: 4096
 * ```
 * 
 * ### Disk Features
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.compute.Disk("default", {
 *     name: "test-disk-features",
 *     type: "pd-ssd",
 *     zone: "us-central1-a",
 *     labels: {
 *         environment: "dev",
 *     },
 *     guestOsFeatures: [
 *         {
 *             type: "SECURE_BOOT",
 *         },
 *         {
 *             type: "MULTI_IP_SUBNET",
 *         },
 *         {
 *             type: "WINDOWS",
 *         },
 *     ],
 *     licenses: ["https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core"],
 *     physicalBlockSizeBytes: 4096,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.compute.Disk("default",
 *     name="test-disk-features",
 *     type="pd-ssd",
 *     zone="us-central1-a",
 *     labels={
 *         "environment": "dev",
 *     },
 *     guest_os_features=[
 *         {
 *             "type": "SECURE_BOOT",
 *         },
 *         {
 *             "type": "MULTI_IP_SUBNET",
 *         },
 *         {
 *             "type": "WINDOWS",
 *         },
 *     ],
 *     licenses=["https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core"],
 *     physical_block_size_bytes=4096)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.Compute.Disk("default", new()
 *     {
 *         Name = "test-disk-features",
 *         Type = "pd-ssd",
 *         Zone = "us-central1-a",
 *         Labels =
 *         {
 *             { "environment", "dev" },
 *         },
 *         GuestOsFeatures = new[]
 *         {
 *             new Gcp.Compute.Inputs.DiskGuestOsFeatureArgs
 *             {
 *                 Type = "SECURE_BOOT",
 *             },
 *             new Gcp.Compute.Inputs.DiskGuestOsFeatureArgs
 *             {
 *                 Type = "MULTI_IP_SUBNET",
 *             },
 *             new Gcp.Compute.Inputs.DiskGuestOsFeatureArgs
 *             {
 *                 Type = "WINDOWS",
 *             },
 *         },
 *         Licenses = new[]
 *         {
 *             "https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core",
 *         },
 *         PhysicalBlockSizeBytes = 4096,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := compute.NewDisk(ctx, "default", &compute.DiskArgs{
 * 			Name: pulumi.String("test-disk-features"),
 * 			Type: pulumi.String("pd-ssd"),
 * 			Zone: pulumi.String("us-central1-a"),
 * 			Labels: pulumi.StringMap{
 * 				"environment": pulumi.String("dev"),
 * 			},
 * 			GuestOsFeatures: compute.DiskGuestOsFeatureArray{
 * 				&compute.DiskGuestOsFeatureArgs{
 * 					Type: pulumi.String("SECURE_BOOT"),
 * 				},
 * 				&compute.DiskGuestOsFeatureArgs{
 * 					Type: pulumi.String("MULTI_IP_SUBNET"),
 * 				},
 * 				&compute.DiskGuestOsFeatureArgs{
 * 					Type: pulumi.String("WINDOWS"),
 * 				},
 * 			},
 * 			Licenses: pulumi.StringArray{
 * 				pulumi.String("https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core"),
 * 			},
 * 			PhysicalBlockSizeBytes: pulumi.Int(4096),
 * 		})
 * 		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.Disk;
 * import com.pulumi.gcp.compute.DiskArgs;
 * import com.pulumi.gcp.compute.inputs.DiskGuestOsFeatureArgs;
 * 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) {
 *         var default_ = new Disk("default", DiskArgs.builder()
 *             .name("test-disk-features")
 *             .type("pd-ssd")
 *             .zone("us-central1-a")
 *             .labels(Map.of("environment", "dev"))
 *             .guestOsFeatures(
 *                 DiskGuestOsFeatureArgs.builder()
 *                     .type("SECURE_BOOT")
 *                     .build(),
 *                 DiskGuestOsFeatureArgs.builder()
 *                     .type("MULTI_IP_SUBNET")
 *                     .build(),
 *                 DiskGuestOsFeatureArgs.builder()
 *                     .type("WINDOWS")
 *                     .build())
 *             .licenses("https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core")
 *             .physicalBlockSizeBytes(4096)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:compute:Disk
 *     properties:
 *       name: test-disk-features
 *       type: pd-ssd
 *       zone: us-central1-a
 *       labels:
 *         environment: dev
 *       guestOsFeatures:
 *         - type: SECURE_BOOT
 *         - type: MULTI_IP_SUBNET
 *         - type: WINDOWS
 *       licenses:
 *         - https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core
 *       physicalBlockSizeBytes: 4096
 * ```
 * 
 * ## Import
 * Disk can be imported using any of these accepted formats:
 * * `projects/{{project}}/zones/{{zone}}/disks/{{name}}`
 * * `{{project}}/{{zone}}/{{name}}`
 * * `{{zone}}/{{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, Disk can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:compute/disk:Disk default projects/{{project}}/zones/{{zone}}/disks/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/disk:Disk default {{project}}/{{zone}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/disk:Disk default {{zone}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/disk:Disk default {{name}}
 * ```
 * @property accessMode The accessMode of the disk.
 * For example:
 * * READ_WRITE_SINGLE
 * * READ_WRITE_MANY
 * * READ_ONLY_SINGLE
 * @property asyncPrimaryDisk A nested object resource
 * Structure is documented below.
 * @property description An optional description of this resource. Provide this property when
 * you create the resource.
 * @property diskEncryptionKey Encrypts the disk using a customer-supplied encryption key.
 * After you encrypt a disk with a customer-supplied key, you must
 * provide the same key if you use the disk later (e.g. to create a disk
 * snapshot or an image, or to attach the disk to a virtual machine).
 * Customer-supplied encryption keys do not protect access to metadata of
 * the disk.
 * If you do not provide an encryption key when creating the disk, then
 * the disk will be encrypted using an automatically generated key and
 * you do not need to provide a key to use the disk later.
 * Structure is documented below.
 * @property enableConfidentialCompute Whether this disk is using confidential compute mode.
 * Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
 * @property guestOsFeatures A list of features to enable on the guest operating system.
 * Applicable only for bootable disks.
 * Structure is documented below.
 * @property image The image from which to initialize this disk. This can be
 * one of: the image's `self_link`, `projects/{project}/global/images/{image}`,
 * `projects/{project}/global/images/family/{family}`, `global/images/{image}`,
 * `global/images/family/{family}`, `family/{family}`, `{project}/{family}`,
 * `{project}/{image}`, `{family}`, or `{image}`. If referred by family, the
 * images names must include the family name. If they don't, use the
 * [gcp.compute.Image data source](https://www.terraform.io/docs/providers/google/d/compute_image.html).
 * For instance, the image `centos-6-v20180104` includes its family name `centos-6`.
 * These images can be referred by family name here.
 * @property interface Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
 * > **Warning:** `interface` is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.
 * @property labels Labels to apply to this disk.  A list of key->value pairs.
 * **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 licenses Any applicable license URI.
 * @property multiWriter Indicates whether or not the disk can be read/write attached to more than one instance.
 * @property name Name of the resource. Provided by the client when the resource is
 * created. The name must be 1-63 characters long, and comply with
 * RFC1035. Specifically, the name must be 1-63 characters long and match
 * the regular expression `a-z?` which means the
 * first character must be a lowercase letter, and all following
 * characters must be a dash, lowercase letter, or digit, except the last
 * character, which cannot be a dash.
 * - - -
 * @property physicalBlockSizeBytes Physical block size of the persistent disk, in bytes. If not present
 * in a request, a default value is used. Currently supported sizes
 * are 4096 and 16384, other sizes may be added in the future.
 * If an unsupported value is requested, the error message will list
 * the supported values for the caller's project.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property provisionedIops Indicates how many IOPS must be provisioned for the disk.
 * Note: Updating currently is only supported by hyperdisk skus without the need to delete and recreate the disk, hyperdisk
 * allows for an update of IOPS every 4 hours. To update your hyperdisk more frequently, you'll need to manually delete and recreate it
 * @property provisionedThroughput Indicates how much Throughput must be provisioned for the disk.
 * Note: Updating currently is only supported by hyperdisk skus without the need to delete and recreate the disk, hyperdisk
 * allows for an update of Throughput every 4 hours. To update your hyperdisk more frequently, you'll need to manually delete and recreate it
 * @property resourcePolicies Resource policies applied to this disk for automatic snapshot creations.
 * ~>**NOTE** This value does not support updating the
 * resource policy, as resource policies can not be updated more than
 * one at a time. Use
 * `gcp.compute.DiskResourcePolicyAttachment`
 * to allow for updating the resource policy attached to the disk.
 * @property size Size of the persistent disk, specified in GB. You can specify this
 * field when creating a persistent disk using the `image` or
 * `snapshot` parameter, or specify it alone to create an empty
 * persistent disk.
 * If you specify this field along with `image` or `snapshot`,
 * the value must not be less than the size of the image
 * or the size of the snapshot.
 * ~>**NOTE** If you change the size, the provider updates the disk size
 * if upsizing is detected but recreates the disk if downsizing is requested.
 * You can add `lifecycle.prevent_destroy` in the config to prevent destroying
 * and recreating.
 * @property snapshot The source snapshot used to create this disk. You can provide this as
 * a partial or full URL to the resource. If the snapshot is in another
 * project than this disk, you must supply a full URL. For example, the
 * following are valid values:
 * * `https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot`
 * * `projects/project/global/snapshots/snapshot`
 * * `global/snapshots/snapshot`
 * @property sourceDisk The source disk used to create this disk. You can provide this as a partial or full URL to the resource.
 * For example, the following are valid values:
 * * https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks/{disk}
 * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/disks/{disk}
 * * projects/{project}/zones/{zone}/disks/{disk}
 * * projects/{project}/regions/{region}/disks/{disk}
 * * zones/{zone}/disks/{disk}
 * * regions/{region}/disks/{disk}
 * @property sourceImageEncryptionKey The customer-supplied encryption key of the source image. Required if
 * the source image is protected by a customer-supplied encryption key.
 * Structure is documented below.
 * @property sourceSnapshotEncryptionKey The customer-supplied encryption key of the source snapshot. Required
 * if the source snapshot is protected by a customer-supplied encryption
 * key.
 * Structure is documented below.
 * @property storagePool The URL of the storage pool in which the new disk is created.
 * For example:
 * * https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/storagePools/{storagePool}
 * * /projects/{project}/zones/{zone}/storagePools/{storagePool}
 * @property type URL of the disk type resource describing which disk type to use to
 * create the disk. Provide this when creating the disk.
 * @property zone A reference to the zone where the disk resides.
 */
public data class DiskArgs(
    public val accessMode: Output? = null,
    public val asyncPrimaryDisk: Output? = null,
    public val description: Output? = null,
    public val diskEncryptionKey: Output? = null,
    public val enableConfidentialCompute: Output? = null,
    public val guestOsFeatures: Output>? = null,
    public val image: Output? = null,
    @Deprecated(
        message = """
  `interface` is deprecated and will be removed in a future major release. This field is no longer
      used and can be safely removed from your configurations; disk interfaces are automatically
      determined on attachment.
  """,
    )
    public val `interface`: Output? = null,
    public val labels: Output>? = null,
    public val licenses: Output>? = null,
    public val multiWriter: Output? = null,
    public val name: Output? = null,
    public val physicalBlockSizeBytes: Output? = null,
    public val project: Output? = null,
    public val provisionedIops: Output? = null,
    public val provisionedThroughput: Output? = null,
    public val resourcePolicies: Output>? = null,
    public val size: Output? = null,
    public val snapshot: Output? = null,
    public val sourceDisk: Output? = null,
    public val sourceImageEncryptionKey: Output? = null,
    public val sourceSnapshotEncryptionKey: Output? = null,
    public val storagePool: Output? = null,
    public val type: Output? = null,
    public val zone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.DiskArgs = com.pulumi.gcp.compute.DiskArgs.builder()
        .accessMode(accessMode?.applyValue({ args0 -> args0 }))
        .asyncPrimaryDisk(asyncPrimaryDisk?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
        .description(description?.applyValue({ args0 -> args0 }))
        .diskEncryptionKey(diskEncryptionKey?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
        .enableConfidentialCompute(enableConfidentialCompute?.applyValue({ args0 -> args0 }))
        .guestOsFeatures(
            guestOsFeatures?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        )
        .image(image?.applyValue({ args0 -> args0 }))
        .interface_(`interface`?.applyValue({ args0 -> args0 }))
        .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
        .licenses(licenses?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
        .multiWriter(multiWriter?.applyValue({ args0 -> args0 }))
        .name(name?.applyValue({ args0 -> args0 }))
        .physicalBlockSizeBytes(physicalBlockSizeBytes?.applyValue({ args0 -> args0 }))
        .project(project?.applyValue({ args0 -> args0 }))
        .provisionedIops(provisionedIops?.applyValue({ args0 -> args0 }))
        .provisionedThroughput(provisionedThroughput?.applyValue({ args0 -> args0 }))
        .resourcePolicies(resourcePolicies?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
        .size(size?.applyValue({ args0 -> args0 }))
        .snapshot(snapshot?.applyValue({ args0 -> args0 }))
        .sourceDisk(sourceDisk?.applyValue({ args0 -> args0 }))
        .sourceImageEncryptionKey(
            sourceImageEncryptionKey?.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        )
        .sourceSnapshotEncryptionKey(
            sourceSnapshotEncryptionKey?.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        )
        .storagePool(storagePool?.applyValue({ args0 -> args0 }))
        .type(type?.applyValue({ args0 -> args0 }))
        .zone(zone?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DiskArgs].
 */
@PulumiTagMarker
public class DiskArgsBuilder internal constructor() {
    private var accessMode: Output? = null

    private var asyncPrimaryDisk: Output? = null

    private var description: Output? = null

    private var diskEncryptionKey: Output? = null

    private var enableConfidentialCompute: Output? = null

    private var guestOsFeatures: Output>? = null

    private var image: Output? = null

    private var `interface`: Output? = null

    private var labels: Output>? = null

    private var licenses: Output>? = null

    private var multiWriter: Output? = null

    private var name: Output? = null

    private var physicalBlockSizeBytes: Output? = null

    private var project: Output? = null

    private var provisionedIops: Output? = null

    private var provisionedThroughput: Output? = null

    private var resourcePolicies: Output>? = null

    private var size: Output? = null

    private var snapshot: Output? = null

    private var sourceDisk: Output? = null

    private var sourceImageEncryptionKey: Output? = null

    private var sourceSnapshotEncryptionKey: Output? = null

    private var storagePool: Output? = null

    private var type: Output? = null

    private var zone: Output? = null

    /**
     * @param value The accessMode of the disk.
     * For example:
     * * READ_WRITE_SINGLE
     * * READ_WRITE_MANY
     * * READ_ONLY_SINGLE
     */
    @JvmName("llcvhblnickenrsv")
    public suspend fun accessMode(`value`: Output) {
        this.accessMode = value
    }

    /**
     * @param value A nested object resource
     * Structure is documented below.
     */
    @JvmName("uqbiotnvbvglmpmx")
    public suspend fun asyncPrimaryDisk(`value`: Output) {
        this.asyncPrimaryDisk = value
    }

    /**
     * @param value An optional description of this resource. Provide this property when
     * you create the resource.
     */
    @JvmName("dowvvwkpjrdecgdq")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Encrypts the disk using a customer-supplied encryption key.
     * After you encrypt a disk with a customer-supplied key, you must
     * provide the same key if you use the disk later (e.g. to create a disk
     * snapshot or an image, or to attach the disk to a virtual machine).
     * Customer-supplied encryption keys do not protect access to metadata of
     * the disk.
     * If you do not provide an encryption key when creating the disk, then
     * the disk will be encrypted using an automatically generated key and
     * you do not need to provide a key to use the disk later.
     * Structure is documented below.
     */
    @JvmName("ugvwgpdcwewqhfse")
    public suspend fun diskEncryptionKey(`value`: Output) {
        this.diskEncryptionKey = value
    }

    /**
     * @param value Whether this disk is using confidential compute mode.
     * Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
     */
    @JvmName("yodfbmtcdlysigac")
    public suspend fun enableConfidentialCompute(`value`: Output) {
        this.enableConfidentialCompute = value
    }

    /**
     * @param value A list of features to enable on the guest operating system.
     * Applicable only for bootable disks.
     * Structure is documented below.
     */
    @JvmName("wtkqojeeohkoursq")
    public suspend fun guestOsFeatures(`value`: Output>) {
        this.guestOsFeatures = value
    }

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

    /**
     * @param values A list of features to enable on the guest operating system.
     * Applicable only for bootable disks.
     * Structure is documented below.
     */
    @JvmName("enmuiewquiccueqk")
    public suspend fun guestOsFeatures(values: List>) {
        this.guestOsFeatures = Output.all(values)
    }

    /**
     * @param value The image from which to initialize this disk. This can be
     * one of: the image's `self_link`, `projects/{project}/global/images/{image}`,
     * `projects/{project}/global/images/family/{family}`, `global/images/{image}`,
     * `global/images/family/{family}`, `family/{family}`, `{project}/{family}`,
     * `{project}/{image}`, `{family}`, or `{image}`. If referred by family, the
     * images names must include the family name. If they don't, use the
     * [gcp.compute.Image data source](https://www.terraform.io/docs/providers/google/d/compute_image.html).
     * For instance, the image `centos-6-v20180104` includes its family name `centos-6`.
     * These images can be referred by family name here.
     */
    @JvmName("pgxvafaxkotgvxuj")
    public suspend fun image(`value`: Output) {
        this.image = value
    }

    /**
     * @param value Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
     * > **Warning:** `interface` is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.
     */
    @Deprecated(
        message = """
  `interface` is deprecated and will be removed in a future major release. This field is no longer
      used and can be safely removed from your configurations; disk interfaces are automatically
      determined on attachment.
  """,
    )
    @JvmName("slrsnfnaoypcdwlj")
    public suspend fun `interface`(`value`: Output) {
        this.`interface` = value
    }

    /**
     * @param value Labels to apply to this disk.  A list of key->value pairs.
     * **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("dtqpelthigttoxrc")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value Any applicable license URI.
     */
    @JvmName("bqqwrmynjoxlsewd")
    public suspend fun licenses(`value`: Output>) {
        this.licenses = value
    }

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

    /**
     * @param values Any applicable license URI.
     */
    @JvmName("qpkbtujsxgyhccym")
    public suspend fun licenses(values: List>) {
        this.licenses = Output.all(values)
    }

    /**
     * @param value Indicates whether or not the disk can be read/write attached to more than one instance.
     */
    @JvmName("sfaynmncddnytaak")
    public suspend fun multiWriter(`value`: Output) {
        this.multiWriter = value
    }

    /**
     * @param value Name of the resource. Provided by the client when the resource is
     * created. The name must be 1-63 characters long, and comply with
     * RFC1035. Specifically, the name must be 1-63 characters long and match
     * the regular expression `a-z?` which means the
     * first character must be a lowercase letter, and all following
     * characters must be a dash, lowercase letter, or digit, except the last
     * character, which cannot be a dash.
     * - - -
     */
    @JvmName("wpkchiweldlvnkmh")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Physical block size of the persistent disk, in bytes. If not present
     * in a request, a default value is used. Currently supported sizes
     * are 4096 and 16384, other sizes may be added in the future.
     * If an unsupported value is requested, the error message will list
     * the supported values for the caller's project.
     */
    @JvmName("sfeaasrtqeqernxd")
    public suspend fun physicalBlockSizeBytes(`value`: Output) {
        this.physicalBlockSizeBytes = value
    }

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

    /**
     * @param value Indicates how many IOPS must be provisioned for the disk.
     * Note: Updating currently is only supported by hyperdisk skus without the need to delete and recreate the disk, hyperdisk
     * allows for an update of IOPS every 4 hours. To update your hyperdisk more frequently, you'll need to manually delete and recreate it
     */
    @JvmName("swqqbyscpjclsstt")
    public suspend fun provisionedIops(`value`: Output) {
        this.provisionedIops = value
    }

    /**
     * @param value Indicates how much Throughput must be provisioned for the disk.
     * Note: Updating currently is only supported by hyperdisk skus without the need to delete and recreate the disk, hyperdisk
     * allows for an update of Throughput every 4 hours. To update your hyperdisk more frequently, you'll need to manually delete and recreate it
     */
    @JvmName("dyuxkuqumxpbbncq")
    public suspend fun provisionedThroughput(`value`: Output) {
        this.provisionedThroughput = value
    }

    /**
     * @param value Resource policies applied to this disk for automatic snapshot creations.
     * ~>**NOTE** This value does not support updating the
     * resource policy, as resource policies can not be updated more than
     * one at a time. Use
     * `gcp.compute.DiskResourcePolicyAttachment`
     * to allow for updating the resource policy attached to the disk.
     */
    @JvmName("qxtghyexncofvbsc")
    public suspend fun resourcePolicies(`value`: Output>) {
        this.resourcePolicies = value
    }

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

    /**
     * @param values Resource policies applied to this disk for automatic snapshot creations.
     * ~>**NOTE** This value does not support updating the
     * resource policy, as resource policies can not be updated more than
     * one at a time. Use
     * `gcp.compute.DiskResourcePolicyAttachment`
     * to allow for updating the resource policy attached to the disk.
     */
    @JvmName("oxkrxitplrocijsg")
    public suspend fun resourcePolicies(values: List>) {
        this.resourcePolicies = Output.all(values)
    }

    /**
     * @param value Size of the persistent disk, specified in GB. You can specify this
     * field when creating a persistent disk using the `image` or
     * `snapshot` parameter, or specify it alone to create an empty
     * persistent disk.
     * If you specify this field along with `image` or `snapshot`,
     * the value must not be less than the size of the image
     * or the size of the snapshot.
     * ~>**NOTE** If you change the size, the provider updates the disk size
     * if upsizing is detected but recreates the disk if downsizing is requested.
     * You can add `lifecycle.prevent_destroy` in the config to prevent destroying
     * and recreating.
     */
    @JvmName("kpysjejtvvwbflje")
    public suspend fun size(`value`: Output) {
        this.size = value
    }

    /**
     * @param value The source snapshot used to create this disk. You can provide this as
     * a partial or full URL to the resource. If the snapshot is in another
     * project than this disk, you must supply a full URL. For example, the
     * following are valid values:
     * * `https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot`
     * * `projects/project/global/snapshots/snapshot`
     * * `global/snapshots/snapshot`
     */
    @JvmName("mjkavexnlmdgcwrf")
    public suspend fun snapshot(`value`: Output) {
        this.snapshot = value
    }

    /**
     * @param value The source disk used to create this disk. You can provide this as a partial or full URL to the resource.
     * For example, the following are valid values:
     * * https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks/{disk}
     * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/disks/{disk}
     * * projects/{project}/zones/{zone}/disks/{disk}
     * * projects/{project}/regions/{region}/disks/{disk}
     * * zones/{zone}/disks/{disk}
     * * regions/{region}/disks/{disk}
     */
    @JvmName("effnjkkwbbvlmxrj")
    public suspend fun sourceDisk(`value`: Output) {
        this.sourceDisk = value
    }

    /**
     * @param value The customer-supplied encryption key of the source image. Required if
     * the source image is protected by a customer-supplied encryption key.
     * Structure is documented below.
     */
    @JvmName("jcendfsurtogswik")
    public suspend fun sourceImageEncryptionKey(`value`: Output) {
        this.sourceImageEncryptionKey = value
    }

    /**
     * @param value The customer-supplied encryption key of the source snapshot. Required
     * if the source snapshot is protected by a customer-supplied encryption
     * key.
     * Structure is documented below.
     */
    @JvmName("flehjbnubnerraon")
    public suspend fun sourceSnapshotEncryptionKey(`value`: Output) {
        this.sourceSnapshotEncryptionKey = value
    }

    /**
     * @param value The URL of the storage pool in which the new disk is created.
     * For example:
     * * https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/storagePools/{storagePool}
     * * /projects/{project}/zones/{zone}/storagePools/{storagePool}
     */
    @JvmName("lkpqdmhfvlgpbkme")
    public suspend fun storagePool(`value`: Output) {
        this.storagePool = value
    }

    /**
     * @param value URL of the disk type resource describing which disk type to use to
     * create the disk. Provide this when creating the disk.
     */
    @JvmName("ditvtmdxumqttepl")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value A reference to the zone where the disk resides.
     */
    @JvmName("qxclbuskdgiajysa")
    public suspend fun zone(`value`: Output) {
        this.zone = value
    }

    /**
     * @param value The accessMode of the disk.
     * For example:
     * * READ_WRITE_SINGLE
     * * READ_WRITE_MANY
     * * READ_ONLY_SINGLE
     */
    @JvmName("xolqmljdqutghxxb")
    public suspend fun accessMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessMode = mapped
    }

    /**
     * @param value A nested object resource
     * Structure is documented below.
     */
    @JvmName("kgvcubvrssrvvclt")
    public suspend fun asyncPrimaryDisk(`value`: DiskAsyncPrimaryDiskArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.asyncPrimaryDisk = mapped
    }

    /**
     * @param argument A nested object resource
     * Structure is documented below.
     */
    @JvmName("rsxfcosqatubpawa")
    public suspend fun asyncPrimaryDisk(argument: suspend DiskAsyncPrimaryDiskArgsBuilder.() -> Unit) {
        val toBeMapped = DiskAsyncPrimaryDiskArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.asyncPrimaryDisk = mapped
    }

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

    /**
     * @param value Encrypts the disk using a customer-supplied encryption key.
     * After you encrypt a disk with a customer-supplied key, you must
     * provide the same key if you use the disk later (e.g. to create a disk
     * snapshot or an image, or to attach the disk to a virtual machine).
     * Customer-supplied encryption keys do not protect access to metadata of
     * the disk.
     * If you do not provide an encryption key when creating the disk, then
     * the disk will be encrypted using an automatically generated key and
     * you do not need to provide a key to use the disk later.
     * Structure is documented below.
     */
    @JvmName("efgeualpcmwuqbvk")
    public suspend fun diskEncryptionKey(`value`: DiskDiskEncryptionKeyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskEncryptionKey = mapped
    }

    /**
     * @param argument Encrypts the disk using a customer-supplied encryption key.
     * After you encrypt a disk with a customer-supplied key, you must
     * provide the same key if you use the disk later (e.g. to create a disk
     * snapshot or an image, or to attach the disk to a virtual machine).
     * Customer-supplied encryption keys do not protect access to metadata of
     * the disk.
     * If you do not provide an encryption key when creating the disk, then
     * the disk will be encrypted using an automatically generated key and
     * you do not need to provide a key to use the disk later.
     * Structure is documented below.
     */
    @JvmName("sgidricvahbeoppk")
    public suspend fun diskEncryptionKey(argument: suspend DiskDiskEncryptionKeyArgsBuilder.() -> Unit) {
        val toBeMapped = DiskDiskEncryptionKeyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.diskEncryptionKey = mapped
    }

    /**
     * @param value Whether this disk is using confidential compute mode.
     * Note: Only supported on hyperdisk skus, disk_encryption_key is required when setting to true
     */
    @JvmName("vowkhvmosttlfwis")
    public suspend fun enableConfidentialCompute(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableConfidentialCompute = mapped
    }

    /**
     * @param value A list of features to enable on the guest operating system.
     * Applicable only for bootable disks.
     * Structure is documented below.
     */
    @JvmName("baqdwmoyufvokovb")
    public suspend fun guestOsFeatures(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.guestOsFeatures = mapped
    }

    /**
     * @param argument A list of features to enable on the guest operating system.
     * Applicable only for bootable disks.
     * Structure is documented below.
     */
    @JvmName("ajyasmuxonjwmusq")
    public suspend fun guestOsFeatures(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DiskGuestOsFeatureArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.guestOsFeatures = mapped
    }

    /**
     * @param argument A list of features to enable on the guest operating system.
     * Applicable only for bootable disks.
     * Structure is documented below.
     */
    @JvmName("btfsqjhawxphtdeu")
    public suspend fun guestOsFeatures(vararg argument: suspend DiskGuestOsFeatureArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DiskGuestOsFeatureArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.guestOsFeatures = mapped
    }

    /**
     * @param argument A list of features to enable on the guest operating system.
     * Applicable only for bootable disks.
     * Structure is documented below.
     */
    @JvmName("jffumdvodqhpttjg")
    public suspend fun guestOsFeatures(argument: suspend DiskGuestOsFeatureArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(DiskGuestOsFeatureArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.guestOsFeatures = mapped
    }

    /**
     * @param values A list of features to enable on the guest operating system.
     * Applicable only for bootable disks.
     * Structure is documented below.
     */
    @JvmName("wobutcbhuatnbgnt")
    public suspend fun guestOsFeatures(vararg values: DiskGuestOsFeatureArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.guestOsFeatures = mapped
    }

    /**
     * @param value The image from which to initialize this disk. This can be
     * one of: the image's `self_link`, `projects/{project}/global/images/{image}`,
     * `projects/{project}/global/images/family/{family}`, `global/images/{image}`,
     * `global/images/family/{family}`, `family/{family}`, `{project}/{family}`,
     * `{project}/{image}`, `{family}`, or `{image}`. If referred by family, the
     * images names must include the family name. If they don't, use the
     * [gcp.compute.Image data source](https://www.terraform.io/docs/providers/google/d/compute_image.html).
     * For instance, the image `centos-6-v20180104` includes its family name `centos-6`.
     * These images can be referred by family name here.
     */
    @JvmName("ffehwtghynyxyvif")
    public suspend fun image(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.image = mapped
    }

    /**
     * @param value Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI.
     * > **Warning:** `interface` is deprecated and will be removed in a future major release. This field is no longer used and can be safely removed from your configurations; disk interfaces are automatically determined on attachment.
     */
    @Deprecated(
        message = """
  `interface` is deprecated and will be removed in a future major release. This field is no longer
      used and can be safely removed from your configurations; disk interfaces are automatically
      determined on attachment.
  """,
    )
    @JvmName("ytmmwjnjldrsobcl")
    public suspend fun `interface`(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`interface` = mapped
    }

    /**
     * @param value Labels to apply to this disk.  A list of key->value pairs.
     * **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("qvfwkywojtotview")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Labels to apply to this disk.  A list of key->value pairs.
     * **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("hdnpgjmrapuyaxwl")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value Any applicable license URI.
     */
    @JvmName("nigskwkglahdeasr")
    public suspend fun licenses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.licenses = mapped
    }

    /**
     * @param values Any applicable license URI.
     */
    @JvmName("ygijcmpwgugqsjli")
    public suspend fun licenses(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.licenses = mapped
    }

    /**
     * @param value Indicates whether or not the disk can be read/write attached to more than one instance.
     */
    @JvmName("nexgtxxhxswihqjd")
    public suspend fun multiWriter(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.multiWriter = mapped
    }

    /**
     * @param value Name of the resource. Provided by the client when the resource is
     * created. The name must be 1-63 characters long, and comply with
     * RFC1035. Specifically, the name must be 1-63 characters long and match
     * the regular expression `a-z?` which means the
     * first character must be a lowercase letter, and all following
     * characters must be a dash, lowercase letter, or digit, except the last
     * character, which cannot be a dash.
     * - - -
     */
    @JvmName("ytnqlcobtfcsdrtf")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Physical block size of the persistent disk, in bytes. If not present
     * in a request, a default value is used. Currently supported sizes
     * are 4096 and 16384, other sizes may be added in the future.
     * If an unsupported value is requested, the error message will list
     * the supported values for the caller's project.
     */
    @JvmName("eqmvrgfoiueftvbc")
    public suspend fun physicalBlockSizeBytes(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.physicalBlockSizeBytes = mapped
    }

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

    /**
     * @param value Indicates how many IOPS must be provisioned for the disk.
     * Note: Updating currently is only supported by hyperdisk skus without the need to delete and recreate the disk, hyperdisk
     * allows for an update of IOPS every 4 hours. To update your hyperdisk more frequently, you'll need to manually delete and recreate it
     */
    @JvmName("qrdoxjfrpvowdpag")
    public suspend fun provisionedIops(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.provisionedIops = mapped
    }

    /**
     * @param value Indicates how much Throughput must be provisioned for the disk.
     * Note: Updating currently is only supported by hyperdisk skus without the need to delete and recreate the disk, hyperdisk
     * allows for an update of Throughput every 4 hours. To update your hyperdisk more frequently, you'll need to manually delete and recreate it
     */
    @JvmName("adgvptiekybaxioi")
    public suspend fun provisionedThroughput(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.provisionedThroughput = mapped
    }

    /**
     * @param value Resource policies applied to this disk for automatic snapshot creations.
     * ~>**NOTE** This value does not support updating the
     * resource policy, as resource policies can not be updated more than
     * one at a time. Use
     * `gcp.compute.DiskResourcePolicyAttachment`
     * to allow for updating the resource policy attached to the disk.
     */
    @JvmName("oihxykyicabepmcq")
    public suspend fun resourcePolicies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourcePolicies = mapped
    }

    /**
     * @param values Resource policies applied to this disk for automatic snapshot creations.
     * ~>**NOTE** This value does not support updating the
     * resource policy, as resource policies can not be updated more than
     * one at a time. Use
     * `gcp.compute.DiskResourcePolicyAttachment`
     * to allow for updating the resource policy attached to the disk.
     */
    @JvmName("mvtnqbbpineqebte")
    public suspend fun resourcePolicies(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourcePolicies = mapped
    }

    /**
     * @param value Size of the persistent disk, specified in GB. You can specify this
     * field when creating a persistent disk using the `image` or
     * `snapshot` parameter, or specify it alone to create an empty
     * persistent disk.
     * If you specify this field along with `image` or `snapshot`,
     * the value must not be less than the size of the image
     * or the size of the snapshot.
     * ~>**NOTE** If you change the size, the provider updates the disk size
     * if upsizing is detected but recreates the disk if downsizing is requested.
     * You can add `lifecycle.prevent_destroy` in the config to prevent destroying
     * and recreating.
     */
    @JvmName("udiilsomyjtkachq")
    public suspend fun size(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.size = mapped
    }

    /**
     * @param value The source snapshot used to create this disk. You can provide this as
     * a partial or full URL to the resource. If the snapshot is in another
     * project than this disk, you must supply a full URL. For example, the
     * following are valid values:
     * * `https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot`
     * * `projects/project/global/snapshots/snapshot`
     * * `global/snapshots/snapshot`
     */
    @JvmName("jnftvooblcaevgwc")
    public suspend fun snapshot(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.snapshot = mapped
    }

    /**
     * @param value The source disk used to create this disk. You can provide this as a partial or full URL to the resource.
     * For example, the following are valid values:
     * * https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/disks/{disk}
     * * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/disks/{disk}
     * * projects/{project}/zones/{zone}/disks/{disk}
     * * projects/{project}/regions/{region}/disks/{disk}
     * * zones/{zone}/disks/{disk}
     * * regions/{region}/disks/{disk}
     */
    @JvmName("oocfunnmcljowfys")
    public suspend fun sourceDisk(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceDisk = mapped
    }

    /**
     * @param value The customer-supplied encryption key of the source image. Required if
     * the source image is protected by a customer-supplied encryption key.
     * Structure is documented below.
     */
    @JvmName("yrvvgvopwpyyydiv")
    public suspend fun sourceImageEncryptionKey(`value`: DiskSourceImageEncryptionKeyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceImageEncryptionKey = mapped
    }

    /**
     * @param argument The customer-supplied encryption key of the source image. Required if
     * the source image is protected by a customer-supplied encryption key.
     * Structure is documented below.
     */
    @JvmName("bitobitvtewaypct")
    public suspend fun sourceImageEncryptionKey(argument: suspend DiskSourceImageEncryptionKeyArgsBuilder.() -> Unit) {
        val toBeMapped = DiskSourceImageEncryptionKeyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sourceImageEncryptionKey = mapped
    }

    /**
     * @param value The customer-supplied encryption key of the source snapshot. Required
     * if the source snapshot is protected by a customer-supplied encryption
     * key.
     * Structure is documented below.
     */
    @JvmName("cshvksmgfygrshlm")
    public suspend fun sourceSnapshotEncryptionKey(`value`: DiskSourceSnapshotEncryptionKeyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceSnapshotEncryptionKey = mapped
    }

    /**
     * @param argument The customer-supplied encryption key of the source snapshot. Required
     * if the source snapshot is protected by a customer-supplied encryption
     * key.
     * Structure is documented below.
     */
    @JvmName("hlrdfsilefuejpbs")
    public suspend fun sourceSnapshotEncryptionKey(argument: suspend DiskSourceSnapshotEncryptionKeyArgsBuilder.() -> Unit) {
        val toBeMapped = DiskSourceSnapshotEncryptionKeyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sourceSnapshotEncryptionKey = mapped
    }

    /**
     * @param value The URL of the storage pool in which the new disk is created.
     * For example:
     * * https://www.googleapis.com/compute/v1/projects/{project}/zones/{zone}/storagePools/{storagePool}
     * * /projects/{project}/zones/{zone}/storagePools/{storagePool}
     */
    @JvmName("honvapxmehwhcvhp")
    public suspend fun storagePool(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storagePool = mapped
    }

    /**
     * @param value URL of the disk type resource describing which disk type to use to
     * create the disk. Provide this when creating the disk.
     */
    @JvmName("ljeibhkonggxwvvv")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value A reference to the zone where the disk resides.
     */
    @JvmName("ibywhbqvqdqliehb")
    public suspend fun zone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zone = mapped
    }

    internal fun build(): DiskArgs = DiskArgs(
        accessMode = accessMode,
        asyncPrimaryDisk = asyncPrimaryDisk,
        description = description,
        diskEncryptionKey = diskEncryptionKey,
        enableConfidentialCompute = enableConfidentialCompute,
        guestOsFeatures = guestOsFeatures,
        image = image,
        `interface` = `interface`,
        labels = labels,
        licenses = licenses,
        multiWriter = multiWriter,
        name = name,
        physicalBlockSizeBytes = physicalBlockSizeBytes,
        project = project,
        provisionedIops = provisionedIops,
        provisionedThroughput = provisionedThroughput,
        resourcePolicies = resourcePolicies,
        size = size,
        snapshot = snapshot,
        sourceDisk = sourceDisk,
        sourceImageEncryptionKey = sourceImageEncryptionKey,
        sourceSnapshotEncryptionKey = sourceSnapshotEncryptionKey,
        storagePool = storagePool,
        type = type,
        zone = zone,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy