Share via


IVirtualMachineDiskOperations.DeleteDiskAsync Method (String, Boolean, CancellationToken)

 

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)

Syntax

Task<AzureOperationResponse> DeleteDiskAsync(
    string name,
    bool deleteFromStorage,
    CancellationToken cancellationToken
)
Task<AzureOperationResponse^>^ DeleteDiskAsync(
    String^ name,
    bool deleteFromStorage,
    CancellationToken cancellationToken
)
abstract DeleteDiskAsync : 
        name:string *
        deleteFromStorage:bool *
        cancellationToken:CancellationToken -> Task<AzureOperationResponse>
Function DeleteDiskAsync (
    name As String,
    deleteFromStorage As Boolean,
    cancellationToken As CancellationToken
) As Task(Of AzureOperationResponse)

Parameters

  • diskName
    The name of the disk to delete.
  • deleteFromStorage
    Type: System.Boolean

    Indicates whether the source blob for the disk should also be deleted from storage. true if the source blob should be deleted; otherwise, false.

Return Value

Type: System.Threading.Tasks.Task<AzureOperationResponse>

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

Remarks

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

See Also

IVirtualMachineDiskOperations Interface
Microsoft.WindowsAzure.Management.Compute Namespace

Return to top