Help Center/ Application Operations Management/ API Reference/ APIs/ Alarm/ Deleting Metric or Event Alarm Rules

Deleting Metric or Event Alarm Rules

Updated on 2025-01-07 GMT+08:00

Function

This API is used to delete metric or event alarm rules.

Calling Method

For details, see Calling APIs.

URI

DELETE /v4/{project_id}/alarm-rules

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID obtained from IAM. Generally, a project ID contains 32 characters.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token obtained from IAM.

Content-Type

Yes

String

Content type, which is application/json.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

alarm_rules

Yes

Array of strings

Alarm rule name list.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_message

String

Error message.

resources

Array of ItemResult objects

Resource list.

Table 5 ItemResult

Parameter

Type

Description

alarm_rule_name

String

Alarm rule name.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 12

Maximum: 12

error_msg

String

Error message.

Minimum: 0

Maximum: 1024

error_type

String

Error type.

Minimum: 0

Maximum: 128

trace_id

String

Request ID.

Minimum: 32

Maximum: 32

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 12

Maximum: 12

error_msg

String

Error message.

Minimum: 0

Maximum: 1024

error_type

String

Error type.

Minimum: 0

Maximum: 128

trace_id

String

Request ID.

Minimum: 32

Maximum: 32

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

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback