tencentcloud-sdk-nodejs 4.0.691 → 4.0.693
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +489 -0
- package/SERVICE_CHANGELOG.md +534 -206
- package/package.json +1 -1
- package/products.md +34 -34
- package/src/common/sdk_version.ts +1 -1
- package/src/services/apm/v20210622/apm_client.ts +17 -0
- package/src/services/apm/v20210622/apm_models.ts +187 -0
- package/src/services/asr/v20190614/asr_models.ts +5 -5
- package/src/services/cam/v20190116/cam_models.ts +1 -1
- package/src/services/car/v20220110/car_client.ts +28 -16
- package/src/services/car/v20220110/car_models.ts +24 -0
- package/src/services/cbs/v20170312/cbs_models.ts +5 -4
- package/src/services/cdb/v20170320/cdb_models.ts +11 -6
- package/src/services/cdn/v20180606/cdn_client.ts +21 -14
- package/src/services/cdn/v20180606/cdn_models.ts +19 -19
- package/src/services/clb/v20180317/clb_client.ts +61 -11
- package/src/services/clb/v20180317/clb_models.ts +259 -64
- package/src/services/cls/v20201016/cls_client.ts +680 -656
- package/src/services/cls/v20201016/cls_models.ts +80 -0
- package/src/services/cpdp/v20190820/cpdp_client.ts +1 -13
- package/src/services/cpdp/v20190820/cpdp_models.ts +35 -113
- package/src/services/cvm/v20170312/cvm_models.ts +2 -2
- package/src/services/cwp/v20180228/cwp_client.ts +52 -2
- package/src/services/cwp/v20180228/cwp_models.ts +343 -46
- package/src/services/cynosdb/v20190107/cynosdb_client.ts +1 -0
- package/src/services/cynosdb/v20190107/cynosdb_models.ts +81 -24
- package/src/services/dasb/v20191018/dasb_client.ts +12 -0
- package/src/services/dasb/v20191018/dasb_models.ts +33 -0
- package/src/services/ess/v20201111/ess_client.ts +25 -21
- package/src/services/ess/v20201111/ess_models.ts +255 -171
- package/src/services/essbasic/v20210526/essbasic_models.ts +12 -7
- package/src/services/iai/v20180301/iai_models.ts +3 -3
- package/src/services/iai/v20200303/iai_models.ts +3 -3
- package/src/services/iss/v20230517/iss_client.ts +21 -7
- package/src/services/iss/v20230517/iss_models.ts +47 -0
- package/src/services/lcic/v20220817/lcic_models.ts +1 -1
- package/src/services/mps/v20190612/mps_models.ts +16 -0
- package/src/services/ocr/v20181119/ocr_models.ts +9 -0
- package/src/services/organization/v20210331/organization_client.ts +18 -6
- package/src/services/organization/v20210331/organization_models.ts +20 -0
- package/src/services/tag/v20180813/tag_client.ts +4 -6
- package/src/services/tag/v20180813/tag_models.ts +60 -22
- package/src/services/thpc/v20230321/thpc_client.ts +5 -1
- package/src/services/thpc/v20230321/thpc_models.ts +119 -63
- package/src/services/trp/v20210515/trp_models.ts +60 -22
- package/src/services/trtc/v20190722/trtc_models.ts +5 -3
- package/src/services/waf/v20180125/waf_client.ts +20 -8
- package/src/services/waf/v20180125/waf_models.ts +122 -52
- package/tencentcloud/common/sdk_version.d.ts +1 -1
- package/tencentcloud/common/sdk_version.js +1 -1
- package/tencentcloud/services/apm/v20210622/apm_client.d.ts +5 -1
- package/tencentcloud/services/apm/v20210622/apm_client.js +6 -0
- package/tencentcloud/services/apm/v20210622/apm_models.d.ts +180 -0
- package/tencentcloud/services/asr/v20190614/asr_models.d.ts +5 -5
- package/tencentcloud/services/cam/v20190116/cam_models.d.ts +1 -1
- package/tencentcloud/services/car/v20220110/car_client.d.ts +11 -7
- package/tencentcloud/services/car/v20220110/car_client.js +15 -9
- package/tencentcloud/services/car/v20220110/car_models.d.ts +22 -0
- package/tencentcloud/services/cbs/v20170312/cbs_models.d.ts +5 -4
- package/tencentcloud/services/cdb/v20170320/cdb_models.d.ts +11 -6
- package/tencentcloud/services/cdn/v20180606/cdn_client.d.ts +14 -7
- package/tencentcloud/services/cdn/v20180606/cdn_client.js +14 -7
- package/tencentcloud/services/cdn/v20180606/cdn_models.d.ts +19 -19
- package/tencentcloud/services/clb/v20180317/clb_client.d.ts +19 -3
- package/tencentcloud/services/clb/v20180317/clb_client.js +27 -3
- package/tencentcloud/services/clb/v20180317/clb_models.d.ts +249 -64
- package/tencentcloud/services/cls/v20201016/cls_client.d.ts +334 -326
- package/tencentcloud/services/cls/v20201016/cls_client.js +420 -408
- package/tencentcloud/services/cls/v20201016/cls_models.d.ts +76 -0
- package/tencentcloud/services/cpdp/v20190820/cpdp_client.d.ts +1 -5
- package/tencentcloud/services/cpdp/v20190820/cpdp_client.js +0 -6
- package/tencentcloud/services/cpdp/v20190820/cpdp_models.d.ts +35 -111
- package/tencentcloud/services/cvm/v20170312/cvm_models.d.ts +2 -2
- package/tencentcloud/services/cwp/v20180228/cwp_client.d.ts +17 -1
- package/tencentcloud/services/cwp/v20180228/cwp_client.js +24 -0
- package/tencentcloud/services/cwp/v20180228/cwp_models.d.ts +333 -46
- package/tencentcloud/services/cynosdb/v20190107/cynosdb_models.d.ts +80 -24
- package/tencentcloud/services/dasb/v20191018/dasb_client.d.ts +5 -1
- package/tencentcloud/services/dasb/v20191018/dasb_client.js +6 -0
- package/tencentcloud/services/dasb/v20191018/dasb_models.d.ts +31 -0
- package/tencentcloud/services/ess/v20201111/ess_client.d.ts +25 -21
- package/tencentcloud/services/ess/v20201111/ess_client.js +25 -21
- package/tencentcloud/services/ess/v20201111/ess_models.d.ts +255 -171
- package/tencentcloud/services/essbasic/v20210526/essbasic_models.d.ts +12 -7
- package/tencentcloud/services/iai/v20180301/iai_models.d.ts +3 -3
- package/tencentcloud/services/iai/v20200303/iai_models.d.ts +3 -3
- package/tencentcloud/services/iss/v20230517/iss_client.d.ts +8 -3
- package/tencentcloud/services/iss/v20230517/iss_client.js +10 -3
- package/tencentcloud/services/iss/v20230517/iss_models.d.ts +44 -0
- package/tencentcloud/services/lcic/v20220817/lcic_models.d.ts +1 -1
- package/tencentcloud/services/mps/v20190612/mps_models.d.ts +16 -0
- package/tencentcloud/services/ocr/v20181119/ocr_models.d.ts +9 -0
- package/tencentcloud/services/organization/v20210331/organization_client.d.ts +7 -3
- package/tencentcloud/services/organization/v20210331/organization_client.js +9 -3
- package/tencentcloud/services/organization/v20210331/organization_models.d.ts +18 -0
- package/tencentcloud/services/tag/v20180813/tag_client.d.ts +0 -2
- package/tencentcloud/services/tag/v20180813/tag_client.js +0 -2
- package/tencentcloud/services/tag/v20180813/tag_models.d.ts +60 -22
- package/tencentcloud/services/thpc/v20230321/thpc_models.d.ts +115 -63
- package/tencentcloud/services/trp/v20210515/trp_models.d.ts +60 -22
- package/tencentcloud/services/trtc/v20190722/trtc_models.d.ts +5 -3
- package/tencentcloud/services/waf/v20180125/waf_client.d.ts +13 -9
- package/tencentcloud/services/waf/v20180125/waf_client.js +14 -8
- package/tencentcloud/services/waf/v20180125/waf_models.d.ts +120 -52
- package/test/apm.v20210622.test.js +10 -0
- package/test/car.v20220110.test.js +18 -8
- package/test/clb.v20180317.test.js +42 -2
- package/test/cls.v20201016.test.js +188 -168
- package/test/cpdp.v20190820.test.js +0 -10
- package/test/cwp.v20180228.test.js +40 -0
- package/test/dasb.v20191018.test.js +10 -0
- package/test/iss.v20230517.test.js +12 -2
- package/test/organization.v20210331.test.js +12 -2
- package/test/waf.v20180125.test.js +10 -0
|
@@ -44,6 +44,7 @@ import {
|
|
|
44
44
|
DescribeShippersRequest,
|
|
45
45
|
CreateScheduledSqlResponse,
|
|
46
46
|
DescribeDashboardsRequest,
|
|
47
|
+
QueryMetricRequest,
|
|
47
48
|
LogItem,
|
|
48
49
|
SearchLogResponse,
|
|
49
50
|
DeleteTopicRequest,
|
|
@@ -93,6 +94,7 @@ import {
|
|
|
93
94
|
DataTransformResouceInfo,
|
|
94
95
|
DeleteMachineGroupRequest,
|
|
95
96
|
FullTextInfo,
|
|
97
|
+
QueryMetricResponse,
|
|
96
98
|
DescribePartitionsResponse,
|
|
97
99
|
DescribeConfigMachineGroupsResponse,
|
|
98
100
|
ModifyAlarmRequest,
|
|
@@ -131,6 +133,7 @@ import {
|
|
|
131
133
|
DeleteConfigResponse,
|
|
132
134
|
ModifyIndexResponse,
|
|
133
135
|
DeleteConsumerRequest,
|
|
136
|
+
QueryRangeMetricResponse,
|
|
134
137
|
DeleteIndexRequest,
|
|
135
138
|
DescribeConsumerResponse,
|
|
136
139
|
SearchLogTopics,
|
|
@@ -147,6 +150,7 @@ import {
|
|
|
147
150
|
CloseKafkaConsumerRequest,
|
|
148
151
|
RuleTagInfo,
|
|
149
152
|
CreateExportRequest,
|
|
153
|
+
QueryRangeMetricRequest,
|
|
150
154
|
DescribeAlarmNoticesResponse,
|
|
151
155
|
DeleteDataTransformRequest,
|
|
152
156
|
DescribeMachineGroupsResponse,
|
|
@@ -277,277 +281,223 @@ export class Client extends AbstractClient {
|
|
|
277
281
|
}
|
|
278
282
|
|
|
279
283
|
/**
|
|
280
|
-
*
|
|
284
|
+
* 修改Kafka协议消费信息
|
|
281
285
|
*/
|
|
282
|
-
async
|
|
283
|
-
req:
|
|
284
|
-
cb?: (error: string, rep:
|
|
285
|
-
): Promise<
|
|
286
|
-
return this.request("
|
|
286
|
+
async ModifyKafkaConsumer(
|
|
287
|
+
req: ModifyKafkaConsumerRequest,
|
|
288
|
+
cb?: (error: string, rep: ModifyKafkaConsumerResponse) => void
|
|
289
|
+
): Promise<ModifyKafkaConsumerResponse> {
|
|
290
|
+
return this.request("ModifyKafkaConsumer", req, cb)
|
|
287
291
|
}
|
|
288
292
|
|
|
289
293
|
/**
|
|
290
|
-
*
|
|
294
|
+
* 本接口用于创建Kafka数据订阅任务
|
|
291
295
|
*/
|
|
292
|
-
async
|
|
293
|
-
req:
|
|
294
|
-
cb?: (error: string, rep:
|
|
295
|
-
): Promise<
|
|
296
|
-
return this.request("
|
|
296
|
+
async CreateKafkaRecharge(
|
|
297
|
+
req: CreateKafkaRechargeRequest,
|
|
298
|
+
cb?: (error: string, rep: CreateKafkaRechargeResponse) => void
|
|
299
|
+
): Promise<CreateKafkaRechargeResponse> {
|
|
300
|
+
return this.request("CreateKafkaRecharge", req, cb)
|
|
297
301
|
}
|
|
298
302
|
|
|
299
303
|
/**
|
|
300
|
-
*
|
|
304
|
+
* 本接口用于获取日志下载任务列表
|
|
301
305
|
*/
|
|
302
|
-
async
|
|
303
|
-
req:
|
|
304
|
-
cb?: (error: string, rep:
|
|
305
|
-
): Promise<
|
|
306
|
-
return this.request("
|
|
306
|
+
async DescribeExports(
|
|
307
|
+
req: DescribeExportsRequest,
|
|
308
|
+
cb?: (error: string, rep: DescribeExportsResponse) => void
|
|
309
|
+
): Promise<DescribeExportsResponse> {
|
|
310
|
+
return this.request("DescribeExports", req, cb)
|
|
307
311
|
}
|
|
308
312
|
|
|
309
313
|
/**
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
本接口用于将日志写入到指定的日志主题。
|
|
320
|
-
|
|
321
|
-
日志服务提供以下两种模式:
|
|
322
|
-
|
|
323
|
-
#### 负载均衡模式
|
|
324
|
-
|
|
325
|
-
系统根据当前日志主题下所有可读写的分区,遵循负载均衡原则自动分配写入的目标分区。该模式适合消费不保序的场景。
|
|
326
|
-
|
|
327
|
-
#### 哈希路由模式
|
|
328
|
-
|
|
329
|
-
系统根据携带的哈希值(X-CLS-HashKey)将数据写入到符合范围要求的目标分区。例如,可以将某个日志源端通过 hashkey 与某个主题分区强绑定,这样可以保证数据在该分区上写入和消费是严格保序的。
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
#### 输入参数(pb二进制流,位于body中)
|
|
334
|
-
|
|
335
|
-
| 字段名 | 类型 | 位置 | 必须 | 含义 |
|
|
336
|
-
| ------------ | ------- | ---- | ---- | ------------------------------------------------------------ |
|
|
337
|
-
| logGroupList | message | pb | 是 | logGroup 列表,封装好的日志组列表内容,建议 logGroup 数量不要超过5个 |
|
|
338
|
-
|
|
339
|
-
LogGroup 说明:
|
|
340
|
-
|
|
341
|
-
| 字段名 | 是否必选 | 含义 |
|
|
342
|
-
| ----------- | -------- | ------------------------------------------------------------ |
|
|
343
|
-
| logs | 是 | 日志数组,表示有多个 Log 组成的集合,一个 Log 表示一条日志,一个 LogGroup 中 Log 个数不能超过10000 |
|
|
344
|
-
| contextFlow | 否 | LogGroup 的唯一ID,需要使用上下文功能时传入。格式:"{上下文ID}-{LogGroupID}"。<br>上下文ID:唯一标识一个上下文(连续滚动的一系列日志文件,或者是需要保序的一系列日志),16进制64位整型字符串。<br>LogGroupID:连续递增的一串整型,16进制64位整型字符串。样例:"102700A66102516A-59F59"。 |
|
|
345
|
-
| filename | 否 | 日志文件名 |
|
|
346
|
-
| source | 否 | 日志来源,一般使用机器 IP 作为标识 |
|
|
347
|
-
| logTags | 否 | 日志的标签列表 |
|
|
348
|
-
|
|
349
|
-
Log 说明:
|
|
350
|
-
|
|
351
|
-
| 字段名 | 是否必选 | 含义 |
|
|
352
|
-
| -------- | -------- | ------------------------------------------------------------ |
|
|
353
|
-
| time | 是 | 日志时间(Unix 格式时间戳),支持秒、毫秒,建议采用毫秒 |
|
|
354
|
-
| contents | 否 | key-value 格式的日志内容,表示一条日志里的多个 key-value 组合 |
|
|
355
|
-
|
|
356
|
-
Content 说明:
|
|
357
|
-
|
|
358
|
-
| 字段名 | 是否必选 | 含义 |
|
|
359
|
-
| ------ | -------- | ------------------------------------------------------------ |
|
|
360
|
-
| key | 是 | 单条日志里某个字段组的 key 值,不能以`_`开头 |
|
|
361
|
-
| value | 是 | 单条日志某个字段组的 value 值,单条日志 value 不能超过1MB,LogGroup 中所有 value 总和不能超过5MB |
|
|
362
|
-
|
|
363
|
-
LogTag 说明:
|
|
364
|
-
|
|
365
|
-
| 字段名 | 是否必选 | 含义 |
|
|
366
|
-
| ------ | -------- | -------------------------------- |
|
|
367
|
-
| key | 是 | 自定义的标签 key |
|
|
368
|
-
| value | 是 | 自定义的标签 key 对应的 value 值 |
|
|
369
|
-
|
|
370
|
-
## PB 编译示例
|
|
371
|
-
|
|
372
|
-
本示例将说明如何使用官方 protoc 编译工具将 PB 描述文件 编译生成为 C++ 语言可调用的上传日志接口。
|
|
373
|
-
|
|
374
|
-
> ?目前 protoc 官方支持 Java、C++、Python 等语言的编译,详情请参见 [protoc](https://github.com/protocolbuffers/protobuf)。
|
|
375
|
-
|
|
376
|
-
#### 1. 安装 Protocol Buffer
|
|
377
|
-
|
|
378
|
-
下载 [Protocol Buffer](https://main.qcloudimg.com/raw/d7810aaf8b3073fbbc9d4049c21532aa/protobuf-2.6.1.tar.gz) ,解压并安装。示例版本为 protobuf 2.6.1,环境为 Centos 7.3 系统。 解压`protobuf-2.6.1.tar.gz`压缩包至`/usr/local`目录并进入该目录,执行命令如下:
|
|
379
|
-
|
|
380
|
-
```
|
|
381
|
-
tar -zxvf protobuf-2.6.1.tar.gz -C /usr/local/ && cd /usr/local/protobuf-2.6.1
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
开始编译和安装,配置环境变量,执行命令如下:
|
|
385
|
-
|
|
386
|
-
```
|
|
387
|
-
[root@VM_0_8_centos protobuf-2.6.1]# ./configure
|
|
388
|
-
[root@VM_0_8_centos protobuf-2.6.1]# make && make install
|
|
389
|
-
[root@VM_0_8_centos protobuf-2.6.1]# export PATH=$PATH:/usr/local/protobuf-2.6.1/bin
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
编译成功后,您可以使用以下命令查看版本:
|
|
393
|
-
|
|
394
|
-
```
|
|
395
|
-
[root@VM_0_8_centos protobuf-2.6.1]# protoc --version
|
|
396
|
-
liprotoc 2.6.1
|
|
397
|
-
```
|
|
398
|
-
|
|
399
|
-
#### 2. 创建 PB 描述文件
|
|
400
|
-
|
|
401
|
-
PB 描述文件是通信双方约定的数据交换格式,上传日志时须将规定的协议格式编译成对应语言版本的调用接口,然后添加到工程代码里,详情请参见 [protoc](https://github.com/protocolbuffers/protobuf) 。
|
|
402
|
-
|
|
403
|
-
以日志服务所规定的 PB 数据格式内容为准, 在本地创建 PB 消息描述文件 cls.proto。
|
|
404
|
-
|
|
405
|
-
> !PB 描述文件内容不可更改,且文件名须以`.proto`结尾。
|
|
406
|
-
|
|
407
|
-
cls.proto 内容(PB 描述文件)如下:
|
|
408
|
-
|
|
409
|
-
```
|
|
410
|
-
package cls;
|
|
411
|
-
|
|
412
|
-
message Log
|
|
413
|
-
{
|
|
414
|
-
message Content
|
|
415
|
-
{
|
|
416
|
-
required string key = 1; // 每组字段的 key
|
|
417
|
-
required string value = 2; // 每组字段的 value
|
|
418
|
-
}
|
|
419
|
-
required int64 time = 1; // 时间戳,UNIX时间格式
|
|
420
|
-
repeated Content contents = 2; // 一条日志里的多个kv组合
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
message LogTag
|
|
424
|
-
{
|
|
425
|
-
required string key = 1;
|
|
426
|
-
required string value = 2;
|
|
427
|
-
}
|
|
314
|
+
* 本接口用于创建索引
|
|
315
|
+
*/
|
|
316
|
+
async CreateIndex(
|
|
317
|
+
req: CreateIndexRequest,
|
|
318
|
+
cb?: (error: string, rep: CreateIndexResponse) => void
|
|
319
|
+
): Promise<CreateIndexResponse> {
|
|
320
|
+
return this.request("CreateIndex", req, cb)
|
|
321
|
+
}
|
|
428
322
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
323
|
+
/**
|
|
324
|
+
* 修改现有的投递规则,客户如果使用此接口,需要自行处理CLS对指定bucket的写权限。
|
|
325
|
+
*/
|
|
326
|
+
async ModifyShipper(
|
|
327
|
+
req: ModifyShipperRequest,
|
|
328
|
+
cb?: (error: string, rep: ModifyShipperResponse) => void
|
|
329
|
+
): Promise<ModifyShipperResponse> {
|
|
330
|
+
return this.request("ModifyShipper", req, cb)
|
|
331
|
+
}
|
|
437
332
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
333
|
+
/**
|
|
334
|
+
* 获取采集规则配置
|
|
335
|
+
*/
|
|
336
|
+
async DescribeConfigs(
|
|
337
|
+
req: DescribeConfigsRequest,
|
|
338
|
+
cb?: (error: string, rep: DescribeConfigsResponse) => void
|
|
339
|
+
): Promise<DescribeConfigsResponse> {
|
|
340
|
+
return this.request("DescribeConfigs", req, cb)
|
|
341
|
+
}
|
|
443
342
|
|
|
444
|
-
|
|
343
|
+
/**
|
|
344
|
+
* 本接口用于删除日志集。
|
|
345
|
+
*/
|
|
346
|
+
async DeleteLogset(
|
|
347
|
+
req: DeleteLogsetRequest,
|
|
348
|
+
cb?: (error: string, rep: DeleteLogsetResponse) => void
|
|
349
|
+
): Promise<DeleteLogsetResponse> {
|
|
350
|
+
return this.request("DeleteLogset", req, cb)
|
|
351
|
+
}
|
|
445
352
|
|
|
446
|
-
|
|
353
|
+
/**
|
|
354
|
+
* 删除应用到机器组的采集配置
|
|
355
|
+
*/
|
|
356
|
+
async DeleteConfigFromMachineGroup(
|
|
357
|
+
req: DeleteConfigFromMachineGroupRequest,
|
|
358
|
+
cb?: (error: string, rep: DeleteConfigFromMachineGroupResponse) => void
|
|
359
|
+
): Promise<DeleteConfigFromMachineGroupResponse> {
|
|
360
|
+
return this.request("DeleteConfigFromMachineGroup", req, cb)
|
|
361
|
+
}
|
|
447
362
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
363
|
+
/**
|
|
364
|
+
* 本接口用于删除数据加工任务
|
|
365
|
+
*/
|
|
366
|
+
async DeleteDataTransform(
|
|
367
|
+
req: DeleteDataTransformRequest,
|
|
368
|
+
cb?: (error: string, rep: DeleteDataTransformResponse) => void
|
|
369
|
+
): Promise<DeleteDataTransformResponse> {
|
|
370
|
+
return this.request("DeleteDataTransform", req, cb)
|
|
371
|
+
}
|
|
451
372
|
|
|
452
|
-
|
|
373
|
+
/**
|
|
374
|
+
* 本接口用于创建日志集,返回新创建的日志集的 ID。
|
|
375
|
+
*/
|
|
376
|
+
async CreateLogset(
|
|
377
|
+
req: CreateLogsetRequest,
|
|
378
|
+
cb?: (error: string, rep: CreateLogsetResponse) => void
|
|
379
|
+
): Promise<CreateLogsetResponse> {
|
|
380
|
+
return this.request("CreateLogset", req, cb)
|
|
381
|
+
}
|
|
453
382
|
|
|
454
|
-
|
|
383
|
+
/**
|
|
384
|
+
* 本接口用于创建日志主题。
|
|
385
|
+
*/
|
|
386
|
+
async CreateTopic(
|
|
387
|
+
req: CreateTopicRequest,
|
|
388
|
+
cb?: (error: string, rep: CreateTopicResponse) => void
|
|
389
|
+
): Promise<CreateTopicResponse> {
|
|
390
|
+
return this.request("CreateTopic", req, cb)
|
|
391
|
+
}
|
|
455
392
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
393
|
+
/**
|
|
394
|
+
* 该接口用于删除通知渠道组
|
|
395
|
+
*/
|
|
396
|
+
async DeleteAlarmNotice(
|
|
397
|
+
req: DeleteAlarmNoticeRequest,
|
|
398
|
+
cb?: (error: string, rep: DeleteAlarmNoticeResponse) => void
|
|
399
|
+
): Promise<DeleteAlarmNoticeResponse> {
|
|
400
|
+
return this.request("DeleteAlarmNotice", req, cb)
|
|
401
|
+
}
|
|
461
402
|
|
|
462
|
-
|
|
403
|
+
/**
|
|
404
|
+
* 获取告警历史,例如今天未恢复的告警
|
|
405
|
+
*/
|
|
406
|
+
async DescribeAlertRecordHistory(
|
|
407
|
+
req: DescribeAlertRecordHistoryRequest,
|
|
408
|
+
cb?: (error: string, rep: DescribeAlertRecordHistoryResponse) => void
|
|
409
|
+
): Promise<DescribeAlertRecordHistoryResponse> {
|
|
410
|
+
return this.request("DescribeAlertRecordHistory", req, cb)
|
|
411
|
+
}
|
|
463
412
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
413
|
+
/**
|
|
414
|
+
* 本接口用于删除Kafka数据订阅任务
|
|
415
|
+
*/
|
|
416
|
+
async DeleteKafkaRecharge(
|
|
417
|
+
req: DeleteKafkaRechargeRequest,
|
|
418
|
+
cb?: (error: string, rep: DeleteKafkaRechargeResponse) => void
|
|
419
|
+
): Promise<DeleteKafkaRechargeResponse> {
|
|
420
|
+
return this.request("DeleteKafkaRecharge", req, cb)
|
|
471
421
|
}
|
|
472
422
|
|
|
473
423
|
/**
|
|
474
|
-
*
|
|
424
|
+
* 创建采集规则配置
|
|
475
425
|
*/
|
|
476
|
-
async
|
|
477
|
-
req:
|
|
478
|
-
cb?: (error: string, rep:
|
|
479
|
-
): Promise<
|
|
480
|
-
return this.request("
|
|
426
|
+
async CreateConfig(
|
|
427
|
+
req: CreateConfigRequest,
|
|
428
|
+
cb?: (error: string, rep: CreateConfigResponse) => void
|
|
429
|
+
): Promise<CreateConfigResponse> {
|
|
430
|
+
return this.request("CreateConfig", req, cb)
|
|
481
431
|
}
|
|
482
432
|
|
|
483
433
|
/**
|
|
484
|
-
*
|
|
434
|
+
* 查询指定时刻指标的最新值
|
|
485
435
|
*/
|
|
486
|
-
async
|
|
487
|
-
req:
|
|
488
|
-
cb?: (error: string, rep:
|
|
489
|
-
): Promise<
|
|
490
|
-
return this.request("
|
|
436
|
+
async QueryMetric(
|
|
437
|
+
req: QueryMetricRequest,
|
|
438
|
+
cb?: (error: string, rep: QueryMetricResponse) => void
|
|
439
|
+
): Promise<QueryMetricResponse> {
|
|
440
|
+
return this.request("QueryMetric", req, cb)
|
|
491
441
|
}
|
|
492
442
|
|
|
493
443
|
/**
|
|
494
|
-
*
|
|
444
|
+
* 本接口用于获取日志主题列表,支持分页
|
|
495
445
|
*/
|
|
496
|
-
async
|
|
497
|
-
req:
|
|
498
|
-
cb?: (error: string, rep:
|
|
499
|
-
): Promise<
|
|
500
|
-
return this.request("
|
|
446
|
+
async DescribeTopics(
|
|
447
|
+
req: DescribeTopicsRequest,
|
|
448
|
+
cb?: (error: string, rep: DescribeTopicsResponse) => void
|
|
449
|
+
): Promise<DescribeTopicsResponse> {
|
|
450
|
+
return this.request("DescribeTopics", req, cb)
|
|
501
451
|
}
|
|
502
452
|
|
|
503
453
|
/**
|
|
504
|
-
*
|
|
454
|
+
* 本接口用于创建cos导入任务
|
|
505
455
|
*/
|
|
506
|
-
async
|
|
507
|
-
req:
|
|
508
|
-
cb?: (error: string, rep:
|
|
509
|
-
): Promise<
|
|
510
|
-
return this.request("
|
|
456
|
+
async CreateCosRecharge(
|
|
457
|
+
req: CreateCosRechargeRequest,
|
|
458
|
+
cb?: (error: string, rep: CreateCosRechargeResponse) => void
|
|
459
|
+
): Promise<CreateCosRechargeResponse> {
|
|
460
|
+
return this.request("CreateCosRecharge", req, cb)
|
|
511
461
|
}
|
|
512
462
|
|
|
513
463
|
/**
|
|
514
|
-
*
|
|
464
|
+
* 本接口用于合并一个读写态的主题分区,合并时指定一个主题分区 ID,日志服务会自动合并范围右相邻的分区。
|
|
515
465
|
*/
|
|
516
|
-
async
|
|
517
|
-
req:
|
|
518
|
-
cb?: (error: string, rep:
|
|
519
|
-
): Promise<
|
|
520
|
-
return this.request("
|
|
466
|
+
async MergePartition(
|
|
467
|
+
req: MergePartitionRequest,
|
|
468
|
+
cb?: (error: string, rep: MergePartitionResponse) => void
|
|
469
|
+
): Promise<MergePartitionResponse> {
|
|
470
|
+
return this.request("MergePartition", req, cb)
|
|
521
471
|
}
|
|
522
472
|
|
|
523
473
|
/**
|
|
524
|
-
*
|
|
474
|
+
* 本接口用于删除定时SQL分析任务
|
|
525
475
|
*/
|
|
526
|
-
async
|
|
527
|
-
req:
|
|
528
|
-
cb?: (error: string, rep:
|
|
529
|
-
): Promise<
|
|
530
|
-
return this.request("
|
|
476
|
+
async DeleteScheduledSql(
|
|
477
|
+
req: DeleteScheduledSqlRequest,
|
|
478
|
+
cb?: (error: string, rep: DeleteScheduledSqlResponse) => void
|
|
479
|
+
): Promise<DeleteScheduledSqlResponse> {
|
|
480
|
+
return this.request("DeleteScheduledSql", req, cb)
|
|
531
481
|
}
|
|
532
482
|
|
|
533
483
|
/**
|
|
534
|
-
*
|
|
484
|
+
* 本接口仅创建下载任务,任务返回的下载地址,请用户调用DescribeExports查看任务列表。其中有下载地址CosPath参数。参考文档https://cloud.tencent.com/document/product/614/56449
|
|
535
485
|
*/
|
|
536
|
-
async
|
|
537
|
-
req:
|
|
538
|
-
cb?: (error: string, rep:
|
|
539
|
-
): Promise<
|
|
540
|
-
return this.request("
|
|
486
|
+
async CreateExport(
|
|
487
|
+
req: CreateExportRequest,
|
|
488
|
+
cb?: (error: string, rep: CreateExportResponse) => void
|
|
489
|
+
): Promise<CreateExportResponse> {
|
|
490
|
+
return this.request("CreateExport", req, cb)
|
|
541
491
|
}
|
|
542
492
|
|
|
543
493
|
/**
|
|
544
|
-
*
|
|
494
|
+
* 关闭Kafka协议消费
|
|
545
495
|
*/
|
|
546
|
-
async
|
|
547
|
-
req:
|
|
548
|
-
cb?: (error: string, rep:
|
|
549
|
-
): Promise<
|
|
550
|
-
return this.request("
|
|
496
|
+
async CloseKafkaConsumer(
|
|
497
|
+
req: CloseKafkaConsumerRequest,
|
|
498
|
+
cb?: (error: string, rep: CloseKafkaConsumerResponse) => void
|
|
499
|
+
): Promise<CloseKafkaConsumerResponse> {
|
|
500
|
+
return this.request("CloseKafkaConsumer", req, cb)
|
|
551
501
|
}
|
|
552
502
|
|
|
553
503
|
/**
|
|
@@ -561,6 +511,16 @@ cls.pb.cc cls.pb.h cls.proto
|
|
|
561
511
|
return this.request("ModifyIndex", req, cb)
|
|
562
512
|
}
|
|
563
513
|
|
|
514
|
+
/**
|
|
515
|
+
* 本接口用于获取索引配置信息
|
|
516
|
+
*/
|
|
517
|
+
async DescribeIndex(
|
|
518
|
+
req: DescribeIndexRequest,
|
|
519
|
+
cb?: (error: string, rep: DescribeIndexResponse) => void
|
|
520
|
+
): Promise<DescribeIndexResponse> {
|
|
521
|
+
return this.request("DescribeIndex", req, cb)
|
|
522
|
+
}
|
|
523
|
+
|
|
564
524
|
/**
|
|
565
525
|
* 新建投递到COS的任务,【!!!注意】使用此接口,需要检查是否配置了投递COS的角色和权限。如果没有配置,请参考文档投递权限查看和配置https://cloud.tencent.com/document/product/614/71623。
|
|
566
526
|
*/
|
|
@@ -572,223 +532,243 @@ cls.pb.cc cls.pb.h cls.proto
|
|
|
572
532
|
}
|
|
573
533
|
|
|
574
534
|
/**
|
|
575
|
-
*
|
|
535
|
+
* 本接口用于修改投递任务
|
|
576
536
|
*/
|
|
577
|
-
async
|
|
578
|
-
req:
|
|
579
|
-
cb?: (error: string, rep:
|
|
580
|
-
): Promise<
|
|
581
|
-
return this.request("
|
|
537
|
+
async ModifyConsumer(
|
|
538
|
+
req: ModifyConsumerRequest,
|
|
539
|
+
cb?: (error: string, rep: ModifyConsumerResponse) => void
|
|
540
|
+
): Promise<ModifyConsumerResponse> {
|
|
541
|
+
return this.request("ModifyConsumer", req, cb)
|
|
582
542
|
}
|
|
583
543
|
|
|
584
544
|
/**
|
|
585
|
-
*
|
|
545
|
+
* 本接口用于删除投递配置
|
|
586
546
|
*/
|
|
587
|
-
async
|
|
588
|
-
req:
|
|
589
|
-
cb?: (error: string, rep:
|
|
590
|
-
): Promise<
|
|
591
|
-
return this.request("
|
|
547
|
+
async DeleteConsumer(
|
|
548
|
+
req: DeleteConsumerRequest,
|
|
549
|
+
cb?: (error: string, rep: DeleteConsumerResponse) => void
|
|
550
|
+
): Promise<DeleteConsumerResponse> {
|
|
551
|
+
return this.request("DeleteConsumer", req, cb)
|
|
592
552
|
}
|
|
593
553
|
|
|
594
554
|
/**
|
|
595
|
-
*
|
|
555
|
+
* 删除机器组
|
|
596
556
|
*/
|
|
597
|
-
async
|
|
598
|
-
req:
|
|
599
|
-
cb?: (error: string, rep:
|
|
600
|
-
): Promise<
|
|
601
|
-
return this.request("
|
|
557
|
+
async DeleteMachineGroup(
|
|
558
|
+
req: DeleteMachineGroupRequest,
|
|
559
|
+
cb?: (error: string, rep: DeleteMachineGroupResponse) => void
|
|
560
|
+
): Promise<DeleteMachineGroupResponse> {
|
|
561
|
+
return this.request("DeleteMachineGroup", req, cb)
|
|
602
562
|
}
|
|
603
563
|
|
|
604
564
|
/**
|
|
605
|
-
*
|
|
565
|
+
* 本接口用于获取Kafka数据订阅任务
|
|
606
566
|
*/
|
|
607
|
-
async
|
|
608
|
-
req:
|
|
609
|
-
cb?: (error: string, rep:
|
|
610
|
-
): Promise<
|
|
611
|
-
return this.request("
|
|
567
|
+
async DescribeKafkaRecharges(
|
|
568
|
+
req: DescribeKafkaRechargesRequest,
|
|
569
|
+
cb?: (error: string, rep: DescribeKafkaRechargesResponse) => void
|
|
570
|
+
): Promise<DescribeKafkaRechargesResponse> {
|
|
571
|
+
return this.request("DescribeKafkaRecharges", req, cb)
|
|
612
572
|
}
|
|
613
573
|
|
|
614
574
|
/**
|
|
615
|
-
*
|
|
575
|
+
* 本接口用于获取告警策略列表。
|
|
616
576
|
*/
|
|
617
|
-
async
|
|
618
|
-
req:
|
|
619
|
-
cb?: (error: string, rep:
|
|
620
|
-
): Promise<
|
|
621
|
-
return this.request("
|
|
577
|
+
async DescribeAlarms(
|
|
578
|
+
req: DescribeAlarmsRequest,
|
|
579
|
+
cb?: (error: string, rep: DescribeAlarmsResponse) => void
|
|
580
|
+
): Promise<DescribeAlarmsResponse> {
|
|
581
|
+
return this.request("DescribeAlarms", req, cb)
|
|
622
582
|
}
|
|
623
583
|
|
|
624
584
|
/**
|
|
625
|
-
*
|
|
585
|
+
* 本接口用于获取cos导入配置
|
|
626
586
|
*/
|
|
627
|
-
async
|
|
628
|
-
req:
|
|
629
|
-
cb?: (error: string, rep:
|
|
630
|
-
): Promise<
|
|
631
|
-
return this.request("
|
|
587
|
+
async DescribeCosRecharges(
|
|
588
|
+
req: DescribeCosRechargesRequest,
|
|
589
|
+
cb?: (error: string, rep: DescribeCosRechargesResponse) => void
|
|
590
|
+
): Promise<DescribeCosRechargesResponse> {
|
|
591
|
+
return this.request("DescribeCosRecharges", req, cb)
|
|
632
592
|
}
|
|
633
593
|
|
|
634
594
|
/**
|
|
635
|
-
*
|
|
595
|
+
* 应用采集配置到指定机器组
|
|
636
596
|
*/
|
|
637
|
-
async
|
|
638
|
-
req:
|
|
639
|
-
cb?: (error: string, rep:
|
|
640
|
-
): Promise<
|
|
641
|
-
return this.request("
|
|
597
|
+
async ApplyConfigToMachineGroup(
|
|
598
|
+
req: ApplyConfigToMachineGroupRequest,
|
|
599
|
+
cb?: (error: string, rep: ApplyConfigToMachineGroupResponse) => void
|
|
600
|
+
): Promise<ApplyConfigToMachineGroupResponse> {
|
|
601
|
+
return this.request("ApplyConfigToMachineGroup", req, cb)
|
|
642
602
|
}
|
|
643
603
|
|
|
644
604
|
/**
|
|
645
|
-
*
|
|
605
|
+
* 本接口用于构建日志数量直方图
|
|
646
606
|
*/
|
|
647
|
-
async
|
|
648
|
-
req:
|
|
649
|
-
cb?: (error: string, rep:
|
|
650
|
-
): Promise<
|
|
651
|
-
return this.request("
|
|
607
|
+
async DescribeLogHistogram(
|
|
608
|
+
req: DescribeLogHistogramRequest,
|
|
609
|
+
cb?: (error: string, rep: DescribeLogHistogramResponse) => void
|
|
610
|
+
): Promise<DescribeLogHistogramResponse> {
|
|
611
|
+
return this.request("DescribeLogHistogram", req, cb)
|
|
652
612
|
}
|
|
653
613
|
|
|
654
614
|
/**
|
|
655
|
-
*
|
|
615
|
+
* 该接口用于修改通知渠道组
|
|
656
616
|
*/
|
|
657
|
-
async
|
|
658
|
-
req:
|
|
659
|
-
cb?: (error: string, rep:
|
|
660
|
-
): Promise<
|
|
661
|
-
return this.request("
|
|
617
|
+
async ModifyAlarmNotice(
|
|
618
|
+
req: ModifyAlarmNoticeRequest,
|
|
619
|
+
cb?: (error: string, rep: ModifyAlarmNoticeResponse) => void
|
|
620
|
+
): Promise<ModifyAlarmNoticeResponse> {
|
|
621
|
+
return this.request("ModifyAlarmNotice", req, cb)
|
|
662
622
|
}
|
|
663
623
|
|
|
664
624
|
/**
|
|
665
|
-
*
|
|
625
|
+
* 打开Kafka协议消费功能
|
|
666
626
|
*/
|
|
667
|
-
async
|
|
668
|
-
req:
|
|
669
|
-
cb?: (error: string, rep:
|
|
670
|
-
): Promise<
|
|
671
|
-
return this.request("
|
|
627
|
+
async OpenKafkaConsumer(
|
|
628
|
+
req: OpenKafkaConsumerRequest,
|
|
629
|
+
cb?: (error: string, rep: OpenKafkaConsumerResponse) => void
|
|
630
|
+
): Promise<OpenKafkaConsumerResponse> {
|
|
631
|
+
return this.request("OpenKafkaConsumer", req, cb)
|
|
672
632
|
}
|
|
673
633
|
|
|
674
634
|
/**
|
|
675
|
-
*
|
|
635
|
+
* 获取投递任务列表
|
|
676
636
|
*/
|
|
677
|
-
async
|
|
678
|
-
req:
|
|
679
|
-
cb?: (error: string, rep:
|
|
680
|
-
): Promise<
|
|
681
|
-
return this.request("
|
|
637
|
+
async DescribeShipperTasks(
|
|
638
|
+
req: DescribeShipperTasksRequest,
|
|
639
|
+
cb?: (error: string, rep: DescribeShipperTasksResponse) => void
|
|
640
|
+
): Promise<DescribeShipperTasksResponse> {
|
|
641
|
+
return this.request("DescribeShipperTasks", req, cb)
|
|
682
642
|
}
|
|
683
643
|
|
|
684
644
|
/**
|
|
685
|
-
*
|
|
645
|
+
* 本接口用于删除日志主题的索引配置,删除索引配置后将无法检索和查询采集到的日志。
|
|
686
646
|
*/
|
|
687
|
-
async
|
|
688
|
-
req:
|
|
689
|
-
cb?: (error: string, rep:
|
|
690
|
-
): Promise<
|
|
691
|
-
return this.request("
|
|
647
|
+
async DeleteIndex(
|
|
648
|
+
req: DeleteIndexRequest,
|
|
649
|
+
cb?: (error: string, rep: DeleteIndexResponse) => void
|
|
650
|
+
): Promise<DeleteIndexResponse> {
|
|
651
|
+
return this.request("DeleteIndex", req, cb)
|
|
692
652
|
}
|
|
693
653
|
|
|
694
654
|
/**
|
|
695
|
-
*
|
|
655
|
+
* 获取Kafka协议消费信息
|
|
696
656
|
*/
|
|
697
|
-
async
|
|
698
|
-
req:
|
|
699
|
-
cb?: (error: string, rep:
|
|
700
|
-
): Promise<
|
|
701
|
-
return this.request("
|
|
657
|
+
async DescribeKafkaConsumer(
|
|
658
|
+
req: DescribeKafkaConsumerRequest,
|
|
659
|
+
cb?: (error: string, rep: DescribeKafkaConsumerResponse) => void
|
|
660
|
+
): Promise<DescribeKafkaConsumerResponse> {
|
|
661
|
+
return this.request("DescribeKafkaConsumer", req, cb)
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* 本接口用于预览Kafka数据订阅任务客户日志信息
|
|
666
|
+
*/
|
|
667
|
+
async PreviewKafkaRecharge(
|
|
668
|
+
req: PreviewKafkaRechargeRequest,
|
|
669
|
+
cb?: (error: string, rep: PreviewKafkaRechargeResponse) => void
|
|
670
|
+
): Promise<PreviewKafkaRechargeResponse> {
|
|
671
|
+
return this.request("PreviewKafkaRecharge", req, cb)
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* 本接口用于修改特殊采集配置任务,特殊采集配置应用于自建K8S环境的采集Agent
|
|
676
|
+
*/
|
|
677
|
+
async ModifyConfigExtra(
|
|
678
|
+
req: ModifyConfigExtraRequest,
|
|
679
|
+
cb?: (error: string, rep: ModifyConfigExtraResponse) => void
|
|
680
|
+
): Promise<ModifyConfigExtraResponse> {
|
|
681
|
+
return this.request("ModifyConfigExtra", req, cb)
|
|
702
682
|
}
|
|
703
683
|
|
|
704
684
|
/**
|
|
705
|
-
*
|
|
685
|
+
* 本接口用于创建特殊采集配置任务,特殊采集配置应用于自建K8S环境的采集Agent
|
|
706
686
|
*/
|
|
707
|
-
async
|
|
708
|
-
req:
|
|
709
|
-
cb?: (error: string, rep:
|
|
710
|
-
): Promise<
|
|
711
|
-
return this.request("
|
|
687
|
+
async CreateConfigExtra(
|
|
688
|
+
req: CreateConfigExtraRequest,
|
|
689
|
+
cb?: (error: string, rep: CreateConfigExtraResponse) => void
|
|
690
|
+
): Promise<CreateConfigExtraResponse> {
|
|
691
|
+
return this.request("CreateConfigExtra", req, cb)
|
|
712
692
|
}
|
|
713
693
|
|
|
714
694
|
/**
|
|
715
|
-
*
|
|
695
|
+
* 本接口用于修改定时SQL分析任务
|
|
716
696
|
*/
|
|
717
|
-
async
|
|
718
|
-
req:
|
|
719
|
-
cb?: (error: string, rep:
|
|
720
|
-
): Promise<
|
|
721
|
-
return this.request("
|
|
697
|
+
async ModifyScheduledSql(
|
|
698
|
+
req: ModifyScheduledSqlRequest,
|
|
699
|
+
cb?: (error: string, rep: ModifyScheduledSqlResponse) => void
|
|
700
|
+
): Promise<ModifyScheduledSqlResponse> {
|
|
701
|
+
return this.request("ModifyScheduledSql", req, cb)
|
|
722
702
|
}
|
|
723
703
|
|
|
724
704
|
/**
|
|
725
|
-
*
|
|
705
|
+
* 创建机器组
|
|
726
706
|
*/
|
|
727
|
-
async
|
|
728
|
-
req:
|
|
729
|
-
cb?: (error: string, rep:
|
|
730
|
-
): Promise<
|
|
731
|
-
return this.request("
|
|
707
|
+
async CreateMachineGroup(
|
|
708
|
+
req: CreateMachineGroupRequest,
|
|
709
|
+
cb?: (error: string, rep: CreateMachineGroupResponse) => void
|
|
710
|
+
): Promise<CreateMachineGroupResponse> {
|
|
711
|
+
return this.request("CreateMachineGroup", req, cb)
|
|
732
712
|
}
|
|
733
713
|
|
|
734
714
|
/**
|
|
735
|
-
*
|
|
715
|
+
* 用于删除机器组信息
|
|
736
716
|
*/
|
|
737
|
-
async
|
|
738
|
-
req:
|
|
739
|
-
cb?: (error: string, rep:
|
|
740
|
-
): Promise<
|
|
741
|
-
return this.request("
|
|
717
|
+
async DeleteMachineGroupInfo(
|
|
718
|
+
req: DeleteMachineGroupInfoRequest,
|
|
719
|
+
cb?: (error: string, rep: DeleteMachineGroupInfoResponse) => void
|
|
720
|
+
): Promise<DeleteMachineGroupInfoResponse> {
|
|
721
|
+
return this.request("DeleteMachineGroupInfo", req, cb)
|
|
742
722
|
}
|
|
743
723
|
|
|
744
724
|
/**
|
|
745
|
-
*
|
|
725
|
+
* 本接口用于获取告警任务历史
|
|
746
726
|
*/
|
|
747
|
-
async
|
|
748
|
-
req:
|
|
749
|
-
cb?: (error: string, rep:
|
|
750
|
-
): Promise<
|
|
751
|
-
return this.request("
|
|
727
|
+
async GetAlarmLog(
|
|
728
|
+
req: GetAlarmLogRequest,
|
|
729
|
+
cb?: (error: string, rep: GetAlarmLogResponse) => void
|
|
730
|
+
): Promise<GetAlarmLogResponse> {
|
|
731
|
+
return this.request("GetAlarmLog", req, cb)
|
|
752
732
|
}
|
|
753
733
|
|
|
754
734
|
/**
|
|
755
|
-
*
|
|
735
|
+
* 本接口用于获取日志集信息列表。
|
|
756
736
|
*/
|
|
757
|
-
async
|
|
758
|
-
req:
|
|
759
|
-
cb?: (error: string, rep:
|
|
760
|
-
): Promise<
|
|
761
|
-
return this.request("
|
|
737
|
+
async DescribeLogsets(
|
|
738
|
+
req: DescribeLogsetsRequest,
|
|
739
|
+
cb?: (error: string, rep: DescribeLogsetsResponse) => void
|
|
740
|
+
): Promise<DescribeLogsetsResponse> {
|
|
741
|
+
return this.request("DescribeLogsets", req, cb)
|
|
762
742
|
}
|
|
763
743
|
|
|
764
744
|
/**
|
|
765
|
-
*
|
|
745
|
+
* 本接口用于预览cos导入信息
|
|
766
746
|
*/
|
|
767
|
-
async
|
|
768
|
-
req:
|
|
769
|
-
cb?: (error: string, rep:
|
|
770
|
-
): Promise<
|
|
771
|
-
return this.request("
|
|
747
|
+
async SearchCosRechargeInfo(
|
|
748
|
+
req: SearchCosRechargeInfoRequest,
|
|
749
|
+
cb?: (error: string, rep: SearchCosRechargeInfoResponse) => void
|
|
750
|
+
): Promise<SearchCosRechargeInfoResponse> {
|
|
751
|
+
return this.request("SearchCosRechargeInfo", req, cb)
|
|
772
752
|
}
|
|
773
753
|
|
|
774
754
|
/**
|
|
775
|
-
*
|
|
755
|
+
* 本接口用于修改Kafka数据订阅任务
|
|
776
756
|
*/
|
|
777
|
-
async
|
|
778
|
-
req:
|
|
779
|
-
cb?: (error: string, rep:
|
|
780
|
-
): Promise<
|
|
781
|
-
return this.request("
|
|
757
|
+
async ModifyKafkaRecharge(
|
|
758
|
+
req: ModifyKafkaRechargeRequest,
|
|
759
|
+
cb?: (error: string, rep: ModifyKafkaRechargeResponse) => void
|
|
760
|
+
): Promise<ModifyKafkaRechargeResponse> {
|
|
761
|
+
return this.request("ModifyKafkaRecharge", req, cb)
|
|
782
762
|
}
|
|
783
763
|
|
|
784
764
|
/**
|
|
785
|
-
*
|
|
765
|
+
* 该接口用于创建通知渠道组。
|
|
786
766
|
*/
|
|
787
|
-
async
|
|
788
|
-
req:
|
|
789
|
-
cb?: (error: string, rep:
|
|
790
|
-
): Promise<
|
|
791
|
-
return this.request("
|
|
767
|
+
async CreateAlarmNotice(
|
|
768
|
+
req: CreateAlarmNoticeRequest,
|
|
769
|
+
cb?: (error: string, rep: CreateAlarmNoticeResponse) => void
|
|
770
|
+
): Promise<CreateAlarmNoticeResponse> {
|
|
771
|
+
return this.request("CreateAlarmNotice", req, cb)
|
|
792
772
|
}
|
|
793
773
|
|
|
794
774
|
/**
|
|
@@ -832,23 +812,13 @@ cls.pb.cc cls.pb.h cls.proto
|
|
|
832
812
|
}
|
|
833
813
|
|
|
834
814
|
/**
|
|
835
|
-
*
|
|
836
|
-
*/
|
|
837
|
-
async CreateTopic(
|
|
838
|
-
req: CreateTopicRequest,
|
|
839
|
-
cb?: (error: string, rep: CreateTopicResponse) => void
|
|
840
|
-
): Promise<CreateTopicResponse> {
|
|
841
|
-
return this.request("CreateTopic", req, cb)
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
/**
|
|
845
|
-
* 应用采集配置到指定机器组
|
|
815
|
+
* 本接口用于获取主题分区列表。
|
|
846
816
|
*/
|
|
847
|
-
async
|
|
848
|
-
req:
|
|
849
|
-
cb?: (error: string, rep:
|
|
850
|
-
): Promise<
|
|
851
|
-
return this.request("
|
|
817
|
+
async DescribePartitions(
|
|
818
|
+
req: DescribePartitionsRequest,
|
|
819
|
+
cb?: (error: string, rep: DescribePartitionsResponse) => void
|
|
820
|
+
): Promise<DescribePartitionsResponse> {
|
|
821
|
+
return this.request("DescribePartitions", req, cb)
|
|
852
822
|
}
|
|
853
823
|
|
|
854
824
|
/**
|
|
@@ -862,13 +832,53 @@ cls.pb.cc cls.pb.h cls.proto
|
|
|
862
832
|
}
|
|
863
833
|
|
|
864
834
|
/**
|
|
865
|
-
*
|
|
835
|
+
* 本接口用于删除告警策略。
|
|
866
836
|
*/
|
|
867
|
-
async
|
|
868
|
-
req:
|
|
869
|
-
cb?: (error: string, rep:
|
|
870
|
-
): Promise<
|
|
871
|
-
return this.request("
|
|
837
|
+
async DeleteAlarm(
|
|
838
|
+
req: DeleteAlarmRequest,
|
|
839
|
+
cb?: (error: string, rep: DeleteAlarmResponse) => void
|
|
840
|
+
): Promise<DeleteAlarmResponse> {
|
|
841
|
+
return this.request("DeleteAlarm", req, cb)
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* 删除投递COS任务
|
|
846
|
+
*/
|
|
847
|
+
async DeleteShipper(
|
|
848
|
+
req: DeleteShipperRequest,
|
|
849
|
+
cb?: (error: string, rep: DeleteShipperResponse) => void
|
|
850
|
+
): Promise<DeleteShipperResponse> {
|
|
851
|
+
return this.request("DeleteShipper", req, cb)
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* 查询指定时间范围内指标的变化趋势
|
|
856
|
+
*/
|
|
857
|
+
async QueryRangeMetric(
|
|
858
|
+
req: QueryRangeMetricRequest,
|
|
859
|
+
cb?: (error: string, rep: QueryRangeMetricResponse) => void
|
|
860
|
+
): Promise<QueryRangeMetricResponse> {
|
|
861
|
+
return this.request("QueryRangeMetric", req, cb)
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
/**
|
|
865
|
+
* 获取采集规则配置所绑定的机器组
|
|
866
|
+
*/
|
|
867
|
+
async DescribeConfigMachineGroups(
|
|
868
|
+
req: DescribeConfigMachineGroupsRequest,
|
|
869
|
+
cb?: (error: string, rep: DescribeConfigMachineGroupsResponse) => void
|
|
870
|
+
): Promise<DescribeConfigMachineGroupsResponse> {
|
|
871
|
+
return this.request("DescribeConfigMachineGroups", req, cb)
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* 本接口用于删除日志下载任务
|
|
876
|
+
*/
|
|
877
|
+
async DeleteExport(
|
|
878
|
+
req: DeleteExportRequest,
|
|
879
|
+
cb?: (error: string, rep: DeleteExportResponse) => void
|
|
880
|
+
): Promise<DeleteExportResponse> {
|
|
881
|
+
return this.request("DeleteExport", req, cb)
|
|
872
882
|
}
|
|
873
883
|
|
|
874
884
|
/**
|
|
@@ -882,75 +892,133 @@ cls.pb.cc cls.pb.h cls.proto
|
|
|
882
892
|
}
|
|
883
893
|
|
|
884
894
|
/**
|
|
885
|
-
*
|
|
895
|
+
* 获取机器组信息列表
|
|
886
896
|
*/
|
|
887
|
-
async
|
|
888
|
-
req:
|
|
889
|
-
cb?: (error: string, rep:
|
|
890
|
-
): Promise<
|
|
891
|
-
return this.request("
|
|
897
|
+
async DescribeMachineGroups(
|
|
898
|
+
req: DescribeMachineGroupsRequest,
|
|
899
|
+
cb?: (error: string, rep: DescribeMachineGroupsResponse) => void
|
|
900
|
+
): Promise<DescribeMachineGroupsResponse> {
|
|
901
|
+
return this.request("DescribeMachineGroups", req, cb)
|
|
892
902
|
}
|
|
893
903
|
|
|
894
904
|
/**
|
|
895
|
-
*
|
|
905
|
+
* 本接口用于创建投递任务
|
|
896
906
|
*/
|
|
897
|
-
async
|
|
898
|
-
req:
|
|
899
|
-
cb?: (error: string, rep:
|
|
900
|
-
): Promise<
|
|
901
|
-
return this.request("
|
|
907
|
+
async CreateConsumer(
|
|
908
|
+
req: CreateConsumerRequest,
|
|
909
|
+
cb?: (error: string, rep: CreateConsumerResponse) => void
|
|
910
|
+
): Promise<CreateConsumerResponse> {
|
|
911
|
+
return this.request("CreateConsumer", req, cb)
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* 本接口用于获取kafka用户信息
|
|
916
|
+
*/
|
|
917
|
+
async DescribeKafkaUser(
|
|
918
|
+
req: DescribeKafkaUserRequest,
|
|
919
|
+
cb?: (error: string, rep: DescribeKafkaUserResponse) => void
|
|
920
|
+
): Promise<DescribeKafkaUserResponse> {
|
|
921
|
+
return this.request("DescribeKafkaUser", req, cb)
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* 本接口用于修改日志主题。
|
|
926
|
+
*/
|
|
927
|
+
async ModifyTopic(
|
|
928
|
+
req: ModifyTopicRequest,
|
|
929
|
+
cb?: (error: string, rep: ModifyTopicResponse) => void
|
|
930
|
+
): Promise<ModifyTopicResponse> {
|
|
931
|
+
return this.request("ModifyTopic", req, cb)
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* 修改机器组
|
|
936
|
+
*/
|
|
937
|
+
async ModifyMachineGroup(
|
|
938
|
+
req: ModifyMachineGroupRequest,
|
|
939
|
+
cb?: (error: string, rep: ModifyMachineGroupResponse) => void
|
|
940
|
+
): Promise<ModifyMachineGroupResponse> {
|
|
941
|
+
return this.request("ModifyMachineGroup", req, cb)
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* 本接口用于获取定时SQL分析任务列表
|
|
946
|
+
*/
|
|
947
|
+
async DescribeScheduledSqlInfo(
|
|
948
|
+
req: DescribeScheduledSqlInfoRequest,
|
|
949
|
+
cb?: (error: string, rep: DescribeScheduledSqlInfoResponse) => void
|
|
950
|
+
): Promise<DescribeScheduledSqlInfoResponse> {
|
|
951
|
+
return this.request("DescribeScheduledSqlInfo", req, cb)
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* 删除采集规则配置
|
|
956
|
+
*/
|
|
957
|
+
async DeleteConfig(
|
|
958
|
+
req: DeleteConfigRequest,
|
|
959
|
+
cb?: (error: string, rep: DeleteConfigResponse) => void
|
|
960
|
+
): Promise<DeleteConfigResponse> {
|
|
961
|
+
return this.request("DeleteConfig", req, cb)
|
|
902
962
|
}
|
|
903
963
|
|
|
904
964
|
/**
|
|
905
|
-
*
|
|
965
|
+
* 本接口用于获取特殊采集配置,特殊采集配置应用于自建K8S环境的采集Agent
|
|
906
966
|
*/
|
|
907
|
-
async
|
|
908
|
-
req:
|
|
909
|
-
cb?: (error: string, rep:
|
|
910
|
-
): Promise<
|
|
911
|
-
return this.request("
|
|
967
|
+
async DescribeConfigExtras(
|
|
968
|
+
req: DescribeConfigExtrasRequest,
|
|
969
|
+
cb?: (error: string, rep: DescribeConfigExtrasResponse) => void
|
|
970
|
+
): Promise<DescribeConfigExtrasResponse> {
|
|
971
|
+
return this.request("DescribeConfigExtras", req, cb)
|
|
912
972
|
}
|
|
913
973
|
|
|
914
974
|
/**
|
|
915
|
-
|
|
975
|
+
* 本接口用于校验Kafka服务集群是否可以正常访问
|
|
976
|
+
*/
|
|
977
|
+
async CheckRechargeKafkaServer(
|
|
978
|
+
req: CheckRechargeKafkaServerRequest,
|
|
979
|
+
cb?: (error: string, rep: CheckRechargeKafkaServerResponse) => void
|
|
980
|
+
): Promise<CheckRechargeKafkaServerResponse> {
|
|
981
|
+
return this.request("CheckRechargeKafkaServer", req, cb)
|
|
982
|
+
}
|
|
916
983
|
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
984
|
+
/**
|
|
985
|
+
* 本接口用于修改告警策略。需要至少修改一项有效内容。
|
|
986
|
+
*/
|
|
987
|
+
async ModifyAlarm(
|
|
988
|
+
req: ModifyAlarmRequest,
|
|
989
|
+
cb?: (error: string, rep: ModifyAlarmResponse) => void
|
|
990
|
+
): Promise<ModifyAlarmResponse> {
|
|
991
|
+
return this.request("ModifyAlarm", req, cb)
|
|
924
992
|
}
|
|
925
993
|
|
|
926
994
|
/**
|
|
927
|
-
*
|
|
995
|
+
* 获取投递到COS的任务配置信息
|
|
928
996
|
*/
|
|
929
|
-
async
|
|
930
|
-
req:
|
|
931
|
-
cb?: (error: string, rep:
|
|
932
|
-
): Promise<
|
|
933
|
-
return this.request("
|
|
997
|
+
async DescribeShippers(
|
|
998
|
+
req: DescribeShippersRequest,
|
|
999
|
+
cb?: (error: string, rep: DescribeShippersResponse) => void
|
|
1000
|
+
): Promise<DescribeShippersResponse> {
|
|
1001
|
+
return this.request("DescribeShippers", req, cb)
|
|
934
1002
|
}
|
|
935
1003
|
|
|
936
1004
|
/**
|
|
937
|
-
*
|
|
1005
|
+
* 本接口用于获取仪表盘
|
|
938
1006
|
*/
|
|
939
|
-
async
|
|
940
|
-
req:
|
|
941
|
-
cb?: (error: string, rep:
|
|
942
|
-
): Promise<
|
|
943
|
-
return this.request("
|
|
1007
|
+
async DescribeDashboards(
|
|
1008
|
+
req: DescribeDashboardsRequest,
|
|
1009
|
+
cb?: (error: string, rep: DescribeDashboardsResponse) => void
|
|
1010
|
+
): Promise<DescribeDashboardsResponse> {
|
|
1011
|
+
return this.request("DescribeDashboards", req, cb)
|
|
944
1012
|
}
|
|
945
1013
|
|
|
946
1014
|
/**
|
|
947
|
-
*
|
|
1015
|
+
* 本接口用于修改cos导入任务
|
|
948
1016
|
*/
|
|
949
|
-
async
|
|
950
|
-
req:
|
|
951
|
-
cb?: (error: string, rep:
|
|
952
|
-
): Promise<
|
|
953
|
-
return this.request("
|
|
1017
|
+
async ModifyCosRecharge(
|
|
1018
|
+
req: ModifyCosRechargeRequest,
|
|
1019
|
+
cb?: (error: string, rep: ModifyCosRechargeResponse) => void
|
|
1020
|
+
): Promise<ModifyCosRechargeResponse> {
|
|
1021
|
+
return this.request("ModifyCosRecharge", req, cb)
|
|
954
1022
|
}
|
|
955
1023
|
|
|
956
1024
|
/**
|
|
@@ -964,53 +1032,187 @@ API返回数据包最大49MB,建议启用 gzip 压缩(HTTP Request Header Ac
|
|
|
964
1032
|
}
|
|
965
1033
|
|
|
966
1034
|
/**
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
async DescribeAlertRecordHistory(
|
|
970
|
-
req: DescribeAlertRecordHistoryRequest,
|
|
971
|
-
cb?: (error: string, rep: DescribeAlertRecordHistoryResponse) => void
|
|
972
|
-
): Promise<DescribeAlertRecordHistoryResponse> {
|
|
973
|
-
return this.request("DescribeAlertRecordHistory", req, cb)
|
|
974
|
-
}
|
|
1035
|
+
* ## 提示
|
|
1036
|
+
为了保障您日志数据的可靠性以及更高效地使用日志服务,建议您使用CLS优化后的接口[上传结构化日志](https://cloud.tencent.com/document/product/614/16873)。
|
|
975
1037
|
|
|
976
|
-
|
|
977
|
-
* 本接口用于删除日志主题。
|
|
978
|
-
*/
|
|
979
|
-
async DeleteTopic(
|
|
980
|
-
req: DeleteTopicRequest,
|
|
981
|
-
cb?: (error: string, rep: DeleteTopicResponse) => void
|
|
982
|
-
): Promise<DeleteTopicResponse> {
|
|
983
|
-
return this.request("DeleteTopic", req, cb)
|
|
984
|
-
}
|
|
1038
|
+
同时我们给此接口专门优化定制了多个语言版本的SDK供您选择,SDK提供统一的异步发送、资源控制、自动重试、优雅关闭、感知上报等功能,使上报日志功能更完善,详情请参考[SDK采集](https://cloud.tencent.com/document/product/614/67157)。
|
|
985
1039
|
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1040
|
+
同时云API上传日志接口也支持同步上传日志数据,如果您选择继续使用此接口请参考下文。
|
|
1041
|
+
|
|
1042
|
+
## 功能描述
|
|
1043
|
+
|
|
1044
|
+
本接口用于将日志写入到指定的日志主题。
|
|
1045
|
+
|
|
1046
|
+
日志服务提供以下两种模式:
|
|
1047
|
+
|
|
1048
|
+
#### 负载均衡模式
|
|
1049
|
+
|
|
1050
|
+
系统根据当前日志主题下所有可读写的分区,遵循负载均衡原则自动分配写入的目标分区。该模式适合消费不保序的场景。
|
|
1051
|
+
|
|
1052
|
+
#### 哈希路由模式
|
|
1053
|
+
|
|
1054
|
+
系统根据携带的哈希值(X-CLS-HashKey)将数据写入到符合范围要求的目标分区。例如,可以将某个日志源端通过 hashkey 与某个主题分区强绑定,这样可以保证数据在该分区上写入和消费是严格保序的。
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
#### 输入参数(pb二进制流,位于body中)
|
|
1059
|
+
|
|
1060
|
+
| 字段名 | 类型 | 位置 | 必须 | 含义 |
|
|
1061
|
+
| ------------ | ------- | ---- | ---- | ------------------------------------------------------------ |
|
|
1062
|
+
| logGroupList | message | pb | 是 | logGroup 列表,封装好的日志组列表内容,建议 logGroup 数量不要超过5个 |
|
|
1063
|
+
|
|
1064
|
+
LogGroup 说明:
|
|
1065
|
+
|
|
1066
|
+
| 字段名 | 是否必选 | 含义 |
|
|
1067
|
+
| ----------- | -------- | ------------------------------------------------------------ |
|
|
1068
|
+
| logs | 是 | 日志数组,表示有多个 Log 组成的集合,一个 Log 表示一条日志,一个 LogGroup 中 Log 个数不能超过10000 |
|
|
1069
|
+
| contextFlow | 否 | LogGroup 的唯一ID,需要使用上下文功能时传入。格式:"{上下文ID}-{LogGroupID}"。<br>上下文ID:唯一标识一个上下文(连续滚动的一系列日志文件,或者是需要保序的一系列日志),16进制64位整型字符串。<br>LogGroupID:连续递增的一串整型,16进制64位整型字符串。样例:"102700A66102516A-59F59"。 |
|
|
1070
|
+
| filename | 否 | 日志文件名 |
|
|
1071
|
+
| source | 否 | 日志来源,一般使用机器 IP 作为标识 |
|
|
1072
|
+
| logTags | 否 | 日志的标签列表 |
|
|
1073
|
+
|
|
1074
|
+
Log 说明:
|
|
1075
|
+
|
|
1076
|
+
| 字段名 | 是否必选 | 含义 |
|
|
1077
|
+
| -------- | -------- | ------------------------------------------------------------ |
|
|
1078
|
+
| time | 是 | 日志时间(Unix 格式时间戳),支持秒、毫秒,建议采用毫秒 |
|
|
1079
|
+
| contents | 否 | key-value 格式的日志内容,表示一条日志里的多个 key-value 组合 |
|
|
1080
|
+
|
|
1081
|
+
Content 说明:
|
|
1082
|
+
|
|
1083
|
+
| 字段名 | 是否必选 | 含义 |
|
|
1084
|
+
| ------ | -------- | ------------------------------------------------------------ |
|
|
1085
|
+
| key | 是 | 单条日志里某个字段组的 key 值,不能以`_`开头 |
|
|
1086
|
+
| value | 是 | 单条日志某个字段组的 value 值,单条日志 value 不能超过1MB,LogGroup 中所有 value 总和不能超过5MB |
|
|
1087
|
+
|
|
1088
|
+
LogTag 说明:
|
|
1089
|
+
|
|
1090
|
+
| 字段名 | 是否必选 | 含义 |
|
|
1091
|
+
| ------ | -------- | -------------------------------- |
|
|
1092
|
+
| key | 是 | 自定义的标签 key |
|
|
1093
|
+
| value | 是 | 自定义的标签 key 对应的 value 值 |
|
|
1094
|
+
|
|
1095
|
+
## PB 编译示例
|
|
1096
|
+
|
|
1097
|
+
本示例将说明如何使用官方 protoc 编译工具将 PB 描述文件 编译生成为 C++ 语言可调用的上传日志接口。
|
|
1098
|
+
|
|
1099
|
+
> ?目前 protoc 官方支持 Java、C++、Python 等语言的编译,详情请参见 [protoc](https://github.com/protocolbuffers/protobuf)。
|
|
1100
|
+
|
|
1101
|
+
#### 1. 安装 Protocol Buffer
|
|
1102
|
+
|
|
1103
|
+
下载 [Protocol Buffer](https://main.qcloudimg.com/raw/d7810aaf8b3073fbbc9d4049c21532aa/protobuf-2.6.1.tar.gz) ,解压并安装。示例版本为 protobuf 2.6.1,环境为 Centos 7.3 系统。 解压`protobuf-2.6.1.tar.gz`压缩包至`/usr/local`目录并进入该目录,执行命令如下:
|
|
1104
|
+
|
|
1105
|
+
```
|
|
1106
|
+
tar -zxvf protobuf-2.6.1.tar.gz -C /usr/local/ && cd /usr/local/protobuf-2.6.1
|
|
1107
|
+
```
|
|
1108
|
+
|
|
1109
|
+
开始编译和安装,配置环境变量,执行命令如下:
|
|
1110
|
+
|
|
1111
|
+
```
|
|
1112
|
+
[root@VM_0_8_centos protobuf-2.6.1]# ./configure
|
|
1113
|
+
[root@VM_0_8_centos protobuf-2.6.1]# make && make install
|
|
1114
|
+
[root@VM_0_8_centos protobuf-2.6.1]# export PATH=$PATH:/usr/local/protobuf-2.6.1/bin
|
|
1115
|
+
```
|
|
1116
|
+
|
|
1117
|
+
编译成功后,您可以使用以下命令查看版本:
|
|
1118
|
+
|
|
1119
|
+
```
|
|
1120
|
+
[root@VM_0_8_centos protobuf-2.6.1]# protoc --version
|
|
1121
|
+
liprotoc 2.6.1
|
|
1122
|
+
```
|
|
1123
|
+
|
|
1124
|
+
#### 2. 创建 PB 描述文件
|
|
1125
|
+
|
|
1126
|
+
PB 描述文件是通信双方约定的数据交换格式,上传日志时须将规定的协议格式编译成对应语言版本的调用接口,然后添加到工程代码里,详情请参见 [protoc](https://github.com/protocolbuffers/protobuf) 。
|
|
1127
|
+
|
|
1128
|
+
以日志服务所规定的 PB 数据格式内容为准, 在本地创建 PB 消息描述文件 cls.proto。
|
|
1129
|
+
|
|
1130
|
+
> !PB 描述文件内容不可更改,且文件名须以`.proto`结尾。
|
|
1131
|
+
|
|
1132
|
+
cls.proto 内容(PB 描述文件)如下:
|
|
1133
|
+
|
|
1134
|
+
```
|
|
1135
|
+
package cls;
|
|
1136
|
+
|
|
1137
|
+
message Log
|
|
1138
|
+
{
|
|
1139
|
+
message Content
|
|
1140
|
+
{
|
|
1141
|
+
required string key = 1; // 每组字段的 key
|
|
1142
|
+
required string value = 2; // 每组字段的 value
|
|
1143
|
+
}
|
|
1144
|
+
required int64 time = 1; // 时间戳,UNIX时间格式
|
|
1145
|
+
repeated Content contents = 2; // 一条日志里的多个kv组合
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
message LogTag
|
|
1149
|
+
{
|
|
1150
|
+
required string key = 1;
|
|
1151
|
+
required string value = 2;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
message LogGroup
|
|
1155
|
+
{
|
|
1156
|
+
repeated Log logs = 1; // 多条日志合成的日志数组
|
|
1157
|
+
optional string contextFlow = 2; // 目前暂无效用
|
|
1158
|
+
optional string filename = 3; // 日志文件名
|
|
1159
|
+
optional string source = 4; // 日志来源,一般使用机器IP
|
|
1160
|
+
repeated LogTag logTags = 5;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
message LogGroupList
|
|
1164
|
+
{
|
|
1165
|
+
repeated LogGroup logGroupList = 1; // 日志组列表
|
|
1166
|
+
}
|
|
1167
|
+
```
|
|
1168
|
+
|
|
1169
|
+
#### 3. 编译生成
|
|
1170
|
+
|
|
1171
|
+
此例中,使用 proto 编译器生成 C++ 语言的文件,在 cls.proto 文件的同一目录下,执行如下编译命令:
|
|
1172
|
+
|
|
1173
|
+
```
|
|
1174
|
+
protoc --cpp_out=./ ./cls.proto
|
|
1175
|
+
```
|
|
1176
|
+
|
|
1177
|
+
> ?`--cpp_out=./`表示编译成 cpp 格式并输出当前目录下,`./cls.proto`表示位于当前目录下的 cls.proto 描述文件。
|
|
1178
|
+
|
|
1179
|
+
编译成功后,会输出对应语言的代码文件。此例会生成 cls.pb.h 头文件和 [cls.pb.cc](http://cls.pb.cc) 代码实现文件,如下所示:
|
|
1180
|
+
|
|
1181
|
+
```
|
|
1182
|
+
[root@VM_0_8_centos protobuf-2.6.1]# protoc --cpp_out=./ ./cls.proto
|
|
1183
|
+
[root@VM_0_8_centos protobuf-2.6.1]# ls
|
|
1184
|
+
cls.pb.cc cls.pb.h cls.proto
|
|
1185
|
+
```
|
|
1186
|
+
|
|
1187
|
+
#### 4. 调用
|
|
1188
|
+
|
|
1189
|
+
将生成的 cls.pb.h 头文件引入代码中,调用接口进行数据格式封装。
|
|
1190
|
+
*/
|
|
1191
|
+
async UploadLog(
|
|
1192
|
+
req: UploadLogRequest,
|
|
1193
|
+
cb?: (error: string, rep: UploadLogResponse) => void
|
|
1194
|
+
): Promise<UploadLogResponse> {
|
|
1195
|
+
return this.request("UploadLog", req, cb)
|
|
994
1196
|
}
|
|
995
1197
|
|
|
996
1198
|
/**
|
|
997
|
-
*
|
|
1199
|
+
* 本接口用于创建定时SQL分析任务
|
|
998
1200
|
*/
|
|
999
|
-
async
|
|
1000
|
-
req:
|
|
1001
|
-
cb?: (error: string, rep:
|
|
1002
|
-
): Promise<
|
|
1003
|
-
return this.request("
|
|
1201
|
+
async CreateScheduledSql(
|
|
1202
|
+
req: CreateScheduledSqlRequest,
|
|
1203
|
+
cb?: (error: string, rep: CreateScheduledSqlResponse) => void
|
|
1204
|
+
): Promise<CreateScheduledSqlResponse> {
|
|
1205
|
+
return this.request("CreateScheduledSql", req, cb)
|
|
1004
1206
|
}
|
|
1005
1207
|
|
|
1006
1208
|
/**
|
|
1007
|
-
*
|
|
1209
|
+
* 本接口用于修改日志集信息
|
|
1008
1210
|
*/
|
|
1009
|
-
async
|
|
1010
|
-
req:
|
|
1011
|
-
cb?: (error: string, rep:
|
|
1012
|
-
): Promise<
|
|
1013
|
-
return this.request("
|
|
1211
|
+
async ModifyLogset(
|
|
1212
|
+
req: ModifyLogsetRequest,
|
|
1213
|
+
cb?: (error: string, rep: ModifyLogsetResponse) => void
|
|
1214
|
+
): Promise<ModifyLogsetResponse> {
|
|
1215
|
+
return this.request("ModifyLogset", req, cb)
|
|
1014
1216
|
}
|
|
1015
1217
|
|
|
1016
1218
|
/**
|
|
@@ -1023,36 +1225,6 @@ API返回数据包最大49MB,建议启用 gzip 压缩(HTTP Request Header Ac
|
|
|
1023
1225
|
return this.request("DescribeMachineGroupConfigs", req, cb)
|
|
1024
1226
|
}
|
|
1025
1227
|
|
|
1026
|
-
/**
|
|
1027
|
-
* 修改Kafka协议消费信息
|
|
1028
|
-
*/
|
|
1029
|
-
async ModifyKafkaConsumer(
|
|
1030
|
-
req: ModifyKafkaConsumerRequest,
|
|
1031
|
-
cb?: (error: string, rep: ModifyKafkaConsumerResponse) => void
|
|
1032
|
-
): Promise<ModifyKafkaConsumerResponse> {
|
|
1033
|
-
return this.request("ModifyKafkaConsumer", req, cb)
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
/**
|
|
1037
|
-
* 删除投递COS任务
|
|
1038
|
-
*/
|
|
1039
|
-
async DeleteShipper(
|
|
1040
|
-
req: DeleteShipperRequest,
|
|
1041
|
-
cb?: (error: string, rep: DeleteShipperResponse) => void
|
|
1042
|
-
): Promise<DeleteShipperResponse> {
|
|
1043
|
-
return this.request("DeleteShipper", req, cb)
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
/**
|
|
1047
|
-
* 本接口用于删除日志主题的索引配置,删除索引配置后将无法检索和查询采集到的日志。
|
|
1048
|
-
*/
|
|
1049
|
-
async DeleteIndex(
|
|
1050
|
-
req: DeleteIndexRequest,
|
|
1051
|
-
cb?: (error: string, rep: DeleteIndexResponse) => void
|
|
1052
|
-
): Promise<DeleteIndexResponse> {
|
|
1053
|
-
return this.request("DeleteIndex", req, cb)
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
1228
|
/**
|
|
1057
1229
|
* 本接口用于修改数据加工任务
|
|
1058
1230
|
*/
|
|
@@ -1064,33 +1236,15 @@ API返回数据包最大49MB,建议启用 gzip 压缩(HTTP Request Header Ac
|
|
|
1064
1236
|
}
|
|
1065
1237
|
|
|
1066
1238
|
/**
|
|
1067
|
-
|
|
1068
|
-
*/
|
|
1069
|
-
async ModifyShipper(
|
|
1070
|
-
req: ModifyShipperRequest,
|
|
1071
|
-
cb?: (error: string, rep: ModifyShipperResponse) => void
|
|
1072
|
-
): Promise<ModifyShipperResponse> {
|
|
1073
|
-
return this.request("ModifyShipper", req, cb)
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
/**
|
|
1077
|
-
* 本接口用于删除告警策略。
|
|
1078
|
-
*/
|
|
1079
|
-
async DeleteAlarm(
|
|
1080
|
-
req: DeleteAlarmRequest,
|
|
1081
|
-
cb?: (error: string, rep: DeleteAlarmResponse) => void
|
|
1082
|
-
): Promise<DeleteAlarmResponse> {
|
|
1083
|
-
return this.request("DeleteAlarm", req, cb)
|
|
1084
|
-
}
|
|
1239
|
+
* 本接口用于检索分析日志, 该接口除受默认接口请求频率限制外,针对单个日志主题,查询并发数不能超过15。
|
|
1085
1240
|
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
return this.request("DescribeKafkaConsumer", req, cb)
|
|
1241
|
+
API返回数据包最大49MB,建议启用 gzip 压缩(HTTP Request Header Accept-Encoding:gzip)。
|
|
1242
|
+
*/
|
|
1243
|
+
async SearchLog(
|
|
1244
|
+
req: SearchLogRequest,
|
|
1245
|
+
cb?: (error: string, rep: SearchLogResponse) => void
|
|
1246
|
+
): Promise<SearchLogResponse> {
|
|
1247
|
+
return this.request("SearchLog", req, cb)
|
|
1094
1248
|
}
|
|
1095
1249
|
|
|
1096
1250
|
/**
|
|
@@ -1114,113 +1268,23 @@ API返回数据包最大49MB,建议启用 gzip 压缩(HTTP Request Header Ac
|
|
|
1114
1268
|
}
|
|
1115
1269
|
|
|
1116
1270
|
/**
|
|
1117
|
-
*
|
|
1118
|
-
*/
|
|
1119
|
-
async ModifyAlarmNotice(
|
|
1120
|
-
req: ModifyAlarmNoticeRequest,
|
|
1121
|
-
cb?: (error: string, rep: ModifyAlarmNoticeResponse) => void
|
|
1122
|
-
): Promise<ModifyAlarmNoticeResponse> {
|
|
1123
|
-
return this.request("ModifyAlarmNotice", req, cb)
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
/**
|
|
1127
|
-
* 获取采集规则配置
|
|
1128
|
-
*/
|
|
1129
|
-
async DescribeConfigs(
|
|
1130
|
-
req: DescribeConfigsRequest,
|
|
1131
|
-
cb?: (error: string, rep: DescribeConfigsResponse) => void
|
|
1132
|
-
): Promise<DescribeConfigsResponse> {
|
|
1133
|
-
return this.request("DescribeConfigs", req, cb)
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
/**
|
|
1137
|
-
* 本接口用于创建cos导入任务
|
|
1138
|
-
*/
|
|
1139
|
-
async CreateCosRecharge(
|
|
1140
|
-
req: CreateCosRechargeRequest,
|
|
1141
|
-
cb?: (error: string, rep: CreateCosRechargeResponse) => void
|
|
1142
|
-
): Promise<CreateCosRechargeResponse> {
|
|
1143
|
-
return this.request("CreateCosRecharge", req, cb)
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
/**
|
|
1147
|
-
* 获取机器组信息列表
|
|
1148
|
-
*/
|
|
1149
|
-
async DescribeMachineGroups(
|
|
1150
|
-
req: DescribeMachineGroupsRequest,
|
|
1151
|
-
cb?: (error: string, rep: DescribeMachineGroupsResponse) => void
|
|
1152
|
-
): Promise<DescribeMachineGroupsResponse> {
|
|
1153
|
-
return this.request("DescribeMachineGroups", req, cb)
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
/**
|
|
1157
|
-
* 本接口用于合并一个读写态的主题分区,合并时指定一个主题分区 ID,日志服务会自动合并范围右相邻的分区。
|
|
1158
|
-
*/
|
|
1159
|
-
async MergePartition(
|
|
1160
|
-
req: MergePartitionRequest,
|
|
1161
|
-
cb?: (error: string, rep: MergePartitionResponse) => void
|
|
1162
|
-
): Promise<MergePartitionResponse> {
|
|
1163
|
-
return this.request("MergePartition", req, cb)
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
/**
|
|
1167
|
-
* 本接口用于创建特殊采集配置任务,特殊采集配置应用于自建K8S环境的采集Agent
|
|
1168
|
-
*/
|
|
1169
|
-
async CreateConfigExtra(
|
|
1170
|
-
req: CreateConfigExtraRequest,
|
|
1171
|
-
cb?: (error: string, rep: CreateConfigExtraResponse) => void
|
|
1172
|
-
): Promise<CreateConfigExtraResponse> {
|
|
1173
|
-
return this.request("CreateConfigExtra", req, cb)
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
/**
|
|
1177
|
-
* 本接口用于预览Kafka数据订阅任务客户日志信息
|
|
1178
|
-
*/
|
|
1179
|
-
async PreviewKafkaRecharge(
|
|
1180
|
-
req: PreviewKafkaRechargeRequest,
|
|
1181
|
-
cb?: (error: string, rep: PreviewKafkaRechargeResponse) => void
|
|
1182
|
-
): Promise<PreviewKafkaRechargeResponse> {
|
|
1183
|
-
return this.request("PreviewKafkaRecharge", req, cb)
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
/**
|
|
1187
|
-
* 获取采集规则配置所绑定的机器组
|
|
1188
|
-
*/
|
|
1189
|
-
async DescribeConfigMachineGroups(
|
|
1190
|
-
req: DescribeConfigMachineGroupsRequest,
|
|
1191
|
-
cb?: (error: string, rep: DescribeConfigMachineGroupsResponse) => void
|
|
1192
|
-
): Promise<DescribeConfigMachineGroupsResponse> {
|
|
1193
|
-
return this.request("DescribeConfigMachineGroups", req, cb)
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
/**
|
|
1197
|
-
* 本接口用于修改特殊采集配置任务,特殊采集配置应用于自建K8S环境的采集Agent
|
|
1198
|
-
*/
|
|
1199
|
-
async ModifyConfigExtra(
|
|
1200
|
-
req: ModifyConfigExtraRequest,
|
|
1201
|
-
cb?: (error: string, rep: ModifyConfigExtraResponse) => void
|
|
1202
|
-
): Promise<ModifyConfigExtraResponse> {
|
|
1203
|
-
return this.request("ModifyConfigExtra", req, cb)
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
/**
|
|
1207
|
-
* 本接口用于修改日志集信息
|
|
1271
|
+
* 获取制定机器组下的机器状态
|
|
1208
1272
|
*/
|
|
1209
|
-
async
|
|
1210
|
-
req:
|
|
1211
|
-
cb?: (error: string, rep:
|
|
1212
|
-
): Promise<
|
|
1213
|
-
return this.request("
|
|
1273
|
+
async DescribeMachines(
|
|
1274
|
+
req: DescribeMachinesRequest,
|
|
1275
|
+
cb?: (error: string, rep: DescribeMachinesResponse) => void
|
|
1276
|
+
): Promise<DescribeMachinesResponse> {
|
|
1277
|
+
return this.request("DescribeMachines", req, cb)
|
|
1214
1278
|
}
|
|
1215
1279
|
|
|
1216
1280
|
/**
|
|
1217
|
-
*
|
|
1281
|
+
* 重试失败的投递任务
|
|
1218
1282
|
*/
|
|
1219
|
-
async
|
|
1220
|
-
req:
|
|
1221
|
-
cb?: (error: string, rep:
|
|
1222
|
-
): Promise<
|
|
1223
|
-
return this.request("
|
|
1283
|
+
async RetryShipperTask(
|
|
1284
|
+
req: RetryShipperTaskRequest,
|
|
1285
|
+
cb?: (error: string, rep: RetryShipperTaskResponse) => void
|
|
1286
|
+
): Promise<RetryShipperTaskResponse> {
|
|
1287
|
+
return this.request("RetryShipperTask", req, cb)
|
|
1224
1288
|
}
|
|
1225
1289
|
|
|
1226
1290
|
/**
|
|
@@ -1234,52 +1298,12 @@ API返回数据包最大49MB,建议启用 gzip 压缩(HTTP Request Header Ac
|
|
|
1234
1298
|
}
|
|
1235
1299
|
|
|
1236
1300
|
/**
|
|
1237
|
-
*
|
|
1238
|
-
*/
|
|
1239
|
-
async CreateScheduledSql(
|
|
1240
|
-
req: CreateScheduledSqlRequest,
|
|
1241
|
-
cb?: (error: string, rep: CreateScheduledSqlResponse) => void
|
|
1242
|
-
): Promise<CreateScheduledSqlResponse> {
|
|
1243
|
-
return this.request("CreateScheduledSql", req, cb)
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
/**
|
|
1247
|
-
* 本接口仅创建下载任务,任务返回的下载地址,请用户调用DescribeExports查看任务列表。其中有下载地址CosPath参数。参考文档https://cloud.tencent.com/document/product/614/56449
|
|
1248
|
-
*/
|
|
1249
|
-
async CreateExport(
|
|
1250
|
-
req: CreateExportRequest,
|
|
1251
|
-
cb?: (error: string, rep: CreateExportResponse) => void
|
|
1252
|
-
): Promise<CreateExportResponse> {
|
|
1253
|
-
return this.request("CreateExport", req, cb)
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
/**
|
|
1257
|
-
* 本接口用于修改定时SQL分析任务
|
|
1258
|
-
*/
|
|
1259
|
-
async ModifyScheduledSql(
|
|
1260
|
-
req: ModifyScheduledSqlRequest,
|
|
1261
|
-
cb?: (error: string, rep: ModifyScheduledSqlResponse) => void
|
|
1262
|
-
): Promise<ModifyScheduledSqlResponse> {
|
|
1263
|
-
return this.request("ModifyScheduledSql", req, cb)
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
/**
|
|
1267
|
-
* 关闭Kafka协议消费
|
|
1268
|
-
*/
|
|
1269
|
-
async CloseKafkaConsumer(
|
|
1270
|
-
req: CloseKafkaConsumerRequest,
|
|
1271
|
-
cb?: (error: string, rep: CloseKafkaConsumerResponse) => void
|
|
1272
|
-
): Promise<CloseKafkaConsumerResponse> {
|
|
1273
|
-
return this.request("CloseKafkaConsumer", req, cb)
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
/**
|
|
1277
|
-
* 本接口用于获取告警策略列表。
|
|
1301
|
+
* 本接口用于删除日志主题。
|
|
1278
1302
|
*/
|
|
1279
|
-
async
|
|
1280
|
-
req:
|
|
1281
|
-
cb?: (error: string, rep:
|
|
1282
|
-
): Promise<
|
|
1283
|
-
return this.request("
|
|
1303
|
+
async DeleteTopic(
|
|
1304
|
+
req: DeleteTopicRequest,
|
|
1305
|
+
cb?: (error: string, rep: DeleteTopicResponse) => void
|
|
1306
|
+
): Promise<DeleteTopicResponse> {
|
|
1307
|
+
return this.request("DeleteTopic", req, cb)
|
|
1284
1308
|
}
|
|
1285
1309
|
}
|