All Products
Search
Document Center

:GetDIAlarmRule

更新時間:Oct 08, 2023

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.

You can configure alert rules only for tasks whose MigrationType is set to RealtimeIncremental.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes GetDIAlarmRule

The operation that you want to perform. Set the value to GetDIAlarmRule.

DIAlarmRuleId Long Yes 34994

The alert rule ID.

Response parameters

Parameter

Type

Example

Description

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

The request ID.

DIAlarmRule Object

The details of the alert rule.

DIAlarmRuleId Long 34988

The alert rule ID.

DIJobId Long 11170

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

Description String Alert rule for heartbeat of data synchronization from MySQL to Hologres

The description of the alert rule.

MetricType String Heartbeat

The metric type in the alert rule.

Enabled Boolean true

Indicates whether the alert rule is enabled.

TriggerConditions Array of TriggerCondition

The conditions that can trigger the alert rule.

Severity String Warning

The severity level.

Duration Long 15

The time interval for alert calculation. Unit: minutes.

Threshold Long 5

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.
NotificationSettings Object

The alert notification settings.

NotificationChannels Array of NotificationChannel

The alert notification methods.

Severity String Warning

The severity level.

Channels Array of String Ding

The method.

NotificationReceivers Array of NotificationReceiver

The alert notification recipients.

ReceiverType String DingToken

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.
ReceiverValues Array of String token1

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.
InhibitionInterval Integer 5

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

CreatedUid String 10000001

The ID of the user who created the alert rule.

CreatedTime Long 1663573162

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

UpdatedUid String 10000001

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

UpdatedTime Long 1663573163

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

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetDIAlarmRule
&DIAlarmRuleId=34994
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<GetDIAlarmRuleResponse>
    <RequestId>4A807D85-AC9F-55F7-A58F-998D5249CAD9</RequestId>
    <DIAlarmRule>
        <DIAlarmRuleId>34988</DIAlarmRuleId>
        <DIJobId>11170</DIJobId>
        <Description>Alert rule for heartbeat of data synchronization from MySQL to Hologres</Description>
        <MetricType>Heartbeat</MetricType>
        <Enabled>true</Enabled>
        <TriggerConditions>
            <Severity>Warning</Severity>
            <Duration>15</Duration>
            <Threshold>5</Threshold>
        </TriggerConditions>
        <NotificationSettings>
            <NotificationChannels>
                <Severity>Warning</Severity>
                <Channels>Ding</Channels>
            </NotificationChannels>
            <NotificationReceivers>
                <ReceiverType>DingToken</ReceiverType>
                <ReceiverValues>token1</ReceiverValues>
            </NotificationReceivers>
            <InhibitionInterval>5</InhibitionInterval>
        </NotificationSettings>
        <CreatedUid>10000001</CreatedUid>
        <CreatedTime>1663573162</CreatedTime>
        <UpdatedUid>10000001</UpdatedUid>
        <UpdatedTime>1663573163</UpdatedTime>
    </DIAlarmRule>
</GetDIAlarmRuleResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "4A807D85-AC9F-55F7-A58F-998D5249CAD9",
  "DIAlarmRule" : {
    "DIAlarmRuleId" : 34988,
    "DIJobId" : 11170,
    "Description" : "Alert rule for heartbeat of data synchronization from MySQL to Hologres",
    "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

429 Throttling.Api The request for this resource has exceeded your available limit. The number of requests for the resource has exceeded the upper limit.
429 Throttling.System The DataWorks system is busy. Try again later. The DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later. Excessive requests have been submitted within a short period of time. Try again later.
500 InternalError.System An internal system error occurred. Try again later. An internal error has occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later. An internal error has occurred. Try again later.

For a list of error codes, see Service error codes.