Queries event-triggered alert rules.
Operation description
This topic provides an example to show how to query the details of an event-triggered alert rule named testRule.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RuleName |
string |
Yes |
The name of the event-triggered alert rule. |
testRule |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The HTTP status code. Note
The status code 200 indicates that the call was successful. |
200 |
| Message |
string |
The error message. |
The Request is not authorization. |
| RequestId |
string |
The ID of the request. |
87170bc7-e28a-4c93-b9bf-90a1dbe84736 |
| ContactParameters |
object |
||
| ContactParameter |
array<object> |
The information about the recipients if alert notifications are sent to the alert contacts of an alert contact group. |
|
|
object |
|||
| ContactGroupName |
string |
The name of the alert group. |
Default alert notification group |
| Level |
string |
The alert notification methods. Valid values: 4: Alert notifications are sent by using DingTalk chatbots and emails. |
3 |
| Id |
string |
The ID of the recipient. |
1 |
| FcParameters |
object |
||
| FCParameter |
array<object> |
The information about the recipients in Function Compute. |
|
|
object |
|||
| ServiceName |
string |
The name of the Function Compute service. |
service1 |
| FunctionName |
string |
The name of the function. |
fcTest1 |
| Arn |
string |
The Alibaba Cloud Resource Name (ARN) of the function. Format:
|
acs:log:cn-hangzhou::project/cms-log-mon***/logstore/cxxxx*** |
| Id |
string |
The ID of the recipient. |
3 |
| Region |
string |
The region where Function Compute is deployed. |
cn-qingdao |
| MnsParameters |
object |
||
| MnsParameter |
array<object> |
The notifications of Simple Message Queue (formerly MNS) (SMQ). |
|
|
object |
|||
| Queue |
string |
The name of the SMQ queue. |
testQueue |
| Arn |
string |
The ARN of the MNS queue. Format:
|
acs:log:cn-hangzhou::project/cms-log-mon***/logstore/cxxxx*** |
| Region |
string |
The region for SMQ. |
cn-hangzhou |
| Id |
string |
The ID of the recipient. |
2 |
| Topic |
string |
The SMQ topic. |
topic_sample |
| WebhookParameters |
object |
||
| WebhookParameter |
array<object> |
The information about the recipients if alert notifications are sent by sending a request to a callback URL. |
|
|
object |
|||
| Url |
string |
The callback URL. |
http://www.aliyun.com |
| Method |
string |
The HTTP request method. Valid values: GET and POST. |
GET |
| Protocol |
string |
The protocol type. |
HTTP |
| Id |
string |
The ID of the recipient. |
5 |
| SlsParameters |
object |
||
| SlsParameter |
array<object> |
The information about the recipients in Log Service. |
|
|
object |
|||
| Project |
string |
The name of the project. |
project_test |
| LogStore |
string |
The name of the Logstore. |
logstore_test |
| Arn |
string |
The ARN of the Log Service Logstore. Format:
|
acs:log:cn-hangzhou::project/cms-log-mo****/logstore/c*** |
| Region |
string |
The ID of the region where the Log Service project resides. |
cn-hangzhou |
| Id |
string |
The ID of the recipient. |
4 |
| OpenApiParameters |
object |
||
| OpenApiParameters |
array<object> |
The information about the recipients in OpenAPI Explorer. |
|
|
object |
|||
| Action |
string |
The name of the API operation. |
PutLogs |
| Arn |
string |
The ARN of the API operation. Format:
Format:
|
acs:log:cn-hangzhou::project/cms-log-mon***/logstore/cxxxx*** |
| Id |
string |
The ID of the recipient. |
3 |
| Product |
string |
The ID of the cloud service to which the API operation belongs. |
log |
| Region |
string |
The region where the resource resides. |
cn-hangzhou |
| Role |
string |
The name of the role. |
MyRole |
| Version |
string |
The version of the API. |
2019-01-01 |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "The Request is not authorization.",
"RequestId": "87170bc7-e28a-4c93-b9bf-90a1dbe84736",
"ContactParameters": {
"ContactParameter": [
{
"ContactGroupName": "Default alert notification group",
"Level": "3",
"Id": "1"
}
]
},
"FcParameters": {
"FCParameter": [
{
"ServiceName": "service1",
"FunctionName": "fcTest1",
"Arn": "acs:log:cn-hangzhou::project/cms-log-mon***/logstore/cxxxx***",
"Id": "3",
"Region": "cn-qingdao"
}
]
},
"MnsParameters": {
"MnsParameter": [
{
"Queue": "testQueue",
"Arn": "acs:log:cn-hangzhou::project/cms-log-mon***/logstore/cxxxx***",
"Region": "cn-hangzhou",
"Id": "2",
"Topic": "topic_sample"
}
]
},
"WebhookParameters": {
"WebhookParameter": [
{
"Url": "http://www.aliyun.com",
"Method": "GET",
"Protocol": "HTTP",
"Id": "5"
}
]
},
"SlsParameters": {
"SlsParameter": [
{
"Project": "project_test",
"LogStore": "logstore_test",
"Arn": "acs:log:cn-hangzhou::project/cms-log-mo****/logstore/c***",
"Region": "cn-hangzhou",
"Id": "4"
}
]
},
"OpenApiParameters": {
"OpenApiParameters": [
{
"Action": "PutLogs",
"Arn": "acs:log:cn-hangzhou::project/cms-log-mon***/logstore/cxxxx***",
"Id": "3",
"Product": "log",
"Region": "cn-hangzhou",
"Role": "MyRole",
"Version": "2019-01-01"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameterValue | Illegal parameters. | Illegal parameters. |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | AccessForbidden | User not authorized to operate on the specified resource. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.