Deleting Metric or Event Alarm Rules
Function
This API is used to delete AOM 2.0 metric or event alarm rules.
Calling Method
For details, see Calling APIs.
URI
DELETE /v4/{project_id}/alarm-rules
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID, which can be obtained from the console or by calling an API. For details, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. For details, see Obtaining a Token. |
Content-Type |
Yes |
String |
Message body type or format. Content type, which is application/json. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
alarm_rules |
Yes |
Array of strings |
Alarm rule name list. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_message |
String |
Error message. |
resources |
Array of ItemResult objects |
Resource list. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
error_type |
String |
Error type. |
trace_id |
String |
Request ID. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
error_type |
String |
Error type. |
trace_id |
String |
Request ID. |
Example Requests
-
Delete a metric or event alarm rule.
https://{Endpoint}/v4/{project_id}/alarm-rules { "alarm_rules" : [ "aom_alarm_rule" ] }
-
Delete multiple metric or event alarm rules.
https://{Endpoint}/v4/{project_id}/alarm-rules { "alarm_rules" : [ "aom_alarm_rule", "aom_alarm_rule2" ] }
Example Responses
Status code: 200
OK: The request is successful.
{ "error_code" : "200", "error_message" : "success", "resources" : [ { "alarm_rule_name" : "aom_alarm_rule" } ] }
Status code: 400
Bad Request: Invalid request. The client should not repeat this request without modification.
{ "error_code" : "AOM.02024016", "error_msg" : "delete alarm rule name is empty", "trace_id" : "" }
Status code: 500
Internal Server Error: The server is able to receive the request but unable to understand the request.
{ "error_code" : "APM.00000500", "error_msg" : "Internal Server Error", "trace_id" : "" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK: The request is successful. |
400 |
Bad Request: Invalid request. The client should not repeat this request without modification. |
500 |
Internal Server Error: The server is able to receive the request but unable to understand the request. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.