Queries the message resources of an alert rule.
The message resources are Message Notification Service (MNS) resources.
Debugging
Request parameters
Name | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeMetricRuleTargets |
The operation that you want to perform. Set the value to DescribeMetricRuleTargets. |
RuleId | String | Yes | rulIdxxxxx1 |
The ID of the alert rule. |
Response parameters
parameter | Type | Example | Description |
---|---|---|---|
Code | String | 200 |
The status code. The status code 200 indicates a successful request. |
Message | String | Rule does not exist. |
The error message. If the call is successful, no error message is returned. |
RequestId | String | 786E92D2-AC66-4250-B76F-F1E2FCDDBA1C |
The ID of the request. It is used to locate error. |
Success | Boolean | true |
Indicates whether the call was successful. |
Targets | Array |
The message resources. |
|
Target | |||
Arn | String | acs:mns:cn-hangzhou:111:/queues/test/message |
The Alibaba Cloud Resource Name (ARN) of the resource. The format of the ARN is
|
Id | String | 1 |
The ID of the message resource. |
Level | String | ["INFO", "WARN", "CRITICAL"] |
The level of the alert. It is a JSON array. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/? Action=DescribeMetricRuleTargets
&RuleId=rulIdxxxxx1
&<Common request parameters>
Sample success responses
XML
format
<Code>200</Code>
<Success>true</Success>
<RequestId>786E92D2-AC66-4250-B76F-F1E2FCDDBA1C</RequestId>
<Targets>
<Arn>acs:mns:cn-hangzhou:111:/queues/test/message</Arn>
<Id>1</Id>
<Level>INFO</Level>
<Level>WARN</Level>
<Level>CRITICAL</Level>
</Targets>
JSON
format
{
"Code": "200",
"Success": true,
"RequestId": "786E92D2-AC66-4250-B76F-F1E2FCDDBA1C",
"Targets": [
{
"Arn": "acs:mns:cn-hangzhou:111:/queues/test/message",
"Id": 1,
"Level": [
"INFO",
"WARN",
"CRITICAL"
]
}
]
}
Error codes
For a list of error codes, visit the API Error Center.