-
Notifications
You must be signed in to change notification settings - Fork 271
/
Copy pathCosmosClientBuilder.xml
939 lines (938 loc) · 69.4 KB
/
CosmosClientBuilder.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
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
<Type Name="CosmosClientBuilder" FullName="Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder">
<TypeSignature Language="C#" Value="public class CosmosClientBuilder" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit CosmosClientBuilder extends System.Object" />
<TypeSignature Language="DocId" Value="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />
<TypeSignature Language="VB.NET" Value="Public Class CosmosClientBuilder" />
<TypeSignature Language="F#" Value="type CosmosClientBuilder = class" />
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.17.1.0</AssemblyVersion>
<AssemblyVersion>3.18.0.0</AssemblyVersion>
<AssemblyVersion>3.19.0.0</AssemblyVersion>
<AssemblyVersion>3.20.0.0</AssemblyVersion>
<AssemblyVersion>3.20.1.0</AssemblyVersion>
<AssemblyVersion>3.21.0.0</AssemblyVersion>
<AssemblyVersion>3.22.0.0</AssemblyVersion>
<AssemblyVersion>3.22.1.0</AssemblyVersion>
<AssemblyVersion>3.23.0.0</AssemblyVersion>
<AssemblyVersion>3.24.0.0</AssemblyVersion>
<AssemblyVersion>3.25.0.0</AssemblyVersion>
<AssemblyVersion>3.26.0.0</AssemblyVersion>
<AssemblyVersion>3.26.1.0</AssemblyVersion>
<AssemblyVersion>3.26.2.0</AssemblyVersion>
<AssemblyVersion>3.27.0.0</AssemblyVersion>
<AssemblyVersion>3.27.1.0</AssemblyVersion>
<AssemblyVersion>3.27.2.0</AssemblyVersion>
<AssemblyVersion>3.28.0.0</AssemblyVersion>
<AssemblyVersion>3.29.0.0</AssemblyVersion>
<AssemblyVersion>3.30.0.0</AssemblyVersion>
<AssemblyVersion>3.30.1.0</AssemblyVersion>
<AssemblyVersion>3.31.0.0</AssemblyVersion>
<AssemblyVersion>3.31.1.0</AssemblyVersion>
<AssemblyVersion>3.31.2.0</AssemblyVersion>
<AssemblyVersion>3.35.4.0</AssemblyVersion>
<AssemblyVersion>3.36.0.0</AssemblyVersion>
<AssemblyVersion>3.38.1.0</AssemblyVersion>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
This is a Builder class that creates a cosmos client
</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CosmosClientBuilder (string connectionString);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string connectionString) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.#ctor(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (connectionString As String)" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder : string -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="new Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder connectionString" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="connectionString" Type="System.String" />
</Parameters>
<Docs>
<param name="connectionString">The connection string must contain AccountEndpoint and AccountKey or ResourceToken.</param>
<summary>
Extracts the account endpoint and key from the connection string.
</summary>
<remarks>
Emulator: To ignore SSL Certificate please suffix connectionstring with "DisableServerCertificateValidation=True;".
When CosmosClientOptions.HttpClientFactory is used, SSL certificate needs to be handled appropriately.
NOTE: DO NOT use this flag in production (only for emulator)
</remarks>
<example>"AccountEndpoint=https://mytestcosmosaccount.documents.azure.com:443/;AccountKey={SecretAccountKey};"</example>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CosmosClientBuilder (string accountEndpoint, Azure.AzureKeyCredential authKeyOrResourceTokenCredential);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string accountEndpoint, class Azure.AzureKeyCredential authKeyOrResourceTokenCredential) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.#ctor(System.String,Azure.AzureKeyCredential)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (accountEndpoint As String, authKeyOrResourceTokenCredential As AzureKeyCredential)" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder : string * Azure.AzureKeyCredential -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="new Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder (accountEndpoint, authKeyOrResourceTokenCredential)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="accountEndpoint" Type="System.String" />
<Parameter Name="authKeyOrResourceTokenCredential" Type="Azure.AzureKeyCredential" />
</Parameters>
<Docs>
<param name="accountEndpoint">The Uri to the Cosmos Account. Example: https://{Cosmos Account Name}.documents.azure.com:443/ </param>
<param name="authKeyOrResourceTokenCredential">AzureKeyCredential with master-key or resource token.</param>
<summary>
Initialize a new CosmosConfiguration class that holds all the properties the CosmosClient requires with the account endpoint URI string and AzureKeyCredential.
AzureKeyCredential enables changing/updating master-key/ResourceToken while CosmosClient is still in use.
</summary>
<remarks>AzureKeyCredential enables changing/updating master-key/ResourceToken whle CosmosClient is still in use.</remarks>
<example>
The example below creates a new <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /><code language="c#"><![CDATA[
CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder(
accountEndpoint: "https://testcosmos.documents.azure.com:443/",
authKeyOrResourceTokenCredential: new AzureKeyCredential("SuperSecretKey"));
CosmosClient client = cosmosClientBuilder.Build();
]]></code></example>
<example>
The example below creates a new <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> with a ConsistencyLevel and a list of preferred locations.
<code language="c#"><![CDATA[
CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder(
accountEndpoint: "https://testcosmos.documents.azure.com:443/",
authKeyOrResourceTokenCredential: new AzureKeyCredential("SuperSecretKey"))
.WithConsistencyLevel(ConsistencyLevel.Strong)
.WithApplicationRegion("East US 2");
CosmosClient client = cosmosClientBuilder.Build();
]]></code></example>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CosmosClientBuilder (string accountEndpoint, Azure.Core.TokenCredential tokenCredential);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string accountEndpoint, class Azure.Core.TokenCredential tokenCredential) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.#ctor(System.String,Azure.Core.TokenCredential)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (accountEndpoint As String, tokenCredential As TokenCredential)" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder : string * Azure.Core.TokenCredential -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="new Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder (accountEndpoint, tokenCredential)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="accountEndpoint" Type="System.String" />
<Parameter Name="tokenCredential" Type="Azure.Core.TokenCredential" />
</Parameters>
<Docs>
<param name="accountEndpoint">The Uri to the Cosmos Account. Example: https://{Cosmos Account Name}.documents.azure.com:443/ </param>
<param name="tokenCredential">An instance of <see cref="T:Azure.Core.TokenCredential" /></param>
<summary>
Initializes a new <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> with a <see cref="T:Azure.Core.TokenCredential" /> instance.
</summary>
<remarks>To be added.</remarks>
<example>
The example below creates a new <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> using a <see cref="T:Azure.Core.TokenCredential" />.
<code language="c#"><![CDATA[
CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder(
accountEndpoint: "https://testcosmos.documents.azure.com:443/",
tokenCredential: new DefaultAzureCredential());
CosmosClient client = cosmosClientBuilder.Build();
]]></code></example>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CosmosClientBuilder (string accountEndpoint, string authKeyOrResourceToken);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string accountEndpoint, string authKeyOrResourceToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.#ctor(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (accountEndpoint As String, authKeyOrResourceToken As String)" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder : string * string -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="new Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder (accountEndpoint, authKeyOrResourceToken)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="accountEndpoint" Type="System.String" />
<Parameter Name="authKeyOrResourceToken" Type="System.String" />
</Parameters>
<Docs>
<param name="accountEndpoint">The Uri to the Cosmos Account. Example: https://{Cosmos Account Name}.documents.azure.com:443/ </param>
<param name="authKeyOrResourceToken">The key to the account or resource token.</param>
<summary>
Initialize a new CosmosConfiguration class that holds all the properties the CosmosClient requires.
</summary>
<remarks>To be added.</remarks>
<example>
The example below creates a new <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /><code language="c#"><![CDATA[
CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder(
accountEndpoint: "https://testcosmos.documents.azure.com:443/",
authKeyOrResourceToken: "SuperSecretKey");
CosmosClient client = cosmosClientBuilder.Build();
]]></code></example>
<example>
The example below creates a new <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> with a ConsistencyLevel and a list of preferred locations.
<code language="c#"><![CDATA[
CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder(
accountEndpoint: "https://testcosmos.documents.azure.com:443/",
authKeyOrResourceToken: "SuperSecretKey")
.WithConsistencyLevel(ConsistencyLevel.Strong)
.WithApplicationRegion("East US 2");
CosmosClient client = cosmosClientBuilder.Build();
]]></code></example>
</Docs>
</Member>
<Member MemberName="AddCustomHandlers">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder AddCustomHandlers (params Microsoft.Azure.Cosmos.RequestHandler[] customHandlers);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder AddCustomHandlers(class Microsoft.Azure.Cosmos.RequestHandler[] customHandlers) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.AddCustomHandlers(Microsoft.Azure.Cosmos.RequestHandler[])" />
<MemberSignature Language="VB.NET" Value="Public Function AddCustomHandlers (ParamArray customHandlers As RequestHandler()) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.AddCustomHandlers : Microsoft.Azure.Cosmos.RequestHandler[] -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.AddCustomHandlers customHandlers" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="customHandlers" Type="Microsoft.Azure.Cosmos.RequestHandler[]">
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ParamArray]</AttributeName>
<AttributeName Language="F#">[<System.ParamArray>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="customHandlers">A list of <see cref="T:Microsoft.Azure.Cosmos.RequestHandler" /> instaces to add to the pipeline.</param>
<summary>
Sets an array of custom handlers to the request. The handlers will be chained in
the order listed. The InvokerHandler.InnerHandler is required to be null to allow the
pipeline to chain the handlers.
</summary>
<returns>The current <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns>
<remarks>To be added.</remarks>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.CustomHandlers" />
</Docs>
</Member>
<Member MemberName="Build">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.CosmosClient Build ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.CosmosClient Build() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.Build" />
<MemberSignature Language="VB.NET" Value="Public Function Build () As CosmosClient" />
<MemberSignature Language="F#" Value="member this.Build : unit -> Microsoft.Azure.Cosmos.CosmosClient" Usage="cosmosClientBuilder.Build " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.CosmosClient</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
A method to create the cosmos client
CosmosClient is thread-safe. Its recommended to maintain a single instance of CosmosClient per lifetime
of the application which enables efficient connection management and performance. Please refer to the
<see href="https://learn.microsoft.com/azure/cosmos-db/nosql/performance-tips-dotnet-sdk-v3">performance guide</see>.
</summary>
<returns>An instance of <see cref="T:Microsoft.Azure.Cosmos.CosmosClient" />.</returns>
<remarks>
Setting this property after sending any request won't have any effect.
The returned reference doesn't guarantee credentials or connectivity validations because creation doesn't make any network calls.
</remarks>
</Docs>
</Member>
<Member MemberName="BuildAndInitializeAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient> BuildAndInitializeAsync (System.Collections.Generic.IReadOnlyList<(string databaseId, string containerId)> containers, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Threading.Tasks.Task`1<class Microsoft.Azure.Cosmos.CosmosClient> BuildAndInitializeAsync(class System.Collections.Generic.IReadOnlyList`1<valuetype System.ValueTuple`2<string, string>> containers, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.BuildAndInitializeAsync(System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.String,System.String}},System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Function BuildAndInitializeAsync (containers As IReadOnlyList(Of ValueTuple(Of String, String)), Optional cancellationToken As CancellationToken = Nothing) As Task(Of CosmosClient)" />
<MemberSignature Language="F#" Value="member this.BuildAndInitializeAsync : System.Collections.Generic.IReadOnlyList<ValueTuple<string, string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient>" Usage="cosmosClientBuilder.BuildAndInitializeAsync (containers, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="containers" Type="System.Collections.Generic.IReadOnlyList<System.ValueTuple<System.String,System.String>>">
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Runtime.CompilerServices.TupleElementNames(new System.String[] { "databaseId", "containerId" })]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.TupleElementNames(new System.String[] { "databaseId", "containerId" })>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="containers">Containers to be initialized identified by it's database name and container name.</param>
<param name="cancellationToken">(Optional) Cancellation Token</param>
<summary>
A method to create the cosmos client and initialize the provided containers.
In addition to that it initializes the client with containers provided i.e The SDK warms up the caches and
connections before the first call to the service is made. Use this to obtain lower latency while startup of your application.
CosmosClient is thread-safe. Its recommended to maintain a single instance of CosmosClient per lifetime
of the application which enables efficient connection management and performance. Please refer to the
<see href="https://learn.microsoft.com/azure/cosmos-db/nosql/performance-tips-dotnet-sdk-v3">performance guide</see>.
</summary>
<returns>
A CosmosClient object.
</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="WithApplicationName">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithApplicationName (string applicationName);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithApplicationName(string applicationName) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithApplicationName(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function WithApplicationName (applicationName As String) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithApplicationName : string -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithApplicationName applicationName" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="applicationName" Type="System.String" />
</Parameters>
<Docs>
<param name="applicationName">A string to use as suffix in the User Agent.</param>
<summary>
A suffix to be added to the default user-agent for the Azure Cosmos DB service.
</summary>
<returns>The current <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns>
<remarks>
Setting this property after sending any request won't have any effect.
</remarks>
</Docs>
</Member>
<Member MemberName="WithApplicationPreferredRegions">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithApplicationPreferredRegions (System.Collections.Generic.IReadOnlyList<string> applicationPreferredRegions);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithApplicationPreferredRegions(class System.Collections.Generic.IReadOnlyList`1<string> applicationPreferredRegions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithApplicationPreferredRegions(System.Collections.Generic.IReadOnlyList{System.String})" />
<MemberSignature Language="VB.NET" Value="Public Function WithApplicationPreferredRegions (applicationPreferredRegions As IReadOnlyList(Of String)) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithApplicationPreferredRegions : System.Collections.Generic.IReadOnlyList<string> -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithApplicationPreferredRegions applicationPreferredRegions" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="applicationPreferredRegions" Type="System.Collections.Generic.IReadOnlyList<System.String>" />
</Parameters>
<Docs>
<param name="applicationPreferredRegions">A list of preferred Azure regions used for SDK to define failover order.</param>
<summary>
Set the preferred regions for geo-replicated database accounts in the Azure Cosmos DB service.
</summary>
<returns>The current <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns>
<remarks>
This function is an alternative to <see cref="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithApplicationRegion(System.String)" />, either one can be set but not both.
</remarks>
<example>
The example below creates a new <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> with a of preferred regions.
<code language="c#"><![CDATA[
CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder(
accountEndpoint: "https://testcosmos.documents.azure.com:443/",
authKeyOrResourceToken: "SuperSecretKey")
.WithApplicationPreferredRegions(new[] {Regions.EastUS, Regions.EastUS2});
CosmosClient client = cosmosClientBuilder.Build();
]]></code></example>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationPreferredRegions" />
</Docs>
</Member>
<Member MemberName="WithApplicationRegion">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithApplicationRegion (string applicationRegion);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithApplicationRegion(string applicationRegion) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithApplicationRegion(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function WithApplicationRegion (applicationRegion As String) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithApplicationRegion : string -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithApplicationRegion applicationRegion" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="applicationRegion" Type="System.String" />
</Parameters>
<Docs>
<param name="applicationRegion">Azure region where application is running. <see cref="T:Microsoft.Azure.Cosmos.Regions" /> lists valid Cosmos DB regions.</param>
<summary>
Set the preferred geo-replicated region to be used in the Azure Cosmos DB service.
</summary>
<returns>The current <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns>
<remarks>To be added.</remarks>
<example>
The example below creates a new <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> with a of preferred region.
<code language="c#"><![CDATA[
CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder(
accountEndpoint: "https://testcosmos.documents.azure.com:443/",
authKeyOrResourceToken: "SuperSecretKey")
.WithApplicationRegion("East US 2");
CosmosClient client = cosmosClientBuilder.Build();
]]></code></example>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationRegion" />
</Docs>
</Member>
<Member MemberName="WithBulkExecution">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithBulkExecution (bool enabled);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithBulkExecution(bool enabled) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithBulkExecution(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Function WithBulkExecution (enabled As Boolean) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithBulkExecution : bool -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithBulkExecution enabled" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="enabled" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="enabled">Whether <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.AllowBulkExecution" /> is enabled.</param>
<summary>
Allows optimistic batching of requests to service. Setting this option might impact the latency of the operations. Hence this option is recommended for non-latency sensitive scenarios only.
</summary>
<returns>The <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> object</returns>
<remarks>To be added.</remarks>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.AllowBulkExecution" />
</Docs>
</Member>
<Member MemberName="WithClientTelemetryOptions">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithClientTelemetryOptions (Microsoft.Azure.Cosmos.CosmosClientTelemetryOptions options);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithClientTelemetryOptions(class Microsoft.Azure.Cosmos.CosmosClientTelemetryOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithClientTelemetryOptions(Microsoft.Azure.Cosmos.CosmosClientTelemetryOptions)" />
<MemberSignature Language="VB.NET" Value="Public Function WithClientTelemetryOptions (options As CosmosClientTelemetryOptions) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithClientTelemetryOptions : Microsoft.Azure.Cosmos.CosmosClientTelemetryOptions -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithClientTelemetryOptions options" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="options" Type="Microsoft.Azure.Cosmos.CosmosClientTelemetryOptions" />
</Parameters>
<Docs>
<param name="options" />
<summary>
To enable Telemetry features with corresponding options
</summary>
<returns>The <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> object</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="WithConnectionModeDirect">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithConnectionModeDirect ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithConnectionModeDirect() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithConnectionModeDirect" />
<MemberSignature Language="VB.NET" Value="Public Function WithConnectionModeDirect () As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithConnectionModeDirect : unit -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithConnectionModeDirect " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
Sets the connection mode to Direct. This is used by the client when connecting to the Azure Cosmos DB service.
</summary>
<returns>The current <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns>
<remarks>
For more information, see <see href="https://learn.microsoft.com/azure/cosmos-db/nosql/performance-tips-dotnet-sdk-v3#direct-connection">Connection policy: Use direct connection mode</see>.
</remarks>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ConnectionMode" />
</Docs>
</Member>
<Member MemberName="WithConnectionModeDirect">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithConnectionModeDirect (TimeSpan? idleTcpConnectionTimeout = default, TimeSpan? openTcpConnectionTimeout = default, int? maxRequestsPerTcpConnection = default, int? maxTcpConnectionsPerEndpoint = default, Microsoft.Azure.Cosmos.PortReuseMode? portReuseMode = default, bool? enableTcpConnectionEndpointRediscovery = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithConnectionModeDirect(valuetype System.Nullable`1<valuetype System.TimeSpan> idleTcpConnectionTimeout, valuetype System.Nullable`1<valuetype System.TimeSpan> openTcpConnectionTimeout, valuetype System.Nullable`1<int32> maxRequestsPerTcpConnection, valuetype System.Nullable`1<int32> maxTcpConnectionsPerEndpoint, valuetype System.Nullable`1<valuetype Microsoft.Azure.Cosmos.PortReuseMode> portReuseMode, valuetype System.Nullable`1<bool> enableTcpConnectionEndpointRediscovery) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithConnectionModeDirect(System.Nullable{System.TimeSpan},System.Nullable{System.TimeSpan},System.Nullable{System.Int32},System.Nullable{System.Int32},System.Nullable{Microsoft.Azure.Cosmos.PortReuseMode},System.Nullable{System.Boolean})" />
<MemberSignature Language="VB.NET" Value="Public Function WithConnectionModeDirect (Optional idleTcpConnectionTimeout As Nullable(Of TimeSpan) = Nothing, Optional openTcpConnectionTimeout As Nullable(Of TimeSpan) = Nothing, Optional maxRequestsPerTcpConnection As Nullable(Of Integer) = Nothing, Optional maxTcpConnectionsPerEndpoint As Nullable(Of Integer) = Nothing, Optional portReuseMode As Nullable(Of PortReuseMode) = Nothing, Optional enableTcpConnectionEndpointRediscovery As Nullable(Of Boolean) = Nothing) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithConnectionModeDirect : Nullable<TimeSpan> * Nullable<TimeSpan> * Nullable<int> * Nullable<int> * Nullable<Microsoft.Azure.Cosmos.PortReuseMode> * Nullable<bool> -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithConnectionModeDirect (idleTcpConnectionTimeout, openTcpConnectionTimeout, maxRequestsPerTcpConnection, maxTcpConnectionsPerEndpoint, portReuseMode, enableTcpConnectionEndpointRediscovery)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="idleTcpConnectionTimeout" Type="System.Nullable<System.TimeSpan>" />
<Parameter Name="openTcpConnectionTimeout" Type="System.Nullable<System.TimeSpan>" />
<Parameter Name="maxRequestsPerTcpConnection" Type="System.Nullable<System.Int32>" />
<Parameter Name="maxTcpConnectionsPerEndpoint" Type="System.Nullable<System.Int32>" />
<Parameter Name="portReuseMode" Type="System.Nullable<Microsoft.Azure.Cosmos.PortReuseMode>" />
<Parameter Name="enableTcpConnectionEndpointRediscovery" Type="System.Nullable<System.Boolean>" />
</Parameters>
<Docs>
<param name="idleTcpConnectionTimeout">
Controls the amount of idle time after which unused connections are closed.
By default, idle connections are kept open indefinitely. Value must be greater than or equal to 10 minutes. Recommended values are between 20 minutes and 24 hours.
Mainly useful for sparse infrequent access to a large database account.
</param>
<param name="openTcpConnectionTimeout">
Controls the amount of time allowed for trying to establish a connection.
The default timeout is 5 seconds. Recommended values are greater than or equal to 5 seconds.
When the time elapses, the attempt is cancelled and an error is returned. Longer timeouts will delay retries and failures.
</param>
<param name="maxRequestsPerTcpConnection">
Controls the number of requests allowed simultaneously over a single TCP connection. When more requests are in flight simultaneously, the direct/TCP client will open additional connections.
The default settings allow 30 simultaneous requests per connection.
Do not set this value lower than 4 requests per connection or higher than 50-100 requests per connection.
The former can lead to a large number of connections to be created.
The latter can lead to head of line blocking, high latency and timeouts.
Applications with a very high degree of parallelism per connection, with large requests or responses, or with very tight latency requirements might get better performance with 8-16 requests per connection.
</param>
<param name="maxTcpConnectionsPerEndpoint">
Controls the maximum number of TCP connections that may be opened to each Cosmos DB back-end.
Together with MaxRequestsPerTcpConnection, this setting limits the number of requests that are simultaneously sent to a single Cosmos DB back-end(MaxRequestsPerTcpConnection x MaxTcpConnectionPerEndpoint).
The default value is 65,535. Value must be greater than or equal to 16.
</param>
<param name="portReuseMode">
(Direct/TCP) Controls the client port reuse policy used by the transport stack.
The default value is PortReuseMode.ReuseUnicastPort.
</param>
<param name="enableTcpConnectionEndpointRediscovery">
(Direct/TCP) Controls the address cache refresh on TCP connection reset notification.
The default value is false.
</param>
<summary>
Sets the connection mode to Direct. This is used by the client when connecting to the Azure Cosmos DB service.
</summary>
<returns>The current <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns>
<remarks>
For more information, see <see href="https://learn.microsoft.com/azure/cosmos-db/nosql/performance-tips-dotnet-sdk-v3#direct-connection">Connection policy: Use direct connection mode</see>.
</remarks>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ConnectionMode" />
</Docs>
</Member>
<Member MemberName="WithConnectionModeGateway">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithConnectionModeGateway (int? maxConnectionLimit = default, System.Net.IWebProxy webProxy = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithConnectionModeGateway(valuetype System.Nullable`1<int32> maxConnectionLimit, class System.Net.IWebProxy webProxy) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithConnectionModeGateway(System.Nullable{System.Int32},System.Net.IWebProxy)" />
<MemberSignature Language="VB.NET" Value="Public Function WithConnectionModeGateway (Optional maxConnectionLimit As Nullable(Of Integer) = Nothing, Optional webProxy As IWebProxy = Nothing) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithConnectionModeGateway : Nullable<int> * System.Net.IWebProxy -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithConnectionModeGateway (maxConnectionLimit, webProxy)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="maxConnectionLimit" Type="System.Nullable<System.Int32>" />
<Parameter Name="webProxy" Type="System.Net.IWebProxy" />
</Parameters>
<Docs>
<param name="maxConnectionLimit">The number specifies the number of connections that may be opened simultaneously. Default is 50 connections</param>
<param name="webProxy">Get or set the proxy information used for web requests.</param>
<summary>
Sets the connection mode to Gateway. This is used by the client when connecting to the Azure Cosmos DB service.
</summary>
<returns>The current <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns>
<remarks>
For more information, see <see href="https://learn.microsoft.com/azure/cosmos-db/nosql/performance-tips-dotnet-sdk-v3#direct-connection">Connection policy: Use direct connection mode</see>.
</remarks>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.GatewayModeMaxConnectionLimit" />
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ConnectionMode" />
</Docs>
</Member>
<Member MemberName="WithConsistencyLevel">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithConsistencyLevel (Microsoft.Azure.Cosmos.ConsistencyLevel consistencyLevel);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithConsistencyLevel(valuetype Microsoft.Azure.Cosmos.ConsistencyLevel consistencyLevel) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithConsistencyLevel(Microsoft.Azure.Cosmos.ConsistencyLevel)" />
<MemberSignature Language="VB.NET" Value="Public Function WithConsistencyLevel (consistencyLevel As ConsistencyLevel) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithConsistencyLevel : Microsoft.Azure.Cosmos.ConsistencyLevel -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithConsistencyLevel consistencyLevel" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="consistencyLevel" Type="Microsoft.Azure.Cosmos.ConsistencyLevel" />
</Parameters>
<Docs>
<param name="consistencyLevel">The desired consistency level for the client.</param>
<summary>
This can be used to weaken the database account consistency level for read operations.
If this is not set the database account consistency level will be used for all requests.
</summary>
<returns>The current <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="WithContentResponseOnWrite">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithContentResponseOnWrite (bool contentResponseOnWrite);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithContentResponseOnWrite(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Function WithContentResponseOnWrite (contentResponseOnWrite As Boolean) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithContentResponseOnWrite : bool -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithContentResponseOnWrite contentResponseOnWrite" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="contentResponseOnWrite" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="contentResponseOnWrite">a boolean indicating whether payload will be included in the response or not.</param>
<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>
<returns>The <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> object</returns>
<remarks>
<para>
This option can be overriden by similar property in ItemRequestOptions and TransactionalBatchItemRequestOptions
</para>
</remarks>
<altmember cref="P:Microsoft.Azure.Cosmos.TransactionalBatchItemRequestOptions.EnableContentResponseOnWrite" />
<altmember cref="P:Microsoft.Azure.Cosmos.ItemRequestOptions.EnableContentResponseOnWrite" />
</Docs>
</Member>
<Member MemberName="WithCustomAccountEndpoints">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithCustomAccountEndpoints (System.Collections.Generic.IEnumerable<Uri> customAccountEndpoints);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithCustomAccountEndpoints(class System.Collections.Generic.IEnumerable`1<class System.Uri> customAccountEndpoints) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithCustomAccountEndpoints(System.Collections.Generic.IEnumerable{System.Uri})" />
<MemberSignature Language="VB.NET" Value="Public Function WithCustomAccountEndpoints (customAccountEndpoints As IEnumerable(Of Uri)) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithCustomAccountEndpoints : seq<Uri> -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithCustomAccountEndpoints customAccountEndpoints" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="customAccountEndpoints" Type="System.Collections.Generic.IEnumerable<System.Uri>" />
</Parameters>
<Docs>
<param name="customAccountEndpoints">An instance of <see cref="T:System.Collections.Generic.IEnumerable`1" /> of Uri containing the custom private endpoints for the cosmos db account.</param>
<summary>
Sets the custom endpoints to use for account initialization for geo-replicated database accounts in the Azure Cosmos DB service.
During the CosmosClient initialization the account information, including the available regions, is obtained from the <see cref="P:Microsoft.Azure.Cosmos.CosmosClient.Endpoint" />.
Should the global endpoint become inaccessible, the CosmosClient will attempt to obtain the account information issuing requests to the custom endpoints
provided in the customAccountEndpoints list.
</summary>
<returns>The current <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns>
<remarks>
This function is optional and is recommended for implementation when a customer has configured one or more endpoints with a custom DNS
hostname (instead of accountname-region.documents.azure.com) etc. for their Cosmos DB account.
</remarks>
<example>
The example below creates a new instance of <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> with the regional endpoints.
<code language="c#"><![CDATA[
CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder(
accountEndpoint: "https://testcosmos.documents.azure.com:443/",
authKeyOrResourceToken: "SuperSecretKey")
.WithCustomAccountEndpoints(new HashSet<Uri>()
{
new Uri("https://region-1.documents-test.windows-int.net:443/"),
new Uri("https://region-2.documents-test.windows-int.net:443/")
});
CosmosClient client = cosmosClientBuilder.Build();
]]></code></example>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.AccountInitializationCustomEndpoints" />
</Docs>
</Member>
<Member MemberName="WithCustomSerializer">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithCustomSerializer (Microsoft.Azure.Cosmos.CosmosSerializer cosmosJsonSerializer);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithCustomSerializer(class Microsoft.Azure.Cosmos.CosmosSerializer cosmosJsonSerializer) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithCustomSerializer(Microsoft.Azure.Cosmos.CosmosSerializer)" />
<MemberSignature Language="VB.NET" Value="Public Function WithCustomSerializer (cosmosJsonSerializer As CosmosSerializer) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithCustomSerializer : Microsoft.Azure.Cosmos.CosmosSerializer -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithCustomSerializer cosmosJsonSerializer" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cosmosJsonSerializer" Type="Microsoft.Azure.Cosmos.CosmosSerializer" />
</Parameters>
<Docs>
<param name="cosmosJsonSerializer">The custom class that implements <see cref="T:Microsoft.Azure.Cosmos.CosmosSerializer" /></param>
<summary>
Set a custom JSON serializer.
</summary>
<returns>The <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> object</returns>
<remarks>To be added.</remarks>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.Serializer" />
<altmember cref="T:Microsoft.Azure.Cosmos.CosmosSerializer" />
</Docs>
</Member>
<Member MemberName="WithHttpClientFactory">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithHttpClientFactory (Func<System.Net.Http.HttpClient> httpClientFactory);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithHttpClientFactory(class System.Func`1<class System.Net.Http.HttpClient> httpClientFactory) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithHttpClientFactory(System.Func{System.Net.Http.HttpClient})" />
<MemberSignature Language="VB.NET" Value="Public Function WithHttpClientFactory (httpClientFactory As Func(Of HttpClient)) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithHttpClientFactory : Func<System.Net.Http.HttpClient> -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithHttpClientFactory httpClientFactory" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="httpClientFactory" Type="System.Func<System.Net.Http.HttpClient>" />
</Parameters>
<Docs>
<param name="httpClientFactory">A delegate function to generate instances of HttpClient.</param>
<summary>
Sets a delegate to use to obtain an HttpClient instance to be used for HTTPS communication.
</summary>
<returns>The <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> object</returns>
<remarks>
<para>
HTTPS communication is used when <see cref="T:Microsoft.Azure.Cosmos.ConnectionMode" /> is set to <see cref="F:Microsoft.Azure.Cosmos.ConnectionMode.Gateway" /> for all operations and when <see cref="T:Microsoft.Azure.Cosmos.ConnectionMode" /> is <see cref="F:Microsoft.Azure.Cosmos.ConnectionMode.Direct" /> (default) for metadata operations.
</para>
<para>
Useful in scenarios where the application is using a pool of HttpClient instances to be shared, like ASP.NET Core applications with IHttpClientFactory or Blazor WebAssembly applications.
</para>
</remarks>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.HttpClientFactory" />
</Docs>
</Member>
<Member MemberName="WithLimitToEndpoint">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithLimitToEndpoint (bool limitToEndpoint);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithLimitToEndpoint(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Function WithLimitToEndpoint (limitToEndpoint As Boolean) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithLimitToEndpoint : bool -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithLimitToEndpoint limitToEndpoint" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="limitToEndpoint" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="limitToEndpoint">Whether operations are limited to the endpoint or not.</param>
<summary>
Limits the operations to the provided endpoint on the CosmosClientBuilder constructor.
</summary>
<returns>Default value is false.</returns>
<remarks>
When the value of <paramref name="limitToEndpoint" /> is false, the SDK will automatically discover all account write and read regions, and use them when the configured application region is not available.
When set to true, availability is limited to the endpoint specified on the CosmosClientBuilder constructor.
Using <see cref="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithApplicationRegion(System.String)" /> is not allowed when the value is true. </remarks>
<example>
The example below creates a new <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> to limit the endpoint to East US.
<code language="c#"><![CDATA[
CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder(
accountEndpoint: "https://testcosmos-eastus.documents.azure.com:443/",
authKeyOrResourceToken: "SuperSecretKey")
.WithLimitToEndpoint(true);
CosmosClient client = cosmosClientBuilder.Build();
]]></code></example>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.LimitToEndpoint" />
</Docs>
</Member>
<Member MemberName="WithPriorityLevel">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithPriorityLevel (Microsoft.Azure.Cosmos.PriorityLevel priorityLevel);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithPriorityLevel(valuetype Microsoft.Azure.Cosmos.PriorityLevel priorityLevel) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithPriorityLevel(Microsoft.Azure.Cosmos.PriorityLevel)" />
<MemberSignature Language="VB.NET" Value="Public Function WithPriorityLevel (priorityLevel As PriorityLevel) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithPriorityLevel : Microsoft.Azure.Cosmos.PriorityLevel -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithPriorityLevel priorityLevel" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="priorityLevel" Type="Microsoft.Azure.Cosmos.PriorityLevel" />
</Parameters>
<Docs>
<param name="priorityLevel">The desired priority level for the client.</param>
<summary>
Sets the priority level for requests created using cosmos client.
</summary>
<returns>The current <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns>
<remarks>
If priority level is also set at request level in <see cref="P:Microsoft.Azure.Documents.Client.RequestOptions.PriorityLevel" />, that priority is used.
If <see cref="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithBulkExecution(System.Boolean)" /> is set to true, priority level set on the CosmosClient is used.
</remarks>
</Docs>
</Member>
<Member MemberName="WithRequestTimeout">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithRequestTimeout (TimeSpan requestTimeout);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithRequestTimeout(valuetype System.TimeSpan requestTimeout) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithRequestTimeout(System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Function WithRequestTimeout (requestTimeout As TimeSpan) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithRequestTimeout : TimeSpan -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithRequestTimeout requestTimeout" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="requestTimeout" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="requestTimeout">A time to use as timeout for operations.</param>
<summary>
Sets the request timeout in seconds when connecting to the Azure Cosmos DB service.
</summary>
<returns>Default value is 60 seconds.</returns>
<remarks>To be added.</remarks>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.RequestTimeout" />
</Docs>
</Member>
<Member MemberName="WithSerializerOptions">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithSerializerOptions (Microsoft.Azure.Cosmos.CosmosSerializationOptions cosmosSerializerOptions);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithSerializerOptions(class Microsoft.Azure.Cosmos.CosmosSerializationOptions cosmosSerializerOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithSerializerOptions(Microsoft.Azure.Cosmos.CosmosSerializationOptions)" />
<MemberSignature Language="VB.NET" Value="Public Function WithSerializerOptions (cosmosSerializerOptions As CosmosSerializationOptions) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithSerializerOptions : Microsoft.Azure.Cosmos.CosmosSerializationOptions -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithSerializerOptions cosmosSerializerOptions" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cosmosSerializerOptions" Type="Microsoft.Azure.Cosmos.CosmosSerializationOptions" />
</Parameters>
<Docs>
<param name="cosmosSerializerOptions">The custom class that implements <see cref="T:Microsoft.Azure.Cosmos.CosmosSerializer" /></param>
<summary>
Set a custom serializer option.
</summary>
<returns>The <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> object</returns>
<remarks>To be added.</remarks>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.SerializerOptions" />
<altmember cref="T:Microsoft.Azure.Cosmos.CosmosSerializer" />
</Docs>
</Member>
<Member MemberName="WithSystemTextJsonSerializerOptions">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithSystemTextJsonSerializerOptions (System.Text.Json.JsonSerializerOptions serializerOptions);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithSystemTextJsonSerializerOptions(class System.Text.Json.JsonSerializerOptions serializerOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithSystemTextJsonSerializerOptions(System.Text.Json.JsonSerializerOptions)" />
<MemberSignature Language="VB.NET" Value="Public Function WithSystemTextJsonSerializerOptions (serializerOptions As JsonSerializerOptions) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithSystemTextJsonSerializerOptions : System.Text.Json.JsonSerializerOptions -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithSystemTextJsonSerializerOptions serializerOptions" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="serializerOptions" Type="System.Text.Json.JsonSerializerOptions" />
</Parameters>
<Docs>
<param name="serializerOptions">An instance of <see cref="T:System.Text.Json.JsonSerializerOptions" />
containing the system text json serializer options.</param>
<summary>
Configures the <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> to use System.Text.Json for serialization.
Use <see cref="T:System.Text.Json.JsonSerializerOptions" /> to use System.Text.Json with a default configuration.
If no options are specified, Newtonsoft.Json will be used for serialization instead.
</summary>
<returns>The <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" /> object</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="WithThrottlingRetryOptions">
<MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithThrottlingRetryOptions (TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithThrottlingRetryOptions(valuetype System.TimeSpan maxRetryWaitTimeOnThrottledRequests, int32 maxRetryAttemptsOnThrottledRequests) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithThrottlingRetryOptions(System.TimeSpan,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function WithThrottlingRetryOptions (maxRetryWaitTimeOnThrottledRequests As TimeSpan, maxRetryAttemptsOnThrottledRequests As Integer) As CosmosClientBuilder" />
<MemberSignature Language="F#" Value="member this.WithThrottlingRetryOptions : TimeSpan * int -> Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithThrottlingRetryOptions (maxRetryWaitTimeOnThrottledRequests, maxRetryAttemptsOnThrottledRequests)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.45.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="maxRetryWaitTimeOnThrottledRequests" Type="System.TimeSpan" />
<Parameter Name="maxRetryAttemptsOnThrottledRequests" Type="System.Int32" />
</Parameters>
<Docs>
<param name="maxRetryWaitTimeOnThrottledRequests">The maximum retry timespan for the Azure Cosmos DB service. Any interval that is smaller than a second will be ignored.</param>
<param name="maxRetryAttemptsOnThrottledRequests">The number specifies the times retry requests for throttled requests.</param>
<summary>
Sets the maximum time to wait between retry and the max number of times to retry on throttled requests.
</summary>
<returns>The current <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns>
<remarks>To be added.</remarks>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.MaxRetryAttemptsOnRateLimitedRequests" />
<para>
When a request fails due to a rate limiting error, the service sends back a response that
contains a value indicating the client should not retry before the time period has
elapsed. This property allows the application to set a maximum wait time for all retry attempts.
If the cumulative wait time exceeds the this value, the client will stop retrying and return the error to the application.
</para>
<para>
For more information, see <see href="https://learn.microsoft.com/azure/cosmos-db/nosql/performance-tips-dotnet-sdk-v3#429">Handle rate limiting/request rate too large</see>.
</para>
<altmember cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.MaxRetryWaitTimeOnRateLimitedRequests" />
</Docs>
</Member>
</Members>
</Type>