云日志服务 LTS-查询日志接入:响应示例

时间:2023-12-15 10:06:59

响应示例

状态码: 200

查询日志接入列表请求响应成功

{
  "result" : [ {
    "access_config_detail" : {
      "containerNameRegex" : "my",
      "excludeEnvs" : {
        "h" : "8"
      },
      "excludeK8sLabels" : {
        "e" : "5"
      },
      "excludeLabels" : {
        "b" : "2"
      },
      "format" : {
        "single" : {
          "mode" : "system",
          "value" : "1678969382000"
        }
      },
      "includeEnvs" : {
        "g" : "7"
      },
      "includeK8sLabels" : {
        "d30" : "4"
      },
      "includeLabels" : {
        "a" : "1"
      },
      "logEnvs" : {
        "i" : "9"
      },
      "logK8s" : {
        "f" : "6"
      },
      "logLabels" : {
        "c" : "3"
      },
      "namespaceRegex" : "default",
      "pathType" : "container_stdout",
      "paths" : [ ],
      "podNameRegex" : "abc",
      "stderr" : false,
      "stdout" : true
    },
    "access_config_id" : "c3152f88-8b06-4f7f-bbbe-129512f49f87",
    "access_config_name" : "myapinew322",
    "access_config_tag" : [ {
      "key" : "my01",
      "value" : "001"
    }, {
      "key" : "my02",
      "value" : "002"
    } ],
    "access_config_type" : "K8S_CCE",
    "binary_collect" : false,
    "create_time" : 1684467787996,
    "host_group_info" : {
      "host_group_id_list" : [ "12b0bbd1-4eda-456b-a641-647aa66bdeab" ]
    },
    "log_info" : {
      "log_group_id" : "9575cb24-290c-478e-a5db-88d6d1dc513b",
      "log_group_name" : "my-group",
      "log_stream_id" : "3581bee9-8698-476e-a0ba-b0f310ed99cf",
      "log_stream_name" : "lts-topic-api"
    },
    "log_split" : false
  }, {
    "access_config_detail" : {
      "containerNameRegex" : "my",
      "excludeEnvs" : {
        "h" : "8"
      },
      "excludeK8sLabels" : {
        "e" : "5"
      },
      "excludeLabels" : {
        "b" : "2"
      },
      "format" : {
        "single" : {
          "mode" : "system",
          "value" : "1678969382000"
        }
      },
      "includeEnvs" : {
        "g" : "7"
      },
      "includeK8sLabels" : {
        "d10" : "4",
        "d" : "4",
        "d12" : "4",
        "d11" : "4",
        "d14" : "4",
        "d13" : "4",
        "d16" : "4",
        "d15" : "4",
        "d18" : "4",
        "d17" : "4",
        "d1" : "4",
        "d2" : "4",
        "d3" : "4",
        "d4" : "4",
        "d5" : "4",
        "d6" : "4",
        "d7" : "4",
        "d8" : "4",
        "d9" : "4"
      },
      "includeLabels" : {
        "a" : "1"
      },
      "logEnvs" : {
        "i" : "9"
      },
      "logK8s" : {
        "f" : "6"
      },
      "logLabels" : {
        "c" : "3"
      },
      "namespaceRegex" : "default",
      "pathType" : "container_stdout",
      "paths" : [ ],
      "podNameRegex" : "abc",
      "stderr" : false,
      "stdout" : true
    },
    "access_config_id" : "550cd738-7b16-4724-9c59-aba61bf16528",
    "access_config_name" : "myapinew32",
    "access_config_tag" : [ {
      "key" : "my01",
      "value" : "001"
    }, {
      "key" : "my02",
      "value" : "002"
    } ],
    "access_config_type" : "K8S_CCE",
    "binary_collect" : false,
    "create_time" : 1684463134956,
    "host_group_info" : {
      "host_group_id_list" : [ "12b0bbd1-4eda-456b-a641-647aa66bdeab" ]
    },
    "log_info" : {
      "log_group_id" : "9575cb24-290c-478e-a5db-88d6d1dc513b",
      "log_group_name" : "my-group",
      "log_stream_id" : "3581bee9-8698-476e-a0ba-b0f310ed99cf",
      "log_stream_name" : "lts-topic-api"
    },
    "log_split" : false
  } ],
  "total" : 2
}

状态码: 400

非法请求 建议根据error_msg直接修改该请求。

{
  "error_code" : "LTS.1807",
  "error_msg" : "Invalid access config name"
}

状态码: 500

表明服务端能被请求访问到,但是服务内部出错。

{
  "error_code" : "LTS.0010",
  "error_msg" : "The system encountered an internal error"
}
support.huaweicloud.com/api-lts/ListAccessConfig.html