Skip to content

Expression🔗

Constructor🔗

Expression()

Methods🔗

build🔗

Builds the object.

def build() -> alertingv0alpha1.Expression

datasource_uid🔗

The UID of the datasource to run this expression against. If omitted, the expression will be run against the __expr__ datasource

def datasource_uid(datasource_uid: alertingv0alpha1.DatasourceUID) -> typing.Self

model🔗

def model(model: object) -> typing.Self

query_type🔗

The type of query if this is a query expression

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

relative_time_range🔗

def relative_time_range(relative_time_range: cogbuilder.Builder[alertingv0alpha1.RelativeTimeRange]) -> typing.Self

source🔗

Used to mark the expression to be used as the final source for the rule evaluation

Only one expression in a rule can be marked as the source

For AlertRules, this is the expression that will be evaluated against the alerting condition

For RecordingRules, this is the expression that will be recorded

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

See also🔗