Class WriteApiAsync
Inheritance
Implements
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public class WriteApiAsync : object, IWriteApiAsync
Constructors
WriteApiAsync(InfluxDBClientOptions, WriteService, IDomainObjectMapper, InfluxDBClient)
Declaration
protected WriteApiAsync(InfluxDBClientOptions options, WriteService service, IDomainObjectMapper mapper, InfluxDBClient influxDbClient)
Parameters
Type | Name | Description |
---|---|---|
InfluxDBClientOptions | options | |
WriteService | service | |
IDomainObjectMapper | mapper | |
InfluxDBClient | influxDbClient |
Methods
WriteMeasurementAsync<TM>(TM, WritePrecision, String, String, CancellationToken)
Write a Measurement into specified bucket.
Declaration
public Task WriteMeasurementAsync<TM>(TM measurement, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
TM | measurement | specifies the Measurement to write into bucket |
WritePrecision | precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System.String | bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System.String | org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
CancellationToken | cancellationToken | specifies the token to monitor for cancellation requests |
Returns
Type | Description |
---|---|
Task |
Type Parameters
Name | Description |
---|---|
TM | measurement type |
WriteMeasurementsAsync<TM>(TM[], WritePrecision, String, String, CancellationToken)
Write Measurements into specified bucket.
Declaration
public Task WriteMeasurementsAsync<TM>(TM[] measurements, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
TM[] | measurements | specifies Measurements to write into bucket |
WritePrecision | precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System.String | bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System.String | org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
CancellationToken | cancellationToken | specifies the token to monitor for cancellation requests |
Returns
Type | Description |
---|---|
Task |
Type Parameters
Name | Description |
---|---|
TM | measurement type |
WriteMeasurementsAsync<TM>(List<TM>, WritePrecision, String, String, CancellationToken)
Write Measurements into specified bucket.
Declaration
public Task WriteMeasurementsAsync<TM>(List<TM> measurements, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
List<TM> | measurements | specifies Measurements to write into bucket |
WritePrecision | precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System.String | bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System.String | org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
CancellationToken | cancellationToken | specifies the token to monitor for cancellation requests |
Returns
Type | Description |
---|---|
Task |
Type Parameters
Name | Description |
---|---|
TM | measurement type |
WriteMeasurementsAsyncWithIRestResponse<TM>(IEnumerable<TM>, WritePrecision, String, String, CancellationToken)
Write Measurements into specified bucket.
Declaration
public Task<RestResponse> WriteMeasurementsAsyncWithIRestResponse<TM>(IEnumerable<TM> measurements, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TM> | measurements | specifies Measurements to write into bucket |
WritePrecision | precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System.String | bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System.String | org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
CancellationToken | cancellationToken | specifies the token to monitor for cancellation requests |
Returns
Type | Description |
---|---|
Task<RestResponse> | Write Task with IRestResponse |
Type Parameters
Name | Description |
---|---|
TM | measurement type |
WritePointAsync(PointData, String, String, CancellationToken)
Write a Data point into specified bucket.
Declaration
public Task WritePointAsync(PointData point, string bucket = null, string org = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
PointData | point | specifies the Data point to write into bucket |
System.String | bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System.String | org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
CancellationToken | cancellationToken | specifies the token to monitor for cancellation requests |
Returns
Type | Description |
---|---|
Task |
WritePointsAsync(PointData[], String, String, CancellationToken)
Write Data points into specified bucket.
Declaration
public Task WritePointsAsync(PointData[] points, string bucket = null, string org = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
PointData[] | points | specifies the Data points to write into bucket |
System.String | bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System.String | org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
CancellationToken | cancellationToken | specifies the token to monitor for cancellation requests |
Returns
Type | Description |
---|---|
Task |
WritePointsAsync(List<PointData>, String, String, CancellationToken)
Write Data points into specified bucket.
Declaration
public async Task WritePointsAsync(List<PointData> points, string bucket = null, string org = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
List<PointData> | points | specifies the Data points to write into bucket |
System.String | bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System.String | org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
CancellationToken | cancellationToken | specifies the token to monitor for cancellation requests |
Returns
Type | Description |
---|---|
Task |
WritePointsAsyncWithIRestResponse(IEnumerable<PointData>, String, String, CancellationToken)
Write Data points into specified bucket.
Declaration
public Task<RestResponse[]> WritePointsAsyncWithIRestResponse(IEnumerable<PointData> points, string bucket = null, string org = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<PointData> | points | specifies the Data points to write into bucket |
System.String | bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System.String | org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
CancellationToken | cancellationToken | specifies the token to monitor for cancellation requests |
Returns
Type | Description |
---|---|
Task<RestResponse[]> | Write Tasks with IRestResponses. |
WriteRecordAsync(String, WritePrecision, String, String, CancellationToken)
Write Line Protocol record into specified bucket.
Declaration
public Task WriteRecordAsync(string record, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | record | specifies the record in InfluxDB Line Protocol. The |
WritePrecision | precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System.String | bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System.String | org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
CancellationToken | cancellationToken | specifies the token to monitor for cancellation requests |
Returns
Type | Description |
---|---|
Task |
WriteRecordsAsync(List<String>, WritePrecision, String, String, CancellationToken)
Write Line Protocol records into specified bucket.
Declaration
public Task WriteRecordsAsync(List<string> records, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
List<System.String> | records | specifies the record in InfluxDB Line Protocol |
WritePrecision | precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System.String | bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System.String | org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
CancellationToken | cancellationToken | specifies the token to monitor for cancellation requests |
Returns
Type | Description |
---|---|
Task |
WriteRecordsAsync(String[], WritePrecision, String, String, CancellationToken)
Write Line Protocol records into specified bucket.
Declaration
public Task WriteRecordsAsync(string[] records, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | records | specifies the record in InfluxDB Line Protocol |
WritePrecision | precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System.String | bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System.String | org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
CancellationToken | cancellationToken | specifies the token to monitor for cancellation requests |
Returns
Type | Description |
---|---|
Task |
WriteRecordsAsyncWithIRestResponse(IEnumerable<String>, WritePrecision, String, String, CancellationToken)
Write Line Protocols records into specified bucket.
Declaration
public Task<RestResponse> WriteRecordsAsyncWithIRestResponse(IEnumerable<string> records, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | records | specifies the record in InfluxDB Line Protocol |
WritePrecision | precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System.String | bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System.String | org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
CancellationToken | cancellationToken | specifies the token to monitor for cancellation requests |
Returns
Type | Description |
---|---|
Task<RestResponse> | Write Task with IRestResponse |