Class VirtualMachineScaleSetDataDisk

java.lang.Object
com.azure.resourcemanager.compute.models.VirtualMachineScaleSetDataDisk

public final class VirtualMachineScaleSetDataDisk extends Object
Describes a virtual machine scale set data disk.
  • Constructor Details

    • VirtualMachineScaleSetDataDisk

      public VirtualMachineScaleSetDataDisk()
      Creates an instance of VirtualMachineScaleSetDataDisk class.
  • Method Details

    • name

      public String name()
      Get the name property: The disk name.
      Returns:
      the name value.
    • withName

      public VirtualMachineScaleSetDataDisk withName(String name)
      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

      public VirtualMachineScaleSetDataDisk withLun(int lun)
      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

      public CachingTypes 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

      public VirtualMachineScaleSetDataDisk withCaching(CachingTypes caching)
      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

      public Boolean writeAcceleratorEnabled()
      Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.
      Returns:
      the writeAcceleratorEnabled value.
    • withWriteAcceleratorEnabled

      public VirtualMachineScaleSetDataDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled)
      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

      public DiskCreateOptionTypes createOption()
      Get the createOption property: The create option.
      Returns:
      the createOption value.
    • withCreateOption

      public VirtualMachineScaleSetDataDisk withCreateOption(DiskCreateOptionTypes createOption)
      Set the createOption property: The create option.
      Parameters:
      createOption - the createOption value to set.
      Returns:
      the VirtualMachineScaleSetDataDisk object itself.
    • diskSizeGB

      public Integer 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

      public VirtualMachineScaleSetDataDisk withDiskSizeGB(Integer diskSizeGB)
      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

      Set the managedDisk property: The managed disk parameters.
      Parameters:
      managedDisk - the managedDisk value to set.
      Returns:
      the VirtualMachineScaleSetDataDisk object itself.
    • diskIopsReadWrite

      public Long 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

      public VirtualMachineScaleSetDataDisk withDiskIopsReadWrite(Long diskIopsReadWrite)
      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

      public Long 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

      public VirtualMachineScaleSetDataDisk withDiskMBpsReadWrite(Long diskMBpsReadWrite)
      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

      public DiskDeleteOptionTypes 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

      public VirtualMachineScaleSetDataDisk 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**.
      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.