tccli 3.0.1363.1__py2.py3-none-any.whl → 3.0.1365.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/autoscaling/v20180419/api.json +1 -1
- tccli/services/bi/v20220105/api.json +97 -5
- tccli/services/bi/v20220105/examples.json +5 -5
- tccli/services/cam/cam_client.py +61 -8
- tccli/services/cam/v20190116/api.json +96 -0
- tccli/services/cam/v20190116/examples.json +8 -0
- tccli/services/cdb/v20170320/api.json +35 -35
- tccli/services/cdb/v20170320/examples.json +3 -3
- tccli/services/cdn/cdn_client.py +161 -1380
- tccli/services/cdn/v20180606/api.json +5302 -9471
- tccli/services/cdn/v20180606/examples.json +0 -184
- tccli/services/cfs/cfs_client.py +817 -128
- tccli/services/cfs/v20190719/api.json +2256 -848
- tccli/services/cfs/v20190719/examples.json +104 -0
- tccli/services/clb/v20180317/api.json +29 -9
- tccli/services/cls/v20201016/api.json +76 -72
- tccli/services/cls/v20201016/examples.json +3 -3
- tccli/services/ctem/v20231128/api.json +331 -97
- tccli/services/ctem/v20231128/examples.json +8 -8
- tccli/services/dlc/dlc_client.py +1622 -403
- tccli/services/dlc/v20210125/api.json +10882 -8052
- tccli/services/dlc/v20210125/examples.json +184 -0
- tccli/services/emr/v20190103/api.json +1 -1
- tccli/services/es/v20250101/api.json +38 -1
- tccli/services/ess/ess_client.py +110 -4
- tccli/services/ess/v20201111/api.json +354 -1
- tccli/services/ess/v20201111/examples.json +16 -0
- tccli/services/hunyuan/hunyuan_client.py +73 -179
- tccli/services/hunyuan/v20230901/api.json +0 -190
- tccli/services/hunyuan/v20230901/examples.json +0 -16
- tccli/services/kms/v20190118/api.json +2 -2
- tccli/services/live/v20180801/api.json +1 -1
- tccli/services/lowcode/lowcode_client.py +212 -0
- tccli/services/lowcode/v20210108/api.json +239 -0
- tccli/services/lowcode/v20210108/examples.json +32 -0
- tccli/services/monitor/v20180724/api.json +2 -2
- tccli/services/mps/v20190612/api.json +5 -5
- tccli/services/mqtt/v20240516/api.json +84 -0
- tccli/services/ocr/v20181119/api.json +3 -3
- tccli/services/ssl/v20191205/api.json +38 -28
- tccli/services/teo/teo_client.py +1266 -206
- tccli/services/teo/v20220901/api.json +1818 -116
- tccli/services/teo/v20220901/examples.json +160 -0
- tccli/services/tione/v20211111/api.json +10 -0
- tccli/services/trtc/v20190722/api.json +40 -7
- tccli/services/waf/v20180125/api.json +499 -0
- tccli/services/waf/v20180125/examples.json +32 -0
- tccli/services/waf/waf_client.py +224 -12
- tccli/services/wedata/v20210820/api.json +191 -11
- tccli/services/wedata/v20210820/examples.json +10 -2
- tccli/services/wedata/wedata_client.py +53 -0
- {tccli-3.0.1363.1.dist-info → tccli-3.0.1365.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1363.1.dist-info → tccli-3.0.1365.1.dist-info}/RECORD +57 -57
- {tccli-3.0.1363.1.dist-info → tccli-3.0.1365.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1363.1.dist-info → tccli-3.0.1365.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1363.1.dist-info → tccli-3.0.1365.1.dist-info}/license_files/LICENSE +0 -0
@@ -112,13 +112,6 @@
|
|
112
112
|
"output": "QueryHunyuanImageJobResponse",
|
113
113
|
"status": "online"
|
114
114
|
},
|
115
|
-
"QueryHunyuanTo3DJob": {
|
116
|
-
"document": "查询混元生3D任务",
|
117
|
-
"input": "QueryHunyuanTo3DJobRequest",
|
118
|
-
"name": "查询混元生3D任务",
|
119
|
-
"output": "QueryHunyuanTo3DJobResponse",
|
120
|
-
"status": "online"
|
121
|
-
},
|
122
115
|
"RunThread": {
|
123
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)。",
|
124
117
|
"input": "RunThreadRequest",
|
@@ -147,13 +140,6 @@
|
|
147
140
|
"output": "SubmitHunyuanImageJobResponse",
|
148
141
|
"status": "online"
|
149
142
|
},
|
150
|
-
"SubmitHunyuanTo3DJob": {
|
151
|
-
"document": "提交混元生3D任务",
|
152
|
-
"input": "SubmitHunyuanTo3DJobRequest",
|
153
|
-
"name": "提交混元生3D任务",
|
154
|
-
"output": "SubmitHunyuanTo3DJobResponse",
|
155
|
-
"status": "online"
|
156
|
-
},
|
157
143
|
"TextToImageLite": {
|
158
144
|
"document": "文生图轻量版接口根据输入的文本描述,智能生成与之相关的结果图。\n文生图轻量版默认提供3个并发任务数,代表最多能同时处理3个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。",
|
159
145
|
"input": "TextToImageLiteRequest",
|
@@ -1037,51 +1023,6 @@
|
|
1037
1023
|
],
|
1038
1024
|
"usage": "out"
|
1039
1025
|
},
|
1040
|
-
"File3D": {
|
1041
|
-
"document": "3D文件",
|
1042
|
-
"members": [
|
1043
|
-
{
|
1044
|
-
"disabled": false,
|
1045
|
-
"document": "3D文件的格式。取值范围:GIF, OBJ",
|
1046
|
-
"example": "GIF",
|
1047
|
-
"member": "string",
|
1048
|
-
"name": "Type",
|
1049
|
-
"output_required": false,
|
1050
|
-
"required": false,
|
1051
|
-
"type": "string",
|
1052
|
-
"value_allowed_null": false
|
1053
|
-
},
|
1054
|
-
{
|
1055
|
-
"disabled": false,
|
1056
|
-
"document": "文件的Url(有效期24小时)",
|
1057
|
-
"example": "https://cos.ap-guangzhou.myqcloud.com/gif.gif",
|
1058
|
-
"member": "string",
|
1059
|
-
"name": "Url",
|
1060
|
-
"output_required": false,
|
1061
|
-
"required": false,
|
1062
|
-
"type": "string",
|
1063
|
-
"value_allowed_null": false
|
1064
|
-
}
|
1065
|
-
],
|
1066
|
-
"usage": "both"
|
1067
|
-
},
|
1068
|
-
"File3Ds": {
|
1069
|
-
"document": "3D文件列表",
|
1070
|
-
"members": [
|
1071
|
-
{
|
1072
|
-
"disabled": false,
|
1073
|
-
"document": "3D文件列表",
|
1074
|
-
"example": "无",
|
1075
|
-
"member": "File3D",
|
1076
|
-
"name": "File3D",
|
1077
|
-
"output_required": false,
|
1078
|
-
"required": false,
|
1079
|
-
"type": "list",
|
1080
|
-
"value_allowed_null": false
|
1081
|
-
}
|
1082
|
-
],
|
1083
|
-
"usage": "both"
|
1084
|
-
},
|
1085
1026
|
"FileObject": {
|
1086
1027
|
"document": "已上传的文件对象。",
|
1087
1028
|
"members": [
|
@@ -2909,73 +2850,6 @@
|
|
2909
2850
|
],
|
2910
2851
|
"type": "object"
|
2911
2852
|
},
|
2912
|
-
"QueryHunyuanTo3DJobRequest": {
|
2913
|
-
"document": "QueryHunyuanTo3DJob请求参数结构体",
|
2914
|
-
"members": [
|
2915
|
-
{
|
2916
|
-
"disabled": false,
|
2917
|
-
"document": "任务ID",
|
2918
|
-
"example": "1434237894974230",
|
2919
|
-
"member": "string",
|
2920
|
-
"name": "JobId",
|
2921
|
-
"required": false,
|
2922
|
-
"type": "string"
|
2923
|
-
}
|
2924
|
-
],
|
2925
|
-
"type": "object"
|
2926
|
-
},
|
2927
|
-
"QueryHunyuanTo3DJobResponse": {
|
2928
|
-
"document": "QueryHunyuanTo3DJob返回参数结构体",
|
2929
|
-
"members": [
|
2930
|
-
{
|
2931
|
-
"disabled": false,
|
2932
|
-
"document": "任务状态。WAIT:等待中,RUN:执行中,FAIL:任务失败,DONE:任务成功",
|
2933
|
-
"example": "RUN",
|
2934
|
-
"member": "string",
|
2935
|
-
"name": "Status",
|
2936
|
-
"output_required": false,
|
2937
|
-
"type": "string",
|
2938
|
-
"value_allowed_null": false
|
2939
|
-
},
|
2940
|
-
{
|
2941
|
-
"disabled": false,
|
2942
|
-
"document": "生成的3D文件数组",
|
2943
|
-
"example": "File3D数据结构",
|
2944
|
-
"member": "File3Ds",
|
2945
|
-
"name": "ResultFile3Ds",
|
2946
|
-
"output_required": false,
|
2947
|
-
"type": "list",
|
2948
|
-
"value_allowed_null": false
|
2949
|
-
},
|
2950
|
-
{
|
2951
|
-
"disabled": false,
|
2952
|
-
"document": "错误码",
|
2953
|
-
"example": "InvalidParameter",
|
2954
|
-
"member": "string",
|
2955
|
-
"name": "ErrorCode",
|
2956
|
-
"output_required": false,
|
2957
|
-
"type": "string",
|
2958
|
-
"value_allowed_null": false
|
2959
|
-
},
|
2960
|
-
{
|
2961
|
-
"disabled": false,
|
2962
|
-
"document": "错误信息",
|
2963
|
-
"example": "参数错误",
|
2964
|
-
"member": "string",
|
2965
|
-
"name": "ErrorMessage",
|
2966
|
-
"output_required": false,
|
2967
|
-
"type": "string",
|
2968
|
-
"value_allowed_null": false
|
2969
|
-
},
|
2970
|
-
{
|
2971
|
-
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
2972
|
-
"member": "string",
|
2973
|
-
"name": "RequestId",
|
2974
|
-
"type": "string"
|
2975
|
-
}
|
2976
|
-
],
|
2977
|
-
"type": "object"
|
2978
|
-
},
|
2979
2853
|
"Reference": {
|
2980
2854
|
"document": "翻译对话参考示例",
|
2981
2855
|
"members": [
|
@@ -3639,70 +3513,6 @@
|
|
3639
3513
|
],
|
3640
3514
|
"type": "object"
|
3641
3515
|
},
|
3642
|
-
"SubmitHunyuanTo3DJobRequest": {
|
3643
|
-
"document": "SubmitHunyuanTo3DJob请求参数结构体",
|
3644
|
-
"members": [
|
3645
|
-
{
|
3646
|
-
"disabled": false,
|
3647
|
-
"document": "3D内容的描述,中文正向提示词。最多支持200个 utf-8 字符,ImageBase64、ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。",
|
3648
|
-
"example": "一只小猫",
|
3649
|
-
"member": "string",
|
3650
|
-
"name": "Prompt",
|
3651
|
-
"required": false,
|
3652
|
-
"type": "string"
|
3653
|
-
},
|
3654
|
-
{
|
3655
|
-
"disabled": false,
|
3656
|
-
"document": "输入图 Base64 数据。\n大小:单边分辨率要求不小于50,不大于5000。大小不超过8m(base64编码后会大30%左右,建议实际输入图片不超过6m)\n格式:jpg,png,jpeg,webp。\nImageBase64、ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。",
|
3657
|
-
"example": "/9j/4QlQaHR0c...N6a2M5ZCI",
|
3658
|
-
"member": "string",
|
3659
|
-
"name": "ImageBase64",
|
3660
|
-
"required": false,
|
3661
|
-
"type": "string"
|
3662
|
-
},
|
3663
|
-
{
|
3664
|
-
"disabled": false,
|
3665
|
-
"document": "输入图Url。\n大小:单边分辨率要求不小于50,不大于5000。大小不超过8m(base64编码后会大30%左右,建议实际输入图片不超过6m)\n格式:jpg,png,jpeg,webp。\nImageBase64/ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。",
|
3666
|
-
"example": "https://cos.ap-guangzhou.myqcloud.com/imageurl.jpg",
|
3667
|
-
"member": "string",
|
3668
|
-
"name": "ImageUrl",
|
3669
|
-
"required": false,
|
3670
|
-
"type": "string"
|
3671
|
-
},
|
3672
|
-
{
|
3673
|
-
"disabled": false,
|
3674
|
-
"document": "生成数量。默认1,当前限制只能为1。",
|
3675
|
-
"example": "1",
|
3676
|
-
"member": "int64",
|
3677
|
-
"name": "Num",
|
3678
|
-
"required": false,
|
3679
|
-
"type": "int"
|
3680
|
-
}
|
3681
|
-
],
|
3682
|
-
"type": "object"
|
3683
|
-
},
|
3684
|
-
"SubmitHunyuanTo3DJobResponse": {
|
3685
|
-
"document": "SubmitHunyuanTo3DJob返回参数结构体",
|
3686
|
-
"members": [
|
3687
|
-
{
|
3688
|
-
"disabled": false,
|
3689
|
-
"document": "任务id(有效期24小时)",
|
3690
|
-
"example": "1172498703139831808",
|
3691
|
-
"member": "string",
|
3692
|
-
"name": "JobId",
|
3693
|
-
"output_required": false,
|
3694
|
-
"type": "string",
|
3695
|
-
"value_allowed_null": false
|
3696
|
-
},
|
3697
|
-
{
|
3698
|
-
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
3699
|
-
"member": "string",
|
3700
|
-
"name": "RequestId",
|
3701
|
-
"type": "string"
|
3702
|
-
}
|
3703
|
-
],
|
3704
|
-
"type": "object"
|
3705
|
-
},
|
3706
3516
|
"TextToImageLiteRequest": {
|
3707
3517
|
"document": "TextToImageLite请求参数结构体",
|
3708
3518
|
"members": [
|
@@ -182,14 +182,6 @@
|
|
182
182
|
"title": "成功查询"
|
183
183
|
}
|
184
184
|
],
|
185
|
-
"QueryHunyuanTo3DJob": [
|
186
|
-
{
|
187
|
-
"document": "任务完成",
|
188
|
-
"input": "POST / HTTP/1.1\nHost: hunyuan.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: QueryHunyuanTo3DJob\n<公共请求参数>\n\n{\n \"JobId\": \"1286221236421533696\"\n}",
|
189
|
-
"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://cos.ap-guangzhou.tencentcos.cn/3d/output.gif\"\n },\n {\n \"Type\": \"OBJ\",\n \"Url\": \"https://cos.ap-guangzhou.tencentcos.cn/3d/output/2e56fc_0.zip\"\n }\n ]\n }\n ],\n \"Status\": \"DONE\"\n }\n}",
|
190
|
-
"title": "任务完成"
|
191
|
-
}
|
192
|
-
],
|
193
185
|
"RunThread": [
|
194
186
|
{
|
195
187
|
"document": "执行会话",
|
@@ -222,14 +214,6 @@
|
|
222
214
|
"title": "调用成功"
|
223
215
|
}
|
224
216
|
],
|
225
|
-
"SubmitHunyuanTo3DJob": [
|
226
|
-
{
|
227
|
-
"document": "成功提交图生3D任务",
|
228
|
-
"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://cos.ap-guangzhou.myqcloud.com/***.jpg\"\n}",
|
229
|
-
"output": "{\n \"Response\": {\n \"JobId\": \"1286221236421533696\",\n \"RequestId\": \"f4aac8ca-a79d-4431-81fd-7312f79bf91d\"\n }\n}",
|
230
|
-
"title": "成功提交任务"
|
231
|
-
}
|
232
|
-
],
|
233
217
|
"TextToImageLite": [
|
234
218
|
{
|
235
219
|
"document": "成功调用,并返回生图url",
|
@@ -827,7 +827,7 @@
|
|
827
827
|
},
|
828
828
|
{
|
829
829
|
"disabled": false,
|
830
|
-
"document": "指定key的用途,默认为 \"ENCRYPT_DECRYPT\" 表示创建对称加解密密钥,其它支持用途 “ASYMMETRIC_DECRYPT_RSA_2048” 表示创建用于加解密的RSA2048非对称密钥,“ASYMMETRIC_DECRYPT_SM2” 表示创建用于加解密的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_SM2” 表示创建用于签名验签的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECC” 表示创建用于签名验签的ECC非对称密钥,“ASYMMETRIC_SIGN_VERIFY_RSA_2048” 表示创建用于签名验签的RSA_2048非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECDSA384”表示创建用于签名验签的 ECDSA384
|
830
|
+
"document": "指定key的用途,默认为 \"ENCRYPT_DECRYPT\" 表示创建对称加解密密钥,其它支持用途 “ASYMMETRIC_DECRYPT_RSA_2048” 表示创建用于加解密的RSA2048非对称密钥,“ASYMMETRIC_DECRYPT_SM2” 表示创建用于加解密的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_SM2” 表示创建用于签名验签的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECC” 表示创建用于签名验签的ECC非对称密钥,“ASYMMETRIC_SIGN_VERIFY_RSA_2048” 表示创建用于签名验签的RSA_2048非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECDSA384”表示创建用于签名验签的 ECDSA384 非对称密钥。完整的密钥用途与算法支持列表可通过 ListAlgorithms 接口获取。",
|
831
831
|
"example": "ENCRYPT_DECRYPT",
|
832
832
|
"member": "string",
|
833
833
|
"name": "KeyUsage",
|
@@ -1516,7 +1516,7 @@
|
|
1516
1516
|
{
|
1517
1517
|
"disabled": false,
|
1518
1518
|
"document": "密钥属性信息",
|
1519
|
-
"example": "
|
1519
|
+
"example": "无",
|
1520
1520
|
"member": "KeyMetadata",
|
1521
1521
|
"name": "KeyMetadata",
|
1522
1522
|
"output_required": true,
|
@@ -69,6 +69,58 @@ def doCreateKnowledgeSet(args, parsed_globals):
|
|
69
69
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
70
|
|
71
71
|
|
72
|
+
def doCheckDeployApp(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.LowcodeClient(cred, g_param[OptionsDefine.Region], profile)
|
99
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
100
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
+
model = models.CheckDeployAppRequest()
|
102
|
+
model.from_json_string(json.dumps(args))
|
103
|
+
start_time = time.time()
|
104
|
+
while True:
|
105
|
+
rsp = client.CheckDeployApp(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
|
+
|
72
124
|
def doUpdateKnowledgeSet(args, parsed_globals):
|
73
125
|
g_param = parse_global_arg(parsed_globals)
|
74
126
|
|
@@ -433,6 +485,58 @@ def doUploadKnowledgeDocumentSet(args, parsed_globals):
|
|
433
485
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
434
486
|
|
435
487
|
|
488
|
+
def doDeleteAppBindWxApp(args, parsed_globals):
|
489
|
+
g_param = parse_global_arg(parsed_globals)
|
490
|
+
|
491
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
492
|
+
cred = credential.CVMRoleCredential()
|
493
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
494
|
+
cred = credential.STSAssumeRoleCredential(
|
495
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
496
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
497
|
+
)
|
498
|
+
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):
|
499
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
500
|
+
else:
|
501
|
+
cred = credential.Credential(
|
502
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
503
|
+
)
|
504
|
+
http_profile = HttpProfile(
|
505
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
506
|
+
reqMethod="POST",
|
507
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
508
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
509
|
+
)
|
510
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
511
|
+
if g_param[OptionsDefine.Language]:
|
512
|
+
profile.language = g_param[OptionsDefine.Language]
|
513
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
514
|
+
client = mod.LowcodeClient(cred, g_param[OptionsDefine.Region], profile)
|
515
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
516
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
517
|
+
model = models.DeleteAppBindWxAppRequest()
|
518
|
+
model.from_json_string(json.dumps(args))
|
519
|
+
start_time = time.time()
|
520
|
+
while True:
|
521
|
+
rsp = client.DeleteAppBindWxApp(model)
|
522
|
+
result = rsp.to_json_string()
|
523
|
+
try:
|
524
|
+
json_obj = json.loads(result)
|
525
|
+
except TypeError as e:
|
526
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
527
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
528
|
+
break
|
529
|
+
cur_time = time.time()
|
530
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
531
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
532
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
533
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
534
|
+
else:
|
535
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
536
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
537
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
|
+
|
539
|
+
|
436
540
|
def doDescribeKnowledgeDocumentSetList(args, parsed_globals):
|
437
541
|
g_param = parse_global_arg(parsed_globals)
|
438
542
|
|
@@ -485,6 +589,110 @@ def doDescribeKnowledgeDocumentSetList(args, parsed_globals):
|
|
485
589
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
486
590
|
|
487
591
|
|
592
|
+
def doDeployApp(args, parsed_globals):
|
593
|
+
g_param = parse_global_arg(parsed_globals)
|
594
|
+
|
595
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
596
|
+
cred = credential.CVMRoleCredential()
|
597
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
598
|
+
cred = credential.STSAssumeRoleCredential(
|
599
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
600
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
601
|
+
)
|
602
|
+
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):
|
603
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
604
|
+
else:
|
605
|
+
cred = credential.Credential(
|
606
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
607
|
+
)
|
608
|
+
http_profile = HttpProfile(
|
609
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
610
|
+
reqMethod="POST",
|
611
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
612
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
613
|
+
)
|
614
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
615
|
+
if g_param[OptionsDefine.Language]:
|
616
|
+
profile.language = g_param[OptionsDefine.Language]
|
617
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
618
|
+
client = mod.LowcodeClient(cred, g_param[OptionsDefine.Region], profile)
|
619
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
620
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
621
|
+
model = models.DeployAppRequest()
|
622
|
+
model.from_json_string(json.dumps(args))
|
623
|
+
start_time = time.time()
|
624
|
+
while True:
|
625
|
+
rsp = client.DeployApp(model)
|
626
|
+
result = rsp.to_json_string()
|
627
|
+
try:
|
628
|
+
json_obj = json.loads(result)
|
629
|
+
except TypeError as e:
|
630
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
631
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
632
|
+
break
|
633
|
+
cur_time = time.time()
|
634
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
635
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
636
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
637
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
638
|
+
else:
|
639
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
640
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
641
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
642
|
+
|
643
|
+
|
644
|
+
def doPutWxAppIdToWeApp(args, parsed_globals):
|
645
|
+
g_param = parse_global_arg(parsed_globals)
|
646
|
+
|
647
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
648
|
+
cred = credential.CVMRoleCredential()
|
649
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
650
|
+
cred = credential.STSAssumeRoleCredential(
|
651
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
652
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
653
|
+
)
|
654
|
+
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):
|
655
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
656
|
+
else:
|
657
|
+
cred = credential.Credential(
|
658
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
659
|
+
)
|
660
|
+
http_profile = HttpProfile(
|
661
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
662
|
+
reqMethod="POST",
|
663
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
664
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
665
|
+
)
|
666
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
667
|
+
if g_param[OptionsDefine.Language]:
|
668
|
+
profile.language = g_param[OptionsDefine.Language]
|
669
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
670
|
+
client = mod.LowcodeClient(cred, g_param[OptionsDefine.Region], profile)
|
671
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
672
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
673
|
+
model = models.PutWxAppIdToWeAppRequest()
|
674
|
+
model.from_json_string(json.dumps(args))
|
675
|
+
start_time = time.time()
|
676
|
+
while True:
|
677
|
+
rsp = client.PutWxAppIdToWeApp(model)
|
678
|
+
result = rsp.to_json_string()
|
679
|
+
try:
|
680
|
+
json_obj = json.loads(result)
|
681
|
+
except TypeError as e:
|
682
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
683
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
684
|
+
break
|
685
|
+
cur_time = time.time()
|
686
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
687
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
688
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
689
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
690
|
+
else:
|
691
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
692
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
693
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
|
+
|
695
|
+
|
488
696
|
def doDeleteKnowledgeSet(args, parsed_globals):
|
489
697
|
g_param = parse_global_arg(parsed_globals)
|
490
698
|
|
@@ -549,6 +757,7 @@ MODELS_MAP = {
|
|
549
757
|
|
550
758
|
ACTION_MAP = {
|
551
759
|
"CreateKnowledgeSet": doCreateKnowledgeSet,
|
760
|
+
"CheckDeployApp": doCheckDeployApp,
|
552
761
|
"UpdateKnowledgeSet": doUpdateKnowledgeSet,
|
553
762
|
"SearchDocList": doSearchDocList,
|
554
763
|
"DescribeKnowledgeSetList": doDescribeKnowledgeSetList,
|
@@ -556,7 +765,10 @@ ACTION_MAP = {
|
|
556
765
|
"DeleteKnowledgeDocumentSet": doDeleteKnowledgeDocumentSet,
|
557
766
|
"DescribeKnowledgeDocumentSetDetail": doDescribeKnowledgeDocumentSetDetail,
|
558
767
|
"UploadKnowledgeDocumentSet": doUploadKnowledgeDocumentSet,
|
768
|
+
"DeleteAppBindWxApp": doDeleteAppBindWxApp,
|
559
769
|
"DescribeKnowledgeDocumentSetList": doDescribeKnowledgeDocumentSetList,
|
770
|
+
"DeployApp": doDeployApp,
|
771
|
+
"PutWxAppIdToWeApp": doPutWxAppIdToWeApp,
|
560
772
|
"DeleteKnowledgeSet": doDeleteKnowledgeSet,
|
561
773
|
|
562
774
|
}
|