Mengkueri saluran notifikasi aturan alert tertentu dengan memanggil operasi DescribeMetricRuleTargets.
Deskripsi operasi
Catatan penggunaan
Topik ini menyediakan contoh untuk mengkueri sumber daya target yang terkait dengan aturan alert ae06917_75a8c43178ab66****.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:DescribeMetricRuleTargets |
list |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RuleId |
string |
Yes |
ID aturan alert. Untuk informasi tentang cara mendapatkan ID aturan alert, lihat DescribeMetricRuleList. |
ae06917_75a8c43178ab66**** |
Untuk informasi selengkapnya tentang parameter permintaan umum, lihat Parameter umum.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
Kode status. Catatan
Nilai 200 menunjukkan keberhasilan. |
200 |
| Message |
string |
Paket error. |
User not authorized to operate on the specified resource. |
| RequestId |
string |
ID permintaan. |
786E92D2-AC66-4250-B76F-F1E2FCDDBA1C |
| Success |
boolean |
Apakah operasi berhasil. Nilai valid:
|
true |
| Targets |
object |
||
| Target |
array<object> |
Target pemicu alert. |
|
|
object |
Target pemicu alert. |
||
| Id |
string |
The ID of the resource for which alerts are triggered. |
1 |
| Arn |
string |
The Alibaba Cloud Resource Name (ARN) of the resource. Format:
|
acs:mns:cn-hangzhou:120886317861****:/queues/test/message |
| Level |
string |
The level of the alert. Valid values:
|
INFO |
| JsonParams |
string |
The parameters of the alert callback. The parameters are in the JSON format. |
{"customField1":"value1","customField2":"$.name"} |
Contoh
Respons sukses
JSONformat
{
"Code": "200",
"Message": "User not authorized to operate on the specified resource.",
"RequestId": "786E92D2-AC66-4250-B76F-F1E2FCDDBA1C",
"Success": true,
"Targets": {
"Target": [
{
"Id": "1",
"Arn": "acs:mns:cn-hangzhou:120886317861****:/queues/test/message",
"Level": "INFO",
"JsonParams": "{\"customField1\":\"value1\",\"customField2\":\"$.name\"}"
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameterValue | %s | |
| 400 | %s | %s | |
| 500 | InternalError | %s | |
| 403 | AccessForbidden | User not authorized to operate on the specified resource. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.