ListDIAlarmRules

更新时间:
复制 MD 格式

Queries the alert rules configured for a data integration synchronization task.

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 task for which alert rules are configured.

1000001

PageNumber

integer

No

The page number.

1

PageSize

integer

No

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

10

DIAlarmRuleId

integer

No

The ID of the alert rule. If you leave this parameter empty, all alert rules of the task are queried.

34988

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID. You can use it to query logs and troubleshoot issues.

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

PagingInfo

object

The pagination information.

TotalCount

integer

The total number of entries returned.

90

PageNumber

integer

The page number. Pages start from page 1.

1

PageSize

integer

The number of entries per page.

10

DIJobAlarmRules

array<object>

The alert rules.

array<object>

The details of an alert rule.

Id

integer

The ID of the alert rule.

72402

DIJobId

integer

The ID of the synchronization task.

32594

Description

string

The description of the alert rule.

rule descrition

MetricType

string

The metric type in the alert rule. Valid values:

  • Heartbeat

  • FailoverCount

  • Delay

  • DdlReport

  • ResourceUtilization

Heartbeat

Name

string

The name of the alert rule.

rule_name

Enabled

boolean

Indicates whether the alert rule is enabled. Valid values: True and False.

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

Critical

Duration

integer

The time interval for alert calculation. Unit: minutes.

1

Threshold

integer

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

DdlTypes

array

The types of DDL operations for which the alert rule takes effect. This parameter is returned only if the MetricType parameter is set to DdlReport.

string

The type of the DDL operation for which the alert rule takes effect. This parameter is returned only if the MetricType parameter is set to DdlReport. Valid values:

  • AlterAddColumn

  • AlterDropColumn

  • AlterRenameColumn

  • AlterRenameTable

  • AlterTableModify

  • DropTable

  • TruncateTable

ALTERADDCOLUMN

DdlReportTags deprecated

array

This parameter is deprecated and replaced by the DdlTypes parameter.

deprecated

string

This parameter is deprecated and replaced by the DdlTypes parameter.

ALTERADDCOLUMN

NotificationSettings

object

The alert notification method and recipient settings.

NotificationChannels

array<object>

The alert notification methods.

object

The alert notification method.

Severity

string

The severity level. Valid values:

  • Warning

  • Critical

Critical

Channels

array

The alert notification methods.

string

The alert notification method. Valid values:

  • Mail

  • Phone

  • Sms

  • Ding

Ding

NotificationReceivers

array<object>

The settings of alert notification recipients.

object

The settings of alert notification recipients.

ReceiverType

string

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

DingToken

ReceiverValues

array

The recipient.

  • If the value of the ReceiverType parameter is AliyunUid, the value of this parameter is the Alibaba Cloud account ID of a user.

  • If the value of the ReceiverType parameter is DingToken, the value of this parameter is the token of a DingTalk chatbot.

string

The recipient.

  • If the value of the ReceiverType parameter is AliyunUid, the value of this parameter is the Alibaba Cloud account ID of a user.

  • If the value of the ReceiverType parameter is DingToken, the value of this parameter is the token of a DingTalk chatbot.

token1

MuteInterval

integer

The alert suppression interval. Unit: minutes.

5

InhibitionInterval deprecated

integer

This parameter is deprecated and replaced by the MuteInterval parameter.

5

DIAlarmRuleId deprecated

integer

This parameter is deprecated. Use the Id parameter 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.