DataDisk interface
Describes a data disk.
Properties
| caching | Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The defaulting behavior is: None for Standard storage. ReadOnly for Premium storage. |
| create |
Specifies how the virtual machine disk should be created. Possible values are Attach, FromImage, Empty, Copy, Restore. |
| delete |
Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: Delete, Detach. The default value is set to Detach. |
| detach |
Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: ForceDetach. This feature is still in preview. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. |
| disk |
Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. |
| image | The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. |
| lun | Specifies 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. |
| managed |
The managed disk parameters. |
| name | The disk name. |
| source |
The source resource identifier. It can be a snapshot, or disk restore point from which to create a disk. |
| to |
Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset. |
| vhd | The virtual hard disk. |
| write |
Specifies whether writeAccelerator should be enabled or disabled on the disk. |
Property Details
caching
Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The defaulting behavior is: None for Standard storage. ReadOnly for Premium storage.
caching?: string
Property Value
string
createOption
Specifies how the virtual machine disk should be created. Possible values are Attach, FromImage, Empty, Copy, Restore.
createOption: string
Property Value
string
deleteOption
Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: Delete, Detach. The default value is set to Detach.
deleteOption?: string
Property Value
string
detachOption
Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: ForceDetach. This feature is still in preview. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'.
detachOption?: string
Property Value
string
diskSizeGB
Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.
diskSizeGB?: number
Property Value
number
image
The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
image?: VirtualHardDisk
Property Value
lun
Specifies 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.
lun: number
Property Value
number
managedDisk
The managed disk parameters.
managedDisk?: ManagedDiskParameters
Property Value
name
The disk name.
name?: string
Property Value
string
sourceResource
The source resource identifier. It can be a snapshot, or disk restore point from which to create a disk.
sourceResource?: ApiEntityReference
Property Value
toBeDetached
Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset.
toBeDetached?: boolean
Property Value
boolean
vhd
writeAcceleratorEnabled
Specifies whether writeAccelerator should be enabled or disabled on the disk.
writeAcceleratorEnabled?: boolean
Property Value
boolean