Queries site monitoring tasks.
Operation description
This topic provides an example on how to query all the site monitoring tasks of your Alibaba Cloud account. In this example, the returned result indicates that the Alibaba Cloud account has one site monitoring task named HanZhou_ECS2
.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cms:DescribeSiteMonitorList | get |
|
| 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 |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
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. | - |
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 |
406 | ExceedingQuota | Exceeding quota limits. | - |
409 | %s | %s | - |
429 | ThrottlingException | The request was denied due to request throttling. | - |
500 | InternalError | %s | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-05-22 | The Error code has changed. The response structure of the API has changed | View Change Details |
2021-09-16 | API Description Update. The Error code has changed. The response structure of the API has changed | View Change Details |