VirtualMachineDiskOperationsExtensions.DeleteDiskAsync Method (IVirtualMachineDiskOperations, String, Boolean)
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
public static Task<AzureOperationResponse> DeleteDiskAsync(
this IVirtualMachineDiskOperations operations,
string name,
bool deleteFromStorage
)
public:
[ExtensionAttribute]
static Task<AzureOperationResponse^>^ DeleteDiskAsync(
IVirtualMachineDiskOperations^ operations,
String^ name,
bool deleteFromStorage
)
static member DeleteDiskAsync :
operations:IVirtualMachineDiskOperations *
name:string *
deleteFromStorage:bool -> Task<AzureOperationResponse>
<ExtensionAttribute>
Public Shared Function DeleteDiskAsync (
operations As IVirtualMachineDiskOperations,
name As String,
deleteFromStorage As Boolean
) As Task(Of AzureOperationResponse)
Parameters
operations
Type: Microsoft.WindowsAzure.Management.Compute.IVirtualMachineDiskOperationsThe IVirtualMachineDiskOperations object that specifies the Virtual Machine disk operations.
- diskName
The name of the disk to delete.
deleteFromStorage
Type: System.BooleanIndicates 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
VirtualMachineDiskOperationsExtensions Class
Microsoft.WindowsAzure.Management.Compute Namespace
Return to top