Class DataDisk

java.lang.Object
com.azure.compute.batch.models.DataDisk
All Implemented Interfaces:
com.azure.json.JsonSerializable<DataDisk>

public final class DataDisk extends Object implements com.azure.json.JsonSerializable<DataDisk>
Settings which will be used by the data disks associated to Compute Nodes in the Pool. When using attached data disks, you need to mount and format the disks from within a VM to use them.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DataDisk(int logicalUnitNumber, int diskSizeGb)
    Creates an instance of DataDisk class.
  • Method Summary

    Modifier and Type
    Method
    Description
    static DataDisk
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of DataDisk from the JsonReader.
    Get the caching property: The type of caching to be enabled for the data disks.
    int
    Get the diskSizeGb property: The initial disk size in gigabytes.
    int
    Get the logicalUnitNumber property: The logical unit number.
    Get the storageAccountType property: The storage Account type to be used for the data disk.
    Set the caching property: The type of caching to be enabled for the data disks.
    Set the storageAccountType property: The storage Account type to be used for the data disk.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • DataDisk

      public DataDisk(int logicalUnitNumber, int diskSizeGb)
      Creates an instance of DataDisk class.
      Parameters:
      logicalUnitNumber - the logicalUnitNumber value to set.
      diskSizeGb - the diskSizeGb value to set.
  • Method Details

    • getLogicalUnitNumber

      public int getLogicalUnitNumber()
      Get the logicalUnitNumber property: The logical unit number. The logicalUnitNumber is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct logicalUnitNumber. The value must be between 0 and 63, inclusive.
      Returns:
      the logicalUnitNumber value.
    • getCaching

      public CachingType getCaching()
      Get the caching property: The type of caching to be enabled for the data disks. The default value for caching is readwrite. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/.
      Returns:
      the caching value.
    • setCaching

      public DataDisk setCaching(CachingType caching)
      Set the caching property: The type of caching to be enabled for the data disks. The default value for caching is readwrite. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/.
      Parameters:
      caching - the caching value to set.
      Returns:
      the DataDisk object itself.
    • getDiskSizeGb

      public int getDiskSizeGb()
      Get the diskSizeGb property: The initial disk size in gigabytes.
      Returns:
      the diskSizeGb value.
    • getStorageAccountType

      public StorageAccountType getStorageAccountType()
      Get the storageAccountType property: The storage Account type to be used for the data disk. If omitted, the default is "standard_lrs".
      Returns:
      the storageAccountType value.
    • setStorageAccountType

      public DataDisk setStorageAccountType(StorageAccountType storageAccountType)
      Set the storageAccountType property: The storage Account type to be used for the data disk. If omitted, the default is "standard_lrs".
      Parameters:
      storageAccountType - the storageAccountType value to set.
      Returns:
      the DataDisk object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<DataDisk>
      Throws:
      IOException
    • fromJson

      public static DataDisk fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of DataDisk from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of DataDisk if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the DataDisk.