DataDisk Class

  • java.lang.Object
    • com.azure.resourcemanager.batch.models.DataDisk

Implements

public final class DataDisk
implements 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

Constructor Description
DataDisk()

Creates an instance of DataDisk class.

Method Summary

Modifier and Type Method and Description
CachingType caching()

Get the caching property: The type of caching to enable for the disk.

int diskSizeGB()

Get the diskSizeGB property: The initial disk size in GB when creating new data disk.

static DataDisk fromJson(JsonReader jsonReader)

Reads an instance of DataDisk from the JsonReader.

int lun()

Get the lun property: The logical unit number.

ManagedDisk managedDisk()

Get the managedDisk property: The managed disk parameters.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

DataDisk withCaching(CachingType caching)

Set the caching property: The type of caching to enable for the disk.

DataDisk withDiskSizeGB(int diskSizeGB)

Set the diskSizeGB property: The initial disk size in GB when creating new data disk.

DataDisk withLun(int lun)

Set the lun property: The logical unit number.

DataDisk withManagedDisk(ManagedDisk managedDisk)

Set the managedDisk property: The managed disk parameters.

Methods inherited from java.lang.Object

Constructor Details

DataDisk

public DataDisk()

Creates an instance of DataDisk class.

Method Details

caching

public CachingType caching()

Get the caching property: The type of caching to enable for the disk. Values are: none - The caching mode for the disk is not enabled. readOnly - The caching mode for the disk is read only. readWrite - The caching mode for the disk is read and write. The default value for caching is none. 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.

diskSizeGB

public int diskSizeGB()

Get the diskSizeGB property: The initial disk size in GB when creating new data disk.

Returns:

the diskSizeGB value.

fromJson

public static DataDisk fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

lun

public int lun()

Get the lun property: The logical unit number. The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. The value must be between 0 and 63, inclusive.

Returns:

the lun value.

managedDisk

public ManagedDisk managedDisk()

Get the managedDisk property: The managed disk parameters.

Returns:

the managedDisk value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCaching

public DataDisk withCaching(CachingType caching)

Set the caching property: The type of caching to enable for the disk. Values are: none - The caching mode for the disk is not enabled. readOnly - The caching mode for the disk is read only. readWrite - The caching mode for the disk is read and write. The default value for caching is none. 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.

withDiskSizeGB

public DataDisk withDiskSizeGB(int diskSizeGB)

Set the diskSizeGB property: The initial disk size in GB when creating new data disk.

Parameters:

diskSizeGB - the diskSizeGB value to set.

Returns:

the DataDisk object itself.

withLun

public DataDisk withLun(int lun)

Set the lun property: The logical unit number. The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. The value must be between 0 and 63, inclusive.

Parameters:

lun - the lun value to set.

Returns:

the DataDisk object itself.

withManagedDisk

public DataDisk withManagedDisk(ManagedDisk managedDisk)

Set the managedDisk property: The managed disk parameters.

Parameters:

managedDisk - the managedDisk value to set.

Returns:

the DataDisk object itself.

Applies to