All Products
Search
Document Center

CloudMonitor:BatchCreateInstantSiteMonitor

Last Updated:Mar 01, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TaskListobject []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.
AddressstringNo

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
IspCitiesstringNo

The detection points. If you leave this parameter empty, the system randomly selects three detection points.

The value is a JSON array. Example: {"city":"546","isp":"465"},{"city":"572","isp":"465"},{"city":"738","isp":"465"}. The values of the city field indicate Beijing, Hangzhou, and Qingdao.

For information about how to obtain detection points, see DescribeSiteMonitorISPCityList .

[{"city":"546","isp":"465"},{"city":"572","isp":"465"},{"city":"738","isp":"465"}]
OptionsJsonstringNo

The extended options of the protocol that is used by the site monitoring task. The options vary based on the protocol.

{"time_out":5000}
TaskNamestringNo

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
TaskTypestringNo

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

ParameterTypeDescriptionExample
object

None.

RequestIdstring

The request ID.

7AE72720-2C96-5446-9F2B-308C7CEDFF1A
Messagestring

The returned message.

successful
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Dataobject []

The information about the site monitoring task.

[{"taskName": "HangZhou_ECS1", "taskId": "679fbe4f-b80b-4706-91b2-5427b43e****"}]
TaskNamestring

The name of the site monitoring task.

HangZhou_ECS1
TaskIdstring

The ID of the site monitoring task.

679fbe4f-b80b-4706-91b2-5427b43e****
Codestring

The HTTP status code.

Note The status code 200 indicates that the request was successful.
200

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400InvalidParameterValueIllegal parameters.Illegal parameters.
400ParameterInvalidThe parameter is missing or invalid. %s-
403InvalidAuthorization%s-
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.
429ResourceOverLimitThe resource has exceeded the limit. %s-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-07-21Add Operationsee changesets