Queries the resources that are associated with a specified alert rule.


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****.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 HTTP status code.

Note The status code 200 indicates that the call was successful.
Message String User not authorized to operate on the specified resource.

The error message.

RequestId String 786E92D2-AC66-4250-B76F-F1E2FCDDBA1C

The ID of the request.

Success Boolean true

Indicates whether the call was successful. Valid values:

  • true: The call was successful.
  • false: The call failed.
Targets Array of Target

The information about 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: acs:{Service name abbreviation}:{regionId}:{userId}:/{Resource type}/{Resource name}/message. Example: acs:mns:cn-hangzhou:120886317861****:/queues/test123/message. Fields:

  • {Service name abbreviation}: the abbreviation of the service name. Valid value: mns.
  • {userId}: the ID of the Alibaba Cloud account.
  • {regionId}: the region ID of the message queue or topic.
  • {Resource type}: the type of the resource for which alerts are triggered. Valid values: - **queues** - **topics** {Resource name}: the name of the resource. - If the resource type is set to **queues**, the resource name is the name of the message queue. - If the resource type is set to **topics**, the resource name is the name of the topic.
Id String 1

The ID of the resource for which alerts are triggered.

JsonParams String {"customField1":"value1","customField2":"$.name"}

The parameters of the alert callback. The parameters are in the JSON format.

Level String ["INFO", "WARN", "CRITICAL"]

The level of the alert. Valid values:

  • INFO: information
  • WARN: warning
  • CRITICAL: critical


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

	"RequestId": "786E92D2-AC66-4250-B76F-F1E2FCDDBA1C",
	"Code": "200",
	"Success": true

Error codes

For a list of error codes, visit the API Error Center.