Question
You have a container in an Azure Cosmos DB for NoSQL account.
You need to use the Azure Cosmos DB SDK to replace a document by using optimistic concurrency.
What should you include in the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Explanation
RequestOptions property to set: AccessCondition, set to an IfMatch condition carrying the ETag read earlier, makes the replace conditional; in the .NET SDK v3 the equivalent is ItemRequestOptions.IfMatchEtag. ConsistencyLevel and SessionToken control read guarantees, not whether a write is rejected when the item has changed.
Document property that will be compared: _etag is the system property the server regenerates on every update and compares with the if-match header; when they differ the replace fails with HTTP 412 Precondition Failed. The id and _rid identify the item but do not change when it is updated, so they cannot detect a concurrent change.