IVirtualMachineImageOperations.DeleteAsync Method

Asynchronously deletes the specified operating system image from the user image repository.

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

Dim instance As IVirtualMachineImageOperations
Dim imageName As String
Dim deleteFromStorage As Boolean
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of OperationResponse)

returnValue = instance.DeleteAsync(imageName, deleteFromStorage, cancellationToken)

Task<OperationResponse> DeleteAsync (
	string imageName,
	bool deleteFromStorage,
	CancellationToken cancellationToken
Task<OperationResponse> DeleteAsync (
	String imageName, 
	boolean deleteFromStorage, 
	CancellationToken cancellationToken
function DeleteAsync (
	imageName : String, 
	deleteFromStorage : boolean, 
	cancellationToken : CancellationToken
) : Task<OperationResponse>



The name of the image to delete.


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


The cancellation token.

Return Value

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

For more information about deleting images, 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