Search Results for

    Show / Hide Table of Contents

    Interface IConnectionConfigurationValues

    Inherited Members
    IDisposable.Dispose()
    Namespace: OpenSearch.Net
    Assembly: OpenSearch.Net.dll
    Syntax
    public interface IConnectionConfigurationValues : IDisposable

    Properties

    | Edit this page View Source

    ApiKeyAuthenticationCredentials

    Api Key authorization credentials to specify with all requests.

    Declaration
    ApiKeyAuthenticationCredentials ApiKeyAuthenticationCredentials { get; }
    Property Value
    Type Description
    ApiKeyAuthenticationCredentials
    Remarks

    Cannot be used in conjuction with BasicAuthenticationCredentials

    | Edit this page View Source

    BasicAuthenticationCredentials

    Basic access authorization credentials to specify with all requests.

    Declaration
    BasicAuthenticationCredentials BasicAuthenticationCredentials { get; }
    Property Value
    Type Description
    BasicAuthenticationCredentials
    Remarks

    Cannot be used in conjuction with ApiKeyAuthenticationCredentials

    | Edit this page View Source

    BootstrapLock

    Provides a semaphoreslim to transport implementations that need to limit access to a resource

    Declaration
    SemaphoreSlim BootstrapLock { get; }
    Property Value
    Type Description
    SemaphoreSlim
    | Edit this page View Source

    ClientCertificates

    Use the following certificates to authenticate all HTTP requests. You can also set them on individual request using ClientCertificates

    Declaration
    X509CertificateCollection ClientCertificates { get; }
    Property Value
    Type Description
    X509CertificateCollection
    | Edit this page View Source

    Connection

    The connection implementation to use when talking with OpenSearch

    Declaration
    IConnection Connection { get; }
    Property Value
    Type Description
    IConnection
    | Edit this page View Source

    ConnectionLimit

    Limits the number of concurrent connections that can be opened to an endpoint. Defaults to 80 (see DefaultConnectionLimit).

    For Desktop CLR, this setting applies to the DefaultConnectionLimit property on the ServicePointManager object when creating ServicePoint objects, affecting the default IConnection implementation.

    For Core CLR, this setting applies to the MaxConnectionsPerServer property on the HttpClientHandler instances used by the HttpClient inside the default IConnection implementation

    Declaration
    int ConnectionLimit { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    ConnectionPool

    The connection pool to use when talking with OpenSearch

    Declaration
    IConnectionPool ConnectionPool { get; }
    Property Value
    Type Description
    IConnectionPool
    | Edit this page View Source

    DeadTimeout

    The time to put dead nodes out of rotation (this will be multiplied by the number of times they've been dead)

    Declaration
    TimeSpan? DeadTimeout { get; }
    Property Value
    Type Description
    TimeSpan?
    | Edit this page View Source

    DisableAutomaticProxyDetection

    Disabled proxy detection on the webrequest, in some cases this may speed up the first connection your appdomain makes, in other cases it will actually increase the time for the first connection. No silver bullet! use with care!

    Declaration
    bool DisableAutomaticProxyDetection { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    DisableDirectStreaming

    When set to true will disable (de)serializing directly to the request and response stream and return a byte[] copy of the raw request and response on OpenSearch calls. Defaults to false

    Declaration
    bool DisableDirectStreaming { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    DisableMetaHeader

    Declaration
    bool DisableMetaHeader { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    DisablePings

    This signals that we do not want to send initial pings to unknown/previously dead nodes and just send the call straightaway

    Declaration
    bool DisablePings { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    DnsRefreshTimeout

    DnsRefreshTimeout for the connections. Defaults to 5 minutes.

    Will create new instances of HttpClient after this timeout to force DNS updates

    Declaration
    TimeSpan DnsRefreshTimeout { get; }
    Property Value
    Type Description
    TimeSpan
    | Edit this page View Source

    EnableHttpCompression

    Enable gzip compressed requests and responses, do note that you need to configure OpenSearch to set this

    Declaration
    bool EnableHttpCompression { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    EnableTcpStats

    Enable statistics about TCP connections to be collected when making a request

    Declaration
    bool EnableTcpStats { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    EnableThreadPoolStats

    Enable statistics about thread pools to be collected when making a request

    Declaration
    bool EnableThreadPoolStats { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Headers

    Try to send these headers for every request

    Declaration
    NameValueCollection Headers { get; }
    Property Value
    Type Description
    NameValueCollection
    | Edit this page View Source

    HttpPipeliningEnabled

    Whether HTTP pipelining is enabled. The default is true

    Declaration
    bool HttpPipeliningEnabled { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    KeepAliveInterval

    KeepAliveInterval - specifies the interval, in milliseconds, between when successive keep-alive packets are sent if no acknowledgement is received.

    Declaration
    TimeSpan? KeepAliveInterval { get; }
    Property Value
    Type Description
    TimeSpan?
    | Edit this page View Source

    KeepAliveTime

    KeepAliveTime - specifies the timeout, in milliseconds, with no activity until the first keep-alive packet is sent.

    Declaration
    TimeSpan? KeepAliveTime { get; }
    Property Value
    Type Description
    TimeSpan?
    | Edit this page View Source

    MaxDeadTimeout

    The maximum amount of time a node is allowed to marked dead

    Declaration
    TimeSpan? MaxDeadTimeout { get; }
    Property Value
    Type Description
    TimeSpan?
    | Edit this page View Source

    MaxRetries

    When a retryable exception occurs or status code is returned this controls the maximum amount of times we should retry the call to OpenSearch

    Declaration
    int? MaxRetries { get; }
    Property Value
    Type Description
    int?
    | Edit this page View Source

    MaxRetryTimeout

    Limits the total runtime including retries separately from RequestTimeout

    When not specified defaults to RequestTimeout which itself defaults to 60 seconds
    
    Declaration
    TimeSpan? MaxRetryTimeout { get; }
    Property Value
    Type Description
    TimeSpan?
    | Edit this page View Source

    MemoryStreamFactory

    Provides a memory stream factory

    Declaration
    IMemoryStreamFactory MemoryStreamFactory { get; }
    Property Value
    Type Description
    IMemoryStreamFactory
    | Edit this page View Source

    MetaHeaderProvider

    Produces the client meta header for a request.

    Declaration
    MetaHeaderProvider MetaHeaderProvider { get; }
    Property Value
    Type Description
    MetaHeaderProvider
    | Edit this page View Source

    NodePredicate

    Register a predicate to select which nodes that you want to execute API calls on. Note that sniffing requests omit this predicate and always execute on all nodes. When using an IConnectionPool implementation that supports reseeding of nodes, this will default to omitting cluster_manager only node from regular API calls. When using static or single node connection pooling it is assumed the list of node you instantiate the client with should be taken verbatim.

    Declaration
    Func<Node, bool> NodePredicate { get; }
    Property Value
    Type Description
    Func<Node, bool>
    | Edit this page View Source

    OnRequestCompleted

    Allows you to register a callback every time a an API call is returned

    Declaration
    Action<IApiCallDetails> OnRequestCompleted { get; }
    Property Value
    Type Description
    Action<IApiCallDetails>
    | Edit this page View Source

    OnRequestDataCreated

    An action to run when the RequestData for a request has been created.

    Declaration
    Action<RequestData> OnRequestDataCreated { get; }
    Property Value
    Type Description
    Action<RequestData>
    | Edit this page View Source

    PingTimeout

    The timeout in milliseconds to use for ping requests, which are issued to determine whether a node is alive

    Declaration
    TimeSpan? PingTimeout { get; }
    Property Value
    Type Description
    TimeSpan?
    | Edit this page View Source

    PrettyJson

    Forces all requests to have ?pretty=true, causing OpenSearch to return formatted json. Also forces the client to send out formatted json. Defaults to false

    Declaration
    bool PrettyJson { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    ProxyAddress

    When set will force all connections through this proxy

    Declaration
    string ProxyAddress { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    ProxyPassword

    The password for the proxy, when configured

    Declaration
    SecureString ProxyPassword { get; }
    Property Value
    Type Description
    SecureString
    | Edit this page View Source

    ProxyUsername

    The username for the proxy, when configured

    Declaration
    string ProxyUsername { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    QueryStringParameters

    Append these query string parameters automatically to every request

    Declaration
    NameValueCollection QueryStringParameters { get; }
    Property Value
    Type Description
    NameValueCollection
    | Edit this page View Source

    RequestResponseSerializer

    The serializer to use to serialize requests and deserialize responses

    Declaration
    IOpenSearchSerializer RequestResponseSerializer { get; }
    Property Value
    Type Description
    IOpenSearchSerializer
    | Edit this page View Source

    RequestTimeout

    The timeout in milliseconds for each request to OpenSearch

    Declaration
    TimeSpan RequestTimeout { get; }
    Property Value
    Type Description
    TimeSpan
    | Edit this page View Source

    ServerCertificateValidationCallback

    Register a ServerCertificateValidationCallback per request

    Declaration
    Func<object, X509Certificate, X509Chain, SslPolicyErrors, bool> ServerCertificateValidationCallback { get; }
    Property Value
    Type Description
    Func<object, X509Certificate, X509Chain, SslPolicyErrors, bool>
    | Edit this page View Source

    SkipDeserializationForStatusCodes

    Configure the client to skip deserialization of certain status codes e.g: you run OpenSearch behind a proxy that returns an unexpected json format

    Declaration
    IReadOnlyCollection<int> SkipDeserializationForStatusCodes { get; }
    Property Value
    Type Description
    IReadOnlyCollection<int>
    | Edit this page View Source

    SniffInformationLifeSpan

    Force a new sniff for the cluster when the cluster state information is older than the specified timespan

    Declaration
    TimeSpan? SniffInformationLifeSpan { get; }
    Property Value
    Type Description
    TimeSpan?
    | Edit this page View Source

    SniffsOnConnectionFault

    Force a new sniff for the cluster state every time a connection dies

    Declaration
    bool SniffsOnConnectionFault { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    SniffsOnStartup

    Sniff the cluster state immediately on startup

    Declaration
    bool SniffsOnStartup { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    StatusCodeToResponseSuccess

    Allow you to override the status code inspection that sets Success

    Defaults to validating the statusCode is greater or equal to 200 and less then 300

    When the request is using HEAD 404 is valid out of the box as well

    NOTE: if a request specifies AllowedStatusCodes this takes precedence

    Declaration
    Func<HttpMethod, int, bool> StatusCodeToResponseSuccess { get; }
    Property Value
    Type Description
    Func<HttpMethod, int, bool>
    | Edit this page View Source

    ThrowExceptions

    Instead of following a c/go like error checking on response.IsValid do throw an exception (except when SuccessOrKnownError is false) on the client when a call resulted in an exception on either the client or the OpenSearch server.

    Reasons for such exceptions could be search parser errors, index missing exceptions, etc...

    Declaration
    bool ThrowExceptions { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    TransferEncodingChunked

    Whether the request should be sent with chunked Transfer-Encoding.

    Declaration
    bool TransferEncodingChunked { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    UrlFormatter

    Declaration
    OpenSearchUrlFormatter UrlFormatter { get; }
    Property Value
    Type Description
    OpenSearchUrlFormatter
    | Edit this page View Source

    UserAgent

    The user agent string to send with requests. Useful for debugging purposes to understand client and framework versions that initiate requests to OpenSearch

    Declaration
    string UserAgent { get; }
    Property Value
    Type Description
    string

    Extension Methods

    SuffixExtensions.Suffix(object, string)
    • Edit this page
    • View Source
    In this article
    • Properties
      • ApiKeyAuthenticationCredentials
      • BasicAuthenticationCredentials
      • BootstrapLock
      • ClientCertificates
      • Connection
      • ConnectionLimit
      • ConnectionPool
      • DeadTimeout
      • DisableAutomaticProxyDetection
      • DisableDirectStreaming
      • DisableMetaHeader
      • DisablePings
      • DnsRefreshTimeout
      • EnableHttpCompression
      • EnableTcpStats
      • EnableThreadPoolStats
      • Headers
      • HttpPipeliningEnabled
      • KeepAliveInterval
      • KeepAliveTime
      • MaxDeadTimeout
      • MaxRetries
      • MaxRetryTimeout
      • MemoryStreamFactory
      • MetaHeaderProvider
      • NodePredicate
      • OnRequestCompleted
      • OnRequestDataCreated
      • PingTimeout
      • PrettyJson
      • ProxyAddress
      • ProxyPassword
      • ProxyUsername
      • QueryStringParameters
      • RequestResponseSerializer
      • RequestTimeout
      • ServerCertificateValidationCallback
      • SkipDeserializationForStatusCodes
      • SniffInformationLifeSpan
      • SniffsOnConnectionFault
      • SniffsOnStartup
      • StatusCodeToResponseSuccess
      • ThrowExceptions
      • TransferEncodingChunked
      • UrlFormatter
      • UserAgent
    • Extension Methods
    Back to top Generated by DocFX