xml/Azure.Cosmos.Fluent/CosmosClientBuilder.xml (422 lines of code) (raw):

<Type Name="CosmosClientBuilder" FullName="Azure.Cosmos.Fluent.CosmosClientBuilder"> <TypeSignature Language="C#" Value="public class CosmosClientBuilder" /> <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit CosmosClientBuilder extends System.Object" /> <TypeSignature Language="DocId" Value="T:Azure.Cosmos.Fluent.CosmosClientBuilder" /> <TypeSignature Language="VB.NET" Value="Public Class CosmosClientBuilder" /> <TypeSignature Language="F#" Value="type CosmosClientBuilder = class" /> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <Base> <BaseTypeName>System.Object</BaseTypeName> </Base> <Interfaces /> <Docs> <summary> This is a Builder class that creates a cosmos client </summary> <remarks>To be added.</remarks> </Docs> <Members> <Member MemberName=".ctor"> <MemberSignature Language="C#" Value="public CosmosClientBuilder (string connectionString);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string connectionString) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.Fluent.CosmosClientBuilder.#ctor(System.String)" /> <MemberSignature Language="VB.NET" Value="Public Sub New (connectionString As String)" /> <MemberSignature Language="F#" Value="new Azure.Cosmos.Fluent.CosmosClientBuilder : string -&gt; Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="new Azure.Cosmos.Fluent.CosmosClientBuilder connectionString" /> <MemberType>Constructor</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <Parameters> <Parameter Name="connectionString" Type="System.String" /> </Parameters> <Docs> <param name="connectionString">The connection string must contain AccountEndpoint and AccountKey or ResourceToken.</param> <summary> Extracts the account endpoint and key from the connection string. </summary> <remarks>To be added.</remarks> <example>"AccountEndpoint=https://mytestcosmosaccount.documents.azure.com:443/;AccountKey={SecretAccountKey};"</example> </Docs> </Member> <Member MemberName=".ctor"> <MemberSignature Language="C#" Value="public CosmosClientBuilder (string accountEndpoint, string authKeyOrResourceToken);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string accountEndpoint, string authKeyOrResourceToken) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.Fluent.CosmosClientBuilder.#ctor(System.String,System.String)" /> <MemberSignature Language="VB.NET" Value="Public Sub New (accountEndpoint As String, authKeyOrResourceToken As String)" /> <MemberSignature Language="F#" Value="new Azure.Cosmos.Fluent.CosmosClientBuilder : string * string -&gt; Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="new Azure.Cosmos.Fluent.CosmosClientBuilder (accountEndpoint, authKeyOrResourceToken)" /> <MemberType>Constructor</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <Parameters> <Parameter Name="accountEndpoint" Type="System.String" /> <Parameter Name="authKeyOrResourceToken" Type="System.String" /> </Parameters> <Docs> <param name="accountEndpoint">The Uri to the Cosmos Account. Example: https://{Cosmos Account Name}.documents.azure.com:443/ </param> <param name="authKeyOrResourceToken">The key to the account or resource token.</param> <summary> Initialize a new CosmosConfiguration class that holds all the properties the CosmosClient requires. </summary> <remarks>To be added.</remarks> <example> The example below creates a new <see cref="T:Azure.Cosmos.Fluent.CosmosClientBuilder" /><code language="c#"><![CDATA[ CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder( accountEndpoint: "https://testcosmos.documents.azure.com:443/", authKeyOrResourceToken: "SuperSecretKey"); CosmosClient client = cosmosClientBuilder.Build(); ]]></code></example> <example> The example below creates a new <see cref="T:Azure.Cosmos.Fluent.CosmosClientBuilder" /> with a ConsistencyLevel and a list of preferred locations. <code language="c#"><![CDATA[ CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder( accountEndpoint: "https://testcosmos.documents.azure.com:443/", authKeyOrResourceToken: "SuperSecretKey") .WithConsistencyLevel(ConsistencyLevel.Strong) .WithApplicationRegion("East US 2"); CosmosClient client = cosmosClientBuilder.Build(); ]]></code></example> </Docs> </Member> <Member MemberName="Build"> <MemberSignature Language="C#" Value="public Azure.Cosmos.CosmosClient Build ();" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Azure.Cosmos.CosmosClient Build() cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.Fluent.CosmosClientBuilder.Build" /> <MemberSignature Language="VB.NET" Value="Public Function Build () As CosmosClient" /> <MemberSignature Language="F#" Value="member this.Build : unit -&gt; Azure.Cosmos.CosmosClient" Usage="cosmosClientBuilder.Build " /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Cosmos.CosmosClient</ReturnType> </ReturnValue> <Parameters /> <Docs> <summary> A method to create the cosmos client </summary> <returns>An instance of <see cref="T:Azure.Cosmos.CosmosClient" />.</returns> <remarks> Setting this property after sending any request won't have any effect. </remarks> </Docs> </Member> <Member MemberName="WithApplicationName"> <MemberSignature Language="C#" Value="public Azure.Cosmos.Fluent.CosmosClientBuilder WithApplicationName (string applicationName);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Azure.Cosmos.Fluent.CosmosClientBuilder WithApplicationName(string applicationName) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.Fluent.CosmosClientBuilder.WithApplicationName(System.String)" /> <MemberSignature Language="VB.NET" Value="Public Function WithApplicationName (applicationName As String) As CosmosClientBuilder" /> <MemberSignature Language="F#" Value="member this.WithApplicationName : string -&gt; Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithApplicationName applicationName" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType> </ReturnValue> <Parameters> <Parameter Name="applicationName" Type="System.String" /> </Parameters> <Docs> <param name="applicationName">A string to use as suffix in the User Agent.</param> <summary> A suffix to be added to the default user-agent for the Azure Cosmos DB service. </summary> <returns>The current <see cref="T:Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns> <remarks> Setting this property after sending any request won't have any effect. </remarks> </Docs> </Member> <Member MemberName="WithApplicationRegion"> <MemberSignature Language="C#" Value="public Azure.Cosmos.Fluent.CosmosClientBuilder WithApplicationRegion (string applicationRegion);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Azure.Cosmos.Fluent.CosmosClientBuilder WithApplicationRegion(string applicationRegion) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.Fluent.CosmosClientBuilder.WithApplicationRegion(System.String)" /> <MemberSignature Language="VB.NET" Value="Public Function WithApplicationRegion (applicationRegion As String) As CosmosClientBuilder" /> <MemberSignature Language="F#" Value="member this.WithApplicationRegion : string -&gt; Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithApplicationRegion applicationRegion" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType> </ReturnValue> <Parameters> <Parameter Name="applicationRegion" Type="System.String" /> </Parameters> <Docs> <param name="applicationRegion">Azure region where application is running. <see cref="T:Azure.Cosmos.Regions" /> lists valid Cosmos DB regions.</param> <summary> Set the preferred geo-replicated region to be used in the Azure Cosmos DB service. </summary> <returns>The current <see cref="T:Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns> <remarks>To be added.</remarks> <example> The example below creates a new <see cref="T:Azure.Cosmos.Fluent.CosmosClientBuilder" /> with a of preferred region. <code language="c#"><![CDATA[ CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder( accountEndpoint: "https://testcosmos.documents.azure.com:443/", authKeyOrResourceToken: "SuperSecretKey") .WithApplicationRegion("East US 2"); CosmosClient client = cosmosClientBuilder.Build(); ]]></code></example> <altmember cref="P:Azure.Cosmos.CosmosClientOptions.ApplicationRegion" /> </Docs> </Member> <Member MemberName="WithConnectionModeDirect"> <MemberSignature Language="C#" Value="public Azure.Cosmos.Fluent.CosmosClientBuilder WithConnectionModeDirect ();" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Azure.Cosmos.Fluent.CosmosClientBuilder WithConnectionModeDirect() cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.Fluent.CosmosClientBuilder.WithConnectionModeDirect" /> <MemberSignature Language="VB.NET" Value="Public Function WithConnectionModeDirect () As CosmosClientBuilder" /> <MemberSignature Language="F#" Value="member this.WithConnectionModeDirect : unit -&gt; Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithConnectionModeDirect " /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType> </ReturnValue> <Parameters /> <Docs> <summary> Sets the connection mode to Direct. This is used by the client when connecting to the Azure Cosmos DB service. </summary> <returns>The current <see cref="T:Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns> <remarks> For more information, see <see href="https://docs.microsoft.com/azure/documentdb/documentdb-performance-tips#direct-connection">Connection policy: Use direct connection mode</see>. </remarks> <altmember cref="P:Azure.Cosmos.CosmosClientOptions.ConnectionMode" /> </Docs> </Member> <Member MemberName="WithConnectionModeGateway"> <MemberSignature Language="C#" Value="public Azure.Cosmos.Fluent.CosmosClientBuilder WithConnectionModeGateway (int? maxConnectionLimit = default, System.Net.IWebProxy webProxy = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Azure.Cosmos.Fluent.CosmosClientBuilder WithConnectionModeGateway(valuetype System.Nullable`1&lt;int32&gt; maxConnectionLimit, class System.Net.IWebProxy webProxy) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.Fluent.CosmosClientBuilder.WithConnectionModeGateway(System.Nullable{System.Int32},System.Net.IWebProxy)" /> <MemberSignature Language="VB.NET" Value="Public Function WithConnectionModeGateway (Optional maxConnectionLimit As Nullable(Of Integer) = Nothing, Optional webProxy As IWebProxy = Nothing) As CosmosClientBuilder" /> <MemberSignature Language="F#" Value="member this.WithConnectionModeGateway : Nullable&lt;int&gt; * System.Net.IWebProxy -&gt; Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithConnectionModeGateway (maxConnectionLimit, webProxy)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType> </ReturnValue> <Parameters> <Parameter Name="maxConnectionLimit" Type="System.Nullable&lt;System.Int32&gt;" /> <Parameter Name="webProxy" Type="System.Net.IWebProxy" /> </Parameters> <Docs> <param name="maxConnectionLimit">The number specifies the time to wait for response to come back from network peer. Default is 60 connections</param> <param name="webProxy">Get or set the proxy information used for web requests.</param> <summary> Sets the connection mode to Gateway. This is used by the client when connecting to the Azure Cosmos DB service. </summary> <returns>The current <see cref="T:Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns> <remarks> For more information, see <see href="https://docs.microsoft.com/azure/documentdb/documentdb-performance-tips#direct-connection">Connection policy: Use direct connection mode</see>. </remarks> <altmember cref="P:Azure.Cosmos.CosmosClientOptions.GatewayModeMaxConnectionLimit" /> <altmember cref="P:Azure.Cosmos.CosmosClientOptions.ConnectionMode" /> </Docs> </Member> <Member MemberName="WithConsistencyLevel"> <MemberSignature Language="C#" Value="public Azure.Cosmos.Fluent.CosmosClientBuilder WithConsistencyLevel (Azure.Cosmos.ConsistencyLevel consistencyLevel);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Azure.Cosmos.Fluent.CosmosClientBuilder WithConsistencyLevel(valuetype Azure.Cosmos.ConsistencyLevel consistencyLevel) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.Fluent.CosmosClientBuilder.WithConsistencyLevel(Azure.Cosmos.ConsistencyLevel)" /> <MemberSignature Language="VB.NET" Value="Public Function WithConsistencyLevel (consistencyLevel As ConsistencyLevel) As CosmosClientBuilder" /> <MemberSignature Language="F#" Value="member this.WithConsistencyLevel : Azure.Cosmos.ConsistencyLevel -&gt; Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithConsistencyLevel consistencyLevel" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType> </ReturnValue> <Parameters> <Parameter Name="consistencyLevel" Type="Azure.Cosmos.ConsistencyLevel" /> </Parameters> <Docs> <param name="consistencyLevel">The desired consistency level for the client.</param> <summary> This can be used to weaken the database account consistency level for read operations. If this is not set the database account consistency level will be used for all requests. </summary> <returns>The current <see cref="T:Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName="WithCustomSerializer"> <MemberSignature Language="C#" Value="public Azure.Cosmos.Fluent.CosmosClientBuilder WithCustomSerializer (Azure.Cosmos.Serialization.CosmosSerializer cosmosJsonSerializer);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Azure.Cosmos.Fluent.CosmosClientBuilder WithCustomSerializer(class Azure.Cosmos.Serialization.CosmosSerializer cosmosJsonSerializer) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.Fluent.CosmosClientBuilder.WithCustomSerializer(Azure.Cosmos.Serialization.CosmosSerializer)" /> <MemberSignature Language="VB.NET" Value="Public Function WithCustomSerializer (cosmosJsonSerializer As CosmosSerializer) As CosmosClientBuilder" /> <MemberSignature Language="F#" Value="member this.WithCustomSerializer : Azure.Cosmos.Serialization.CosmosSerializer -&gt; Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithCustomSerializer cosmosJsonSerializer" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType> </ReturnValue> <Parameters> <Parameter Name="cosmosJsonSerializer" Type="Azure.Cosmos.Serialization.CosmosSerializer" /> </Parameters> <Docs> <param name="cosmosJsonSerializer">The custom class that implements <see cref="T:Azure.Cosmos.Serialization.CosmosSerializer" /></param> <summary> Set a custom JSON serializer. </summary> <returns>The <see cref="T:Azure.Cosmos.Fluent.CosmosClientBuilder" /> object</returns> <remarks>To be added.</remarks> <altmember cref="P:Azure.Cosmos.CosmosClientOptions.Serializer" /> <altmember cref="T:Azure.Cosmos.Serialization.CosmosSerializer" /> </Docs> </Member> <Member MemberName="WithLimitToEndpoint"> <MemberSignature Language="C#" Value="public Azure.Cosmos.Fluent.CosmosClientBuilder WithLimitToEndpoint (bool limitToEndpoint);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Azure.Cosmos.Fluent.CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.Fluent.CosmosClientBuilder.WithLimitToEndpoint(System.Boolean)" /> <MemberSignature Language="VB.NET" Value="Public Function WithLimitToEndpoint (limitToEndpoint As Boolean) As CosmosClientBuilder" /> <MemberSignature Language="F#" Value="member this.WithLimitToEndpoint : bool -&gt; Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithLimitToEndpoint limitToEndpoint" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType> </ReturnValue> <Parameters> <Parameter Name="limitToEndpoint" Type="System.Boolean" /> </Parameters> <Docs> <param name="limitToEndpoint">Whether operations are limited to the endpoint or not.</param> <summary> Limits the operations to the provided endpoint on the CosmosClientBuilder constructor. </summary> <returns>Default value is false.</returns> <remarks> When the value of <paramref name="limitToEndpoint" /> is false, the SDK will automatically discover all account write and read regions, and use them when the configured application region is not available. When set to true, availability is limited to the endpoint specified on the CosmosClientBuilder constructor. Using <see cref="M:Azure.Cosmos.Fluent.CosmosClientBuilder.WithApplicationRegion(System.String)" /> is not allowed when the value is true. </remarks> <example> The example below creates a new <see cref="T:Azure.Cosmos.Fluent.CosmosClientBuilder" /> to limit the endpoint to East US. <code language="c#"><![CDATA[ CosmosClientBuilder cosmosClientBuilder = new CosmosClientBuilder( accountEndpoint: "https://testcosmos-eastus.documents.azure.com:443/", authKeyOrResourceToken: "SuperSecretKey") .WithLimitToEndpoint(true); CosmosClient client = cosmosClientBuilder.Build(); ]]></code></example> <altmember cref="P:Azure.Cosmos.CosmosClientOptions.LimitToEndpoint" /> </Docs> </Member> <Member MemberName="WithRequestTimeout"> <MemberSignature Language="C#" Value="public Azure.Cosmos.Fluent.CosmosClientBuilder WithRequestTimeout (TimeSpan requestTimeout);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Azure.Cosmos.Fluent.CosmosClientBuilder WithRequestTimeout(valuetype System.TimeSpan requestTimeout) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.Fluent.CosmosClientBuilder.WithRequestTimeout(System.TimeSpan)" /> <MemberSignature Language="VB.NET" Value="Public Function WithRequestTimeout (requestTimeout As TimeSpan) As CosmosClientBuilder" /> <MemberSignature Language="F#" Value="member this.WithRequestTimeout : TimeSpan -&gt; Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithRequestTimeout requestTimeout" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType> </ReturnValue> <Parameters> <Parameter Name="requestTimeout" Type="System.TimeSpan" /> </Parameters> <Docs> <param name="requestTimeout">A time to use as timeout for operations.</param> <summary> Sets the request timeout in seconds when connecting to the Azure Cosmos DB service. </summary> <returns>Default value is 60 seconds.</returns> <remarks>To be added.</remarks> <altmember cref="P:Azure.Cosmos.CosmosClientOptions.RequestTimeout" /> </Docs> </Member> <Member MemberName="WithSerializerOptions"> <MemberSignature Language="C#" Value="public Azure.Cosmos.Fluent.CosmosClientBuilder WithSerializerOptions (Azure.Cosmos.Serialization.CosmosSerializationOptions cosmosSerializerOptions);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Azure.Cosmos.Fluent.CosmosClientBuilder WithSerializerOptions(class Azure.Cosmos.Serialization.CosmosSerializationOptions cosmosSerializerOptions) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.Fluent.CosmosClientBuilder.WithSerializerOptions(Azure.Cosmos.Serialization.CosmosSerializationOptions)" /> <MemberSignature Language="VB.NET" Value="Public Function WithSerializerOptions (cosmosSerializerOptions As CosmosSerializationOptions) As CosmosClientBuilder" /> <MemberSignature Language="F#" Value="member this.WithSerializerOptions : Azure.Cosmos.Serialization.CosmosSerializationOptions -&gt; Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithSerializerOptions cosmosSerializerOptions" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType> </ReturnValue> <Parameters> <Parameter Name="cosmosSerializerOptions" Type="Azure.Cosmos.Serialization.CosmosSerializationOptions" /> </Parameters> <Docs> <param name="cosmosSerializerOptions">The custom class that implements <see cref="T:Azure.Cosmos.Serialization.CosmosSerializer" /></param> <summary> Set a custom serializer option. </summary> <returns>The <see cref="T:Azure.Cosmos.Fluent.CosmosClientBuilder" /> object</returns> <remarks>To be added.</remarks> <altmember cref="P:Azure.Cosmos.CosmosClientOptions.SerializerOptions" /> <altmember cref="T:Azure.Cosmos.Serialization.CosmosSerializer" /> </Docs> </Member> <Member MemberName="WithThrottlingRetryOptions"> <MemberSignature Language="C#" Value="public Azure.Cosmos.Fluent.CosmosClientBuilder WithThrottlingRetryOptions (TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig instance class Azure.Cosmos.Fluent.CosmosClientBuilder WithThrottlingRetryOptions(valuetype System.TimeSpan maxRetryWaitTimeOnThrottledRequests, int32 maxRetryAttemptsOnThrottledRequests) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Cosmos.Fluent.CosmosClientBuilder.WithThrottlingRetryOptions(System.TimeSpan,System.Int32)" /> <MemberSignature Language="VB.NET" Value="Public Function WithThrottlingRetryOptions (maxRetryWaitTimeOnThrottledRequests As TimeSpan, maxRetryAttemptsOnThrottledRequests As Integer) As CosmosClientBuilder" /> <MemberSignature Language="F#" Value="member this.WithThrottlingRetryOptions : TimeSpan * int -&gt; Azure.Cosmos.Fluent.CosmosClientBuilder" Usage="cosmosClientBuilder.WithThrottlingRetryOptions (maxRetryWaitTimeOnThrottledRequests, maxRetryAttemptsOnThrottledRequests)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Cosmos</AssemblyName> <AssemblyVersion>4.0.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Cosmos.Fluent.CosmosClientBuilder</ReturnType> </ReturnValue> <Parameters> <Parameter Name="maxRetryWaitTimeOnThrottledRequests" Type="System.TimeSpan" /> <Parameter Name="maxRetryAttemptsOnThrottledRequests" Type="System.Int32" /> </Parameters> <Docs> <param name="maxRetryWaitTimeOnThrottledRequests">The maximum retry time in seconds for the Azure Cosmos DB service. Any interval that is smaller than a second will be ignored.</param> <param name="maxRetryAttemptsOnThrottledRequests">The number specifies the times retry requests for throttled requests.</param> <summary> Sets the minimum time to wait between retry and the max number of times to retry on throttled requests. </summary> <returns>The current <see cref="T:Azure.Cosmos.Fluent.CosmosClientBuilder" />.</returns> <remarks>To be added.</remarks> <altmember cref="P:Azure.Cosmos.CosmosClientOptions.MaxRetryAttemptsOnRateLimitedRequests" /> <para> When a request fails due to a rate limiting error, the service sends back a response that contains a value indicating the client should not retry before the time period has elapsed. This property allows the application to set a maximum wait time for all retry attempts. If the cumulative wait time exceeds the this value, the client will stop retrying and return the error to the application. </para> <para> For more information, see <see href="https://docs.microsoft.com/azure/documentdb/documentdb-performance-tips#429">Handle rate limiting/request rate too large</see>. </para> <altmember cref="P:Azure.Cosmos.CosmosClientOptions.MaxRetryWaitTimeOnRateLimitedRequests" /> </Docs> </Member> </Members> </Type>