xml/Microsoft.Azure.Cosmos/CosmosClientOptions.xml (992 lines of code) (raw):

<Type Name="CosmosClientOptions" FullName="Microsoft.Azure.Cosmos.CosmosClientOptions"> <TypeSignature Language="C#" Value="public class CosmosClientOptions" /> <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit CosmosClientOptions extends System.Object" /> <TypeSignature Language="DocId" Value="T:Microsoft.Azure.Cosmos.CosmosClientOptions" /> <TypeSignature Language="VB.NET" Value="Public Class CosmosClientOptions" /> <TypeSignature Language="F#" Value="type CosmosClientOptions = class" /> <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> <AssemblyVersion>3.45.0.0</AssemblyVersion> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <Base> <BaseTypeName>System.Object</BaseTypeName> </Base> <Interfaces /> <Docs> <summary> Defines all the configurable options that the CosmosClient requires. </summary> <remarks>To be added.</remarks> <example> An example on how to configure the serialization option to ignore null values. <code language="c#"><![CDATA[ CosmosClientOptions clientOptions = new CosmosClientOptions() { SerializerOptions = new CosmosSerializationOptions(){ IgnoreNullValues = true }, ConnectionMode = ConnectionMode.Gateway, }; CosmosClient client = new CosmosClient("endpoint", "key", clientOptions); ]]></code></example> </Docs> <Members> <Member MemberName=".ctor"> <MemberSignature Language="C#" Value="public CosmosClientOptions ();" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /> <MemberSignature Language="DocId" Value="M:Microsoft.Azure.Cosmos.CosmosClientOptions.#ctor" /> <MemberSignature Language="VB.NET" Value="Public Sub New ()" /> <MemberType>Constructor</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <Parameters /> <Docs> <summary> Creates a new CosmosClientOptions </summary> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName="AccountInitializationCustomEndpoints"> <MemberSignature Language="C#" Value="public System.Collections.Generic.IEnumerable&lt;Uri&gt; AccountInitializationCustomEndpoints { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IEnumerable`1&lt;class System.Uri&gt; AccountInitializationCustomEndpoints" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.AccountInitializationCustomEndpoints" /> <MemberSignature Language="VB.NET" Value="Public Property AccountInitializationCustomEndpoints As IEnumerable(Of Uri)" /> <MemberSignature Language="F#" Value="member this.AccountInitializationCustomEndpoints : seq&lt;Uri&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.AccountInitializationCustomEndpoints" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Collections.Generic.IEnumerable&lt;System.Uri&gt;</ReturnType> </ReturnValue> <Docs> <summary> Gets and sets the custom endpoints to use for account initialization for geo-replicated database accounts in the Azure Cosmos DB service. </summary> <value>To be added.</value> <remarks> <para> 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 <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.AccountInitializationCustomEndpoints" />. </para> <para> Nevertheless, this parameter remains optional and is recommended for implementation when a customer has configured an endpoint with a custom DNS hostname (instead of accountname-region.documents.azure.com) etc. for their Cosmos DB account. </para> <para> See also <seealso href="https://docs.microsoft.com/azure/cosmos-db/sql/troubleshoot-sdk-availability">Diagnose and troubleshoot the availability of Cosmos SDKs</seealso> for more details. </para> </remarks> <example> <code language="c#"><![CDATA[ CosmosClientOptions clientOptions = new CosmosClientOptions() { AccountInitializationCustomEndpoints = new HashSet<Uri>() { new Uri("custom.p-1.documents.azure.com"), new Uri("custom.p-2.documents.azure.com") } }; CosmosClient client = new CosmosClient("endpoint", "key", clientOptions); ]]></code> </example> </Docs> </Member> <Member MemberName="AllowBulkExecution"> <MemberSignature Language="C#" Value="public bool AllowBulkExecution { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance bool AllowBulkExecution" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.AllowBulkExecution" /> <MemberSignature Language="VB.NET" Value="Public Property AllowBulkExecution As Boolean" /> <MemberSignature Language="F#" Value="member this.AllowBulkExecution : bool with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.AllowBulkExecution" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Boolean</ReturnType> </ReturnValue> <Docs> <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. <remarks> The use of Resource Tokens scoped to a Partition Key as an authentication mechanism when Bulk is enabled is not recommended as it reduces the potential throughput benefit </remarks></summary> <value>To be added.</value> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName="ApplicationName"> <MemberSignature Language="C#" Value="public string ApplicationName { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance string ApplicationName" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationName" /> <MemberSignature Language="VB.NET" Value="Public Property ApplicationName As String" /> <MemberSignature Language="F#" Value="member this.ApplicationName : string with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationName" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.String</ReturnType> </ReturnValue> <Docs> <summary> Get or set user-agent suffix to include with every Azure Cosmos DB service interaction. </summary> <value>To be added.</value> <remarks> Setting this property after sending any request won't have any effect. </remarks> </Docs> </Member> <Member MemberName="ApplicationPreferredRegions"> <MemberSignature Language="C#" Value="public System.Collections.Generic.IReadOnlyList&lt;string&gt; ApplicationPreferredRegions { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IReadOnlyList`1&lt;string&gt; ApplicationPreferredRegions" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationPreferredRegions" /> <MemberSignature Language="VB.NET" Value="Public Property ApplicationPreferredRegions As IReadOnlyList(Of String)" /> <MemberSignature Language="F#" Value="member this.ApplicationPreferredRegions : System.Collections.Generic.IReadOnlyList&lt;string&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationPreferredRegions" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Collections.Generic.IReadOnlyList&lt;System.String&gt;</ReturnType> </ReturnValue> <Docs> <summary> Gets and sets the preferred regions for geo-replicated database accounts in the Azure Cosmos DB service. </summary> <value>To be added.</value> <remarks> <para> During the CosmosClient initialization the account information, including the available regions, is obtained from the <see cref="P:Microsoft.Azure.Cosmos.CosmosClient.Endpoint" />. The CosmosClient will use the value of <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationPreferredRegions" /> to populate the preferred list with the account available regions that intersect with its value. If the value of <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationPreferredRegions" /> contains regions that are not an available region in the account, the values will be ignored. If the these invalid regions are added later to the account, the CosmosClient will use them if they are higher in the preference order. </para> <para> If during CosmosClient initialization, the <see cref="P:Microsoft.Azure.Cosmos.CosmosClient.Endpoint" /> is not reachable, the CosmosClient will attempt to recover and obtain the account information issuing requests to the regions in <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationPreferredRegions" /> in the order that they are listed. </para> <para> See also <seealso href="https://docs.microsoft.com/azure/cosmos-db/sql/troubleshoot-sdk-availability">Diagnose and troubleshoot the availability of Cosmos SDKs</seealso> for more details. </para> <para> This configuration is an alternative to <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationRegion" />, either one can be set but not both. </para> </remarks> <example> <code language="c#"><![CDATA[ CosmosClientOptions clientOptions = new CosmosClientOptions() { ApplicationPreferredRegions = new List<string>(){ Regions.EastUS, Regions.WestUS } }; CosmosClient client = new CosmosClient("endpoint", "key", clientOptions); ]]></code> </example> </Docs> </Member> <Member MemberName="ApplicationRegion"> <MemberSignature Language="C#" Value="public string ApplicationRegion { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance string ApplicationRegion" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationRegion" /> <MemberSignature Language="VB.NET" Value="Public Property ApplicationRegion As String" /> <MemberSignature Language="F#" Value="member this.ApplicationRegion : string with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationRegion" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.String</ReturnType> </ReturnValue> <Docs> <summary> Gets or sets the location where the application is running. This will influence the SDK's choice for the Azure Cosmos DB service interaction. </summary> <value>To be added.</value> <remarks> <para> During the CosmosClient initialization the account information, including the available regions, is obtained from the <see cref="P:Microsoft.Azure.Cosmos.CosmosClient.Endpoint" />. The CosmosClient will use the value of <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationRegion" /> to populate the preferred list with the account available regions ordered by geographical proximity to the indicated region. If the value of <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationRegion" /> is not an available region in the account, the preferred list is still populated following the same mechanism but would not include the indicated region. </para> <para> If during CosmosClient initialization, the <see cref="P:Microsoft.Azure.Cosmos.CosmosClient.Endpoint" /> is not reachable, the CosmosClient will attempt to recover and obtain the account information issuing requests to all <see cref="T:Microsoft.Azure.Cosmos.Regions" /> ordered by proximity to the <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationRegion" />. For more granular control over the selected regions or to define a list based on a custom criteria, use <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationPreferredRegions" /> instead of <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationRegion" />. </para> <para> See also <seealso href="https://docs.microsoft.com/azure/cosmos-db/sql/troubleshoot-sdk-availability">Diagnose and troubleshoot the availability of Cosmos SDKs</seealso> for more details. </para> <para> This configuration is an alternative to <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationPreferredRegions" />, either one can be set but not both. </para> </remarks> <example> If an account is configured with multiple regions including West US, East US, and West Europe, configuring a client like the below example would result in the CosmosClient generating a sorted preferred regions based on proximity to East US. The CosmosClient will send requests to East US, if that region becomes unavailable, it will fallback to West US (second in proximity), and finally to West Europe if West US becomes unavailable. <code language="c#"><![CDATA[ CosmosClientOptions clientOptions = new CosmosClientOptions() { ApplicationRegion = Regions.EastUS }; CosmosClient client = new CosmosClient("endpoint", "key", clientOptions); ]]></code></example> <altmember cref="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithApplicationRegion(System.String)" /> </Docs> </Member> <Member MemberName="AvailabilityStrategy"> <MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.AvailabilityStrategy AvailabilityStrategy { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Cosmos.AvailabilityStrategy AvailabilityStrategy" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.AvailabilityStrategy" /> <MemberSignature Language="VB.NET" Value="Public Property AvailabilityStrategy As AvailabilityStrategy" /> <MemberSignature Language="F#" Value="member this.AvailabilityStrategy : Microsoft.Azure.Cosmos.AvailabilityStrategy with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.AvailabilityStrategy" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Microsoft.Azure.Cosmos.AvailabilityStrategy</ReturnType> </ReturnValue> <Docs> <summary> Availability Strategy to be used for periods of high latency </summary> <value>To be added.</value> <remarks> The availability strategy in the example is a Cross Region Hedging Strategy. These strategies take two values, a threshold and a threshold step.When a request that is sent out takes longer than the threshold time, the SDK will hedge to the second region in the application preferred regions list. If a response from either the primary request or the first hedged request is not received after the threshold step time, the SDK will hedge to the third region and so on. </remarks> <example> An example on how to set an availability strategy custom serializer. <code language="c#"><![CDATA[ CosmosClient client = new CosmosClientBuilder("connection string") .WithApplicationPreferredRegions( new List<string> { "East US", "Central US", "West US" } ) .WithAvailabilityStrategy( AvailabilityStrategy.CrossRegionHedgingStrategy( threshold: TimeSpan.FromMilliseconds(500), thresholdStep: TimeSpan.FromMilliseconds(100) )) .Build(); ]]></code></example> </Docs> </Member> <Member MemberName="ConnectionMode"> <MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.ConnectionMode ConnectionMode { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype Microsoft.Azure.Cosmos.ConnectionMode ConnectionMode" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ConnectionMode" /> <MemberSignature Language="VB.NET" Value="Public Property ConnectionMode As ConnectionMode" /> <MemberSignature Language="F#" Value="member this.ConnectionMode : Microsoft.Azure.Cosmos.ConnectionMode with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.ConnectionMode" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Microsoft.Azure.Cosmos.ConnectionMode</ReturnType> </ReturnValue> <Docs> <summary> Get or set the connection mode used by the client when connecting to the Azure Cosmos DB service. </summary> <value> Default value is <see cref="F:Microsoft.Azure.Cosmos.ConnectionMode.Direct" /></value> <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="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithConnectionModeGateway(System.Nullable{System.Int32},System.Net.IWebProxy)" /> <altmember cref="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithConnectionModeDirect" /> </Docs> </Member> <Member MemberName="ConsistencyLevel"> <MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.ConsistencyLevel? ConsistencyLevel { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;valuetype Microsoft.Azure.Cosmos.ConsistencyLevel&gt; ConsistencyLevel" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ConsistencyLevel" /> <MemberSignature Language="VB.NET" Value="Public Property ConsistencyLevel As Nullable(Of ConsistencyLevel)" /> <MemberSignature Language="F#" Value="member this.ConsistencyLevel : Nullable&lt;Microsoft.Azure.Cosmos.ConsistencyLevel&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.ConsistencyLevel" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;Microsoft.Azure.Cosmos.ConsistencyLevel&gt;</ReturnType> </ReturnValue> <Docs> <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> <value>To be added.</value> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName="CosmosClientTelemetryOptions"> <MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.CosmosClientTelemetryOptions CosmosClientTelemetryOptions { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Cosmos.CosmosClientTelemetryOptions CosmosClientTelemetryOptions" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.CosmosClientTelemetryOptions" /> <MemberSignature Language="VB.NET" Value="Public Property CosmosClientTelemetryOptions As CosmosClientTelemetryOptions" /> <MemberSignature Language="F#" Value="member this.CosmosClientTelemetryOptions : Microsoft.Azure.Cosmos.CosmosClientTelemetryOptions with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.CosmosClientTelemetryOptions" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Microsoft.Azure.Cosmos.CosmosClientTelemetryOptions</ReturnType> </ReturnValue> <Docs> <summary> Gets or sets Client Telemetry Options like feature flags and corresponding options </summary> <value>To be added.</value> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName="CustomHandlers"> <MemberSignature Language="C#" Value="public System.Collections.ObjectModel.Collection&lt;Microsoft.Azure.Cosmos.RequestHandler&gt; CustomHandlers { get; }" /> <MemberSignature Language="ILAsm" Value=".property instance class System.Collections.ObjectModel.Collection`1&lt;class Microsoft.Azure.Cosmos.RequestHandler&gt; CustomHandlers" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.CustomHandlers" /> <MemberSignature Language="VB.NET" Value="Public ReadOnly Property CustomHandlers As Collection(Of RequestHandler)" /> <MemberSignature Language="F#" Value="member this.CustomHandlers : System.Collections.ObjectModel.Collection&lt;Microsoft.Azure.Cosmos.RequestHandler&gt;" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.CustomHandlers" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <Attributes> <Attribute> <AttributeName Language="C#">[Newtonsoft.Json.JsonConverter(typeof(Microsoft.Azure.Cosmos.CosmosClientOptions+ClientOptionJsonConverter))]</AttributeName> <AttributeName Language="F#">[&lt;Newtonsoft.Json.JsonConverter(typeof(Microsoft.Azure.Cosmos.CosmosClientOptions+ClientOptionJsonConverter))&gt;]</AttributeName> </Attribute> </Attributes> <ReturnValue> <ReturnType>System.Collections.ObjectModel.Collection&lt;Microsoft.Azure.Cosmos.RequestHandler&gt;</ReturnType> </ReturnValue> <Docs> <summary> Gets the handlers run before the process </summary> <value>To be added.</value> <remarks>To be added.</remarks> <altmember cref="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.AddCustomHandlers(Microsoft.Azure.Cosmos.RequestHandler[])" /> </Docs> </Member> <Member MemberName="EnableContentResponseOnWrite"> <MemberSignature Language="C#" Value="public bool? EnableContentResponseOnWrite { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;bool&gt; EnableContentResponseOnWrite" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.EnableContentResponseOnWrite" /> <MemberSignature Language="VB.NET" Value="Public Property EnableContentResponseOnWrite As Nullable(Of Boolean)" /> <MemberSignature Language="F#" Value="member this.EnableContentResponseOnWrite : Nullable&lt;bool&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.EnableContentResponseOnWrite" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;System.Boolean&gt;</ReturnType> </ReturnValue> <Docs> <summary> Gets or sets the boolean to only return the headers and status code in the Cosmos DB response for write item operation like Create, Upsert, Patch and Replace. Setting the option to false will cause the response to have a null resource. This reduces networking and CPU load by not sending the resource back over the network and serializing it on the client. </summary> <value>To be added.</value> <remarks> <para>This is optimal for workloads where the returned resource is not used.</para> <para>This option can be overriden by similar property in ItemRequestOptions and TransactionalBatchItemRequestOptions</para> </remarks> <altmember cref="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithContentResponseOnWrite(System.Boolean)" /> <altmember cref="P:Microsoft.Azure.Cosmos.ItemRequestOptions.EnableContentResponseOnWrite" /> <altmember cref="P:Microsoft.Azure.Cosmos.TransactionalBatchItemRequestOptions.EnableContentResponseOnWrite" /> </Docs> </Member> <Member MemberName="EnableTcpConnectionEndpointRediscovery"> <MemberSignature Language="C#" Value="public bool EnableTcpConnectionEndpointRediscovery { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance bool EnableTcpConnectionEndpointRediscovery" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.EnableTcpConnectionEndpointRediscovery" /> <MemberSignature Language="VB.NET" Value="Public Property EnableTcpConnectionEndpointRediscovery As Boolean" /> <MemberSignature Language="F#" Value="member this.EnableTcpConnectionEndpointRediscovery : bool with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.EnableTcpConnectionEndpointRediscovery" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Boolean</ReturnType> </ReturnValue> <Docs> <summary> Gets or sets the flag to enable address cache refresh on TCP connection reset notification. </summary> <value> The default value is true </value> <remarks> Does not apply if <see cref="F:Microsoft.Azure.Cosmos.ConnectionMode.Gateway" /> is used. </remarks> </Docs> </Member> <Member MemberName="FaultInjector"> <MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.FaultInjection.IFaultInjector FaultInjector { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Cosmos.FaultInjection.IFaultInjector FaultInjector" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.FaultInjector" /> <MemberSignature Language="VB.NET" Value="Public Property FaultInjector As IFaultInjector" /> <MemberSignature Language="F#" Value="member this.FaultInjector : Microsoft.Azure.Cosmos.FaultInjection.IFaultInjector with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.FaultInjector" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Microsoft.Azure.Cosmos.FaultInjection.IFaultInjector</ReturnType> </ReturnValue> <Docs> <summary> Create a client with Fault Injection capabilities using the Cosmos DB Fault Injection Library. </summary> <value>To be added.</value> <remarks>To be added.</remarks> <example> How to create a CosmosClient with Fault Injection capabilities. <code language="c#"><![CDATA[ FaultInjectionRule rule = new FaultInjectionRuleBuilder( id: "ruleId", condition: new FaultInjectionConditionBuilder() .WithRegion("East US") .Build(), result: new FaultInjectionResultBuilder.GetResultBuilder(FaultInjectionServerErrorType.ServiceUnavailable) .Build()) .Build(); FaultInjector faultInjector = new FaultInjector(new List<FaultInjectionRule>() { rule }); CosmosClientOptions clientOptions = new CosmosClientOptions() { FaultInjector = faultInjector }; CosmosClient client = new CosmosClient("connection string", clientOptions); ]]></code></example> </Docs> </Member> <Member MemberName="GatewayModeMaxConnectionLimit"> <MemberSignature Language="C#" Value="public int GatewayModeMaxConnectionLimit { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance int32 GatewayModeMaxConnectionLimit" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.GatewayModeMaxConnectionLimit" /> <MemberSignature Language="VB.NET" Value="Public Property GatewayModeMaxConnectionLimit As Integer" /> <MemberSignature Language="F#" Value="member this.GatewayModeMaxConnectionLimit : int with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.GatewayModeMaxConnectionLimit" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Int32</ReturnType> </ReturnValue> <Docs> <summary> Get or set the maximum number of concurrent connections allowed for the target service endpoint in the Azure Cosmos DB service. </summary> <value>Default value is 50.</value> <remarks> This setting is only applicable in Gateway mode. </remarks> <altmember cref="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithConnectionModeGateway(System.Nullable{System.Int32},System.Net.IWebProxy)" /> </Docs> </Member> <Member MemberName="HttpClientFactory"> <MemberSignature Language="C#" Value="public Func&lt;System.Net.Http.HttpClient&gt; HttpClientFactory { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance class System.Func`1&lt;class System.Net.Http.HttpClient&gt; HttpClientFactory" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.HttpClientFactory" /> <MemberSignature Language="VB.NET" Value="Public Property HttpClientFactory As Func(Of HttpClient)" /> <MemberSignature Language="F#" Value="member this.HttpClientFactory : Func&lt;System.Net.Http.HttpClient&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.HttpClientFactory" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <Attributes> <Attribute> <AttributeName Language="C#">[Newtonsoft.Json.JsonIgnore]</AttributeName> <AttributeName Language="F#">[&lt;Newtonsoft.Json.JsonIgnore&gt;]</AttributeName> </Attribute> </Attributes> <ReturnValue> <ReturnType>System.Func&lt;System.Net.Http.HttpClient&gt;</ReturnType> </ReturnValue> <Docs> <summary> Gets or sets a delegate to use to obtain an HttpClient instance to be used for HTTPS communication. </summary> <value>To be added.</value> <remarks> <para> HTTPS communication is used when <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ConnectionMode" /> is set to <see cref="F:Microsoft.Azure.Cosmos.ConnectionMode.Gateway" /> for all operations and when <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.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> <para> For .NET core applications the default GatewayConnectionLimit will be ignored. It must be set on the HttpClientHandler.MaxConnectionsPerServer to limit the number of connections </para> </remarks> </Docs> </Member> <Member MemberName="IdleTcpConnectionTimeout"> <MemberSignature Language="C#" Value="public TimeSpan? IdleTcpConnectionTimeout { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;valuetype System.TimeSpan&gt; IdleTcpConnectionTimeout" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.IdleTcpConnectionTimeout" /> <MemberSignature Language="VB.NET" Value="Public Property IdleTcpConnectionTimeout As Nullable(Of TimeSpan)" /> <MemberSignature Language="F#" Value="member this.IdleTcpConnectionTimeout : Nullable&lt;TimeSpan&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.IdleTcpConnectionTimeout" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;System.TimeSpan&gt;</ReturnType> </ReturnValue> <Docs> <summary> (Direct/TCP) Controls the amount of idle time after which unused connections are closed. </summary> <value> 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. </value> <remarks> Mainly useful for sparse infrequent access to a large database account. </remarks> </Docs> </Member> <Member MemberName="LimitToEndpoint"> <MemberSignature Language="C#" Value="public bool LimitToEndpoint { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance bool LimitToEndpoint" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.LimitToEndpoint" /> <MemberSignature Language="VB.NET" Value="Public Property LimitToEndpoint As Boolean" /> <MemberSignature Language="F#" Value="member this.LimitToEndpoint : bool with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.LimitToEndpoint" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Boolean</ReturnType> </ReturnValue> <Docs> <summary> Limits the operations to the provided endpoint on the CosmosClient. </summary> <value> Default value is false. </value> <remarks> When the value of this property is false, the SDK will automatically discover 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 CosmosClient constructor. Defining the <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationRegion" /> or <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ApplicationPreferredRegions" /> is not allowed when setting the value to true. </remarks> </Docs> </Member> <Member MemberName="MaxRequestsPerTcpConnection"> <MemberSignature Language="C#" Value="public int? MaxRequestsPerTcpConnection { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;int32&gt; MaxRequestsPerTcpConnection" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.MaxRequestsPerTcpConnection" /> <MemberSignature Language="VB.NET" Value="Public Property MaxRequestsPerTcpConnection As Nullable(Of Integer)" /> <MemberSignature Language="F#" Value="member this.MaxRequestsPerTcpConnection : Nullable&lt;int&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.MaxRequestsPerTcpConnection" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;System.Int32&gt;</ReturnType> </ReturnValue> <Docs> <summary> (Direct/TCP) 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. </summary> <value> 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. </value> <remarks> 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. </remarks> </Docs> </Member> <Member MemberName="MaxRetryAttemptsOnRateLimitedRequests"> <MemberSignature Language="C#" Value="public int? MaxRetryAttemptsOnRateLimitedRequests { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;int32&gt; MaxRetryAttemptsOnRateLimitedRequests" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.MaxRetryAttemptsOnRateLimitedRequests" /> <MemberSignature Language="VB.NET" Value="Public Property MaxRetryAttemptsOnRateLimitedRequests As Nullable(Of Integer)" /> <MemberSignature Language="F#" Value="member this.MaxRetryAttemptsOnRateLimitedRequests : Nullable&lt;int&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.MaxRetryAttemptsOnRateLimitedRequests" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;System.Int32&gt;</ReturnType> </ReturnValue> <Docs> <summary> Gets or sets the maximum number of retries in the case where the request fails because the Azure Cosmos DB service has applied rate limiting on the client. </summary> <value> The default value is 9. This means in the case where the request is rate limited, the same request will be issued for a maximum of 10 times to the server before an error is returned to the application. If the value of this property is set to 0, there will be no automatic retry on rate limiting requests from the client and the exception needs to be handled at the application level. </value> <remarks> <para> When a client is sending requests faster than the allowed rate, the service will return HttpStatusCode 429 (Too Many Requests) to rate limit the client. The current implementation in the SDK will then wait for the amount of time the service tells it to wait and retry after the time has elapsed. </para> <para> For more information, see <see href="https://docs.microsoft.com/azure/cosmos-db/performance-tips#throughput">Handle rate limiting/request rate too large</see>. </para> </remarks> <altmember cref="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithThrottlingRetryOptions(System.TimeSpan,System.Int32)" /> </Docs> </Member> <Member MemberName="MaxRetryWaitTimeOnRateLimitedRequests"> <MemberSignature Language="C#" Value="public TimeSpan? MaxRetryWaitTimeOnRateLimitedRequests { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;valuetype System.TimeSpan&gt; MaxRetryWaitTimeOnRateLimitedRequests" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.MaxRetryWaitTimeOnRateLimitedRequests" /> <MemberSignature Language="VB.NET" Value="Public Property MaxRetryWaitTimeOnRateLimitedRequests As Nullable(Of TimeSpan)" /> <MemberSignature Language="F#" Value="member this.MaxRetryWaitTimeOnRateLimitedRequests : Nullable&lt;TimeSpan&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.MaxRetryWaitTimeOnRateLimitedRequests" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;System.TimeSpan&gt;</ReturnType> </ReturnValue> <Docs> <summary> Gets or sets the maximum retry time in seconds for the Azure Cosmos DB service. </summary> <value> The default value is 30 seconds. </value> <remarks> <para> The minimum interval is seconds. Any interval that is smaller will be ignored. </para> <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 <see cref="P:Microsoft.Azure.Cosmos.CosmosException.RetryAfter" /> 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://docs.microsoft.com/azure/cosmos-db/performance-tips#throughput">Handle rate limiting/request rate too large</see>. </para> </remarks> <altmember cref="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithThrottlingRetryOptions(System.TimeSpan,System.Int32)" /> </Docs> </Member> <Member MemberName="MaxTcpConnectionsPerEndpoint"> <MemberSignature Language="C#" Value="public int? MaxTcpConnectionsPerEndpoint { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;int32&gt; MaxTcpConnectionsPerEndpoint" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.MaxTcpConnectionsPerEndpoint" /> <MemberSignature Language="VB.NET" Value="Public Property MaxTcpConnectionsPerEndpoint As Nullable(Of Integer)" /> <MemberSignature Language="F#" Value="member this.MaxTcpConnectionsPerEndpoint : Nullable&lt;int&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.MaxTcpConnectionsPerEndpoint" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;System.Int32&gt;</ReturnType> </ReturnValue> <Docs> <summary> (Direct/TCP) 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). </summary> <value> The default value is 65,535. Value must be greater than or equal to 16. </value> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName="OpenTcpConnectionTimeout"> <MemberSignature Language="C#" Value="public TimeSpan? OpenTcpConnectionTimeout { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;valuetype System.TimeSpan&gt; OpenTcpConnectionTimeout" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.OpenTcpConnectionTimeout" /> <MemberSignature Language="VB.NET" Value="Public Property OpenTcpConnectionTimeout As Nullable(Of TimeSpan)" /> <MemberSignature Language="F#" Value="member this.OpenTcpConnectionTimeout : Nullable&lt;TimeSpan&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.OpenTcpConnectionTimeout" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;System.TimeSpan&gt;</ReturnType> </ReturnValue> <Docs> <summary> (Direct/TCP) Controls the amount of time allowed for trying to establish a connection. </summary> <value> The default timeout is 5 seconds. For latency sensitive applications that prefer to retry faster, a recommended value of 1 second can be used. </value> <remarks> When the time elapses, the attempt is cancelled and an error is returned. Longer timeouts will delay retries and failures. </remarks> </Docs> </Member> <Member MemberName="PortReuseMode"> <MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.PortReuseMode? PortReuseMode { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;valuetype Microsoft.Azure.Cosmos.PortReuseMode&gt; PortReuseMode" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.PortReuseMode" /> <MemberSignature Language="VB.NET" Value="Public Property PortReuseMode As Nullable(Of PortReuseMode)" /> <MemberSignature Language="F#" Value="member this.PortReuseMode : Nullable&lt;Microsoft.Azure.Cosmos.PortReuseMode&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.PortReuseMode" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;Microsoft.Azure.Cosmos.PortReuseMode&gt;</ReturnType> </ReturnValue> <Docs> <summary> (Direct/TCP) Controls the client port reuse policy used by the transport stack. </summary> <value> The default value is PortReuseMode.ReuseUnicastPort. </value> <remarks> ReuseUnicastPort and PrivatePortPool are not mutually exclusive. When PrivatePortPool is enabled, the client first tries to reuse a port it already has. It falls back to allocating a new port if the initial attempts failed. If this fails, too, the client then falls back to ReuseUnicastPort. </remarks> </Docs> </Member> <Member MemberName="PriorityLevel"> <MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.PriorityLevel? PriorityLevel { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;valuetype Microsoft.Azure.Cosmos.PriorityLevel&gt; PriorityLevel" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.PriorityLevel" /> <MemberSignature Language="VB.NET" Value="Public Property PriorityLevel As Nullable(Of PriorityLevel)" /> <MemberSignature Language="F#" Value="member this.PriorityLevel : Nullable&lt;Microsoft.Azure.Cosmos.PriorityLevel&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.PriorityLevel" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;Microsoft.Azure.Cosmos.PriorityLevel&gt;</ReturnType> </ReturnValue> <Docs> <summary> Sets the priority level for requests created using cosmos client. </summary> <value>To be added.</value> <remarks> If priority level is also set at request level in <see cref="P:Microsoft.Azure.Cosmos.RequestOptions.PriorityLevel" />, that priority is used. If <see cref="P:Microsoft.Azure.Cosmos.CosmosClientOptions.AllowBulkExecution" /> is set to true in CosmosClientOptions, priority level set on the CosmosClient is used. </remarks> </Docs> </Member> <Member MemberName="RequestTimeout"> <MemberSignature Language="C#" Value="public TimeSpan RequestTimeout { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.TimeSpan RequestTimeout" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.RequestTimeout" /> <MemberSignature Language="VB.NET" Value="Public Property RequestTimeout As TimeSpan" /> <MemberSignature Language="F#" Value="member this.RequestTimeout : TimeSpan with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.RequestTimeout" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.TimeSpan</ReturnType> </ReturnValue> <Docs> <summary> Gets the request timeout in seconds when connecting to the Azure Cosmos DB service. The number specifies the time to wait for response to come back from network peer. </summary> <value>Default value is 6 seconds.</value> <remarks>To be added.</remarks> <altmember cref="M:Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder.WithRequestTimeout(System.TimeSpan)" /> </Docs> </Member> <Member MemberName="Serializer"> <MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.CosmosSerializer Serializer { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Cosmos.CosmosSerializer Serializer" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.Serializer" /> <MemberSignature Language="VB.NET" Value="Public Property Serializer As CosmosSerializer" /> <MemberSignature Language="F#" Value="member this.Serializer : Microsoft.Azure.Cosmos.CosmosSerializer with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.Serializer" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <Attributes> <Attribute> <AttributeName Language="C#">[Newtonsoft.Json.JsonConverter(typeof(Microsoft.Azure.Cosmos.CosmosClientOptions+ClientOptionJsonConverter))]</AttributeName> <AttributeName Language="F#">[&lt;Newtonsoft.Json.JsonConverter(typeof(Microsoft.Azure.Cosmos.CosmosClientOptions+ClientOptionJsonConverter))&gt;]</AttributeName> </Attribute> </Attributes> <ReturnValue> <ReturnType>Microsoft.Azure.Cosmos.CosmosSerializer</ReturnType> </ReturnValue> <Docs> <summary> Get to set an optional JSON serializer. The client will use it to serialize or de-serialize user's cosmos request/responses. SDK owned types such as DatabaseProperties and ContainerProperties will always use the SDK default serializer. </summary> <value>To be added.</value> <remarks>To be added.</remarks> <example> An example on how to set a custom serializer. For basic serializer options look at CosmosSerializationOptions <code language="c#"><![CDATA[ CosmosSerializer ignoreNullSerializer = new MyCustomIgnoreNullSerializer(); CosmosClientOptions clientOptions = new CosmosClientOptions() { Serializer = ignoreNullSerializer }; CosmosClient client = new CosmosClient("endpoint", "key", clientOptions); ]]></code></example> </Docs> </Member> <Member MemberName="SerializerOptions"> <MemberSignature Language="C#" Value="public Microsoft.Azure.Cosmos.CosmosSerializationOptions SerializerOptions { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance class Microsoft.Azure.Cosmos.CosmosSerializationOptions SerializerOptions" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.SerializerOptions" /> <MemberSignature Language="VB.NET" Value="Public Property SerializerOptions As CosmosSerializationOptions" /> <MemberSignature Language="F#" Value="member this.SerializerOptions : Microsoft.Azure.Cosmos.CosmosSerializationOptions with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.SerializerOptions" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Microsoft.Azure.Cosmos.CosmosSerializationOptions</ReturnType> </ReturnValue> <Docs> <summary> Get to set optional serializer options. </summary> <value>To be added.</value> <remarks>To be added.</remarks> <example> An example on how to configure the serialization option to ignore null values <code language="c#"><![CDATA[ CosmosClientOptions clientOptions = new CosmosClientOptions() { SerializerOptions = new CosmosSerializationOptions(){ IgnoreNullValues = true } }; CosmosClient client = new CosmosClient("endpoint", "key", clientOptions); ]]></code></example> </Docs> </Member> <Member MemberName="ServerCertificateCustomValidationCallback"> <MemberSignature Language="C#" Value="public Func&lt;System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,bool&gt; ServerCertificateCustomValidationCallback { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance class System.Func`4&lt;class System.Security.Cryptography.X509Certificates.X509Certificate2, class System.Security.Cryptography.X509Certificates.X509Chain, valuetype System.Net.Security.SslPolicyErrors, bool&gt; ServerCertificateCustomValidationCallback" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.ServerCertificateCustomValidationCallback" /> <MemberSignature Language="VB.NET" Value="Public Property ServerCertificateCustomValidationCallback As Func(Of X509Certificate2, X509Chain, SslPolicyErrors, Boolean)" /> <MemberSignature Language="F#" Value="member this.ServerCertificateCustomValidationCallback : Func&lt;System.Security.Cryptography.X509Certificates.X509Certificate2, System.Security.Cryptography.X509Certificates.X509Chain, System.Net.Security.SslPolicyErrors, bool&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.ServerCertificateCustomValidationCallback" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Func&lt;System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,System.Boolean&gt;</ReturnType> </ReturnValue> <Docs> <summary> A callback delegate to do custom certificate validation for both HTTP and TCP. </summary> <value>To be added.</value> <remarks> <para> 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 the `DisableServerCertificateValidation` flag in production (only for emulator) </para> </remarks> </Docs> </Member> <Member MemberName="TokenCredentialBackgroundRefreshInterval"> <MemberSignature Language="C#" Value="public TimeSpan? TokenCredentialBackgroundRefreshInterval { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1&lt;valuetype System.TimeSpan&gt; TokenCredentialBackgroundRefreshInterval" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.TokenCredentialBackgroundRefreshInterval" /> <MemberSignature Language="VB.NET" Value="Public Property TokenCredentialBackgroundRefreshInterval As Nullable(Of TimeSpan)" /> <MemberSignature Language="F#" Value="member this.TokenCredentialBackgroundRefreshInterval : Nullable&lt;TimeSpan&gt; with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.TokenCredentialBackgroundRefreshInterval" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Nullable&lt;System.TimeSpan&gt;</ReturnType> </ReturnValue> <Docs> <summary> The SDK does a background refresh based on the time interval set to refresh the token credentials. This avoids latency issues because the old token is used until the new token is retrieved. </summary> <value>To be added.</value> <remarks> The recommended minimum value is 5 minutes. The default value is 50% of the token expire time. </remarks> </Docs> </Member> <Member MemberName="UseSystemTextJsonSerializerWithOptions"> <MemberSignature Language="C#" Value="public System.Text.Json.JsonSerializerOptions UseSystemTextJsonSerializerWithOptions { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance class System.Text.Json.JsonSerializerOptions UseSystemTextJsonSerializerWithOptions" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.UseSystemTextJsonSerializerWithOptions" /> <MemberSignature Language="VB.NET" Value="Public Property UseSystemTextJsonSerializerWithOptions As JsonSerializerOptions" /> <MemberSignature Language="F#" Value="member this.UseSystemTextJsonSerializerWithOptions : System.Text.Json.JsonSerializerOptions with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.UseSystemTextJsonSerializerWithOptions" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Text.Json.JsonSerializerOptions</ReturnType> </ReturnValue> <Docs> <summary> Sets the <see cref="T:System.Text.Json.JsonSerializerOptions" /> for the System.Text.Json serializer. Note that if this option is provided, then the SDK will use the System.Text.Json as the default serializer and set the serializer options as the constructor args. </summary> <value>To be added.</value> <remarks>To be added.</remarks> <example> An example on how to configure the System.Text.Json serializer options to ignore null values <code language="c#"><![CDATA[ CosmosClientOptions clientOptions = new CosmosClientOptions() { UseSystemTextJsonSerializerWithOptions = new System.Text.Json.JsonSerializerOptions() { DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, } }; CosmosClient client = new CosmosClient("endpoint", "key", clientOptions); ]]></code></example> </Docs> </Member> <Member MemberName="WebProxy"> <MemberSignature Language="C#" Value="public System.Net.IWebProxy WebProxy { get; set; }" /> <MemberSignature Language="ILAsm" Value=".property instance class System.Net.IWebProxy WebProxy" /> <MemberSignature Language="DocId" Value="P:Microsoft.Azure.Cosmos.CosmosClientOptions.WebProxy" /> <MemberSignature Language="VB.NET" Value="Public Property WebProxy As IWebProxy" /> <MemberSignature Language="F#" Value="member this.WebProxy : System.Net.IWebProxy with get, set" Usage="Microsoft.Azure.Cosmos.CosmosClientOptions.WebProxy" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Microsoft.Azure.Cosmos.Client</AssemblyName> <AssemblyVersion>3.47.0.0</AssemblyVersion> </AssemblyInfo> <Attributes> <Attribute> <AttributeName Language="C#">[Newtonsoft.Json.JsonIgnore]</AttributeName> <AttributeName Language="F#">[&lt;Newtonsoft.Json.JsonIgnore&gt;]</AttributeName> </Attribute> </Attributes> <ReturnValue> <ReturnType>System.Net.IWebProxy</ReturnType> </ReturnValue> <Docs> <summary> (Gateway/Https) Get or set the proxy information used for web requests. </summary> <value>To be added.</value> <remarks>To be added.</remarks> </Docs> </Member> </Members> </Type>