updateAlert
Updates an existing alert. Only non-null fields overwrite existing values.
Samples
// The following example replaces only the condition of an alert s rule the query, the evaluation
// cadence and the notification rules are left unchanged. A supplied condition is replaced whole rather than
// merged, so every threshold to keep is sent again. Payloads are shown as JSON on the wire they are CBOR
// encoded.
val resp = cloudWatchOmniClient.updateAlert {
spaceId = "a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d"
alertId = "c3d4e5f67a8b4c9d8e0f1a2b3c4d5e6f"
rule = Rule.TelemetryRule(TelemetryRule {
condition = AlertCondition {
thresholdMode = ThresholdMode.fromValue("FIELD_VALUE")
thresholdField = "error_count"
comparator = Comparator.fromValue("GT")
warningThreshold = 100.0.toDouble()
criticalThreshold = 400.0.toDouble()
}
}
)
}Content copied to clipboard