Queries the resources that are associated with a specified alert rule.
Limits
This operation supports only Message Service (MNS) resources.
Usage notes
This topic provides an example on how to query the resources that are associated with an alert rule whose ID is ae06917_75a8c43178ab66****
.
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 information about how to obtain the ID of an alert rule, see DescribeMetricRuleList. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | 200 | The status code. Note The status code 200 indicates that the request was successful. |
Message | String | User not authorized to operate on the specified resource. | The error message. |
RequestId | String | 786E92D2-AC66-4250-B76F-F1E2FCDDBA1C | The request ID. |
Success | Boolean | true | Indicates whether the request was successful. Valid values:
|
Targets | Array of Target | The information about the resources for which alerts are triggered. |
|
Target | |||
Id | String | 1 | The ID of the resource for which alerts are triggered. |
Arn | String | acs:mns:cn-hangzhou:120886317861****:/queues/test/message | The Alibaba Cloud Resource Name (ARN) of the resource. Format:
|
Level | String | INFO | The alert level. Valid values:
|
JsonParams | String | {"customField1":"value1","customField2":"$.name"} | The parameters of the alert callback. The parameters are in the JSON format. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeMetricRuleTargets
&RuleId=ae06917_75a8c43178ab66****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeMetricRuleTargetsResponse>
<RequestId>786E92D2-AC66-4250-B76F-F1E2FCDDBA1C</RequestId>
<Code>200</Code>
<Success>true</Success>
</DescribeMetricRuleTargetsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "786E92D2-AC66-4250-B76F-F1E2FCDDBA1C",
"Code" : "200",
"Success" : true
}
Error codes
For a list of error codes, see Service error codes.