Tous les produits
Search
Centre de documentation

:DescribeActiveMetricRuleList

Dernière mise à jour :Aug 07, 2026

Consulte les règles d'alerte actives.

Testez maintenant

Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.

Test

Autorisation RAM

Le tableau ci-dessous décrit les autorisations nécessaires pour appeler cette API. Vous pouvez les définir dans une politique Resource Access Management (RAM). Les colonnes du tableau sont détaillées ci-dessous :

  • Action : les actions peuvent être utilisées dans l'élément Action des instructions de politique de permissions RAM pour accorder les autorisations nécessaires à l'exécution de l'opération.

  • API : l'API que vous pouvez appeler pour exécuter l'action.

  • Niveau d'accès : le niveau d'accès prédéfini accordé pour chaque API. Valeurs valides : create, list, get, update et delete.

  • Type de ressource : le type de ressource qui prend en charge l'autorisation pour exécuter l'action. Il indique si l'action prend en charge les permissions au niveau de la ressource. La ressource spécifiée doit être compatible avec l'action. Sinon, la politique sera inefficace.

    • Pour les API avec permissions au niveau de la ressource, les types de ressource requis sont marqués d'un astérisque (*). Spécifiez l'Alibaba Cloud Resource Name (ARN) correspondant dans l'élément Resource de la politique.

    • Pour les API sans permissions au niveau de la ressource, la valeur All Resources est affichée. Utilisez un astérisque (*) dans l'élément Resource de la politique.

  • Clé de condition : les clés de condition définies par le service. La clé permet un contrôle granulaire, applicable aux actions seules ou aux actions associées à des ressources spécifiques. En plus des clés de condition propres au service, Alibaba Cloud fournit un ensemble de clés de condition communes applicables à tous les services pris en charge par RAM.

  • Action dépendante : les actions dépendantes requises pour exécuter l'action. Pour mener à bien l'opération, l'utilisateur RAM ou le rôle RAM doit disposer des permissions pour toutes les actions dépendantes.

cms:DescribeActiveMetricRuleList

get

*All Resource

*

Aucune Aucune

Paramètres de requête

Paramètre

Type

Requis

Description

Exemple

Product

string

Oui

L'abréviation du service cloud qui prend en charge les règles d'alerte actives.

ecs

Éléments de réponse

Élément

Type

Description

Exemple

object

Aucune.

Code

string

Le code d'état HTTP.

200

Message

string

Le message renvoyé.

La requête n'est pas autorisée

RequestId

string

L'identifiant de la requête.

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

Success

boolean

Indique si la requête a réussi. Valeurs valides :

true

Datapoints

object

Alarm

array<object>

Les détails des règles d'alerte.

object

SilenceTime

string

The mute period during which new alerts are not sent even if the trigger conditions are met.

Unit: seconds.

86400

MetricName

string

The metric name.

cpu_total

EvaluationCount

string

The consecutive number of times for which the metric value meets the alert condition before an alert is triggered.

3

Webhook

string

The callback URL.

https://www.aliyun.com

State

string

Indicates whether the alert rule is enabled.

Enable

ContactGroups

string

The alert contact group.

ECS_Group

Namespace

string

The namespace of the cloud service.

acs_ecs_dashboard

RuleName

string

The name of the alert rule.

SystemDefault_acs_rds_dashboard_CpuUsage

RuleId

string

The ID of the alert rule.

a151cd6023eacee2f0978e03863cc1697c89508****

Period

string

The aggregation period of monitoring data.

Unit: seconds.

60

ComparisonOperator

string

The comparison operator that is used in the alert rule. Valid values:

  • >

  • <

  • >=

  • <=

  • =

  • =

>

EndTime

string

The end of the time period during which the alert rule is effective.

Unit: hours. For example, the value 23 indicates 23:59:59.

24

StartTime

string

The beginning of the time period during which the alert rule is effective.

Unit: hours. For example, the value 00 indicates 00:00:00.

00

Threshold

string

The alert threshold.

90

Statistics

string

The statistical method.

Average

Enable

string

Indicates whether the alert rule is enabled. Valid values:

  • true: The alert rule is enabled.

  • false: The alert rule is disabled.

true

AlertList

object

Alert

array<object>

Les détails des règles d'alerte. Le résultat a la même structure que celui renvoyé par l'opération DescribeMetricRuleList.

array<object>

SilenceTime

string

The mute period during which new alerts are not sent even if the trigger conditions are met.

Unit: seconds.

86400

MetricName

string

The name of the metric.

cpu_total

Webhook

string

The callback URL.

http://www.aliyun.com

ContactGroups

string

The alert contact group.

ECS_Group

Namespace

string

The namespace of the Alibaba Cloud service.

acs_ecs_dashboard

EffectiveInterval

string

The time period during which the alert rule is effective.

00:00-23:59

NoEffectiveInterval

string

The time period during which the alert rule is ineffective.

00:00-06:00

MailSubject

string

The subject of the alert notification email.

ECS_Bucket

RuleName

string

The name of the alert rule.

myAlert

RuleId

string

The ID of the alert rule.

ruleIdxxxx

Period

string

The aggregation period of monitoring data.

Unit: seconds.

60

AlertState

string

The status of the alert rule. Valid values:

  • OK: The alert rule has no active alerts.

  • ALARM: The alert rule has active alerts.

  • INSUFFICIENT_DATA: No data is found.

OK

Dimensions

string

The monitoring data of the specified resource.

""

EnableState

boolean

Indicates whether the alert rule is enabled. Valid values:

  • true: The alert rule is enabled.

  • false: The alert rule is disabled.

true

Resources

string

The resources that are associated with the alert rule.

[{"resource":"_ALL"}]

Escalations

object

The conditions for triggering different levels of alerts.

Info

object

The conditions for triggering Info-level alerts.

ComparisonOperator

string

The operator that is used to compare the metric value with the threshold for Info-level alerts. Valid values:

  • GreaterThanOrEqualToThreshold: greater than or equal to the threshold

  • GreaterThanThreshold: greater than the threshold

  • LessThanOrEqualToThreshold: less than or equal to the threshold

  • LessThanThreshold: less than the threshold

  • NotEqualToThreshold: not equal to the threshold

  • GreaterThanYesterday: greater than the metric value at the same time yesterday

  • LessThanYesterday: less than the metric value at the same time yesterday

  • GreaterThanLastWeek: greater than the metric value at the same time last week

  • LessThanLastWeek: less than the metric value at the same time last week

  • GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle

  • LessThanLastPeriod: less than the metric value in the last monitoring cycle

GreaterThanThreshold

Times

string

The consecutive number of times

for which the metric value meets the alert condition before an Info-level alert is triggered.

3

Threshold

string

The threshold for Info-level alerts.

95

Statistics

string

The statistical methods for Info-level alerts.

Average

Warn

object

The conditions for triggering Warn-level alerts.

ComparisonOperator

string

The operator that is used to compare the metric value with the threshold for Warn-level alerts. Valid values:

  • GreaterThanOrEqualToThreshold: greater than or equal to the threshold

  • GreaterThanThreshold: greater than the threshold

  • LessThanOrEqualToThreshold: less than or equal to the threshold

  • LessThanThreshold: less than the threshold

  • NotEqualToThreshold: not equal to the threshold

  • GreaterThanYesterday: greater than the metric value at the same time yesterday

  • LessThanYesterday: less than the metric value at the same time yesterday

  • GreaterThanLastWeek: greater than the metric value at the same time last week

  • LessThanLastWeek: less than the metric value at the same time last week

  • GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle

  • LessThanLastPeriod: less than the metric value in the last monitoring cycle

GreaterThanThreshold

Times

string

The consecutive number of times

for which the metric value meets the alert condition before a Warn-level alert is triggered.

3

Threshold

string

The threshold for Warn-level alerts.

80

Statistics

string

The statistical methods for Warn-level alerts.

Average

Critical

object

The trigger condition for Critical-level alerts.

ComparisonOperator

string

The operator that is used to compare the metric value with the threshold for Critical-level alerts. Valid values:

  • GreaterThanOrEqualToThreshold: greater than or equal to the threshold

  • GreaterThanThreshold: greater than the threshold

  • LessThanOrEqualToThreshold: less than or equal to the threshold

  • LessThanThreshold: less than the threshold

  • NotEqualToThreshold: not equal to the threshold

  • GreaterThanYesterday: greater than the metric value at the same time yesterday

  • LessThanYesterday: less than the metric value at the same time yesterday

  • GreaterThanLastWeek: greater than the metric value at the same time last week

  • LessThanLastWeek: less than the metric value at the same time last week

  • GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle

  • LessThanLastPeriod: less than the metric value in the last monitoring cycle

GreaterThanThreshold

Times

string

The consecutive number of times for which the metric value meets the alert condition before a Critical-level alert is triggered.

3

Threshold

string

The threshold for Critical-level alerts.

99

Statistics

string

The statistical methods for Critical-level alerts.

Average

Exemples

JSON format

{
  "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"
          }
        }
      }
    ]
  }
}

Codes d'erreur

Code de statut HTTP

Code d'erreur

Message d'erreur

Description

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. The specified resource is not found.

Consultez Codes d'erreur pour la liste complète.

Notes de version

Consultez Notes de version pour la liste complète.