Deleting Log Ingestion Configurations¶
Function¶
This API is used to delete log ingestion configurations.
URI¶
DELETE /v3/{project_id}/lts/access-config
Parameter  | Mandatory  | Type  | Description  | 
|---|---|---|---|
project_id  | Yes  | String  | Project ID. For details about how to obtain a project ID, see Obtaining the Account Tenant ID, Project Resource Set ID, Log Group ID, and Log Stream ID. Minimum: 32 Maximum: 32  | 
Request 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  | 
Parameter  | Mandatory  | Type  | Description  | 
|---|---|---|---|
access_config_id_list  | Yes  | Array of strings  | Ingestion configuration ID list. Minimum: 36 Maximum: 36  | 
Response Parameters¶
Status code: 200
Parameter  | Type  | Description  | 
|---|---|---|
result  | Array of AccessConfigInfo objects  | Ingestion configuration list.  | 
total  | Long  | Total number of ingestion configurations.  | 
Parameter  | Type  | Description  | 
|---|---|---|
access_config_id  | String  | Ingestion configuration ID.  | 
access_config_name  | String  | Ingestion configuration name.  | 
access_config_type  | String  | Ingestion configuration type. The value AGENT indicates host log ingestion.  | 
create_time  | Long  | Creation time.  | 
access_config_detail  | AccessConfigDeatilResponse object  | Ingestion configuration details.  | 
log_info  | AccessConfigQueryLogInfo object  | Log details.  | 
host_group_info  | AccessConfigHostGroupIdList object  | Host group ID list.  | 
access_config_tag  | Array of accessConfigTagResponse objects  | Tag information.  | 
log_split  | Boolean  | Log splitting.  | 
binary_collect  | Boolean  | Binary collection.  | 
cluster_id  | String  | CCE cluster ID  | 
Parameter  | Type  | Description  | 
|---|---|---|
paths  | Array of strings  | Collection paths.  | 
black_paths  | Array of strings  | Collection path blacklist.  | 
format  | AccessConfigFormatCreate object  | Log format.  | 
windows_log_info  | Windows event logs.  | |
stdout  | Boolean  | Standard output switch. This parameter is used only for CCE log ingestion.  | 
stderr  | Boolean  | Standard error switch. This parameter is used only for CCE log ingestion.  | 
pathType  | String  | CCE log ingestion type. This parameter is used only for CCE log ingestion.  | 
namespaceRegex  | String  | Regular expression matching of Kubernetes namespaces. This parameter is used only for CCE log ingestion.  | 
podNameRegex  | String  | Regular expression matching of Kubernetes pods. This parameter is used only for CCE log ingestion.  | 
containerNameRegex  | String  | Regular expression matching of Kubernetes container names. This parameter is used only for CCE log ingestion.  | 
includeLabels  | Map<String,String>  | Container label whitelist. You can create up to 30 whitelists. The key names must be unique. This parameter is used only for CCE log ingestion.  | 
excludeLabels  | Map<String,String>  | Container label blacklist. You can create up to 30 blacklists. The key names must be unique. This parameter is used only for CCE log ingestion.  | 
includeEnvs  | Map<String,String>  | Environment variable whitelist. You can create up to 30 whitelists. The key names must be unique. This parameter is used only for CCE log ingestion.  | 
excludeEnvs  | Map<String,String>  | Environment variable blacklist. You can create up to 30 blacklists. The key names must be unique. This parameter is used only for CCE log ingestion.  | 
logLabels  | Map<String,String>  | Container label. You can create up to 30 labels. The key names must be unique. This parameter is used only for CCE log ingestion.  | 
logEnvs  | Map<String,String>  | Environment variable label. You can create up to 30 labels. The key names must be unique. This parameter is used only for CCE log ingestion.  | 
includeK8sLabels  | Map<String,String>  | Kubernetes label whitelist. You can create up to 30 whitelists. The key names must be unique. This parameter is used only for CCE log ingestion.  | 
excludeK8sLabels  | Map<String,String>  | Kubernetes label blacklist. You can create up to 30 blacklists. The key names must be unique. This parameter is used only for CCE log ingestion.  | 
logK8s  | Map<String,String>  | Kubernetes label. You can create up to 30 labels. The key names must be unique. This parameter is used only for CCE log ingestion.  | 
Parameter  | Type  | Description  | 
|---|---|---|
single  | Single-line logs.  | |
multi  | Multi-line logs.  | 
Parameter  | Type  | Description  | 
|---|---|---|
mode  | String  | Single-line logs. system indicates the system time, whereas wildcard indicates the time wildcard.  | 
value  | String  | Log time.If mode is system, the value is the current timestamp.If mode is wildcard, the value is a time wildcard, which is used by ICAgent to look for the log printing time as the beginning of a log event. If the time format in a log event is 2019-01-01 23:59:59, the time wildcard is YYYY-MM-DD hh:mm:ss. If the time format in a log event is 19-1-1 23:59:59, the time wildcard is YY-M-D hh:mm:ss.  | 
Parameter  | Type  | Description  | 
|---|---|---|
mode  | String  | Single-line logs. time indicates a time wildcard is used to detect log boundaries, whereas regular indicates that a regular expression is used.  | 
value  | String  | Log time.If mode is regular, the value is a regular expression.If mode is time, the value is a time wildcard, which is used by ICAgent to look for the log printing time as the beginning of a log event. If the time format in a log event is 2019-01-01 23:59:59, the time wildcard is YYYY-MM-DD hh:mm:ss. If the time format in a log event is 19-1-1 23:59:59, the time wildcard is YY-M-D hh:mm:ss.  | 
Parameter  | Type  | Description  | 
|---|---|---|
categorys  | Array of strings  | Type of Windows event logs to be collected. 
  | 
time_offset  | AccessConfigTimeOffset object  | Offset from first collection time.  | 
event_level  | Array of strings  | Event level. 
  | 
Parameter  | Type  | Description  | 
|---|---|---|
offset  | Long  | Time offset. When unit is day, the value ranges from 1 to 7. When unit is hour, the value ranges from 1 to 168. When unit is sec, the value ranges from 1 to 604800.  | 
unit  | String  | Unit of the time offset. 
  | 
Parameter  | Type  | Description  | 
|---|---|---|
log_group_id  | String  | Log group ID.  | 
log_stream_id  | String  | Log stream ID.  | 
log_group_name  | String  | Log group name.  | 
log_stream_name  | String  | Log stream name.  | 
log_group_name_alias  | String  | Log group alias.  | 
log_stream_name_alias  | String  | Log stream alias.  | 
Parameter  | Type  | Description  | 
|---|---|---|
host_group_id_list  | Array of strings  | List of host group IDs.  | 
Parameter  | Type  | Description  | 
|---|---|---|
key  | String  | Tag key.  | 
value  | String  | Tag value.  | 
Status code: 400
Parameter  | Type  | Description  | 
|---|---|---|
error_code  | String  | Error code  | 
error_msg  | String  | Error description  | 
Status code: 500
Parameter  | Type  | Description  | 
|---|---|---|
error_code  | String  | Error code  | 
error_msg  | String  | Error description  | 
Example Requests¶
Deleting Log Ingestion Configurations
DELETE https://{endpoint}/v3/{project_id}/lts/access-config
/v3/{project_id}/lts/access-config
{"access_config_id_list":["xxxx","xxxx"]}
Example Responses¶
Status code: 200
Ingestion configurations deleted.
{
  "result" : [ {
    "access_config_detail" : {
      "black_paths" : [ "/wjy/hei/tesxxx", "/wjy/hei/tesxxx" ],
      "format" : {
        "single" : {
          "mode" : "wildcard",
          "value" : "1111"
        }
      },
      "paths" : [ "/wjy/tesxxx", "/wjy/texxx", "/wjyxxxxx" ],
      "windows_log_info" : {
        "categorys" : [ "System", "Application", "Security", "Setup" ],
        "event_level" : [ "information", "warning", "error", "critical", "verbose" ],
        "time_offset" : {
          "offset" : 168,
          "unit" : "hour"
        }
      }
    },
    "access_config_id" : "aa58d29e-21a9-4761-ba16-8xxxxx",
    "access_config_name" : "CollectionWjyxxxxxt2",
    "access_config_tag" : [ {
      "key" : "xxx",
      "value" : "xxx"
    }, {
      "key" : "xxx1",
      "value" : "xxx1"
    } ],
    "access_config_type" : "AGENT",
    "create_time" : 1635043645628,
    "host_group_info" : {
      "host_group_id_list" : [ "de4dbed4-a3bc-4877-a7ee-0xxxxxx6" ]
    },
    "log_info" : {
      "log_group_id" : "9a7e2183-2d6d-4732-9a9b-e89xxxxx0",
      "log_group_name" : "lts-groupxxxxxka",
      "log_stream_id" : "c4de0538-53e6-41fd-b951-a8xxxxx58d7",
      "log_stream_name" : "lts-topic-txxxxx"
    }
  } ],
  "total" : 1
}
Status code: 400
Invalid request. Modify the request based on the description in error_msg before a retry.
{
  "error_code" : "LTS.1807",
  "error_msg" : "Invalid access config id"
}
Status code: 500
The server has received the request but encountered an internal error.
{
  "error_code" : "LTS.0010",
  "error_msg" : "The system encountered an internal error"
}
Status Codes¶
Status Code  | Description  | 
|---|---|
200  | Ingestion configurations deleted.  | 
400  | Invalid request. Modify the request based on the description in error_msg before a retry.  | 
500  | The server has received the request but encountered an internal error.  | 
Error Codes¶
See Error Codes.