Class DataDisksToAttach
java.lang.Object
com.azure.resourcemanager.compute.models.DataDisksToAttach
Describes the data disk to be attached.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncaching()Get the caching property: Specifies the caching requirements.Get the deleteOption property: Specifies whether data disk should be deleted or detached upon VM deletion.Get the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed disk.diskId()Get the diskId property: ID of the managed data disk.lun()Get the lun property: The logical unit number of the data disk.voidvalidate()Validates the instance.withCaching(CachingTypes caching) Set the caching property: Specifies the caching requirements.withDeleteOption(DiskDeleteOptionTypes deleteOption) Set the deleteOption property: Specifies whether data disk should be deleted or detached upon VM deletion.withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet) Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed disk.withDiskId(String diskId) Set the diskId property: ID of the managed data disk.Set the lun property: The logical unit number of the data disk.withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.
-
Constructor Details
-
DataDisksToAttach
public DataDisksToAttach()Creates an instance of DataDisksToAttach class.
-
-
Method Details
-
diskId
Get the diskId property: ID of the managed data disk.- Returns:
- the diskId value.
-
withDiskId
Set the diskId property: ID of the managed data disk.- Parameters:
diskId- the diskId value to set.- Returns:
- the DataDisksToAttach object itself.
-
lun
Get the lun property: The logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. If not specified, lun would be auto assigned.- Returns:
- the lun value.
-
withLun
Set the lun property: The logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. If not specified, lun would be auto assigned.- Parameters:
lun- the lun value to set.- Returns:
- the DataDisksToAttach object itself.
-
caching
Get the caching property: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**.- Returns:
- the caching value.
-
withCaching
Set the caching property: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**.- Parameters:
caching- the caching value to set.- Returns:
- the DataDisksToAttach object itself.
-
deleteOption
Get the deleteOption property: Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**.- Returns:
- the deleteOption value.
-
withDeleteOption
Set the deleteOption property: Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**.- Parameters:
deleteOption- the deleteOption value to set.- Returns:
- the DataDisksToAttach object itself.
-
diskEncryptionSet
Get the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed disk.- Returns:
- the diskEncryptionSet value.
-
withDiskEncryptionSet
Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed disk.- Parameters:
diskEncryptionSet- the diskEncryptionSet value to set.- Returns:
- the DataDisksToAttach object itself.
-
writeAcceleratorEnabled
Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.- Returns:
- the writeAcceleratorEnabled value.
-
withWriteAcceleratorEnabled
Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.- Parameters:
writeAcceleratorEnabled- the writeAcceleratorEnabled value to set.- Returns:
- the DataDisksToAttach object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-