Class InfluxDBClientFactory
Inheritance
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public static class InfluxDBClientFactory : object
Methods
Create()
Create a instance of the InfluxDB 2.x client that is configured via
App.config
.
Declaration
public static InfluxDBClient Create()
Returns
Type | Description |
---|---|
Influx |
client |
Remarks
Deprecated - please use use object initializer Influx
Create(InfluxDBClientOptions)
Create a instance of the InfluxDB 2.x client.
Declaration
public static InfluxDBClient Create(InfluxDBClientOptions options)
Parameters
Type | Name | Description |
---|---|---|
Influx |
options | the connection configuration |
Returns
Type | Description |
---|---|
Influx |
client |
Remarks
Deprecated - please use use object initializer Influx
Create(String)
Create a instance of the InfluxDB 2.x client. The url could be a connection string with various configurations.
e.g.: "http://localhost:8086?timeout=5000&logLevel=BASIC
Declaration
public static InfluxDBClient Create(string connectionString)
Parameters
Type | Name | Description |
---|---|---|
System. |
connectionString | connection string with various configurations |
Returns
Type | Description |
---|---|
Influx |
client |
Remarks
Deprecated - please use use object initializer Influx
Create(String, Char[])
Create a instance of the InfluxDB 2.x client.
Declaration
public static InfluxDBClient Create(string url, char[] token)
Parameters
Type | Name | Description |
---|---|---|
System. |
url | the url to connect to the InfluxDB 2.x |
System. |
token | the token to use for the authorization |
Returns
Type | Description |
---|---|
Influx |
client |
Remarks
Deprecated - please use use object initializer Influx
Create(String, String)
Create a instance of the InfluxDB 2.x client.
Declaration
public static InfluxDBClient Create(string url, string token)
Parameters
Type | Name | Description |
---|---|---|
System. |
url | the url to connect to the InfluxDB 2.x |
System. |
token | the token to use for the authorization |
Returns
Type | Description |
---|---|
Influx |
client |
Remarks
Deprecated - please use use object initializer Influx
Create(String, String, Char[])
Create a instance of the InfluxDB 2.x client.
Declaration
public static InfluxDBClient Create(string url, string username, char[] password)
Parameters
Type | Name | Description |
---|---|---|
System. |
url | the url to connect to the InfluxDB 2.x |
System. |
username | the username to use in the basic auth |
System. |
password | the password to use in the basic auth |
Returns
Type | Description |
---|---|
Influx |
client |
Remarks
Deprecated - please use use object initializer Influx
CreateV1(String, String, Char[], String, String)
Create a instance of the InfluxDB 2.x client to connect into InfluxDB 1.8.
Declaration
public static InfluxDBClient CreateV1(string url, string username, char[] password, string database, string retentionPolicy)
Parameters
Type | Name | Description |
---|---|---|
System. |
url | the url to connect to the InfluxDB 1.8 |
System. |
username | authorization username |
System. |
password | authorization password |
System. |
database | database name |
System. |
retentionPolicy | retention policy |
Returns
Type | Description |
---|---|
Influx |
client |
Remarks
Deprecated - please use use object initializer Influx
Onboarding(String, OnboardingRequest)
Post onboarding request, to setup initial user, org and bucket.
Declaration
public static async Task<OnboardingResponse> Onboarding(string url, OnboardingRequest onboarding)
Parameters
Type | Name | Description |
---|---|---|
System. |
url | the url to connect to the InfluxDB |
Onboarding |
onboarding | the defaults |
Returns
Type | Description |
---|---|
Task<Onboarding |
Created default user, bucket, org. |
Onboarding(String, String, String, String, String)
Post onboarding request, to setup initial user, org and bucket.
Declaration
public static Task<OnboardingResponse> Onboarding(string url, string username, string password, string org, string bucket)
Parameters
Type | Name | Description |
---|---|---|
System. |
url | the url to connect to the InfluxDB |
System. |
username | the name of an user |
System. |
password | the password to connect as an user |
System. |
org | the name of an organization |
System. |
bucket | the name of a bucket |
Returns
Type | Description |
---|---|
Task<Onboarding |
Created default user, bucket, org. |