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 |
---|---|
InfluxDBClient | client |
Remarks
Deprecated - please use use object initializer InfluxDBClient(InfluxDBClientOptions) together with LoadConfig(String)
Create(InfluxDBClientOptions)
Create a instance of the InfluxDB 2.x client.
Declaration
public static InfluxDBClient Create(InfluxDBClientOptions options)
Parameters
Type | Name | Description |
---|---|---|
InfluxDBClientOptions | options | the connection configuration |
Returns
Type | Description |
---|---|
InfluxDBClient | client |
Remarks
Deprecated - please use use object initializer InfluxDBClient(InfluxDBClientOptions)
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.String | connectionString | connection string with various configurations |
Returns
Type | Description |
---|---|
InfluxDBClient | client |
Remarks
Deprecated - please use use object initializer InfluxDBClient(String)
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.String | url | the url to connect to the InfluxDB 2.x |
System.Char[] | token | the token to use for the authorization |
Returns
Type | Description |
---|---|
InfluxDBClient | client |
Remarks
Deprecated - please use use object initializer InfluxDBClient(String, String)
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.String | url | the url to connect to the InfluxDB 2.x |
System.String | token | the token to use for the authorization |
Returns
Type | Description |
---|---|
InfluxDBClient | client |
Remarks
Deprecated - please use use object initializer InfluxDBClient(String, String)
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.String | url | the url to connect to the InfluxDB 2.x |
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 |
---|---|
InfluxDBClient | client |
Remarks
Deprecated - please use use object initializer InfluxDBClient(String, String, String)
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.String | url | the url to connect to the InfluxDB 1.8 |
System.String | username | authorization username |
System.Char[] | password | authorization password |
System.String | database | database name |
System.String | retentionPolicy | retention policy |
Returns
Type | Description |
---|---|
InfluxDBClient | client |
Remarks
Deprecated - please use use object initializer InfluxDBClient(String, String, String, String, String)
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.String | url | the url to connect to the InfluxDB |
OnboardingRequest | onboarding | the defaults |
Returns
Type | Description |
---|---|
Task<OnboardingResponse> | 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.String | url | the url to connect to the InfluxDB |
System.String | username | the name of an user |
System.String | password | the password to connect as an user |
System.String | org | the name of an organization |
System.String | bucket | the name of a bucket |
Returns
Type | Description |
---|---|
Task<OnboardingResponse> | Created default user, bucket, org. |