AccessCondition Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a set of access conditions to be used for operations in the Azure Cosmos DB service.
public sealed class AccessCondition
type AccessCondition = class
Public NotInheritable Class AccessCondition
- Inheritance
-
AccessCondition
Examples
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
}
});
Constructors
AccessCondition() |
Properties
Condition |
Gets or sets the value of the condition in the Azure Cosmos DB service. |
Type |
Gets or sets the condition type in the Azure Cosmos DB service. |
Applies to
See also
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
Azure SDK for .NET