All Products
Search
Document Center

Auto Scaling:DescribeAlarms

Last Updated:Sep 10, 2026

Queries information about event-triggered tasks.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ess:DescribeAlarms

get

*ScalingGroup

acs:ess:{#regionId}:{#accountId}:scalinggroup/{#ScalingGroupId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region where the event-triggered task resides.

cn-qingdao

ScalingGroupId

string

No

The ID of the scaling group associated with the event-triggered task.

asg-bp18p2yfxow2dloq****

AlarmTaskId

string

No

The ID of the event-triggered task.

asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1****

State

string

No

The state of the event-triggered task. Valid values:

  • ALARM: The alert condition is met.

  • OK: The alert condition is not met.

  • INSUFFICIENT_DATA: Insufficient data to determine whether the alert condition is met.

OK

IsEnable

boolean

No

Specifies whether the event-triggered task is enabled. Valid values:

  • true: enabled.

  • false: disabled.

true

MetricType

string

No

The type of the monitoring metric. Valid values:

  • system: uses CloudMonitor system metrics.

  • custom: uses custom metrics reported to CloudMonitor.

system

MetricName

string

No

The name of the monitoring metric.

CpuUtilization

PageSize

integer

No

The number of entries per page for paging queries. Settings the number of rows per page. Maximum value: 50.

Default value: 10.

10

PageNumber

integer

No

The page number of the event-triggered task list. Minimum value: 1.

Default value: 1.

1

Response elements

Element

Type

Description

Example

object

The information about event-triggered tasks.

PageSize

integer

The number of entries per page.

10

RequestId

string

The request ID.

871C7C53-34A4-45AA-8C14-4B72FA6A****

PageNumber

integer

The current page number.

1

TotalCount

integer

The total number of event-triggered tasks.

2

AlarmList

object

Alarm

array<object>

The list of event-triggered tasks.

array<object>

The list of event-triggered tasks.

AlarmTaskId

string

The ID of the event-triggered task.

asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1****

MetricName

string

Metric name. Possible values:

  • CpuUtilization: (ECS) CPU utilization (%).

  • ConcurrentConnections: (ECS) Number of concurrent connections to ECS.

  • IntranetTx: (ECS) Internal network outbound traffic (Kb/min).

  • IntranetRx: (ECS) Internal network inbound traffic (Kb/min).

  • VpcInternetTx: (ECS) Internet outbound traffic (Kb/min).

  • VpcInternetRx: (ECS) Internet inbound traffic (Kb/min).

  • SystemDiskReadBps: (ECS) System disk read throughput (Byte/s).

  • SystemDiskWriteBps: (ECS) System disk write throughput (Byte/s).

  • SystemDiskReadOps: (ECS) System disk read IOPS (operations/s).

  • SystemDiskWriteOps: (ECS) System disk write IOPS (operations/s).

  • CpuUtilizationAgent: (Agent) CPU utilization (%).

  • GpuUtilizationAgent: (Agent) GPU utilization (%).

  • GpuMemoryFreeUtilizationAgent: (Agent) GPU memory free rate (%).

  • GpuMemoryUtilizationAgent: (Agent) GPU memory usage (%).

  • MemoryUtilization: (Agent) Memory usage (%).

  • LoadAverage: (Agent) System load average.

  • TcpConnection: (Agent) Total number of TCP connections.

  • TcpConnection: (Agent) Number of established TCP connections.

  • PackagesNetOut: (Agent) Number of packets sent per second by the internal network interface card.

  • PackagesNetIn: (Agent) Number of packets received per second by the internal network interface card.

  • PackagesNetOut: (Agent) Number of packets sent per second by the external network interface card.

  • PackagesNetIn: (Agent) Number of packets received per second by the external network interface card.

  • EciPodCpuUtilization: CPU utilization (%).

  • EciPodMemoryUtilization: Memory usage (%).

  • LoadBalancerRealServerAverageQps: (ALB) Queries per second (QPS) per server in the server group (operations/s).

For more information, see System monitoring event-triggered tasks.

CpuUtilization

EvaluationCount

integer

The number of times the threshold expression must be satisfied to trigger the execution of a scaling rule. For example, the average CPU utilization must be greater than or equal to 80% in three consecutive statistical evaluations.

3

State

string

Status of the event-triggered task. Possible values:

  • ALARM: Alert triggered because the alert condition has been met.

  • OK: Normal; the alert condition has not been met.

  • INSUFFICIENT_DATA: Insufficient data is available to determine whether the alert condition has been met.

ALARM

Period

integer

The statistic period for monitoring metric data, in seconds. Valid values:

  • 15

  • 60

  • 120

  • 300

  • 900

Note

Only scaling groups of the ECS type support a statistic period of 15 seconds.

300

ScalingGroupId

string

ID of the scaling group associated with the event-triggered task.

asg-bp18p2yfxow2dloq****

ComparisonOperator

string

Comparison operator between the metric statistic value and the threshold, which specifies the condition under which the metric statistic value meets the threshold. Possible values:

  • The metric statistic value is greater than or equal to the threshold. Value: >=.

  • The metric statistic value is less than or equal to the threshold. Value: <=.

  • The metric statistic value is greater than the threshold. Value: >.

  • The metric statistic value is less than the threshold. Value: <.

>=

Effective

string

The effective period of the event-triggered task.

* * * * * ?

Description

string

Description of the event-triggered task.

Test alarm task.

MetricType

string

The metric type. Valid values:

  • system: Uses CloudMonitor system metrics.

  • custom: Uses Custom Metrics reported to CloudMonitor.

system

Name

string

The name of the event-triggered task.

TestAlarmTask

Threshold

number

The threshold of the metric. When the threshold expression is satisfied for the specified number of times, the scaling rule is triggered.

80.0

Enable

boolean

Indicates whether the event-triggered task is enabled. Valid values:

  • true: Enabled.

  • false: Disabled.

true

Statistics

string

The method for calculating statistics on metric data. Possible values:

  • Average: The average value.

  • Minimum: The minimum value.

  • Maximum: The maximum value.

Average

Dimensions

object

Dimension

array<object>

The dimension information associated with the metric.

object

The dimension information associated with the metric.

DimensionKey

string

The key of the dimension associated with the metric. Possible values:

  • user_id: Your Account ID.

  • scaling_group: The scaling group being monitored.

  • device: The type of network interface card device.

  • state: The status of the TCP Connection.

device

DimensionValue

string

The information value of the dimension associated with the metric. The valid values depend on the dimension key.

  • user_id: Auto-filled by the system.

  • scaling_group: Auto-filled by the system.

  • Possible values for device:
    • eth0: For classic network instances, eth0 represents the internal network interface card. For VPC-connected instances, only eth0 exists.

    • eth1: For classic network instances, eth1 represents the external network interface card.

  • Possible values for state:
    • TCP_TOTAL: Indicates the total number of TCP Connections.

    • ESTABLISHED: Indicates the number of established TCP Connections.

eth0

AlarmActions

object

AlarmAction

array

A list of UUIDs of scaling rules associated with the event-triggered task.

string

A list of UUIDs of scaling rules associated with the event-triggered task.

ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh****

Expressions

object

Expression

array<object>

Information about the multi-metric alert rule.

object

Information about the multi-metric alert rule.

MetricName

string

The metric name for a multi-metric alert rule. Possible values:

  • CpuUtilization: (ECS) CPU utilization (%).

  • ConcurrentConnections: (ECS) Number of concurrent connections to ECS.

  • IntranetTx: (ECS) Internal network outbound traffic (Kb/min).

  • IntranetRx: (ECS) Internal network inbound traffic (Kb/min).

  • VpcInternetTx: (ECS) Internet outbound traffic (Kb/min).

  • VpcInternetRx: (ECS) Internet inbound traffic (Kb/min).

  • SystemDiskReadBps: (ECS) System disk read throughput (Byte/s).

  • SystemDiskWriteBps: (ECS) System disk write throughput (Byte/s).

  • SystemDiskReadOps: (ECS) System disk read IOPS (operations per second).

  • SystemDiskWriteOps: (ECS) System disk write IOPS (operations per second).

  • CpuUtilizationAgent: (Agent) CPU utilization (%).

  • GpuUtilizationAgent: (Agent) GPU utilization (%).

  • GpuMemoryFreeUtilizationAgent: (Agent) GPU memory free rate (%).

  • GpuMemoryUtilizationAgent: (Agent) GPU memory usage (%).

  • MemoryUtilization: (Agent) Memory usage (%).

  • LoadAverage: (Agent) System load average.

  • TcpConnection: (Agent) Total number of TCP connections.

  • TcpConnection: (Agent) Number of established TCP connections.

  • PackagesNetOut: (Agent) Number of packets sent per second by the internal network interface card.

  • PackagesNetIn: (Agent) Number of packets received per second by the internal network interface card.

  • PackagesNetOut: (Agent) Number of packets sent per second by the external network interface card.

  • PackagesNetIn: (Agent) Number of packets received per second by the external network interface card.

  • EciPodCpuUtilization: CPU utilization (%).

  • EciPodMemoryUtilization: Memory usage (%).

  • LoadBalancerRealServerAverageQps: (ALB) Queries per second (QPS) per server in the server group.

For more information, see System monitoring event-triggered tasks.

CpuUtilization

ComparisonOperator

string

The comparison operator used in a multi-metric alert rule to compare the metric statistic value with the threshold. It defines the condition under which the rule is triggered. Possible values:

  • The metric statistic value is greater than or equal to the threshold. Value: >=.

  • The metric statistic value is less than or equal to the threshold. Value: <=.

  • The metric statistic value is greater than the threshold. Value: >.

  • The metric statistic value is less than the threshold. Value: <.

Default value: >=.

>=

Period

integer

The statistic period for monitoring metric data in a multi-metric alert rule, measured in seconds. Valid values:

  • 15

  • 60

  • 120

  • 300

  • 900

Note

Only scaling groups of the ECS type support a statistic period of 15 seconds.

900

Statistics

string

The method used to calculate statistics for monitoring metric data in a multi-metric alert rule. Valid values:

  • Average: average value

  • Minimum: minimum value

  • Maximum: maximum value

Average

Threshold

number

The threshold of the metric in a multi-metric alert rule. When the threshold expression is satisfied for the specified number of times, the scaling rule is triggered.

40.0

ExpressionsLogicOperator

string

The logical relationship between multiple metric-based alert conditions. Possible values:

  • &&: An alert is triggered only when all metrics meet their respective alert conditions. That is, the alert is triggered only when all expressions in the multi-metric alert rule evaluate to true.

  • ||: An alert is triggered if any one of the metrics meets its alert condition.

&&

HybridMonitorNamespace

string

Hybrid Cloud Monitoring metric repository ID.

To manage metric repositories, see Manage metric repositories.

aliyun-test

HybridMetrics

object

HybridMetric

array<object>

Hybrid Cloud Monitoring metric settings. For more information about how to configure these settings, see Use formula calculation to create Custom target tracking rules.

array<object>

Id

string

The reference ID of the metric in the metric operation expression.

a

Expression

string

An arithmetic expression of multiple Hybrid Cloud Monitoring metrics. The result of evaluating this expression is used to trigger scale-in or scale-out operations.

The expression must conform to the Reverse Polish Notation (RPN) format, and only the operators + - * / are supported.

(a+b)/2

MetricName

string

The Metric Name in the Hybrid Cloud Monitoring repository.

AliyunSmq_NumberOfMessagesVisible

Statistic

string

The statistical method for the metric. Possible values:

  • Average: The average value of all points in the specified interval.

  • Minimum: The minimum value of all points in the specified interval.

  • Maximum: The maximum value of all points in the specified interval.

Average

Dimensions

object

Dimension

array<object>

Metric dimension. Used to specify the resource being monitored by the metric.

object

DimensionKey

string

Dimension key of the metric.

queue

DimensionValue

string

Dimension value of the metric.

testQueue

PromQL

string

Prometheus Query Language (PromQL) statement for Hybrid Cloud Monitoring.

(avg(last_over_time(AliyunMnsnew_ActiveMessages{region='cn-hangzhou',userId='123456****',queue='testQueue'}[900s])) by (userId))/(avg(last_over_time(AliyunEss_RunningInstanceCount{instanceId='asg-bp1****'}[900s])) by (userId) != 0)

Examples

Success response

JSON format

{
  "PageSize": 10,
  "RequestId": "871C7C53-34A4-45AA-8C14-4B72FA6A****",
  "PageNumber": 1,
  "TotalCount": 2,
  "AlarmList": {
    "Alarm": [
      {
        "AlarmTaskId": "asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1****",
        "MetricName": "CpuUtilization",
        "EvaluationCount": 3,
        "State": "ALARM",
        "Period": 300,
        "ScalingGroupId": "asg-bp18p2yfxow2dloq****",
        "ComparisonOperator": ">=",
        "Effective": "* * * * * ?",
        "Description": "Test alarm task.",
        "MetricType": "system",
        "Name": "TestAlarmTask",
        "Threshold": 80,
        "Enable": true,
        "Statistics": "Average",
        "Dimensions": {
          "Dimension": [
            {
              "DimensionKey": "device",
              "DimensionValue": "eth0"
            }
          ]
        },
        "AlarmActions": {
          "AlarmAction": [
            "ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh****"
          ]
        },
        "Expressions": {
          "Expression": [
            {
              "MetricName": "CpuUtilization",
              "ComparisonOperator": ">=",
              "Period": 900,
              "Statistics": "Average",
              "Threshold": 40
            }
          ]
        },
        "ExpressionsLogicOperator": "&&",
        "HybridMonitorNamespace": "aliyun-test",
        "HybridMetrics": {
          "HybridMetric": [
            {
              "Id": "a",
              "Expression": "(a+b)/2",
              "MetricName": "AliyunSmq_NumberOfMessagesVisible",
              "Statistic": "Average",
              "Dimensions": {
                "Dimension": [
                  {
                    "DimensionKey": "queue",
                    "DimensionValue": "testQueue"
                  }
                ]
              }
            }
          ]
        },
        "PromQL": "(avg(last_over_time(AliyunMnsnew_ActiveMessages{region='cn-hangzhou',userId='123456****',queue='testQueue'}[900s])) by (userId))/(avg(last_over_time(AliyunEss_RunningInstanceCount{instanceId='asg-bp1****'}[900s])) by (userId) != 0)"
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.