Share via


DataDisk Class

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

Implements

public final class DataDisk
implements JsonSerializable<DataDisk>

The data disk of the VMSS.

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 be enabled for the data disks.

Integer diskSizeGiB()

Get the diskSizeGiB property: The initial disk size in gigabytes.

String driveLetter()

Get the driveLetter property: The drive letter for the empty data disk.

static DataDisk fromJson(JsonReader jsonReader)

Reads an instance of DataDisk from the JsonReader.

StorageAccountType storageAccountType()

Get the storageAccountType property: The storage Account type to be used for the data disk.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

DataDisk withCaching(CachingType caching)

Set the caching property: The type of caching to be enabled for the data disks.

DataDisk withDiskSizeGiB(Integer diskSizeGiB)

Set the diskSizeGiB property: The initial disk size in gigabytes.

DataDisk withDriveLetter(String driveLetter)

Set the driveLetter property: The drive letter for the empty data disk.

DataDisk withStorageAccountType(StorageAccountType storageAccountType)

Set the storageAccountType property: The storage Account type to be used for the data disk.

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 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.

diskSizeGiB

public Integer diskSizeGiB()

Get the diskSizeGiB property: The initial disk size in gigabytes.

Returns:

the diskSizeGiB value.

driveLetter

public String driveLetter()

Get the driveLetter property: The drive letter for the empty data disk. If not specified, it will be the first available letter.

Returns:

the driveLetter 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 an error occurs while reading the DataDisk.

storageAccountType

public StorageAccountType storageAccountType()

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.

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 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.

withDiskSizeGiB

public DataDisk withDiskSizeGiB(Integer diskSizeGiB)

Set the diskSizeGiB property: The initial disk size in gigabytes.

Parameters:

diskSizeGiB - the diskSizeGiB value to set.

Returns:

the DataDisk object itself.

withDriveLetter

public DataDisk withDriveLetter(String driveLetter)

Set the driveLetter property: The drive letter for the empty data disk. If not specified, it will be the first available letter.

Parameters:

driveLetter - the driveLetter value to set.

Returns:

the DataDisk object itself.

withStorageAccountType

public DataDisk withStorageAccountType(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.

Applies to