Creates one or more site monitoring tasks.

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. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes BatchCreateInstantSiteMonitor

The operation that you want to perform. Set the value to BatchCreateInstantSiteMonitor.

TaskList.N.Address String No https://www.aliyun.com

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.
TaskList.N.IspCities String No [{"city":"546","isp":"465"},{"city":"572","isp":"465"},{"city":"738","isp":"465"}]

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.

TaskList.N.OptionsJson String No {"time_out":5000}

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

TaskList.N.TaskName String No HangZhou_ECS1

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.
TaskList.N.TaskType String No HTTP

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.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String 7AE72720-2C96-5446-9F2B-308C7CEDFF1A

The ID of the request.

Message String successful

The returned message.

Success Boolean true

Indicates whether the call was successful. Valid values:

  • true: The call was successful.
  • false: The call failed.
Data Array of Data

The information about the site monitoring task.

TaskName String HangZhou_ECS1

The name of the site monitoring task.

TaskId String 679fbe4f-b80b-4706-91b2-5427b43e****

The ID of the site monitoring task.

Code String 200

The HTTP status code.

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

Examples

Sample requests

http(s)://[Endpoint]/?Action=BatchCreateInstantSiteMonitor
&TaskList=[{"Address":"https://www.aliyun.com","TaskName":"HangZhou_ECS1","TaskType":"HTTP"}]
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<BatchCreateInstantSiteMonitorResponse>
    <RequestId>7AE72720-2C96-5446-9F2B-308C7CEDFF1A</RequestId>
    <Message>successful</Message>
    <Data>
        <taskName>HangZhou_ECS1</taskName>
        <taskId>679fbe4f-b80b-4706-91b2-5427b43e****</taskId>
    </Data>
    <Code>200</Code>
    <Success>true</Success>
</BatchCreateInstantSiteMonitorResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "7AE72720-2C96-5446-9F2B-308C7CEDFF1A",
  "Message" : "successful",
  "Data" : [ {
    "taskName" : "HangZhou_ECS1",
    "taskId" : "679fbe4f-b80b-4706-91b2-5427b43e****"
  } ],
  "Code" : "200",
  "Success" : true
}

Error codes

HTTP status code Error code Error message Description
400 ParameterInvalid The parameter is missing or invalid. %s The error message returned because the parameter is not specified or the specified parameter is invalid.
404 ResourceNotFound The specified resource is not found. The error message returned because the specified resource is not found.
429 ResourceOverLimit The resource has exceeded the limit. %s The error message returned because the number of resources exceeds the upper limit.

For a list of error codes, see Service error codes.