全部產品
Search
文件中心

Cloud Monitor:DescribeActiveMetricRuleList - 查詢一鍵警示規則的列表詳情

更新時間:Mar 21, 2026

調用DescribeActiveMetricRuleList介面查詢一鍵警示規則的列表詳情。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

cms:DescribeActiveMetricRuleList

get

*全部資源

*

請求參數

名稱

類型

必填

描述

樣本值

Product

string

支援一鍵警示規則的雲產品名稱縮寫。

關於如何擷取雲產品名稱,請參見 DescribeProductsOfActiveMetricRule

ecs

返回參數

名稱

類型

描述

樣本值

object

無。

Code

string

狀態代碼。

說明

200 表示成功。

200

Message

string

錯誤資訊。

The Request is not authorization.

RequestId

string

請求 ID。

F82E6667-7811-4BA0-842F-5B2DC42BBAAD

Success

boolean

操作是否成功。取值:

  • true:成功。

  • false:失敗。

true

Datapoints

object

Alarm

array<object>

警示規則列表。

object

無。

SilenceTime

string

通道沉默時間。

單位:秒。

86400

MetricName

string

監控指標名稱。

cpu_total

EvaluationCount

string

警示重試次數。

3

Webhook

string

URL 回調地址。

https://www.aliyun.com

State

string

警示規則的啟用狀態。

Enable

ContactGroups

string

警示連絡人群組。

ECS_Group

Namespace

string

雲產品的命名空間。

acs_ecs_dashboard

RuleName

string

警示規則名稱。

SystemDefault_acs_rds_dashboard_CpuUsage

RuleId

string

警示規則 ID。

a151cd6023eacee2f0978e03863cc1697c89508****

Period

string

監控資料的彙總周期。

單位:秒。

60

ComparisonOperator

string

警示規則比較符。取值:

  • >

  • <

  • >=

  • <=

  • =

  • =

>

EndTime

string

警示規則失效時間。

單位:小時。例如:23 表示23:59:59

24

StartTime

string

警示規則生效起始時間。

單位:小時。例如:00 表示00:00:00

00

Threshold

string

警示閾值。

90

Statistics

string

統計方法。

Average

Enable

string

警示規則的啟用狀態。取值:

  • true:啟用。

  • false:禁用。

true

AlertList

object

Alert

array<object>

警示規則列表。該列表的結構和擷取警示規則列表保持統一。

array<object>

無。

SilenceTime

string

通道沉默時間。

單位:秒。

86400

MetricName

string

監控項的名稱。

cpu_total

Webhook

string

URL 回調地址。

http://www.aliyun.com

ContactGroups

string

警示連絡人群組。

ECS_Group

Namespace

string

雲端服務的命名空間。

acs_ecs_dashboard

EffectiveInterval

string

警示規則的生效時間段。

00:00-23:59

NoEffectiveInterval

string

警示不生效的時間段。

00:00-06:00

MailSubject

string

發送郵件的主題。

ECS_Bucket

RuleName

string

警示規則名稱。

myAlert

RuleId

string

警示規則 ID。

ruleIdxxxx

Period

string

監控資料的彙總周期。

單位:秒。

60

AlertState

string

警示規則狀態。取值:

  • OK:正常。

  • ALARM:警示。

  • INSUFFICIENT_DATA:無資料。

OK

Dimensions

string

指定資源的監控資料。

""

EnableState

boolean

警示規則的啟用狀態。取值:

  • true:啟用。

  • false:禁用。

true

Resources

string

警示規則關聯的資源。

[{"resource":"_ALL"}]

Escalations

object

警示分層級觸發條件。

Info

object

Info 層級警示觸發條件。

ComparisonOperator

string

Info 層級閾值比較符。取值:

  • GreaterThanOrEqualToThreshold:大於等於。

  • GreaterThanThreshold:大於。

  • LessThanOrEqualToThreshold:小於等於。

  • LessThanThreshold:小於。

  • NotEqualToThreshold:不等。

  • GreaterThanYesterday:同比昨天時間上漲。

  • LessThanYesterday:同比昨天時間下降。

  • GreaterThanLastWeek:同比上周同一時間上漲。

  • LessThanLastWeek:同比上周同一時間下降。

  • GreaterThanLastPeriod:環比上周期上漲。

  • LessThanLastPeriod:環比上周期下降。

GreaterThanThreshold

Times

string

Info 層級連續出現次數。

Info 層級連續出現達到該值且超過閾值才會觸發警示。

3

Threshold

string

Info 層級閾值。

95

Statistics

string

Info 層級警示統計方法。

Average

Warn

object

Warn 層級警示觸發條件。

ComparisonOperator

string

Warn 層級閾值比較符。取值:

  • GreaterThanOrEqualToThreshold:大於等於。

  • GreaterThanThreshold:大於。

  • LessThanOrEqualToThreshold:小於等於。

  • LessThanThreshold:小於。

  • NotEqualToThreshold:不等。

  • GreaterThanYesterday:同比昨天時間上漲。

  • LessThanYesterday:同比昨天時間下降。

  • GreaterThanLastWeek:同比上周同一時間上漲。

  • LessThanLastWeek:同比上周同一時間下降。

  • GreaterThanLastPeriod:環比上周期上漲。

  • LessThanLastPeriod:環比上周期下降。

GreaterThanThreshold

Times

string

Warn 層級連續出現次數。

Warn 層級連續出現達到該值且超過閾值才會觸發警示。

3

Threshold

string

Warn 層級閾值。

80

Statistics

string

Warn 層級警示統計方法。

Average

Critical

object

Critical 層級警示觸發條件。

ComparisonOperator

string

Critical 層級閾值比較符。取值:

  • GreaterThanOrEqualToThreshold:大於等於。

  • GreaterThanThreshold:大於。

  • LessThanOrEqualToThreshold:小於等於。

  • LessThanThreshold:小於。

  • NotEqualToThreshold:不等。

  • GreaterThanYesterday:同比昨天時間上漲。

  • LessThanYesterday:同比昨天時間下降。

  • GreaterThanLastWeek:同比上周同一時間上漲。

  • LessThanLastWeek:同比上周同一時間下降。

  • GreaterThanLastPeriod:環比上周期上漲。

  • LessThanLastPeriod:環比上周期下降。

GreaterThanThreshold

Times

string

Critical 層級連續出現次數。Critical 層級連續出現達到該值且超過閾值才會觸發警示。

3

Threshold

string

Critical 層級閾值。

99

Statistics

string

Critical 層級警示統計方法。

Average

樣本

正常返回樣本

JSON格式

{
  "Code": "200",
  "Message": "The Request is not authorization.",
  "RequestId": "F82E6667-7811-4BA0-842F-5B2DC42BBAAD",
  "Success": true,
  "Datapoints": {
    "Alarm": [
      {
        "SilenceTime": "86400",
        "MetricName": "cpu_total",
        "EvaluationCount": "3",
        "Webhook": "https://www.aliyun.com",
        "State": "Enable",
        "ContactGroups": "ECS_Group",
        "Namespace": "acs_ecs_dashboard",
        "RuleName": "SystemDefault_acs_rds_dashboard_CpuUsage",
        "RuleId": "a151cd6023eacee2f0978e03863cc1697c89508****",
        "Period": "60",
        "ComparisonOperator": ">",
        "EndTime": "24",
        "StartTime": "00",
        "Threshold": "90",
        "Statistics": "Average",
        "Enable": "true"
      }
    ]
  },
  "AlertList": {
    "Alert": [
      {
        "SilenceTime": "86400",
        "MetricName": "cpu_total",
        "Webhook": "http://www.aliyun.com",
        "ContactGroups": "ECS_Group",
        "Namespace": "acs_ecs_dashboard",
        "EffectiveInterval": "00:00-23:59",
        "NoEffectiveInterval": "00:00-06:00",
        "MailSubject": "ECS_Bucket",
        "RuleName": "myAlert",
        "RuleId": "ruleIdxxxx",
        "Period": "60",
        "AlertState": "OK",
        "Dimensions": "\"\"",
        "EnableState": true,
        "Resources": "[{\"resource\":\"_ALL\"}]",
        "Escalations": {
          "Info": {
            "ComparisonOperator": "GreaterThanThreshold",
            "Times": "3",
            "Threshold": "95",
            "Statistics": "Average"
          },
          "Warn": {
            "ComparisonOperator": "GreaterThanThreshold",
            "Times": "3",
            "Threshold": "80",
            "Statistics": "Average"
          },
          "Critical": {
            "ComparisonOperator": "GreaterThanThreshold",
            "Times": "3",
            "Threshold": "99",
            "Statistics": "Average"
          }
        }
      }
    ]
  }
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 ParameterInvalid %s
401 AccessDeniedException You donot have sufficient access to perform this action.
402 LimitExceeded The quota for this customer had been reached.
403 AccessForbidden The X.509 certificate or cms access key ID provided does not exist in our records.
404 ResourceNotFound The specified resource is not found. 未找到指定資源。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情