tccli 3.0.1300.3__py2.py3-none-any.whl → 3.0.1302.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 +2 -1
- tccli/services/asr/v20190614/api.json +18 -18
- tccli/services/batch/v20170312/api.json +14 -14
- tccli/services/bh/bh_client.py +623 -93
- tccli/services/bh/v20230418/api.json +1054 -32
- tccli/services/bh/v20230418/examples.json +93 -1
- tccli/services/billing/billing_client.py +4 -57
- tccli/services/billing/v20180709/api.json +3 -305
- tccli/services/billing/v20180709/examples.json +2 -10
- tccli/services/bpaas/v20181217/api.json +56 -56
- tccli/services/cat/cat_client.py +61 -8
- tccli/services/cat/v20180409/api.json +115 -0
- tccli/services/cat/v20180409/examples.json +20 -0
- tccli/services/cbs/v20170312/api.json +9 -7
- tccli/services/cbs/v20170312/examples.json +2 -2
- tccli/services/ccc/ccc_client.py +216 -4
- tccli/services/ccc/v20200210/api.json +364 -6
- tccli/services/ccc/v20200210/examples.json +32 -0
- tccli/services/cdb/v20170320/api.json +23 -14
- tccli/services/cdb/v20170320/examples.json +3 -3
- tccli/services/cdc/cdc_client.py +173 -67
- tccli/services/cdc/v20201214/api.json +96 -0
- tccli/services/cdc/v20201214/examples.json +16 -0
- tccli/services/cdn/v20180606/api.json +365 -279
- tccli/services/cdwch/v20200915/api.json +21 -21
- tccli/services/cdwdoris/v20211228/api.json +21 -1
- tccli/services/cdwdoris/v20211228/examples.json +4 -4
- tccli/services/cdwpg/v20201230/api.json +375 -360
- tccli/services/cdwpg/v20201230/examples.json +1 -1
- tccli/services/cfw/cfw_client.py +53 -0
- tccli/services/cfw/v20190904/api.json +201 -5
- tccli/services/cfw/v20190904/examples.json +8 -0
- tccli/services/chc/chc_client.py +57 -4
- tccli/services/chc/v20230418/api.json +108 -1
- tccli/services/chc/v20230418/examples.json +8 -0
- tccli/services/ckafka/ckafka_client.py +408 -302
- tccli/services/ckafka/v20190819/api.json +197 -2
- tccli/services/ckafka/v20190819/examples.json +16 -0
- tccli/services/clb/v20180317/api.json +439 -379
- tccli/services/clb/v20180317/examples.json +7 -7
- tccli/services/cls/cls_client.py +53 -0
- tccli/services/cls/v20201016/api.json +86 -3
- tccli/services/cls/v20201016/examples.json +11 -3
- tccli/services/cvm/v20170312/api.json +165 -147
- tccli/services/cvm/v20170312/examples.json +6 -6
- tccli/services/cwp/v20180228/api.json +93 -14
- tccli/services/cwp/v20180228/examples.json +7 -7
- tccli/services/cynosdb/cynosdb_client.py +171 -12
- tccli/services/cynosdb/v20190107/api.json +252 -3
- tccli/services/cynosdb/v20190107/examples.json +24 -0
- tccli/services/dbbrain/dbbrain_client.py +57 -4
- tccli/services/dbbrain/v20210527/api.json +62 -0
- tccli/services/dbbrain/v20210527/examples.json +8 -0
- tccli/services/dc/v20180410/api.json +1 -1
- tccli/services/dlc/dlc_client.py +53 -0
- tccli/services/dlc/v20210125/api.json +816 -655
- tccli/services/dlc/v20210125/examples.json +73 -59
- tccli/services/dsgc/v20190723/api.json +18 -0
- tccli/services/dts/v20211206/api.json +4 -4
- tccli/services/dts/v20211206/examples.json +6 -0
- tccli/services/emr/emr_client.py +53 -0
- tccli/services/emr/v20190103/api.json +127 -0
- tccli/services/emr/v20190103/examples.json +8 -0
- tccli/services/es/es_client.py +686 -151
- tccli/services/es/v20180416/api.json +509 -436
- tccli/services/es/v20180416/examples.json +43 -49
- tccli/services/es/v20250101/api.json +1391 -0
- tccli/services/es/v20250101/examples.json +85 -0
- tccli/services/ess/ess_client.py +53 -0
- tccli/services/ess/v20201111/api.json +142 -21
- tccli/services/ess/v20201111/examples.json +14 -0
- tccli/services/essbasic/essbasic_client.py +53 -0
- tccli/services/essbasic/v20210526/api.json +112 -9
- tccli/services/essbasic/v20210526/examples.json +8 -0
- tccli/services/gaap/v20180529/api.json +321 -312
- tccli/services/gaap/v20180529/examples.json +2 -2
- tccli/services/gs/gs_client.py +538 -8
- tccli/services/gs/v20191118/api.json +947 -44
- tccli/services/gs/v20191118/examples.json +87 -1
- tccli/services/gwlb/v20240906/api.json +56 -37
- tccli/services/gwlb/v20240906/examples.json +11 -5
- tccli/services/hunyuan/hunyuan_client.py +175 -69
- tccli/services/hunyuan/v20230901/api.json +191 -1
- tccli/services/hunyuan/v20230901/examples.json +17 -1
- tccli/services/ioa/ioa_client.py +227 -15
- tccli/services/ioa/v20220601/api.json +479 -0
- tccli/services/ioa/v20220601/examples.json +44 -0
- tccli/services/iotexplorer/iotexplorer_client.py +322 -4
- tccli/services/iotexplorer/v20190423/api.json +865 -52
- tccli/services/iotexplorer/v20190423/examples.json +64 -16
- tccli/services/iotvideo/iotvideo_client.py +57 -4
- tccli/services/iotvideo/v20211125/api.json +146 -0
- tccli/services/iotvideo/v20211125/examples.json +8 -0
- tccli/services/iotvideoindustry/v20201201/api.json +1 -1
- tccli/services/kms/v20190118/api.json +38 -2
- tccli/services/lcic/v20220817/api.json +66 -1
- tccli/services/lcic/v20220817/examples.json +1 -1
- tccli/services/lighthouse/lighthouse_client.py +0 -106
- tccli/services/lighthouse/v20200324/api.json +11 -98
- tccli/services/lighthouse/v20200324/examples.json +0 -16
- tccli/services/live/v20180801/api.json +1 -1
- tccli/services/lke/v20231130/api.json +208 -10
- tccli/services/lke/v20231130/examples.json +10 -10
- tccli/services/lkeap/lkeap_client.py +53 -0
- tccli/services/lkeap/v20240522/api.json +48 -4
- tccli/services/lkeap/v20240522/examples.json +8 -0
- tccli/services/mna/mna_client.py +4 -163
- tccli/services/mna/v20210119/api.json +0 -524
- tccli/services/mna/v20210119/examples.json +0 -24
- tccli/services/monitor/monitor_client.py +114 -8
- tccli/services/monitor/v20180724/api.json +129 -18
- tccli/services/monitor/v20180724/examples.json +17 -1
- tccli/services/mps/v20190612/api.json +1223 -1031
- tccli/services/mps/v20190612/examples.json +1 -1
- tccli/services/nlp/v20190408/examples.json +1 -1
- tccli/services/oceanus/v20190422/api.json +12 -12
- tccli/services/oceanus/v20190422/examples.json +15 -3
- tccli/services/ocr/v20181119/api.json +13 -3
- tccli/services/postgres/v20170312/api.json +2 -2
- tccli/services/privatedns/v20201028/api.json +30 -11
- tccli/services/privatedns/v20201028/examples.json +10 -10
- tccli/services/rce/v20201103/api.json +3 -3
- tccli/services/ses/v20201002/api.json +10 -1
- tccli/services/smop/v20201203/api.json +2 -2
- tccli/services/sqlserver/v20180328/api.json +1 -1
- tccli/services/ssm/v20190923/api.json +27 -0
- tccli/services/sts/sts_client.py +53 -0
- tccli/services/sts/v20180813/api.json +101 -1
- tccli/services/sts/v20180813/examples.json +8 -0
- tccli/services/taf/taf_client.py +0 -53
- tccli/services/taf/v20200210/api.json +0 -138
- tccli/services/taf/v20200210/examples.json +0 -8
- tccli/services/tan/v20220420/api.json +2 -2
- tccli/services/tat/v20201028/api.json +2 -2
- tccli/services/tcb/v20180608/api.json +29 -1
- tccli/services/tcbr/v20220217/api.json +32 -0
- tccli/services/tccatalog/v20241024/api.json +1 -1
- tccli/services/tccatalog/v20241024/examples.json +1 -1
- tccli/services/tcr/v20190924/api.json +5 -5
- tccli/services/tcr/v20190924/examples.json +2 -2
- tccli/services/tcss/v20201101/api.json +84 -34
- tccli/services/tcss/v20201101/examples.json +2809 -0
- tccli/services/tdmq/v20200217/api.json +40 -0
- tccli/services/tdmq/v20200217/examples.json +1 -1
- tccli/services/tds/tds_client.py +53 -0
- tccli/services/tds/v20220801/api.json +265 -0
- tccli/services/tds/v20220801/examples.json +8 -0
- tccli/services/tem/v20210701/api.json +664 -575
- tccli/services/tem/v20210701/examples.json +2 -2
- tccli/services/teo/v20220901/api.json +236 -208
- tccli/services/teo/v20220901/examples.json +13 -13
- tccli/services/tione/tione_client.py +53 -0
- tccli/services/tione/v20211111/api.json +256 -0
- tccli/services/tione/v20211111/examples.json +8 -0
- tccli/services/tke/v20180525/api.json +1 -1
- tccli/services/trocket/trocket_client.py +489 -12
- tccli/services/trocket/v20230308/api.json +925 -146
- tccli/services/trocket/v20230308/examples.json +72 -0
- tccli/services/trtc/v20190722/api.json +13 -19
- tccli/services/trtc/v20190722/examples.json +8 -8
- tccli/services/tse/v20201207/api.json +1016 -995
- tccli/services/tse/v20201207/examples.json +2 -2
- tccli/services/tsf/v20180326/api.json +510 -465
- tccli/services/tsf/v20180326/examples.json +4 -4
- tccli/services/tts/v20190823/api.json +10 -10
- tccli/services/vclm/v20240523/api.json +2 -2
- tccli/services/vcube/v20220410/api.json +10 -0
- tccli/services/vdb/v20230616/api.json +10 -0
- tccli/services/vdb/v20230616/examples.json +1 -1
- tccli/services/vpc/v20170312/api.json +824 -254
- tccli/services/vpc/v20170312/examples.json +66 -10
- tccli/services/vpc/vpc_client.py +383 -12
- tccli/services/vrs/v20200824/api.json +9 -0
- tccli/services/waf/v20180125/api.json +8113 -5814
- tccli/services/waf/v20180125/examples.json +90 -0
- tccli/services/waf/waf_client.py +559 -82
- tccli/services/wedata/v20210820/api.json +1379 -24
- tccli/services/wedata/v20210820/examples.json +25 -1
- tccli/services/wedata/wedata_client.py +171 -12
- tccli/services/weilingwith/v20230427/api.json +1 -1
- tccli/services/weilingwith/v20230427/examples.json +3 -3
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/RECORD +187 -184
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/license_files/LICENSE +0 -0
@@ -105,6 +105,13 @@
|
|
105
105
|
"output": "QueryHunyuanImageJobResponse",
|
106
106
|
"status": "online"
|
107
107
|
},
|
108
|
+
"QueryHunyuanTo3DJob": {
|
109
|
+
"document": "查询混元生3D任务",
|
110
|
+
"input": "QueryHunyuanTo3DJobRequest",
|
111
|
+
"name": "查询混元生3D任务",
|
112
|
+
"output": "QueryHunyuanTo3DJobResponse",
|
113
|
+
"status": "online"
|
114
|
+
},
|
108
115
|
"RunThread": {
|
109
116
|
"document": "腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。\n\n 1. 本接口暂不支持返回图片内容。\n 2. 默认该接口下单账号限制并发数为 5 路,如您有提高并发限制的需求请 [购买](https://buy.cloud.tencent.com/hunyuan) 。\n 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。\n 4. 我们推荐您使用 API Explorer,方便快速地在线调试接口和下载各语言的示例代码,[点击打开](https://console.cloud.tencent.com/api/explorer?Product=hunyuan&Version=2023-09-01&Action=ChatCompletions)。",
|
110
117
|
"input": "RunThreadRequest",
|
@@ -133,6 +140,13 @@
|
|
133
140
|
"output": "SubmitHunyuanImageJobResponse",
|
134
141
|
"status": "online"
|
135
142
|
},
|
143
|
+
"SubmitHunyuanTo3DJob": {
|
144
|
+
"document": "提交混元生3D任务",
|
145
|
+
"input": "SubmitHunyuanTo3DJobRequest",
|
146
|
+
"name": "提交混元生3D任务",
|
147
|
+
"output": "SubmitHunyuanTo3DJobResponse",
|
148
|
+
"status": "online"
|
149
|
+
},
|
136
150
|
"TextToImageLite": {
|
137
151
|
"document": "文生图轻量版接口根据输入的文本描述,智能生成与之相关的结果图。\n文生图轻量版默认提供3个并发任务数,代表最多能同时处理3个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。",
|
138
152
|
"input": "TextToImageLiteRequest",
|
@@ -262,7 +276,7 @@
|
|
262
276
|
},
|
263
277
|
{
|
264
278
|
"disabled": false,
|
265
|
-
"document": "功能增强(如搜索)开关。\n说明:\n1. hunyuan-lite 无功能增强(如搜索)能力,该参数对 hunyuan-lite 版本不生效。\n2.
|
279
|
+
"document": "功能增强(如搜索)开关。\n说明:\n1. hunyuan-lite 无功能增强(如搜索)能力,该参数对 hunyuan-lite 版本不生效。\n2. 未传值时默认关闭开关。\n3. 关闭时将直接由主模型生成回复内容,可以降低响应时延(对于流式输出时的首字时延尤为明显)。但在少数场景里,回复效果可能会下降。\n4. 安全审核能力不属于功能增强范围,不受此字段影响。\n5. 2025-04-20 00:00:00起,由默认开启状态转为默认关闭状态。",
|
266
280
|
"example": "true",
|
267
281
|
"member": "bool",
|
268
282
|
"name": "EnableEnhancement",
|
@@ -918,6 +932,51 @@
|
|
918
932
|
],
|
919
933
|
"usage": "out"
|
920
934
|
},
|
935
|
+
"File3D": {
|
936
|
+
"document": "3D文件",
|
937
|
+
"members": [
|
938
|
+
{
|
939
|
+
"disabled": false,
|
940
|
+
"document": "3D文件的格式。取值范围:GIF, OBJ",
|
941
|
+
"example": "GIF",
|
942
|
+
"member": "string",
|
943
|
+
"name": "Type",
|
944
|
+
"output_required": false,
|
945
|
+
"required": false,
|
946
|
+
"type": "string",
|
947
|
+
"value_allowed_null": false
|
948
|
+
},
|
949
|
+
{
|
950
|
+
"disabled": false,
|
951
|
+
"document": "文件的Url",
|
952
|
+
"example": "https://xxx.gif",
|
953
|
+
"member": "string",
|
954
|
+
"name": "Url",
|
955
|
+
"output_required": false,
|
956
|
+
"required": false,
|
957
|
+
"type": "string",
|
958
|
+
"value_allowed_null": false
|
959
|
+
}
|
960
|
+
],
|
961
|
+
"usage": "both"
|
962
|
+
},
|
963
|
+
"File3Ds": {
|
964
|
+
"document": "3D文件列表",
|
965
|
+
"members": [
|
966
|
+
{
|
967
|
+
"disabled": false,
|
968
|
+
"document": "3D文件列表",
|
969
|
+
"example": "无",
|
970
|
+
"member": "File3D",
|
971
|
+
"name": "File3D",
|
972
|
+
"output_required": false,
|
973
|
+
"required": false,
|
974
|
+
"type": "list",
|
975
|
+
"value_allowed_null": false
|
976
|
+
}
|
977
|
+
],
|
978
|
+
"usage": "both"
|
979
|
+
},
|
921
980
|
"FileObject": {
|
922
981
|
"document": "已上传的文件对象。",
|
923
982
|
"members": [
|
@@ -2476,6 +2535,73 @@
|
|
2476
2535
|
],
|
2477
2536
|
"type": "object"
|
2478
2537
|
},
|
2538
|
+
"QueryHunyuanTo3DJobRequest": {
|
2539
|
+
"document": "QueryHunyuanTo3DJob请求参数结构体",
|
2540
|
+
"members": [
|
2541
|
+
{
|
2542
|
+
"disabled": false,
|
2543
|
+
"document": "任务ID",
|
2544
|
+
"example": "无",
|
2545
|
+
"member": "string",
|
2546
|
+
"name": "JobId",
|
2547
|
+
"required": false,
|
2548
|
+
"type": "string"
|
2549
|
+
}
|
2550
|
+
],
|
2551
|
+
"type": "object"
|
2552
|
+
},
|
2553
|
+
"QueryHunyuanTo3DJobResponse": {
|
2554
|
+
"document": "QueryHunyuanTo3DJob返回参数结构体",
|
2555
|
+
"members": [
|
2556
|
+
{
|
2557
|
+
"disabled": false,
|
2558
|
+
"document": "任务状态。WAIT:等待中,RUN:执行中,FAIL:任务失败,DONE:任务成功",
|
2559
|
+
"example": "RUN",
|
2560
|
+
"member": "string",
|
2561
|
+
"name": "Status",
|
2562
|
+
"output_required": false,
|
2563
|
+
"type": "string",
|
2564
|
+
"value_allowed_null": false
|
2565
|
+
},
|
2566
|
+
{
|
2567
|
+
"disabled": false,
|
2568
|
+
"document": "生成的3D文件数组",
|
2569
|
+
"example": "无",
|
2570
|
+
"member": "File3Ds",
|
2571
|
+
"name": "ResultFile3Ds",
|
2572
|
+
"output_required": false,
|
2573
|
+
"type": "list",
|
2574
|
+
"value_allowed_null": false
|
2575
|
+
},
|
2576
|
+
{
|
2577
|
+
"disabled": false,
|
2578
|
+
"document": "错误码",
|
2579
|
+
"example": "InvalidParameter",
|
2580
|
+
"member": "string",
|
2581
|
+
"name": "ErrorCode",
|
2582
|
+
"output_required": false,
|
2583
|
+
"type": "string",
|
2584
|
+
"value_allowed_null": false
|
2585
|
+
},
|
2586
|
+
{
|
2587
|
+
"disabled": false,
|
2588
|
+
"document": "错误信息",
|
2589
|
+
"example": "参数错误",
|
2590
|
+
"member": "string",
|
2591
|
+
"name": "ErrorMessage",
|
2592
|
+
"output_required": false,
|
2593
|
+
"type": "string",
|
2594
|
+
"value_allowed_null": false
|
2595
|
+
},
|
2596
|
+
{
|
2597
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
2598
|
+
"member": "string",
|
2599
|
+
"name": "RequestId",
|
2600
|
+
"type": "string"
|
2601
|
+
}
|
2602
|
+
],
|
2603
|
+
"type": "object"
|
2604
|
+
},
|
2479
2605
|
"Reference": {
|
2480
2606
|
"document": "翻译对话参考示例",
|
2481
2607
|
"members": [
|
@@ -3139,6 +3265,70 @@
|
|
3139
3265
|
],
|
3140
3266
|
"type": "object"
|
3141
3267
|
},
|
3268
|
+
"SubmitHunyuanTo3DJobRequest": {
|
3269
|
+
"document": "SubmitHunyuanTo3DJob请求参数结构体",
|
3270
|
+
"members": [
|
3271
|
+
{
|
3272
|
+
"disabled": false,
|
3273
|
+
"document": "3D内容的描述,中文正向提示词。最多支持200个 utf-8 字符,ImageBase64、ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。",
|
3274
|
+
"example": "一只小猫",
|
3275
|
+
"member": "string",
|
3276
|
+
"name": "Prompt",
|
3277
|
+
"required": false,
|
3278
|
+
"type": "string"
|
3279
|
+
},
|
3280
|
+
{
|
3281
|
+
"disabled": false,
|
3282
|
+
"document": "输入图 Base64 数据。最多支持200个 utf-8 字符,ImageBase64、ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。",
|
3283
|
+
"example": "无",
|
3284
|
+
"member": "string",
|
3285
|
+
"name": "ImageBase64",
|
3286
|
+
"required": false,
|
3287
|
+
"type": "string"
|
3288
|
+
},
|
3289
|
+
{
|
3290
|
+
"disabled": false,
|
3291
|
+
"document": "输入图Url。最多支持200个 utf-8 字符,ImageBase64、ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。",
|
3292
|
+
"example": "无",
|
3293
|
+
"member": "string",
|
3294
|
+
"name": "ImageUrl",
|
3295
|
+
"required": false,
|
3296
|
+
"type": "string"
|
3297
|
+
},
|
3298
|
+
{
|
3299
|
+
"disabled": false,
|
3300
|
+
"document": "生成数量。默认1,当前限制只能为1。",
|
3301
|
+
"example": "1",
|
3302
|
+
"member": "int64",
|
3303
|
+
"name": "Num",
|
3304
|
+
"required": false,
|
3305
|
+
"type": "int"
|
3306
|
+
}
|
3307
|
+
],
|
3308
|
+
"type": "object"
|
3309
|
+
},
|
3310
|
+
"SubmitHunyuanTo3DJobResponse": {
|
3311
|
+
"document": "SubmitHunyuanTo3DJob返回参数结构体",
|
3312
|
+
"members": [
|
3313
|
+
{
|
3314
|
+
"disabled": false,
|
3315
|
+
"document": "任务id",
|
3316
|
+
"example": "无",
|
3317
|
+
"member": "string",
|
3318
|
+
"name": "JobId",
|
3319
|
+
"output_required": false,
|
3320
|
+
"type": "string",
|
3321
|
+
"value_allowed_null": false
|
3322
|
+
},
|
3323
|
+
{
|
3324
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
3325
|
+
"member": "string",
|
3326
|
+
"name": "RequestId",
|
3327
|
+
"type": "string"
|
3328
|
+
}
|
3329
|
+
],
|
3330
|
+
"type": "object"
|
3331
|
+
},
|
3142
3332
|
"TextToImageLiteRequest": {
|
3143
3333
|
"document": "TextToImageLite请求参数结构体",
|
3144
3334
|
"members": [
|
@@ -59,7 +59,7 @@
|
|
59
59
|
},
|
60
60
|
{
|
61
61
|
"document": "推荐使用 API Explorer 调用接口,见本文档顶部说明。该示例说明hunyuan-vision模型如何调用接口。\n\nImageUrl.Url 支持图片链接以及图片 base64 两种方式\njpeg 图片转 base64 示例 (其他图片格式注意修改为对应的 MIME 类型, 如 image/png, image/webp, image/bmp 等):\n\n```python\nimport base64\n\nwith open(\"1.jpeg\", 'rb') as image_file:\n encoded_image = base64.b64encode(image_file.read())\n print(\"data:image/jpeg;base64,\"+encoded_image.decode('utf-8'))\n```",
|
62
|
-
"input": "POST / HTTP/1.1\nHost: hunyuan.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChatCompletions\n<公共请求参数>\n\n{\n \"Model\": \"hunyuan-vision\",\n \"Messages\": [\n {\n \"Role\": \"user\",\n \"Contents\": [\n {\n \"Type\": \"text\",\n \"Text\": \"
|
62
|
+
"input": "POST / HTTP/1.1\nHost: hunyuan.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChatCompletions\n<公共请求参数>\n\n{\n \"Model\": \"hunyuan-vision\",\n \"Messages\": [\n {\n \"Role\": \"user\",\n \"Contents\": [\n {\n \"Type\": \"text\",\n \"Text\": \"图片上有什么内容?\"\n },\n {\n \"Type\": \"image_url\",\n \"ImageUrl\": {\n \"Url\": \"https://cloudcache.tencent-cloud.com/qcloud/ui/portal-set/build/About/images/bg-product-series_87d.png\"\n }\n },\n {\n \"Type\": \"image_url\",\n \"ImageUrl\": {\n \"Url\": \"https://qcloudimg.tencent-cloud.cn/raw/42c198dbc0b57ae490e57f89aa01ec23.png\"\n }\n }\n ]\n }\n ],\n \"Stream\": false\n}",
|
63
63
|
"output": "{\n \"Response\": {\n \"RequestId\": \"a21f9d7e-c18a-438b-bfb4-7941a2adf8ae\",\n \"Note\": \"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\n \"Choices\": [\n {\n \"Message\": {\n \"Role\": \"assistant\",\n \"Content\": \"这张图片中展示的Logo属于腾讯公司。\"\n },\n \"FinishReason\": \"stop\"\n }\n ],\n \"Created\": 1714290436,\n \"Id\": \"a21f9d7e-c18a-438b-bfb4-7941a2adf8ae\",\n \"Usage\": {\n \"PromptTokens\": 7,\n \"CompletionTokens\": 10,\n \"TotalTokens\": 17\n }\n }\n}",
|
64
64
|
"title": "图片理解示例"
|
65
65
|
},
|
@@ -174,6 +174,14 @@
|
|
174
174
|
"title": "成功查询"
|
175
175
|
}
|
176
176
|
],
|
177
|
+
"QueryHunyuanTo3DJob": [
|
178
|
+
{
|
179
|
+
"document": "任务完成",
|
180
|
+
"input": "POST / HTTP/1.1\nHost: hunyuan.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: QueryHunyuanTo3DJob\n<公共请求参数>\n\n{\n \"JobId\": \"1286221236421533696\"\n}",
|
181
|
+
"output": "{\n \"Response\": {\n \"ErrorCode\": \"\",\n \"ErrorMessage\": \"\",\n \"RequestId\": \"6ea0ea36-ea27-4870-9b9b-6937f7cc7117\",\n \"ResultFile3Ds\": [\n {\n \"File3D\": [\n {\n \"Type\": \"GIF\",\n \"Url\": \"https://hunyuan-prod-xxx.cos.ap-guangzhou.tencentcos.cn/3d/output/xxx.gif\"\n },\n {\n \"Type\": \"OBJ\",\n \"Url\": \"https://hunyuan-prod-xxx.cos.ap-guangzhou.tencentcos.cn/3d/output/2e56fc_0.zip\"\n }\n ]\n }\n ],\n \"Status\": \"DONE\"\n }\n}",
|
182
|
+
"title": "任务完成"
|
183
|
+
}
|
184
|
+
],
|
177
185
|
"RunThread": [
|
178
186
|
{
|
179
187
|
"document": "执行会话",
|
@@ -206,6 +214,14 @@
|
|
206
214
|
"title": "调用成功"
|
207
215
|
}
|
208
216
|
],
|
217
|
+
"SubmitHunyuanTo3DJob": [
|
218
|
+
{
|
219
|
+
"document": "成功提交图生3D任务",
|
220
|
+
"input": "POST / HTTP/1.1\nHost: hunyuan.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SubmitHunyuanTo3DJob\n<公共请求参数>\n\n{\n \"Prompt\": \"\",\n \"ImageUrl\": \"https://xxx.jpg\"\n}",
|
221
|
+
"output": "{\n \"Response\": {\n \"JobId\": \"1286221236421533696\",\n \"RequestId\": \"f4aac8ca-a79d-4431-81fd-7312f79bf91d\"\n }\n}",
|
222
|
+
"title": "成功提交任务"
|
223
|
+
}
|
224
|
+
],
|
209
225
|
"TextToImageLite": [
|
210
226
|
{
|
211
227
|
"document": "成功调用,并返回生图url",
|
tccli/services/ioa/ioa_client.py
CHANGED
@@ -17,7 +17,7 @@ from tencentcloud.ioa.v20220601 import models as models_v20220601
|
|
17
17
|
from jmespath import search
|
18
18
|
import time
|
19
19
|
|
20
|
-
def
|
20
|
+
def doCreateDeviceVirtualGroup(args, parsed_globals):
|
21
21
|
g_param = parse_global_arg(parsed_globals)
|
22
22
|
|
23
23
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -46,11 +46,115 @@ def doDescribeRootAccountGroup(args, parsed_globals):
|
|
46
46
|
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
47
47
|
client._sdkVersion += ("_CLI_" + __version__)
|
48
48
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
-
model = models.
|
49
|
+
model = models.CreateDeviceVirtualGroupRequest()
|
50
50
|
model.from_json_string(json.dumps(args))
|
51
51
|
start_time = time.time()
|
52
52
|
while True:
|
53
|
-
rsp = client.
|
53
|
+
rsp = client.CreateDeviceVirtualGroup(model)
|
54
|
+
result = rsp.to_json_string()
|
55
|
+
try:
|
56
|
+
json_obj = json.loads(result)
|
57
|
+
except TypeError as e:
|
58
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
59
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
60
|
+
break
|
61
|
+
cur_time = time.time()
|
62
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
63
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
64
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
65
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
66
|
+
else:
|
67
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
68
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
69
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
|
+
|
71
|
+
|
72
|
+
def doDescribeLocalAccounts(args, parsed_globals):
|
73
|
+
g_param = parse_global_arg(parsed_globals)
|
74
|
+
|
75
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
76
|
+
cred = credential.CVMRoleCredential()
|
77
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
78
|
+
cred = credential.STSAssumeRoleCredential(
|
79
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
80
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
81
|
+
)
|
82
|
+
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):
|
83
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
84
|
+
else:
|
85
|
+
cred = credential.Credential(
|
86
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
87
|
+
)
|
88
|
+
http_profile = HttpProfile(
|
89
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
90
|
+
reqMethod="POST",
|
91
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
92
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
93
|
+
)
|
94
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
95
|
+
if g_param[OptionsDefine.Language]:
|
96
|
+
profile.language = g_param[OptionsDefine.Language]
|
97
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
98
|
+
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
99
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
100
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
+
model = models.DescribeLocalAccountsRequest()
|
102
|
+
model.from_json_string(json.dumps(args))
|
103
|
+
start_time = time.time()
|
104
|
+
while True:
|
105
|
+
rsp = client.DescribeLocalAccounts(model)
|
106
|
+
result = rsp.to_json_string()
|
107
|
+
try:
|
108
|
+
json_obj = json.loads(result)
|
109
|
+
except TypeError as e:
|
110
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
111
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
112
|
+
break
|
113
|
+
cur_time = time.time()
|
114
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
115
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
116
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
117
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
118
|
+
else:
|
119
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
120
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
121
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
|
+
|
123
|
+
|
124
|
+
def doCreatePrivilegeCode(args, parsed_globals):
|
125
|
+
g_param = parse_global_arg(parsed_globals)
|
126
|
+
|
127
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
128
|
+
cred = credential.CVMRoleCredential()
|
129
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
130
|
+
cred = credential.STSAssumeRoleCredential(
|
131
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
132
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
133
|
+
)
|
134
|
+
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):
|
135
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
136
|
+
else:
|
137
|
+
cred = credential.Credential(
|
138
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
139
|
+
)
|
140
|
+
http_profile = HttpProfile(
|
141
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
142
|
+
reqMethod="POST",
|
143
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
144
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
145
|
+
)
|
146
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
147
|
+
if g_param[OptionsDefine.Language]:
|
148
|
+
profile.language = g_param[OptionsDefine.Language]
|
149
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
150
|
+
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
151
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
152
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
+
model = models.CreatePrivilegeCodeRequest()
|
154
|
+
model.from_json_string(json.dumps(args))
|
155
|
+
start_time = time.time()
|
156
|
+
while True:
|
157
|
+
rsp = client.CreatePrivilegeCode(model)
|
54
158
|
result = rsp.to_json_string()
|
55
159
|
try:
|
56
160
|
json_obj = json.loads(result)
|
@@ -121,7 +225,7 @@ def doDescribeDevices(args, parsed_globals):
|
|
121
225
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
226
|
|
123
227
|
|
124
|
-
def
|
228
|
+
def doCreateDLPFileDetectionTask(args, parsed_globals):
|
125
229
|
g_param = parse_global_arg(parsed_globals)
|
126
230
|
|
127
231
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -150,11 +254,11 @@ def doCreateDeviceVirtualGroup(args, parsed_globals):
|
|
150
254
|
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
151
255
|
client._sdkVersion += ("_CLI_" + __version__)
|
152
256
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
-
model = models.
|
257
|
+
model = models.CreateDLPFileDetectionTaskRequest()
|
154
258
|
model.from_json_string(json.dumps(args))
|
155
259
|
start_time = time.time()
|
156
260
|
while True:
|
157
|
-
rsp = client.
|
261
|
+
rsp = client.CreateDLPFileDetectionTask(model)
|
158
262
|
result = rsp.to_json_string()
|
159
263
|
try:
|
160
264
|
json_obj = json.loads(result)
|
@@ -173,7 +277,7 @@ def doCreateDeviceVirtualGroup(args, parsed_globals):
|
|
173
277
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
278
|
|
175
279
|
|
176
|
-
def
|
280
|
+
def doDescribeSoftCensusListByDevice(args, parsed_globals):
|
177
281
|
g_param = parse_global_arg(parsed_globals)
|
178
282
|
|
179
283
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -202,11 +306,11 @@ def doDescribeAccountGroups(args, parsed_globals):
|
|
202
306
|
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
203
307
|
client._sdkVersion += ("_CLI_" + __version__)
|
204
308
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
205
|
-
model = models.
|
309
|
+
model = models.DescribeSoftCensusListByDeviceRequest()
|
206
310
|
model.from_json_string(json.dumps(args))
|
207
311
|
start_time = time.time()
|
208
312
|
while True:
|
209
|
-
rsp = client.
|
313
|
+
rsp = client.DescribeSoftCensusListByDevice(model)
|
210
314
|
result = rsp.to_json_string()
|
211
315
|
try:
|
212
316
|
json_obj = json.loads(result)
|
@@ -225,7 +329,7 @@ def doDescribeAccountGroups(args, parsed_globals):
|
|
225
329
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
226
330
|
|
227
331
|
|
228
|
-
def
|
332
|
+
def doDescribeRootAccountGroup(args, parsed_globals):
|
229
333
|
g_param = parse_global_arg(parsed_globals)
|
230
334
|
|
231
335
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -254,11 +358,115 @@ def doDescribeLocalAccounts(args, parsed_globals):
|
|
254
358
|
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
255
359
|
client._sdkVersion += ("_CLI_" + __version__)
|
256
360
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
257
|
-
model = models.
|
361
|
+
model = models.DescribeRootAccountGroupRequest()
|
258
362
|
model.from_json_string(json.dumps(args))
|
259
363
|
start_time = time.time()
|
260
364
|
while True:
|
261
|
-
rsp = client.
|
365
|
+
rsp = client.DescribeRootAccountGroup(model)
|
366
|
+
result = rsp.to_json_string()
|
367
|
+
try:
|
368
|
+
json_obj = json.loads(result)
|
369
|
+
except TypeError as e:
|
370
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
371
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
372
|
+
break
|
373
|
+
cur_time = time.time()
|
374
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
375
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
376
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
377
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
378
|
+
else:
|
379
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
380
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
381
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
|
+
|
383
|
+
|
384
|
+
def doDescribeDLPFileDetectResult(args, parsed_globals):
|
385
|
+
g_param = parse_global_arg(parsed_globals)
|
386
|
+
|
387
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
388
|
+
cred = credential.CVMRoleCredential()
|
389
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
390
|
+
cred = credential.STSAssumeRoleCredential(
|
391
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
392
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
393
|
+
)
|
394
|
+
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):
|
395
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
396
|
+
else:
|
397
|
+
cred = credential.Credential(
|
398
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
399
|
+
)
|
400
|
+
http_profile = HttpProfile(
|
401
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
402
|
+
reqMethod="POST",
|
403
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
404
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
405
|
+
)
|
406
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
407
|
+
if g_param[OptionsDefine.Language]:
|
408
|
+
profile.language = g_param[OptionsDefine.Language]
|
409
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
410
|
+
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
411
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
412
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
+
model = models.DescribeDLPFileDetectResultRequest()
|
414
|
+
model.from_json_string(json.dumps(args))
|
415
|
+
start_time = time.time()
|
416
|
+
while True:
|
417
|
+
rsp = client.DescribeDLPFileDetectResult(model)
|
418
|
+
result = rsp.to_json_string()
|
419
|
+
try:
|
420
|
+
json_obj = json.loads(result)
|
421
|
+
except TypeError as e:
|
422
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
423
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
424
|
+
break
|
425
|
+
cur_time = time.time()
|
426
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
427
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
428
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
429
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
430
|
+
else:
|
431
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
432
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
433
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
434
|
+
|
435
|
+
|
436
|
+
def doDescribeAccountGroups(args, parsed_globals):
|
437
|
+
g_param = parse_global_arg(parsed_globals)
|
438
|
+
|
439
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
440
|
+
cred = credential.CVMRoleCredential()
|
441
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
442
|
+
cred = credential.STSAssumeRoleCredential(
|
443
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
444
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
445
|
+
)
|
446
|
+
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):
|
447
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
448
|
+
else:
|
449
|
+
cred = credential.Credential(
|
450
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
451
|
+
)
|
452
|
+
http_profile = HttpProfile(
|
453
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
454
|
+
reqMethod="POST",
|
455
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
456
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
457
|
+
)
|
458
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
459
|
+
if g_param[OptionsDefine.Language]:
|
460
|
+
profile.language = g_param[OptionsDefine.Language]
|
461
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
462
|
+
client = mod.IoaClient(cred, g_param[OptionsDefine.Region], profile)
|
463
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
464
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
465
|
+
model = models.DescribeAccountGroupsRequest()
|
466
|
+
model.from_json_string(json.dumps(args))
|
467
|
+
start_time = time.time()
|
468
|
+
while True:
|
469
|
+
rsp = client.DescribeAccountGroups(model)
|
262
470
|
result = rsp.to_json_string()
|
263
471
|
try:
|
264
472
|
json_obj = json.loads(result)
|
@@ -288,11 +496,15 @@ MODELS_MAP = {
|
|
288
496
|
}
|
289
497
|
|
290
498
|
ACTION_MAP = {
|
291
|
-
"DescribeRootAccountGroup": doDescribeRootAccountGroup,
|
292
|
-
"DescribeDevices": doDescribeDevices,
|
293
499
|
"CreateDeviceVirtualGroup": doCreateDeviceVirtualGroup,
|
294
|
-
"DescribeAccountGroups": doDescribeAccountGroups,
|
295
500
|
"DescribeLocalAccounts": doDescribeLocalAccounts,
|
501
|
+
"CreatePrivilegeCode": doCreatePrivilegeCode,
|
502
|
+
"DescribeDevices": doDescribeDevices,
|
503
|
+
"CreateDLPFileDetectionTask": doCreateDLPFileDetectionTask,
|
504
|
+
"DescribeSoftCensusListByDevice": doDescribeSoftCensusListByDevice,
|
505
|
+
"DescribeRootAccountGroup": doDescribeRootAccountGroup,
|
506
|
+
"DescribeDLPFileDetectResult": doDescribeDLPFileDetectResult,
|
507
|
+
"DescribeAccountGroups": doDescribeAccountGroups,
|
296
508
|
|
297
509
|
}
|
298
510
|
|