获取日志投递详情GetLogShipper
更新时间:2025-02-07
描述
查看指定投递任务详情信息
请求
- 请求语法
Http
1GET /v1/logshipper/{logShipperID} HTTP/1.1
2Host: bls-log.{region}.baidubce.com
3Authorization: authorization string
- 请求头域
除公共请求头域外,无其它特殊头域。
- 请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 描述 |
---|---|---|---|---|
logShipperID | string | yes | path | 任务ID |
响应
- 响应头域
除公共响应头域外,无其它特殊头域。
- 响应参数
参数名称 | 类型 | 是否可以为空 | 描述 |
---|---|---|---|
status | string | no | 运行状态, 可为运行中(Running)、异常(Abnormal)、已暂停(Paused) |
logShipperName | string | no | 投递任务名称 |
project | string | no | 日志组名称 |
logStoreName | string | no | 日志集名称 |
startTime | string | no | 指定投递开始时间 |
destType | string | no | 目的端类型 |
destConfig | DestConfig | no | 目标配置详情 |
DestConfig结构:
参数名称 | 类型 | 描述 |
---|---|---|
BOSPath | string | BOSPath为Bucket加用户自定义路径组成 |
partitionFormatTS | string | 分区格式,如%Y/%m/%d/%H/%M/ |
partitionFormatLogStream | bool | 是否使用logstream作为partition层级,默认false |
maxObjectSize | int64 | 最大对象大小,单位MB |
compressType | string | 压缩类型,可选参数:snappy/gzip/bzip2/lzop和不压缩(none) |
deliverInterval | int | 投递间隔,单位分钟,限制范围为5~60的整数 |
storageFormat | string | 存储格式,可选参数: parquet, json, csv |
csvHeadline | bool | csv时是否投递字段名称 |
csvDelimiter | string | csv时的分隔符,可选:逗号(,),空格( )、竖线(|)、制表符(\t) |
csvQuote | string | csv时的引用符,可选:单引号('),双引号("),空(none),可自定义 |
nullIdentifier | string | csv时,列为空时,填写的指定内容 |
selectedColumnName | string | csv和parquet时,选择的列名, 逗号分割的列名参数 |
selectedColumnType | string | parquet时,选择的列类型,逗号分割的列类型参数 |
错误码
除了通用的错误码,还可能出现如下错误码:
错误码 | 错误消息 | 描述 | HTTP状态码 |
---|---|---|---|
LogStoreNotFound | LogStore [logStoreName] not exists | LogStore 不存在 | 404 |
注:错误消息中 [logStoreName] 部分会用具体的名称来替换
示例
- 请求示例
Http
1GET /v1/logshipper/2323-2333 HTTP/1.1
2Host: bls-log.bj.baidubce.com
3Authorization:bce-auth-v1/18717522d39411e9b721df098b0b908c/2019-09-10T07:00:20Z/1800/content-type;host;x-bce-date;x-bce-request-id/6a7cb6c9ac7ec156c805e55e7d0bcfc443b47feee97cf099c1c0d93a0b4c8304
4Content-Type: application/json; charset=utf-8
- 响应示例
Http
1HTTP/1.1 200
2Content-Type: application/json; charset=utf-8
3{
4 "status":"Running",
5 "logShipperName":"shipper1",
6 "project":"default",
7 "logStoreName":"logstore1",
8 "startTime":"2021-01-12T01:01:00Z",
9 "destType":"BOS",
10 "destConfig":{
11 "BOSPath":"bucket1/path/",
12 "partitionFormatTS":"%Y/%m/%d/%H/%M/",
13 "partitionFormatLogStream":true,
14 "maxObjectSize":50,
15 "compressType":"snappy",
16 "deliverInterval":30,
17 "storageFormat":"csv",
18 "csvHeadline":false,
19 "csvSeparator":",",
20 "csvQuote":"\"",
21 "selectedColumnName":"v1,v2",
22 "selectedColumnType":"string,int32",
23 "nullIdentifier":"null"
24 }
25}