共用方式為


IDocumentClient.DeleteConflictAsync Method

Definition

Overloads

DeleteConflictAsync(String, RequestOptions)

Delete a Conflict from the Azure Cosmos DB service as an asynchronous operation.

DeleteConflictAsync(Uri, RequestOptions)

Delete a conflict as an asynchronous operation in the Azure Cosmos DB service.

DeleteConflictAsync(String, RequestOptions)

Delete a Conflict from the Azure Cosmos DB service as an asynchronous operation.

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

Parameters

conflictLink
String

The link of the Conflict to delete. E.g. dbs/db_rid/colls/coll_rid/conflicts/

options
RequestOptions

(Optional) The request options for the request.

Returns

A System.Threading.Tasks containing a ResourceResponse<TResource> which will contain information about the request issued.

Exceptions

If conflictLink is not set.

This exception can encapsulate many different types of errors. To determine the specific error always look at the StatusCode property. Some common codes you may get when creating a Document are:

StatusCodeReason for exception
404NotFound - This means the resource you tried to delete did not exist.

Examples

//Delete a conflict using its selfLink property.
//To get the conflictLink you would have to query for the Conflict object, using CreateConflictQuery(), and then refer to its .SelfLink property
await client.DeleteConflictAsync(conflictLink);

See also

Applies to

DeleteConflictAsync(Uri, RequestOptions)

Delete a conflict as an asynchronous operation in the Azure Cosmos DB service.

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

Parameters

conflictUri
Uri

The URI of the conflict to delete.

options
RequestOptions

(Optional) The RequestOptions for the request.

Returns

The task object representing the service response for the asynchronous operation.

Applies to