AccessCondition Class
Updated: June 30, 2017
Represents a set of access conditions to be used for operations in the Azure DocumentDB database service.
Assembly: Microsoft.Azure.Documents.Client (in Microsoft.Azure.Documents.Client.dll)
| Name | Description | |
|---|---|---|
![]() | AccessCondition |
| Name | Description | |
|---|---|---|
![]() | IsDefined | Determines if a certain property is defined or not. (Defined by TypeCheckFunctionsExtensions.) |
![]() | IsNull | Determines if a certain property is null or not. (Defined by TypeCheckFunctionsExtensions.) |
![]() | IsPrimitive | Determines if a certain property is of premitive JSON type. (Defined by TypeCheckFunctionsExtensions.) |
The following example shows how to use AccessCondition with DocumentClient.
// If ETag is current, then this will succeed. Otherwise the request will fail with HTTP 412 Precondition Failure await client.ReplaceDocumentAsync( readCopyOfBook.SelfLink, new Book { Title = "Moby Dick", Price = 14.99 }, new RequestOptions { AccessCondition = new AccessCondition { Condition = readCopyOfBook.ETag, Type = AccessConditionType.IfMatch } });
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

