Skip to content

RuleBuilder🔗

Constructor🔗

new RuleBuilder(title: string)

Methods🔗

build🔗

Builds the object.

build()

annotations🔗

annotations(annotations: Record<string, string>)

condition🔗

condition(condition: string)

execErrState🔗

execErrState(execErrState: "OK" | "Alerting" | "Error")

folderUID🔗

folderUID(folderUID: string)

forDuration🔗

The amount of time, in seconds, for which the rule must be breached for the rule to be considered to be Firing.

Before this time has elapsed, the rule is only considered to be Pending.

forDuration(forVal: string)

id🔗

id(id: number)

isPaused🔗

isPaused(isPaused: boolean)

labels🔗

labels(labels: Record<string, string>)

noDataState🔗

noDataState(noDataState: "Alerting" | "NoData" | "OK")

notificationSettings🔗

notificationSettings(notificationSettings: cog.Builder<alerting.NotificationSettings>)

orgID🔗

orgID(orgID: number)

provenance🔗

provenance(provenance: alerting.Provenance)

queries🔗

queries(data: cog.Builder<alerting.Query>[])

record🔗

record(record: cog.Builder<alerting.RecordRule>)

ruleGroup🔗

ruleGroup(ruleGroup: string)

title🔗

title(title: string)

uid🔗

uid(uid: string)

updated🔗

updated(updated: string)

withQuery🔗

withQuery(data: cog.Builder<alerting.Query>)

See also🔗