All Products
Search
Document Center

DataWorks:ListDIAlarmRules

Last Updated:Nov 21, 2024

Queries a list of alert rules 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

There is currently no authorization information disclosed in the API.

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 list of alert rules.

DIJobAlarmRuleobject
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.

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 can trigger the alert rule.

TriggerConditionobject
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
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 alert notification recipients.

NotificationReceiverobject
ReceiverTypestring

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
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": "",
        "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