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

com.pulumi.azurenative.compute.kotlin.inputs.VirtualMachineScaleSetOSDiskArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.compute.kotlin.inputs

import com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs.builder
import com.pulumi.azurenative.compute.kotlin.enums.CachingTypes
import com.pulumi.azurenative.compute.kotlin.enums.DiskCreateOptionTypes
import com.pulumi.azurenative.compute.kotlin.enums.DiskDeleteOptionTypes
import com.pulumi.azurenative.compute.kotlin.enums.OperatingSystemTypes
import com.pulumi.core.Either
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 com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Describes a virtual machine scale set operating system disk.
 * @property caching Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**
 * @property createOption Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you  also use the plan element previously described.
 * @property deleteOption Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only). 

Possible values:

**Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.

**Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.

The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk. * @property diffDiskSettings Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set. * @property diskSizeGB Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. * @property image Specifies information about the unmanaged user image to base the scale set on. * @property managedDisk The managed disk parameters. * @property name The disk name. * @property osType This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.** * @property vhdContainers Specifies the container urls that are used to store operating system disks for the scale set. * @property writeAcceleratorEnabled Specifies whether writeAccelerator should be enabled or disabled on the disk. */ public data class VirtualMachineScaleSetOSDiskArgs( public val caching: Output? = null, public val createOption: Output>, public val deleteOption: Output>? = null, public val diffDiskSettings: Output? = null, public val diskSizeGB: Output? = null, public val image: Output? = null, public val managedDisk: Output? = null, public val name: Output? = null, public val osType: Output? = null, public val vhdContainers: Output>? = null, public val writeAcceleratorEnabled: Output? = null, ) : ConvertibleToJava { override fun toJava(): com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs = com.pulumi.azurenative.compute.inputs.VirtualMachineScaleSetOSDiskArgs.builder() .caching(caching?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })) .createOption( createOption.applyValue({ args0 -> args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) }) }), ) .deleteOption( deleteOption?.applyValue({ args0 -> args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) }) }), ) .diffDiskSettings(diffDiskSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })) .diskSizeGB(diskSizeGB?.applyValue({ args0 -> args0 })) .image(image?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })) .managedDisk(managedDisk?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })) .name(name?.applyValue({ args0 -> args0 })) .osType(osType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })) .vhdContainers(vhdContainers?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })) .writeAcceleratorEnabled(writeAcceleratorEnabled?.applyValue({ args0 -> args0 })).build() } /** * Builder for [VirtualMachineScaleSetOSDiskArgs]. */ @PulumiTagMarker public class VirtualMachineScaleSetOSDiskArgsBuilder internal constructor() { private var caching: Output? = null private var createOption: Output>? = null private var deleteOption: Output>? = null private var diffDiskSettings: Output? = null private var diskSizeGB: Output? = null private var image: Output? = null private var managedDisk: Output? = null private var name: Output? = null private var osType: Output? = null private var vhdContainers: Output>? = null private var writeAcceleratorEnabled: Output? = null /** * @param value Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.** */ @JvmName("oeaistdriwmwylta") public suspend fun caching(`value`: Output) { this.caching = value } /** * @param value Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. */ @JvmName("blhjkbanpmgqnbus") public suspend fun createOption(`value`: Output>) { this.createOption = value } /** * @param value Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

Possible values:

**Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.

**Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.

The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk. */ @JvmName("tuppdcnmnkdlnioe") public suspend fun deleteOption(`value`: Output>) { this.deleteOption = value } /** * @param value Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set. */ @JvmName("nkenrwwlmxuefswl") public suspend fun diffDiskSettings(`value`: Output) { this.diffDiskSettings = value } /** * @param value Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. */ @JvmName("vgrykpqjxlqmxpyd") public suspend fun diskSizeGB(`value`: Output) { this.diskSizeGB = value } /** * @param value Specifies information about the unmanaged user image to base the scale set on. */ @JvmName("vovjdbhpnxsimypc") public suspend fun image(`value`: Output) { this.image = value } /** * @param value The managed disk parameters. */ @JvmName("akmjwllivomvcmny") public suspend fun managedDisk(`value`: Output) { this.managedDisk = value } /** * @param value The disk name. */ @JvmName("jqildmfvrmlyhpyx") public suspend fun name(`value`: Output) { this.name = value } /** * @param value This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.** */ @JvmName("lfqajgbqqknllqsm") public suspend fun osType(`value`: Output) { this.osType = value } /** * @param value Specifies the container urls that are used to store operating system disks for the scale set. */ @JvmName("quwyjvwiwhkitiny") public suspend fun vhdContainers(`value`: Output>) { this.vhdContainers = value } @JvmName("grtdlfvrrgdqolph") public suspend fun vhdContainers(vararg values: Output) { this.vhdContainers = Output.all(values.asList()) } /** * @param values Specifies the container urls that are used to store operating system disks for the scale set. */ @JvmName("wuticykfcnpkidom") public suspend fun vhdContainers(values: List>) { this.vhdContainers = Output.all(values) } /** * @param value Specifies whether writeAccelerator should be enabled or disabled on the disk. */ @JvmName("xbgvpdypyhcxtmgt") public suspend fun writeAcceleratorEnabled(`value`: Output) { this.writeAcceleratorEnabled = value } /** * @param value Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.** */ @JvmName("xdivhikwjbhrvedx") public suspend fun caching(`value`: CachingTypes?) { val toBeMapped = value val mapped = toBeMapped?.let({ args0 -> of(args0) }) this.caching = mapped } /** * @param value Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. */ @JvmName("dshthexdtlilswba") public suspend fun createOption(`value`: Either) { val toBeMapped = value val mapped = toBeMapped.let({ args0 -> of(args0) }) this.createOption = mapped } /** * @param value Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. */ @JvmName("fngtdfdjvpoqfeac") public fun createOption(`value`: String) { val toBeMapped = Either.ofLeft(value) val mapped = toBeMapped.let({ args0 -> of(args0) }) this.createOption = mapped } /** * @param value Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. */ @JvmName("mfgxjrwcxjowdawk") public fun createOption(`value`: DiskCreateOptionTypes) { val toBeMapped = Either.ofRight(value) val mapped = toBeMapped.let({ args0 -> of(args0) }) this.createOption = mapped } /** * @param value Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

Possible values:

**Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.

**Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.

The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk. */ @JvmName("ycwdjiwetwkrccuv") public suspend fun deleteOption(`value`: Either?) { val toBeMapped = value val mapped = toBeMapped?.let({ args0 -> of(args0) }) this.deleteOption = mapped } /** * @param value Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

Possible values:

**Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.

**Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.

The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk. */ @JvmName("vuypiqugtxvixyte") public fun deleteOption(`value`: String) { val toBeMapped = Either.ofLeft(value) val mapped = toBeMapped.let({ args0 -> of(args0) }) this.deleteOption = mapped } /** * @param value Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

Possible values:

**Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.

**Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.

The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk. */ @JvmName("cunybjtrwynyiexa") public fun deleteOption(`value`: DiskDeleteOptionTypes) { val toBeMapped = Either.ofRight(value) val mapped = toBeMapped.let({ args0 -> of(args0) }) this.deleteOption = mapped } /** * @param value Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set. */ @JvmName("dysymytfswrdxhjj") public suspend fun diffDiskSettings(`value`: DiffDiskSettingsArgs?) { val toBeMapped = value val mapped = toBeMapped?.let({ args0 -> of(args0) }) this.diffDiskSettings = mapped } /** * @param argument Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set. */ @JvmName("komktrovbesjtmky") public suspend fun diffDiskSettings(argument: suspend DiffDiskSettingsArgsBuilder.() -> Unit) { val toBeMapped = DiffDiskSettingsArgsBuilder().applySuspend { argument() }.build() val mapped = of(toBeMapped) this.diffDiskSettings = mapped } /** * @param value Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. */ @JvmName("opsvuiawbpldypgy") public suspend fun diskSizeGB(`value`: Int?) { val toBeMapped = value val mapped = toBeMapped?.let({ args0 -> of(args0) }) this.diskSizeGB = mapped } /** * @param value Specifies information about the unmanaged user image to base the scale set on. */ @JvmName("dyijlebbrbsuccwx") public suspend fun image(`value`: VirtualHardDiskArgs?) { val toBeMapped = value val mapped = toBeMapped?.let({ args0 -> of(args0) }) this.image = mapped } /** * @param argument Specifies information about the unmanaged user image to base the scale set on. */ @JvmName("efobqympqcqyfpkd") public suspend fun image(argument: suspend VirtualHardDiskArgsBuilder.() -> Unit) { val toBeMapped = VirtualHardDiskArgsBuilder().applySuspend { argument() }.build() val mapped = of(toBeMapped) this.image = mapped } /** * @param value The managed disk parameters. */ @JvmName("eeheudgomxnqnomw") public suspend fun managedDisk(`value`: VirtualMachineScaleSetManagedDiskParametersArgs?) { val toBeMapped = value val mapped = toBeMapped?.let({ args0 -> of(args0) }) this.managedDisk = mapped } /** * @param argument The managed disk parameters. */ @JvmName("queacrwwgxsquygm") public suspend fun managedDisk(argument: suspend VirtualMachineScaleSetManagedDiskParametersArgsBuilder.() -> Unit) { val toBeMapped = VirtualMachineScaleSetManagedDiskParametersArgsBuilder().applySuspend { argument() }.build() val mapped = of(toBeMapped) this.managedDisk = mapped } /** * @param value The disk name. */ @JvmName("wcmxkmbbwldpndlo") public suspend fun name(`value`: String?) { val toBeMapped = value val mapped = toBeMapped?.let({ args0 -> of(args0) }) this.name = mapped } /** * @param value This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.** */ @JvmName("ueccundgqknawvad") public suspend fun osType(`value`: OperatingSystemTypes?) { val toBeMapped = value val mapped = toBeMapped?.let({ args0 -> of(args0) }) this.osType = mapped } /** * @param value Specifies the container urls that are used to store operating system disks for the scale set. */ @JvmName("waqymyflfbclpjfa") public suspend fun vhdContainers(`value`: List?) { val toBeMapped = value val mapped = toBeMapped?.let({ args0 -> of(args0) }) this.vhdContainers = mapped } /** * @param values Specifies the container urls that are used to store operating system disks for the scale set. */ @JvmName("ylbkyajarvtqdmod") public suspend fun vhdContainers(vararg values: String) { val toBeMapped = values.toList() val mapped = toBeMapped.let({ args0 -> of(args0) }) this.vhdContainers = mapped } /** * @param value Specifies whether writeAccelerator should be enabled or disabled on the disk. */ @JvmName("rmagqoatmonyxjwd") public suspend fun writeAcceleratorEnabled(`value`: Boolean?) { val toBeMapped = value val mapped = toBeMapped?.let({ args0 -> of(args0) }) this.writeAcceleratorEnabled = mapped } internal fun build(): VirtualMachineScaleSetOSDiskArgs = VirtualMachineScaleSetOSDiskArgs( caching = caching, createOption = createOption ?: throw PulumiNullFieldException("createOption"), deleteOption = deleteOption, diffDiskSettings = diffDiskSettings, diskSizeGB = diskSizeGB, image = image, managedDisk = managedDisk, name = name, osType = osType, vhdContainers = vhdContainers, writeAcceleratorEnabled = writeAcceleratorEnabled, ) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy