-
Notifications
You must be signed in to change notification settings - Fork 254
/
ItemRequestOptions.xml
222 lines (221 loc) · 13.1 KB
/
ItemRequestOptions.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<Type Name="ItemRequestOptions" FullName="Microsoft.Azure.Cosmos.ItemRequestOptions">
<TypeSignature Language="C#" Value="public class ItemRequestOptions : Microsoft.Azure.Cosmos.RequestOptions" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ItemRequestOptions extends Microsoft.Azure.Cosmos.RequestOptions" />
<TypeSignature Language="DocId" Value="T:Microsoft.Azure.Cosmos.ItemRequestOptions" />
<TypeSignature Language="VB.NET" Value="Public Class ItemRequestOptions
Inherits RequestOptions" />
<TypeSignature Language="F#" Value="type ItemRequestOptions = class
 inherit RequestOptions" />
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.16.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>Microsoft.Azure.Cosmos.RequestOptions</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
Cosmos item request options
</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ItemRequestOptions ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.ItemRequestOptions.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.16.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ConsistencyLevel">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.ConsistencyLevel? ConsistencyLevel { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<valuetype Microsoft.Azure.Cosmos.ConsistencyLevel> ConsistencyLevel" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.ItemRequestOptions.ConsistencyLevel" />
<MemberSignature Language="VB.NET" Value="Public Property ConsistencyLevel As Nullable(Of ConsistencyLevel)" />
<MemberSignature Language="F#" Value="member this.ConsistencyLevel : Nullable<Microsoft.Azure.Cosmos.ConsistencyLevel> with get, set" Usage="Microsoft.Azure.Cosmos.ItemRequestOptions.ConsistencyLevel" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.16.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Nullable<Microsoft.Azure.Cosmos.ConsistencyLevel></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the consistency level required for the request in the Azure Cosmos DB service.
</summary>
<value>
The consistency level required for the request.
</value>
<remarks>
Azure Cosmos DB offers 5 different consistency levels. Strong, Bounded Staleness, Session, Consistent Prefix and Eventual - in order of strongest to weakest consistency. <see cref="T:Microsoft.Azure.Cosmos.ConnectionPolicy" /><para>
While this is set at a database account level, Azure Cosmos DB allows a developer to override the default consistency level
for each individual request.
</para></remarks>
</Docs>
</Member>
<Member MemberName="EnableContentResponseOnWrite">
<MemberSignature Language="C#" Value="public bool? EnableContentResponseOnWrite { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<bool> EnableContentResponseOnWrite" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.ItemRequestOptions.EnableContentResponseOnWrite" />
<MemberSignature Language="VB.NET" Value="Public Property EnableContentResponseOnWrite As Nullable(Of Boolean)" />
<MemberSignature Language="F#" Value="member this.EnableContentResponseOnWrite : Nullable<bool> with get, set" Usage="Microsoft.Azure.Cosmos.ItemRequestOptions.EnableContentResponseOnWrite" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.16.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Nullable<System.Boolean></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the boolean to only return the headers and status code in
the Cosmos DB response for write item operation like Create, Upsert, Patch and Replace.
Setting the option to false will cause the response to have a null resource. This reduces networking and CPU load by not sending
the resource back over the network and serializing it on the client.
</summary>
<value>To be added.</value>
<remarks>
This is optimal for workloads where the returned resource is not used.
</remarks>
<example>
<code language="c#"><![CDATA[
ItemRequestOption requestOptions = new ItemRequestOptions() { EnableContentResponseOnWrite = false };
ItemResponse itemResponse = await this.container.CreateItemAsync<ToDoActivity>(tests, new PartitionKey(test.status), requestOptions);
Assert.AreEqual(HttpStatusCode.Created, itemResponse.StatusCode);
Assert.IsNull(itemResponse.Resource);
]]></code>
</example>
</Docs>
</Member>
<Member MemberName="IndexingDirective">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.IndexingDirective? IndexingDirective { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<valuetype Microsoft.Azure.Cosmos.IndexingDirective> IndexingDirective" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.ItemRequestOptions.IndexingDirective" />
<MemberSignature Language="VB.NET" Value="Public Property IndexingDirective As Nullable(Of IndexingDirective)" />
<MemberSignature Language="F#" Value="member this.IndexingDirective : Nullable<Microsoft.Azure.Cosmos.IndexingDirective> with get, set" Usage="Microsoft.Azure.Cosmos.ItemRequestOptions.IndexingDirective" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.16.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Nullable<Microsoft.Azure.Cosmos.IndexingDirective></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the indexing directive (Include or Exclude) for the request in the Azure Cosmos DB service.
</summary>
<value>
The indexing directive to use with a request.
</value>
<remarks>To be added.</remarks>
<altmember cref="T:Microsoft.Azure.Cosmos.IndexingPolicy" />
<altmember cref="P:Microsoft.Azure.Cosmos.ItemRequestOptions.IndexingDirective" />
</Docs>
</Member>
<Member MemberName="PostTriggers">
<MemberSignature Language="C#" Value="public System.Collections.Generic.IEnumerable<string> PostTriggers { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IEnumerable`1<string> PostTriggers" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.ItemRequestOptions.PostTriggers" />
<MemberSignature Language="VB.NET" Value="Public Property PostTriggers As IEnumerable(Of String)" />
<MemberSignature Language="F#" Value="member this.PostTriggers : seq<string> with get, set" Usage="Microsoft.Azure.Cosmos.ItemRequestOptions.PostTriggers" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.16.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerable<System.String></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the trigger to be invoked after the operation in the Azure Cosmos DB service.
</summary>
<value>
The trigger to be invoked after the operation.
</value>
<remarks>
Only valid when used with Create, Replace and Delete methods for documents.
Currently only one PreTrigger is permitted per operation.
</remarks>
</Docs>
</Member>
<Member MemberName="PreTriggers">
<MemberSignature Language="C#" Value="public System.Collections.Generic.IEnumerable<string> PreTriggers { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IEnumerable`1<string> PreTriggers" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.ItemRequestOptions.PreTriggers" />
<MemberSignature Language="VB.NET" Value="Public Property PreTriggers As IEnumerable(Of String)" />
<MemberSignature Language="F#" Value="member this.PreTriggers : seq<string> with get, set" Usage="Microsoft.Azure.Cosmos.ItemRequestOptions.PreTriggers" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.16.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerable<System.String></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the trigger to be invoked before the operation in the Azure Cosmos DB service.
</summary>
<value>
The trigger to be invoked before the operation.
</value>
<remarks>
Only valid when used with Create, Replace and Delete methods for documents.
Currently only one PreTrigger is permitted per operation.
</remarks>
</Docs>
</Member>
<Member MemberName="SessionToken">
<MemberSignature Language="C#" Value="public string SessionToken { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string SessionToken" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.ItemRequestOptions.SessionToken" />
<MemberSignature Language="VB.NET" Value="Public Property SessionToken As String" />
<MemberSignature Language="F#" Value="member this.SessionToken : string with get, set" Usage="Microsoft.Azure.Cosmos.ItemRequestOptions.SessionToken" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.16.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the token for use with session consistency in the Azure Cosmos DB service.
</summary>
<value>
The token for use with session consistency.
</value>
<remarks>
One of the <see cref="P:Microsoft.Azure.Cosmos.ItemRequestOptions.ConsistencyLevel" /> for Azure Cosmos DB is Session. In fact, this is the default level applied to accounts.
<para>
When working with Session consistency, each new write request to Azure Cosmos DB is assigned a new SessionToken.
The DocumentClient will use this token internally with each read/query request to ensure that the set consistency level is maintained.
<para>
In some scenarios you need to manage this Session yourself;
Consider a web application with multiple nodes, each node will have its own instance of <see cref="T:Microsoft.Azure.Cosmos.DocumentClient" />
If you wanted these nodes to participate in the same session (to be able read your own writes consistently across web tiers)
you would have to send the SessionToken from <see cref="T:Microsoft.Azure.Cosmos.ItemResponse`1" /> of the write action on one node
to the client tier, using a cookie or some other mechanism, and have that token flow back to the web tier for subsequent reads.
If you are using a round-robin load balancer which does not maintain session affinity between requests, such as the Azure Load Balancer,
the read could potentially land on a different node to the write request, where the session was created.
</para><para>
If you do not flow the Azure Cosmos DB SessionToken across as described above you could end up with inconsistent read results for a period of time.
</para></para></remarks>
</Docs>
</Member>
</Members>
</Type>