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)
Usage
'Usage
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)
Syntax
'Declaration
Function DeleteAsync ( _
imageName As String, _
deleteFromStorage As Boolean, _
cancellationToken As CancellationToken _
) As Task(Of OperationResponse)
Task<OperationResponse> DeleteAsync (
string imageName,
bool deleteFromStorage,
CancellationToken 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>
Parameters
- imageName
The name of the image to delete.
- deleteFromStorage
Indicates whether the source blob for the image 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 images, 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 and Windows Server 2008
Target Platforms
See Also
Reference
IVirtualMachineImageOperations Interface
IVirtualMachineImageOperations Members
Microsoft.WindowsAzure.Management.Compute Namespace