Queries the resources that are associated with a specified alert rule.
This operation supports only Message Service (MNS) resources.
This topic provides an example of how to query the resources that are associated with
the ae06917_75a8c43178ab66****
alert rule.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeMetricRuleTargets |
The operation that you want to perform. Set the value to DescribeMetricRuleTargets. |
RuleId | String | Yes | ae06917_75a8c43178ab66**** |
The ID of the alert rule. For more information about how to query alert rule IDs, see DescribeMetricRuleList. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | 200 |
The HTTP status code. Note The value 200 indicates that the call was successful.
|
Message | String | User not authorized to operate on the specified resource. |
The returned message. |
RequestId | String | 786E92D2-AC66-4250-B76F-F1E2FCDDBA1C |
The ID of the request. |
Success | Boolean | true |
Indicates whether the call was successful. Valid values:
|
Targets | Array of Target |
The information about the resources that trigger the alert. |
|
Target | |||
Arn | String | acs:mns:cn-hangzhou:111:/queues/test/message |
The Alibaba Cloud Resource Name (ARN) of the resource, in the format of
|
Id | String | 1 |
The ID of the resource that triggers the alert. |
Level | String | ["INFO", "WARN", "CRITICAL"] |
The level of the alert. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeMetricRuleTargets
&RuleId=ae06917_75a8c43178ab66****
&<Common request parameters>
Sample success responses
XML
format
<DescribeMetricRuleTargetsResponse>
<RequestId>84E79DD9-4330-420E-8C17-E6273C9942B0</RequestId>
<Code>200</Code>
<Success>true</Success>
</DescribeMetricRuleTargetsResponse>
JSON
format
{
"RequestId": "84E79DD9-4330-420E-8C17-E6273C9942B0",
"Code": "200",
"Success": true
}
Error codes
For a list of error codes, visit the API Error Center.