Class DataDisk
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncaching()
Get the caching property: The type of caching to enable for the disk.int
Get the diskSizeGB property: The initial disk size in GB when creating new data disk.int
lun()
Get the lun property: The logical unit number.Get the storageAccountType property: The storage account type for use in creating data disks.void
validate()
Validates the instance.withCaching
(CachingType caching) Set the caching property: The type of caching to enable for the disk.withDiskSizeGB
(int diskSizeGB) Set the diskSizeGB property: The initial disk size in GB when creating new data disk.withLun
(int lun) Set the lun property: The logical unit number.withStorageAccountType
(StorageAccountType storageAccountType) Set the storageAccountType property: The storage account type for use in creating data disks.
-
Constructor Details
-
DataDisk
public DataDisk()Creates an instance of DataDisk class.
-
-
Method Details
-
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.
-
withLun
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.
-
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.
-
withCaching
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.
-
diskSizeGB
public int diskSizeGB()Get the diskSizeGB property: The initial disk size in GB when creating new data disk.- Returns:
- the diskSizeGB value.
-
withDiskSizeGB
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.
-
storageAccountType
Get the storageAccountType property: The storage account type for use in creating data disks.If omitted, the default is "Standard_LRS". Values are:
Standard_LRS - The data disk should use standard locally redundant storage. Premium_LRS - The data disk should use premium locally redundant storage.
- Returns:
- the storageAccountType value.
-
withStorageAccountType
Set the storageAccountType property: The storage account type for use in creating data disks.If omitted, the default is "Standard_LRS". Values are:
Standard_LRS - The data disk should use standard locally redundant storage. Premium_LRS - The data disk should use premium locally redundant storage.
- Parameters:
storageAccountType
- the storageAccountType value to set.- Returns:
- the DataDisk object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-