IDocumentDatabase.DeleteDatabaseAsync(CancellationToken) Method

Definition

Deletes the database this instance is responsible for.

public:
 System::Threading::Tasks::Task<System::Cloud::DocumentDb::IDatabaseResponse<bool> ^> ^ DeleteDatabaseAsync(System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Cloud.DocumentDb.IDatabaseResponse<bool>> DeleteDatabaseAsync(System.Threading.CancellationToken cancellationToken);
abstract member DeleteDatabaseAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Cloud.DocumentDb.IDatabaseResponse<bool>>
Public Function DeleteDatabaseAsync (cancellationToken As CancellationToken) As Task(Of IDatabaseResponse(Of Boolean))

Parameters

cancellationToken
CancellationToken

The cancellation token.

Returns

A Task containing a IDatabaseResponse<T> with true value if successfully deleted and false otherwise.

Exceptions

An error occurred on the client side, for example, on a bad request, permissions error, or client timeout.

An error occurred on the database server side, including an internal server error.

The request failed but can be retried. This includes throttling and when the server is unavailable.

A general failure occurred.

Applies to