DocumentClient.DeleteDocumentCollectionAsync メソッド

定義

オーバーロード

DeleteDocumentCollectionAsync(String, RequestOptions)

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

DeleteDocumentCollectionAsync(Uri, RequestOptions)

Azure Cosmos DB サービスから非同期操作としてコレクションを削除します。

DeleteDocumentCollectionAsync(String, RequestOptions)

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

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

パラメーター

documentCollectionLink
String

削除する の Document リンク。 例: dbs/db_rid/colls/col_rid/

options
RequestOptions

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

戻り値

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

実装

例外

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

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

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

//Delete a collection using its selfLink property
//To get the collectionLink you would have to query for the Collection, using CreateDocumentCollectionQuery(),  and then refer to its .SelfLink property
await client.DeleteDocumentCollectionAsync(collectionLink);

こちらもご覧ください

適用対象

DeleteDocumentCollectionAsync(Uri, RequestOptions)

Azure Cosmos DB サービスから非同期操作としてコレクションを削除します。

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

パラメーター

documentCollectionUri
Uri

削除するドキュメント コレクションの URI。

options
RequestOptions

要求の要求オプション。

戻り値

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

実装

適用対象