Enables one or more alert rules.

Debugging

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 EnableMetricRules

The operation that you want to perform. Set the value to EnableMetricRules.

RuleId.N String Yes GroupProcess_67800278_2FE7D515-4BBD-447B-BC1A-3F17ED49****

The ID of the alert rule.

Valid values of N: 1 to 100.

For information about how to obtain the ID of an alert rule, see DescribeMetricRuleList.

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 success

The returned message.

RequestId String FF38D33A-67C1-40EB-AB65-FAEE51EDB644

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.

Examples

Sample requests

http(s)://[Endpoint]/?Action=EnableMetricRules
&RuleId=["GroupProcess_67800278_2FE7D515-4BBD-447B-BC1A-3F17ED49****"]
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<EnableMetricRulesResponse>
    <Code>200</Code>
    <Message>success</Message>
    <RequestId>FF38D33A-67C1-40EB-AB65-FAEE51EDB644</RequestId>
    <Success>true</Success>
</EnableMetricRulesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Code" : "200",
  "Message" : "success",
  "RequestId" : "FF38D33A-67C1-40EB-AB65-FAEE51EDB644",
  "Success" : true
}

Error codes

For a list of error codes, see Service error codes.