All Products
Search
Document Center

DataWorks:GetDIAlarmRule

Last Updated:Mar 30, 2026

Retrieves the details of an alert rule configured for a synchronization task.

Operation description

Alert rules can be configured when your task includes real-time synchronization.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

DIAlarmRuleId

integer

Yes

The alert rule ID.

34994

Response elements

Element

Type

Description

Example

object

The returned result.

RequestId

string

The request ID.

4A807D85-AC9F-55F7-A58F-998D5249CAD9

DIAlarmRule

object

The details of the alert rule.

DIAlarmRuleId

integer

The alert rule ID.

34988

DIJobId

integer

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

11170

Description

string

The description of the alert rule.

mysql synchronizes to hologres heartbeat alert

MetricType

string

The metric type in the alert rule. Valid values:

  • Heartbeat

  • FailoverCount

  • Delay

Heartbeat

Enabled

boolean

Indicates whether the alert rule is enabled.

true

TriggerConditions

array<object>

The conditions that are used to trigger the alert rule.

object

The condition that is used to trigger the alert rule.

Severity

string

The severity level. Valid values:

  • Warning

  • Critical

Warning

Duration

integer

The time interval for alert calculation. Unit: minutes.

15

Threshold

integer

The alert threshold.

  • If the alert rule is for task status, no threshold is used.

  • 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

NotificationSettings

object

The alert notification settings.

NotificationChannels

array<object>

The alert notification methods.

object

The alert notification method.

Severity

string

The severity level. Valid values:

  • Warning

  • Critical

Warning

Channels

array

The alert notification methods.

string

The alert notification method. Valid values:

  • Mail: email

  • Phone: phone call

  • Sms: text message

  • Ding: DingTalk chatbot token

Ding

NotificationReceivers

array<object>

The alert notification recipients.

object

The alert notification recipient.

ReceiverType

string

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

ReceiverValues

array

The recipients.

string

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

InhibitionInterval

integer

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

5

CreatedUid

string

The ID of the user who creates the alert rule.

10000001

CreatedTime

integer

The timestamp when the alert rule was created. Unit: seconds.

1663573162

UpdatedUid

string

The ID of the user who last updates the alert rule.

10000001

UpdatedTime

integer

The timestamp when the alert rule was last updated. Unit: seconds.

1663573163

Examples

Success response

JSON format

{
  "RequestId": "4A807D85-AC9F-55F7-A58F-998D5249CAD9",
  "DIAlarmRule": {
    "DIAlarmRuleId": 34988,
    "DIJobId": 11170,
    "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
    },
    "CreatedUid": "10000001",
    "CreatedTime": 1663573162,
    "UpdatedUid": "10000001",
    "UpdatedTime": 1663573163
  }
}

Error codes

HTTP status code

Error code

Error message

Description

500 InternalError.System An internal system error occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. No permission, please authorize
429 Throttling.Api The request for this resource has exceeded your available limit.
429 Throttling.System The DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.