com.pulumi.azure.compute.kotlin.outputs.VirtualMachineStorageOsDisk.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.compute.kotlin.outputs
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
/**
*
* @property caching Specifies the caching requirements for the OS Disk. Possible values include `None`, `ReadOnly` and `ReadWrite`.
* @property createOption Specifies how the OS Disk should be created. Possible values are `Attach` (managed disks only) and `FromImage`.
* @property diskSizeGb Specifies the size of the OS Disk in gigabytes.
* @property imageUri Specifies the Image URI in the format `publisherName:offer:skus:version`. This field can also specify the [VHD URI](https://docs.microsoft.com/azure/virtual-machines/linux/tutorial-custom-images) of a custom VM image to clone. When cloning a Custom (Unmanaged) Disk Image the `os_type` field must be set.
* @property managedDiskId Specifies the ID of an existing Managed Disk which should be attached as the OS Disk of this Virtual Machine. If this is set then the `create_option` must be set to `Attach`. Changing this forces a new resource to be created.
* @property managedDiskType Specifies the type of Managed Disk which should be created. Possible values are `Standard_LRS`, `StandardSSD_LRS` or `Premium_LRS`.
* The following properties apply when using Unmanaged Disks:
* @property name Specifies the name of the OS Disk.
* @property osType Specifies the Operating System on the OS Disk. Possible values are `Linux` and `Windows`.
* @property vhdUri Specifies the URI of the VHD file backing this Unmanaged OS Disk. Changing this forces a new resource to be created.
* @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 VirtualMachineStorageOsDisk(
public val caching: String? = null,
public val createOption: String,
public val diskSizeGb: Int? = null,
public val imageUri: String? = null,
public val managedDiskId: String? = null,
public val managedDiskType: String? = null,
public val name: String,
public val osType: String? = null,
public val vhdUri: String? = null,
public val writeAcceleratorEnabled: Boolean? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.azure.compute.outputs.VirtualMachineStorageOsDisk): VirtualMachineStorageOsDisk = VirtualMachineStorageOsDisk(
caching = javaType.caching().map({ args0 -> args0 }).orElse(null),
createOption = javaType.createOption(),
diskSizeGb = javaType.diskSizeGb().map({ args0 -> args0 }).orElse(null),
imageUri = javaType.imageUri().map({ args0 -> args0 }).orElse(null),
managedDiskId = javaType.managedDiskId().map({ args0 -> args0 }).orElse(null),
managedDiskType = javaType.managedDiskType().map({ args0 -> args0 }).orElse(null),
name = javaType.name(),
osType = javaType.osType().map({ args0 -> args0 }).orElse(null),
vhdUri = javaType.vhdUri().map({ args0 -> args0 }).orElse(null),
writeAcceleratorEnabled = javaType.writeAcceleratorEnabled().map({ args0 -> args0 }).orElse(null),
)
}
}