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

Deleting an Ingestion Rule

Function

This API is used to delete a rule of ingesting container logs from AOM to LTS.

Calling Method

For details, see Calling APIs.

URI

DELETE /v2/{project_id}/lts/aom-mapping

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.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

id

Yes

String

Ingestion rule ID.

Request Parameters

Table 3 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: 200

Table 4 Response body parameters

Parameter

Type

Description

[items]

Array of strings

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

code

String

Error code.

details

String

Error message.

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

message

Message401 object

Response message.

Table 7 Message401

Parameter

Type

Description

code

String

Error code.

details

String

Error message.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

Deleting an ingestion rule

DELETE /v2/{project_id}/lts/aom-mapping?id={id}

DELETE https://{endpoint}/v2/{project_id}/lts/aom-mapping?id=3e14a212-a633-411d-a8e1-dc4042b1471a

Example Responses

Status code: 400

Bad Request: The request is invalid. Modify the request based on the description in error_msg before a retry.

{
  "errorCode" : "LTS.0014",
  "errorMessage" : "Operation DB failed"
}

Status code: 401

AuthFailed. Authentication failed. Check the token and try again.

{
  "error_code" : "LTS.0414",
  "error_msg" : "Invalid token"
}

Status code: 403

Forbidden.The request has been rejected.The server has received the request and understood it, but refuses to respond to it. The client should not repeat the request without modifications.

{
  "error_code" : "LTS.0003",
  "error_msg" : "parse_token_failed"
}

Status code: 500

InternalServerError.

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

{
  "error_code" : "LTS.0102",
  "error_msg" : "ServiceUnavailable."
}

Status Codes

Status Code

Description

200

The ingestion rule is deleted.

400

Bad Request: The request is invalid. Modify the request based on the description in error_msg before a retry.

401

AuthFailed. Authentication failed. Check the token and try again.

403

Forbidden.The request has been rejected.The server has received the request and understood it, but refuses to respond to it. The client should not repeat the request without modifications.

500

InternalServerError.

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

Error Codes

See Error Codes.