Share via


VirtualMachineDiskOperationsExtensions.DeleteDisk Method

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 operations As IVirtualMachineDiskOperations
Dim name As String
Dim deleteFromStorage As Boolean
Dim returnValue As AzureOperationResponse

returnValue = VirtualMachineDiskOperationsExtensions.DeleteDisk(operations, name, deleteFromStorage)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function DeleteDisk ( _
    operations As IVirtualMachineDiskOperations, _
    name As String, _
    deleteFromStorage As Boolean _
) As AzureOperationResponse
[ExtensionAttribute] 
public static AzureOperationResponse DeleteDisk (
    IVirtualMachineDiskOperations operations,
    string name,
    bool deleteFromStorage
)
[ExtensionAttribute] 
public:
static AzureOperationResponse^ DeleteDisk (
    IVirtualMachineDiskOperations^ operations, 
    String^ name, 
    bool deleteFromStorage
)
/** @attribute ExtensionAttribute() */ 
public static AzureOperationResponse DeleteDisk (
    IVirtualMachineDiskOperations operations, 
    String name, 
    boolean deleteFromStorage
)
ExtensionAttribute 
public static function DeleteDisk (
    operations : IVirtualMachineDiskOperations, 
    name : String, 
    deleteFromStorage : boolean
) : 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.

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

VirtualMachineDiskOperationsExtensions Class
VirtualMachineDiskOperationsExtensions Members
Microsoft.WindowsAzure.Management.Compute Namespace