다음을 통해 공유


RequestOptions.IfMatchEtag Property

Definition

Gets or sets the If-Match (ETag) associated with the request in the Azure Cosmos DB service.

public string IfMatchEtag { get; set; }
member this.IfMatchEtag : string with get, set
Public Property IfMatchEtag As String

Property Value

Remarks

Most commonly used with the Delete* and Replace* methods of Container such as ReplaceItemAsync<T>(T, String, Nullable<PartitionKey>, ItemRequestOptions, CancellationToken). CreateItemAsync<T>(T, Nullable<PartitionKey>, ItemRequestOptions, CancellationToken) will ignore IfMatchEtag if specificed. UpsertItemAsync<T>(T, Nullable<PartitionKey>, ItemRequestOptions, CancellationToken) will ignore IfMatchEtag when materialized as Create, otherwise for Replace Etag constraint will be applied.

https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/database-transactions-optimistic-concurrency#implementing-optimistic-concurrency-control-using-etag-and-http-headers

Applies to