ConnectionPolicy Class

Represents the Connection policy associated with a CosmosClientConnection.

Inheritance
builtins.object
ConnectionPolicy

Constructor

ConnectionPolicy()

Variables

Name Description
RequestTimeout
int

Gets or sets the request timeout (time to wait for a response from a network peer).

ConnectionMode

Gets or sets the connection mode used in the client. (Currently only Gateway is supported.)

SSLConfiguration

Gets or sets the SSL configuration.

ProxyConfiguration

Gets or sets the proxy configuration.

EnableEndpointDiscovery
<xref:boolean>

Gets or sets endpoint discovery flag for geo-replicated database accounts. When EnableEndpointDiscovery is true, the client will automatically discover the current write and read locations and direct the requests to the correct location taking into consideration of the user's preference(if provided) as PreferredLocations.

PreferredLocations

Gets or sets the preferred locations for geo-replicated database accounts. When EnableEndpointDiscovery is true and PreferredLocations is non-empty, the client will use this list to evaluate the final location, taking into consideration the order specified in PreferredLocations. The locations in this list are specified as the names of the azure Cosmos locations like, 'West US', 'East US', 'Central India' and so on.

RetryOptions
<xref:RetryOptions>

Gets or sets the retry options to be applied to all requests when retrying.

DisableSSLVerification
<xref:boolean>

Flag to disable SSL verification for the requests. SSL verification is enabled by default. This is intended to be used only when targeting emulator endpoint to avoid failing your requests with SSL related error. DO NOT set this when targeting production endpoints.

UseMultipleWriteLocations
<xref:boolean>

Flag to enable writes on any locations (regions) for geo-replicated database accounts in the Azure Cosmos database service.

ConnectionRetryConfiguration

Retry Configuration to be used for connection retries.