java.lang.Object
com.azure.resourcemanager.hybridnetwork.models.DataDisk

public final class DataDisk extends Object
Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
  • Constructor Details

    • DataDisk

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

    • createOption

      public DiskCreateOptionTypes createOption()
      Get the createOption property: Specifies how the virtual machine should be created.
      Returns:
      the createOption value.
    • withCreateOption

      public DataDisk withCreateOption(DiskCreateOptionTypes createOption)
      Set the createOption property: Specifies how the virtual machine should be created.
      Parameters:
      createOption - the createOption value to set.
      Returns:
      the DataDisk object itself.
    • name

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

      public DataDisk withName(String name)
      Set the name property: The name of data disk.
      Parameters:
      name - the name value to set.
      Returns:
      the DataDisk object itself.
    • diskSizeGB

      public Integer diskSizeGB()
      Get the diskSizeGB property: Specifies the size of an empty disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
      Returns:
      the diskSizeGB value.
    • withDiskSizeGB

      public DataDisk withDiskSizeGB(Integer diskSizeGB)
      Set the diskSizeGB property: Specifies the size of an empty disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
      Parameters:
      diskSizeGB - the diskSizeGB value to set.
      Returns:
      the DataDisk object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.