All Products
Search
Document Center

Cloud Monitor:BatchCreateInstantSiteMonitor

Last Updated:Dec 23, 2025

You can call the BatchCreateInstantSiteMonitor operation to create a batch of site monitoring tasks.

Operation description

This topic provides an example of how to create a site monitoring task named HangZhou_ECS1. The task uses the HTTP protocol to monitor https://www.aliyun.com. The response shows that the task is successfully created with the name HangZhou_ECS1 and the ID 679fbe4f-b80b-4706-91b2-5427b43e****.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cms:BatchCreateInstantSiteMonitor

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TaskList

array<object>

Yes

The list of site monitoring tasks.

Note

You must create at least one site monitoring task. The Address, TaskName, and TaskType parameters are required.

object

No

The list of site monitoring tasks.

Address

string

No

The URL or IP address of the site monitoring task.

Note

You must create at least one site monitoring task. The Address, TaskName, and TaskType parameters are required.

https://www.aliyun.com

IspCities

string

No

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

The value must be a JSONArray. For example, [{"city":"546","isp":"465"},{"city":"572","isp":"465"},{"city":"738","isp":"465"}] corresponds to Beijing, Hangzhou, and Qingdao.

For more information about how to obtain detection point information, see DescribeSiteMonitorISPCityList.

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

OptionsJson

string

No

The advanced extension options for the protocol type of the site monitoring task. Different protocol types correspond to different extension options.

{"time_out":5000}

TaskName

string

No

The name of the site monitoring task.

The name of the site monitoring task.

Note

You must create at least one site monitoring task. The Address, TaskName, and TaskType parameters are required.

HangZhou_ECS1

TaskType

string

No

The protocol type of the monitoring task.

Valid values: HTTP, PING, TCP, UDP, DNS, SMTP, POP3, and FTP.

Note

You must create at least one site monitoring task. The Address, TaskName, and TaskType parameters are required.

HTTP

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

Response elements

Element

Type

Description

Example

object

None.

RequestId

string

The request ID.

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

Message

string

The returned message.

successful

Success

boolean

Indicates whether the operation was successful. Valid values:

  • true: The operation was successful.

  • false: The operation failed.

true

Data

array<object>

The information about the site monitoring tasks.

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

object

The information about the site monitoring tasks.

TaskName

string

The name of the site monitoring task.

HangZhou_ECS1

TaskId

string

The ID of the site monitoring task.

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

Code

string

The status code.

Note

A value of 200 indicates that the request was successful.

200

Examples

Success response

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 Forbidden You are not authorized to operate the specified resource. No permission, please use RAM to authorize
404 ResourceNotFound The specified resource is not found. The specified resource is not found.
429 ResourceOverLimit The resource has exceeded the limit. %s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.