Class InvokableScriptsApi
Inheritance
Implements
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public class InvokableScriptsApi : AbstractQueryClient, IInvokableScriptsApi
Constructors
InvokableScriptsApi(InvokableScriptsService, IFluxResultMapper)
Declaration
protected InvokableScriptsApi(InvokableScriptsService service, IFluxResultMapper mapper)
Parameters
Type | Name | Description |
---|---|---|
InvokableScriptsService | service | |
InfluxDB.Client.Core.Flux.Internal.IFluxResultMapper | mapper |
Methods
AfterIntercept<T>(Int32, Func<IEnumerable<HeaderParameter>>, T)
Declaration
protected override T AfterIntercept<T>(int statusCode, Func<IEnumerable<HeaderParameter>> headers, T body)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | statusCode | |
Func<IEnumerable<HeaderParameter>> | headers | |
T | body |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
BeforeIntercept(RestRequest)
Declaration
protected override void BeforeIntercept(RestRequest request)
Parameters
Type | Name | Description |
---|---|---|
RestRequest | request |
CreateScriptAsync(ScriptCreateRequest, CancellationToken)
Create a script.
Declaration
public Task<Script> CreateScriptAsync(ScriptCreateRequest createRequest, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
ScriptCreateRequest | createRequest | The script to create. |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Script> | The created script. |
DeleteScriptAsync(String, CancellationToken)
Delete a script.
Declaration
public Task DeleteScriptAsync(string scriptId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to delete. (required) |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task | delete has been accepted |
FindScriptsAsync(Nullable<Int32>, Nullable<Int32>, CancellationToken)
List scripts.
Declaration
public Task<List<Script>> FindScriptsAsync(int? offset = null, int? limit = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | offset | The offset for pagination. |
System.Nullable<System.Int32> | limit | The number of scripts to return. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<Script>> | [Script] |
InvokeScriptAsync(String, Dictionary<String, Object>, CancellationToken)
Invoke a script and return result as a [FluxTable].
Declaration
public async Task<List<FluxTable>> InvokeScriptAsync(string scriptId, Dictionary<string, object> bindParams = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to invoke. (required) |
Dictionary<System.String, System.Object> | bindParams | Represent key/value pairs parameters to be injected into script |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<FluxTable>> | [FluxTable] |
InvokeScriptEnumerableAsync(String, Dictionary<String, Object>, CancellationToken)
Invoke a script and return result as a stream of FluxRecord.
Declaration
public async IAsyncEnumerable<FluxRecord> InvokeScriptEnumerableAsync(string scriptId, Dictionary<string, object> bindParams = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to invoke. (required) |
Dictionary<System.String, System.Object> | bindParams | Represent key/value pairs parameters to be injected into script |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
IAsyncEnumerable<FluxRecord> | stream of FluxRecord |
InvokeScriptMeasurementsAsync<T>(String, Dictionary<String, Object>, CancellationToken)
Invoke a script and return result as a [T].
Declaration
public async Task<List<T>> InvokeScriptMeasurementsAsync<T>(string scriptId, Dictionary<string, object> bindParams = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to invoke. (required) |
Dictionary<System.String, System.Object> | bindParams | Represent key/value pairs parameters to be injected into script |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<List<T>> | [T] |
Type Parameters
Name | Description |
---|---|
T |
InvokeScriptMeasurementsEnumerableAsync<T>(String, Dictionary<String, Object>, CancellationToken)
Invoke a script and return result as a stream of Measurement.
Declaration
public async IAsyncEnumerable<T> InvokeScriptMeasurementsEnumerableAsync<T>(string scriptId, Dictionary<string, object> bindParams = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to invoke. (required) |
Dictionary<System.String, System.Object> | bindParams | Represent key/value pairs parameters to be injected into script |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
IAsyncEnumerable<T> | stream of Measurement |
Type Parameters
Name | Description |
---|---|
T |
InvokeScriptRawAsync(String, Dictionary<String, Object>, CancellationToken)
Invoke a script and return result as a raw string.
Declaration
public async Task<string> InvokeScriptRawAsync(string scriptId, Dictionary<string, object> bindParams = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to invoke. (required) |
Dictionary<System.String, System.Object> | bindParams | Represent key/value pairs parameters to be injected into script |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<System.String> | String |
UpdateScriptAsync(String, ScriptUpdateRequest, CancellationToken)
Update a script.
Declaration
public Task<Script> UpdateScriptAsync(string scriptId, ScriptUpdateRequest updateRequest, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptId | The ID of the script to update. (required) |
ScriptUpdateRequest | updateRequest | Script updates to apply (required) |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<Script> | The updated script. |