lts__ListStructuredLogsWithTimeRange
Query structured logs from a specified log stream within a time range using an SQL statement, returning results in key-value or row format.
Instructions
[LTS] 该接口用于查询指定日志流下的结构化日志内容(新版)。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"format": "<format>",
"log_stream_id": "<log_stream_id>",
"project_id": "<project_id>",
"query": "<query>",
"time_range": "<time_range>"
},
"name": "lts__ListStructuredLogsWithTimeRange"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | sql语句字符串。 | |
| format | Yes | 查询结果格式。当前仅支持:"k-v"。 | |
| project_id | Yes | 项目ID,获取方式请参见:获取账号ID、项目ID、日志组ID、日志流ID(https://support.huaweicloud.com/api-lts/lts_api_0006.html)。 | None |
| time_range | Yes | 时间范围信息。 | |
| log_stream_id | Yes | 日志流id,获取方式请参见:获取账号ID、项目ID、日志组ID、日志流ID(https://support.huaweicloud.com/api-lts/lts_api_0006.html)。 | None |
| whether_to_rows | No | 返回数据格式,是否为行数据,默认为false。 |