pub struct CreateAlertRequestInput {
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: StringImmutable account-unique name. UUID names and the crn: prefix are reserved.
topic: StringRequired 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: i64Whole-minute window. Evaluated every minute against the last complete UTC-aligned window.
for_seconds: i64Continuous 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.
Implementations§
Source§impl CreateAlertRequestInput
impl CreateAlertRequestInput
Sourcepub fn new(
name: String,
topic: String,
expression: AlertExpressionInput,
operator: CreateAlertRequestInputOperator,
threshold: f64,
window_seconds: i64,
for_seconds: i64,
) -> Self
pub fn new( name: String, topic: String, expression: AlertExpressionInput, operator: CreateAlertRequestInputOperator, threshold: f64, window_seconds: i64, for_seconds: i64, ) -> Self
Set the required fields; optional fields start omitted.