All Products
Search
Document Center

DataWorks:UpdateDIAlarmRule

Last Updated:Oct 17, 2024

Updates an alert rule for a new-version synchronization task. The following type of task is supported: real-time synchronization of all data in a MySQL database to Hologres.

Operation description

You can configure alert rules only for tasks that can be used for real-time data synchronization. You must update all fields in the alert rule.

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 alert rule ID.

34982
DescriptionstringNo

The description of the alert rule.

MetricTypestringYes

The metric type in the alert rule. Valid values:

  • Heartbeat
  • FailoverCount
  • Delay
Heartbeat
TriggerConditionsarray<object>Yes

The conditions that can trigger the alert rule.

objectYes
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, specify the number of failovers.
  • If the alert rule is for latency, specify the latency duration, in seconds.
5
NotificationSettingsobjectYes

The alert notification settings.

NotificationChannelsarray<object>Yes

The alert notification methods.

objectNo
SeveritystringNo

The severity level. Valid values:

  • Warning
  • Critical
Warning
ChannelsarrayNo

The alert notification methods.

stringNo

The alert notification method. Valid values:

  • Mail: email
  • Phone: phone call
  • Sms: text message
  • Ding: DingTalk chatbot token
Ding
NotificationReceiversarray<object>Yes

The alert notification recipients.

objectNo
ReceiverTypestringNo

The recipient type.

  • If the alert notification method is Mail, Phone, or Sms, the recipient type is Alibaba Cloud account ID.
  • If the alert notification method is Ding, the recipient type is DingTalk chatbot token.
DingToken
ReceiverValuesarrayNo

The recipients.

stringNo

The recipient.

  • If the recipient type is Alibaba Cloud account ID, the value of this parameter is the Alibaba Cloud account ID of a user.
  • If the recipient type is DingTalk chatbot token, the value of this parameter is the token of a DingTalk chatbot.
token1
InhibitionIntervalintegerNo

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

5
EnabledbooleanNo

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

true

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

RequestIdstring

The request ID.

A6C6B486-E3A2-5D52-9E76-D9380485D946

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
403Forbidden.AccessAccess is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition.No permission, please authorize
429Throttling.ApiThe request for this resource has exceeded your available limit.-
429Throttling.SystemThe DataWorks system is busy. Try again later.-
429Throttling.UserYour request is too frequent. Try again later.-
500InternalError.SystemAn internal system error occurred. Try again later.-
500InternalError.UserId.MissingAn internal system error occurred. Try again later.-

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

Change history

Change timeSummary of changesOperation
No change history