DocumentClient.DeleteDatabaseAsync メソッド

定義

オーバーロード

DeleteDatabaseAsync(String, RequestOptions)

Database非同期操作として Azure Cosmos DB サービスから を削除します。

DeleteDatabaseAsync(Uri, RequestOptions)

Azure Cosmos DB サービスから非同期操作としてデータベースを削除します。

DeleteDatabaseAsync(String, RequestOptions)

Database非同期操作として Azure Cosmos DB サービスから を削除します。

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Database>> DeleteDatabaseAsync (string databaseLink, Microsoft.Azure.Documents.Client.RequestOptions options = default);
abstract member DeleteDatabaseAsync : string * Microsoft.Azure.Documents.Client.RequestOptions -> System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Database>>
override this.DeleteDatabaseAsync : string * Microsoft.Azure.Documents.Client.RequestOptions -> System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Database>>
Public Function DeleteDatabaseAsync (databaseLink As String, Optional options As RequestOptions = Nothing) As Task(Of ResourceResponse(Of Database))

パラメーター

databaseLink
String

削除する の Database リンク。 例: dbs/db_rid/

options
RequestOptions

(省略可能)要求の要求オプション。

戻り値

発行 System.Threading.Tasks された要求に ResourceResponse<TResource> 関する情報を格納する を含む 。

実装

例外

が設定されていない場合 databaseLink

この例外により、さまざまな種類のエラーがカプセル化される可能性があります。 特定のエラーを特定するには、常に StatusCode プロパティを参照してください。 ドキュメントの作成時に取得できる一般的なコードは次のとおりです。

StatusCode例外の理由
404NotFound - 削除しようとしたリソースが存在しなかったことを意味します。

//Delete a database using its selfLink property
//To get the databaseLink you would have to query for the Database, using CreateDatabaseQuery(),  and then refer to its .SelfLink property
await client.DeleteDatabaseAsync(databaseLink);

こちらもご覧ください

適用対象

DeleteDatabaseAsync(Uri, RequestOptions)

Azure Cosmos DB サービスから非同期操作としてデータベースを削除します。

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Database>> DeleteDatabaseAsync (Uri databaseUri, Microsoft.Azure.Documents.Client.RequestOptions options = default);
abstract member DeleteDatabaseAsync : Uri * Microsoft.Azure.Documents.Client.RequestOptions -> System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Database>>
override this.DeleteDatabaseAsync : Uri * Microsoft.Azure.Documents.Client.RequestOptions -> System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Database>>
Public Function DeleteDatabaseAsync (databaseUri As Uri, Optional options As RequestOptions = Nothing) As Task(Of ResourceResponse(Of Database))

パラメーター

databaseUri
Uri

削除するデータベースの URI。

options
RequestOptions

要求の要求オプション。

戻り値

非同期操作のサービス応答を表すタスク オブジェクト。

実装

適用対象