Class InfluxDBClientOptions.Builder
A builder for InfluxDBClientOptions.
Inheritance
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public sealed class Builder : object
Methods
AddDefaultTag(String, String)
Add default tag that will be use for writes by Point and POJO.
The expressions can be:
Declaration
public InfluxDBClientOptions.Builder AddDefaultTag(string tagName, string expression)
Parameters
Type | Name | Description |
---|---|---|
System.String | tagName | the tag name |
System.String | expression | the tag value expression |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
AllowRedirects(Boolean)
Configure automatically following HTTP 3xx redirects.
Declaration
public InfluxDBClientOptions.Builder AllowRedirects(bool allowHttpRedirects)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | allowHttpRedirects | configure HTTP redirects |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
Authenticate(String, Char[])
Setup authorization by Session.
Declaration
public InfluxDBClientOptions.Builder Authenticate(string username, char[] password)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | the username to use in the basic auth |
System.Char[] | password | the password to use in the basic auth |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
AuthenticateToken(Char[])
Setup authorization by Token.
Declaration
public InfluxDBClientOptions.Builder AuthenticateToken(char[] token)
Parameters
Type | Name | Description |
---|---|---|
System.Char[] | token | the token to use for the authorization |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
AuthenticateToken(String)
Setup authorization by Token.
Declaration
public InfluxDBClientOptions.Builder AuthenticateToken(string token)
Parameters
Type | Name | Description |
---|---|---|
System.String | token | the token to use for the authorization |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
Bucket(String)
Specify the default destination bucket for writes.
Declaration
public InfluxDBClientOptions.Builder Bucket(string bucket)
Parameters
Type | Name | Description |
---|---|---|
System.String | bucket | default destination bucket for writes |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
Build()
Build an instance of InfluxDBClientOptions.
Declaration
public InfluxDBClientOptions Build()
Returns
Type | Description |
---|---|
InfluxDBClientOptions |
ClientCertificates(X509CertificateCollection)
Set X509CertificateCollection to be sent with HTTP requests
Declaration
public InfluxDBClientOptions.Builder ClientCertificates(X509CertificateCollection clientCertificates)
Parameters
Type | Name | Description |
---|---|---|
X509CertificateCollection | clientCertificates | certificate collections |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
ConnectionString(String)
Configure Builder via connection string.
Declaration
public InfluxDBClientOptions.Builder ConnectionString(string connectionString)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionString | connection string with various configurations |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
CreateNew()
Declaration
public static InfluxDBClientOptions.Builder CreateNew()
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
LogLevel(LogLevel)
Set the log level for the request and response information.
Declaration
public InfluxDBClientOptions.Builder LogLevel(LogLevel logLevel)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | logLevel | The log level for the request and response information. |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
Org(String)
Specify the default destination organization for writes and queries.
Declaration
public InfluxDBClientOptions.Builder Org(string org)
Parameters
Type | Name | Description |
---|---|---|
System.String | org | the default destination organization for writes and queries |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
Proxy(IWebProxy)
Specify the WebProxy instance to use by the WebRequest to connect to external InfluxDB.
Declaration
public InfluxDBClientOptions.Builder Proxy(IWebProxy webProxy)
Parameters
Type | Name | Description |
---|---|---|
IWebProxy | webProxy | The WebProxy to use to access the InfluxDB. |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
RemoteCertificateValidationCallback(RemoteCertificateValidationCallback)
Callback function for handling the remote SSL Certificate Validation.
The callback takes precedence over VerifySsl
.
Declaration
public InfluxDBClientOptions.Builder RemoteCertificateValidationCallback(RemoteCertificateValidationCallback callback)
Parameters
Type | Name | Description |
---|---|---|
RemoteCertificateValidationCallback | callback |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
SetHttpClient(HttpClient)
Configure HttpClient
Declaration
public InfluxDBClientOptions.Builder SetHttpClient(HttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
HttpClient | httpClient |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
TimeOut(TimeSpan)
Set the timespan to wait before the HTTP request times out.
Declaration
public InfluxDBClientOptions.Builder TimeOut(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout | The timespan to wait before the HTTP request times out. It must be defined. |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
Url(String)
Set the url to connect the InfluxDB.
Declaration
public InfluxDBClientOptions.Builder Url(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | the url to connect the InfluxDB. It must be defined. |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |
VerifySsl(Boolean)
Ignore Certificate Validation Errors when false
.
Declaration
public InfluxDBClientOptions.Builder VerifySsl(bool verifySsl)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | verifySsl | validates Certificates |
Returns
Type | Description |
---|---|
InfluxDBClientOptions.Builder |