Class HealthService
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 HealthService : object, IHealthService, IApiAccessor
Constructors
HealthService(Configuration)
Initializes a new instance of the Health
Declaration
public HealthService(Configuration configuration = null)
Parameters
Type | Name | Description |
---|---|---|
Influx |
configuration | An instance of Configuration |
HealthService(String)
Initializes a new instance of the Health
Declaration
public HealthService(string basePath)
Parameters
Type | Name | Description |
---|---|---|
System. |
basePath |
Properties
Configuration
Gets or sets the configuration object
Declaration
public Configuration Configuration { get; set; }
Property Value
Type | Description |
---|---|
Influx |
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 |
---|---|
Influx |
Methods
AddDefaultHeader(String, String)
Add default header.
Declaration
public void AddDefaultHeader(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Header field name. |
System. |
value | Header field value. |
DefaultHeader()
Gets the default header.
Declaration
public IDictionary<string, string> DefaultHeader()
Returns
Type | Description |
---|---|
IDictionary<System. |
Dictionary of HTTP header |
GetBasePath()
Gets the base path of the API client.
Declaration
public string GetBasePath()
Returns
Type | Description |
---|---|
System. |
The base path |
GetHealth(String)
Get the health of an instance
Declaration
public HealthCheck GetHealth(string zapTraceSpan = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
zapTraceSpan | OpenTracing span context (optional) |
Returns
Type | Description |
---|---|
Health |
HealthCheck |
Exceptions
Type | Condition |
---|---|
Influx |
Thrown when fails to make API call |
GetHealthAsync(String, CancellationToken)
Get the health of an instance
Declaration
public async System.Threading.Tasks.Task<HealthCheck> GetHealthAsync(string zapTraceSpan = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
zapTraceSpan | OpenTracing span context (optional) |
Cancellation |
cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System. |
Task of HealthCheck |
Exceptions
Type | Condition |
---|---|
Influx |
Thrown when fails to make API call |
GetHealthAsyncWithHttpInfo(String, CancellationToken)
Get the health of an instance
Declaration
public async System.Threading.Tasks.Task<ApiResponse<HealthCheck>> GetHealthAsyncWithHttpInfo(string zapTraceSpan = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
zapTraceSpan | OpenTracing span context (optional) |
Cancellation |
cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System. |
Task of ApiResponse (HealthCheck) |
Exceptions
Type | Condition |
---|---|
Influx |
Thrown when fails to make API call |
GetHealthAsyncWithIRestResponse(String, CancellationToken)
Get the health of an instance
Declaration
public async System.Threading.Tasks.Task<RestResponse> GetHealthAsyncWithIRestResponse(string zapTraceSpan = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
zapTraceSpan | OpenTracing span context (optional) |
Cancellation |
cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System. |
Task of RestResponse (HealthCheck) |
Exceptions
Type | Condition |
---|---|
Influx |
Thrown when fails to make API call |
GetHealthWithHttpInfo(String)
Get the health of an instance
Declaration
public ApiResponse<HealthCheck> GetHealthWithHttpInfo(string zapTraceSpan = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
zapTraceSpan | OpenTracing span context (optional) |
Returns
Type | Description |
---|---|
Influx |
ApiResponse of HealthCheck |
Exceptions
Type | Condition |
---|---|
Influx |
Thrown when fails to make API call |
GetHealthWithIRestResponse(String)
Get the health of an instance
Declaration
public RestResponse GetHealthWithIRestResponse(string zapTraceSpan = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
zapTraceSpan | OpenTracing span context (optional) |
Returns
Type | Description |
---|---|
Rest |
ApiResponse of HealthCheck |
Exceptions
Type | Condition |
---|---|
Influx |
Thrown when fails to make API call |
GetHealthWithIRestResponseAsync(String, CancellationToken)
Get the health of an instance
Declaration
public async System.Threading.Tasks.Task<RestResponse> GetHealthWithIRestResponseAsync(string zapTraceSpan = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
zapTraceSpan | OpenTracing span context (optional) |
Cancellation |
cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System. |
ApiResponse of HealthCheck |
Exceptions
Type | Condition |
---|---|
Influx |
Thrown when fails to make API call |
GetHealthWithRestRequest(String)
Get the health of an instance
Declaration
public RestRequest GetHealthWithRestRequest(string zapTraceSpan = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
zapTraceSpan | OpenTracing span context (optional) |
Returns
Type | Description |
---|---|
Rest |
ApiResponse of HealthCheck |
Exceptions
Type | Condition |
---|---|
Influx |
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. |
basePath |