Class SourcesApi
Inheritance
Implements
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public class SourcesApi : object, ISourcesApi
Constructors
SourcesApi(SourcesService)
Declaration
protected SourcesApi(SourcesService service)
Parameters
Type | Name | Description |
---|---|---|
SourcesService | service |
Methods
CloneSourceAsync(String, Source, CancellationToken)
Clone a source.
Declaration
public Task<Source> CloneSourceAsync(string clonedName, Source source, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | clonedName | name of cloned source |
Source | source | source to clone |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Source> | cloned source |
CloneSourceAsync(String, String, CancellationToken)
Clone a source.
Declaration
public async Task<Source> CloneSourceAsync(string clonedName, string sourceId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | clonedName | name of cloned source |
System.String | sourceId | ID of source to clone |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Source> | cloned source |
CreateSourceAsync(Source, CancellationToken)
Creates a new Source and sets Id with the new identifier.
Declaration
public Task<Source> CreateSourceAsync(Source source, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Source | source | source to create |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Source> | created Source |
DeleteSourceAsync(Source, CancellationToken)
Delete a source.
Declaration
public Task DeleteSourceAsync(Source source, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Source | source | source to delete |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task | delete has been accepted |
DeleteSourceAsync(String, CancellationToken)
Delete a source.
Declaration
public Task DeleteSourceAsync(string sourceId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceId | ID of source to delete |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task | delete has been accepted |
FindBucketsBySourceAsync(Source, CancellationToken)
Get a sources buckets (will return dbrps in the form of buckets if it is a v1 source).
Declaration
public Task<List<Bucket>> FindBucketsBySourceAsync(Source source, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Source | source | filter buckets to a specific source |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<Bucket>> | The buckets for source. If source does not exist than return null. |
FindBucketsBySourceIdAsync(String, CancellationToken)
Get a sources buckets (will return dbrps in the form of buckets if it is a v1 source).
Declaration
public async Task<List<Bucket>> FindBucketsBySourceIdAsync(string sourceId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceId | filter buckets to a specific source ID |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<Bucket>> | The buckets for source. If source does not exist than return null. |
FindSourceByIdAsync(String, CancellationToken)
Retrieve a source.
Declaration
public Task<Source> FindSourceByIdAsync(string sourceId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceId | ID of source to get |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Source> | source details |
FindSourcesAsync(CancellationToken)
Get all sources.
Declaration
public async Task<List<Source>> FindSourcesAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<Source>> | A list of sources |
HealthAsync(Source, CancellationToken)
Get a sources health.
Declaration
public Task<HealthCheck> HealthAsync(Source source, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Source | source | source to check health |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<HealthCheck> | health of source |
HealthAsync(String, CancellationToken)
Get a sources health.
Declaration
public Task<HealthCheck> HealthAsync(string sourceId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceId | source to check health |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<HealthCheck> | health of source |
UpdateSourceAsync(Source, CancellationToken)
Update a Source.
Declaration
public Task<Source> UpdateSourceAsync(Source source, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Source | source | source update to apply |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Source> | updated source |