Class VirtualMachineScaleSetDataDisk
java.lang.Object
com.azure.resourcemanager.compute.models.VirtualMachineScaleSetDataDisk
Describes a virtual machine scale set data disk.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of VirtualMachineScaleSetDataDisk class. -
Method Summary
Modifier and TypeMethodDescriptioncaching()Get the caching property: Specifies the caching requirements.Get the createOption property: The create option.Get the deleteOption property: Specifies whether data disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).<br><br> Possible values: <br><br> **Delete** If this value is used, the data disk is deleted when the VMSS Flex VM is deleted.<br><br> **Detach** If this value is used, the data disk is retained after VMSS Flex VM is deleted.<br><br> The default value is set to **Delete**.Get the diskIopsReadWrite property: Specifies the Read-Write IOPS for the managed disk.Get the diskMBpsReadWrite property: Specifies the bandwidth in MB per second for the managed disk.Get the diskSizeGB property: Specifies the size of an empty data disk in gigabytes.intlun()Get the lun property: Specifies the logical unit number of the data disk.Get the managedDisk property: The managed disk parameters.name()Get the name property: The disk name.voidvalidate()Validates the instance.withCaching(CachingTypes caching) Set the caching property: Specifies the caching requirements.withCreateOption(DiskCreateOptionTypes createOption) Set the createOption property: The create option.withDeleteOption(DiskDeleteOptionTypes deleteOption) Set the deleteOption property: Specifies whether data disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).<br><br> Possible values: <br><br> **Delete** If this value is used, the data disk is deleted when the VMSS Flex VM is deleted.<br><br> **Detach** If this value is used, the data disk is retained after VMSS Flex VM is deleted.<br><br> The default value is set to **Delete**.withDiskIopsReadWrite(Long diskIopsReadWrite) Set the diskIopsReadWrite property: Specifies the Read-Write IOPS for the managed disk.withDiskMBpsReadWrite(Long diskMBpsReadWrite) Set the diskMBpsReadWrite property: Specifies the bandwidth in MB per second for the managed disk.withDiskSizeGB(Integer diskSizeGB) Set the diskSizeGB property: Specifies the size of an empty data disk in gigabytes.withLun(int lun) Set the lun property: Specifies the logical unit number of the data disk.Set the managedDisk property: The managed disk parameters.Set the name property: The disk name.withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.
-
Constructor Details
-
VirtualMachineScaleSetDataDisk
public VirtualMachineScaleSetDataDisk()Creates an instance of VirtualMachineScaleSetDataDisk class.
-
-
Method Details
-
name
Get the name property: The disk name.- Returns:
- the name value.
-
withName
Set the name property: The disk name.- Parameters:
name- the name value to set.- Returns:
- the VirtualMachineScaleSetDataDisk object itself.
-
lun
public int lun()Get the lun property: Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.- Returns:
- the lun value.
-
withLun
Set the lun property: Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.- Parameters:
lun- the lun value to set.- Returns:
- the VirtualMachineScaleSetDataDisk object itself.
-
caching
Get the caching property: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**.- Returns:
- the caching value.
-
withCaching
Set the caching property: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**.- Parameters:
caching- the caching value to set.- Returns:
- the VirtualMachineScaleSetDataDisk object itself.
-
writeAcceleratorEnabled
Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.- Returns:
- the writeAcceleratorEnabled value.
-
withWriteAcceleratorEnabled
Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.- Parameters:
writeAcceleratorEnabled- the writeAcceleratorEnabled value to set.- Returns:
- the VirtualMachineScaleSetDataDisk object itself.
-
createOption
Get the createOption property: The create option.- Returns:
- the createOption value.
-
withCreateOption
Set the createOption property: The create option.- Parameters:
createOption- the createOption value to set.- Returns:
- the VirtualMachineScaleSetDataDisk object itself.
-
diskSizeGB
Get the diskSizeGB property: 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.- Returns:
- the diskSizeGB value.
-
withDiskSizeGB
Set the diskSizeGB property: 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.- Parameters:
diskSizeGB- the diskSizeGB value to set.- Returns:
- the VirtualMachineScaleSetDataDisk object itself.
-
managedDisk
Get the managedDisk property: The managed disk parameters.- Returns:
- the managedDisk value.
-
withManagedDisk
public VirtualMachineScaleSetDataDisk withManagedDisk(VirtualMachineScaleSetManagedDiskParameters managedDisk) Set the managedDisk property: The managed disk parameters.- Parameters:
managedDisk- the managedDisk value to set.- Returns:
- the VirtualMachineScaleSetDataDisk object itself.
-
diskIopsReadWrite
Get the diskIopsReadWrite property: Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.- Returns:
- the diskIopsReadWrite value.
-
withDiskIopsReadWrite
Set the diskIopsReadWrite property: Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.- Parameters:
diskIopsReadWrite- the diskIopsReadWrite value to set.- Returns:
- the VirtualMachineScaleSetDataDisk object itself.
-
diskMBpsReadWrite
Get the diskMBpsReadWrite property: Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.- Returns:
- the diskMBpsReadWrite value.
-
withDiskMBpsReadWrite
Set the diskMBpsReadWrite property: Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.- Parameters:
diskMBpsReadWrite- the diskMBpsReadWrite value to set.- Returns:
- the VirtualMachineScaleSetDataDisk object itself.
-
deleteOption
Get the deleteOption property: Specifies whether data disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).<br><br> Possible values: <br><br> **Delete** If this value is used, the data disk is deleted when the VMSS Flex VM is deleted.<br><br> **Detach** If this value is used, the data disk is retained after VMSS Flex VM is deleted.<br><br> The default value is set to **Delete**.- Returns:
- the deleteOption value.
-
withDeleteOption
Set the deleteOption property: Specifies whether data disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).<br><br> Possible values: <br><br> **Delete** If this value is used, the data disk is deleted when the VMSS Flex VM is deleted.<br><br> **Detach** If this value is used, the data disk is retained after VMSS Flex VM is deleted.<br><br> The default value is set to **Delete**.- Parameters:
deleteOption- the deleteOption value to set.- Returns:
- the VirtualMachineScaleSetDataDisk object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-