All Products
Search
Document Center

DataWorks:ListAlertRules

Last Updated:Dec 10, 2024

Queries a list of custom monitoring alert rule by page.

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

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dataworks:ListAlertRulesget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
OwnerstringNo

The ID of the Alibaba Cloud account used by the owner of the rule.

1933790683****
TaskIdsarrayNo

The IDs of the scheduling tasks.

longNo

The ID of the scheduling task.

1234
TypesarrayNo

The alert triggering condition.

stringNo

The alert type. Valid values:

  • Finished: An instance is successfully run.
  • UnFinished: An instance does not finish running before a specified point in time.
  • Error: An error occurs on an instance.
  • CycleUnfinished: An instance does not finish running as expected within a specific cycle.
  • Timeout: An instance times out.
  • InstanceTransferComplete: An instance is generated by the auto triggered node.
  • InstanceTransferFluctuate: The number of generated instances fluctuates.
  • ExhaustedError: An error persists after an instance is automatically rerun.
  • InstanceKeyword: An instance with errors contains specified keywords.
  • InstanceErrorCount: The number of instances on which an error occurs reaches a specified threshold.
  • InstanceErrorPercentage: The proportion of instances on which an error occurs in the workspace to the total number of instances reaches a specified threshold.
  • ResourceGroupPercentage: The usage rate of the resource group reaches a specified threshold.
  • ResourceGroupWaitCount: The number of instances that are waiting for resources in the resource group reaches a specified threshold.
Error
ReceiverstringNo

The ID of the Alibaba Cloud account used by the alert recipient.

1933790683****
NamestringNo

The name of the rule.

error_rule
PageNumberintegerYes

The page number. Pages start from page 1.

1
PageSizelongYes

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

10

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

A6C6B486-E3A2-5D52-9E76-D9380485D946
PagingInfoobject

The pagination information.

TotalCountinteger

The total number of entries returned.

5
PageNumberinteger

The page number.

1
PageSizeinteger

The number of entries per page.

10
AlertRulesarray<object>

The rules.

AlertRulesobject
Idlong

The rule ID.

22125
Namestring

The name of the rule.

error_test
Ownerstring

The ID of the Alibaba Cloud account used by the owner of the rule.

1933790683****
Enabledboolean

Indicates whether the rule is enabled.

true
TriggerConditionobject

The alert triggering condition.

Typestring

The alert type. Valid values:

  • Finished: An instance is successfully run.
  • UnFinished: An instance does not finish running before a specified point in time.
  • Error: An error occurs on an instance.
  • CycleUnfinished: An instance does not finish running as expected within a specific cycle.
  • Timeout: An instance times out.
  • InstanceTransferComplete: An instance is generated by the auto triggered node.
  • InstanceTransferFluctuate: The number of generated instances fluctuates.
  • ExhaustedError: An error persists after an instance is automatically rerun.
  • InstanceKeyword: An instance with errors contains specified keywords.
  • InstanceErrorCount: The number of instances on which an error occurs reaches a specified threshold.
  • InstanceErrorPercentage: The proportion of instances on which an error occurs in the workspace to the total number of instances reaches a specified threshold.
  • ResourceGroupPercentage: The usage rate of the resource group reaches a specified threshold.
  • ResourceGroupWaitCount: The number of instances that are waiting for resources in the resource group reaches a specified threshold.
Error
Extensionobject

The extended information about the rule. This parameter is required for specific types of alerts.

Errorobject

The configuration for an alert of the Error type.

StreamTaskIdsarray

The IDs of the real-time computing tasks. This parameter is required when you monitor real-time computing tasks.

StreamTaskIdslong

The ID of the real-time computing task.

123
AutoRerunAlertboolean

Indicates whether an alert is triggered if a batch synchronization task is automatically rerun upon a failure.

false
Timeoutobject

The configuration for an alert of the Timeout type.

TimeoutInMinutesinteger

The timeout period. Unit: minutes.

10
UnFinishedobject

The configuration for an alert of the UnFinished type.

UnFinishedTimestring

The latest completion time of the instance. The period is in the hh:mm format. Valid values of hh: [0,47]. Valid values of mm: [0,59].

12:00
CycleUnfinishedobject

The configuration for an alert of the CycleUnfinished type.

CycleAndTimearray<object>

The configurations of the scheduling cycle and timeout period of the instance.

CycleAndTimeobject
CycleIdinteger

The ID of the scheduling cycle of the instance. Valid values: [1,288].

1
Timestring

The latest completion time of the instance within the scheduling cycle. The time is in the hh:mm format. Valid values of hh: [0,47]. Valid values of mm: [0,59].

01:00
InstanceErrorCountobject

The configuration for an alert of the InstanceErrorCount type.

Countinteger

The maximum number of instances on which an error occurs. Valid values: [1,10000].

10
InstanceErrorPercentageobject

The configuration for an alert of the InstanceErrorPercentage type.

Percentageinteger

The maximum percentage of instances on which an error occurs in the workspace to the total number of instances. Valid values: [1-100].

10
InstanceTransferFluctuateobject

The configuration for an alert of the InstanceTransferFluctuate type.

Trendstring

The way in which the number of auto triggered node instances that are generated in your workspace fluctuates. Valid values:

  • abs: the absolute value. The number of instances increases or decreases.
  • increase: The number of instances increases.
  • decrease: The number of instances decreases.
abs
Percentageinteger

The maximum percentage of fluctuation in the number of auto triggered node instances that are generated in your workspace. Valid values: [1-100].

10
Targetobject

The monitored objects.

Typestring

The type of the monitored objects. Valid values:

  • Task: node
  • Baseline: baseline
  • Projec: workspace
  • BizProcess: workflow
Task
Idsarray

The IDs of monitored objects.

Idslong

The ID of the monitored object.

32567
AllowTasksarray

The nodes that are not to be monitored.

AllowTaskslong

The ID of the node that is not to be monitored.

123123

Examples

Sample success responses

JSONformat

{
  "RequestId": "A6C6B486-E3A2-5D52-9E76-D9380485D946",
  "PagingInfo": {
    "TotalCount": 5,
    "PageNumber": 1,
    "PageSize": 10,
    "AlertRules": [
      {
        "Id": 22125,
        "Name": "error_test",
        "Owner": "1933790683****",
        "Enabled": true,
        "TriggerCondition": {
          "Type": "Error",
          "Extension": {
            "Error": {
              "StreamTaskIds": [
                123
              ],
              "AutoRerunAlert": false
            },
            "Timeout": {
              "TimeoutInMinutes": 10
            },
            "UnFinished": {
              "UnFinishedTime": "12:00"
            },
            "CycleUnfinished": {
              "CycleAndTime": [
                {
                  "CycleId": 1,
                  "Time": "01:00"
                }
              ]
            },
            "InstanceErrorCount": {
              "Count": 10
            },
            "InstanceErrorPercentage": {
              "Percentage": 10
            },
            "InstanceTransferFluctuate": {
              "Trend": "abs",
              "Percentage": 10
            }
          },
          "Target": {
            "Type": "Task",
            "Ids": [
              32567
            ],
            "AllowTasks": [
              123123
            ]
          }
        }
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history