All Products
Search
Document Center

DataWorks:CreateDIAlarmRule

Last Updated:Dec 12, 2024

Creates an alert rule for a Data Integration task of a new version. Only the following type of task is supported: real-time data synchronization from a MySQL database to Hologres.

Operation description

You can configure alert rules only for tasks that can be used for real-time data synchronization.

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
DIJobIdlongYes

The ID of the task with which the alert rule is associated.

11265
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, the threshold is 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, set this parameter to the Alibaba Cloud account ID of a user.
  • If the recipient type is DingTalk chatbot token, set this parameter to 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 response parameters.

RequestIdstring

The request ID.

C636A747-7E4E-594D-94CD-2B4F8A9A9A63
DIAlarmRuleIdlong

The alert rule ID.

34988

Examples

Sample success responses

JSONformat

{
  "RequestId": "C636A747-7E4E-594D-94CD-2B4F8A9A9A63",
  "DIAlarmRuleId": 34988
}

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