-
Notifications
You must be signed in to change notification settings - Fork 260
/
CosmosClient.xml
1177 lines (1140 loc) · 92.5 KB
/
CosmosClient.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
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Type Name="CosmosClient" FullName="Microsoft.Azure.Cosmos.CosmosClient">
<TypeSignature Language="C#" Value="public class CosmosClient : IDisposable" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi CosmosClient extends System.Object implements class System.IDisposable" />
<TypeSignature Language="DocId" Value="T:Microsoft.Azure.Cosmos.CosmosClient" />
<TypeSignature Language="VB.NET" Value="Public Class CosmosClient
Implements IDisposable" />
<TypeSignature Language="F#" Value="type CosmosClient = class
 interface IDisposable" />
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.36.0.0</AssemblyVersion>
<AssemblyVersion>3.38.1.0</AssemblyVersion>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>
Provides a client-side logical representation of the Azure Cosmos DB account.
This client can be used to configure and execute requests in the Azure Cosmos DB database service.
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>
<remarks>
The returned not-initialized reference doesn't guarantee credentials or connectivity validations because creation doesn't make any network calls
</remarks>
<altmember cref="T:Microsoft.Azure.Cosmos.CosmosClientOptions" />
<example>
This example create a <see cref="T:Microsoft.Azure.Cosmos.CosmosClient" />, <see cref="T:Microsoft.Azure.Cosmos.Database" />, and a <see cref="T:Microsoft.Azure.Cosmos.Container" />.
The CosmosClient is created with the connection string and configured to use "East US 2" region.
<code language="c#"><![CDATA[
using Microsoft.Azure.Cosmos;
CosmosClient cosmosClient = new CosmosClient(
"connection-string-from-portal",
new CosmosClientOptions()
{
ApplicationRegion = Regions.EastUS2,
});
Database db = await cosmosClient.CreateDatabaseAsync("database-id");
Container container = await db.CreateContainerAsync("container-id");
// Dispose cosmosClient at application exit
]]></code></example>
<example>
This example creates a <see cref="T:Microsoft.Azure.Cosmos.CosmosClient" />, <see cref="T:Microsoft.Azure.Cosmos.Database" />, and a <see cref="T:Microsoft.Azure.Cosmos.Container" />.
The CosmosClient is created with the AccountEndpoint, AccountKey or ResourceToken and configured to use "East US 2" region.
<code language="c#"><![CDATA[
using Microsoft.Azure.Cosmos;
CosmosClient cosmosClient = new CosmosClient(
"account-endpoint-from-portal",
"account-key-from-portal",
new CosmosClientOptions()
{
ApplicationRegion = Regions.EastUS2,
});
Database db = await cosmosClient.CreateDatabaseAsync("database-id");
Container container = await db.CreateContainerAsync("container-id");
// Dispose cosmosClient at application exit
]]></code></example>
<example>
This example creates a <see cref="T:Microsoft.Azure.Cosmos.CosmosClient" />, <see cref="T:Microsoft.Azure.Cosmos.Database" />, and a <see cref="T:Microsoft.Azure.Cosmos.Container" />.
The CosmosClient is created through builder pattern using <see cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />.
<code language="c#"><![CDATA[
using Microsoft.Azure.Cosmos;
using Microsoft.Azure.Cosmos.Fluent;
CosmosClient cosmosClient = new CosmosClientBuilder("connection-string-from-portal")
.WithApplicationRegion("East US 2")
.Build();
Database db = await cosmosClient.CreateDatabaseAsync("database-id")
Container container = await db.CreateContainerAsync("container-id");
// Dispose cosmosClient at application exit
]]></code></example>
<altmember cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected CosmosClient ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>
Create a new CosmosClient used for mock testing
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CosmosClient (string connectionString, Microsoft.Azure.Cosmos.CosmosClientOptions clientOptions = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string connectionString, class Microsoft.Azure.Cosmos.CosmosClientOptions clientOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.#ctor(System.String,Microsoft.Azure.Cosmos.CosmosClientOptions)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (connectionString As String, Optional clientOptions As CosmosClientOptions = Nothing)" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Cosmos.CosmosClient : string * Microsoft.Azure.Cosmos.CosmosClientOptions -> Microsoft.Azure.Cosmos.CosmosClient" Usage="new Microsoft.Azure.Cosmos.CosmosClient (connectionString, clientOptions)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="connectionString" Type="System.String" />
<Parameter Name="clientOptions" Type="Microsoft.Azure.Cosmos.CosmosClientOptions" />
</Parameters>
<Docs>
<param name="connectionString">The connection string to the cosmos account. ex: AccountEndpoint=https://XXXXX.documents.azure.com:443/;AccountKey=SuperSecretKey; </param>
<param name="clientOptions">(Optional) client options</param>
<summary>
Creates a new CosmosClient with the connection string.
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>
<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>
<altmember cref="T:Microsoft.Azure.Cosmos.CosmosClientOptions" />
<example>
The CosmosClient is created with the connection string and configured to use "East US 2" region.
<code language="c#"><![CDATA[
using Microsoft.Azure.Cosmos;
CosmosClient cosmosClient = new CosmosClient(
"account-endpoint-from-portal",
"account-key-from-portal",
new CosmosClientOptions()
{
ApplicationRegion = Regions.EastUS2,
});
// Dispose cosmosClient at application exit
]]></code></example>
<altmember cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CosmosClient (string accountEndpoint, Azure.AzureKeyCredential authKeyOrResourceTokenCredential, Microsoft.Azure.Cosmos.CosmosClientOptions clientOptions = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string accountEndpoint, class Azure.AzureKeyCredential authKeyOrResourceTokenCredential, class Microsoft.Azure.Cosmos.CosmosClientOptions clientOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.#ctor(System.String,Azure.AzureKeyCredential,Microsoft.Azure.Cosmos.CosmosClientOptions)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (accountEndpoint As String, authKeyOrResourceTokenCredential As AzureKeyCredential, Optional clientOptions As CosmosClientOptions = Nothing)" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Cosmos.CosmosClient : string * Azure.AzureKeyCredential * Microsoft.Azure.Cosmos.CosmosClientOptions -> Microsoft.Azure.Cosmos.CosmosClient" Usage="new Microsoft.Azure.Cosmos.CosmosClient (accountEndpoint, authKeyOrResourceTokenCredential, clientOptions)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="accountEndpoint" Type="System.String" />
<Parameter Name="authKeyOrResourceTokenCredential" Type="Azure.AzureKeyCredential" />
<Parameter Name="clientOptions" Type="Microsoft.Azure.Cosmos.CosmosClientOptions" />
</Parameters>
<Docs>
<param name="accountEndpoint">The cosmos service endpoint to use</param>
<param name="authKeyOrResourceTokenCredential">AzureKeyCredential with master-key or resource token..</param>
<param name="clientOptions">(Optional) client options</param>
<summary>
Creates a new CosmosClient with the account endpoint URI string and AzureKeyCredential.
AzureKeyCredential enables changing/updating master-key/ResourceToken while CosmosClient is still in use.
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>
<remarks>
AzureKeyCredential enables changing/updating master-key/ResourceToken whle CosmosClient is still in use.
The returned reference doesn't guarantee credentials or connectivity validations because creation doesn't make any network calls.
</remarks>
<altmember cref="T:Microsoft.Azure.Cosmos.CosmosClientOptions" />
<example>
The CosmosClient is created with the AccountEndpoint, AccountKey or ResourceToken and configured to use "East US 2" region.
<code language="c#"><![CDATA[
using Microsoft.Azure.Cosmos;
AzureKeyCredential keyCredential = new AzureKeyCredential("account-master-key/ResourceToken");
CosmosClient cosmosClient = new CosmosClient(
"account-endpoint-from-portal",
keyCredential,
new CosmosClientOptions()
{
ApplicationRegion = Regions.EastUS2,
});
....
// To udpate key/credentials
keyCredential.Update("updated master-key/ResourceToken");
// Dispose cosmosClient at application exit
]]></code></example>
<altmember cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CosmosClient (string accountEndpoint, Azure.Core.TokenCredential tokenCredential, Microsoft.Azure.Cosmos.CosmosClientOptions clientOptions = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string accountEndpoint, class Azure.Core.TokenCredential tokenCredential, class Microsoft.Azure.Cosmos.CosmosClientOptions clientOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.#ctor(System.String,Azure.Core.TokenCredential,Microsoft.Azure.Cosmos.CosmosClientOptions)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (accountEndpoint As String, tokenCredential As TokenCredential, Optional clientOptions As CosmosClientOptions = Nothing)" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Cosmos.CosmosClient : string * Azure.Core.TokenCredential * Microsoft.Azure.Cosmos.CosmosClientOptions -> Microsoft.Azure.Cosmos.CosmosClient" Usage="new Microsoft.Azure.Cosmos.CosmosClient (accountEndpoint, tokenCredential, clientOptions)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="accountEndpoint" Type="System.String" />
<Parameter Name="tokenCredential" Type="Azure.Core.TokenCredential" />
<Parameter Name="clientOptions" Type="Microsoft.Azure.Cosmos.CosmosClientOptions" />
</Parameters>
<Docs>
<param name="accountEndpoint">The cosmos service endpoint to use.</param>
<param name="tokenCredential">
<see cref="T:Azure.Core.TokenCredential" />The token to provide AAD token for authorization.</param>
<param name="clientOptions">(Optional) client options</param>
<summary>
Creates a new CosmosClient with the account endpoint URI string and TokenCredential.
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>
<remarks>
The returned reference doesn't guarantee credentials or connectivity validations because creation doesn't make any network calls.
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CosmosClient (string accountEndpoint, string authKeyOrResourceToken, Microsoft.Azure.Cosmos.CosmosClientOptions clientOptions = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string accountEndpoint, string authKeyOrResourceToken, class Microsoft.Azure.Cosmos.CosmosClientOptions clientOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.#ctor(System.String,System.String,Microsoft.Azure.Cosmos.CosmosClientOptions)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (accountEndpoint As String, authKeyOrResourceToken As String, Optional clientOptions As CosmosClientOptions = Nothing)" />
<MemberSignature Language="F#" Value="new Microsoft.Azure.Cosmos.CosmosClient : string * string * Microsoft.Azure.Cosmos.CosmosClientOptions -> Microsoft.Azure.Cosmos.CosmosClient" Usage="new Microsoft.Azure.Cosmos.CosmosClient (accountEndpoint, authKeyOrResourceToken, clientOptions)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="accountEndpoint" Type="System.String" />
<Parameter Name="authKeyOrResourceToken" Type="System.String" />
<Parameter Name="clientOptions" Type="Microsoft.Azure.Cosmos.CosmosClientOptions" />
</Parameters>
<Docs>
<param name="accountEndpoint">The cosmos service endpoint to use</param>
<param name="authKeyOrResourceToken">The cosmos account key or resource token to use to create the client.</param>
<param name="clientOptions">(Optional) client options</param>
<summary>
Creates a new CosmosClient with the account endpoint URI string and account key.
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>
<remarks>
The returned reference doesn't guarantee credentials or connectivity validations because creation doesn't make any network calls.
</remarks>
<altmember cref="T:Microsoft.Azure.Cosmos.CosmosClientOptions" />
<example>
The CosmosClient is created with the AccountEndpoint, AccountKey or ResourceToken and configured to use "East US 2" region.
<code language="c#"><![CDATA[
using Microsoft.Azure.Cosmos;
CosmosClient cosmosClient = new CosmosClient(
"account-endpoint-from-portal",
"account-key-from-portal",
new CosmosClientOptions()
{
ApplicationRegion = Regions.EastUS2,
});
// Dispose cosmosClient at application exit
]]></code></example>
<altmember cref="T:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder" />
</Docs>
</Member>
<Member MemberName="ClientOptions">
<MemberSignature Language="C#" Value="public virtual Microsoft.Azure.Cosmos.CosmosClientOptions ClientOptions { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Cosmos.CosmosClientOptions ClientOptions" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClient.ClientOptions" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property ClientOptions As CosmosClientOptions" />
<MemberSignature Language="F#" Value="member this.ClientOptions : Microsoft.Azure.Cosmos.CosmosClientOptions" Usage="Microsoft.Azure.Cosmos.CosmosClient.ClientOptions" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.CosmosClientOptions</ReturnType>
</ReturnValue>
<Docs>
<summary>
The <see cref="T:Microsoft.Azure.Cosmos.CosmosClientOptions" /> used initialize CosmosClient.
</summary>
<value>To be added.</value>
<remarks>This property is read-only. Modifying any options after the client has been created has no effect on the existing client instance.</remarks>
</Docs>
</Member>
<Member MemberName="CreateAndInitializeAsync">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient> CreateAndInitializeAsync (string connectionString, System.Collections.Generic.IReadOnlyList<(string databaseId, string containerId)> containers, Microsoft.Azure.Cosmos.CosmosClientOptions cosmosClientOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task`1<class Microsoft.Azure.Cosmos.CosmosClient> CreateAndInitializeAsync(string connectionString, class System.Collections.Generic.IReadOnlyList`1<valuetype System.ValueTuple`2<string, string>> containers, class Microsoft.Azure.Cosmos.CosmosClientOptions cosmosClientOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.CreateAndInitializeAsync(System.String,System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.String,System.String}},Microsoft.Azure.Cosmos.CosmosClientOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function CreateAndInitializeAsync (connectionString As String, containers As IReadOnlyList(Of ValueTuple(Of String, String)), Optional cosmosClientOptions As CosmosClientOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of CosmosClient)" />
<MemberSignature Language="F#" Value="static member CreateAndInitializeAsync : string * System.Collections.Generic.IReadOnlyList<ValueTuple<string, string>> * Microsoft.Azure.Cosmos.CosmosClientOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient>" Usage="Microsoft.Azure.Cosmos.CosmosClient.CreateAndInitializeAsync (connectionString, containers, cosmosClientOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="connectionString" Type="System.String" />
<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="cosmosClientOptions" Type="Microsoft.Azure.Cosmos.CosmosClientOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="connectionString">The connection string to the cosmos account. ex: AccountEndpoint=https://XXXXX.documents.azure.com:443/;AccountKey=SuperSecretKey; </param>
<param name="containers">Containers to be initialized identified by it's database name and container name.</param>
<param name="cosmosClientOptions">(Optional) client options</param>
<param name="cancellationToken">(Optional) Cancellation Token</param>
<summary>
Creates a new CosmosClient with the account endpoint URI string and TokenCredential.
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>
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>
The CosmosClient is created with the ConnectionString and 2 containers in the account are initialized
<code language="c#"><![CDATA[
using Microsoft.Azure.Cosmos;
List<(string, string)> containersToInitialize = new List<(string, string)>
{ ("DatabaseName1", "ContainerName1"), ("DatabaseName2", "ContainerName2") };
CosmosClient cosmosClient = await CosmosClient.CreateAndInitializeAsync("connection-string-from-portal",
containersToInitialize)
// Dispose cosmosClient at application exit
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateAndInitializeAsync">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient> CreateAndInitializeAsync (string accountEndpoint, Azure.AzureKeyCredential authKeyOrResourceTokenCredential, System.Collections.Generic.IReadOnlyList<(string databaseId, string containerId)> containers, Microsoft.Azure.Cosmos.CosmosClientOptions cosmosClientOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task`1<class Microsoft.Azure.Cosmos.CosmosClient> CreateAndInitializeAsync(string accountEndpoint, class Azure.AzureKeyCredential authKeyOrResourceTokenCredential, class System.Collections.Generic.IReadOnlyList`1<valuetype System.ValueTuple`2<string, string>> containers, class Microsoft.Azure.Cosmos.CosmosClientOptions cosmosClientOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.CreateAndInitializeAsync(System.String,Azure.AzureKeyCredential,System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.String,System.String}},Microsoft.Azure.Cosmos.CosmosClientOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function CreateAndInitializeAsync (accountEndpoint As String, authKeyOrResourceTokenCredential As AzureKeyCredential, containers As IReadOnlyList(Of ValueTuple(Of String, String)), Optional cosmosClientOptions As CosmosClientOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of CosmosClient)" />
<MemberSignature Language="F#" Value="static member CreateAndInitializeAsync : string * Azure.AzureKeyCredential * System.Collections.Generic.IReadOnlyList<ValueTuple<string, string>> * Microsoft.Azure.Cosmos.CosmosClientOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient>" Usage="Microsoft.Azure.Cosmos.CosmosClient.CreateAndInitializeAsync (accountEndpoint, authKeyOrResourceTokenCredential, containers, cosmosClientOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="accountEndpoint" Type="System.String" />
<Parameter Name="authKeyOrResourceTokenCredential" Type="Azure.AzureKeyCredential" />
<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="cosmosClientOptions" Type="Microsoft.Azure.Cosmos.CosmosClientOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="accountEndpoint">The cosmos service endpoint to use</param>
<param name="authKeyOrResourceTokenCredential">AzureKeyCredential with master-key or resource token.</param>
<param name="containers">Containers to be initialized identified by it's database name and container name.</param>
<param name="cosmosClientOptions">(Optional) client options</param>
<param name="cancellationToken">(Optional) Cancellation Token</param>
<summary>
Creates a new CosmosClient with the account endpoint URI string and AzureKeyCredential.
AzureKeyCredential enables changing/updating master-key/ResourceToken while CosmosClient is still in use.
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>AzureKeyCredential enables changing/updating master-key/ResourceToken whle CosmosClient is still in use.</remarks>
<example>
The CosmosClient is created with the AccountEndpoint, AccountKey or ResourceToken and 2 containers in the account are initialized
<code language="c#"><![CDATA[
using Microsoft.Azure.Cosmos;
List<(string, string)> containersToInitialize = new List<(string, string)>
{ ("DatabaseName1", "ContainerName1"), ("DatabaseName2", "ContainerName2") };
AzureKeyCredential keyCredential = new AzureKeyCredential("account-master-key/ResourceToken");
CosmosClient cosmosClient = await CosmosClient.CreateAndInitializeAsync("account-endpoint-from-portal",
keyCredential,
containersToInitialize)
....
// To udpate key/credentials
keyCredential.Update("updated master-key/ResourceToken");
// Dispose cosmosClient at application exit
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateAndInitializeAsync">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient> CreateAndInitializeAsync (string accountEndpoint, Azure.Core.TokenCredential tokenCredential, System.Collections.Generic.IReadOnlyList<(string databaseId, string containerId)> containers, Microsoft.Azure.Cosmos.CosmosClientOptions cosmosClientOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task`1<class Microsoft.Azure.Cosmos.CosmosClient> CreateAndInitializeAsync(string accountEndpoint, class Azure.Core.TokenCredential tokenCredential, class System.Collections.Generic.IReadOnlyList`1<valuetype System.ValueTuple`2<string, string>> containers, class Microsoft.Azure.Cosmos.CosmosClientOptions cosmosClientOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.CreateAndInitializeAsync(System.String,Azure.Core.TokenCredential,System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.String,System.String}},Microsoft.Azure.Cosmos.CosmosClientOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function CreateAndInitializeAsync (accountEndpoint As String, tokenCredential As TokenCredential, containers As IReadOnlyList(Of ValueTuple(Of String, String)), Optional cosmosClientOptions As CosmosClientOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of CosmosClient)" />
<MemberSignature Language="F#" Value="static member CreateAndInitializeAsync : string * Azure.Core.TokenCredential * System.Collections.Generic.IReadOnlyList<ValueTuple<string, string>> * Microsoft.Azure.Cosmos.CosmosClientOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient>" Usage="Microsoft.Azure.Cosmos.CosmosClient.CreateAndInitializeAsync (accountEndpoint, tokenCredential, containers, cosmosClientOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="accountEndpoint" Type="System.String" />
<Parameter Name="tokenCredential" Type="Azure.Core.TokenCredential" />
<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="cosmosClientOptions" Type="Microsoft.Azure.Cosmos.CosmosClientOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="accountEndpoint">The cosmos service endpoint to use.</param>
<param name="tokenCredential">
<see cref="T:Azure.Core.TokenCredential" />The token to provide AAD token for authorization.</param>
<param name="containers">Containers to be initialized identified by it's database name and container name.</param>
<param name="cosmosClientOptions">(Optional) client options</param>
<param name="cancellationToken">(Optional) Cancellation Token</param>
<summary>
Creates a new CosmosClient with the account endpoint URI string and TokenCredential.
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="CreateAndInitializeAsync">
<MemberSignature Language="C#" Value="public static System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient> CreateAndInitializeAsync (string accountEndpoint, string authKeyOrResourceToken, System.Collections.Generic.IReadOnlyList<(string databaseId, string containerId)> containers, Microsoft.Azure.Cosmos.CosmosClientOptions cosmosClientOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Threading.Tasks.Task`1<class Microsoft.Azure.Cosmos.CosmosClient> CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, class System.Collections.Generic.IReadOnlyList`1<valuetype System.ValueTuple`2<string, string>> containers, class Microsoft.Azure.Cosmos.CosmosClientOptions cosmosClientOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.CreateAndInitializeAsync(System.String,System.String,System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.String,System.String}},Microsoft.Azure.Cosmos.CosmosClientOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function CreateAndInitializeAsync (accountEndpoint As String, authKeyOrResourceToken As String, containers As IReadOnlyList(Of ValueTuple(Of String, String)), Optional cosmosClientOptions As CosmosClientOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of CosmosClient)" />
<MemberSignature Language="F#" Value="static member CreateAndInitializeAsync : string * string * System.Collections.Generic.IReadOnlyList<ValueTuple<string, string>> * Microsoft.Azure.Cosmos.CosmosClientOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient>" Usage="Microsoft.Azure.Cosmos.CosmosClient.CreateAndInitializeAsync (accountEndpoint, authKeyOrResourceToken, containers, cosmosClientOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.CosmosClient></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="accountEndpoint" Type="System.String" />
<Parameter Name="authKeyOrResourceToken" Type="System.String" />
<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="cosmosClientOptions" Type="Microsoft.Azure.Cosmos.CosmosClientOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="accountEndpoint">The cosmos service endpoint to use</param>
<param name="authKeyOrResourceToken">The cosmos account key or resource token to use to create the client.</param>
<param name="containers">Containers to be initialized identified by it's database name and container name.</param>
<param name="cosmosClientOptions">(Optional) client options</param>
<param name="cancellationToken">(Optional) Cancellation Token</param>
<summary>
Creates a new CosmosClient with the account endpoint URI string and TokenCredential.
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>
The returned reference doesn't guarantee credentials or connectivity validations because initialization doesn't make any network calls.
</remarks>
<example>
The CosmosClient is created with the AccountEndpoint, AccountKey or ResourceToken and 2 containers in the account are initialized
<code language="c#"><![CDATA[
using Microsoft.Azure.Cosmos;
List<(string, string)> containersToInitialize = new List<(string, string)>
{ ("DatabaseName1", "ContainerName1"), ("DatabaseName2", "ContainerName2") };
CosmosClient cosmosClient = await CosmosClient.CreateAndInitializeAsync("account-endpoint-from-portal",
"account-key-from-portal",
containersToInitialize)
// Dispose cosmosClient at application exit
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateDatabaseAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse> CreateDatabaseAsync (string id, Microsoft.Azure.Cosmos.ThroughputProperties throughputProperties, Microsoft.Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Microsoft.Azure.Cosmos.DatabaseResponse> CreateDatabaseAsync(string id, class Microsoft.Azure.Cosmos.ThroughputProperties throughputProperties, class Microsoft.Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.CreateDatabaseAsync(System.String,Microsoft.Azure.Cosmos.ThroughputProperties,Microsoft.Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateDatabaseAsync (id As String, throughputProperties As ThroughputProperties, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DatabaseResponse)" />
<MemberSignature Language="F#" Value="abstract member CreateDatabaseAsync : string * Microsoft.Azure.Cosmos.ThroughputProperties * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse>
override this.CreateDatabaseAsync : string * Microsoft.Azure.Cosmos.ThroughputProperties * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse>" Usage="cosmosClient.CreateDatabaseAsync (id, throughputProperties, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="id" Type="System.String" />
<Parameter Name="throughputProperties" Type="Microsoft.Azure.Cosmos.ThroughputProperties" />
<Parameter Name="requestOptions" Type="Microsoft.Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="id">The database id.</param>
<param name="throughputProperties">(Optional) The throughput provisioned for a database in measurement of Request Units per second in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) A set of options that can be set.</param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Sends a request for creating a database.
A database manages users, permissions and a set of containers.
Each Azure Cosmos DB Database Account is able to support multiple independent named databases,
with the database being the logical container for data.
Each Database consists of one or more containers, each of which in turn contain one or more
documents. Since databases are an administrative resource, the Service Master Key will be
required in order to access and successfully complete any action using the User APIs.
</summary>
<returns>A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Microsoft.Azure.Cosmos.DatabaseResponse" /> which wraps a <see cref="T:Microsoft.Azure.Cosmos.DatabaseProperties" /> containing the resource record.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateDatabaseAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse> CreateDatabaseAsync (string id, int? throughput = default, Microsoft.Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Microsoft.Azure.Cosmos.DatabaseResponse> CreateDatabaseAsync(string id, valuetype System.Nullable`1<int32> throughput, class Microsoft.Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.CreateDatabaseAsync(System.String,System.Nullable{System.Int32},Microsoft.Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateDatabaseAsync (id As String, Optional throughput As Nullable(Of Integer) = Nothing, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DatabaseResponse)" />
<MemberSignature Language="F#" Value="abstract member CreateDatabaseAsync : string * Nullable<int> * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse>
override this.CreateDatabaseAsync : string * Nullable<int> * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse>" Usage="cosmosClient.CreateDatabaseAsync (id, throughput, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="id" Type="System.String" />
<Parameter Name="throughput" Type="System.Nullable<System.Int32>" />
<Parameter Name="requestOptions" Type="Microsoft.Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="id">The database id.</param>
<param name="throughput">(Optional) The throughput provisioned for a database in measurement of Request Units per second in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) A set of options that can be set.</param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Sends a request for creating a database.
A database manages users, permissions and a set of containers.
Each Azure Cosmos DB Database Account is able to support multiple independent named databases,
with the database being the logical container for data.
Each Database consists of one or more containers, each of which in turn contain one or more
documents. Since databases are an administrative resource, the Service Master Key will be
required in order to access and successfully complete any action using the User APIs.
</summary>
<returns>A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Microsoft.Azure.Cosmos.DatabaseResponse" /> which wraps a <see cref="T:Microsoft.Azure.Cosmos.DatabaseProperties" /> containing the resource record.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateDatabaseIfNotExistsAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse> CreateDatabaseIfNotExistsAsync (string id, Microsoft.Azure.Cosmos.ThroughputProperties throughputProperties, Microsoft.Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Microsoft.Azure.Cosmos.DatabaseResponse> CreateDatabaseIfNotExistsAsync(string id, class Microsoft.Azure.Cosmos.ThroughputProperties throughputProperties, class Microsoft.Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.CreateDatabaseIfNotExistsAsync(System.String,Microsoft.Azure.Cosmos.ThroughputProperties,Microsoft.Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateDatabaseIfNotExistsAsync (id As String, throughputProperties As ThroughputProperties, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DatabaseResponse)" />
<MemberSignature Language="F#" Value="abstract member CreateDatabaseIfNotExistsAsync : string * Microsoft.Azure.Cosmos.ThroughputProperties * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse>
override this.CreateDatabaseIfNotExistsAsync : string * Microsoft.Azure.Cosmos.ThroughputProperties * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse>" Usage="cosmosClient.CreateDatabaseIfNotExistsAsync (id, throughputProperties, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="id" Type="System.String" />
<Parameter Name="throughputProperties" Type="Microsoft.Azure.Cosmos.ThroughputProperties" />
<Parameter Name="requestOptions" Type="Microsoft.Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="id">The database id.</param>
<param name="throughputProperties">The throughput provisioned for a database in measurement of Request Units per second in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) A set of additional options that can be set.</param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
<para>Check if a database exists, and if it doesn't, create it.
Only the database id is used to verify if there is an existing database. Other database properties
such as throughput are not validated and can be different then the passed properties.</para>
<para>A database manages users, permissions and a set of containers.
Each Azure Cosmos DB Database Account is able to support multiple independent named databases,
with the database being the logical container for data.</para>
<para>Each Database consists of one or more containers, each of which in turn contain one or more
documents. Since databases are an administrative resource, the Service Master Key will be
required in order to access and successfully complete any action using the User APIs.</para>
</summary>
<returns>A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Microsoft.Azure.Cosmos.DatabaseResponse" /> which wraps a <see cref="T:Microsoft.Azure.Cosmos.DatabaseProperties" /> containing the resource record.
<list type="table"><listheader><term>StatusCode</term><description>Common success StatusCodes for the CreateDatabaseIfNotExistsAsync operation</description></listheader><item><term>201</term><description>Created - New database is created.</description></item><item><term>200</term><description>OK - This means the database already exists.</description></item></list></returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateDatabaseIfNotExistsAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse> CreateDatabaseIfNotExistsAsync (string id, int? throughput = default, Microsoft.Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Microsoft.Azure.Cosmos.DatabaseResponse> CreateDatabaseIfNotExistsAsync(string id, valuetype System.Nullable`1<int32> throughput, class Microsoft.Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.CreateDatabaseIfNotExistsAsync(System.String,System.Nullable{System.Int32},Microsoft.Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateDatabaseIfNotExistsAsync (id As String, Optional throughput As Nullable(Of Integer) = Nothing, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DatabaseResponse)" />
<MemberSignature Language="F#" Value="abstract member CreateDatabaseIfNotExistsAsync : string * Nullable<int> * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse>
override this.CreateDatabaseIfNotExistsAsync : string * Nullable<int> * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse>" Usage="cosmosClient.CreateDatabaseIfNotExistsAsync (id, throughput, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.DatabaseResponse></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="id" Type="System.String" />
<Parameter Name="throughput" Type="System.Nullable<System.Int32>" />
<Parameter Name="requestOptions" Type="Microsoft.Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="id">The database id.</param>
<param name="throughput">(Optional) The throughput provisioned for a database in measurement of Request Units per second in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) A set of additional options that can be set.</param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
<para>Check if a database exists, and if it doesn't, create it.
Only the database id is used to verify if there is an existing database. Other database properties
such as throughput are not validated and can be different then the passed properties.</para>
<para>A database manages users, permissions and a set of containers.
Each Azure Cosmos DB Database Account is able to support multiple independent named databases,
with the database being the logical container for data.</para>
<para>Each Database consists of one or more containers, each of which in turn contain one or more
documents. Since databases are an administrative resource, the Service Master Key will be
required in order to access and successfully complete any action using the User APIs.</para>
</summary>
<returns>A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Microsoft.Azure.Cosmos.DatabaseResponse" /> which wraps a <see cref="T:Microsoft.Azure.Cosmos.DatabaseProperties" /> containing the resource record.
<list type="table"><listheader><term>StatusCode</term><description>Common success StatusCodes for the CreateDatabaseIfNotExistsAsync operation</description></listheader><item><term>201</term><description>Created - New database is created.</description></item><item><term>200</term><description>OK- This means the database already exists.</description></item></list></returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateDatabaseStreamAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.ResponseMessage> CreateDatabaseStreamAsync (Microsoft.Azure.Cosmos.DatabaseProperties databaseProperties, int? throughput = default, Microsoft.Azure.Cosmos.RequestOptions requestOptions = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Microsoft.Azure.Cosmos.ResponseMessage> CreateDatabaseStreamAsync(class Microsoft.Azure.Cosmos.DatabaseProperties databaseProperties, valuetype System.Nullable`1<int32> throughput, class Microsoft.Azure.Cosmos.RequestOptions requestOptions, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.CreateDatabaseStreamAsync(Microsoft.Azure.Cosmos.DatabaseProperties,System.Nullable{System.Int32},Microsoft.Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateDatabaseStreamAsync (databaseProperties As DatabaseProperties, Optional throughput As Nullable(Of Integer) = Nothing, Optional requestOptions As RequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResponseMessage)" />
<MemberSignature Language="F#" Value="abstract member CreateDatabaseStreamAsync : Microsoft.Azure.Cosmos.DatabaseProperties * Nullable<int> * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.ResponseMessage>
override this.CreateDatabaseStreamAsync : Microsoft.Azure.Cosmos.DatabaseProperties * Nullable<int> * Microsoft.Azure.Cosmos.RequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.ResponseMessage>" Usage="cosmosClient.CreateDatabaseStreamAsync (databaseProperties, throughput, requestOptions, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Microsoft.Azure.Cosmos.ResponseMessage></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="databaseProperties" Type="Microsoft.Azure.Cosmos.DatabaseProperties" />
<Parameter Name="throughput" Type="System.Nullable<System.Int32>" />
<Parameter Name="requestOptions" Type="Microsoft.Azure.Cosmos.RequestOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="databaseProperties">The database properties</param>
<param name="throughput">(Optional) The throughput provisioned for a database in measurement of Request Units per second in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) A set of options that can be set.</param>
<param name="cancellationToken">(Optional) <see cref="T:System.Threading.CancellationToken" /> representing request cancellation.</param>
<summary>
Send a request for creating a database.
A database manages users, permissions and a set of containers.
Each Azure Cosmos DB Database Account is able to support multiple independent named databases,
with the database being the logical container for data.
Each Database consists of one or more containers, each of which in turn contain one or more
documents. Since databases are an administrative resource, the Service Master Key will be
required in order to access and successfully complete any action using the User APIs.
</summary>
<returns>A <see cref="T:System.Threading.Tasks.Task" /> containing a <see cref="T:Microsoft.Azure.Cosmos.DatabaseResponse" /> which wraps a <see cref="T:Microsoft.Azure.Cosmos.DatabaseProperties" /> containing the resource record.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.Dispose" />
<MemberSignature Language="VB.NET" Value="Public Sub Dispose ()" />
<MemberSignature Language="F#" Value="abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit" Usage="cosmosClient.Dispose " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
Dispose of cosmos client
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void Dispose(bool disposing) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.Dispose(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub Dispose (disposing As Boolean)" />
<MemberSignature Language="F#" Value="abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit" Usage="cosmosClient.Dispose disposing" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disposing" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="disposing">True if disposing</param>
<summary>
Dispose of cosmos client
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Endpoint">
<MemberSignature Language="C#" Value="public virtual Uri Endpoint { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Uri Endpoint" />
<MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClient.Endpoint" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property Endpoint As Uri" />
<MemberSignature Language="F#" Value="member this.Endpoint : Uri" Usage="Microsoft.Azure.Cosmos.CosmosClient.Endpoint" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the endpoint Uri for the Azure Cosmos DB service.
</summary>
<value>
The Uri for the account endpoint.
</value>
<remarks>To be added.</remarks>
<altmember cref="T:System.Uri" />
</Docs>
</Member>
<Member MemberName="GetContainer">
<MemberSignature Language="C#" Value="public virtual Microsoft.Azure.Cosmos.Container GetContainer (string databaseId, string containerId);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.Azure.Cosmos.Container GetContainer(string databaseId, string containerId) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.GetContainer(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetContainer (databaseId As String, containerId As String) As Container" />
<MemberSignature Language="F#" Value="abstract member GetContainer : string * string -> Microsoft.Azure.Cosmos.Container
override this.GetContainer : string * string -> Microsoft.Azure.Cosmos.Container" Usage="cosmosClient.GetContainer (databaseId, containerId)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Container</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="databaseId" Type="System.String" />
<Parameter Name="containerId" Type="System.String" />
</Parameters>
<Docs>
<param name="databaseId">Cosmos database name</param>
<param name="containerId">Cosmos container name</param>
<summary>
Returns a proxy reference to a container.
</summary>
<returns>Cosmos container proxy</returns>
<remarks>
<see cref="T:Microsoft.Azure.Cosmos.Container" /> proxy reference doesn't guarantee existence.
Please ensure container exists through <see cref="M:Microsoft.Azure.Cosmos.Database.CreateContainerAsync(Microsoft.Azure.Cosmos.ContainerProperties,System.Nullable{System.Int32},Microsoft.Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
or <see cref="M:Microsoft.Azure.Cosmos.Database.CreateContainerIfNotExistsAsync(Microsoft.Azure.Cosmos.ContainerProperties,System.Nullable{System.Int32},Microsoft.Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />, before
operating on it.
</remarks>
</Docs>
</Member>
<Member MemberName="GetDatabase">
<MemberSignature Language="C#" Value="public virtual Microsoft.Azure.Cosmos.Database GetDatabase (string id);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.Azure.Cosmos.Database GetDatabase(string id) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.GetDatabase(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetDatabase (id As String) As Database" />
<MemberSignature Language="F#" Value="abstract member GetDatabase : string -> Microsoft.Azure.Cosmos.Database
override this.GetDatabase : string -> Microsoft.Azure.Cosmos.Database" Usage="cosmosClient.GetDatabase id" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.Database</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="id" Type="System.String" />
</Parameters>
<Docs>
<param name="id">The Cosmos database id</param>
<summary>
Returns a proxy reference to a database.
</summary>
<returns>Cosmos database proxy</returns>
<remarks>
<see cref="T:Microsoft.Azure.Cosmos.Database" /> proxy reference doesn't guarantee existence.
Please ensure database exists through <see cref="M:Microsoft.Azure.Cosmos.CosmosClient.CreateDatabaseAsync(System.String,System.Nullable{System.Int32},Microsoft.Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />
or <see cref="M:Microsoft.Azure.Cosmos.CosmosClient.CreateDatabaseIfNotExistsAsync(System.String,System.Nullable{System.Int32},Microsoft.Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" />, before
operating on it.
</remarks>
<example>
<code language="c#"><![CDATA[
Database db = cosmosClient.GetDatabase("myDatabaseId");
DatabaseResponse response = await db.ReadAsync();
]]></code>
</example>
</Docs>
</Member>
<Member MemberName="GetDatabaseQueryIterator<T>">
<MemberSignature Language="C#" Value="public virtual Microsoft.Azure.Cosmos.FeedIterator<T> GetDatabaseQueryIterator<T> (Microsoft.Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken = default, Microsoft.Azure.Cosmos.QueryRequestOptions requestOptions = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.Azure.Cosmos.FeedIterator`1<!!T> GetDatabaseQueryIterator<T>(class Microsoft.Azure.Cosmos.QueryDefinition queryDefinition, string continuationToken, class Microsoft.Azure.Cosmos.QueryRequestOptions requestOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.GetDatabaseQueryIterator``1(Microsoft.Azure.Cosmos.QueryDefinition,System.String,Microsoft.Azure.Cosmos.QueryRequestOptions)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetDatabaseQueryIterator(Of T) (queryDefinition As QueryDefinition, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing) As FeedIterator(Of T)" />
<MemberSignature Language="F#" Value="abstract member GetDatabaseQueryIterator : Microsoft.Azure.Cosmos.QueryDefinition * string * Microsoft.Azure.Cosmos.QueryRequestOptions -> Microsoft.Azure.Cosmos.FeedIterator<'T>
override this.GetDatabaseQueryIterator : Microsoft.Azure.Cosmos.QueryDefinition * string * Microsoft.Azure.Cosmos.QueryRequestOptions -> Microsoft.Azure.Cosmos.FeedIterator<'T>" Usage="cosmosClient.GetDatabaseQueryIterator (queryDefinition, continuationToken, requestOptions)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.FeedIterator<T></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="queryDefinition" Type="Microsoft.Azure.Cosmos.QueryDefinition" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Microsoft.Azure.Cosmos.QueryRequestOptions" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="queryDefinition">The cosmos SQL query definition.</param>
<param name="continuationToken">The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request.</param>
<summary>
This method creates a query for databases under an Cosmos DB Account using a SQL statement with parameterized values. It returns a FeedIterator.
For more information on preparing SQL statements with parameterized values, please see <see cref="T:Microsoft.Azure.Cosmos.QueryDefinition" />.
</summary>
<returns>An iterator to go through the databases.</returns>
<remarks>
Refer to https://docs.microsoft.com/azure/cosmos-db/sql-query-getting-started for syntax and examples.
<para><see cref="M:Microsoft.Azure.Cosmos.Database.ReadAsync(Microsoft.Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" /> is recommended for single database look-up.
</para></remarks>
<example>
This create the type feed iterator for database with queryText as input,
<code language="c#"><![CDATA[
QueryDefinition queryDefinition = new QueryDefinition("SELECT * FROM c where c.status like @status")
.WithParameter("@status", "start%");
using (FeedIterator<DatabaseProperties> feedIterator = this.users.GetDatabaseQueryIterator<DatabaseProperties>(queryDefinition))
{
while (feedIterator.HasMoreResults)
{
FeedResponse<DatabaseProperties> response = await feedIterator.ReadNextAsync();
foreach (var database in response)
{
Console.WriteLine(database);
}
}
}
]]></code></example>
</Docs>
</Member>
<Member MemberName="GetDatabaseQueryIterator<T>">
<MemberSignature Language="C#" Value="public virtual Microsoft.Azure.Cosmos.FeedIterator<T> GetDatabaseQueryIterator<T> (string queryText = default, string continuationToken = default, Microsoft.Azure.Cosmos.QueryRequestOptions requestOptions = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.Azure.Cosmos.FeedIterator`1<!!T> GetDatabaseQueryIterator<T>(string queryText, string continuationToken, class Microsoft.Azure.Cosmos.QueryRequestOptions requestOptions) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClient.GetDatabaseQueryIterator``1(System.String,System.String,Microsoft.Azure.Cosmos.QueryRequestOptions)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetDatabaseQueryIterator(Of T) (Optional queryText As String = Nothing, Optional continuationToken As String = Nothing, Optional requestOptions As QueryRequestOptions = Nothing) As FeedIterator(Of T)" />
<MemberSignature Language="F#" Value="abstract member GetDatabaseQueryIterator : string * string * Microsoft.Azure.Cosmos.QueryRequestOptions -> Microsoft.Azure.Cosmos.FeedIterator<'T>
override this.GetDatabaseQueryIterator : string * string * Microsoft.Azure.Cosmos.QueryRequestOptions -> Microsoft.Azure.Cosmos.FeedIterator<'T>" Usage="cosmosClient.GetDatabaseQueryIterator (queryText, continuationToken, requestOptions)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName>
<AssemblyVersion>3.39.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Azure.Cosmos.FeedIterator<T></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="queryText" Type="System.String" />
<Parameter Name="continuationToken" Type="System.String" />
<Parameter Name="requestOptions" Type="Microsoft.Azure.Cosmos.QueryRequestOptions" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="queryText">The cosmos SQL query text.</param>
<param name="continuationToken">The continuation token in the Azure Cosmos DB service.</param>
<param name="requestOptions">(Optional) The options for the item query request.</param>
<summary>
This method creates a query for databases under an Cosmos DB Account using a SQL statement. It returns a FeedIterator.
</summary>
<returns>An iterator to go through the databases.</returns>
<remarks>
Refer to https://docs.microsoft.com/azure/cosmos-db/sql-query-getting-started for syntax and examples.
<para><see cref="M:Microsoft.Azure.Cosmos.Database.ReadAsync(Microsoft.Azure.Cosmos.RequestOptions,System.Threading.CancellationToken)" /> is recommended for single database look-up.
</para></remarks>
<example>
This create the type feed iterator for database with queryText as input,
<code language="c#"><![CDATA[