v4

latestOpenAPI 3.0.1Apache 2.02026-08-036821,1001.5 MB
Alert

Update an alert rule

Update the state of an alert rule. Users can obtain a rule ID by calling #_get_alert_policy first.If all changes adhere to a predetermined rule, a new rule will be duplicated from the predefined one, and all changes will be applied to the newly cloned rule. As a result, users might receive a new rule ID that differs from the one provided as a path parameter.

put/alert-policies/{policyId}/rules/{ruleId}

Path parameters

policyIdinteger required

The policy ID

ruleIdinteger required

The rule ID

Request body

descriptionstring

This is a description for the alert rule.

severity_idinteger

The severity identifier. The currently supported severity IDs are 1 for critical, 2 for warning, and 3 for info.

trigger_typestring

The configured trigger type of the rule.

durationinteger

Has value when trigger_type is "DEFERRED". The deferred duration, in seconds.

time_windowinteger

Has value when trigger_type is "REPEATED". The time window to count the number of repeated messages, in seconds.

countinteger

Has value when trigger_type is "REPEATED". The lower bound of the number of messages required to trigger this rule.

thresholdnumber double

Has value when type is "METRIC". The threshold for the message.

operatorstring

Has value when message_metadata_type is "METRIC". The operator to compare against the threshold.

Response

OK

idinteger required

The unique identifier

message_metadata_idinteger required

The identifier for the unique message type that corresponds to this rule.

message_metadata_namestring

The display name for the message.

message_metadata_typestring

The type of the message.

descriptionstring

This is a description for the alert rule.

severity_idinteger required

The severity identifier. The currently supported severity IDs are 1 for critical, 2 for warning, and 3 for info.

severity_namestring

The display name for the alert severity.

is_enabledboolean required

True if this rule is active and enabled.

trigger_typestring required

The configured trigger type of the rule.

durationinteger

Has value when trigger_type is "DEFERRED". The deferred duration, in seconds.

time_windowinteger

Has value when trigger_type is "REPEATED". The time window to count the number of repeated messages, in seconds.

countinteger

Has value when trigger_type is "REPEATED". The lower bound of the number of messages required to trigger this rule.

thresholdnumber double

Has value when type is "METRIC". The threshold for the message.

unitstring

The unit of this threshold

operatorstring

Has value when message_metadata_type is "METRIC". The operator to compare against the threshold.