IWebSiteOperations.DeleteAsync Method

Asynchronously deletes a website.

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

Dim instance As IWebSiteOperations
Dim webSpaceName As String
Dim webSiteName As String
Dim deleteEmptyServerFarm As Boolean
Dim deleteMetrics As Boolean
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of OperationResponse)

returnValue = instance.DeleteAsync(webSpaceName, webSiteName, deleteEmptyServerFarm, deleteMetrics, cancellationToken)

Task<OperationResponse> DeleteAsync (
	string webSpaceName,
	string webSiteName,
	bool deleteEmptyServerFarm,
	bool deleteMetrics,
	CancellationToken cancellationToken
Task<OperationResponse> DeleteAsync (
	String webSpaceName, 
	String webSiteName, 
	boolean deleteEmptyServerFarm, 
	boolean deleteMetrics, 
	CancellationToken cancellationToken
function DeleteAsync (
	webSpaceName : String, 
	webSiteName : String, 
	deleteEmptyServerFarm : boolean, 
	deleteMetrics : boolean, 
	cancellationToken : CancellationToken
) : Task<OperationResponse>



The name of the web space.


The name of the website.


Specifies whether the server farm can be deleted if the site being deleted is the last website in a server farm. true if the server farm should be deleted; otherwise, false.


Specifies whether metrics for the site should be deleted. true if metrics 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 a website, see Delete a Website.

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