Skip to content

Rule🔗

Constructor🔗

Rule(title: str)

Methods🔗

build🔗

Builds the object.

def build() -> alerting.Rule

annotations🔗

def annotations(annotations: dict[str, str]) -> typing.Self

condition🔗

def condition(condition: str) -> typing.Self

exec_err_state🔗

def exec_err_state(exec_err_state: typing.Literal["OK", "Alerting", "Error"]) -> typing.Self

folder_uid🔗

def folder_uid(folder_uid: str) -> typing.Self

for_val🔗

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.

def for_val(for_val: str) -> typing.Self

id_val🔗

def id_val(id_val: int) -> typing.Self

is_paused🔗

def is_paused(is_paused: bool) -> typing.Self

labels🔗

def labels(labels: dict[str, str]) -> typing.Self

no_data_state🔗

def no_data_state(no_data_state: typing.Literal["Alerting", "NoData", "OK"]) -> typing.Self

notification_settings🔗

def notification_settings(notification_settings: cogbuilder.Builder[alerting.NotificationSettings]) -> typing.Self

org_id🔗

def org_id(org_id: int) -> typing.Self

provenance🔗

def provenance(provenance: alerting.Provenance) -> typing.Self

queries🔗

def queries(data: list[cogbuilder.Builder[alerting.Query]]) -> typing.Self

record🔗

def record(record: cogbuilder.Builder[alerting.RecordRule]) -> typing.Self

rule_group🔗

def rule_group(rule_group: str) -> typing.Self

title🔗

def title(title: str) -> typing.Self

uid🔗

def uid(uid: str) -> typing.Self

updated🔗

def updated(updated: str) -> typing.Self

with_query🔗

def with_query(data: cogbuilder.Builder[alerting.Query]) -> typing.Self

See also🔗