Share via


IVirtualMachineDiskOperations.DeleteDiskAsync Method

Asynchronously deletes the specified data or operating system disk from the user disk repository.

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

Usage

'Usage
Dim instance As IVirtualMachineDiskOperations
Dim name As String
Dim deleteFromStorage As Boolean
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of AzureOperationResponse)

returnValue = instance.DeleteDiskAsync(name, deleteFromStorage, cancellationToken)

Syntax

'Declaration
Function DeleteDiskAsync ( _
    name As String, _
    deleteFromStorage As Boolean, _
    cancellationToken As CancellationToken _
) As Task(Of AzureOperationResponse)
Task<AzureOperationResponse> DeleteDiskAsync (
    string name,
    bool deleteFromStorage,
    CancellationToken cancellationToken
)
Task<AzureOperationResponse^>^ DeleteDiskAsync (
    String^ name, 
    bool deleteFromStorage, 
    CancellationToken cancellationToken
)
Task<AzureOperationResponse> DeleteDiskAsync (
    String name, 
    boolean deleteFromStorage, 
    CancellationToken cancellationToken
)
function DeleteDiskAsync (
    name : String, 
    deleteFromStorage : boolean, 
    cancellationToken : CancellationToken
) : Task<AzureOperationResponse>

Parameters

  • diskName
    The name of the disk to delete.
  • deleteFromStorage
    Indicates whether the source blob for the disk should also be deleted from storage. true if the source blob should be deleted; otherwise, false.
  • cancellationToken
    The cancellation token.

Return Value

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

Remarks

For more information about deleting disks, see the following resources:

Thread Safety

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

Platforms

Development Platforms

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

Target Platforms

See Also

Reference

IVirtualMachineDiskOperations Interface
IVirtualMachineDiskOperations Members
Microsoft.WindowsAzure.Management.Compute Namespace