Updated on 2025-06-27 GMT+08:00

Deleting an Alarm Template

Function

This API is used to delete an alarm template.

Calling Method

For details, see Calling APIs.

URI

DELETE /v4/{project_id}/alarm-rules-template

Table 1 Path Parameters

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

Table 2 Request header 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.

Enterprise-Project-Id

No

String

Enterprise project ID. For details, see Obtaining an Enterprise Project ID.

  • To delete instances in an enterprise project, enter the enterprise project ID.

  • If this parameter is not specified, the instances in enterprise project 0 are deleted by default.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

alarm_rule_templates

Yes

Array of strings

Alarm template ID list.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

resources

Array of DeleteAlarmRuleTemplateItemResult objects

Alarm template status list.

Table 5 DeleteAlarmRuleTemplateItemResult

Parameter

Type

Description

alarm_rule_template_name

String

Alarm template ID.

Status code: 400

Table 6 Response body parameters

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 an alarm template.

https://{Endpoint}/v4/{project_id}/alarm-rules-template

{
  "alarm_rule_templates" : [ "12427*****340773893" ]
}

Example Responses

Status code: 200

OK: The request is successful.

{
  "error_code" : "200",
  "error_message" : "success",
  "resources" : [ {
    "alarm_rule_template_name" : "12427*****340773893"
  } ]
}

Status code: 400

Bad Request: Invalid request. The client should not repeat this request without modification.

{
  "error_code" : "AOM.02018002",
  "error_msg" : "no template to be deleted is found!",
  "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.

Error Codes

See Error Codes.