ArmComputeBulkActionsModelFactory.DataDisk Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public static Azure.ResourceManager.Compute.BulkActions.Models.DataDisk DataDisk(int lun = 0, string name = default, string vhdUri = default, string imageUri = default, Azure.ResourceManager.Compute.BulkActions.Models.CachingTypes? caching = default, bool? isWriteAcceleratorEnabled = default, Azure.ResourceManager.Compute.BulkActions.Models.DiskCreateOptionTypes createOption = default, int? diskSizeGB = default, Azure.ResourceManager.Compute.BulkActions.Models.ManagedDiskParametersContent managedDisk = default, string sourceResourceId = default, bool? isToBeDetached = default, Azure.ResourceManager.Compute.BulkActions.Models.DiskDetachOptionTypes? detachOption = default, Azure.ResourceManager.Compute.BulkActions.Models.DiskDeleteOptionTypes? deleteOption = default);
static member DataDisk : int * string * string * string * Nullable<Azure.ResourceManager.Compute.BulkActions.Models.CachingTypes> * Nullable<bool> * Azure.ResourceManager.Compute.BulkActions.Models.DiskCreateOptionTypes * Nullable<int> * Azure.ResourceManager.Compute.BulkActions.Models.ManagedDiskParametersContent * string * Nullable<bool> * Nullable<Azure.ResourceManager.Compute.BulkActions.Models.DiskDetachOptionTypes> * Nullable<Azure.ResourceManager.Compute.BulkActions.Models.DiskDeleteOptionTypes> -> Azure.ResourceManager.Compute.BulkActions.Models.DataDisk
Public Shared Function DataDisk (Optional lun As Integer = 0, Optional name As String = Nothing, Optional vhdUri As String = Nothing, Optional imageUri As String = Nothing, Optional caching As Nullable(Of CachingTypes) = Nothing, Optional isWriteAcceleratorEnabled As Nullable(Of Boolean) = Nothing, Optional createOption As DiskCreateOptionTypes = Nothing, Optional diskSizeGB As Nullable(Of Integer) = Nothing, Optional managedDisk As ManagedDiskParametersContent = Nothing, Optional sourceResourceId As String = Nothing, Optional isToBeDetached As Nullable(Of Boolean) = Nothing, Optional detachOption As Nullable(Of DiskDetachOptionTypes) = Nothing, Optional deleteOption As Nullable(Of DiskDeleteOptionTypes) = Nothing) As DataDisk
Parameters
- lun
- Int32
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.
- name
- String
The disk name.
- vhdUri
- String
Specifies the virtual hard disk's uri.
- imageUri
- String
Specifies the virtual hard disk's uri.
- caching
- Nullable<CachingTypes>
Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The defaulting behavior is: None for Standard storage. ReadOnly for Premium storage.
Specifies whether writeAccelerator should be enabled or disabled on the disk.
- createOption
- DiskCreateOptionTypes
Specifies how the virtual machine disk should be created. Possible values are Attach, FromImage, Empty, Copy, Restore.
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.
- managedDisk
- ManagedDiskParametersContent
The managed disk parameters.
- sourceResourceId
- String
The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset.
- detachOption
- Nullable<DiskDetachOptionTypes>
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'.
- deleteOption
- Nullable<DiskDeleteOptionTypes>
Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: Delete, Detach. The default value is set to Detach.
Returns
A new DataDisk instance for mocking.