BatchCreateInstantSiteMonitor

Updated at:

Creates multiple site monitoring tasks in a batch.

Operation description

This topic provides an example of creating a site monitoring task named HangZhou_ECS1. The monitored address of the task is https://www.aliyun.com, and the monitoring type is HTTP. The response shows that the site monitoring task is created. The name of the task is HangZhou_ECS1, and the ID is 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, and you must specify Address, TaskName, and TaskType.

object

No

The site monitoring task.

Address

string

No

The URL or IP address of the site monitoring task.

Note

You must create at least one site monitoring task, and you must specify Address, TaskName, and TaskType.

https://www.aliyun.com

IspCities

string

No

The detection point information. If this parameter is left empty, the system randomly selects three detection points.

The format is JSONArray. Example: [{"city":"546","isp":"465"},{"city":"572","isp":"465"},{"city":"738","isp":"465"}], which correspond 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 for detection tasks correspond to different extension options.

{"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, underscores (_), and Chinese characters.

Note

You must create at least one site monitoring task, and you must specify Address, TaskName, and TaskType.

HangZhou_ECS1

TaskType

string

No

The monitoring type of the site monitoring task.

The supported monitoring types include HTTP, PING, TCP, UDP, DNS, SMTP, POP3, and FTP.

Note

You must create at least one site monitoring task, and you must specify Address, TaskName, and TaskType.

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 is successful. Valid values:

  • true: Successful.

  • false: Failed.

true

Data

array<object>

The site monitoring task information.

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

object

The site monitoring task information.

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 success.

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 The parameter is missing or invalid.
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 The quantity limit has been exceeded.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.