Updated on 2024-12-20 GMT+08:00

Deleting a SQL Alarm Rule

Function

This API is used to delete a SQL alarm.

Calling Method

For details, see Calling APIs.

URI

DELETE /v2/{project_id}/lts/alarms/sql-alarm-rule/{sql_alarm_rule_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID.

Minimum: 32

Maximum: 32

sql_alarm_rule_id

Yes

String

SQL alarm rule ID.

Minimum: 36

Maximum: 36

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token obtained from IAM. For details about how to obtain a user token, see Obtaining a User Token.

Minimum: 1000

Maximum: 2000

Content-Type

Yes

String

Set this parameter to application/json;charset=UTF-8.

Minimum: 30

Maximum: 30

Response Parameters

Status code: 500

Table 3 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

Delete a SQL alarm by alarm ID

POST https://{endpoint}/v2/{project_id}/lts/alarms/sql-alarm-rule/{sql_alarm_rule_id}

/v2/{project_id}/lts/alarms/sql-alarm-rule/{sql_alarm_rule_id}

Example Responses

Status code: 500

The server has received the request but encountered an internal error.

{
  "error_code" : "LTS.2002",
  "error_msg" : "Failed to delete alarm rule."
}

Status Codes

Status Code

Description

200

The request is successful.

500

The server has received the request but encountered an internal error.

Error Codes

See Error Codes.