Class InfluxDBClientOptions.Builder
A builder for Influx
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. |
tagName | the tag name |
System. |
expression | the tag value expression |
Returns
Type | Description |
---|---|
Influx |
AllowRedirects(Boolean)
Configure automatically following HTTP 3xx redirects.
Declaration
public InfluxDBClientOptions.Builder AllowRedirects(bool allowHttpRedirects)
Parameters
Type | Name | Description |
---|---|---|
System. |
allowHttpRedirects | configure HTTP redirects |
Returns
Type | Description |
---|---|
Influx |
Authenticate(String, Char[])
Setup authorization by Session.
Declaration
public InfluxDBClientOptions.Builder Authenticate(string username, char[] password)
Parameters
Type | Name | Description |
---|---|---|
System. |
username | the username to use in the basic auth |
System. |
password | the password to use in the basic auth |
Returns
Type | Description |
---|---|
Influx |
AuthenticateToken(Char[])
Setup authorization by Token.
Declaration
public InfluxDBClientOptions.Builder AuthenticateToken(char[] token)
Parameters
Type | Name | Description |
---|---|---|
System. |
token | the token to use for the authorization |
Returns
Type | Description |
---|---|
Influx |
AuthenticateToken(String)
Setup authorization by Token.
Declaration
public InfluxDBClientOptions.Builder AuthenticateToken(string token)
Parameters
Type | Name | Description |
---|---|---|
System. |
token | the token to use for the authorization |
Returns
Type | Description |
---|---|
Influx |
Bucket(String)
Specify the default destination bucket for writes.
Declaration
public InfluxDBClientOptions.Builder Bucket(string bucket)
Parameters
Type | Name | Description |
---|---|---|
System. |
bucket | default destination bucket for writes |
Returns
Type | Description |
---|---|
Influx |
Build()
Build an instance of InfluxDBClientOptions.
Declaration
public InfluxDBClientOptions Build()
Returns
Type | Description |
---|---|
Influx |
ClientCertificates(X509CertificateCollection)
Set X509CertificateCollection to be sent with HTTP requests
Declaration
public InfluxDBClientOptions.Builder ClientCertificates(X509CertificateCollection clientCertificates)
Parameters
Type | Name | Description |
---|---|---|
X509Certificate |
clientCertificates | certificate collections |
Returns
Type | Description |
---|---|
Influx |
ConnectionString(String)
Configure Builder via connection string.
Declaration
public InfluxDBClientOptions.Builder ConnectionString(string connectionString)
Parameters
Type | Name | Description |
---|---|---|
System. |
connectionString | connection string with various configurations |
Returns
Type | Description |
---|---|
Influx |
CreateNew()
Declaration
public static InfluxDBClientOptions.Builder CreateNew()
Returns
Type | Description |
---|---|
Influx |
LogLevel(LogLevel)
Set the log level for the request and response information.
Declaration
public InfluxDBClientOptions.Builder LogLevel(LogLevel logLevel)
Parameters
Type | Name | Description |
---|---|---|
Log |
logLevel | The log level for the request and response information. |
Returns
Type | Description |
---|---|
Influx |
Org(String)
Specify the default destination organization for writes and queries.
Declaration
public InfluxDBClientOptions.Builder Org(string org)
Parameters
Type | Name | Description |
---|---|---|
System. |
org | the default destination organization for writes and queries |
Returns
Type | Description |
---|---|
Influx |
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 |
---|---|---|
IWeb |
webProxy | The WebProxy to use to access the InfluxDB. |
Returns
Type | Description |
---|---|
Influx |
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 |
---|---|---|
Remote |
callback |
Returns
Type | Description |
---|---|
Influx |
SetHttpClient(HttpClient)
Configure HttpClient
Declaration
public InfluxDBClientOptions.Builder SetHttpClient(HttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
Http |
httpClient |
Returns
Type | Description |
---|---|
Influx |
TimeOut(TimeSpan)
Set the timespan to wait before the HTTP request times out.
Declaration
public InfluxDBClientOptions.Builder TimeOut(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
Time |
timeout | The timespan to wait before the HTTP request times out. It must be defined. |
Returns
Type | Description |
---|---|
Influx |
Url(String)
Set the url to connect the InfluxDB.
Declaration
public InfluxDBClientOptions.Builder Url(string url)
Parameters
Type | Name | Description |
---|---|---|
System. |
url | the url to connect the InfluxDB. It must be defined. |
Returns
Type | Description |
---|---|
Influx |
VerifySsl(Boolean)
Ignore Certificate Validation Errors when false
.
Declaration
public InfluxDBClientOptions.Builder VerifySsl(bool verifySsl)
Parameters
Type | Name | Description |
---|---|---|
System. |
verifySsl | validates Certificates |
Returns
Type | Description |
---|---|
Influx |