Anda dapat memanggil operasi BatchCreateInstantSiteMonitor untuk membuat sekumpulan tugas pemantauan situs.
Deskripsi operasi
Topik ini menyediakan contoh cara membuat tugas pemantauan situs bernama HangZhou_ECS1. Tugas tersebut menggunakan protokol HTTP untuk memantau https://www.aliyun.com. Respons menunjukkan bahwa tugas berhasil dibuat dengan nama HangZhou_ECS1 dan ID 679fbe4f-b80b-4706-91b2-5427b43e****.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:BatchCreateInstantSiteMonitor |
create |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| TaskList |
array<object> |
Yes |
Daftar tugas pemantauan situs. Catatan
Anda harus membuat setidaknya satu tugas pemantauan situs. Parameter |
|
|
object |
No |
Daftar tugas pemantauan situs. |
||
| Address |
string |
No |
URL atau alamat IP dari tugas pemantauan situs. Catatan
Anda harus membuat setidaknya satu tugas pemantauan situs. Parameter |
https://www.aliyun.com |
| IspCities |
string |
No |
Informasi tentang titik deteksi. Jika Anda membiarkan parameter ini kosong, sistem akan memilih tiga titik deteksi secara acak. Nilai harus berupa Untuk informasi selengkapnya tentang cara memperoleh informasi titik deteksi, lihat DescribeSiteMonitorISPCityList. |
[{"city":"546","isp":"465"},{"city":"572","isp":"465"},{"city":"738","isp":"465"}] |
| OptionsJson |
string |
No |
Opsi ekstensi lanjutan untuk jenis protokol tugas pemantauan situs. Jenis protokol yang berbeda berkorespondensi dengan opsi ekstensi yang berbeda. |
{"time_out":5000} |
| TaskName |
string |
No |
Nama tugas pemantauan situs. Nama tugas pemantauan situs. Catatan
Anda harus membuat setidaknya satu tugas pemantauan situs. Parameter |
HangZhou_ECS1 |
| TaskType |
string |
No |
Jenis protokol tugas pemantauan. Nilai yang valid: HTTP, PING, TCP, UDP, DNS, SMTP, POP3, dan FTP. Catatan
Anda harus membuat setidaknya satu tugas pemantauan situs. Parameter |
HTTP |
Untuk informasi selengkapnya tentang parameter permintaan umum, lihat Parameter umum.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Tidak ada. |
||
| RequestId |
string |
ID permintaan. |
7AE72720-2C96-5446-9F2B-308C7CEDFF1A |
| Message |
string |
Pesan yang dikembalikan. |
successful |
| Success |
boolean |
Menunjukkan apakah operasi berhasil. Nilai yang valid:
|
true |
| Data |
array<object> |
Informasi tentang tugas pemantauan situs. |
[{"taskName": "HangZhou_ECS1", "taskId": "679fbe4f-b80b-4706-91b2-5427b43e****"}] |
|
object |
Informasi tentang tugas pemantauan situs. |
||
| TaskName |
string |
Nama tugas pemantauan situs. |
HangZhou_ECS1 |
| TaskId |
string |
ID tugas pemantauan situs. |
679fbe4f-b80b-4706-91b2-5427b43e**** |
| Code |
string |
Kode status. Catatan
Nilai 200 menunjukkan bahwa permintaan berhasil. |
200 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "7AE72720-2C96-5446-9F2B-308C7CEDFF1A",
"Message": "successful",
"Success": true,
"Data": [
{
"TaskName": "HangZhou_ECS1",
"TaskId": "679fbe4f-b80b-4706-91b2-5427b43e****"
}
],
"Code": "200"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameterValue | Illegal parameters. | |
| 400 | ParameterInvalid | The parameter is missing or invalid. %s | |
| 403 | Forbidden | You are not authorized to operate the specified resource. | |
| 404 | ResourceNotFound | The specified resource is not found. | |
| 429 | ResourceOverLimit | The resource has exceeded the limit. %s |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.