All Products
Search
Document Center

CloudMonitor:DescribeMetricRuleCount

Last Updated:Mar 01, 2024

Queries the number of alert rules in each state.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
NamespacestringNo

The namespace of the service. For more information, see Appendix 1: Metrics.

acs_ecs_dashboard
MetricNamestringNo

The name of the metric. For more information, see Appendix 1: Metrics.

cpu_total

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The HTTP status code.

Note The status code 200 indicates that the call was successful.
200
Messagestring

The returned message.

The Request is not authorization.
RequestIdstring

The ID of the request.

FF38D33A-67C1-40EB-AB65-FAEE51EDB644
Successboolean

Indicates whether the call was successful. Valid values:

  • true: The call was successful.
  • false: The call failed.
true
MetricRuleCountobject

The number of alert rules in each state.

Okinteger

The number of alert rules without active alerts.

40
Nodatainteger

The number of alert rules without data.

0
Disableinteger

The number of disabled alert rules.

0
Totalinteger

The total number of alert rules.

45
Alarminteger

The number of alert rules with active alerts.

5

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "The Request is not authorization.",
  "RequestId": "FF38D33A-67C1-40EB-AB65-FAEE51EDB644",
  "Success": true,
  "MetricRuleCount": {
    "Ok": 40,
    "Nodata": 0,
    "Disable": 0,
    "Total": 45,
    "Alarm": 5
  }
}

Error codes

HTTP status codeError codeError message
400%s%s
402LimitExceededThe quota for this customer had been reached.
429Throttli∂ngExceptionThe request was denied due to request throttling.
500InternalErrorThe request processing has failed due to some unknown error.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history