ListDIAlarmRules

Updated at:

Queries the alert rules for data integration.

Operation description

You must purchase DataWorks Basic Edition or a higher edition to use this operation.

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

JobId

integer

No

The ID of the data integration task for which you want to query alert rules. This parameter is required. You can call the ListDIJobs operation to query the target workspace and obtain the Id of the target task from PagingInfo.DIJobs[].

If DI.Job.NotFound is returned, use the same caller identity and region to call GetDIJob with this task ID to query the details, and verify the workspace and access permissions of the target task. Both querying task details and querying alert rules by task ID verify the task version, source and destination channels, and synchronization type.

1000001

PageNumber

integer

No

The page number.

1

PageSize

integer

No

The number of entries to return on each page. Default value: 10. Maximum value: 100.

10

DIAlarmRuleId

integer

No

The ID of the specific alert rule to query. If you leave this parameter empty, all alert rules for the specified task are queried.

34988

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The ID of the request. You can use the ID to locate logs and troubleshoot issues.

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

PagingInfo

object

The pagination information.

TotalCount

integer

The total number of entries that meet the specified conditions.

90

PageNumber

integer

The page number. Pages start from 1.

1

PageSize

integer

The number of entries returned per page.

10

DIJobAlarmRules

array<object>

The list of alert rules.

array<object>

The details of a single alert rule.

Id

integer

The ID of the alert rule.

72402

DIJobId

integer

The ID of the task.

32594

Description

string

The description of the alert rule.

rule description

MetricType

string

The type of the alert metric. Valid values:

  • Heartbeat: task status alert

  • FailoverCount: failover count alert

  • Delay: task delay alert

  • DdlReport: DDL notification

  • ResourceUtilization: resource group utilization

Heartbeat

Name

string

The name of the alert rule.

rule_name

Enabled

boolean

Specifies whether the alert rule is enabled.

True

TriggerConditions

array<object>

The list of alert trigger conditions. Multiple trigger conditions are supported.

object

The alert trigger condition.

Severity

string

The severity level. Valid values:

  • Warning

  • Critical

Critical

Duration

integer

The time interval for alert calculation, in minutes.

1

Threshold

integer

The alert threshold.

  • Task status alert: no threshold

  • Failover count alert: the number of failovers

  • Task delay alert: the delay duration, in seconds

5

DdlTypes

array

The list of DDL operations to take effect. This parameter is returned only when MetricType is set to DdlReport.

string

The DDL operations to take effect when MetricType is set to DdlReport. Valid values:

  • AlterAddColumn: add a column

  • AlterDropColumn: drop a column

  • AlterRenameColumn: rename a column

  • AlterRenameTable: rename a table

  • AlterTableModify: perform other table modifications

  • DropTable: drop a table

  • TruncateTable: truncate a table

AlterAddColumn

DdlReportTags deprecated

array

[Deprecated] Use the DdlTypes field instead.

deprecated

string

[Deprecated] Use the DdlTypes field instead.

ALTERADDCOLUMN

NotificationSettings

object

The alert notification channels and recipient settings.

NotificationChannels

array<object>

The array of alert notification channels.

object

A single alert notification channel.

Severity

string

The severity level. Valid values:

  • Warning

  • Critical

Critical

Channels

array

The array of alert channel settings.

string

The channel type. Valid values:

  • Mail: email

  • Phone: phone call

  • Sms: text message

  • Ding: DingTalk

Ding

NotificationReceivers

array<object>

The alert notification recipients.

object

The alert notification recipients.

ReceiverType

string

The type of the recipient. Valid values: AliyunUid, DingToken, FeishuToken, and WebHookUrl.

DingToken

ReceiverValues

array

The value of the recipient.

  • If the recipient type is AliyunUid, the value is the specific Alibaba Cloud user ID.

  • If the recipient type is DingToken, the value is the specific DingTalk token.

string

The value of the recipient.

  • If the recipient type is AliyunUid, the value is the specific Alibaba Cloud user ID.

  • If the recipient type is DingToken, the value is the specific DingTalk token.

token1

MuteInterval

integer

The alert mute interval, in minutes.

5

InhibitionInterval deprecated

integer

[Deprecated] Use the MuteInterval field instead.

5

DIAlarmRuleId deprecated

integer

[Deprecated] Use the Id field instead.

72402

Examples

Success response

JSON format

{
  "RequestId": "74C2FECD-5B3A-554A-BCF5-351A36DE9815",
  "PagingInfo": {
    "TotalCount": 90,
    "PageNumber": 1,
    "PageSize": 10,
    "DIJobAlarmRules": [
      {
        "Id": 72402,
        "DIJobId": 32594,
        "Description": "rule descrition",
        "MetricType": "Heartbeat",
        "Name": "rule_name",
        "Enabled": true,
        "TriggerConditions": [
          {
            "Severity": "Critical",
            "Duration": 1,
            "Threshold": 5,
            "DdlTypes": [
              "AlterAddColumn"
            ],
            "DdlReportTags": [
              "ALTERADDCOLUMN"
            ]
          }
        ],
        "NotificationSettings": {
          "NotificationChannels": [
            {
              "Severity": "Critical",
              "Channels": [
                "Ding"
              ]
            }
          ],
          "NotificationReceivers": [
            {
              "ReceiverType": "DingToken",
              "ReceiverValues": [
                "token1"
              ]
            }
          ],
          "MuteInterval": 5,
          "InhibitionInterval": 5
        },
        "DIAlarmRuleId": 72402
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.