Class ConnectionConfiguration
Allows you to control how OpenSearchLowLevelClient behaves and where/how it connects to OpenSearch
Inherited Members
Namespace: OpenSearch.Net
Assembly: OpenSearch.Net.dll
Syntax
public class ConnectionConfiguration : ConnectionConfiguration<ConnectionConfiguration>, IConnectionConfigurationValues, IDisposable
Constructors
| Edit this page View SourceConnectionConfiguration(IConnectionPool)
Creates a new instance of ConnectionConfiguration
Declaration
public ConnectionConfiguration(IConnectionPool connectionPool)
Parameters
Type | Name | Description |
---|---|---|
IConnectionPool | connectionPool | A connection pool implementation that tells the client what nodes are available |
ConnectionConfiguration(IConnectionPool, IConnection)
Creates a new instance of ConnectionConfiguration
Declaration
public ConnectionConfiguration(IConnectionPool connectionPool, IConnection connection)
Parameters
Type | Name | Description |
---|---|---|
IConnectionPool | connectionPool | A connection pool implementation that tells the client what nodes are available |
IConnection | connection | An connection implementation that can make API requests |
ConnectionConfiguration(IConnectionPool, IConnection, IOpenSearchSerializer)
Creates a new instance of ConnectionConfiguration
Declaration
public ConnectionConfiguration(IConnectionPool connectionPool, IConnection connection, IOpenSearchSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
IConnectionPool | connectionPool | A connection pool implementation that tells the client what nodes are available |
IConnection | connection | An connection implementation that can make API requests |
IOpenSearchSerializer | serializer | A serializer implementation used to serialize requests and deserialize responses |
ConnectionConfiguration(IConnectionPool, IOpenSearchSerializer)
Creates a new instance of ConnectionConfiguration
Declaration
public ConnectionConfiguration(IConnectionPool connectionPool, IOpenSearchSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
IConnectionPool | connectionPool | A connection pool implementation that tells the client what nodes are available |
IOpenSearchSerializer | serializer | A serializer implementation used to serialize requests and deserialize responses |
ConnectionConfiguration(string, ApiKeyAuthenticationCredentials)
Sets up the client to communicate to OpenSearch Cloud using cloudId
,
CloudConnectionPool documentation for more information on how to obtain your Cloud Id
Declaration
public ConnectionConfiguration(string cloudId, ApiKeyAuthenticationCredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
string | cloudId | |
ApiKeyAuthenticationCredentials | credentials |
ConnectionConfiguration(string, BasicAuthenticationCredentials)
Sets up the client to communicate to OpenSearch Cloud using cloudId
,
CloudConnectionPool documentation for more information on how to obtain your Cloud Id
Declaration
public ConnectionConfiguration(string cloudId, BasicAuthenticationCredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
string | cloudId | |
BasicAuthenticationCredentials | credentials |
ConnectionConfiguration(Uri, IConnection)
Creates a new instance of ConnectionConfiguration
Declaration
public ConnectionConfiguration(Uri uri = null, IConnection connection = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | The root of the OpenSearch node we want to connect to. Defaults to http://localhost:9200 |
IConnection | connection | A connection implementation that can make API requests. Defaults to HttpConnection |
Fields
| Edit this page View SourceDefaultConnectionLimit
The default connection limit for both OpenSearch.Net and OpenSearch.Client. Defaults to 80
Except for HttpClientHandler implementations based on curl, which defaults to ProcessorCount
Declaration
public static readonly int DefaultConnectionLimit
Field Value
Type | Description |
---|---|
int |
DefaultDnsRefreshTimeout
The default timeout before a TCP connection is forcefully recycled so that DNS updates come through Defaults to 5 minutes.
Declaration
public static readonly TimeSpan DefaultDnsRefreshTimeout
Field Value
Type | Description |
---|---|
TimeSpan |
DefaultPingTimeout
The default ping timeout. Defaults to 2 seconds
Declaration
public static readonly TimeSpan DefaultPingTimeout
Field Value
Type | Description |
---|---|
TimeSpan |
DefaultPingTimeoutOnSSL
The default ping timeout when the connection is over HTTPS. Defaults to 5 seconds
Declaration
public static readonly TimeSpan DefaultPingTimeoutOnSSL
Field Value
Type | Description |
---|---|
TimeSpan |
DefaultTimeout
The default timeout before the client aborts a request to OpenSearch. Defaults to 1 minute
Declaration
public static readonly TimeSpan DefaultTimeout
Field Value
Type | Description |
---|---|
TimeSpan |
DefaultUserAgent
The default user agent for OpenSearch.Net
Declaration
public static readonly string DefaultUserAgent
Field Value
Type | Description |
---|---|
string |