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

com.pulumi.azure.compute.kotlin.ManagedDiskArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.compute.kotlin

import com.pulumi.azure.compute.ManagedDiskArgs.builder
import com.pulumi.azure.compute.kotlin.inputs.ManagedDiskEncryptionSettingsArgs
import com.pulumi.azure.compute.kotlin.inputs.ManagedDiskEncryptionSettingsArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a managed disk.
 * ## Example Usage
 * ### With Create Empty
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleManagedDisk = new azure.compute.ManagedDisk("example", {
 *     name: "acctestmd",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     storageAccountType: "Standard_LRS",
 *     createOption: "Empty",
 *     diskSizeGb: 1,
 *     tags: {
 *         environment: "staging",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_managed_disk = azure.compute.ManagedDisk("example",
 *     name="acctestmd",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     storage_account_type="Standard_LRS",
 *     create_option="Empty",
 *     disk_size_gb=1,
 *     tags={
 *         "environment": "staging",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleManagedDisk = new Azure.Compute.ManagedDisk("example", new()
 *     {
 *         Name = "acctestmd",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         StorageAccountType = "Standard_LRS",
 *         CreateOption = "Empty",
 *         DiskSizeGb = 1,
 *         Tags =
 *         {
 *             { "environment", "staging" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewManagedDisk(ctx, "example", &compute.ManagedDiskArgs{
 * 			Name:               pulumi.String("acctestmd"),
 * 			Location:           example.Location,
 * 			ResourceGroupName:  example.Name,
 * 			StorageAccountType: pulumi.String("Standard_LRS"),
 * 			CreateOption:       pulumi.String("Empty"),
 * 			DiskSizeGb:         pulumi.Int(1),
 * 			Tags: pulumi.StringMap{
 * 				"environment": pulumi.String("staging"),
 * 			},
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.compute.ManagedDisk;
 * import com.pulumi.azure.compute.ManagedDiskArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleManagedDisk = new ManagedDisk("exampleManagedDisk", ManagedDiskArgs.builder()
 *             .name("acctestmd")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .storageAccountType("Standard_LRS")
 *             .createOption("Empty")
 *             .diskSizeGb("1")
 *             .tags(Map.of("environment", "staging"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleManagedDisk:
 *     type: azure:compute:ManagedDisk
 *     name: example
 *     properties:
 *       name: acctestmd
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       storageAccountType: Standard_LRS
 *       createOption: Empty
 *       diskSizeGb: '1'
 *       tags:
 *         environment: staging
 * ```
 * 
 * ### With Create Copy
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const source = new azure.compute.ManagedDisk("source", {
 *     name: "acctestmd1",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     storageAccountType: "Standard_LRS",
 *     createOption: "Empty",
 *     diskSizeGb: 1,
 *     tags: {
 *         environment: "staging",
 *     },
 * });
 * const copy = new azure.compute.ManagedDisk("copy", {
 *     name: "acctestmd2",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     storageAccountType: "Standard_LRS",
 *     createOption: "Copy",
 *     sourceResourceId: source.id,
 *     diskSizeGb: 1,
 *     tags: {
 *         environment: "staging",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * source = azure.compute.ManagedDisk("source",
 *     name="acctestmd1",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     storage_account_type="Standard_LRS",
 *     create_option="Empty",
 *     disk_size_gb=1,
 *     tags={
 *         "environment": "staging",
 *     })
 * copy = azure.compute.ManagedDisk("copy",
 *     name="acctestmd2",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     storage_account_type="Standard_LRS",
 *     create_option="Copy",
 *     source_resource_id=source.id,
 *     disk_size_gb=1,
 *     tags={
 *         "environment": "staging",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var source = new Azure.Compute.ManagedDisk("source", new()
 *     {
 *         Name = "acctestmd1",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         StorageAccountType = "Standard_LRS",
 *         CreateOption = "Empty",
 *         DiskSizeGb = 1,
 *         Tags =
 *         {
 *             { "environment", "staging" },
 *         },
 *     });
 *     var copy = new Azure.Compute.ManagedDisk("copy", new()
 *     {
 *         Name = "acctestmd2",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         StorageAccountType = "Standard_LRS",
 *         CreateOption = "Copy",
 *         SourceResourceId = source.Id,
 *         DiskSizeGb = 1,
 *         Tags =
 *         {
 *             { "environment", "staging" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		source, err := compute.NewManagedDisk(ctx, "source", &compute.ManagedDiskArgs{
 * 			Name:               pulumi.String("acctestmd1"),
 * 			Location:           example.Location,
 * 			ResourceGroupName:  example.Name,
 * 			StorageAccountType: pulumi.String("Standard_LRS"),
 * 			CreateOption:       pulumi.String("Empty"),
 * 			DiskSizeGb:         pulumi.Int(1),
 * 			Tags: pulumi.StringMap{
 * 				"environment": pulumi.String("staging"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = compute.NewManagedDisk(ctx, "copy", &compute.ManagedDiskArgs{
 * 			Name:               pulumi.String("acctestmd2"),
 * 			Location:           example.Location,
 * 			ResourceGroupName:  example.Name,
 * 			StorageAccountType: pulumi.String("Standard_LRS"),
 * 			CreateOption:       pulumi.String("Copy"),
 * 			SourceResourceId:   source.ID(),
 * 			DiskSizeGb:         pulumi.Int(1),
 * 			Tags: pulumi.StringMap{
 * 				"environment": pulumi.String("staging"),
 * 			},
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.compute.ManagedDisk;
 * import com.pulumi.azure.compute.ManagedDiskArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var source = new ManagedDisk("source", ManagedDiskArgs.builder()
 *             .name("acctestmd1")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .storageAccountType("Standard_LRS")
 *             .createOption("Empty")
 *             .diskSizeGb("1")
 *             .tags(Map.of("environment", "staging"))
 *             .build());
 *         var copy = new ManagedDisk("copy", ManagedDiskArgs.builder()
 *             .name("acctestmd2")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .storageAccountType("Standard_LRS")
 *             .createOption("Copy")
 *             .sourceResourceId(source.id())
 *             .diskSizeGb("1")
 *             .tags(Map.of("environment", "staging"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   source:
 *     type: azure:compute:ManagedDisk
 *     properties:
 *       name: acctestmd1
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       storageAccountType: Standard_LRS
 *       createOption: Empty
 *       diskSizeGb: '1'
 *       tags:
 *         environment: staging
 *   copy:
 *     type: azure:compute:ManagedDisk
 *     properties:
 *       name: acctestmd2
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       storageAccountType: Standard_LRS
 *       createOption: Copy
 *       sourceResourceId: ${source.id}
 *       diskSizeGb: '1'
 *       tags:
 *         environment: staging
 * ```
 * 
 * ## Import
 * Managed Disks can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:compute/managedDisk:ManagedDisk example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/disks/manageddisk1
 * ```
 * @property createOption The method to use when creating the managed disk. Changing this forces a new resource to be created. Possible values include:
 * * `Import` - Import a VHD file in to the managed disk (VHD specified with `source_uri`).
 * * `ImportSecure` - Securely import a VHD file in to the managed disk (VHD specified with `source_uri`).
 * * `Empty` - Create an empty managed disk.
 * * `Copy` - Copy an existing managed disk or snapshot (specified with `source_resource_id`).
 * * `FromImage` - Copy a Platform Image (specified with `image_reference_id`)
 * * `Restore` - Set by Azure Backup or Site Recovery on a restored disk (specified with `source_resource_id`).
 * * `Upload` - Upload a VHD disk with the help of SAS URL (to be used with `upload_size_bytes`).
 * @property diskAccessId The ID of the disk access resource for using private endpoints on disks.
 * > **Note:** `disk_access_id` is only supported when `network_access_policy` is set to `AllowPrivate`.
 * @property diskEncryptionSetId The ID of a Disk Encryption Set which should be used to encrypt this Managed Disk. Conflicts with `secure_vm_disk_encryption_set_id`.
 * > **NOTE:** The Disk Encryption Set must have the `Reader` Role Assignment scoped on the Key Vault - in addition to an Access Policy to the Key Vault
 * > **NOTE:** Disk Encryption Sets are in Public Preview in a limited set of regions
 * @property diskIopsReadOnly The number of IOPS allowed across all VMs mounting the shared disk as read-only; only settable for UltraSSD disks and PremiumV2 disks with shared disk enabled. One operation can transfer between 4k and 256k bytes.
 * @property diskIopsReadWrite The number of IOPS allowed for this disk; only settable for UltraSSD disks and PremiumV2 disks. One operation can transfer between 4k and 256k bytes.
 * @property diskMbpsReadOnly The bandwidth allowed across all VMs mounting the shared disk as read-only; only settable for UltraSSD disks and PremiumV2 disks with shared disk enabled. MBps means millions of bytes per second.
 * @property diskMbpsReadWrite The bandwidth allowed for this disk; only settable for UltraSSD disks and PremiumV2 disks. MBps means millions of bytes per second.
 * @property diskSizeGb
 * @property edgeZone Specifies the Edge Zone within the Azure Region where this Managed Disk should exist. Changing this forces a new Managed Disk to be created.
 * @property encryptionSettings A `encryption_settings` block as defined below.
 * > **NOTE:** Removing `encryption_settings` forces a new resource to be created.
 * @property galleryImageReferenceId ID of a Gallery Image Version to copy when `create_option` is `FromImage`. This field cannot be specified if image_reference_id is specified. Changing this forces a new resource to be created.
 * @property hyperVGeneration The HyperV Generation of the Disk when the source of an `Import` or `Copy` operation targets a source that contains an operating system. Possible values are `V1` and `V2`. For `ImportSecure` it must be set to `V2`. Changing this forces a new resource to be created.
 * @property imageReferenceId ID of an existing platform/marketplace disk image to copy when `create_option` is `FromImage`. This field cannot be specified if gallery_image_reference_id is specified. Changing this forces a new resource to be created.
 * @property location Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
 * @property logicalSectorSize Logical Sector Size. Possible values are: `512` and `4096`. Defaults to `4096`. Changing this forces a new resource to be created.
 * > **NOTE:** Setting logical sector size is supported only with `UltraSSD_LRS` disks and `PremiumV2_LRS` disks.
 * @property maxShares The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
 * > **Note:** Premium SSD maxShares limit: `P15` and `P20` disks: 2. `P30`,`P40`,`P50` disks: 5. `P60`,`P70`,`P80` disks: 10. For ultra disks the `max_shares` minimum value is 1 and the maximum is 5.
 * @property name Specifies the name of the Managed Disk. Changing this forces a new resource to be created.
 * @property networkAccessPolicy Policy for accessing the disk via network. Allowed values are `AllowAll`, `AllowPrivate`, and `DenyAll`.
 * @property onDemandBurstingEnabled Specifies if On-Demand Bursting is enabled for the Managed Disk.
 * > **Note:** Credit-Based Bursting is enabled by default on all eligible disks. More information on [Credit-Based and On-Demand Bursting can be found in the documentation](https://docs.microsoft.com/azure/virtual-machines/disk-bursting#disk-level-bursting).
 * @property optimizedFrequentAttachEnabled Specifies whether this Managed Disk should be optimized for frequent disk attachments (where a disk is attached/detached more than 5 times in a day). Defaults to `false`.
 * > **Note:** Setting `optimized_frequent_attach_enabled` to `true` causes the disks to not align with the fault domain of the Virtual Machine, which can have operational implications.
 * @property osType Specify a value when the source of an `Import`, `ImportSecure` or `Copy` operation targets a source that contains an operating system. Valid values are `Linux` or `Windows`.
 * @property performancePlusEnabled Specifies whether Performance Plus is enabled for this Managed Disk. Defaults to `false`. Changing this forces a new resource to be created.
 * > **Note:** `performance_plus_enabled` can only be set to `true` when using a Managed Disk with an Ultra SSD.
 * @property publicNetworkAccessEnabled Whether it is allowed to access the disk via public network. Defaults to `true`.
 * For more information on managed disks, such as sizing options and pricing, please check out the [Azure Documentation](https://docs.microsoft.com/azure/storage/storage-managed-disks-overview).
 * @property resourceGroupName The name of the Resource Group where the Managed Disk should exist. Changing this forces a new resource to be created.
 * @property secureVmDiskEncryptionSetId The ID of the Disk Encryption Set which should be used to Encrypt this OS Disk when the Virtual Machine is a Confidential VM. Conflicts with `disk_encryption_set_id`. Changing this forces a new resource to be created.
 * > **NOTE:** `secure_vm_disk_encryption_set_id` can only be specified when `security_type` is set to `ConfidentialVM_DiskEncryptedWithCustomerKey`.
 * @property securityType Security Type of the Managed Disk when it is used for a Confidential VM. Possible values are `ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey`, `ConfidentialVM_DiskEncryptedWithPlatformKey` and `ConfidentialVM_DiskEncryptedWithCustomerKey`. Changing this forces a new resource to be created.
 * > **NOTE:** When `security_type` is set to `ConfidentialVM_DiskEncryptedWithCustomerKey` the value of `create_option` must be one of `FromImage` or `ImportSecure`.
 * > **NOTE:** `security_type` cannot be specified when `trusted_launch_enabled` is set to true.
 * > **NOTE:** `secure_vm_disk_encryption_set_id` must be specified when `security_type` is set to `ConfidentialVM_DiskEncryptedWithCustomerKey`.
 * @property sourceResourceId The ID of an existing Managed Disk or Snapshot to copy when `create_option` is `Copy` or the recovery point to restore when `create_option` is `Restore`. Changing this forces a new resource to be created.
 * @property sourceUri URI to a valid VHD file to be used when `create_option` is `Import` or `ImportSecure`. Changing this forces a new resource to be created.
 * @property storageAccountId The ID of the Storage Account where the `source_uri` is located. Required when `create_option` is set to `Import` or `ImportSecure`. Changing this forces a new resource to be created.
 * @property storageAccountType The type of storage to use for the managed disk. Possible values are `Standard_LRS`, `StandardSSD_ZRS`, `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `StandardSSD_LRS` or `UltraSSD_LRS`.
 * > **Note:** Azure Ultra Disk Storage is only available in a region that support availability zones and can only enabled on the following VM series: `ESv3`, `DSv3`, `FSv3`, `LSv2`, `M` and `Mv2`. For more information see the `Azure Ultra Disk Storage` [product documentation](https://docs.microsoft.com/azure/virtual-machines/windows/disks-enable-ultra-ssd).
 * @property tags A mapping of tags to assign to the resource.
 * @property tier
 * @property trustedLaunchEnabled Specifies if Trusted Launch is enabled for the Managed Disk. Changing this forces a new resource to be created.
 * > **Note:** Trusted Launch can only be enabled when `create_option` is `FromImage` or `Import`.
 * @property uploadSizeBytes Specifies the size of the managed disk to create in bytes. Required when `create_option` is `Upload`. The value must be equal to the source disk to be copied in bytes. Source disk size could be calculated with `ls -l` or `wc -c`. More information can be found at [Copy a managed disk](https://learn.microsoft.com/en-us/azure/virtual-machines/linux/disks-upload-vhd-to-managed-disk-cli#copy-a-managed-disk). Changing this forces a new resource to be created.
 * @property zone Specifies the Availability Zone in which this Managed Disk should be located. Changing this property forces a new resource to be created.
 * > **Note:** Availability Zones are [only supported in select regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview).
 */
public data class ManagedDiskArgs(
    public val createOption: Output? = null,
    public val diskAccessId: Output? = null,
    public val diskEncryptionSetId: Output? = null,
    public val diskIopsReadOnly: Output? = null,
    public val diskIopsReadWrite: Output? = null,
    public val diskMbpsReadOnly: Output? = null,
    public val diskMbpsReadWrite: Output? = null,
    public val diskSizeGb: Output? = null,
    public val edgeZone: Output? = null,
    public val encryptionSettings: Output? = null,
    public val galleryImageReferenceId: Output? = null,
    public val hyperVGeneration: Output? = null,
    public val imageReferenceId: Output? = null,
    public val location: Output? = null,
    public val logicalSectorSize: Output? = null,
    public val maxShares: Output? = null,
    public val name: Output? = null,
    public val networkAccessPolicy: Output? = null,
    public val onDemandBurstingEnabled: Output? = null,
    public val optimizedFrequentAttachEnabled: Output? = null,
    public val osType: Output? = null,
    public val performancePlusEnabled: Output? = null,
    public val publicNetworkAccessEnabled: Output? = null,
    public val resourceGroupName: Output? = null,
    public val secureVmDiskEncryptionSetId: Output? = null,
    public val securityType: Output? = null,
    public val sourceResourceId: Output? = null,
    public val sourceUri: Output? = null,
    public val storageAccountId: Output? = null,
    public val storageAccountType: Output? = null,
    public val tags: Output>? = null,
    public val tier: Output? = null,
    public val trustedLaunchEnabled: Output? = null,
    public val uploadSizeBytes: Output? = null,
    public val zone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.compute.ManagedDiskArgs =
        com.pulumi.azure.compute.ManagedDiskArgs.builder()
            .createOption(createOption?.applyValue({ args0 -> args0 }))
            .diskAccessId(diskAccessId?.applyValue({ args0 -> args0 }))
            .diskEncryptionSetId(diskEncryptionSetId?.applyValue({ args0 -> args0 }))
            .diskIopsReadOnly(diskIopsReadOnly?.applyValue({ args0 -> args0 }))
            .diskIopsReadWrite(diskIopsReadWrite?.applyValue({ args0 -> args0 }))
            .diskMbpsReadOnly(diskMbpsReadOnly?.applyValue({ args0 -> args0 }))
            .diskMbpsReadWrite(diskMbpsReadWrite?.applyValue({ args0 -> args0 }))
            .diskSizeGb(diskSizeGb?.applyValue({ args0 -> args0 }))
            .edgeZone(edgeZone?.applyValue({ args0 -> args0 }))
            .encryptionSettings(
                encryptionSettings?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .galleryImageReferenceId(galleryImageReferenceId?.applyValue({ args0 -> args0 }))
            .hyperVGeneration(hyperVGeneration?.applyValue({ args0 -> args0 }))
            .imageReferenceId(imageReferenceId?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .logicalSectorSize(logicalSectorSize?.applyValue({ args0 -> args0 }))
            .maxShares(maxShares?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .networkAccessPolicy(networkAccessPolicy?.applyValue({ args0 -> args0 }))
            .onDemandBurstingEnabled(onDemandBurstingEnabled?.applyValue({ args0 -> args0 }))
            .optimizedFrequentAttachEnabled(optimizedFrequentAttachEnabled?.applyValue({ args0 -> args0 }))
            .osType(osType?.applyValue({ args0 -> args0 }))
            .performancePlusEnabled(performancePlusEnabled?.applyValue({ args0 -> args0 }))
            .publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .secureVmDiskEncryptionSetId(secureVmDiskEncryptionSetId?.applyValue({ args0 -> args0 }))
            .securityType(securityType?.applyValue({ args0 -> args0 }))
            .sourceResourceId(sourceResourceId?.applyValue({ args0 -> args0 }))
            .sourceUri(sourceUri?.applyValue({ args0 -> args0 }))
            .storageAccountId(storageAccountId?.applyValue({ args0 -> args0 }))
            .storageAccountType(storageAccountType?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .tier(tier?.applyValue({ args0 -> args0 }))
            .trustedLaunchEnabled(trustedLaunchEnabled?.applyValue({ args0 -> args0 }))
            .uploadSizeBytes(uploadSizeBytes?.applyValue({ args0 -> args0 }))
            .zone(zone?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ManagedDiskArgs].
 */
@PulumiTagMarker
public class ManagedDiskArgsBuilder internal constructor() {
    private var createOption: Output? = null

    private var diskAccessId: Output? = null

    private var diskEncryptionSetId: Output? = null

    private var diskIopsReadOnly: Output? = null

    private var diskIopsReadWrite: Output? = null

    private var diskMbpsReadOnly: Output? = null

    private var diskMbpsReadWrite: Output? = null

    private var diskSizeGb: Output? = null

    private var edgeZone: Output? = null

    private var encryptionSettings: Output? = null

    private var galleryImageReferenceId: Output? = null

    private var hyperVGeneration: Output? = null

    private var imageReferenceId: Output? = null

    private var location: Output? = null

    private var logicalSectorSize: Output? = null

    private var maxShares: Output? = null

    private var name: Output? = null

    private var networkAccessPolicy: Output? = null

    private var onDemandBurstingEnabled: Output? = null

    private var optimizedFrequentAttachEnabled: Output? = null

    private var osType: Output? = null

    private var performancePlusEnabled: Output? = null

    private var publicNetworkAccessEnabled: Output? = null

    private var resourceGroupName: Output? = null

    private var secureVmDiskEncryptionSetId: Output? = null

    private var securityType: Output? = null

    private var sourceResourceId: Output? = null

    private var sourceUri: Output? = null

    private var storageAccountId: Output? = null

    private var storageAccountType: Output? = null

    private var tags: Output>? = null

    private var tier: Output? = null

    private var trustedLaunchEnabled: Output? = null

    private var uploadSizeBytes: Output? = null

    private var zone: Output? = null

    /**
     * @param value The method to use when creating the managed disk. Changing this forces a new resource to be created. Possible values include:
     * * `Import` - Import a VHD file in to the managed disk (VHD specified with `source_uri`).
     * * `ImportSecure` - Securely import a VHD file in to the managed disk (VHD specified with `source_uri`).
     * * `Empty` - Create an empty managed disk.
     * * `Copy` - Copy an existing managed disk or snapshot (specified with `source_resource_id`).
     * * `FromImage` - Copy a Platform Image (specified with `image_reference_id`)
     * * `Restore` - Set by Azure Backup or Site Recovery on a restored disk (specified with `source_resource_id`).
     * * `Upload` - Upload a VHD disk with the help of SAS URL (to be used with `upload_size_bytes`).
     */
    @JvmName("fshaqafkstnhaaev")
    public suspend fun createOption(`value`: Output) {
        this.createOption = value
    }

    /**
     * @param value The ID of the disk access resource for using private endpoints on disks.
     * > **Note:** `disk_access_id` is only supported when `network_access_policy` is set to `AllowPrivate`.
     */
    @JvmName("cormhaooujfldafx")
    public suspend fun diskAccessId(`value`: Output) {
        this.diskAccessId = value
    }

    /**
     * @param value The ID of a Disk Encryption Set which should be used to encrypt this Managed Disk. Conflicts with `secure_vm_disk_encryption_set_id`.
     * > **NOTE:** The Disk Encryption Set must have the `Reader` Role Assignment scoped on the Key Vault - in addition to an Access Policy to the Key Vault
     * > **NOTE:** Disk Encryption Sets are in Public Preview in a limited set of regions
     */
    @JvmName("sqripkjdbtrocywj")
    public suspend fun diskEncryptionSetId(`value`: Output) {
        this.diskEncryptionSetId = value
    }

    /**
     * @param value The number of IOPS allowed across all VMs mounting the shared disk as read-only; only settable for UltraSSD disks and PremiumV2 disks with shared disk enabled. One operation can transfer between 4k and 256k bytes.
     */
    @JvmName("gkdwuvudymcyvxtt")
    public suspend fun diskIopsReadOnly(`value`: Output) {
        this.diskIopsReadOnly = value
    }

    /**
     * @param value The number of IOPS allowed for this disk; only settable for UltraSSD disks and PremiumV2 disks. One operation can transfer between 4k and 256k bytes.
     */
    @JvmName("gkgxeqpsvpwrhdqn")
    public suspend fun diskIopsReadWrite(`value`: Output) {
        this.diskIopsReadWrite = value
    }

    /**
     * @param value The bandwidth allowed across all VMs mounting the shared disk as read-only; only settable for UltraSSD disks and PremiumV2 disks with shared disk enabled. MBps means millions of bytes per second.
     */
    @JvmName("afmsrgkflxgpnxcj")
    public suspend fun diskMbpsReadOnly(`value`: Output) {
        this.diskMbpsReadOnly = value
    }

    /**
     * @param value The bandwidth allowed for this disk; only settable for UltraSSD disks and PremiumV2 disks. MBps means millions of bytes per second.
     */
    @JvmName("pbynltdwniabrams")
    public suspend fun diskMbpsReadWrite(`value`: Output) {
        this.diskMbpsReadWrite = value
    }

    /**
     * @param value
     */
    @JvmName("fuoxfoxqgujdtrvx")
    public suspend fun diskSizeGb(`value`: Output) {
        this.diskSizeGb = value
    }

    /**
     * @param value Specifies the Edge Zone within the Azure Region where this Managed Disk should exist. Changing this forces a new Managed Disk to be created.
     */
    @JvmName("tqpehaequwvmshef")
    public suspend fun edgeZone(`value`: Output) {
        this.edgeZone = value
    }

    /**
     * @param value A `encryption_settings` block as defined below.
     * > **NOTE:** Removing `encryption_settings` forces a new resource to be created.
     */
    @JvmName("ontqckpwdpvytltw")
    public suspend fun encryptionSettings(`value`: Output) {
        this.encryptionSettings = value
    }

    /**
     * @param value ID of a Gallery Image Version to copy when `create_option` is `FromImage`. This field cannot be specified if image_reference_id is specified. Changing this forces a new resource to be created.
     */
    @JvmName("dggtoprnmqxvdhxj")
    public suspend fun galleryImageReferenceId(`value`: Output) {
        this.galleryImageReferenceId = value
    }

    /**
     * @param value The HyperV Generation of the Disk when the source of an `Import` or `Copy` operation targets a source that contains an operating system. Possible values are `V1` and `V2`. For `ImportSecure` it must be set to `V2`. Changing this forces a new resource to be created.
     */
    @JvmName("hewoncxceokoggku")
    public suspend fun hyperVGeneration(`value`: Output) {
        this.hyperVGeneration = value
    }

    /**
     * @param value ID of an existing platform/marketplace disk image to copy when `create_option` is `FromImage`. This field cannot be specified if gallery_image_reference_id is specified. Changing this forces a new resource to be created.
     */
    @JvmName("vfhonchtqwwltnef")
    public suspend fun imageReferenceId(`value`: Output) {
        this.imageReferenceId = value
    }

    /**
     * @param value Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("prxdxhclojocrram")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Logical Sector Size. Possible values are: `512` and `4096`. Defaults to `4096`. Changing this forces a new resource to be created.
     * > **NOTE:** Setting logical sector size is supported only with `UltraSSD_LRS` disks and `PremiumV2_LRS` disks.
     */
    @JvmName("ivpevurycjhvxbiy")
    public suspend fun logicalSectorSize(`value`: Output) {
        this.logicalSectorSize = value
    }

    /**
     * @param value The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
     * > **Note:** Premium SSD maxShares limit: `P15` and `P20` disks: 2. `P30`,`P40`,`P50` disks: 5. `P60`,`P70`,`P80` disks: 10. For ultra disks the `max_shares` minimum value is 1 and the maximum is 5.
     */
    @JvmName("ehqaevpornntmdwc")
    public suspend fun maxShares(`value`: Output) {
        this.maxShares = value
    }

    /**
     * @param value Specifies the name of the Managed Disk. Changing this forces a new resource to be created.
     */
    @JvmName("lnotxhhcqtaphuwa")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Policy for accessing the disk via network. Allowed values are `AllowAll`, `AllowPrivate`, and `DenyAll`.
     */
    @JvmName("qgabqfwjjicolglb")
    public suspend fun networkAccessPolicy(`value`: Output) {
        this.networkAccessPolicy = value
    }

    /**
     * @param value Specifies if On-Demand Bursting is enabled for the Managed Disk.
     * > **Note:** Credit-Based Bursting is enabled by default on all eligible disks. More information on [Credit-Based and On-Demand Bursting can be found in the documentation](https://docs.microsoft.com/azure/virtual-machines/disk-bursting#disk-level-bursting).
     */
    @JvmName("dscpqnfaneivjwlw")
    public suspend fun onDemandBurstingEnabled(`value`: Output) {
        this.onDemandBurstingEnabled = value
    }

    /**
     * @param value Specifies whether this Managed Disk should be optimized for frequent disk attachments (where a disk is attached/detached more than 5 times in a day). Defaults to `false`.
     * > **Note:** Setting `optimized_frequent_attach_enabled` to `true` causes the disks to not align with the fault domain of the Virtual Machine, which can have operational implications.
     */
    @JvmName("nkofibkjwogdhoiv")
    public suspend fun optimizedFrequentAttachEnabled(`value`: Output) {
        this.optimizedFrequentAttachEnabled = value
    }

    /**
     * @param value Specify a value when the source of an `Import`, `ImportSecure` or `Copy` operation targets a source that contains an operating system. Valid values are `Linux` or `Windows`.
     */
    @JvmName("htwtscuohyepgbfn")
    public suspend fun osType(`value`: Output) {
        this.osType = value
    }

    /**
     * @param value Specifies whether Performance Plus is enabled for this Managed Disk. Defaults to `false`. Changing this forces a new resource to be created.
     * > **Note:** `performance_plus_enabled` can only be set to `true` when using a Managed Disk with an Ultra SSD.
     */
    @JvmName("aghsgfrxpdwnojdi")
    public suspend fun performancePlusEnabled(`value`: Output) {
        this.performancePlusEnabled = value
    }

    /**
     * @param value Whether it is allowed to access the disk via public network. Defaults to `true`.
     * For more information on managed disks, such as sizing options and pricing, please check out the [Azure Documentation](https://docs.microsoft.com/azure/storage/storage-managed-disks-overview).
     */
    @JvmName("ddnkpktrgpffeplb")
    public suspend fun publicNetworkAccessEnabled(`value`: Output) {
        this.publicNetworkAccessEnabled = value
    }

    /**
     * @param value The name of the Resource Group where the Managed Disk should exist. Changing this forces a new resource to be created.
     */
    @JvmName("pstfmscsyvirfrvl")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The ID of the Disk Encryption Set which should be used to Encrypt this OS Disk when the Virtual Machine is a Confidential VM. Conflicts with `disk_encryption_set_id`. Changing this forces a new resource to be created.
     * > **NOTE:** `secure_vm_disk_encryption_set_id` can only be specified when `security_type` is set to `ConfidentialVM_DiskEncryptedWithCustomerKey`.
     */
    @JvmName("xgeootcvwfrmyuer")
    public suspend fun secureVmDiskEncryptionSetId(`value`: Output) {
        this.secureVmDiskEncryptionSetId = value
    }

    /**
     * @param value Security Type of the Managed Disk when it is used for a Confidential VM. Possible values are `ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey`, `ConfidentialVM_DiskEncryptedWithPlatformKey` and `ConfidentialVM_DiskEncryptedWithCustomerKey`. Changing this forces a new resource to be created.
     * > **NOTE:** When `security_type` is set to `ConfidentialVM_DiskEncryptedWithCustomerKey` the value of `create_option` must be one of `FromImage` or `ImportSecure`.
     * > **NOTE:** `security_type` cannot be specified when `trusted_launch_enabled` is set to true.
     * > **NOTE:** `secure_vm_disk_encryption_set_id` must be specified when `security_type` is set to `ConfidentialVM_DiskEncryptedWithCustomerKey`.
     */
    @JvmName("bufqaaythyrnbaap")
    public suspend fun securityType(`value`: Output) {
        this.securityType = value
    }

    /**
     * @param value The ID of an existing Managed Disk or Snapshot to copy when `create_option` is `Copy` or the recovery point to restore when `create_option` is `Restore`. Changing this forces a new resource to be created.
     */
    @JvmName("pbjslidlfbabllmg")
    public suspend fun sourceResourceId(`value`: Output) {
        this.sourceResourceId = value
    }

    /**
     * @param value URI to a valid VHD file to be used when `create_option` is `Import` or `ImportSecure`. Changing this forces a new resource to be created.
     */
    @JvmName("lphkexugckgubclp")
    public suspend fun sourceUri(`value`: Output) {
        this.sourceUri = value
    }

    /**
     * @param value The ID of the Storage Account where the `source_uri` is located. Required when `create_option` is set to `Import` or `ImportSecure`. Changing this forces a new resource to be created.
     */
    @JvmName("sbiojmxerbrexpfc")
    public suspend fun storageAccountId(`value`: Output) {
        this.storageAccountId = value
    }

    /**
     * @param value The type of storage to use for the managed disk. Possible values are `Standard_LRS`, `StandardSSD_ZRS`, `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `StandardSSD_LRS` or `UltraSSD_LRS`.
     * > **Note:** Azure Ultra Disk Storage is only available in a region that support availability zones and can only enabled on the following VM series: `ESv3`, `DSv3`, `FSv3`, `LSv2`, `M` and `Mv2`. For more information see the `Azure Ultra Disk Storage` [product documentation](https://docs.microsoft.com/azure/virtual-machines/windows/disks-enable-ultra-ssd).
     */
    @JvmName("oedyfvtnwuqkqtlx")
    public suspend fun storageAccountType(`value`: Output) {
        this.storageAccountType = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("pqwcuaxprhvtdtte")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value
     */
    @JvmName("awcqbgtmrojjspvf")
    public suspend fun tier(`value`: Output) {
        this.tier = value
    }

    /**
     * @param value Specifies if Trusted Launch is enabled for the Managed Disk. Changing this forces a new resource to be created.
     * > **Note:** Trusted Launch can only be enabled when `create_option` is `FromImage` or `Import`.
     */
    @JvmName("yxugqypxxikrcvfn")
    public suspend fun trustedLaunchEnabled(`value`: Output) {
        this.trustedLaunchEnabled = value
    }

    /**
     * @param value Specifies the size of the managed disk to create in bytes. Required when `create_option` is `Upload`. The value must be equal to the source disk to be copied in bytes. Source disk size could be calculated with `ls -l` or `wc -c`. More information can be found at [Copy a managed disk](https://learn.microsoft.com/en-us/azure/virtual-machines/linux/disks-upload-vhd-to-managed-disk-cli#copy-a-managed-disk). Changing this forces a new resource to be created.
     */
    @JvmName("oyjukcklmhgoutdw")
    public suspend fun uploadSizeBytes(`value`: Output) {
        this.uploadSizeBytes = value
    }

    /**
     * @param value Specifies the Availability Zone in which this Managed Disk should be located. Changing this property forces a new resource to be created.
     * > **Note:** Availability Zones are [only supported in select regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview).
     */
    @JvmName("gdjpsaeweptfilyg")
    public suspend fun zone(`value`: Output) {
        this.zone = value
    }

    /**
     * @param value The method to use when creating the managed disk. Changing this forces a new resource to be created. Possible values include:
     * * `Import` - Import a VHD file in to the managed disk (VHD specified with `source_uri`).
     * * `ImportSecure` - Securely import a VHD file in to the managed disk (VHD specified with `source_uri`).
     * * `Empty` - Create an empty managed disk.
     * * `Copy` - Copy an existing managed disk or snapshot (specified with `source_resource_id`).
     * * `FromImage` - Copy a Platform Image (specified with `image_reference_id`)
     * * `Restore` - Set by Azure Backup or Site Recovery on a restored disk (specified with `source_resource_id`).
     * * `Upload` - Upload a VHD disk with the help of SAS URL (to be used with `upload_size_bytes`).
     */
    @JvmName("kxvuxhonclpvfvsn")
    public suspend fun createOption(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.createOption = mapped
    }

    /**
     * @param value The ID of the disk access resource for using private endpoints on disks.
     * > **Note:** `disk_access_id` is only supported when `network_access_policy` is set to `AllowPrivate`.
     */
    @JvmName("mebngtuddlicgojd")
    public suspend fun diskAccessId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskAccessId = mapped
    }

    /**
     * @param value The ID of a Disk Encryption Set which should be used to encrypt this Managed Disk. Conflicts with `secure_vm_disk_encryption_set_id`.
     * > **NOTE:** The Disk Encryption Set must have the `Reader` Role Assignment scoped on the Key Vault - in addition to an Access Policy to the Key Vault
     * > **NOTE:** Disk Encryption Sets are in Public Preview in a limited set of regions
     */
    @JvmName("kjudwauoueewjmsg")
    public suspend fun diskEncryptionSetId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskEncryptionSetId = mapped
    }

    /**
     * @param value The number of IOPS allowed across all VMs mounting the shared disk as read-only; only settable for UltraSSD disks and PremiumV2 disks with shared disk enabled. One operation can transfer between 4k and 256k bytes.
     */
    @JvmName("lrwgqxkpxqjnnqsi")
    public suspend fun diskIopsReadOnly(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskIopsReadOnly = mapped
    }

    /**
     * @param value The number of IOPS allowed for this disk; only settable for UltraSSD disks and PremiumV2 disks. One operation can transfer between 4k and 256k bytes.
     */
    @JvmName("nlicnnfcjbstdnda")
    public suspend fun diskIopsReadWrite(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskIopsReadWrite = mapped
    }

    /**
     * @param value The bandwidth allowed across all VMs mounting the shared disk as read-only; only settable for UltraSSD disks and PremiumV2 disks with shared disk enabled. MBps means millions of bytes per second.
     */
    @JvmName("qxxyrhpyomjjgten")
    public suspend fun diskMbpsReadOnly(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskMbpsReadOnly = mapped
    }

    /**
     * @param value The bandwidth allowed for this disk; only settable for UltraSSD disks and PremiumV2 disks. MBps means millions of bytes per second.
     */
    @JvmName("ifbqdlxmodtxpeiv")
    public suspend fun diskMbpsReadWrite(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskMbpsReadWrite = mapped
    }

    /**
     * @param value
     */
    @JvmName("tabpkyvkfkyxihfi")
    public suspend fun diskSizeGb(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskSizeGb = mapped
    }

    /**
     * @param value Specifies the Edge Zone within the Azure Region where this Managed Disk should exist. Changing this forces a new Managed Disk to be created.
     */
    @JvmName("wpcpsbpcfkevsufq")
    public suspend fun edgeZone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.edgeZone = mapped
    }

    /**
     * @param value A `encryption_settings` block as defined below.
     * > **NOTE:** Removing `encryption_settings` forces a new resource to be created.
     */
    @JvmName("jylvpsidqiunjykn")
    public suspend fun encryptionSettings(`value`: ManagedDiskEncryptionSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encryptionSettings = mapped
    }

    /**
     * @param argument A `encryption_settings` block as defined below.
     * > **NOTE:** Removing `encryption_settings` forces a new resource to be created.
     */
    @JvmName("ongscjhlcyixechm")
    public suspend fun encryptionSettings(argument: suspend ManagedDiskEncryptionSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = ManagedDiskEncryptionSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.encryptionSettings = mapped
    }

    /**
     * @param value ID of a Gallery Image Version to copy when `create_option` is `FromImage`. This field cannot be specified if image_reference_id is specified. Changing this forces a new resource to be created.
     */
    @JvmName("bfjetvolfjxwovln")
    public suspend fun galleryImageReferenceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.galleryImageReferenceId = mapped
    }

    /**
     * @param value The HyperV Generation of the Disk when the source of an `Import` or `Copy` operation targets a source that contains an operating system. Possible values are `V1` and `V2`. For `ImportSecure` it must be set to `V2`. Changing this forces a new resource to be created.
     */
    @JvmName("gpuqhkabgjnnpohw")
    public suspend fun hyperVGeneration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hyperVGeneration = mapped
    }

    /**
     * @param value ID of an existing platform/marketplace disk image to copy when `create_option` is `FromImage`. This field cannot be specified if gallery_image_reference_id is specified. Changing this forces a new resource to be created.
     */
    @JvmName("nlwteigbwavkvkge")
    public suspend fun imageReferenceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imageReferenceId = mapped
    }

    /**
     * @param value Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("kofxfhwryboyjssa")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Logical Sector Size. Possible values are: `512` and `4096`. Defaults to `4096`. Changing this forces a new resource to be created.
     * > **NOTE:** Setting logical sector size is supported only with `UltraSSD_LRS` disks and `PremiumV2_LRS` disks.
     */
    @JvmName("jisosdqtuigibsoq")
    public suspend fun logicalSectorSize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logicalSectorSize = mapped
    }

    /**
     * @param value The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
     * > **Note:** Premium SSD maxShares limit: `P15` and `P20` disks: 2. `P30`,`P40`,`P50` disks: 5. `P60`,`P70`,`P80` disks: 10. For ultra disks the `max_shares` minimum value is 1 and the maximum is 5.
     */
    @JvmName("idujyhefogytslks")
    public suspend fun maxShares(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxShares = mapped
    }

    /**
     * @param value Specifies the name of the Managed Disk. Changing this forces a new resource to be created.
     */
    @JvmName("ehgdgbvirthrvycq")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Policy for accessing the disk via network. Allowed values are `AllowAll`, `AllowPrivate`, and `DenyAll`.
     */
    @JvmName("jckyvkmjobdrnnrs")
    public suspend fun networkAccessPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkAccessPolicy = mapped
    }

    /**
     * @param value Specifies if On-Demand Bursting is enabled for the Managed Disk.
     * > **Note:** Credit-Based Bursting is enabled by default on all eligible disks. More information on [Credit-Based and On-Demand Bursting can be found in the documentation](https://docs.microsoft.com/azure/virtual-machines/disk-bursting#disk-level-bursting).
     */
    @JvmName("othqqxpksrrffajq")
    public suspend fun onDemandBurstingEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.onDemandBurstingEnabled = mapped
    }

    /**
     * @param value Specifies whether this Managed Disk should be optimized for frequent disk attachments (where a disk is attached/detached more than 5 times in a day). Defaults to `false`.
     * > **Note:** Setting `optimized_frequent_attach_enabled` to `true` causes the disks to not align with the fault domain of the Virtual Machine, which can have operational implications.
     */
    @JvmName("bdqvshncqbodsenb")
    public suspend fun optimizedFrequentAttachEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.optimizedFrequentAttachEnabled = mapped
    }

    /**
     * @param value Specify a value when the source of an `Import`, `ImportSecure` or `Copy` operation targets a source that contains an operating system. Valid values are `Linux` or `Windows`.
     */
    @JvmName("prnmaefxnfepehvh")
    public suspend fun osType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.osType = mapped
    }

    /**
     * @param value Specifies whether Performance Plus is enabled for this Managed Disk. Defaults to `false`. Changing this forces a new resource to be created.
     * > **Note:** `performance_plus_enabled` can only be set to `true` when using a Managed Disk with an Ultra SSD.
     */
    @JvmName("mupnakfcvamjoeis")
    public suspend fun performancePlusEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.performancePlusEnabled = mapped
    }

    /**
     * @param value Whether it is allowed to access the disk via public network. Defaults to `true`.
     * For more information on managed disks, such as sizing options and pricing, please check out the [Azure Documentation](https://docs.microsoft.com/azure/storage/storage-managed-disks-overview).
     */
    @JvmName("lsrdfqadctgtstvr")
    public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccessEnabled = mapped
    }

    /**
     * @param value The name of the Resource Group where the Managed Disk should exist. Changing this forces a new resource to be created.
     */
    @JvmName("rurtvrcvalmtmmkd")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The ID of the Disk Encryption Set which should be used to Encrypt this OS Disk when the Virtual Machine is a Confidential VM. Conflicts with `disk_encryption_set_id`. Changing this forces a new resource to be created.
     * > **NOTE:** `secure_vm_disk_encryption_set_id` can only be specified when `security_type` is set to `ConfidentialVM_DiskEncryptedWithCustomerKey`.
     */
    @JvmName("bbnpwnnnqkesrpbm")
    public suspend fun secureVmDiskEncryptionSetId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secureVmDiskEncryptionSetId = mapped
    }

    /**
     * @param value Security Type of the Managed Disk when it is used for a Confidential VM. Possible values are `ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey`, `ConfidentialVM_DiskEncryptedWithPlatformKey` and `ConfidentialVM_DiskEncryptedWithCustomerKey`. Changing this forces a new resource to be created.
     * > **NOTE:** When `security_type` is set to `ConfidentialVM_DiskEncryptedWithCustomerKey` the value of `create_option` must be one of `FromImage` or `ImportSecure`.
     * > **NOTE:** `security_type` cannot be specified when `trusted_launch_enabled` is set to true.
     * > **NOTE:** `secure_vm_disk_encryption_set_id` must be specified when `security_type` is set to `ConfidentialVM_DiskEncryptedWithCustomerKey`.
     */
    @JvmName("kudmmssoimidlrnc")
    public suspend fun securityType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityType = mapped
    }

    /**
     * @param value The ID of an existing Managed Disk or Snapshot to copy when `create_option` is `Copy` or the recovery point to restore when `create_option` is `Restore`. Changing this forces a new resource to be created.
     */
    @JvmName("pjlrcysonikkddaj")
    public suspend fun sourceResourceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceResourceId = mapped
    }

    /**
     * @param value URI to a valid VHD file to be used when `create_option` is `Import` or `ImportSecure`. Changing this forces a new resource to be created.
     */
    @JvmName("wgqlshqfeucuwkpt")
    public suspend fun sourceUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceUri = mapped
    }

    /**
     * @param value The ID of the Storage Account where the `source_uri` is located. Required when `create_option` is set to `Import` or `ImportSecure`. Changing this forces a new resource to be created.
     */
    @JvmName("pcypskolnmdpciyp")
    public suspend fun storageAccountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountId = mapped
    }

    /**
     * @param value The type of storage to use for the managed disk. Possible values are `Standard_LRS`, `StandardSSD_ZRS`, `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `StandardSSD_LRS` or `UltraSSD_LRS`.
     * > **Note:** Azure Ultra Disk Storage is only available in a region that support availability zones and can only enabled on the following VM series: `ESv3`, `DSv3`, `FSv3`, `LSv2`, `M` and `Mv2`. For more information see the `Azure Ultra Disk Storage` [product documentation](https://docs.microsoft.com/azure/virtual-machines/windows/disks-enable-ultra-ssd).
     */
    @JvmName("mulgsgpebidpepva")
    public suspend fun storageAccountType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountType = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("qqkdgpyxlmxfgpvv")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("rexsihedqafgkxdh")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

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

    /**
     * @param value Specifies if Trusted Launch is enabled for the Managed Disk. Changing this forces a new resource to be created.
     * > **Note:** Trusted Launch can only be enabled when `create_option` is `FromImage` or `Import`.
     */
    @JvmName("ukfrnrdrivyxtwof")
    public suspend fun trustedLaunchEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trustedLaunchEnabled = mapped
    }

    /**
     * @param value Specifies the size of the managed disk to create in bytes. Required when `create_option` is `Upload`. The value must be equal to the source disk to be copied in bytes. Source disk size could be calculated with `ls -l` or `wc -c`. More information can be found at [Copy a managed disk](https://learn.microsoft.com/en-us/azure/virtual-machines/linux/disks-upload-vhd-to-managed-disk-cli#copy-a-managed-disk). Changing this forces a new resource to be created.
     */
    @JvmName("aavowjwboucelbse")
    public suspend fun uploadSizeBytes(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.uploadSizeBytes = mapped
    }

    /**
     * @param value Specifies the Availability Zone in which this Managed Disk should be located. Changing this property forces a new resource to be created.
     * > **Note:** Availability Zones are [only supported in select regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview).
     */
    @JvmName("hdmejtujynsmekwg")
    public suspend fun zone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zone = mapped
    }

    internal fun build(): ManagedDiskArgs = ManagedDiskArgs(
        createOption = createOption,
        diskAccessId = diskAccessId,
        diskEncryptionSetId = diskEncryptionSetId,
        diskIopsReadOnly = diskIopsReadOnly,
        diskIopsReadWrite = diskIopsReadWrite,
        diskMbpsReadOnly = diskMbpsReadOnly,
        diskMbpsReadWrite = diskMbpsReadWrite,
        diskSizeGb = diskSizeGb,
        edgeZone = edgeZone,
        encryptionSettings = encryptionSettings,
        galleryImageReferenceId = galleryImageReferenceId,
        hyperVGeneration = hyperVGeneration,
        imageReferenceId = imageReferenceId,
        location = location,
        logicalSectorSize = logicalSectorSize,
        maxShares = maxShares,
        name = name,
        networkAccessPolicy = networkAccessPolicy,
        onDemandBurstingEnabled = onDemandBurstingEnabled,
        optimizedFrequentAttachEnabled = optimizedFrequentAttachEnabled,
        osType = osType,
        performancePlusEnabled = performancePlusEnabled,
        publicNetworkAccessEnabled = publicNetworkAccessEnabled,
        resourceGroupName = resourceGroupName,
        secureVmDiskEncryptionSetId = secureVmDiskEncryptionSetId,
        securityType = securityType,
        sourceResourceId = sourceResourceId,
        sourceUri = sourceUri,
        storageAccountId = storageAccountId,
        storageAccountType = storageAccountType,
        tags = tags,
        tier = tier,
        trustedLaunchEnabled = trustedLaunchEnabled,
        uploadSizeBytes = uploadSizeBytes,
        zone = zone,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy