tccli 3.0.1157.1__py2.py3-none-any.whl → 3.0.1159.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/services/ams/v20201229/api.json +328 -70
- tccli/services/ams/v20201229/examples.json +3 -3
- tccli/services/bi/v20220105/api.json +1 -1
- tccli/services/cat/v20180409/api.json +9 -0
- tccli/services/ccc/v20200210/api.json +3 -3
- tccli/services/cdb/v20170320/api.json +30 -3
- tccli/services/cdn/v20180606/api.json +86 -0
- tccli/services/cfw/cfw_client.py +53 -0
- tccli/services/cfw/v20190904/api.json +277 -0
- tccli/services/cfw/v20190904/examples.json +8 -0
- tccli/services/cls/v20201016/api.json +3 -3
- tccli/services/cls/v20201016/examples.json +1 -1
- tccli/services/cynosdb/v20190107/api.json +91 -0
- tccli/services/dbbrain/v20210527/api.json +10 -1
- tccli/services/ecm/v20190719/api.json +23 -5
- tccli/services/emr/emr_client.py +53 -0
- tccli/services/emr/v20190103/api.json +351 -98
- tccli/services/emr/v20190103/examples.json +11 -3
- tccli/services/ess/v20201111/api.json +32 -14
- tccli/services/ess/v20201111/examples.json +8 -2
- tccli/services/essbasic/v20210526/api.json +1 -1
- tccli/services/hunyuan/v20230901/api.json +114 -3
- tccli/services/mongodb/mongodb_client.py +53 -0
- tccli/services/mongodb/v20190725/api.json +71 -0
- tccli/services/mongodb/v20190725/examples.json +8 -0
- tccli/services/monitor/v20180724/api.json +8 -8
- tccli/services/ocr/v20181119/api.json +27 -0
- tccli/services/redis/v20180412/api.json +3 -3
- tccli/services/tke/tke_client.py +53 -0
- tccli/services/tke/v20180525/api.json +188 -0
- tccli/services/tke/v20180525/examples.json +8 -0
- tccli/services/trtc/v20190722/api.json +3 -3
- tccli/services/trtc/v20190722/examples.json +2 -2
- tccli/services/vm/v20201229/api.json +209 -45
- tccli/services/vm/v20201229/examples.json +1 -1
- tccli/services/vm/v20210922/api.json +25 -25
- tccli/services/vpc/v20170312/api.json +2 -1
- tccli/services/vpc/v20170312/examples.json +3 -3
- tccli/services/waf/v20180125/api.json +13 -13
- tccli/services/wedata/v20210820/api.json +10 -0
- {tccli-3.0.1157.1.dist-info → tccli-3.0.1159.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1157.1.dist-info → tccli-3.0.1159.1.dist-info}/RECORD +46 -46
- {tccli-3.0.1157.1.dist-info → tccli-3.0.1159.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1157.1.dist-info → tccli-3.0.1159.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1157.1.dist-info → tccli-3.0.1159.1.dist-info}/license_files/LICENSE +0 -0
@@ -350,6 +350,13 @@
|
|
350
350
|
"output": "DescribeNatAcRuleResponse",
|
351
351
|
"status": "online"
|
352
352
|
},
|
353
|
+
"DescribeNatFwDnatRule": {
|
354
|
+
"document": "查询Nat防火墙Dnat规则",
|
355
|
+
"input": "DescribeNatFwDnatRuleRequest",
|
356
|
+
"name": "查询Nat防火墙Dnat规则",
|
357
|
+
"output": "DescribeNatFwDnatRuleResponse",
|
358
|
+
"status": "online"
|
359
|
+
},
|
353
360
|
"DescribeNatFwInfoCount": {
|
354
361
|
"document": "获取当前用户接入nat防火墙的所有子网数及natfw实例个数",
|
355
362
|
"input": "DescribeNatFwInfoCountRequest",
|
@@ -4342,6 +4349,112 @@
|
|
4342
4349
|
],
|
4343
4350
|
"usage": "out"
|
4344
4351
|
},
|
4352
|
+
"DescNatDnatRule": {
|
4353
|
+
"document": "NAT防火墙Dnat规则列表",
|
4354
|
+
"members": [
|
4355
|
+
{
|
4356
|
+
"disabled": false,
|
4357
|
+
"document": "id\n注意:此字段可能返回 null,表示取不到有效值。",
|
4358
|
+
"example": "100",
|
4359
|
+
"member": "int64",
|
4360
|
+
"name": "Id",
|
4361
|
+
"output_required": false,
|
4362
|
+
"type": "int",
|
4363
|
+
"value_allowed_null": true
|
4364
|
+
},
|
4365
|
+
{
|
4366
|
+
"disabled": false,
|
4367
|
+
"document": "网络协议,可选值:TCP、UDP。\n注意:此字段可能返回 null,表示取不到有效值。",
|
4368
|
+
"example": "TCP",
|
4369
|
+
"member": "string",
|
4370
|
+
"name": "IpProtocol",
|
4371
|
+
"output_required": true,
|
4372
|
+
"type": "string",
|
4373
|
+
"value_allowed_null": true
|
4374
|
+
},
|
4375
|
+
{
|
4376
|
+
"disabled": false,
|
4377
|
+
"document": "弹性IP。\n注意:此字段可能返回 null,表示取不到有效值。",
|
4378
|
+
"example": "175.27.187.125",
|
4379
|
+
"member": "string",
|
4380
|
+
"name": "PublicIpAddress",
|
4381
|
+
"output_required": true,
|
4382
|
+
"type": "string",
|
4383
|
+
"value_allowed_null": true
|
4384
|
+
},
|
4385
|
+
{
|
4386
|
+
"disabled": false,
|
4387
|
+
"document": "公网端口。\n注意:此字段可能返回 null,表示取不到有效值。",
|
4388
|
+
"example": "80",
|
4389
|
+
"member": "int64",
|
4390
|
+
"name": "PublicPort",
|
4391
|
+
"output_required": true,
|
4392
|
+
"type": "int",
|
4393
|
+
"value_allowed_null": true
|
4394
|
+
},
|
4395
|
+
{
|
4396
|
+
"disabled": false,
|
4397
|
+
"document": "内网地址。\n注意:此字段可能返回 null,表示取不到有效值。",
|
4398
|
+
"example": "10.10.1.1",
|
4399
|
+
"member": "string",
|
4400
|
+
"name": "PrivateIpAddress",
|
4401
|
+
"output_required": true,
|
4402
|
+
"type": "string",
|
4403
|
+
"value_allowed_null": true
|
4404
|
+
},
|
4405
|
+
{
|
4406
|
+
"disabled": false,
|
4407
|
+
"document": "内网端口。\n注意:此字段可能返回 null,表示取不到有效值。",
|
4408
|
+
"example": "80",
|
4409
|
+
"member": "int64",
|
4410
|
+
"name": "PrivatePort",
|
4411
|
+
"output_required": true,
|
4412
|
+
"type": "int",
|
4413
|
+
"value_allowed_null": true
|
4414
|
+
},
|
4415
|
+
{
|
4416
|
+
"disabled": false,
|
4417
|
+
"document": "NAT防火墙转发规则描述。\n注意:此字段可能返回 null,表示取不到有效值。",
|
4418
|
+
"example": "test",
|
4419
|
+
"member": "string",
|
4420
|
+
"name": "Description",
|
4421
|
+
"output_required": false,
|
4422
|
+
"type": "string",
|
4423
|
+
"value_allowed_null": true
|
4424
|
+
},
|
4425
|
+
{
|
4426
|
+
"disabled": false,
|
4427
|
+
"document": "是否被关联引用,如被远程运维使用\n注意:此字段可能返回 null,表示取不到有效值。",
|
4428
|
+
"example": "0",
|
4429
|
+
"member": "int64",
|
4430
|
+
"name": "IsReferenced",
|
4431
|
+
"output_required": false,
|
4432
|
+
"type": "int",
|
4433
|
+
"value_allowed_null": true
|
4434
|
+
},
|
4435
|
+
{
|
4436
|
+
"disabled": false,
|
4437
|
+
"document": "所属防火墙实例id\n注意:此字段可能返回 null,表示取不到有效值。",
|
4438
|
+
"example": "cfwnat-xxx",
|
4439
|
+
"member": "string",
|
4440
|
+
"name": "FwInsId",
|
4441
|
+
"output_required": false,
|
4442
|
+
"type": "string",
|
4443
|
+
"value_allowed_null": true
|
4444
|
+
},
|
4445
|
+
{
|
4446
|
+
"disabled": false,
|
4447
|
+
"document": "关联的nat网关Id\n注意:此字段可能返回 null,表示取不到有效值。",
|
4448
|
+
"example": "nat-xxx",
|
4449
|
+
"member": "string",
|
4450
|
+
"name": "NatGwId",
|
4451
|
+
"output_required": false,
|
4452
|
+
"type": "string",
|
4453
|
+
"value_allowed_null": true
|
4454
|
+
}
|
4455
|
+
],
|
4456
|
+
"usage": "out"
|
4457
|
+
},
|
4345
4458
|
"DescribeAcListsRequest": {
|
4346
4459
|
"document": "DescribeAcLists请求参数结构体",
|
4347
4460
|
"members": [
|
@@ -4751,6 +4864,26 @@
|
|
4751
4864
|
"type": "int",
|
4752
4865
|
"value_allowed_null": false
|
4753
4866
|
},
|
4867
|
+
{
|
4868
|
+
"disabled": false,
|
4869
|
+
"document": "已使用的地址模版数",
|
4870
|
+
"example": "0",
|
4871
|
+
"member": "int64",
|
4872
|
+
"name": "UsedTemplateCount",
|
4873
|
+
"output_required": false,
|
4874
|
+
"type": "int",
|
4875
|
+
"value_allowed_null": false
|
4876
|
+
},
|
4877
|
+
{
|
4878
|
+
"disabled": false,
|
4879
|
+
"document": "地址模版配额数量",
|
4880
|
+
"example": "10",
|
4881
|
+
"member": "int64",
|
4882
|
+
"name": "TemplateQuotaCount",
|
4883
|
+
"output_required": false,
|
4884
|
+
"type": "int",
|
4885
|
+
"value_allowed_null": false
|
4886
|
+
},
|
4754
4887
|
{
|
4755
4888
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
4756
4889
|
"member": "string",
|
@@ -6077,6 +6210,7 @@
|
|
6077
6210
|
"example": "无",
|
6078
6211
|
"member": "string",
|
6079
6212
|
"name": "Data",
|
6213
|
+
"output_required": true,
|
6080
6214
|
"type": "string",
|
6081
6215
|
"value_allowed_null": false
|
6082
6216
|
},
|
@@ -6086,6 +6220,7 @@
|
|
6086
6220
|
"example": "100",
|
6087
6221
|
"member": "int64",
|
6088
6222
|
"name": "Total",
|
6223
|
+
"output_required": true,
|
6089
6224
|
"type": "int",
|
6090
6225
|
"value_allowed_null": false
|
6091
6226
|
},
|
@@ -6095,6 +6230,7 @@
|
|
6095
6230
|
"example": "0",
|
6096
6231
|
"member": "int64",
|
6097
6232
|
"name": "ReturnCode",
|
6233
|
+
"output_required": true,
|
6098
6234
|
"type": "int",
|
6099
6235
|
"value_allowed_null": false
|
6100
6236
|
},
|
@@ -6104,9 +6240,20 @@
|
|
6104
6240
|
"example": "success",
|
6105
6241
|
"member": "string",
|
6106
6242
|
"name": "ReturnMsg",
|
6243
|
+
"output_required": true,
|
6107
6244
|
"type": "string",
|
6108
6245
|
"value_allowed_null": false
|
6109
6246
|
},
|
6247
|
+
{
|
6248
|
+
"disabled": false,
|
6249
|
+
"document": "七层协议,NTA日志有效\n注意:此字段可能返回 null,表示取不到有效值。",
|
6250
|
+
"example": "无",
|
6251
|
+
"member": "string",
|
6252
|
+
"name": "AppProtocolList",
|
6253
|
+
"output_required": false,
|
6254
|
+
"type": "list",
|
6255
|
+
"value_allowed_null": true
|
6256
|
+
},
|
6110
6257
|
{
|
6111
6258
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
6112
6259
|
"member": "string",
|
@@ -6236,6 +6383,116 @@
|
|
6236
6383
|
],
|
6237
6384
|
"type": "object"
|
6238
6385
|
},
|
6386
|
+
"DescribeNatFwDnatRuleRequest": {
|
6387
|
+
"document": "DescribeNatFwDnatRule请求参数结构体",
|
6388
|
+
"members": [
|
6389
|
+
{
|
6390
|
+
"disabled": false,
|
6391
|
+
"document": "需要查询的索引,特定场景使用,可不填",
|
6392
|
+
"example": "无",
|
6393
|
+
"member": "string",
|
6394
|
+
"name": "Index",
|
6395
|
+
"required": false,
|
6396
|
+
"type": "string"
|
6397
|
+
},
|
6398
|
+
{
|
6399
|
+
"disabled": false,
|
6400
|
+
"document": "过滤条件组合",
|
6401
|
+
"example": "无",
|
6402
|
+
"member": "CommonFilter",
|
6403
|
+
"name": "Filters",
|
6404
|
+
"required": false,
|
6405
|
+
"type": "list"
|
6406
|
+
},
|
6407
|
+
{
|
6408
|
+
"disabled": false,
|
6409
|
+
"document": "每页条数",
|
6410
|
+
"example": "20",
|
6411
|
+
"member": "uint64",
|
6412
|
+
"name": "Limit",
|
6413
|
+
"required": false,
|
6414
|
+
"type": "int"
|
6415
|
+
},
|
6416
|
+
{
|
6417
|
+
"disabled": false,
|
6418
|
+
"document": "偏移值",
|
6419
|
+
"example": "0",
|
6420
|
+
"member": "uint64",
|
6421
|
+
"name": "Offset",
|
6422
|
+
"required": false,
|
6423
|
+
"type": "int"
|
6424
|
+
},
|
6425
|
+
{
|
6426
|
+
"disabled": false,
|
6427
|
+
"document": "检索的起始时间,可不传",
|
6428
|
+
"example": "无",
|
6429
|
+
"member": "string",
|
6430
|
+
"name": "StartTime",
|
6431
|
+
"required": false,
|
6432
|
+
"type": "string"
|
6433
|
+
},
|
6434
|
+
{
|
6435
|
+
"disabled": false,
|
6436
|
+
"document": "检索的截止时间,可不传",
|
6437
|
+
"example": "无",
|
6438
|
+
"member": "string",
|
6439
|
+
"name": "EndTime",
|
6440
|
+
"required": false,
|
6441
|
+
"type": "string"
|
6442
|
+
},
|
6443
|
+
{
|
6444
|
+
"disabled": false,
|
6445
|
+
"document": "desc:降序;asc:升序。根据By字段的值进行排序,这里传参的话则By也必须有值",
|
6446
|
+
"example": "desc",
|
6447
|
+
"member": "string",
|
6448
|
+
"name": "Order",
|
6449
|
+
"required": false,
|
6450
|
+
"type": "string"
|
6451
|
+
},
|
6452
|
+
{
|
6453
|
+
"disabled": false,
|
6454
|
+
"document": "排序所用到的字段",
|
6455
|
+
"example": "id",
|
6456
|
+
"member": "string",
|
6457
|
+
"name": "By",
|
6458
|
+
"required": false,
|
6459
|
+
"type": "string"
|
6460
|
+
}
|
6461
|
+
],
|
6462
|
+
"type": "object"
|
6463
|
+
},
|
6464
|
+
"DescribeNatFwDnatRuleResponse": {
|
6465
|
+
"document": "DescribeNatFwDnatRule返回参数结构体",
|
6466
|
+
"members": [
|
6467
|
+
{
|
6468
|
+
"disabled": false,
|
6469
|
+
"document": "Dnat规则列表\n注意:此字段可能返回 null,表示取不到有效值。",
|
6470
|
+
"example": "无",
|
6471
|
+
"member": "DescNatDnatRule",
|
6472
|
+
"name": "Data",
|
6473
|
+
"output_required": false,
|
6474
|
+
"type": "list",
|
6475
|
+
"value_allowed_null": true
|
6476
|
+
},
|
6477
|
+
{
|
6478
|
+
"disabled": false,
|
6479
|
+
"document": "列表总数",
|
6480
|
+
"example": "1",
|
6481
|
+
"member": "uint64",
|
6482
|
+
"name": "Total",
|
6483
|
+
"output_required": true,
|
6484
|
+
"type": "int",
|
6485
|
+
"value_allowed_null": false
|
6486
|
+
},
|
6487
|
+
{
|
6488
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
6489
|
+
"member": "string",
|
6490
|
+
"name": "RequestId",
|
6491
|
+
"type": "string"
|
6492
|
+
}
|
6493
|
+
],
|
6494
|
+
"type": "object"
|
6495
|
+
},
|
6239
6496
|
"DescribeNatFwInfoCountRequest": {
|
6240
6497
|
"document": "DescribeNatFwInfoCount请求参数结构体",
|
6241
6498
|
"members": [],
|
@@ -13720,6 +13977,26 @@
|
|
13720
13977
|
"output_required": true,
|
13721
13978
|
"type": "string",
|
13722
13979
|
"value_allowed_null": true
|
13980
|
+
},
|
13981
|
+
{
|
13982
|
+
"disabled": false,
|
13983
|
+
"document": "云联网模式下,当前实例是否需要开启重叠路由开关,1:需要开启,0:不需要开启\n注意:此字段可能返回 null,表示取不到有效值。",
|
13984
|
+
"example": "0",
|
13985
|
+
"member": "int64",
|
13986
|
+
"name": "NeedSwitchCcnOverlap",
|
13987
|
+
"output_required": false,
|
13988
|
+
"type": "int",
|
13989
|
+
"value_allowed_null": true
|
13990
|
+
},
|
13991
|
+
{
|
13992
|
+
"disabled": false,
|
13993
|
+
"document": "云联网模式下,实例关联的云联网id\n注意:此字段可能返回 null,表示取不到有效值。",
|
13994
|
+
"example": "ccn-xxx",
|
13995
|
+
"member": "string",
|
13996
|
+
"name": "CcnId",
|
13997
|
+
"output_required": false,
|
13998
|
+
"type": "string",
|
13999
|
+
"value_allowed_null": true
|
13723
14000
|
}
|
13724
14001
|
],
|
13725
14002
|
"usage": "out"
|
@@ -418,6 +418,14 @@
|
|
418
418
|
"title": "查询NAT访问控制列表"
|
419
419
|
}
|
420
420
|
],
|
421
|
+
"DescribeNatFwDnatRule": [
|
422
|
+
{
|
423
|
+
"document": "查询Nat防火墙Dnat规则",
|
424
|
+
"input": "POST / HTTP/1.1\nHost: cfw.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeNatFwDnatRule\n<公共请求参数>\n\n{\n \"Index\": \"abc\",\n \"Filters\": [\n {\n \"Name\": \"abc\",\n \"Values\": [\n \"abc\"\n ],\n \"OperatorType\": 0\n }\n ],\n \"Limit\": 1,\n \"Offset\": 1,\n \"StartTime\": \"abc\",\n \"EndTime\": \"abc\",\n \"Order\": \"abc\",\n \"By\": \"abc\"\n}",
|
425
|
+
"output": "{\n \"Response\": {\n \"Data\": [\n {\n \"Id\": 0,\n \"IpProtocol\": \"abc\",\n \"PublicIpAddress\": \"abc\",\n \"PublicPort\": 0,\n \"PrivateIpAddress\": \"abc\",\n \"PrivatePort\": 0,\n \"Description\": \"abc\",\n \"IsReferenced\": 0,\n \"FwInsId\": \"abc\",\n \"NatGwId\": \"abc\"\n }\n ],\n \"Total\": 1,\n \"RequestId\": \"abc\"\n }\n}",
|
426
|
+
"title": "查询Nat防火墙Dnat规则"
|
427
|
+
}
|
428
|
+
],
|
421
429
|
"DescribeNatFwInfoCount": [
|
422
430
|
{
|
423
431
|
"document": "",
|
@@ -673,7 +673,7 @@
|
|
673
673
|
"status": "online"
|
674
674
|
},
|
675
675
|
"UploadLog": {
|
676
|
-
"document": "## 提示\n为了保障您日志数据的可靠性以及更高效地使用日志服务,建议您使用CLS优化后的接口[上传结构化日志](https://cloud.tencent.com/document/product/614/16873)。\n\n同时我们给此接口专门优化定制了多个语言版本的SDK供您选择,SDK提供统一的异步发送、资源控制、自动重试、优雅关闭、感知上报等功能,使上报日志功能更完善,详情请参考[SDK采集](https://cloud.tencent.com/document/product/614/67157)。\n\n同时云API上传日志接口也支持同步上传日志数据,如果您选择继续使用此接口请参考下文。\n\n## 功能描述\n\n本接口用于将日志写入到指定的日志主题。\n\n
|
676
|
+
"document": "## 提示\n为了保障您日志数据的可靠性以及更高效地使用日志服务,建议您使用CLS优化后的接口[上传结构化日志](https://cloud.tencent.com/document/product/614/16873)。\n\n同时我们给此接口专门优化定制了多个语言版本的SDK供您选择,SDK提供统一的异步发送、资源控制、自动重试、优雅关闭、感知上报等功能,使上报日志功能更完善,详情请参考[SDK采集](https://cloud.tencent.com/document/product/614/67157)。\n\n同时云API上传日志接口也支持同步上传日志数据,如果您选择继续使用此接口请参考下文。\n\n## 功能描述\n\n本接口用于将日志写入到指定的日志主题。\n\n#### 输入参数(pb二进制流,位于body中)\n\n| 字段名 | 类型 | 位置 | 必须 | 含义 |\n| ------------ | ------- | ---- | ---- | ------------------------------------------------------------ |\n| logGroupList | message | pb | 是 | logGroup 列表,封装好的日志组列表内容,建议 logGroup 数量不要超过5个 |\n\nLogGroup 说明:\n\n| 字段名 | 是否必选 | 含义 |\n| ----------- | -------- | ------------------------------------------------------------ |\n| logs | 是 | 日志数组,表示有多个 Log 组成的集合,一个 Log 表示一条日志,一个 LogGroup 中 Log 个数不能超过10000 |\n| contextFlow | 否 | LogGroup 的唯一ID,需要使用上下文功能时传入。格式:\"{上下文ID}-{LogGroupID}\"。<br>上下文ID:唯一标识一个上下文(连续滚动的一系列日志文件,或者是需要保序的一系列日志),16进制64位整型字符串。<br>LogGroupID:连续递增的一串整型,16进制64位整型字符串。样例:\"102700A66102516A-59F59\"。 |\n| filename | 否 | 日志文件名 |\n| source | 否 | 日志来源,一般使用机器 IP 作为标识 |\n| logTags | 否 | 日志的标签列表 |\n\nLog 说明:\n\n| 字段名 | 是否必选 | 含义 |\n| -------- | -------- | ------------------------------------------------------------ |\n| time | 是 | 日志时间(Unix 格式时间戳),支持秒、毫秒,建议采用毫秒 |\n| contents | 否 | key-value 格式的日志内容,表示一条日志里的多个 key-value 组合 |\n\nContent 说明:\n\n| 字段名 | 是否必选 | 含义 |\n| ------ | -------- | ------------------------------------------------------------ |\n| key | 是 | 单条日志里某个字段组的 key 值,不能以`_`开头 |\n| value | 是 | 单条日志某个字段组的 value 值,单条日志 value 不能超过1MB,LogGroup 中所有 value 总和不能超过5MB |\n\nLogTag 说明:\n\n| 字段名 | 是否必选 | 含义 |\n| ------ | -------- | -------------------------------- |\n| key | 是 | 自定义的标签 key |\n| value | 是 | 自定义的标签 key 对应的 value 值 |\n\n## PB 编译示例\n\n本示例将说明如何使用官方 protoc 编译工具将 PB 描述文件 编译生成为 C++ 语言可调用的上传日志接口。\n\n> ?目前 protoc 官方支持 Java、C++、Python 等语言的编译,详情请参见 [protoc](https://github.com/protocolbuffers/protobuf)。\n\n#### 1. 安装 Protocol Buffer\n\n下载 [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`目录并进入该目录,执行命令如下:\n\n```\ntar -zxvf protobuf-2.6.1.tar.gz -C /usr/local/ && cd /usr/local/protobuf-2.6.1\n```\n\n开始编译和安装,配置环境变量,执行命令如下:\n\n```\n[root@VM_0_8_centos protobuf-2.6.1]# ./configure \n[root@VM_0_8_centos protobuf-2.6.1]# make && make install\n[root@VM_0_8_centos protobuf-2.6.1]# export PATH=$PATH:/usr/local/protobuf-2.6.1/bin\n```\n\n编译成功后,您可以使用以下命令查看版本:\n\n```\n[root@VM_0_8_centos protobuf-2.6.1]# protoc --version\nliprotoc 2.6.1\n```\n\n#### 2. 创建 PB 描述文件\n\nPB 描述文件是通信双方约定的数据交换格式,上传日志时须将规定的协议格式编译成对应语言版本的调用接口,然后添加到工程代码里,详情请参见 [protoc](https://github.com/protocolbuffers/protobuf) 。\n\n以日志服务所规定的 PB 数据格式内容为准, 在本地创建 PB 消息描述文件 cls.proto。\n\n> !PB 描述文件内容不可更改,且文件名须以`.proto`结尾。\n\ncls.proto 内容(PB 描述文件)如下:\n\n```\npackage cls;\n\nmessage Log\n{\n message Content\n {\n required string key = 1; // 每组字段的 key\n required string value = 2; // 每组字段的 value\n }\n required int64 time = 1; // 时间戳,UNIX时间格式\n repeated Content contents = 2; // 一条日志里的多个kv组合\n}\n\nmessage LogTag\n{\n required string key = 1;\n required string value = 2;\n}\n\nmessage LogGroup\n{\n repeated Log logs = 1; // 多条日志合成的日志数组\n optional string contextFlow = 2; // 目前暂无效用\n optional string filename = 3; // 日志文件名\n optional string source = 4; // 日志来源,一般使用机器IP\n repeated LogTag logTags = 5;\n}\n\nmessage LogGroupList\n{\n repeated LogGroup logGroupList = 1; // 日志组列表\n}\n```\n\n#### 3. 编译生成\n\n此例中,使用 proto 编译器生成 C++ 语言的文件,在 cls.proto 文件的同一目录下,执行如下编译命令:\n\n```\nprotoc --cpp_out=./ ./cls.proto \n```\n\n> ?`--cpp_out=./`表示编译成 cpp 格式并输出当前目录下,`./cls.proto`表示位于当前目录下的 cls.proto 描述文件。\n\n编译成功后,会输出对应语言的代码文件。此例会生成 cls.pb.h 头文件和 [cls.pb.cc](http://cls.pb.cc) 代码实现文件,如下所示:\n\n```\n[root@VM_0_8_centos protobuf-2.6.1]# protoc --cpp_out=./ ./cls.proto\n[root@VM_0_8_centos protobuf-2.6.1]# ls\ncls.pb.cc cls.pb.h cls.proto\n```\n\n#### 4. 调用\n\n将生成的 cls.pb.h 头文件引入代码中,调用接口进行数据格式封装。",
|
677
677
|
"input": "UploadLogRequest",
|
678
678
|
"name": "上传日志",
|
679
679
|
"output": "UploadLogResponse",
|
@@ -13833,8 +13833,8 @@
|
|
13833
13833
|
"type": "string"
|
13834
13834
|
},
|
13835
13835
|
{
|
13836
|
-
"disabled":
|
13837
|
-
"document": "
|
13836
|
+
"disabled": true,
|
13837
|
+
"document": "该参数已废弃,请勿使用",
|
13838
13838
|
"example": "0fffffffffffffffffffffffffffffff",
|
13839
13839
|
"member": "string",
|
13840
13840
|
"name": "HashKey",
|
@@ -807,7 +807,7 @@
|
|
807
807
|
"UploadLog": [
|
808
808
|
{
|
809
809
|
"document": "上传日志",
|
810
|
-
"input": "POST / HTTP/1.1\nHost: cls.tencentcloudapi.com\nContent-Type: application/octet-stream\nX-TC-Action: UploadLog\n<公共请求参数>\n\n{\n \"
|
810
|
+
"input": "POST / HTTP/1.1\nHost: cls.tencentcloudapi.com\nContent-Type: application/octet-stream\nX-TC-Action: UploadLog\n<公共请求参数>\n\n{\n \"TopicId\": \"abc\",\n \"CompressType\": \"abc\"\n}",
|
811
811
|
"output": "{\n \"Response\": {\n \"RequestId\": \"6ef60bec-0242-43af-bb20-270359fb54a7\"\n }\n}",
|
812
812
|
"title": "上传日志"
|
813
813
|
}
|
@@ -3824,6 +3824,24 @@
|
|
3824
3824
|
"name": "CLSInfoList",
|
3825
3825
|
"required": true,
|
3826
3826
|
"type": "list"
|
3827
|
+
},
|
3828
|
+
{
|
3829
|
+
"disabled": false,
|
3830
|
+
"document": "日志类型",
|
3831
|
+
"example": "无",
|
3832
|
+
"member": "string",
|
3833
|
+
"name": "LogType",
|
3834
|
+
"required": false,
|
3835
|
+
"type": "string"
|
3836
|
+
},
|
3837
|
+
{
|
3838
|
+
"disabled": false,
|
3839
|
+
"document": "是否维护时间运行",
|
3840
|
+
"example": "无",
|
3841
|
+
"member": "string",
|
3842
|
+
"name": "IsInMaintainPeriod",
|
3843
|
+
"required": false,
|
3844
|
+
"type": "string"
|
3827
3845
|
}
|
3828
3846
|
],
|
3829
3847
|
"type": "object"
|
@@ -7678,6 +7696,24 @@
|
|
7678
7696
|
"name": "CLSTopicIds",
|
7679
7697
|
"required": true,
|
7680
7698
|
"type": "list"
|
7699
|
+
},
|
7700
|
+
{
|
7701
|
+
"disabled": false,
|
7702
|
+
"document": "日志类型",
|
7703
|
+
"example": "无",
|
7704
|
+
"member": "string",
|
7705
|
+
"name": "LogType",
|
7706
|
+
"required": false,
|
7707
|
+
"type": "string"
|
7708
|
+
},
|
7709
|
+
{
|
7710
|
+
"disabled": false,
|
7711
|
+
"document": "是否维护时间运行",
|
7712
|
+
"example": "无",
|
7713
|
+
"member": "string",
|
7714
|
+
"name": "IsInMaintainPeriod",
|
7715
|
+
"required": false,
|
7716
|
+
"type": "string"
|
7681
7717
|
}
|
7682
7718
|
],
|
7683
7719
|
"type": "object"
|
@@ -9708,6 +9744,15 @@
|
|
9708
9744
|
"name": "InstanceId",
|
9709
9745
|
"required": true,
|
9710
9746
|
"type": "string"
|
9747
|
+
},
|
9748
|
+
{
|
9749
|
+
"disabled": false,
|
9750
|
+
"document": "日志类型",
|
9751
|
+
"example": "无",
|
9752
|
+
"member": "string",
|
9753
|
+
"name": "LogType",
|
9754
|
+
"required": false,
|
9755
|
+
"type": "string"
|
9711
9756
|
}
|
9712
9757
|
],
|
9713
9758
|
"type": "object"
|
@@ -12638,6 +12683,16 @@
|
|
12638
12683
|
"output_required": false,
|
12639
12684
|
"type": "string",
|
12640
12685
|
"value_allowed_null": true
|
12686
|
+
},
|
12687
|
+
{
|
12688
|
+
"disabled": false,
|
12689
|
+
"document": "日志类型\n注意:此字段可能返回 null,表示取不到有效值。",
|
12690
|
+
"example": "无",
|
12691
|
+
"member": "string",
|
12692
|
+
"name": "LogType",
|
12693
|
+
"output_required": false,
|
12694
|
+
"type": "string",
|
12695
|
+
"value_allowed_null": true
|
12641
12696
|
}
|
12642
12697
|
],
|
12643
12698
|
"usage": "out"
|
@@ -19656,6 +19711,24 @@
|
|
19656
19711
|
"name": "CLSTopicIds",
|
19657
19712
|
"required": true,
|
19658
19713
|
"type": "list"
|
19714
|
+
},
|
19715
|
+
{
|
19716
|
+
"disabled": false,
|
19717
|
+
"document": "日志类型",
|
19718
|
+
"example": "无",
|
19719
|
+
"member": "string",
|
19720
|
+
"name": "LogType",
|
19721
|
+
"required": false,
|
19722
|
+
"type": "string"
|
19723
|
+
},
|
19724
|
+
{
|
19725
|
+
"disabled": false,
|
19726
|
+
"document": "是否维护时间运行",
|
19727
|
+
"example": "无",
|
19728
|
+
"member": "string",
|
19729
|
+
"name": "IsInMaintainPeriod",
|
19730
|
+
"required": false,
|
19731
|
+
"type": "string"
|
19659
19732
|
}
|
19660
19733
|
],
|
19661
19734
|
"type": "object"
|
@@ -19702,6 +19775,24 @@
|
|
19702
19775
|
"name": "CLSTopicIds",
|
19703
19776
|
"required": true,
|
19704
19777
|
"type": "list"
|
19778
|
+
},
|
19779
|
+
{
|
19780
|
+
"disabled": false,
|
19781
|
+
"document": "日志类型",
|
19782
|
+
"example": "无",
|
19783
|
+
"member": "string",
|
19784
|
+
"name": "LogType",
|
19785
|
+
"required": false,
|
19786
|
+
"type": "string"
|
19787
|
+
},
|
19788
|
+
{
|
19789
|
+
"disabled": false,
|
19790
|
+
"document": "是否维护时间运行",
|
19791
|
+
"example": "无",
|
19792
|
+
"member": "string",
|
19793
|
+
"name": "IsInMaintainPeriod",
|
19794
|
+
"required": false,
|
19795
|
+
"type": "string"
|
19705
19796
|
}
|
19706
19797
|
],
|
19707
19798
|
"type": "object"
|
@@ -1575,6 +1575,15 @@
|
|
1575
1575
|
"required": false,
|
1576
1576
|
"type": "string"
|
1577
1577
|
},
|
1578
|
+
{
|
1579
|
+
"disabled": false,
|
1580
|
+
"document": "任务过滤条件,支持多个关键字匹配,与Info参数互斥。",
|
1581
|
+
"example": "where",
|
1582
|
+
"member": "string",
|
1583
|
+
"name": "Infos",
|
1584
|
+
"required": false,
|
1585
|
+
"type": "list"
|
1586
|
+
},
|
1578
1587
|
{
|
1579
1588
|
"disabled": false,
|
1580
1589
|
"document": "任务过滤条件,用户类型。",
|
@@ -1614,7 +1623,7 @@
|
|
1614
1623
|
"example": "1",
|
1615
1624
|
"member": "int64",
|
1616
1625
|
"name": "Status",
|
1617
|
-
"
|
1626
|
+
"output_required": true,
|
1618
1627
|
"type": "int",
|
1619
1628
|
"value_allowed_null": false
|
1620
1629
|
},
|
@@ -10657,7 +10657,7 @@
|
|
10657
10657
|
{
|
10658
10658
|
"disabled": false,
|
10659
10659
|
"document": "VPC实例ID。形如:vpc-f49l6u0z。",
|
10660
|
-
"example": "",
|
10660
|
+
"example": "vpc-m7sr81gh",
|
10661
10661
|
"member": "string",
|
10662
10662
|
"name": "VpcId",
|
10663
10663
|
"required": true,
|
@@ -10666,7 +10666,7 @@
|
|
10666
10666
|
{
|
10667
10667
|
"disabled": false,
|
10668
10668
|
"document": "ECM 地域",
|
10669
|
-
"example": "",
|
10669
|
+
"example": "ap-shenyang-ecm-cu",
|
10670
10670
|
"member": "string",
|
10671
10671
|
"name": "EcmRegion",
|
10672
10672
|
"required": true,
|
@@ -10675,7 +10675,7 @@
|
|
10675
10675
|
{
|
10676
10676
|
"disabled": false,
|
10677
10677
|
"document": "私有网络名称,可任意命名,但不得超过60个字符。",
|
10678
|
-
"example": "",
|
10678
|
+
"example": "TEST",
|
10679
10679
|
"member": "string",
|
10680
10680
|
"name": "VpcName",
|
10681
10681
|
"required": false,
|
@@ -10684,7 +10684,7 @@
|
|
10684
10684
|
{
|
10685
10685
|
"disabled": false,
|
10686
10686
|
"document": "标签",
|
10687
|
-
"example": "",
|
10687
|
+
"example": "无",
|
10688
10688
|
"member": "Tag",
|
10689
10689
|
"name": "Tags",
|
10690
10690
|
"required": false,
|
@@ -10693,11 +10693,29 @@
|
|
10693
10693
|
{
|
10694
10694
|
"disabled": false,
|
10695
10695
|
"document": "私有网络描述",
|
10696
|
-
"example": "",
|
10696
|
+
"example": "TEST",
|
10697
10697
|
"member": "string",
|
10698
10698
|
"name": "Description",
|
10699
10699
|
"required": false,
|
10700
10700
|
"type": "string"
|
10701
|
+
},
|
10702
|
+
{
|
10703
|
+
"disabled": false,
|
10704
|
+
"document": "DNS地址,最多支持4个,第1个默认为主,其余为备。\t",
|
10705
|
+
"example": "['183.60.83.19']",
|
10706
|
+
"member": "string",
|
10707
|
+
"name": "DnsServers",
|
10708
|
+
"required": false,
|
10709
|
+
"type": "list"
|
10710
|
+
},
|
10711
|
+
{
|
10712
|
+
"disabled": false,
|
10713
|
+
"document": "域名。",
|
10714
|
+
"example": "TEST",
|
10715
|
+
"member": "string",
|
10716
|
+
"name": "DomainName",
|
10717
|
+
"required": false,
|
10718
|
+
"type": "string"
|
10701
10719
|
}
|
10702
10720
|
],
|
10703
10721
|
"type": "object"
|