tccli 3.0.1291.1__py2.py3-none-any.whl → 3.0.1293.1__py2.py3-none-any.whl
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.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +3 -0
- tccli/services/advisor/v20200721/api.json +36 -36
- tccli/services/advisor/v20200721/examples.json +2 -2
- tccli/services/antiddos/antiddos_client.py +7 -113
- tccli/services/antiddos/v20200309/api.json +41 -401
- tccli/services/antiddos/v20200309/examples.json +1 -17
- tccli/services/apm/v20210622/api.json +44 -44
- tccli/services/apm/v20210622/examples.json +5 -5
- tccli/services/batch/v20170312/api.json +165 -165
- tccli/services/batch/v20170312/examples.json +1 -1
- tccli/services/cam/v20190116/api.json +18 -18
- tccli/services/cdwch/v20200915/api.json +303 -219
- tccli/services/cdwch/v20200915/examples.json +18 -18
- tccli/services/cdwpg/v20201230/api.json +135 -128
- tccli/services/cdwpg/v20201230/examples.json +5 -5
- tccli/services/chc/__init__.py +4 -0
- tccli/services/chc/chc_client.py +2062 -0
- tccli/services/chc/v20230418/api.json +5728 -0
- tccli/services/chc/v20230418/examples.json +293 -0
- tccli/services/ckafka/v20190819/api.json +1049 -1039
- tccli/services/ckafka/v20190819/examples.json +1 -1
- tccli/services/cls/v20201016/api.json +310 -310
- tccli/services/cls/v20201016/examples.json +1 -1
- tccli/services/dbbrain/dbbrain_client.py +240 -28
- tccli/services/dbbrain/v20191016/api.json +7 -7
- tccli/services/dbbrain/v20210527/api.json +487 -15
- tccli/services/dbbrain/v20210527/examples.json +32 -0
- tccli/services/domain/v20180808/api.json +2 -2
- tccli/services/ecdn/ecdn_client.py +7 -431
- tccli/services/ecdn/v20191012/api.json +0 -574
- tccli/services/ecdn/v20191012/examples.json +0 -64
- tccli/services/emr/v20190103/api.json +249 -13
- tccli/services/emr/v20190103/examples.json +2 -2
- tccli/services/ess/v20201111/api.json +12 -3
- tccli/services/essbasic/v20210526/api.json +9 -0
- tccli/services/gs/gs_client.py +1778 -29
- tccli/services/gs/v20191118/api.json +2618 -163
- tccli/services/gs/v20191118/examples.json +264 -0
- tccli/services/hai/v20230812/api.json +22 -22
- tccli/services/hunyuan/v20230901/api.json +13 -2
- tccli/services/iotexplorer/iotexplorer_client.py +53 -0
- tccli/services/iotexplorer/v20190423/api.json +72 -0
- tccli/services/iotexplorer/v20190423/examples.json +8 -0
- tccli/services/iotvideoindustry/v20201201/api.json +75 -75
- tccli/services/iotvideoindustry/v20201201/examples.json +1 -1
- tccli/services/lke/lke_client.py +0 -53
- tccli/services/lke/v20231130/api.json +14 -57
- tccli/services/lke/v20231130/examples.json +2 -10
- tccli/services/lkeap/v20240522/api.json +1 -1
- tccli/services/memcached/v20190318/api.json +1 -1
- tccli/services/mmps/v20200710/api.json +12 -12
- tccli/services/monitor/monitor_client.py +57 -4
- tccli/services/monitor/v20180724/api.json +249 -0
- tccli/services/monitor/v20180724/examples.json +8 -0
- tccli/services/mqtt/v20240516/api.json +13 -13
- tccli/services/mqtt/v20240516/examples.json +1 -1
- tccli/services/redis/v20180412/api.json +2 -2
- tccli/services/svp/v20240125/api.json +3 -3
- tccli/services/svp/v20240125/examples.json +1 -1
- tccli/services/tchd/v20230306/api.json +5 -5
- tccli/services/tcr/v20190924/api.json +22 -22
- tccli/services/tdmq/v20200217/api.json +267 -267
- tccli/services/teo/teo_client.py +53 -0
- tccli/services/teo/v20220901/api.json +50 -7
- tccli/services/teo/v20220901/examples.json +8 -0
- tccli/services/thpc/v20220401/api.json +9 -9
- tccli/services/thpc/v20230321/api.json +59 -47
- tccli/services/tione/v20211111/api.json +40 -1
- tccli/services/tke/v20180525/api.json +29 -29
- tccli/services/vpc/v20170312/api.json +1 -1
- tccli/services/wedata/v20210820/api.json +227 -13
- tccli/services/wedata/v20210820/examples.json +2 -8
- {tccli-3.0.1291.1.dist-info → tccli-3.0.1293.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1291.1.dist-info → tccli-3.0.1293.1.dist-info}/RECORD +78 -74
- {tccli-3.0.1291.1.dist-info → tccli-3.0.1293.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1291.1.dist-info → tccli-3.0.1293.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1291.1.dist-info → tccli-3.0.1293.1.dist-info}/license_files/LICENSE +0 -0
@@ -630,13 +630,6 @@
|
|
630
630
|
"output": "RenameDocResponse",
|
631
631
|
"status": "online"
|
632
632
|
},
|
633
|
-
"ResetSession": {
|
634
|
-
"document": "重置会话",
|
635
|
-
"input": "ResetSessionRequest",
|
636
|
-
"name": "重置会话",
|
637
|
-
"output": "ResetSessionResponse",
|
638
|
-
"status": "online"
|
639
|
-
},
|
640
633
|
"RetryDocAudit": {
|
641
634
|
"document": "文档解析重试",
|
642
635
|
"input": "RetryDocAuditRequest",
|
@@ -666,7 +659,7 @@
|
|
666
659
|
"status": "online"
|
667
660
|
},
|
668
661
|
"SaveDoc": {
|
669
|
-
"document": "知识库文档问答保存。\n将文件存储到应用的知识库内需要三步:\n1.获取临时密钥,参考[接口文档](https://cloud.tencent.com/document/product/1759/105050)
|
662
|
+
"document": "知识库文档问答保存。\n将文件存储到应用的知识库内需要三步:\n1.获取临时密钥,参考[接口文档](https://cloud.tencent.com/document/product/1759/105050)。获取临时密钥不同参数组合权限不一样,可参考 [知识引擎操作 cos 指南](https://cloud.tencent.com/document/product/1759/116238)\n2.调用腾讯云提供的 cos 存储接口,将文件存储到知识引擎 cos 中:具体可参考[ COS SDK 概览](https://cloud.tencent.com/document/product/436/6474), 注意使用的是临时密钥的方式操作 COS \n3.调用本接口,将文件的基础信息存储到知识引擎中。\n以上步骤可参考[文档](https://cloud.tencent.com/document/product/1759/108903),文档最后有[代码demo](https://cloud.tencent.com/document/product/1759/108903#demo),可作为参考。",
|
670
663
|
"input": "SaveDocRequest",
|
671
664
|
"name": "知识库文档问答保存",
|
672
665
|
"output": "SaveDocResponse",
|
@@ -4476,7 +4469,7 @@
|
|
4476
4469
|
{
|
4477
4470
|
"disabled": false,
|
4478
4471
|
"document": "QA业务ID\n",
|
4479
|
-
"example": "
|
4472
|
+
"example": "1903999940055016768",
|
4480
4473
|
"member": "string",
|
4481
4474
|
"name": "QaBizId",
|
4482
4475
|
"required": true,
|
@@ -4485,7 +4478,7 @@
|
|
4485
4478
|
{
|
4486
4479
|
"disabled": false,
|
4487
4480
|
"document": "应用ID",
|
4488
|
-
"example": "
|
4481
|
+
"example": "1887842680054218000",
|
4489
4482
|
"member": "string",
|
4490
4483
|
"name": "BotBizId",
|
4491
4484
|
"required": true,
|
@@ -4500,7 +4493,7 @@
|
|
4500
4493
|
{
|
4501
4494
|
"disabled": false,
|
4502
4495
|
"document": "QA业务ID\n",
|
4503
|
-
"example": "
|
4496
|
+
"example": "1903999940055016768",
|
4504
4497
|
"member": "string",
|
4505
4498
|
"name": "QaBizId",
|
4506
4499
|
"output_required": false,
|
@@ -4510,7 +4503,7 @@
|
|
4510
4503
|
{
|
4511
4504
|
"disabled": false,
|
4512
4505
|
"document": "问题\n",
|
4513
|
-
"example": "
|
4506
|
+
"example": "哪吒2",
|
4514
4507
|
"member": "string",
|
4515
4508
|
"name": "Question",
|
4516
4509
|
"output_required": false,
|
@@ -4520,7 +4513,7 @@
|
|
4520
4513
|
{
|
4521
4514
|
"disabled": false,
|
4522
4515
|
"document": "答案\n",
|
4523
|
-
"example": "
|
4516
|
+
"example": "《哪吒之魔童闹海》(亦称《哪吒贰之魔童闹海》,简称《哪吒2》",
|
4524
4517
|
"member": "string",
|
4525
4518
|
"name": "Answer",
|
4526
4519
|
"output_required": false,
|
@@ -4539,8 +4532,8 @@
|
|
4539
4532
|
},
|
4540
4533
|
{
|
4541
4534
|
"disabled": false,
|
4542
|
-
"document": "
|
4543
|
-
"example": "
|
4535
|
+
"document": "来源 1-文档生成问答对 2-批量导入问答对 3-单条手动录入问答对",
|
4536
|
+
"example": "3",
|
4544
4537
|
"member": "uint64",
|
4545
4538
|
"name": "Source",
|
4546
4539
|
"output_required": false,
|
@@ -4550,7 +4543,7 @@
|
|
4550
4543
|
{
|
4551
4544
|
"disabled": false,
|
4552
4545
|
"document": "来源描述\n",
|
4553
|
-
"example": "
|
4546
|
+
"example": "手动录入",
|
4554
4547
|
"member": "string",
|
4555
4548
|
"name": "SourceDesc",
|
4556
4549
|
"output_required": false,
|
@@ -4560,7 +4553,7 @@
|
|
4560
4553
|
{
|
4561
4554
|
"disabled": false,
|
4562
4555
|
"document": "更新时间\n",
|
4563
|
-
"example": "
|
4556
|
+
"example": "1742783938",
|
4564
4557
|
"member": "string",
|
4565
4558
|
"name": "UpdateTime",
|
4566
4559
|
"output_required": false,
|
@@ -4569,8 +4562,8 @@
|
|
4569
4562
|
},
|
4570
4563
|
{
|
4571
4564
|
"disabled": false,
|
4572
|
-
"document": "
|
4573
|
-
"example": "
|
4565
|
+
"document": "状态 <br>1-未校验 2-未发布 3-发布中 4-已发布 5-发布失败 6-不采纳 7-审核中 8-审核失败 9-审核失败申诉后人工审核中 11-审核失败申诉后人工审核不通过 12-已过期 13-超量失效 14-超量失效恢复 19-学习中 20-学习失败",
|
4566
|
+
"example": "2",
|
4574
4567
|
"member": "int64",
|
4575
4568
|
"name": "Status",
|
4576
4569
|
"output_required": false,
|
@@ -4580,7 +4573,7 @@
|
|
4580
4573
|
{
|
4581
4574
|
"disabled": false,
|
4582
4575
|
"document": "状态描述\n",
|
4583
|
-
"example": "
|
4576
|
+
"example": "未发布",
|
4584
4577
|
"member": "string",
|
4585
4578
|
"name": "StatusDesc",
|
4586
4579
|
"output_required": false,
|
@@ -4590,7 +4583,7 @@
|
|
4590
4583
|
{
|
4591
4584
|
"disabled": false,
|
4592
4585
|
"document": "分类ID\n",
|
4593
|
-
"example": "
|
4586
|
+
"example": "1887842680872108032",
|
4594
4587
|
"member": "string",
|
4595
4588
|
"name": "CateBizId",
|
4596
4589
|
"output_required": false,
|
@@ -13318,42 +13311,6 @@
|
|
13318
13311
|
],
|
13319
13312
|
"type": "object"
|
13320
13313
|
},
|
13321
|
-
"ResetSessionRequest": {
|
13322
|
-
"document": "ResetSession请求参数结构体",
|
13323
|
-
"members": [
|
13324
|
-
{
|
13325
|
-
"disabled": false,
|
13326
|
-
"document": "会话ID",
|
13327
|
-
"example": "无",
|
13328
|
-
"member": "string",
|
13329
|
-
"name": "SessionId",
|
13330
|
-
"required": true,
|
13331
|
-
"type": "string"
|
13332
|
-
},
|
13333
|
-
{
|
13334
|
-
"disabled": false,
|
13335
|
-
"document": "是否仅清空会话关联",
|
13336
|
-
"example": "无",
|
13337
|
-
"member": "bool",
|
13338
|
-
"name": "IsOnlyEmptyTheDialog",
|
13339
|
-
"required": false,
|
13340
|
-
"type": "bool"
|
13341
|
-
}
|
13342
|
-
],
|
13343
|
-
"type": "object"
|
13344
|
-
},
|
13345
|
-
"ResetSessionResponse": {
|
13346
|
-
"document": "ResetSession返回参数结构体",
|
13347
|
-
"members": [
|
13348
|
-
{
|
13349
|
-
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
13350
|
-
"member": "string",
|
13351
|
-
"name": "RequestId",
|
13352
|
-
"type": "string"
|
13353
|
-
}
|
13354
|
-
],
|
13355
|
-
"type": "object"
|
13356
|
-
},
|
13357
13314
|
"RetryDocAuditRequest": {
|
13358
13315
|
"document": "RetryDocAudit请求参数结构体",
|
13359
13316
|
"members": [
|
@@ -235,8 +235,8 @@
|
|
235
235
|
"DescribeQA": [
|
236
236
|
{
|
237
237
|
"document": "获取QA详情",
|
238
|
-
"input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeQA\n<公共请求参数>\n\n{\n \"
|
239
|
-
"output": "{\n \"Response\": {\n \"Answer\": \"
|
238
|
+
"input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeQA\n<公共请求参数>\n\n{\n \"BotBizId\": \"1887842680054218752\",\n \"QaBizId\": \"1903999940055016768\"\n}",
|
239
|
+
"output": "{\n \"Response\": {\n \"Answer\": \"《**哪吒之魔童闹海**》(亦称《**哪吒贰之魔童闹海**》,简称《**哪吒2**》)。\",\n \"AttrLabels\": [],\n \"AttrRange\": 1,\n \"CateBizId\": \"1887842680872108032\",\n \"CustomParam\": \"\",\n \"DocBizId\": \"0\",\n \"ExpireEnd\": \"0\",\n \"ExpireStart\": \"1742783934\",\n \"FileName\": \"\",\n \"FileType\": \"\",\n \"Highlights\": [],\n \"IsAllowAccept\": false,\n \"IsAllowDelete\": true,\n \"IsAllowEdit\": true,\n \"OrgData\": \"\",\n \"PageContent\": \"\",\n \"PicAuditStatus\": 0,\n \"QaAuditStatus\": 0,\n \"QaBizId\": \"1903999940055016768\",\n \"Question\": \"哪吒2\",\n \"QuestionDesc\": \"\",\n \"RequestId\": \"7250f0e2-6d40-476a-aa15-0b5a51269a05\",\n \"SegmentBizId\": \"0\",\n \"SimilarQuestions\": [],\n \"Source\": 3,\n \"SourceDesc\": \"手动录入\",\n \"Status\": 2,\n \"StatusDesc\": \"待发布\",\n \"UpdateTime\": \"1742783970\",\n \"VideoAuditStatus\": 0\n }\n}",
|
240
240
|
"title": "获取QA详情"
|
241
241
|
}
|
242
242
|
],
|
@@ -732,14 +732,6 @@
|
|
732
732
|
"title": "重命名文档-提交成功"
|
733
733
|
}
|
734
734
|
],
|
735
|
-
"ResetSession": [
|
736
|
-
{
|
737
|
-
"document": "",
|
738
|
-
"input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ResetSession\n<公共请求参数>\n\n{\n \"SessionId\": \"your session id\"\n}",
|
739
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"76ad8e10-2e25-4702-8b15-1dbbe4ee2c3b\"\n }\n}",
|
740
|
-
"title": "重置会话"
|
741
|
-
}
|
742
|
-
],
|
743
735
|
"RetryDocAudit": [
|
744
736
|
{
|
745
737
|
"document": "文档审核重试",
|
@@ -15,7 +15,7 @@
|
|
15
15
|
"status": "online"
|
16
16
|
},
|
17
17
|
"CreateKnowledgeBase": {
|
18
|
-
"document": "用于在系统中创建一个新的知识库。知识库是一个用于存储和管理知识条目的集合,可以包括文档、问答对、属性标签等。创建知识库后,可以向其中添加各种知识条目,以便在后续的知识检索中使用。
|
18
|
+
"document": "用于在系统中创建一个新的知识库。知识库是一个用于存储和管理知识条目的集合,可以包括文档、问答对、属性标签等。创建知识库后,可以向其中添加各种知识条目,以便在后续的知识检索中使用。 使用场景:当需要在系统中建立一个新的知识库以存储和管理特定领域或项目的知识条目时使用。例如,一个用户可能需要创建一个知识库,以存储用户指南、常见问题解答和技术文档。体验用户最多可创建3个知识库,付费用户最多可创建100个知识库。",
|
19
19
|
"input": "CreateKnowledgeBaseRequest",
|
20
20
|
"name": "创建知识库",
|
21
21
|
"output": "CreateKnowledgeBaseResponse",
|
@@ -245,7 +245,7 @@
|
|
245
245
|
},
|
246
246
|
{
|
247
247
|
"disabled": false,
|
248
|
-
"document": "地域id
|
248
|
+
"document": "地域id。1--广州 4--上海 5-- 香港 6--多伦多 7--上海金融 8--北京 9-- 新加坡 11--深圳金融 15--美西(硅谷)16--成都 17--德国 18--韩国 19--重庆 22--美东(弗吉尼亚)23--泰国 25--日本",
|
249
249
|
"example": "1",
|
250
250
|
"member": "int64",
|
251
251
|
"name": "RegionId",
|
@@ -1208,7 +1208,7 @@
|
|
1208
1208
|
"example": "0",
|
1209
1209
|
"member": "int64",
|
1210
1210
|
"name": "Ret",
|
1211
|
-
"
|
1211
|
+
"output_required": true,
|
1212
1212
|
"type": "int",
|
1213
1213
|
"value_allowed_null": false
|
1214
1214
|
},
|
@@ -1218,7 +1218,7 @@
|
|
1218
1218
|
"example": "wx66e50f1e*******6f",
|
1219
1219
|
"member": "string",
|
1220
1220
|
"name": "MiniAppID",
|
1221
|
-
"
|
1221
|
+
"output_required": true,
|
1222
1222
|
"type": "string",
|
1223
1223
|
"value_allowed_null": false
|
1224
1224
|
},
|
@@ -1228,39 +1228,39 @@
|
|
1228
1228
|
"example": "1",
|
1229
1229
|
"member": "int64",
|
1230
1230
|
"name": "Mode",
|
1231
|
-
"
|
1231
|
+
"output_required": true,
|
1232
1232
|
"type": "int",
|
1233
1233
|
"value_allowed_null": false
|
1234
1234
|
},
|
1235
1235
|
{
|
1236
1236
|
"disabled": false,
|
1237
|
-
"document": "小程序测试账号(自有账号体系需提供,其他情况不需要)
|
1237
|
+
"document": "小程序测试账号(自有账号体系需提供,其他情况不需要)",
|
1238
1238
|
"example": "Test",
|
1239
1239
|
"member": "string",
|
1240
1240
|
"name": "MiniAppTestAccount",
|
1241
|
-
"
|
1241
|
+
"output_required": true,
|
1242
1242
|
"type": "string",
|
1243
|
-
"value_allowed_null":
|
1243
|
+
"value_allowed_null": false
|
1244
1244
|
},
|
1245
1245
|
{
|
1246
1246
|
"disabled": false,
|
1247
|
-
"document": "小程序测试密码(自有账号体系需提供,其他情况不需要)
|
1247
|
+
"document": "小程序测试密码(自有账号体系需提供,其他情况不需要)",
|
1248
1248
|
"example": "TestPwd",
|
1249
1249
|
"member": "string",
|
1250
1250
|
"name": "MiniAppTestPwd",
|
1251
|
-
"
|
1251
|
+
"output_required": true,
|
1252
1252
|
"type": "string",
|
1253
|
-
"value_allowed_null":
|
1253
|
+
"value_allowed_null": false
|
1254
1254
|
},
|
1255
1255
|
{
|
1256
1256
|
"disabled": false,
|
1257
|
-
"document": "诊断扫描版本 0:正式版 1
|
1257
|
+
"document": "诊断扫描版本 0:正式版 1:体验版",
|
1258
1258
|
"example": "0",
|
1259
1259
|
"member": "int64",
|
1260
1260
|
"name": "ScanVersion",
|
1261
|
-
"
|
1261
|
+
"output_required": true,
|
1262
1262
|
"type": "int",
|
1263
|
-
"value_allowed_null":
|
1263
|
+
"value_allowed_null": false
|
1264
1264
|
},
|
1265
1265
|
{
|
1266
1266
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
@@ -2515,7 +2515,7 @@ def doDescribePolicyConditionList(args, parsed_globals):
|
|
2515
2515
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2516
2516
|
|
2517
2517
|
|
2518
|
-
def
|
2518
|
+
def doCreateConditionsTemplate(args, parsed_globals):
|
2519
2519
|
g_param = parse_global_arg(parsed_globals)
|
2520
2520
|
|
2521
2521
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2544,11 +2544,11 @@ def doModifyAlarmPolicyCondition(args, parsed_globals):
|
|
2544
2544
|
client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
|
2545
2545
|
client._sdkVersion += ("_CLI_" + __version__)
|
2546
2546
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2547
|
-
model = models.
|
2547
|
+
model = models.CreateConditionsTemplateRequest()
|
2548
2548
|
model.from_json_string(json.dumps(args))
|
2549
2549
|
start_time = time.time()
|
2550
2550
|
while True:
|
2551
|
-
rsp = client.
|
2551
|
+
rsp = client.CreateConditionsTemplate(model)
|
2552
2552
|
result = rsp.to_json_string()
|
2553
2553
|
try:
|
2554
2554
|
json_obj = json.loads(result)
|
@@ -7559,6 +7559,58 @@ def doDescribeStatisticData(args, parsed_globals):
|
|
7559
7559
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7560
7560
|
|
7561
7561
|
|
7562
|
+
def doModifyAlarmPolicyCondition(args, parsed_globals):
|
7563
|
+
g_param = parse_global_arg(parsed_globals)
|
7564
|
+
|
7565
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
7566
|
+
cred = credential.CVMRoleCredential()
|
7567
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7568
|
+
cred = credential.STSAssumeRoleCredential(
|
7569
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7570
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7571
|
+
)
|
7572
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
7573
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
7574
|
+
else:
|
7575
|
+
cred = credential.Credential(
|
7576
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
7577
|
+
)
|
7578
|
+
http_profile = HttpProfile(
|
7579
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
7580
|
+
reqMethod="POST",
|
7581
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
7582
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
7583
|
+
)
|
7584
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
7585
|
+
if g_param[OptionsDefine.Language]:
|
7586
|
+
profile.language = g_param[OptionsDefine.Language]
|
7587
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
7588
|
+
client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
|
7589
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
7590
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7591
|
+
model = models.ModifyAlarmPolicyConditionRequest()
|
7592
|
+
model.from_json_string(json.dumps(args))
|
7593
|
+
start_time = time.time()
|
7594
|
+
while True:
|
7595
|
+
rsp = client.ModifyAlarmPolicyCondition(model)
|
7596
|
+
result = rsp.to_json_string()
|
7597
|
+
try:
|
7598
|
+
json_obj = json.loads(result)
|
7599
|
+
except TypeError as e:
|
7600
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
7601
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
7602
|
+
break
|
7603
|
+
cur_time = time.time()
|
7604
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
7605
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
7606
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
7607
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
7608
|
+
else:
|
7609
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
7610
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
7611
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7612
|
+
|
7613
|
+
|
7562
7614
|
def doBindingPolicyTag(args, parsed_globals):
|
7563
7615
|
g_param = parse_global_arg(parsed_globals)
|
7564
7616
|
|
@@ -8400,7 +8452,7 @@ ACTION_MAP = {
|
|
8400
8452
|
"CreatePrometheusMultiTenantInstancePostPayMode": doCreatePrometheusMultiTenantInstancePostPayMode,
|
8401
8453
|
"UpdateGrafanaEnvironments": doUpdateGrafanaEnvironments,
|
8402
8454
|
"DescribePolicyConditionList": doDescribePolicyConditionList,
|
8403
|
-
"
|
8455
|
+
"CreateConditionsTemplate": doCreateConditionsTemplate,
|
8404
8456
|
"GetPrometheusAgentManagementCommand": doGetPrometheusAgentManagementCommand,
|
8405
8457
|
"DescribePrometheusAgents": doDescribePrometheusAgents,
|
8406
8458
|
"UpdatePrometheusScrapeJob": doUpdatePrometheusScrapeJob,
|
@@ -8497,6 +8549,7 @@ ACTION_MAP = {
|
|
8497
8549
|
"DescribeAllNamespaces": doDescribeAllNamespaces,
|
8498
8550
|
"CreateServiceDiscovery": doCreateServiceDiscovery,
|
8499
8551
|
"DescribeStatisticData": doDescribeStatisticData,
|
8552
|
+
"ModifyAlarmPolicyCondition": doModifyAlarmPolicyCondition,
|
8500
8553
|
"BindingPolicyTag": doBindingPolicyTag,
|
8501
8554
|
"DescribeAlarmNoticeCallbacks": doDescribeAlarmNoticeCallbacks,
|
8502
8555
|
"DestroyPrometheusInstance": doDestroyPrometheusInstance,
|
@@ -56,6 +56,13 @@
|
|
56
56
|
"output": "CreateAlertRuleResponse",
|
57
57
|
"status": "online"
|
58
58
|
},
|
59
|
+
"CreateConditionsTemplate": {
|
60
|
+
"document": "创建告警条件模板",
|
61
|
+
"input": "CreateConditionsTemplateRequest",
|
62
|
+
"name": "创建告警条件模板",
|
63
|
+
"output": "CreateConditionsTemplateResponse",
|
64
|
+
"status": "online"
|
65
|
+
},
|
59
66
|
"CreateExporterIntegration": {
|
60
67
|
"document": "创建集成中心 exporter 集成,因集成较多,建议控制台创建集成。(前提:已授权创建托管 EKS 集群,验证方式:1. 控制台界面确认,未提示授权则表示已授权创建;2. 通过 DescribePrometheusInstanceInitStatus 接口查询集群状态,如果托管集群不存在,可通过 RunPrometheusInstance 接口创建)",
|
61
68
|
"input": "CreateExporterIntegrationRequest",
|
@@ -3893,6 +3900,124 @@
|
|
3893
3900
|
],
|
3894
3901
|
"type": "object"
|
3895
3902
|
},
|
3903
|
+
"CreateConditionsTemplateRequest": {
|
3904
|
+
"document": "CreateConditionsTemplate请求参数结构体",
|
3905
|
+
"members": [
|
3906
|
+
{
|
3907
|
+
"disabled": false,
|
3908
|
+
"document": "固定值,monitor",
|
3909
|
+
"example": "monitor,",
|
3910
|
+
"member": "string",
|
3911
|
+
"name": "Module",
|
3912
|
+
"required": true,
|
3913
|
+
"type": "string"
|
3914
|
+
},
|
3915
|
+
{
|
3916
|
+
"disabled": false,
|
3917
|
+
"document": "视图名",
|
3918
|
+
"example": "cvm_device,",
|
3919
|
+
"member": "string",
|
3920
|
+
"name": "ViewName",
|
3921
|
+
"required": true,
|
3922
|
+
"type": "string"
|
3923
|
+
},
|
3924
|
+
{
|
3925
|
+
"disabled": false,
|
3926
|
+
"document": "组名",
|
3927
|
+
"example": "测试API新增,",
|
3928
|
+
"member": "string",
|
3929
|
+
"name": "GroupName",
|
3930
|
+
"required": true,
|
3931
|
+
"type": "string"
|
3932
|
+
},
|
3933
|
+
{
|
3934
|
+
"disabled": false,
|
3935
|
+
"document": "是否为与关系",
|
3936
|
+
"example": "0,",
|
3937
|
+
"member": "int64",
|
3938
|
+
"name": "IsUnionRule",
|
3939
|
+
"required": false,
|
3940
|
+
"type": "int"
|
3941
|
+
},
|
3942
|
+
{
|
3943
|
+
"disabled": false,
|
3944
|
+
"document": "备注",
|
3945
|
+
"example": "测试API创建一下模板,",
|
3946
|
+
"member": "string",
|
3947
|
+
"name": "Remark",
|
3948
|
+
"required": false,
|
3949
|
+
"type": "string"
|
3950
|
+
},
|
3951
|
+
{
|
3952
|
+
"disabled": false,
|
3953
|
+
"document": "父ID",
|
3954
|
+
"example": "无",
|
3955
|
+
"member": "int64",
|
3956
|
+
"name": "ParentGroupID",
|
3957
|
+
"required": false,
|
3958
|
+
"type": "int"
|
3959
|
+
},
|
3960
|
+
{
|
3961
|
+
"disabled": false,
|
3962
|
+
"document": "是否屏蔽",
|
3963
|
+
"example": "无",
|
3964
|
+
"member": "int64",
|
3965
|
+
"name": "IsShielded",
|
3966
|
+
"required": false,
|
3967
|
+
"type": "int"
|
3968
|
+
},
|
3969
|
+
{
|
3970
|
+
"disabled": false,
|
3971
|
+
"document": "复合告警表达式",
|
3972
|
+
"example": "无",
|
3973
|
+
"member": "string",
|
3974
|
+
"name": "ComplexExpression",
|
3975
|
+
"required": false,
|
3976
|
+
"type": "string"
|
3977
|
+
},
|
3978
|
+
{
|
3979
|
+
"disabled": false,
|
3980
|
+
"document": "指标告警条件",
|
3981
|
+
"example": "无",
|
3982
|
+
"member": "ModifyConditionsTemplateRequestCondition",
|
3983
|
+
"name": "Conditions",
|
3984
|
+
"required": false,
|
3985
|
+
"type": "list"
|
3986
|
+
},
|
3987
|
+
{
|
3988
|
+
"disabled": false,
|
3989
|
+
"document": "事件告警条件",
|
3990
|
+
"example": "无",
|
3991
|
+
"member": "ModifyConditionsTemplateRequestEventCondition",
|
3992
|
+
"name": "EventConditions",
|
3993
|
+
"required": false,
|
3994
|
+
"type": "list"
|
3995
|
+
}
|
3996
|
+
],
|
3997
|
+
"type": "object"
|
3998
|
+
},
|
3999
|
+
"CreateConditionsTemplateResponse": {
|
4000
|
+
"document": "CreateConditionsTemplate返回参数结构体",
|
4001
|
+
"members": [
|
4002
|
+
{
|
4003
|
+
"disabled": false,
|
4004
|
+
"document": "模板策略组ID",
|
4005
|
+
"example": "1998842",
|
4006
|
+
"member": "int64",
|
4007
|
+
"name": "GroupID",
|
4008
|
+
"output_required": true,
|
4009
|
+
"type": "int",
|
4010
|
+
"value_allowed_null": false
|
4011
|
+
},
|
4012
|
+
{
|
4013
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
4014
|
+
"member": "string",
|
4015
|
+
"name": "RequestId",
|
4016
|
+
"type": "string"
|
4017
|
+
}
|
4018
|
+
],
|
4019
|
+
"type": "object"
|
4020
|
+
},
|
3896
4021
|
"CreateExporterIntegrationRequest": {
|
3897
4022
|
"document": "CreateExporterIntegration请求参数结构体",
|
3898
4023
|
"members": [
|
@@ -15991,6 +16116,130 @@
|
|
15991
16116
|
],
|
15992
16117
|
"type": "object"
|
15993
16118
|
},
|
16119
|
+
"ModifyConditionsTemplateRequestCondition": {
|
16120
|
+
"document": "ModifyConditionsTemplateRequestCondition,Condition入参字段值",
|
16121
|
+
"members": [
|
16122
|
+
{
|
16123
|
+
"disabled": false,
|
16124
|
+
"document": "统计周期",
|
16125
|
+
"example": "60",
|
16126
|
+
"member": "string",
|
16127
|
+
"name": "CalcPeriod",
|
16128
|
+
"required": true,
|
16129
|
+
"type": "string"
|
16130
|
+
},
|
16131
|
+
{
|
16132
|
+
"disabled": false,
|
16133
|
+
"document": "统计方式",
|
16134
|
+
"example": "1",
|
16135
|
+
"member": "string",
|
16136
|
+
"name": "CalcType",
|
16137
|
+
"required": true,
|
16138
|
+
"type": "string"
|
16139
|
+
},
|
16140
|
+
{
|
16141
|
+
"disabled": false,
|
16142
|
+
"document": "持续周期",
|
16143
|
+
"example": "1",
|
16144
|
+
"member": "string",
|
16145
|
+
"name": "ContinuePeriod",
|
16146
|
+
"required": true,
|
16147
|
+
"type": "string"
|
16148
|
+
},
|
16149
|
+
{
|
16150
|
+
"disabled": false,
|
16151
|
+
"document": "指标ID",
|
16152
|
+
"example": "\"33\"",
|
16153
|
+
"member": "int64",
|
16154
|
+
"name": "MetricID",
|
16155
|
+
"required": true,
|
16156
|
+
"type": "int"
|
16157
|
+
},
|
16158
|
+
{
|
16159
|
+
"disabled": false,
|
16160
|
+
"document": "统计值",
|
16161
|
+
"example": "0",
|
16162
|
+
"member": "string",
|
16163
|
+
"name": "CalcValue",
|
16164
|
+
"required": true,
|
16165
|
+
"type": "string"
|
16166
|
+
},
|
16167
|
+
{
|
16168
|
+
"disabled": false,
|
16169
|
+
"document": "告警通知周期",
|
16170
|
+
"example": "86400",
|
16171
|
+
"member": "string",
|
16172
|
+
"name": "AlarmNotifyPeriod",
|
16173
|
+
"required": false,
|
16174
|
+
"type": "string"
|
16175
|
+
},
|
16176
|
+
{
|
16177
|
+
"disabled": false,
|
16178
|
+
"document": "告警通知方式",
|
16179
|
+
"example": "0",
|
16180
|
+
"member": "int64",
|
16181
|
+
"name": "AlarmNotifyType",
|
16182
|
+
"required": false,
|
16183
|
+
"type": "int"
|
16184
|
+
},
|
16185
|
+
{
|
16186
|
+
"disabled": false,
|
16187
|
+
"document": "规则ID",
|
16188
|
+
"example": "无",
|
16189
|
+
"member": "int64",
|
16190
|
+
"name": "RuleID",
|
16191
|
+
"required": false,
|
16192
|
+
"type": "int"
|
16193
|
+
}
|
16194
|
+
],
|
16195
|
+
"usage": "in"
|
16196
|
+
},
|
16197
|
+
"ModifyConditionsTemplateRequestEventCondition": {
|
16198
|
+
"document": "ModifyConditionsTemplateRequestEventCondition",
|
16199
|
+
"members": [
|
16200
|
+
{
|
16201
|
+
"disabled": false,
|
16202
|
+
"document": "告警通知周期",
|
16203
|
+
"example": "",
|
16204
|
+
"member": "string",
|
16205
|
+
"name": "AlarmNotifyPeriod",
|
16206
|
+
"required": true,
|
16207
|
+
"type": "string",
|
16208
|
+
"value_allowed_null": false
|
16209
|
+
},
|
16210
|
+
{
|
16211
|
+
"disabled": false,
|
16212
|
+
"document": "告警通知方式",
|
16213
|
+
"example": "",
|
16214
|
+
"member": "string",
|
16215
|
+
"name": "AlarmNotifyType",
|
16216
|
+
"required": true,
|
16217
|
+
"type": "string",
|
16218
|
+
"value_allowed_null": false
|
16219
|
+
},
|
16220
|
+
{
|
16221
|
+
"disabled": false,
|
16222
|
+
"document": "事件ID",
|
16223
|
+
"example": "",
|
16224
|
+
"member": "string",
|
16225
|
+
"name": "EventID",
|
16226
|
+
"required": true,
|
16227
|
+
"type": "string",
|
16228
|
+
"value_allowed_null": false
|
16229
|
+
},
|
16230
|
+
{
|
16231
|
+
"disabled": false,
|
16232
|
+
"document": "规则ID",
|
16233
|
+
"example": "",
|
16234
|
+
"member": "int64",
|
16235
|
+
"name": "RuleID",
|
16236
|
+
"required": false,
|
16237
|
+
"type": "int",
|
16238
|
+
"value_allowed_null": false
|
16239
|
+
}
|
16240
|
+
],
|
16241
|
+
"usage": "in"
|
16242
|
+
},
|
15994
16243
|
"ModifyGrafanaInstanceRequest": {
|
15995
16244
|
"document": "ModifyGrafanaInstance请求参数结构体",
|
15996
16245
|
"members": [
|