Todos os produtos
Search
Central de documentação

Cloud Monitor:DescribeSiteMonitorList

Última atualização: Jun 28, 2026

Consulta a lista de tarefas de monitoramento de sites chamando a operação DescribeSiteMonitorList.

Descrição da operação

Este tópico fornece um exemplo de como consultar a lista de tarefas de monitoramento de sites da conta atual. A resposta mostra que a conta atual possui uma tarefa de monitoramento de sites chamada HanZhou_ECS2.

Experimente agora

Experimente esta API no OpenAPI Explorer, sem necessidade de assinatura manual. Chamadas bem-sucedidas geram automaticamente código SDK correspondente aos seus parâmetros. Faça o download com segurança de credenciais integrada para uso local.

Testar

Autorização RAM

A tabela abaixo descreve a autorização necessária para chamar esta API. Você pode defini-la em uma política do Resource Access Management (RAM). As colunas da tabela estão detalhadas abaixo:

  • Ação: As ações que podem ser usadas no elemento Action das instruções de política de permissão do RAM para conceder permissões para executar a operação.

  • API: A API que você pode chamar para executar a ação.

  • Nível de acesso: O nível de acesso predefinido concedido para cada API. Valores válidos: create, list, get, update e delete.

  • Tipo de recurso: O tipo de recurso que suporta autorização para executar a ação. Indica se a ação suporta permissão em nível de recurso. O recurso especificado deve ser compatível com a ação. Caso contrário, a política será ineficaz.

    • Para APIs com permissões em nível de recurso, os tipos de recursos obrigatórios são marcados com um asterisco (*). Especifique o Nome de Recurso Alibaba Cloud (ARN) correspondente no elemento Resource da política.

    • Para APIs sem permissões em nível de recurso, é exibido como Todos os Recursos. Use um asterisco (*) no elemento Resource da política.

  • Chave de condição: As chaves de condição definidas pelo serviço. A chave permite controle granular, aplicando-se somente a ações ou a ações associadas a recursos específicos. Além das chaves de condição específicas do serviço, o Alibaba Cloud fornece um conjunto de chaves de condição comuns aplicáveis a todos os serviços compatíveis com RAM.

  • Ação dependente: As ações dependentes necessárias para executar a ação. Para concluir a ação, o usuário RAM ou a função RAM deve ter permissões para executar todas as ações dependentes.

Ação

Nível de acesso

Tipo de recurso

Chave de condição

Ação dependente

cms:DescribeSiteMonitorList

get

*All Resource

*

Nenhuma Nenhuma

Parâmetros da solicitação

Parâmetro

Tipo

Obrigatório

Descrição

Exemplo

TaskId

string

Não

O ID da tarefa de monitoramento de sites.

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

TaskType

string

Não

O tipo da tarefa de monitoramento de sites. O CloudMonitor oferece suporte aos seguintes tipos: HTTP, PING, TCP, UDP, DNS, SMTP, POP3 e FTP.

HTTP

Keyword

string

Não

A palavra-chave usada para pesquisar tarefas de monitoramento de sites.

Nota

Há suporte para correspondência aproximada com base no nome ou no endereço da tarefa.

site

Page

integer

Não

O número da página. Valor padrão: 1.

1

PageSize

integer

Não

O número de entradas por página. Valor padrão: 10.

10

TaskState

string

Não

O status da tarefa. Valores válidos:

  • 1: Normal.

  • 2: Desativada.

1

AgentGroup

string

Não

O tipo de pontos de detecção usados pela tarefa. Valores válidos:

  • PC: Pontos de detecção baseados em PC.

  • MOBILE: Pontos de detecção baseados em dispositivos móveis.

  • FC: Pontos de detecção internos.

PC

Para obter mais informações sobre parâmetros de solicitação comuns, consulte Parâmetros comuns.

Elementos de resposta

Elemento

Tipo

Descrição

Exemplo

object

Nenhum.

RequestId

string

O ID da solicitação.

A80DB41C-AF6C-50E1-ADB5-66DCBA3D266B

Success

string

Indica se a operação foi bem-sucedida. Valores válidos:

  • true: Bem-sucedida.

  • false: Falha.

true

Code

string

O código de status HTTP.

Nota

O valor 200 indica sucesso.

200

Message

string

A mensagem retornada.

successful

PageNumber

integer

O número da página.

1

PageSize

integer

O número de entradas por página.

10

TotalCount

integer

O número total de entradas.

1

SiteMonitors

object

SiteMonitor

array<object>

A lista de tarefas de monitoramento de sites.

array<object>

Nenhum.

TaskType

string

The type of the site monitoring task. CloudMonitor supports the following types: HTTP, PING, TCP, UDP, DNS, SMTP, POP3, and FTP.

TCP

UpdateTime

string

The time when the site monitoring task was last updated.

2022-03-08 17:14:31

Interval

string

The monitoring interval. Unit: minutes.

1

TaskState

string

The task status. Valid values:

  • 1: Normal.

  • 2: Disabled.

1

CreateTime

string

The time when the task was created.

2021-11-01 11:05:18

TaskName

string

The name of the site monitoring task.

New monitoring task

Address

string

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

https://aliyun.com

TaskId

string

The ID of the site monitoring task.

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

OptionsJson

object

The extended options. Each monitoring type has different extended options. For more information, see CreateSiteMonitor.

password

string

The password for the SMTP, POP3, or FTP monitoring type.

123****

request_format

string

The format of the HTTP request content. Valid values:

  • hex: hexadecimal format.

  • txt: text format.

hex

response_content

string

The matched response content.

  • Hexadecimal format: When the request content is a byte string that cannot be represented by printable characters, you can convert the byte string to a hexadecimal string. The conversion rule is as follows: each byte is converted to a two-character hexadecimal representation. For example, 1 byte (1B) is converted to 01 in hexadecimal, and 27 bytes (27B) is converted to 1B in hexadecimal. The binary array (in Java format) {(byte)1, (byte)27} is converted to 011b or 011B in hexadecimal. Site monitoring is case-insensitive for hexadecimal values. Enter the string 011B in the request content and set the request content format to hexadecimal.

  • Text format: plain text, which is a string composed of printable characters.

cf0f85

failure_rate

number

The packet loss rate.

Nota

This parameter is applicable only to the PING monitoring type.

0.5

time_out

integer

The timeout period. Unit: milliseconds.

3000

header

string

The HTTP request header. The format is key1:value1. Multiple headers are separated by line breaks.

testKey:testValue

cookie

string

The cookie text for the HTTP request.

lang=en

port

integer

The port for the TCP, UDP, SMTP, or POP3 monitoring type.

80

ping_num

integer

The number of PING attempts.

20

authentication

integer

Specifies whether security authentication is enabled. Valid values:

  • 0: Enabled.

  • 1: Disabled.

1

http_method

string

The HTTP request method. Valid values:

  • get

  • post

  • head.

get

match_rule

integer

Specifies whether alert rules are included. Valid values:

  • 0: Included.

  • 1: Not included.

0

dns_match_rule

string

The DNS matching rule. Valid values:

  • IN_DNS: The expected aliases or IP addresses are all included in the DNS response.

  • DNS_IN: All DNS responses are included in the expected aliases or IP addresses.

  • EQUAL: The DNS response exactly matches the expected aliases or IP addresses.

  • ANY: The DNS response and the expected aliases or IP addresses have an intersection.

IN_DNS

request_content

string

The HTTP request content.

cf0f85

username

string

The username for the FTP, SMTP, or POP3 monitoring type.

testUser

response_format

string

The format of the HTTP response content. Valid values:

  • hex: hexadecimal format.

  • txt: text format.

hex

dns_type

string

The DNS resolution type. This parameter is applicable only to the DNS monitoring type. Valid values:

  • A (default): specifies the IP address that corresponds to the hostname or domain name.

  • CNAME: maps multiple domain names to another domain name.

  • NS: specifies the DNS server that resolves the domain name.

  • MX: points the domain name to a mail server address.

  • TXT: the description of the hostname or domain name. The text length is limited to 512 bytes. This type is typically used for Sender Policy Framework (SPF) records for anti-spam purposes.

  • AAAA: the DNS record that resolves a domain name to an IPv6 address.

A

dns_server

string

The domain name or IP address of the specified DNS server.

192.168.XX.XX

enable_operator_dns

boolean

Specifies whether to use the carrier DNS. Valid values:

  • true (default): Uses the carrier DNS.

  • false: Does not use the carrier DNS. Uses the default DNS or the DNS of the specified server.

true

attempts

integer

The number of retries after a DNS failure.

3

protocol

string

The DNS protocol type. Valid values:

  • udp (default)

  • tcp

  • tcp-tls.

udp

proxy_protocol

boolean

Specifies whether ProxyProtocol is enabled. Valid values:

  • false (default): ProxyProtocol is disabled.

  • true: ProxyProtocol is enabled.

false

acceptable_response_code

string

The acceptable status codes.

Nota

Use assertion configurations instead.

400

isBase64Encode

string

Specifies whether to store the password after Base64 decoding. Valid values:

  • true: Stores the password after Base64 decoding.

  • false (default): Does not store the password after Base64 decoding.

false

cert_verify

boolean

Specifies whether to verify the certificate. Valid values:

  • false (default): Skips certificate verification.

  • true: Verifies the certificate.

false

unfollow_redirect

boolean

Specifies whether to follow redirects when a 301 or 302 status code is returned. Valid values:

  • true: Does not follow redirects.

  • false (default): Follows redirects.

false

diagnosis_mtr

boolean

Specifies whether to enable automatic MTR network diagnostics after a task failure. Valid values:

  • false (default): Disables automatic MTR network diagnostics.

  • true: Enables automatic MTR network diagnostics.

false

diagnosis_ping

boolean

Specifies whether to enable automatic Ping network latency detection after a monitoring task failure. Valid values:

  • false (default): Disabled.

  • true: Enabled.

false

retry_delay

integer

The number of retries after a monitoring failure.

1

assertions

object

assertions

array<object>

The assertion configuration group.

object

The assertion configuration group.

property

string

The parsing path for the assertion content.

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

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

json path

type

string

The assertion type. Valid values:

  • response_time: determines whether the response time meets expectations.

  • status_code: determines whether the HTTP response status code meets expectations.

  • header: determines whether a field in the response header meets expectations.

  • body_text: determines whether the response body content meets expectations through text character matching.

  • body_json: determines whether the response body content meets expectations through JSON parsing (JSON Path).

  • body_xml: determines whether the response body content meets expectations through XML parsing (XPath).

response_time

operator

string

The assertion comparison operator. Valid values:

  • contains: contains.

  • doesNotContain: does not contain.

  • matches: matches a regular expression.

  • doesNotMatch: does not match a regular expression.

  • is: equals (numeric or string).

  • isNot: does not equal.

  • lessThan: less than.

  • moreThan: greater than.

lessThan

target

string

The target value or string for assertion comparison.

1000

AgentGroup

string

The type of detection point. Valid values:

  • PC: PC-based.

  • MOBILE: mobile-based.

PC

Exemplos

Resposta de sucesso

JSON formato

{
  "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": "New monitoring task",
        "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"
      }
    ]
  }
}

Códigos de erro

Código de status HTTP

Código de erro

Mensagem de erro

Descrição

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

Consulte Códigos de Erro para uma lista completa.

Notas de versão

Consulte Notas de Versão para uma lista completa.