All Products
Search
Document Center

Cloud Monitor:DescribeHostAvailabilityList

Last Updated:Jan 23, 2026

Queries availability monitoring tasks.

Operation description

This topic provides an example to show how to query all the availability monitoring tasks of your Alibaba Cloud account. The sample responses indicate that the account has one availability monitoring task named ecs_instance.

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

cms:DescribeHostAvailabilityList

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Id

integer

No

The ID of the availability monitoring task.

123456

Ids

string

No

The IDs of the availability monitoring tasks. Separate multiple IDs with commas (,).

123456,345678

TaskName

string

No

The name of the availability monitoring task.

ecs_instance

PageNumber

integer

No

The page number.

Pages start from page 1. Default value: 1.

1

PageSize

integer

No

The number of entries per page.

Minimum value: 1. Default value: 10

10

GroupId

integer

No

The ID of the application group.

12345

For more information about common request parameters, see Common parameters.

Response elements

Element

Type

Description

Example

object

Code

string

The HTTP status code.

Note

The status code 200 indicates that the request was successful.

200

Message

string

The error message.

The specified resource is not found.

RequestId

string

The request ID.

4A288E86-45C3-4858-9DB0-6D85B10BD92A

Total

integer

The total number of returned entries.

1

Success

boolean

Indicates whether the request was successful. Valid values:

  • true

  • false

true

TaskList

object

NodeTaskConfig

array<object>

The details of the availability monitoring tasks.

array<object>

TaskType

string

The task type. Valid values:

  • PING

  • TELNET

  • HTTP

HTTP

GroupName

string

The name of the application group.

Group_ECS

GroupId

integer

The ID of the application group.

12345

TaskName

string

The name of the availability monitoring task.

ecs_instance

Disabled

boolean

Indicates whether the availability monitoring task is disabled. Valid values:

  • true: The availability monitoring task is disabled.

  • false: The availability monitoring task is enabled.

false

TaskScope

string

The range of instances that are monitored by the availability monitoring task. Valid values:

  • GROUP: All ECS instances in the application group are monitored.

  • GROUP_SPEC_INSTANCE: Specified ECS instances in the application group are monitored.

GROUP

Id

integer

The ID of the availability monitoring task.

123456

Instances

object

Instance

array

The ECS instances that are monitored.

string

The ID of the ECS instance.

i-abcdefgh12****

TaskOption

object

The optional parameters of the availability monitoring task.

HttpMethod

string

The HTTP request method. Valid values:

  • GET

  • POST

  • HEAD

GET

Interval

integer

The interval at which detection requests are sent. Unit: seconds.

60

HttpURI

string

The URI that you want to monitor. If the TaskType parameter is set to HTTP, this parameter is required.

https://www.aliyun.com

TelnetOrPingHost

string

The domain name or IP address that you want to monitor.

ssh.aliyun.com

HttpResponseCharset

string

The character set that is used in the HTTP response.

UTF-8

HttpPostContent

string

The content of the HTTP POST request.

params1=paramsValue1

HttpNegative

boolean

The method to trigger an alert. The alert can be triggered based on whether the specified alert rule is included in the response body. Valid values:

  • true: If the HTTP response body includes the alert rule, an alert is triggered.

  • false: If the HTTP response does not include the alert rule, an alert is triggered.

true

HttpKeyword

string

The response to the HTTP request.

OK

AlertConfig

object

The configurations of the alert rule.

SilenceTime

integer

The mute period during which new alerts are not sent even if the trigger conditions are met. Unit: seconds. Default value: 86400.

86400

EndTime

integer

The end of the time period during which the alert rule is effective. Valid values: 0 to 23.

For example, if the AlertConfig.StartTime parameter is set to 0 and the AlertConfig.EndTime parameter is set to 22, the alert rule is effective from 00:00:00 to 22:00:00.

Note

Alert notifications are sent based on the specified threshold only if the alert rule is effective.

22

StartTime

integer

The beginning of the time period during which the alert rule is effective. Valid values: 0 to 23.

For example, if the AlertConfig.StartTime parameter is set to 0 and the AlertConfig.EndTime parameter is set to 22, the alert rule is effective from 00:00:00 to 22:00:00.

Note

Alert notifications are sent based on the specified threshold only if the alert rule is effective.

0

WebHook

string

The callback URL.

CloudMonitor pushes an alert notification to the specified callback URL by sending an HTTP POST request. Only the HTTP protocol is supported.

https://www.aliyun.com

NotifyType

integer

The alert notification methods. Valid values:

  • 2: Alert notifications are sent by using emails and DingTalk chatbots.

  • 1: Alert notifications are sent by using emails and DingTalk chatbots.

  • 0: Alert notifications are sent by using emails and DingTalk chatbots.

1

EscalationList

object

escalationList

array<object>

The trigger conditions of the alert rule.

object

Value

string

The alert threshold.

400

MetricName

string

The name of the metric. Valid values:

  • HttpStatus

  • HttpLatency

  • TelnetStatus

  • TelnetLatency

  • PingLostRate

HttpStatus

Operator

string

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

  • >

  • >=

  • <

  • <=

  • =

=

Times

string

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

3

Aggregate

string

The method used to calculate metric values that trigger alerts. Valid values:

  • Value: the value of the HTTP status code

  • Average: the average HTTP response time

  • Value: the value of the Telnet status code

  • TelnetLatency: the average Telnet response time

  • Average: the average Ping packet loss rate

Value

TargetList

object

Target

array<object>

The monitored resources.

object

Id

string

The ID of the resource that triggers the alert.

1

Arn

string

The Alibaba Cloud Resource Name (ARN) of the function.

Format: arn:acs:${Service}:${Region}:${Account}:${ResourceType}/${ResourceId}. Fields:

  • Service: the service code

  • Region: the region ID

  • Account: the ID of the Alibaba Cloud account

  • ResourceType: the resource type

  • ResourceId: the resource ID.

acs:mns:cn-hangzhou:17754132319*****:/queues/test/messages

Level

string

The alert level. Valid values:

  • INFO

  • WARN

  • CRITICAL

INFO

JsonParams

string

The JSON-formatted parameters of the alert callback.

{"key1":"value1"}

Examples

Success response

JSON format

{
  "Code": "200",
  "Message": "The specified resource is not found.",
  "RequestId": "4A288E86-45C3-4858-9DB0-6D85B10BD92A",
  "Total": 1,
  "Success": true,
  "TaskList": {
    "NodeTaskConfig": [
      {
        "TaskType": "HTTP",
        "GroupName": "Group_ECS",
        "GroupId": 12345,
        "TaskName": "ecs_instance",
        "Disabled": false,
        "TaskScope": "GROUP",
        "Id": 123456,
        "Instances": {
          "Instance": [
            "i-abcdefgh12****"
          ]
        },
        "TaskOption": {
          "HttpMethod": "GET",
          "Interval": 60,
          "HttpURI": "https://www.aliyun.com",
          "TelnetOrPingHost": "ssh.aliyun.com",
          "HttpResponseCharset": "UTF-8",
          "HttpPostContent": "params1=paramsValue1",
          "HttpNegative": true,
          "HttpKeyword": "OK"
        },
        "AlertConfig": {
          "SilenceTime": 86400,
          "EndTime": 22,
          "StartTime": 0,
          "WebHook": "https://www.aliyun.com",
          "NotifyType": 1,
          "EscalationList": {
            "escalationList": [
              {
                "Value": "400",
                "MetricName": "HttpStatus",
                "Operator": "=",
                "Times": "3",
                "Aggregate": "Value"
              }
            ]
          },
          "TargetList": {
            "Target": [
              {
                "Id": "1",
                "Arn": "acs:mns:cn-hangzhou:17754132319*****:/queues/test/messages",
                "Level": "INFO",
                "JsonParams": "{\"key1\":\"value1\"}"
              }
            ]
          }
        }
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 ParameterInvalid Illegal parameters.
500 InternalError The request processing has failed due to some unknown error.
403 AccessForbidden User not authorized to operate on the specified resource.
404 ResourceNotFound The specified resource is not found. The specified resource is not found.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.