All Products
Search
Document Center

Cloud Monitor:DescribeSiteMonitorList

Last Updated:Jan 26, 2026

Queries site monitoring tasks.

Operation description

本文将提供一个示例,查询当前账号的站点监控任务列表。返回结果显示,当前账号存在一条站点监控记录HanZhou_ECS2

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:DescribeSiteMonitorList

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TaskId

string

No

The ID of the site monitoring task.

a1ecd34a-8157-44d9-b060-14950837****

TaskType

string

No

The protocol that is used by the site monitoring task. Valid values: HTTP, PING, TCP, UDP, DNS, SMTP, POP3, and FTP.

HTTP

Keyword

string

No

The keyword to be matched.

Note

You can search for tasks by name or address. Fuzzy search is supported.

site

Page

integer

No

The page number. Default value: 1.

1

PageSize

integer

No

The number of entries per page. Default value: 10.

10

TaskState

string

No

The task status. Valid values:

  • 1: The task is enabled.

  • 2: The task is disabled.

1

AgentGroup

string

No

Task network type. Valid values:

  • PC: Cable Network

  • MOBILE: Mobile Cellular Network

  • FC: Alibaba Cloud VPC Network

PC

关于公共请求参数的详情,请参见公共参数

Response elements

Element

Type

Description

Example

object

None.

RequestId

string

The request ID.

A80DB41C-AF6C-50E1-ADB5-66DCBA3D266B

Success

string

Indicates whether the request was successful. Valid values:

  • true

  • false

true

Code

string

The status code.

Note

The status code 200 indicates that the request was successful.

200

Message

string

The returned message.

successful

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page.

10

TotalCount

integer

The total number of entries returned.

1

SiteMonitors

object

SiteMonitor

array<object>

The site monitoring tasks that are returned.

array<object>

TaskType

string

The protocol that is used by the site monitoring task. Valid values: HTTP, PING, TCP, UDP, DNS, SMTP, POP3, and FTP.

TCP

UpdateTime

string

The time when the site monitoring task was updated.

2022-03-08 17:14:31

Interval

string

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

1

TaskState

string

The task status. Valid values:

  • 1: The task is enabled.

  • 2: The task is disabled.

1

CreateTime

string

The time when the site monitoring task was created.

2021-11-01 11:05:18

TaskName

string

The name of the site monitoring task.

新的探测任务

Address

string

The URL or IP address that is monitored by the site monitoring task.

https://aliyun.com

TaskId

string

The ID of the site monitoring task.

f5783760-1b39-4b6b-80e8-453d962a****

OptionsJson

object

The extended options of the site monitoring task. The options vary based on the specified protocol. For more information, see CreateSiteMonitor.

password

string

The password of the SMTP, POP3, or FTP protocol.

123****

request_format

string

The format of the HTTP request. Valid values:

  • hex: hexadecimal

  • txt: text

hex

response_content

string

The response to the HTTP request.

  • Hexadecimal format: If the request content is a byte string and cannot be represented in printable characters, you can convert the byte string to printable characters in the hexadecimal format. If you convert the byte string to printable characters in the hexadecimal format, one byte is converted to two hexadecimal characters. For example, (byte)1 is converted to 01 and (byte)27 is converted to 1B. If the request content is a binary array in the Java format, for example, {(byte)1, (byte)27}, you can convert the binary array to 011b or 011B. Hexadecimal characters are not case-sensitive in site monitoring tasks. You can enter 011B in the request content and set the request_format parameter to hex.

  • Text format: Common text refers to strings that consist of printable characters.

cf0f85

failure_rate

number

The packet loss rate.

Note

This parameter is returned only if the TaskType parameter is set to PING.

0.5

time_out

integer

The timeout period. Unit: milliseconds.

3000

header

string

The header of the HTTP request. An HTTP header is a key-value pair in which the key and the value are separated by a colon (:). The format is key1:value1. Each HTTP header occupies a line.

testKey:testValue

cookie

string

The cookie of the HTTP request.

lang=en

port

integer

The port number of the TCP, UDP, SMTP, or POP3 protocol.

80

ping_num

integer

The number of hops for the PING protocol.

20

authentication

integer

Indicates whether the security authentication feature is enabled. Valid values:

  • 0: The feature is enabled.

  • 1: The feature is disabled.

1

http_method

string

The HTTP request method. Valid values:

  • get

  • post

  • head

get

match_rule

integer

Indicates whether the alert rule is included. Valid values:

  • 0: The alert rule is included.

  • 1: The alert rule is not included.

0

dns_match_rule

string

The relationship between the list of expected aliases or IP addresses and the list of DNS results. Valid values:

  • IN_DNS: The list of expected values is a subset of the list of DNS results.

  • DNS_IN: The list of DNS results is a subset of the list of expected values.

  • EQUAL: The list of DNS results is the same as the list of expected values.

  • ANY: The list of DNS results intersects with the list of expected values.

IN_DNS

request_content

string

The content of the HTTP request.

cf0f85

username

string

The username of the FTP, SMTP, or POP3 protocol.

testUser

response_format

string

The format of the HTTP response. Valid values:

  • hex: hexadecimal

  • txt: text

hex

dns_type

string

The type of the DNS record. This parameter is returned only if the TaskType parameter is set to DNS. Valid values:

  • A (default): a record that specifies an IP address related to the specified host name or domain name.

  • CNAME: a record that maps multiple domain names to a domain name.

  • NS: a record that specifies a DNS server used to parse domain names.

  • MX: a record that links domain names to the address of a mail server.

  • TXT: a record that stores the text information of host name or domain names. The text must be 1 to 512 bytes in length. The TXT record serves as a Sender Policy Framework (SPF) record to fight against spam.

  • AAAA: a record that maps a domain name to the relevant IPv6 address.

A

dns_server

string

The domain name or IP address of the DNS server.

192.168.XX.XX

enable_operator_dns

boolean

Indicates whether the DNS server of the carrier is used.

  • true (default): The DNS server of the carrier is used.

  • false: The DNS server of the carrier is not used. The default DNS server or the specified DNS server is used.

true

attempts

integer

The number of retries after a DNS failure occurred.

3

protocol

string

The protocol type of DNS detection. Valid values:

  • udp (default)

  • tcp

  • tcp-tls

udp

proxy_protocol

boolean

Indicates whether the PROXY protocol is enabled. Valid values:

  • false (default): The PROXY protocol is disabled.

  • true: The PROXY protocol is enabled.

false

acceptable_response_code

string

The acceptable status code.

Note

We recommend that you configure assertions.

400

isBase64Encode

string

Indicates whether the password is decoded by using the Base64 algorithm. Valid values:

  • true: The password is decoded by using the Base64 algorithm.

  • false (default): The password is not decoded by using the Base64 algorithm.

false

cert_verify

boolean

Indicates whether the certificate is verified. Valid values:

  • false (default): The certificate is not verified.

  • true: The certificate is verified.

false

unfollow_redirect

boolean

Indicates whether redirects are followed if the status code 301 or 302 is returned. Valid values:

  • true: Redirects are not followed.

  • false (default): Redirects are followed.

false

diagnosis_mtr

boolean

Indicates whether MTR is automatically used to diagnose network issues if a task fails. Valid values:

  • false (default): MTR is not automatically used to diagnose network issues if a task fails.

  • true: MTR is automatically used to diagnose network issues if a task fails.

false

diagnosis_ping

boolean

Indicates whether ping requests are automatically sent to detect network latency if a detection task fails. Valid values:

  • false (default): Ping requests are not automatically sent to detect network latency if a detection task fails.

  • true: Ping requests are automatically sent to detect network latency if a detection task fails.

false

retry_delay

integer

The number of times a failed detection request is retried.

1

assertions

object

assertions

array<object>

The assertions.

object

property

string

The parsing path of the assertion.

  • If the assertion type is body_json, the path is json path.

  • If the assertion type is body_xml, the path is xml path.

json path

type

string

The assertion type. Valid values:

  • response_time: checks whether the response time meets expectations.

  • status_code: checks whether the HTTP status code meets expectations.

  • header: checks whether the fields in the response header meet expectations.

  • body_text: checks whether the content in the response body meets expectations by using text matching.

  • body_json: checks whether the content in the response body meets expectations by using JSON parsing (JSONPath).

  • body_xml: checks whether the content in the response body meets expectations by using XML parsing (XPath).

response_time

operator

string

The comparison operator of the assertion. Valid values:

  • contains: contains

  • doesNotContain: does not contain

  • matches: matches regular expressions

  • doesNotMatch: does not match regular expressions

  • is: equal to a numeric value or matches a character

  • isNot: not equal to

  • lessThan: less than

  • moreThan: greater than

lessThan

target

string

The numeric value or character used for matching.

1000

AgentGroup

string

The detection point type. Valid values:

  • PC

  • MOBILE

PC

Examples

Success response

JSON format

{
  "RequestId": "A80DB41C-AF6C-50E1-ADB5-66DCBA3D266B",
  "Success": "true",
  "Code": "200",
  "Message": "successful",
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 1,
  "SiteMonitors": {
    "SiteMonitor": [
      {
        "TaskType": "TCP",
        "UpdateTime": "2022-03-08 17:14:31",
        "Interval": "1",
        "TaskState": "1",
        "CreateTime": "2021-11-01 11:05:18",
        "TaskName": "新的探测任务",
        "Address": "https://aliyun.com",
        "TaskId": "f5783760-1b39-4b6b-80e8-453d962a****",
        "OptionsJson": {
          "password": "123****",
          "request_format": "hex",
          "response_content": "cf0f85",
          "failure_rate": 0.5,
          "time_out": 3000,
          "header": "testKey:testValue",
          "cookie": "lang=en",
          "port": 80,
          "ping_num": 20,
          "authentication": 1,
          "http_method": "get",
          "match_rule": 0,
          "dns_match_rule": "IN_DNS",
          "request_content": "cf0f85",
          "username": "testUser",
          "response_format": "hex",
          "dns_type": "A",
          "dns_server": "192.168.XX.XX",
          "enable_operator_dns": true,
          "attempts": 3,
          "protocol": "udp",
          "proxy_protocol": false,
          "acceptable_response_code": "400",
          "isBase64Encode": "false",
          "cert_verify": false,
          "unfollow_redirect": false,
          "diagnosis_mtr": false,
          "diagnosis_ping": false,
          "retry_delay": 1,
          "assertions": {
            "assertions": [
              {
                "property": "json path",
                "type": "response_time",
                "operator": "lessThan",
                "target": "1000"
              }
            ]
          }
        },
        "AgentGroup": "PC"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidQueryParameter %s
401 AccessDeniedException You donot have sufficient access to perform this action.
500 %s %s
500 InternalError %s
402 LimitExceeded The quota for this customer had been reached.
403 Forbidden You are not authorized to operate the specified resource. No permission, please use RAM to authorize
503 %s %s
406 ExceedingQuota Exceeding quota limits. The number of tasks exceeds the limit
429 ThrottlingException The request was denied due to request throttling.
409 %s %s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.