Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ITask

Hierarchy

Index

Properties

Optional created

created: Date | string | number

Date the task was first created.

Optional dbrps

dbrps: object[]

List of database retention policy pairs the task is allowed to access.

Optional dot

dot: string

GraphViz DOT syntax formatted representation of the template DAG.
NOTE: lables vs attributes does not matter since a template is never executing.

Optional error

error: string

Any error encountered when reading the template.

Optional executing

executing: boolean

Whether the task is currently executing.

Optional id

id: string

Unique identifier for the task. If empty a random ID will be chosen.

Optional lastEnabled

lastEnabled: Date | string | number

Date the task was last set to status enabled.

Optional link

link: ILink

a link object with an href of the resource.Clients should not need to perform path manipulation in most cases and can use the links provided from previous calls.

Optional modified

modified: Date | string | number

Date the task was last modified.

Optional script

script: string

The content of the script.

Optional stats

stats: any

Map of statistics about a task.

Optional status

status: "enabled" | "disabled"

One of enabled or disabled.

default

disabled

Optional templateId

templateId: string

An optional ID of a template to use instead of specifying a TICKscript and type directly.

Optional type

type: "stream" | "batch"

The task type: stream or batch.

Optional vars

vars: IVars

A set of vars for overwriting any defined vars in the TICKscript.

The vars object has the form:

{
    "field_name" : {
        "value": <VALUE>,
        "type": <TYPE>
    },
    "another_field" : {
        "value": <VALUE>,
        "type": <TYPE>
    }
}

The following is a table of valid types and example values.

Type Example Value Description
Bool true "true" or "false"
Int 42 Any integer value
Float 2.5 or 67 Any numeric value
Duration "1s" or 1000000000 Any integer value interpretted in nanoseconds or an influxql duration string
String "a string" Any string value
Regex "^abc.*xyz" Any string value that represents a valid Go regular expression https://golang.org/pkg/regexp/
Lambda "\"value\" > 5" Any string that is a valid TICKscript lambda expression
Star "" No value is required, a star type var represents the literal * in TICKscript (i.e. .groupBy(*))
List [{"type": TYPE, "value": VALUE}] A list of var objects. Currently lists may only contain string or star vars

Generated using TypeDoc