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

com.pulumi.azure.compute.kotlin.inputs.VirtualMachineStorageDataDiskArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.21.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.compute.kotlin.inputs

import com.pulumi.azure.compute.inputs.VirtualMachineStorageDataDiskArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property caching Specifies the caching requirements for the Data Disk. Possible values include `None`, `ReadOnly` and `ReadWrite`.
 * @property createOption Specifies how the data disk should be created. Possible values are `Attach`, `FromImage` and `Empty`.
 * > **NOTE:** If using an image that does not have data to be written to the Data Disk, use `Empty` as the create option in order to create the desired disk without any data.
 * @property diskSizeGb Specifies the size of the data disk in gigabytes.
 * @property lun Specifies the logical unit number of the data disk. This needs to be unique within all the Data Disks on the Virtual Machine.
 * @property managedDiskId Specifies the ID of an Existing Managed Disk which should be attached to this Virtual Machine. When this field is set `create_option` must be set to `Attach`.
 * The following properties apply when using Unmanaged Disks:
 * @property managedDiskType Specifies the type of managed disk to create. Possible values are either `Standard_LRS`, `StandardSSD_LRS`, `Premium_LRS` or `UltraSSD_LRS`.
 * > **Note:** `managed_disk_type` of type `UltraSSD_LRS` is currently in preview and are not available to subscriptions that have not [requested](https://aka.ms/UltraSSDPreviewSignUp) onboarding to `Azure Ultra Disk Storage` preview. `Azure Ultra Disk Storage` is only available in `East US 2`, `North Europe`, and `Southeast Asia` regions. For more information see the `Azure Ultra Disk Storage` [product documentation](https://docs.microsoft.com/azure/virtual-machines/windows/disks-enable-ultra-ssd), [product blog](https://azure.microsoft.com/en-us/blog/announcing-the-general-availability-of-azure-ultra-disk-storage/) and [FAQ](https://docs.microsoft.com/azure/virtual-machines/windows/faq-for-disks#ultra-disks). You must also set `additional_capabilities.ultra_ssd_enabled` to `true`.
 * @property name The name of the Data Disk.
 * @property vhdUri Specifies the URI of the VHD file backing this Unmanaged Data Disk.
 * @property writeAcceleratorEnabled Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`.
 * The following properties apply when using Managed Disks:
 */
public data class VirtualMachineStorageDataDiskArgs(
    public val caching: Output? = null,
    public val createOption: Output,
    public val diskSizeGb: Output? = null,
    public val lun: Output,
    public val managedDiskId: Output? = null,
    public val managedDiskType: Output? = null,
    public val name: Output,
    public val vhdUri: Output? = null,
    public val writeAcceleratorEnabled: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.compute.inputs.VirtualMachineStorageDataDiskArgs =
        com.pulumi.azure.compute.inputs.VirtualMachineStorageDataDiskArgs.builder()
            .caching(caching?.applyValue({ args0 -> args0 }))
            .createOption(createOption.applyValue({ args0 -> args0 }))
            .diskSizeGb(diskSizeGb?.applyValue({ args0 -> args0 }))
            .lun(lun.applyValue({ args0 -> args0 }))
            .managedDiskId(managedDiskId?.applyValue({ args0 -> args0 }))
            .managedDiskType(managedDiskType?.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .vhdUri(vhdUri?.applyValue({ args0 -> args0 }))
            .writeAcceleratorEnabled(writeAcceleratorEnabled?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VirtualMachineStorageDataDiskArgs].
 */
@PulumiTagMarker
public class VirtualMachineStorageDataDiskArgsBuilder internal constructor() {
    private var caching: Output? = null

    private var createOption: Output? = null

    private var diskSizeGb: Output? = null

    private var lun: Output? = null

    private var managedDiskId: Output? = null

    private var managedDiskType: Output? = null

    private var name: Output? = null

    private var vhdUri: Output? = null

    private var writeAcceleratorEnabled: Output? = null

    /**
     * @param value Specifies the caching requirements for the Data Disk. Possible values include `None`, `ReadOnly` and `ReadWrite`.
     */
    @JvmName("nrkpqjbvcdikrpsi")
    public suspend fun caching(`value`: Output) {
        this.caching = value
    }

    /**
     * @param value Specifies how the data disk should be created. Possible values are `Attach`, `FromImage` and `Empty`.
     * > **NOTE:** If using an image that does not have data to be written to the Data Disk, use `Empty` as the create option in order to create the desired disk without any data.
     */
    @JvmName("gxdmqtrswdrtdfkx")
    public suspend fun createOption(`value`: Output) {
        this.createOption = value
    }

    /**
     * @param value Specifies the size of the data disk in gigabytes.
     */
    @JvmName("icpviealhhtugrvq")
    public suspend fun diskSizeGb(`value`: Output) {
        this.diskSizeGb = value
    }

    /**
     * @param value Specifies the logical unit number of the data disk. This needs to be unique within all the Data Disks on the Virtual Machine.
     */
    @JvmName("odiddfiveluylmoi")
    public suspend fun lun(`value`: Output) {
        this.lun = value
    }

    /**
     * @param value Specifies the ID of an Existing Managed Disk which should be attached to this Virtual Machine. When this field is set `create_option` must be set to `Attach`.
     * The following properties apply when using Unmanaged Disks:
     */
    @JvmName("pquvdqhxrsciyldf")
    public suspend fun managedDiskId(`value`: Output) {
        this.managedDiskId = value
    }

    /**
     * @param value Specifies the type of managed disk to create. Possible values are either `Standard_LRS`, `StandardSSD_LRS`, `Premium_LRS` or `UltraSSD_LRS`.
     * > **Note:** `managed_disk_type` of type `UltraSSD_LRS` is currently in preview and are not available to subscriptions that have not [requested](https://aka.ms/UltraSSDPreviewSignUp) onboarding to `Azure Ultra Disk Storage` preview. `Azure Ultra Disk Storage` is only available in `East US 2`, `North Europe`, and `Southeast Asia` regions. For more information see the `Azure Ultra Disk Storage` [product documentation](https://docs.microsoft.com/azure/virtual-machines/windows/disks-enable-ultra-ssd), [product blog](https://azure.microsoft.com/en-us/blog/announcing-the-general-availability-of-azure-ultra-disk-storage/) and [FAQ](https://docs.microsoft.com/azure/virtual-machines/windows/faq-for-disks#ultra-disks). You must also set `additional_capabilities.ultra_ssd_enabled` to `true`.
     */
    @JvmName("aysphjstmoaecpih")
    public suspend fun managedDiskType(`value`: Output) {
        this.managedDiskType = value
    }

    /**
     * @param value The name of the Data Disk.
     */
    @JvmName("aororrffyacjcnyj")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the URI of the VHD file backing this Unmanaged Data Disk.
     */
    @JvmName("wwyyonsgsjmhsran")
    public suspend fun vhdUri(`value`: Output) {
        this.vhdUri = value
    }

    /**
     * @param value Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`.
     * The following properties apply when using Managed Disks:
     */
    @JvmName("sbyrpyjrfkbdomft")
    public suspend fun writeAcceleratorEnabled(`value`: Output) {
        this.writeAcceleratorEnabled = value
    }

    /**
     * @param value Specifies the caching requirements for the Data Disk. Possible values include `None`, `ReadOnly` and `ReadWrite`.
     */
    @JvmName("vdyxlwysnbiuoite")
    public suspend fun caching(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.caching = mapped
    }

    /**
     * @param value Specifies how the data disk should be created. Possible values are `Attach`, `FromImage` and `Empty`.
     * > **NOTE:** If using an image that does not have data to be written to the Data Disk, use `Empty` as the create option in order to create the desired disk without any data.
     */
    @JvmName("sjafeorqppmapyxa")
    public suspend fun createOption(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.createOption = mapped
    }

    /**
     * @param value Specifies the size of the data disk in gigabytes.
     */
    @JvmName("cvqljmojrlmdlcbt")
    public suspend fun diskSizeGb(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskSizeGb = mapped
    }

    /**
     * @param value Specifies the logical unit number of the data disk. This needs to be unique within all the Data Disks on the Virtual Machine.
     */
    @JvmName("grdlolgbhxhmagnr")
    public suspend fun lun(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.lun = mapped
    }

    /**
     * @param value Specifies the ID of an Existing Managed Disk which should be attached to this Virtual Machine. When this field is set `create_option` must be set to `Attach`.
     * The following properties apply when using Unmanaged Disks:
     */
    @JvmName("vhfqbqxhfqyvdqny")
    public suspend fun managedDiskId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managedDiskId = mapped
    }

    /**
     * @param value Specifies the type of managed disk to create. Possible values are either `Standard_LRS`, `StandardSSD_LRS`, `Premium_LRS` or `UltraSSD_LRS`.
     * > **Note:** `managed_disk_type` of type `UltraSSD_LRS` is currently in preview and are not available to subscriptions that have not [requested](https://aka.ms/UltraSSDPreviewSignUp) onboarding to `Azure Ultra Disk Storage` preview. `Azure Ultra Disk Storage` is only available in `East US 2`, `North Europe`, and `Southeast Asia` regions. For more information see the `Azure Ultra Disk Storage` [product documentation](https://docs.microsoft.com/azure/virtual-machines/windows/disks-enable-ultra-ssd), [product blog](https://azure.microsoft.com/en-us/blog/announcing-the-general-availability-of-azure-ultra-disk-storage/) and [FAQ](https://docs.microsoft.com/azure/virtual-machines/windows/faq-for-disks#ultra-disks). You must also set `additional_capabilities.ultra_ssd_enabled` to `true`.
     */
    @JvmName("kqosmcunmyoeswpf")
    public suspend fun managedDiskType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managedDiskType = mapped
    }

    /**
     * @param value The name of the Data Disk.
     */
    @JvmName("ywagwynjvqmxaria")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the URI of the VHD file backing this Unmanaged Data Disk.
     */
    @JvmName("nmubahoatgkkpsxu")
    public suspend fun vhdUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vhdUri = mapped
    }

    /**
     * @param value Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to `false`.
     * The following properties apply when using Managed Disks:
     */
    @JvmName("bbbyuydtjwbvlgpy")
    public suspend fun writeAcceleratorEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.writeAcceleratorEnabled = mapped
    }

    internal fun build(): VirtualMachineStorageDataDiskArgs = VirtualMachineStorageDataDiskArgs(
        caching = caching,
        createOption = createOption ?: throw PulumiNullFieldException("createOption"),
        diskSizeGb = diskSizeGb,
        lun = lun ?: throw PulumiNullFieldException("lun"),
        managedDiskId = managedDiskId,
        managedDiskType = managedDiskType,
        name = name ?: throw PulumiNullFieldException("name"),
        vhdUri = vhdUri,
        writeAcceleratorEnabled = writeAcceleratorEnabled,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy