DocumentClient.DeletePermissionAsync メソッド

定義

オーバーロード

DeletePermissionAsync(Uri, RequestOptions)

Azure Cosmos DB サービスから非同期操作としてアクセス許可を削除します。

DeletePermissionAsync(String, RequestOptions)

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

DeletePermissionAsync(Uri, RequestOptions)

Azure Cosmos DB サービスから非同期操作としてアクセス許可を削除します。

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

パラメーター

permissionUri
Uri

削除するアクセス許可の URI。

options
RequestOptions

要求の要求オプション。

戻り値

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

実装

適用対象

DeletePermissionAsync(String, RequestOptions)

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

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

パラメーター

permissionLink
String

削除する の Permission リンク。 例: dbs/db_rid/users/user_rid/permissions/permission_rid/

options
RequestOptions

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

戻り値

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

実装

例外

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

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

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

//Delete a permission using its selfLink property.
//To get the permissionLink you would have to query for the Permission object, using CreateStoredProcedureQuery(), and then refer to its .SelfLink property
await client.DeletePermissionAsync(permissionLink);

こちらもご覧ください

適用対象