Memanggil operasi PutCustomEventRule untuk membuat aturan peringatan untuk event kustom.
Deskripsi operasi
Before you call this operation, you must call the PutCustomEvent operation to report the monitoring data of the custom event. For more information, see PutCustomEvent.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:PutCustomEventRule |
create |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| GroupId |
string |
Yes |
ID kelompok aplikasi. Untuk informasi tentang cara mendapatkan ID, lihat DescribeCustomEventAttribute. Catatan
Nilai 0 menunjukkan bahwa event kustom yang dilaporkan tidak termasuk dalam kelompok aplikasi mana pun. |
7378**** |
| RuleId |
string |
Yes |
ID aturan peringatan. Catatan
Jika ID aturan peringatan sudah ada, aturan peringatan akan dimodifikasi. Jika ID aturan peringatan tidak ada, aturan peringatan akan dibuat. |
CustomRuleId1 |
| RuleName |
string |
Yes |
Nama aturan peringatan. |
CustomeRule |
| EventName |
string |
Yes |
Nama event kustom. Untuk informasi tentang cara mendapatkan nama, lihat DescribeCustomEventAttribute. |
HostDown |
| ContactGroups |
string |
Yes |
Kelompok kontak peringatan. Pisahkan beberapa kelompok kontak dengan koma (,). |
ECS_Group |
| Webhook |
string |
No |
URL callback tempat permintaan POST dikirim saat peringatan dipicu. |
https://www.aliyun.com |
| EffectiveInterval |
string |
No |
Periode pengatur waktu saat aturan peringatan berlaku. Nilai valid: 00:00-23:59. |
00:00-23:59 |
| Period |
string |
No |
Periode agregasi data pemantauan untuk event kustom. Unit: detik. Nilai harus 60 atau kelipatan 60. Nilai default: 300. |
60 |
| EmailSubject |
string |
No |
Subjek email peringatan. |
ECS instance |
| Threshold |
string |
Yes |
Ambang batas peringatan. |
99 |
| Level |
string |
Yes |
Tingkat peringatan. Nilai valid:
|
CRITICAL |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The status code. Catatan
The value 200 indicates that the call was successful. |
200 |
| Message |
string |
The error message. |
The request has failed due to a temporary failure of the server. |
| RequestId |
string |
The ID of the request. |
AD5DCD82-BD1C-405F-BAED-32302DE9F498 |
| Success |
boolean |
Indicates whether the call was successful. Valid values:
|
true |
Contoh
Respons sukses
JSONformat
{
"Code": "200",
"Message": "The request has failed due to a temporary failure of the server.",
"RequestId": "AD5DCD82-BD1C-405F-BAED-32302DE9F498",
"Success": true
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | %s | %s | |
| 499 | %s | %s | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 204 | %s | %s | |
| 403 | %s | %s | |
| 206 | %s | %s | |
| 404 | %s | %s | |
| 503 | %s | %s | |
| 406 | %s | %s |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.