-
Notifications
You must be signed in to change notification settings - Fork 255
/
RequestOptions.xml
754 lines (750 loc) · 43.6 KB
/
RequestOptions.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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
<Type Name="RequestOptions" FullName="Microsoft.Azure.Documents.Client.RequestOptions">
<TypeSignature Language="C#" Value="public sealed class RequestOptions" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit RequestOptions extends System.Object" />
<TypeSignature Language="DocId" Value="T:Microsoft.Azure.Documents.Client.RequestOptions" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class RequestOptions" />
<TypeSignature Language="F#" Value="type RequestOptions = class" />
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.14.0.0</AssemblyVersion>
<AssemblyVersion>2.14.1.0</AssemblyVersion>
<AssemblyVersion>2.15.0.0</AssemblyVersion>
<AssemblyVersion>2.16.0.0</AssemblyVersion>
<AssemblyVersion>2.16.1.0</AssemblyVersion>
<AssemblyVersion>2.16.2.0</AssemblyVersion>
<AssemblyVersion>2.17.0.0</AssemblyVersion>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.14.0.0</AssemblyVersion>
<AssemblyVersion>2.14.1.0</AssemblyVersion>
<AssemblyVersion>2.15.0.0</AssemblyVersion>
<AssemblyVersion>2.16.0.0</AssemblyVersion>
<AssemblyVersion>2.16.1.0</AssemblyVersion>
<AssemblyVersion>2.16.2.0</AssemblyVersion>
<AssemblyVersion>2.17.0.0</AssemblyVersion>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
Encapsulates options that can be specified for different requests issued to the Azure Cosmos DB service.
</summary>
<remarks>
Some of these options are valid for specific operations only.
For example,
<para>PreTriggerInclude can be used only on create, replace and delete operations on a <see cref="T:Microsoft.Azure.Documents.Document" /> or <see cref="T:Microsoft.Azure.Documents.Attachment" />. </para><para>ETag, while valid on Replace* and Delete* operations, would have no impact on a Read*, CreateQuery* or Create* operations.</para></remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public RequestOptions ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Documents.Client.RequestOptions.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AccessCondition">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Documents.Client.AccessCondition AccessCondition { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Documents.Client.AccessCondition AccessCondition" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.AccessCondition" />
<MemberSignature Language="VB.NET" Value="Public Property AccessCondition As AccessCondition" />
<MemberSignature Language="F#" Value="member this.AccessCondition : Microsoft.Azure.Documents.Client.AccessCondition with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.AccessCondition" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Documents.Client.AccessCondition</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the condition (ETag) associated with the request in the Azure Cosmos DB service.
</summary>
<value>
The condition (ETag) associated with the request.
</value>
<remarks>
Most commonly used with the Delete* and Replace* methods of <see cref="T:Microsoft.Azure.Documents.Client.DocumentClient" /> such as <see cref="M:Microsoft.Azure.Documents.Client.DocumentClient.ReplaceDocumentAsync(Microsoft.Azure.Documents.Document,Microsoft.Azure.Documents.Client.RequestOptions,System.Threading.CancellationToken)" />
or <see cref="M:Microsoft.Azure.Documents.Client.DocumentClient.ReplaceDocumentAsync(System.String,System.Object,Microsoft.Azure.Documents.Client.RequestOptions,System.Threading.CancellationToken)" /> methods,
but can be used with other methods like <see cref="M:Microsoft.Azure.Documents.Client.DocumentClient.ReadDocumentAsync(System.String,Microsoft.Azure.Documents.Client.RequestOptions,System.Threading.CancellationToken)" /> for caching scenarios.
</remarks>
<example>
The following example shows how to use RequestOptions with <see cref="M:Microsoft.Azure.Documents.Client.DocumentClient.ReplaceDocumentAsync(System.String,System.Object,Microsoft.Azure.Documents.Client.RequestOptions,System.Threading.CancellationToken)" /> to
specify the set of <see cref="P:Microsoft.Azure.Documents.Client.RequestOptions.AccessCondition" /> to be used when updating a document
<code language="c#"><![CDATA[
// 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
}
});
]]></code></example>
<see cref="T:Microsoft.Azure.Documents.Client.AccessCondition" />
</Docs>
</Member>
<Member MemberName="ConsistencyLevel">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Documents.ConsistencyLevel? ConsistencyLevel { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<valuetype Microsoft.Azure.Documents.ConsistencyLevel> ConsistencyLevel" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.ConsistencyLevel" />
<MemberSignature Language="VB.NET" Value="Public Property ConsistencyLevel As Nullable(Of ConsistencyLevel)" />
<MemberSignature Language="F#" Value="member this.ConsistencyLevel : Nullable<Microsoft.Azure.Documents.ConsistencyLevel> with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.ConsistencyLevel" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Nullable<Microsoft.Azure.Documents.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.Documents.Client.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>
<altmember cref="P:Microsoft.Azure.Documents.Client.RequestOptions.ConsistencyLevel" />
<example>
This example uses RequestOptions to override the consistency level to Eventual for this single Read operation.
<code language="c#"><![CDATA[
Document doc = client.ReadDocumentAsync(documentLink, new RequestOptions { ConsistencyLevel = ConsistencyLevel.Eventual });
]]></code></example>
</Docs>
</Member>
<Member MemberName="DisableRUPerMinuteUsage">
<MemberSignature Language="C#" Value="public bool DisableRUPerMinuteUsage { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool DisableRUPerMinuteUsage" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.DisableRUPerMinuteUsage" />
<MemberSignature Language="VB.NET" Value="Public Property DisableRUPerMinuteUsage As Boolean" />
<MemberSignature Language="F#" Value="member this.DisableRUPerMinuteUsage : bool with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.DisableRUPerMinuteUsage" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the <see cref="P:Microsoft.Azure.Documents.Client.RequestOptions.DisableRUPerMinuteUsage" /> for the current request in the Azure Cosmos DB service.
</summary>
<value>To be added.</value>
<remarks>
<para>
DisableRUPerMinuteUsage is used to enable/disable Request Units(RUs)/minute capacity to serve the request if regular provisioned RUs/second is exhausted.
</para>
</remarks>
</Docs>
</Member>
<Member MemberName="EnableScriptLogging">
<MemberSignature Language="C#" Value="public bool EnableScriptLogging { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool EnableScriptLogging" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.EnableScriptLogging" />
<MemberSignature Language="VB.NET" Value="Public Property EnableScriptLogging As Boolean" />
<MemberSignature Language="F#" Value="member this.EnableScriptLogging : bool with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.EnableScriptLogging" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the <see cref="P:Microsoft.Azure.Documents.Client.RequestOptions.EnableScriptLogging" /> for the current request in the Azure Cosmos DB service.
</summary>
<value>To be added.</value>
<remarks>
<para>
EnableScriptLogging is used to enable/disable logging in JavaScript stored procedures.
By default script logging is disabled.
The log can also be accessible in response header (x-ms-documentdb-script-log-results).
</para>
</remarks>
<altmember cref="P:Microsoft.Azure.Documents.Client.StoredProcedureResponse`1.ScriptLog" />
<example>
The following example shows how to enable logging in stored procedures using <see cref="P:Microsoft.Azure.Documents.Client.RequestOptions.EnableScriptLogging" />.
<code language="c#"><![CDATA[
var response = await client.ExecuteStoredProcedureAsync(
document.SelfLink,
new RequestOptions { EnableScriptLogging = true } );
Console.WriteLine(response.ScriptLog);
]]></code>
To log, use the following in store procedure:
<code language="JavaScript"><![CDATA[
console.log("This is trace log");
]]></code></example>
</Docs>
</Member>
<Member MemberName="IndexingDirective">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Documents.IndexingDirective? IndexingDirective { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<valuetype Microsoft.Azure.Documents.IndexingDirective> IndexingDirective" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.IndexingDirective" />
<MemberSignature Language="VB.NET" Value="Public Property IndexingDirective As Nullable(Of IndexingDirective)" />
<MemberSignature Language="F#" Value="member this.IndexingDirective : Nullable<Microsoft.Azure.Documents.IndexingDirective> with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.IndexingDirective" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Nullable<Microsoft.Azure.Documents.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.Documents.IndexingPolicy" />
<altmember cref="P:Microsoft.Azure.Documents.Client.RequestOptions.IndexingDirective" />
<example>
The following example shows how to explicitly index a document in a collection with
automatic indexing turned off.
<code language="c#"><![CDATA[
client.CreateDocumentAsync(defaultCollection.SelfLink,
new { id = "AndersenFamily", isRegistered = true },
new RequestOptions { IndexingDirective = IndexingDirective.Include });
]]></code></example>
</Docs>
</Member>
<Member MemberName="JsonSerializerSettings">
<MemberSignature Language="C#" Value="public Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.JsonSerializerSettings" />
<MemberSignature Language="VB.NET" Value="Public Property JsonSerializerSettings As JsonSerializerSettings" />
<MemberSignature Language="F#" Value="member this.JsonSerializerSettings : Newtonsoft.Json.JsonSerializerSettings with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.JsonSerializerSettings" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Newtonsoft.Json.JsonSerializerSettings</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the <see cref="P:Microsoft.Azure.Documents.Client.RequestOptions.JsonSerializerSettings" /> for the current request used to deserialize the document.
If null, uses the default serializer settings set up in the DocumentClient.
</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="OfferEnableRUPerMinuteThroughput">
<MemberSignature Language="C#" Value="public bool OfferEnableRUPerMinuteThroughput { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool OfferEnableRUPerMinuteThroughput" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.OfferEnableRUPerMinuteThroughput" />
<MemberSignature Language="VB.NET" Value="Public Property OfferEnableRUPerMinuteThroughput As Boolean" />
<MemberSignature Language="F#" Value="member this.OfferEnableRUPerMinuteThroughput : bool with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.OfferEnableRUPerMinuteThroughput" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the <see cref="P:Microsoft.Azure.Documents.Client.RequestOptions.OfferEnableRUPerMinuteThroughput" /> for a collection in the Azure Cosmos DB service
</summary>
<value>
Represents Request Units(RU)/Minute throughput is enabled/disabled for a collection in the Azure Cosmos DB service.
</value>
<remarks>
This option is only valid when creating a document collection.
</remarks>
<altmember cref="T:Microsoft.Azure.Documents.DocumentCollection" />
<altmember cref="T:Microsoft.Azure.Documents.OfferV2" />
<example>
The followng example shows how to create a collection with RU/Minute throughput offer.
<code language="c#"><![CDATA[
await client.CreateDocumentCollectionAsync(
database.SelfLink,
new DocumentCollection { Id = "newcoll" },
new RequestOptions { OfferThroughput = 4000, OfferEnableRUPerMinuteThroughput = true });
]]></code></example>
</Docs>
</Member>
<Member MemberName="OfferThroughput">
<MemberSignature Language="C#" Value="public int? OfferThroughput { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<int32> OfferThroughput" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.OfferThroughput" />
<MemberSignature Language="VB.NET" Value="Public Property OfferThroughput As Nullable(Of Integer)" />
<MemberSignature Language="F#" Value="member this.OfferThroughput : Nullable<int> with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.OfferThroughput" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Nullable<System.Int32></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the offer throughput provisioned for a collection in measurement of Requests-per-Unit in the Azure Cosmos DB service.
</summary>
<value>
The provisioned throughtput for this offer.
</value>
<remarks>
This option is only valid when creating a document collection.
<para>
Refer to http://azure.microsoft.com/documentation/articles/documentdb-performance-levels/ for details on provision offer throughput.
</para></remarks>
<altmember cref="T:Microsoft.Azure.Documents.DocumentCollection" />
<altmember cref="T:Microsoft.Azure.Documents.OfferV2" />
<example>
The followng example shows how to create a collection with offer throughtput.
<code language="c#"><![CDATA[
await client.CreateDocumentCollectionAsync(
database.SelfLink,
new DocumentCollection { Id = "newcoll" },
new RequestOptions { OfferThroughput = 50000 });
]]></code></example>
</Docs>
</Member>
<Member MemberName="OfferType">
<MemberSignature Language="C#" Value="public string OfferType { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string OfferType" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.OfferType" />
<MemberSignature Language="VB.NET" Value="Public Property OfferType As String" />
<MemberSignature Language="F#" Value="member this.OfferType : string with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.OfferType" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the offer type for the resource in the Azure Cosmos DB service.
</summary>
<value>
The offer type value.
</value>
<remarks>
This option is only valid when creating a document collection.
<para>
Refer to http://azure.microsoft.comdocumentation/articles/documentdb-performance-levels/ for the list of valid
offer types.
</para></remarks>
<altmember cref="T:Microsoft.Azure.Documents.DocumentCollection" />
<altmember cref="T:Microsoft.Azure.Documents.Offer" />
<example>
The followng example shows how to create a collection with the S2 offer.
<code language="c#"><![CDATA[
await client.CreateDocumentCollectionAsync(
database.SelfLink,
new DocumentCollection { Id = "newcoll" },
new RequestOptions { OfferType = "S2" });
]]></code></example>
</Docs>
</Member>
<Member MemberName="PartitionKey">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Documents.PartitionKey PartitionKey { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Documents.PartitionKey PartitionKey" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.PartitionKey" />
<MemberSignature Language="VB.NET" Value="Public Property PartitionKey As PartitionKey" />
<MemberSignature Language="F#" Value="member this.PartitionKey : Microsoft.Azure.Documents.PartitionKey with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.PartitionKey" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Documents.PartitionKey</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the <see cref="P:Microsoft.Azure.Documents.Client.RequestOptions.PartitionKey" /> for the current request in the Azure Cosmos DB service.
</summary>
<value>To be added.</value>
<remarks>
<para>
Partition key is used to identify the target partition for this request. It must be set on read and delete
operations for all document requests; create, read, update and delete operations for all document attachment requests;
and execute operation on stored producedures.
For create and update operations on documents, the partition key is optional. When absent, the client library will
extract the partition key from the document before sending the request to the server.
</para>
</remarks>
<altmember cref="T:Microsoft.Azure.Documents.DocumentCollection" />
<altmember cref="T:Microsoft.Azure.Documents.PartitionKeyDefinition" />
<example>
The following example shows how to read a document in a partitioned collection using <see cref="P:Microsoft.Azure.Documents.Client.RequestOptions.PartitionKey" />.
The example assumes the collection is created with a <see cref="T:Microsoft.Azure.Documents.PartitionKeyDefinition" /> of the 'id' property in all the documents.
<code language="c#"><![CDATA[
await client.ReadDocumentAsync(
document.SelfLink,
new RequestOptions { PartitionKey = new PartitionKey(document.Id) } );
]]></code></example>
</Docs>
</Member>
<Member MemberName="PopulatePartitionKeyRangeStatistics">
<MemberSignature Language="C#" Value="public bool PopulatePartitionKeyRangeStatistics { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool PopulatePartitionKeyRangeStatistics" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.PopulatePartitionKeyRangeStatistics" />
<MemberSignature Language="VB.NET" Value="Public Property PopulatePartitionKeyRangeStatistics As Boolean" />
<MemberSignature Language="F#" Value="member this.PopulatePartitionKeyRangeStatistics : bool with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.PopulatePartitionKeyRangeStatistics" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the <see cref="P:Microsoft.Azure.Documents.Client.RequestOptions.PopulatePartitionKeyRangeStatistics" /> for document collection read requests in the Azure Cosmos DB service.
</summary>
<value>To be added.</value>
<remarks>
<para>
<see cref="P:Microsoft.Azure.Documents.Client.RequestOptions.PopulatePartitionKeyRangeStatistics" /> is used to enable/disable getting partition key range statistics.
</para>
</remarks>
<example>
For usage, please refer to the example in <see cref="P:Microsoft.Azure.Documents.DocumentCollection.PartitionKeyRangeStatistics" />.
</example>
</Docs>
</Member>
<Member MemberName="PopulateQuotaInfo">
<MemberSignature Language="C#" Value="public bool PopulateQuotaInfo { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool PopulateQuotaInfo" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.PopulateQuotaInfo" />
<MemberSignature Language="VB.NET" Value="Public Property PopulateQuotaInfo As Boolean" />
<MemberSignature Language="F#" Value="member this.PopulateQuotaInfo : bool with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.PopulateQuotaInfo" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the <see cref="P:Microsoft.Azure.Documents.Client.RequestOptions.PopulateQuotaInfo" /> for document collection read requests in the Azure Cosmos DB service.
</summary>
<value>To be added.</value>
<remarks>
<para>
PopulateQuotaInfo is used to enable/disable getting document collection quota related stats for document collection read requests.
</para>
</remarks>
</Docs>
</Member>
<Member MemberName="PostTriggerInclude">
<MemberSignature Language="C#" Value="public System.Collections.Generic.IList<string> PostTriggerInclude { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IList`1<string> PostTriggerInclude" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.PostTriggerInclude" />
<MemberSignature Language="VB.NET" Value="Public Property PostTriggerInclude As IList(Of String)" />
<MemberSignature Language="F#" Value="member this.PostTriggerInclude : System.Collections.Generic.IList<string> with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.PostTriggerInclude" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IList<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>
<example>
The following example shows how to use RequestOptions to include a PostTrigger to execute after persisting the document.
<code language="c#"><![CDATA[
client.CreateDocumentAsync(collection.SelfLink,
new { id = "AndersenFamily", isRegistered = true },
new RequestOptions { PostTriggerInclude = new List<string> { "updateMetadata" } });
]]></code></example>
<see cref="T:Microsoft.Azure.Documents.Trigger" />
</Docs>
</Member>
<Member MemberName="PreTriggerInclude">
<MemberSignature Language="C#" Value="public System.Collections.Generic.IList<string> PreTriggerInclude { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IList`1<string> PreTriggerInclude" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.PreTriggerInclude" />
<MemberSignature Language="VB.NET" Value="Public Property PreTriggerInclude As IList(Of String)" />
<MemberSignature Language="F#" Value="member this.PreTriggerInclude : System.Collections.Generic.IList<string> with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.PreTriggerInclude" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IList<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>
<example>
The following example shows how to use RequestOptions to include a PreTrigger to execute before persisting the document.
<code language="c#"><![CDATA[
client.CreateDocumentAsync(collection.SelfLink,
new { id = "AndersenFamily", isRegistered = true },
new RequestOptions { PreTriggerInclude = new List<string> { "validateDocumentContents" } });
]]></code></example>
<see cref="T:Microsoft.Azure.Documents.Trigger" />
<see cref="T:System.Collections.Generic.IList`1" />
</Docs>
</Member>
<Member MemberName="ResourceTokenExpirySeconds">
<MemberSignature Language="C#" Value="public int? ResourceTokenExpirySeconds { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<int32> ResourceTokenExpirySeconds" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.ResourceTokenExpirySeconds" />
<MemberSignature Language="VB.NET" Value="Public Property ResourceTokenExpirySeconds As Nullable(Of Integer)" />
<MemberSignature Language="F#" Value="member this.ResourceTokenExpirySeconds : Nullable<int> with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.ResourceTokenExpirySeconds" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Nullable<System.Int32></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets the expiry time for resource token. Used when creating/updating/reading permissions in the Azure Cosmos DB service.
</summary>
<value>
The expiry time in seconds for the resource token.
</value>
<remarks>
When working with Azure Cosmos DB Users and Permissions, the way to instantiate an instance of <see cref="T:Microsoft.Azure.Documents.Client.DocumentClient" /> is to
get the <see cref="P:Microsoft.Azure.Documents.Permission.Token" /> for the resource the <see cref="T:Microsoft.Azure.Documents.User" /> wants to access and pass this
to the authKeyOrResourceToken parameter of <see cref="T:Microsoft.Azure.Documents.Client.DocumentClient" /> constructor
<para>
When requesting this Token, a RequestOption for ResourceTokenExpirySeconds can be used to set the length of time to elapse before the token expires.
This value can range from 10 seconds, to 5 hours (or 18,000 seconds)
The default value for this, should none be supplied is 1 hour (or 3,600 seconds).
</para></remarks>
<altmember cref="T:Microsoft.Azure.Documents.User" />
<altmember cref="T:Microsoft.Azure.Documents.Client.DocumentClient" />
<altmember cref="T:Microsoft.Azure.Documents.Permission" />
</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.Documents.Client.RequestOptions.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.Documents.Client.RequestOptions.SessionToken" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.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.Documents.Client.RequestOptions.ConsistencyLevel" /> for Azure Cosmos DB is Session. In fact, this is the deault 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.Documents.Client.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.Documents.Client.ResourceResponse`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>
<altmember cref="P:Microsoft.Azure.Documents.Client.RequestOptions.ConsistencyLevel" />
<example>
This example shows how you can retrieve the SessionToken from a <see cref="T:Microsoft.Azure.Documents.Client.ResourceResponse`1" />
and then use it on a different instance of <see cref="T:Microsoft.Azure.Documents.Client.DocumentClient" /> within <see cref="T:Microsoft.Azure.Documents.Client.RequestOptions" />
This example assumes that the each instance of the client is running from code within a different AppDomain, such as on different nodes in the case of multiple node web application
<code language="c#"><![CDATA[
string sessionToken;
string docSelfLink;
using (DocumentClient client = new DocumentClient(new Uri(""), ""))
{
ResourceResponse<Document> response = client.CreateDocumentAsync(collection.SelfLink, new { id = "an id", value = "some value" }).Result;
sessionToken = response.SessionToken;
Document created = response.Resource;
docSelfLink = created.SelfLink;
}
using (DocumentClient client = new DocumentClient(new Uri(""), ""))
{
ResourceResponse<Document> read = client.ReadDocumentAsync(docSelfLink, new RequestOptions { SessionToken = sessionToken }).Result;
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="SharedOfferThroughput">
<MemberSignature Language="C#" Value="public int? SharedOfferThroughput { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<int32> SharedOfferThroughput" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Documents.Client.RequestOptions.SharedOfferThroughput" />
<MemberSignature Language="VB.NET" Value="Public Property SharedOfferThroughput As Nullable(Of Integer)" />
<MemberSignature Language="F#" Value="member this.SharedOfferThroughput : Nullable<int> with get, set" Usage="Microsoft.Azure.Documents.Client.RequestOptions.SharedOfferThroughput" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.DocumentDB.Core</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Documents.Client</AssemblyName>
<AssemblyVersion>2.18.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Obsolete("Deprecated")]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("Deprecated")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Nullable<System.Int32></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets or sets shared offer throughput on a collection.
</summary>
<value>To be added.</value>
<remarks>
This option is only valid when creating a document collection that shares offer throughput
provisioned at database level. Specifies maximum shared throughput available for collection
in the absence of contention. This value should be less than the throughput specified at
database level.
</remarks>
<example>
The followng example shows how to create a collection with offer throughtput.
<code language="c#"><![CDATA[
await client.CreateDocumentCollectionAsync(
database.SelfLink,
new DocumentCollection { Id = "newcoll" },
new RequestOptions { SharedOfferThroughput = 50000 });
]]></code></example>
</Docs>
</Member>
</Members>
</Type>