Skip to main content

CreateAlertBody

Type Alias CreateAlertBody 

Source
pub type CreateAlertBody = CreateAlertRequestInput;

Aliased Type§

pub struct CreateAlertBody {
    pub name: String,
    pub topic: String,
    pub expression: AlertExpressionInput,
    pub operator: CreateAlertRequestInputOperator,
    pub threshold: f64,
    pub window_seconds: i64,
    pub for_seconds: i64,
    pub enabled: Option<bool>,
    pub silenced_until: Option<Nullable<String>>,
}

Fields§

§name: String

Immutable account-unique name. UUID names and the crn: prefix are reserved.

§topic: String

Required same-account, same-region notification topic reference: UUID, canonical CRN or exact name, classified by syntax. Multiple alerts may share a topic. Binding requires notifications:Publish and respects explicit topic-policy denies.

§expression: AlertExpressionInput§operator: CreateAlertRequestInputOperator§threshold: f64§window_seconds: i64

Whole-minute window. Evaluated every minute against the last complete UTC-aligned window.

§for_seconds: i64

Continuous breach duration before firing; 0 fires immediately. Missing data, query failures and scheduling gaps reset a pending duration.

§enabled: Option<bool>§silenced_until: Option<Nullable<String>>

Mute notifications until this instant (at most 30 days ahead). Evaluation continues; null removes silence. An active alert notifies on the next evaluation after silence expires.