Class ConfigService
Represents a collection of functions to interact with the API endpoints
Inheritance
Implements
Namespace: InfluxDB.Client.Api.Service
Assembly: InfluxDB.Client.dll
Syntax
public class ConfigService : object, IConfigService, IApiAccessor
Constructors
ConfigService(Configuration)
Initializes a new instance of the ConfigService class using Configuration object
Declaration
public ConfigService(Configuration configuration = null)
Parameters
Type | Name | Description |
---|---|---|
InfluxDB.Client.Api.Client.Configuration | configuration | An instance of Configuration |
ConfigService(String)
Initializes a new instance of the ConfigService class.
Declaration
public ConfigService(string basePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | basePath |
Properties
Configuration
Gets or sets the configuration object
Declaration
public Configuration Configuration { get; set; }
Property Value
Type | Description |
---|---|
InfluxDB.Client.Api.Client.Configuration | An instance of the Configuration |
ExceptionFactory
Provides a factory method hook for the creation of exceptions.
Declaration
public ExceptionFactory ExceptionFactory { get; set; }
Property Value
Type | Description |
---|---|
InfluxDB.Client.Api.Client.ExceptionFactory |
Methods
AddDefaultHeader(String, String)
Add default header.
Declaration
public void AddDefaultHeader(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Header field name. |
System.String | value | Header field value. |
DefaultHeader()
Gets the default header.
Declaration
public IDictionary<string, string> DefaultHeader()
Returns
Type | Description |
---|---|
IDictionary<System.String, System.String> | Dictionary of HTTP header |
GetBasePath()
Gets the base path of the API client.
Declaration
public string GetBasePath()
Returns
Type | Description |
---|---|
System.String | The base path |
GetConfig(String)
Get the run-time configuration of the instance
Declaration
public Config GetConfig(string zapTraceSpan = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
Returns
Type | Description |
---|---|
Config | Config |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetConfigAsync(String, CancellationToken)
Get the run-time configuration of the instance
Declaration
public async System.Threading.Tasks.Task<Config> GetConfigAsync(string zapTraceSpan = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Config> | Task of Config |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetConfigAsyncWithHttpInfo(String, CancellationToken)
Get the run-time configuration of the instance
Declaration
public async System.Threading.Tasks.Task<ApiResponse<Config>> GetConfigAsyncWithHttpInfo(string zapTraceSpan = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<InfluxDB.Client.Api.Client.ApiResponse<Config>> | Task of ApiResponse (Config) |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetConfigAsyncWithIRestResponse(String, CancellationToken)
Get the run-time configuration of the instance
Declaration
public async System.Threading.Tasks.Task<RestResponse> GetConfigAsyncWithIRestResponse(string zapTraceSpan = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<RestResponse> | Task of RestResponse (Config) |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetConfigWithHttpInfo(String)
Get the run-time configuration of the instance
Declaration
public ApiResponse<Config> GetConfigWithHttpInfo(string zapTraceSpan = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
Returns
Type | Description |
---|---|
InfluxDB.Client.Api.Client.ApiResponse<Config> | ApiResponse of Config |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetConfigWithIRestResponse(String)
Get the run-time configuration of the instance
Declaration
public RestResponse GetConfigWithIRestResponse(string zapTraceSpan = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
Returns
Type | Description |
---|---|
RestResponse | ApiResponse of Config |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetConfigWithIRestResponseAsync(String, CancellationToken)
Get the run-time configuration of the instance
Declaration
public async System.Threading.Tasks.Task<RestResponse> GetConfigWithIRestResponseAsync(string zapTraceSpan = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<RestResponse> | ApiResponse of Config |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
GetConfigWithRestRequest(String)
Get the run-time configuration of the instance
Declaration
public RestRequest GetConfigWithRestRequest(string zapTraceSpan = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | zapTraceSpan | OpenTracing span context (optional) |
Returns
Type | Description |
---|---|
RestRequest | ApiResponse of Config |
Exceptions
Type | Condition |
---|---|
InfluxDB.Client.Api.Client.ApiException | Thrown when fails to make API call |
SetBasePath(String)
Sets the base path of the API client.
Declaration
public void SetBasePath(string basePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | basePath |