Updated on 2024-08-29 GMT+08:00

Deleting a Keyword Alarm Rule

Function

This API is used to delete a keyword alarm.

Calling Method

For details, see Calling APIs.

URI

DELETE /v2/{project_id}/lts/alarms/keywords-alarm-rule/{keywords_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.

keywords_alarm_rule_id

Yes

String

Keyword alarm rule ID.

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.

Content-Type

Yes

String

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

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

Deleting a keyword alarm by alarm ID

POST https://{endpoint}/v2/{project_id}/lts/alarms/keywords-alarm-rule/{keywords_alarm_rule_id}

/v2/{project_id}/lts/alarms/keywords-alarm-rule/{keywords_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 update 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.