IVirtualMachineDiskOperations.CreateDataDiskAsync Method

Asynchronously adds a data disk to a Virtual Machine.

Namespace: Microsoft.WindowsAzure.Management.Compute
Assembly: Microsoft.WindowsAzure.Management.Compute (in Microsoft.WindowsAzure.Management.Compute.dll)

Dim instance As IVirtualMachineDiskOperations
Dim serviceName As String
Dim deploymentName As String
Dim roleName As String
Dim parameters As VirtualMachineDiskCreateDataDiskParameters
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of OperationResponse)

returnValue = instance.CreateDataDiskAsync(serviceName, deploymentName, roleName, parameters, cancellationToken)

Task<OperationResponse> CreateDataDiskAsync (
	string serviceName,
	string deploymentName,
	string roleName,
	VirtualMachineDiskCreateDataDiskParameters parameters,
	CancellationToken cancellationToken
Task<OperationResponse> CreateDataDiskAsync (
	String serviceName, 
	String deploymentName, 
	String roleName, 
	VirtualMachineDiskCreateDataDiskParameters parameters, 
	CancellationToken cancellationToken
function CreateDataDiskAsync (
	serviceName : String, 
	deploymentName : String, 
	roleName : String, 
	parameters : VirtualMachineDiskCreateDataDiskParameters, 
	cancellationToken : CancellationToken
) : Task<OperationResponse>



The name of the cloud service that contains the Virtual Machine.


The name of the deployment.


The name of the Virtual Machine to which the data disk should be added.


The VirtualMachineDiskCreateDataDiskParameters object that contains the parameters that are used to add a data disk to a Virtual Machine.


The cancellation token.

Return Value

An OperationResponse object that includes an HTTP status code and request ID.

For more information about adding a data disk, see the following resources:

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms