Creates site monitoring tasks.
Operation description
This topic provides an example on how to create a site monitoring task named HangZhou_ECS1
. The URL that is monitored by the task is https://www.aliyun.com
and the type of the task is HTTP
. The returned result shows that the site monitoring task is created. The name of the site monitoring task is HangZhou_ECS1
and the task ID is 679fbe4f-b80b-4706-91b2-5427b43e****
.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
TaskList | object [] | Yes | The site monitoring tasks. Note
You must create at least one site monitoring task. You must specify all of the Address , TaskName , and TaskType parameters in each request.
| |
Address | string | No | The URL or IP address that is monitored by the task. Note
You must create at least one site monitoring task. You must specify all of the Address , TaskName , and TaskType parameters in each request.
| https://www.aliyun.com |
IspCities | string | No | The detection points. If you leave this parameter empty, the system randomly selects three detection points. The value is a For information about how to obtain detection points, see DescribeSiteMonitorISPCityList . | [{"city":"546","isp":"465"},{"city":"572","isp":"465"},{"city":"738","isp":"465"}] |
OptionsJson | string | No | The extended options of the protocol that is used by the site monitoring task. The options vary based on the protocol. | {"time_out":5000} |
TaskName | string | No | The name of the site monitoring task. The name must be 4 to 100 characters in length, and can contain letters, digits, and underscores (_). Note
You must create at least one site monitoring task. You must specify all of the Address , TaskName , and TaskType parameters in each request.
| HangZhou_ECS1 |
TaskType | string | No | The type of the site monitoring task. Valid values: HTTP, PING, TCP, UDP, DNS, SMTP, POP3, and FTP. Note
You must create at least one site monitoring task. You must specify all of the Address , TaskName , and TaskType parameters in each request.
| HTTP |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "7AE72720-2C96-5446-9F2B-308C7CEDFF1A",
"Message": "successful",
"Success": true,
"Data": [
{
"TaskName": "HangZhou_ECS1",
"TaskId": "679fbe4f-b80b-4706-91b2-5427b43e****"
}
],
"Code": "200"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameterValue | Illegal parameters. | Illegal parameters. |
400 | ParameterInvalid | The parameter is missing or invalid. %s | - |
403 | InvalidAuthorization | %s | - |
404 | ResourceNotFound | The specified resource is not found. | The specified resource is not found. |
429 | ResourceOverLimit | The resource has exceeded the limit. %s | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2022-07-21 | Add Operation | see changesets |