Class LabelsApi
Inheritance
Implements
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public class LabelsApi : object, ILabelsApi
Constructors
LabelsApi(LabelsService)
Declaration
protected LabelsApi(LabelsService service)
Parameters
Type | Name | Description |
---|---|---|
LabelsService | service |
Methods
CloneLabelAsync(String, Label, CancellationToken)
Clone a label.
Declaration
public Task<Label> CloneLabelAsync(string clonedName, Label label, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | clonedName | name of cloned label |
Label | label | label to clone |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Label> | cloned label |
CloneLabelAsync(String, String, CancellationToken)
Clone a label.
Declaration
public async Task<Label> CloneLabelAsync(string clonedName, string labelId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | clonedName | name of cloned label |
System.String | labelId | ID of label to clone |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Label> | cloned label |
CreateLabelAsync(LabelCreateRequest, CancellationToken)
Create a label
Declaration
public async Task<Label> CreateLabelAsync(LabelCreateRequest request, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
LabelCreateRequest | request | label to create |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Label> | Added label |
CreateLabelAsync(String, Dictionary<String, String>, String, CancellationToken)
Create a label
Declaration
public Task<Label> CreateLabelAsync(string name, Dictionary<string, string> properties, string orgId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | name of a label |
Dictionary<System.String, System.String> | properties | properties of a label |
System.String | orgId | owner of a label |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Label> | Added label |
DeleteLabelAsync(Label, CancellationToken)
Delete a label.
Declaration
public System.Threading.Tasks.Task DeleteLabelAsync(Label label, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Label | label | label to delete |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | delete has been accepted |
DeleteLabelAsync(String, CancellationToken)
Delete a label.
Declaration
public System.Threading.Tasks.Task DeleteLabelAsync(string labelId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | labelId | ID of label to delete |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | delete has been accepted |
FindLabelByIdAsync(String, CancellationToken)
Retrieve a label.
Declaration
public async Task<Label> FindLabelByIdAsync(string labelId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | labelId | ID of a label to get |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Label> | Label detail |
FindLabelsAsync(CancellationToken)
List all labels.
Cancellation tokenDeclaration
public async Task<List<Label>> FindLabelsAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<Label>> | List all labels. |
FindLabelsByOrgAsync(Organization, CancellationToken)
Get all labels.
Declaration
public Task<List<Label>> FindLabelsByOrgAsync(Organization organization, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Organization | organization | specifies the organization of the resource |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<Label>> | all labels |
FindLabelsByOrgIdAsync(String, CancellationToken)
Get all labels.
Declaration
public async Task<List<Label>> FindLabelsByOrgIdAsync(string orgId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | orgId | specifies the organization ID of the resource |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<Label>> | all labels |
UpdateLabelAsync(Label, CancellationToken)
Update a single label
Declaration
public Task<Label> UpdateLabelAsync(Label label, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Label | label | label to update |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Label> | Updated label |
UpdateLabelAsync(String, LabelUpdate, CancellationToken)
Update a single label
Declaration
public async Task<Label> UpdateLabelAsync(string labelId, LabelUpdate labelUpdate, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | labelId | ID of label to update |
LabelUpdate | labelUpdate | label update |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Label> | Updated label |