All Products
Search
Document Center

DataWorks:UpdateDIAlarmRule

Last Updated:Dec 12, 2024

Updates an alert rule configured for a synchronization task.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DIAlarmRuleIdlongYes

The ID of the alert rule.

34982
DescriptionstringNo

The description of the alert rule.

MetricTypestringNo

The metric type in the alert rule. Valid values:

  • Heartbeat
  • FailoverCount
  • Delay
  • DdlReport
  • ResourceUtilization
Heartbeat
EnabledbooleanNo

Specifies whether to enable the alert rule. By default, the alert rule is disabled.

true
TriggerConditionsarray<object>No

The conditions that can trigger the alert rule.

objectNo

The condition that can trigger the alert rule.

SeveritystringNo

The severity level. Valid values:

  • Warning
  • Critical
Warning
DurationlongNo

The time interval for alert calculation. Unit: minutes.

15
ThresholdlongNo

The alert threshold.

  • If the alert rule is for task status, you do not need to specify a threshold.
  • If the alert rule is for failovers, you must specify the number of failovers.
  • If the alert rule is for latency, you must specify the latency duration, in seconds.
5
DdlReportTagsarrayNo

The types of DDL operations for which the alert rule takes effect.

stringNo

The type of the DDL operation for which the alert rule takes effect. This parameter is required only if the MetricType parameter is set to DdlReport. Valid values:

  • AlterAddColumn
  • AlterDropColumn
  • AlterRenameColumn
  • AlterRenameTable
  • AlterTableModify
ALTERADDCOLUMN
NotificationSettingsobjectNo

The alert notification settings.

NotificationChannelsarray<object>No

The alert notification methods.

objectNo

The alert notification method.

SeveritystringNo

The severity level. Valid values:

  • Warning
  • Critical
Warning
ChannelsarrayNo

The alert notification method. Valid values:

  • Mail
  • Phone
  • Sms
  • Ding
stringNo

The alert notification method. Valid values:

  • Mail
  • Phone
  • Sms
  • Ding
Ding
NotificationReceiversarray<object>No

The settings of alert notification recipients.

objectNo

The settings of alert notification recipients.

ReceiverTypestringNo

The recipient type. Valid values: AliyunUid, DingToken, FeishuToken, and WebHookUrl.

DingToken
ReceiverValuesarrayNo

The recipient.

  • If the ReceiverType parameter is set to AliyunUid, set this parameter to the Alibaba Cloud account ID of a user.
  • If the ReceiverType parameter is set to DingToken, set this parameter to the token of a DingTalk chatbot.
stringNo

The recipient.

  • If the ReceiverType parameter is set to AliyunUid, set this parameter to the Alibaba Cloud account ID of a user.
  • If the ReceiverType parameter is set to DingToken, set this parameter to the token of a DingTalk chatbot.
token1
InhibitionIntervallongNo

The duration of the alert suppression interval. Default value: 5. Unit: minutes.

5
NamestringNo

The name of the alert rule.

alarm_rule_name
DIJobIdlongNo

The ID of the synchronization task.

1

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID. You can use the ID to query logs and troubleshoot issues.

A6C6B486-E3A2-5D52-9E76-D9380485D946
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true

Examples

Sample success responses

JSONformat

{
  "RequestId": "A6C6B486-E3A2-5D52-9E76-D9380485D946",
  "Success": true
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history