All Products
Search
Document Center

DataWorks:GetDIAlarmRule

Last Updated:Oct 17, 2024

Queries the details of 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
DIAlarmRuleIdlongYes

The alert rule ID.

34994

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

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

The details of the alert rule.

DIAlarmRuleIdlong

The alert rule ID.

34988
DIJobIdlong

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

11170
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, specify 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, 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
InhibitionIntervalinteger

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

5
CreatedUidstring

The ID of the user who creates the alert rule.

10000001
CreatedTimelong

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

1663573162
UpdatedUidstring

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

10000001
UpdatedTimelong

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

1663573163

Examples

Sample success responses

JSONformat

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

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