ConnectionPolicy ConnectionPolicy ConnectionPolicy Class

Definition

Represents the connection policy associated with a DocumentClient to connect to the Azure Cosmos DB service.

public sealed class ConnectionPolicy
type ConnectionPolicy = class
Public NotInheritable Class ConnectionPolicy
Inheritance
ConnectionPolicyConnectionPolicyConnectionPolicy

Constructors

ConnectionPolicy() ConnectionPolicy() ConnectionPolicy()

Initializes a new instance of the ConnectionPolicy class to connect to the Azure Cosmos DB service.

Properties

ConnectionMode ConnectionMode ConnectionMode

Gets or sets the connection mode used by the client when connecting to the Azure Cosmos DB service.

ConnectionProtocol ConnectionProtocol ConnectionProtocol

Gets or sets the connection protocol when connecting to the Azure Cosmos DB service.

Default Default Default

Gets the default connection policy used to connect to the Azure Cosmos DB service.

EnableEndpointDiscovery EnableEndpointDiscovery EnableEndpointDiscovery

Gets or sets the flag to enable endpoint discovery for geo-replicated database accounts in the Azure Cosmos DB service.

EnableReadRequestsFallback EnableReadRequestsFallback EnableReadRequestsFallback

Gets or sets whether to allow for reads to go to multiple regions configured on an account of Azure Cosmos DB service.

MaxConnectionLimit MaxConnectionLimit MaxConnectionLimit

Gets or sets the maximum number of concurrent connections allowed for the target service endpoint in the Azure Cosmos DB service.

MediaReadMode MediaReadMode MediaReadMode

Gets or sets the attachment content (a.k.a. media) download mode when connecting to the Azure Cosmos DB service.

MediaRequestTimeout MediaRequestTimeout MediaRequestTimeout

Gets or sets the media 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 for attachment content (a.k.a. media) operations.

PreferredLocations PreferredLocations PreferredLocations

Gets and sets the preferred locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. For example, "East US" as the preferred location.

RequestTimeout RequestTimeout RequestTimeout

Gets or sets 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.

RetryOptions RetryOptions RetryOptions

Gets or sets the RetryOptions associated with the DocumentClient in the Azure Cosmos DB service.

UserAgentSuffix UserAgentSuffix UserAgentSuffix

A suffix to be added to the default user-agent for the Azure Cosmos DB service.

Extension Methods

IsDefined(Object) IsDefined(Object) IsDefined(Object)

Determines if a certain property is defined or not.

IsNull(Object) IsNull(Object) IsNull(Object)

Determines if a certain property is null or not.

IsPrimitive(Object) IsPrimitive(Object) IsPrimitive(Object)

Determines if a certain property is of premitive JSON type.

Applies to