You can call this operation to enable one-click alert for a service.

Debugging

You can use API Explorer to perform debugging. API Explorer allows you to perform various operations to simplify API usage. For example, you can retrieve APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
Action String Yes EnableActiveMetricRule

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

Product String Yes ecs

The name of the service that supports one-click alert. Valid values:

  • ecs (Elastic Compute Service)
  • rds (ApsaraDB for RDS)
  • slb (Server Load Balancer)
  • redis_standard (ApsaraDB for Redis standard version)
  • redis_sharding (ApsaraDB for Redis cluster version)
  • redis_splitrw (ApsaraDB for Redis read/write splitting version)
  • mongodb (ApsaraDB for MongoDB replica set instances)
  • mongodb_sharding (ApsaraDB for MongoDB sharded clusters)
  • hbase (ApsaraDB for HBase)
  • elasticsearch (Elasticsearch)
  • opensearch (Open Search)

Response parameters

Parameter Type Example Description
Code String 200

The status code. A value of 200 indicates that the call is successful.

Message String success

The error message.

RequestId String F82E6667-7811-4BA0-842F-5B2DC42BBAAD

The request ID for troubleshooting.

Success Boolean true

Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call has failed.

Examples

Sample requests


http(s)://[Endpoint]/? Action=EnableActiveMetricRule
&Product=ecs
&<Common request parameters>

Successful response examples

XML format

<EnableActiveMetricRuleResponse>
  <Code>200</Code>
  <Success>true</Success> 
  <Message>success</Message>
  <RequestId>55850888-9CCE-4FD5-B949-5F8947D63929</RequestId>
</EnableActiveMetricRuleResponse>

JSON format

{
	"Message":"success",
	"RequestId":"55850888-9CCE-4FD5-B949-5F8947D63929",
	"Success":true,
	"Code":"200"
}

Error code

View error codes