All Products
Search
Document Center

DataWorks:ListDIAlarmRules

Last Updated:Sep 04, 2025

Queries a list of alert rules configured for a new-version synchronization task. 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

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dataworks:*list
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DIJobIdlongYes

The ID of the task with which the alert rules are associated.

11260
PageNumberlongNo

The page number. Default value: 1.

1
PageSizelongNo

The number of entries per page. Default value: 10.

10

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

RequestIdstring

The request ID.

74C2FECD-5B3A-554A-BCF5-351A36DE9815
DIAlarmRulePagingobject

The pagination information.

TotalCountlong

The total number of entries returned.

2
PageNumberlong

The page number.

1
PageSizelong

The number of entries per page.

10
DIJobAlarmRulesarray<object>

The alert rules.

DIJobAlarmRuleobject

The details of the alert rule.

DIAlarmRuleIdlong

The alert rule ID.

41998
DIJobIdlong

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

11260
Descriptionstring

The description of the alert rule.

mysql synchronizes to hologres heartbeat alert
MetricTypestring

The metric type in the alert rule. Valid values:

  • Heartbeat
  • FailoverCount
  • Delay
Heartbeat
Enabledboolean

Indicates whether the alert rule is enabled.

true
TriggerConditionsarray<object>

The conditions that are used to trigger the alert rule.

TriggerConditionobject

The condition that is used to trigger the alert rule.

Severitystring

The severity level. Valid values:

  • Warning
  • Critical
Warning
Durationlong

The time interval for alert calculation. Unit: minutes.

15
Thresholdlong

The alert threshold.

  • If the alert rule is for task status, no threshold is used.
  • If the alert rule is for failovers, the threshold is the number of failovers.
  • If the alert rule is for latency, the threshold is the latency duration, in seconds.
5
NotificationSettingsobject

The alert notification settings.

NotificationChannelsarray<object>

The alert notification methods.

NotificationChannelobject

The alert notification method.

Severitystring

The severity level. Valid values:

  • Warning
  • Critical
Warning
Channelsarray

The alert notification methods.

Channelstring

The alert notification method. Valid values:

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

The settings of alert notification recipients.

NotificationReceiverobject

The setting of an alert notification recipient.

ReceiverTypestring

The recipient type. Valid values: AliyunUid and DingToken.

  • If the alert notification method is Mail, Phone, or Sms, the value of this parameter is AliyunUid, which indicates the Alibaba Cloud account ID.
  • If the alert notification method is Ding, the value of this parameter is DingToken, which indicates the DingTalk chatbot token.
DingToken
ReceiverValuesarray

The recipients.

ReceiverValuestring

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
InhibitionIntervalinteger

The duration of the alert suppression interval. Unit: minutes.

5

Examples

Sample success responses

JSONformat

{
  "RequestId": "74C2FECD-5B3A-554A-BCF5-351A36DE9815",
  "DIAlarmRulePaging": {
    "TotalCount": 2,
    "PageNumber": 1,
    "PageSize": 10,
    "DIJobAlarmRules": [
      {
        "DIAlarmRuleId": 41998,
        "DIJobId": 11260,
        "Description": "mysql synchronizes to hologres heartbeat alert",
        "MetricType": "Heartbeat",
        "Enabled": true,
        "TriggerConditions": [
          {
            "Severity": "Warning",
            "Duration": 15,
            "Threshold": 5
          }
        ],
        "NotificationSettings": {
          "NotificationChannels": [
            {
              "Severity": "Warning",
              "Channels": [
                "Ding"
              ]
            }
          ],
          "NotificationReceivers": [
            {
              "ReceiverType": "DingToken",
              "ReceiverValues": [
                "token1"
              ]
            }
          ],
          "InhibitionInterval": 5
        }
      }
    ]
  }
}

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