• InfluxDB3.Client API
Show / Hide Table of Contents
  • InfluxDB3.Client
    • IInfluxDBClient
    • InfluxDBApiException
    • InfluxDBClient
  • InfluxDB3.Client.Config
    • ClientConfig
    • QueryOptions
    • WriteOptions
  • InfluxDB3.Client.Internal
    • TypeCasting
  • InfluxDB3.Client.Query
    • QueryType
  • InfluxDB3.Client.Write
    • PointData
    • PointDataValues
    • WritePrecision

Class ClientConfig

The ClientConfig class holds the configuration for the InfluxDB client.

You can configure following options:

If you want create client with custom options, you can use the following code:

using var client = new InfluxDBClient(new ClientConfig{
    Host = "https://us-east-1-1.aws.cloud2.influxdata.com",
    Token = "my-token",
    Organization = "my-org",
    Database = "my-database",
    AllowHttpRedirects = true,
    DisableServerCertificateValidation = true,
    WriteOptions = new WriteOptions
   {
       Precision = WritePrecision.S,
       GzipThreshold = 4096
   },
   QueryOptions = new QueryOptions
   {
       Deadline = DateTime.UtcNow.AddSeconds(10),
       MaxReceiveMessageSize = 4096,
       MaxSendMessageSize = 4096,
       CompressionProviders = new List<ICompressionProvider>
       {
           Grpc.Net.Compression.GzipCompressionProvider.Default
       }
   }
});
Inheritance
object
ClientConfig
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: InfluxDB3.Client.Config
Assembly: InfluxDB3.Client.dll
Syntax
public class ClientConfig

Constructors

ClientConfig()

Initializes a new instance of client configuration.

Declaration
public ClientConfig()

Properties

AllowHttpRedirects

Automatically following HTTP 3xx redirects. Default to 'false'.

Declaration
public bool AllowHttpRedirects { get; set; }
Property Value
Type Description
bool

AuthScheme

Token authentication scheme.

Declaration
public string? AuthScheme { get; set; }
Property Value
Type Description
string

Database

The database to be used for InfluxDB operations.

Declaration
public string? Database { get; set; }
Property Value
Type Description
string

DisableCertificateRevocationListCheck

Disable SSL certificate revocation list (CRL) checking. Default to 'false'.

Declaration
public bool DisableCertificateRevocationListCheck { get; set; }
Property Value
Type Description
bool

DisableServerCertificateValidation

Disable server SSL certificate validation. Default to 'false'.

Declaration
public bool DisableServerCertificateValidation { get; set; }
Property Value
Type Description
bool

Headers

The custom headers that will be added to requests. This is useful for adding custom headers to requests, such as tracing headers. To add custom headers use following code:

using var client = new InfluxDBClient(new ClientConfig
{
    Host = "https://us-east-1-1.aws.cloud2.influxdata.com",
    Token = "my-token",
    Organization = "my-org",
    Database = "my-database",
    Headers = new Dictionary<string, string>
    {
        { "X-Tracing-Id", "123" },
    }
});
Declaration
public Dictionary<string, string>? Headers { get; set; }
Property Value
Type Description
Dictionary<string, string>

Host

The URL of the InfluxDB server.

Declaration
public string Host { get; set; }
Property Value
Type Description
string

Organization

The organization to be used for operations.

Declaration
public string? Organization { get; set; }
Property Value
Type Description
string

Proxy

The HTTP proxy URL. Default is not set.

Declaration
public WebProxy? Proxy { get; set; }
Property Value
Type Description
WebProxy

QueryOptions

Configuration options for query behavior in the InfluxDB client.

Declaration
public QueryOptions QueryOptions { get; set; }
Property Value
Type Description
QueryOptions

SslRootsFilePath

SSL root certificates file path.

Declaration
public string? SslRootsFilePath { get; set; }
Property Value
Type Description
string

Timeout

Timeout to wait before the HTTP request times out. Default to '10 seconds'.

Declaration
public TimeSpan Timeout { get; set; }
Property Value
Type Description
TimeSpan

Token

The authentication token for accessing the InfluxDB server.

Declaration
public string? Token { get; set; }
Property Value
Type Description
string

WriteOptions

Write options.

Declaration
public WriteOptions? WriteOptions { get; set; }
Property Value
Type Description
WriteOptions
In this article
Back to top Generated by DocFX