tccli 3.0.1280.1__py2.py3-none-any.whl → 3.0.1282.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/acp/v20220105/api.json +80 -77
- tccli/services/acp/v20220105/examples.json +1 -1
- tccli/services/aiart/aiart_client.py +53 -0
- tccli/services/aiart/v20221229/api.json +62 -0
- tccli/services/aiart/v20221229/examples.json +8 -0
- tccli/services/autoscaling/v20180419/api.json +1 -1
- tccli/services/ccc/v20200210/api.json +9 -0
- tccli/services/cfg/v20210820/api.json +36 -23
- tccli/services/cfg/v20210820/examples.json +11 -11
- tccli/services/controlcenter/controlcenter_client.py +212 -0
- tccli/services/controlcenter/v20230110/api.json +516 -0
- tccli/services/controlcenter/v20230110/examples.json +32 -0
- tccli/services/cvm/cvm_client.py +212 -0
- tccli/services/cvm/v20170312/api.json +793 -4
- tccli/services/cvm/v20170312/examples.json +32 -0
- tccli/services/cynosdb/v20190107/api.json +13 -3
- tccli/services/dlc/v20210125/api.json +11 -0
- tccli/services/domain/v20180808/api.json +3 -3
- tccli/services/ess/v20201111/api.json +2 -2
- tccli/services/essbasic/v20210526/api.json +2 -2
- tccli/services/ims/v20201229/api.json +1 -1
- tccli/services/iotexplorer/v20190423/api.json +128 -0
- tccli/services/iotexplorer/v20190423/examples.json +3 -3
- tccli/services/keewidb/v20220308/api.json +2 -2
- tccli/services/lcic/v20220817/api.json +110 -63
- tccli/services/lcic/v20220817/examples.json +6 -6
- tccli/services/live/v20180801/api.json +15 -14
- tccli/services/lke/lke_client.py +4 -110
- tccli/services/lke/v20231130/api.json +0 -164
- tccli/services/lke/v20231130/examples.json +0 -16
- tccli/services/lowcode/v20210108/api.json +120 -11
- tccli/services/lowcode/v20210108/examples.json +9 -9
- tccli/services/mariadb/v20170312/api.json +7 -7
- tccli/services/mariadb/v20170312/examples.json +1 -1
- tccli/services/mongodb/v20190725/api.json +3 -3
- tccli/services/mqtt/mqtt_client.py +216 -4
- tccli/services/mqtt/v20240516/api.json +515 -0
- tccli/services/mqtt/v20240516/examples.json +38 -0
- tccli/services/ocr/v20181119/api.json +3 -3
- tccli/services/organization/organization_client.py +114 -8
- tccli/services/organization/v20210331/api.json +86 -0
- tccli/services/organization/v20210331/examples.json +16 -0
- tccli/services/partners/partners_client.py +61 -8
- tccli/services/partners/v20180321/api.json +110 -0
- tccli/services/partners/v20180321/examples.json +8 -0
- tccli/services/sms/v20190711/examples.json +1 -1
- tccli/services/sms/v20210111/examples.json +1 -1
- tccli/services/tat/v20201028/api.json +141 -128
- tccli/services/tat/v20201028/examples.json +12 -12
- tccli/services/teo/v20220901/api.json +4 -4
- tccli/services/tke/v20180525/api.json +293 -293
- tccli/services/tke/v20220501/api.json +2 -2
- tccli/services/vdb/v20230616/api.json +12 -12
- {tccli-3.0.1280.1.dist-info → tccli-3.0.1282.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1280.1.dist-info → tccli-3.0.1282.1.dist-info}/RECORD +59 -59
- {tccli-3.0.1280.1.dist-info → tccli-3.0.1282.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1280.1.dist-info → tccli-3.0.1282.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1280.1.dist-info → tccli-3.0.1282.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1282.1'
|
@@ -73,29 +73,29 @@
|
|
73
73
|
"example": "com.test.app",
|
74
74
|
"member": "string",
|
75
75
|
"name": "AppPackage",
|
76
|
-
"
|
76
|
+
"output_required": true,
|
77
77
|
"type": "string",
|
78
78
|
"value_allowed_null": false
|
79
79
|
},
|
80
80
|
{
|
81
81
|
"disabled": false,
|
82
|
-
"document": "App
|
82
|
+
"document": "App名称",
|
83
83
|
"example": "测试App",
|
84
84
|
"member": "string",
|
85
85
|
"name": "AppName",
|
86
|
-
"
|
86
|
+
"output_required": true,
|
87
87
|
"type": "string",
|
88
|
-
"value_allowed_null":
|
88
|
+
"value_allowed_null": false
|
89
89
|
},
|
90
90
|
{
|
91
91
|
"disabled": false,
|
92
|
-
"document": "App
|
92
|
+
"document": "App版本",
|
93
93
|
"example": "v1.0",
|
94
94
|
"member": "string",
|
95
95
|
"name": "AppVersion",
|
96
|
-
"
|
96
|
+
"output_required": true,
|
97
97
|
"type": "string",
|
98
|
-
"value_allowed_null":
|
98
|
+
"value_allowed_null": false
|
99
99
|
},
|
100
100
|
{
|
101
101
|
"disabled": false,
|
@@ -103,89 +103,89 @@
|
|
103
103
|
"example": "0",
|
104
104
|
"member": "int64",
|
105
105
|
"name": "Platform",
|
106
|
-
"
|
106
|
+
"output_required": true,
|
107
107
|
"type": "int",
|
108
108
|
"value_allowed_null": false
|
109
109
|
},
|
110
110
|
{
|
111
111
|
"disabled": false,
|
112
|
-
"document": "App
|
112
|
+
"document": "App隐私诊断报告下载链接",
|
113
113
|
"example": "诊断报告下载链接",
|
114
114
|
"member": "string",
|
115
115
|
"name": "ReportUrl",
|
116
|
-
"
|
116
|
+
"output_required": true,
|
117
117
|
"type": "string",
|
118
|
-
"value_allowed_null":
|
118
|
+
"value_allowed_null": false
|
119
119
|
},
|
120
120
|
{
|
121
121
|
"disabled": false,
|
122
|
-
"document": "App
|
122
|
+
"document": "App隐私诊断报告名称",
|
123
123
|
"example": "诊断报告名称",
|
124
124
|
"member": "string",
|
125
125
|
"name": "ReportTitle",
|
126
|
-
"
|
126
|
+
"output_required": true,
|
127
127
|
"type": "string",
|
128
|
-
"value_allowed_null":
|
128
|
+
"value_allowed_null": false
|
129
129
|
},
|
130
130
|
{
|
131
131
|
"disabled": false,
|
132
|
-
"document": "App
|
132
|
+
"document": "App诊断堆栈报告下载链接",
|
133
133
|
"example": "诊断堆栈报告下载链接",
|
134
134
|
"member": "string",
|
135
135
|
"name": "BehaviorUrl",
|
136
|
-
"
|
136
|
+
"output_required": true,
|
137
137
|
"type": "string",
|
138
|
-
"value_allowed_null":
|
138
|
+
"value_allowed_null": false
|
139
139
|
},
|
140
140
|
{
|
141
141
|
"disabled": false,
|
142
|
-
"document": "App
|
142
|
+
"document": "App诊断堆栈报告名称",
|
143
143
|
"example": "诊断堆栈报告名称",
|
144
144
|
"member": "string",
|
145
145
|
"name": "BehaviorTitle",
|
146
|
-
"
|
146
|
+
"output_required": true,
|
147
147
|
"type": "string",
|
148
|
-
"value_allowed_null":
|
148
|
+
"value_allowed_null": false
|
149
149
|
},
|
150
150
|
{
|
151
151
|
"disabled": false,
|
152
|
-
"document": "
|
152
|
+
"document": "诊断高风险项数量",
|
153
153
|
"example": "5",
|
154
154
|
"member": "int64",
|
155
155
|
"name": "HighRiskCount",
|
156
|
-
"
|
156
|
+
"output_required": true,
|
157
157
|
"type": "int",
|
158
|
-
"value_allowed_null":
|
158
|
+
"value_allowed_null": false
|
159
159
|
},
|
160
160
|
{
|
161
161
|
"disabled": false,
|
162
|
-
"document": "
|
162
|
+
"document": "隐私申明文件名称",
|
163
163
|
"example": "隐私申明文本.txt",
|
164
164
|
"member": "string",
|
165
165
|
"name": "PrivacyTextName",
|
166
|
-
"
|
166
|
+
"output_required": true,
|
167
167
|
"type": "string",
|
168
|
-
"value_allowed_null":
|
168
|
+
"value_allowed_null": false
|
169
169
|
},
|
170
170
|
{
|
171
171
|
"disabled": false,
|
172
|
-
"document": "软件MD5
|
172
|
+
"document": "软件MD5",
|
173
173
|
"example": "c7991677cc57d3b9d4974316db0ac4f9f430593f",
|
174
174
|
"member": "string",
|
175
175
|
"name": "SoftwareMD5",
|
176
|
-
"
|
176
|
+
"output_required": true,
|
177
177
|
"type": "string",
|
178
|
-
"value_allowed_null":
|
178
|
+
"value_allowed_null": false
|
179
179
|
},
|
180
180
|
{
|
181
181
|
"disabled": false,
|
182
|
-
"document": "隐私文本MD5
|
182
|
+
"document": "隐私文本MD5",
|
183
183
|
"example": "3bc1efe919a5245f711071373a2b4523",
|
184
184
|
"member": "string",
|
185
185
|
"name": "PrivacyTextMD5",
|
186
|
-
"
|
186
|
+
"output_required": true,
|
187
187
|
"type": "string",
|
188
|
-
"value_allowed_null":
|
188
|
+
"value_allowed_null": false
|
189
189
|
}
|
190
190
|
],
|
191
191
|
"usage": "out"
|
@@ -199,7 +199,7 @@
|
|
199
199
|
"example": "1701438134******0",
|
200
200
|
"member": "string",
|
201
201
|
"name": "TaskID",
|
202
|
-
"
|
202
|
+
"output_required": true,
|
203
203
|
"type": "string",
|
204
204
|
"value_allowed_null": false
|
205
205
|
},
|
@@ -209,7 +209,7 @@
|
|
209
209
|
"example": "0",
|
210
210
|
"member": "int64",
|
211
211
|
"name": "TaskType",
|
212
|
-
"
|
212
|
+
"output_required": true,
|
213
213
|
"type": "int",
|
214
214
|
"value_allowed_null": false
|
215
215
|
},
|
@@ -219,19 +219,19 @@
|
|
219
219
|
"example": "0",
|
220
220
|
"member": "int64",
|
221
221
|
"name": "TaskStatus",
|
222
|
-
"
|
222
|
+
"output_required": true,
|
223
223
|
"type": "int",
|
224
224
|
"value_allowed_null": false
|
225
225
|
},
|
226
226
|
{
|
227
227
|
"disabled": false,
|
228
|
-
"document": "
|
228
|
+
"document": "错误信息",
|
229
229
|
"example": "内部错误",
|
230
230
|
"member": "string",
|
231
231
|
"name": "TaskErrMsg",
|
232
|
-
"
|
232
|
+
"output_required": true,
|
233
233
|
"type": "string",
|
234
|
-
"value_allowed_null":
|
234
|
+
"value_allowed_null": false
|
235
235
|
},
|
236
236
|
{
|
237
237
|
"disabled": false,
|
@@ -239,7 +239,7 @@
|
|
239
239
|
"example": "2",
|
240
240
|
"member": "int64",
|
241
241
|
"name": "Source",
|
242
|
-
"
|
242
|
+
"output_required": true,
|
243
243
|
"type": "int",
|
244
244
|
"value_allowed_null": false
|
245
245
|
},
|
@@ -249,7 +249,7 @@
|
|
249
249
|
"example": "复杂类型",
|
250
250
|
"member": "AppInfoItem",
|
251
251
|
"name": "AppInfo",
|
252
|
-
"
|
252
|
+
"output_required": true,
|
253
253
|
"type": "object",
|
254
254
|
"value_allowed_null": false
|
255
255
|
},
|
@@ -259,7 +259,7 @@
|
|
259
259
|
"example": "2021-09-30 10:57:34",
|
260
260
|
"member": "string",
|
261
261
|
"name": "StartTime",
|
262
|
-
"
|
262
|
+
"output_required": true,
|
263
263
|
"type": "string",
|
264
264
|
"value_allowed_null": false
|
265
265
|
},
|
@@ -269,19 +269,19 @@
|
|
269
269
|
"example": "2021-10-11 14:53:36",
|
270
270
|
"member": "string",
|
271
271
|
"name": "EndTime",
|
272
|
-
"
|
272
|
+
"output_required": true,
|
273
273
|
"type": "string",
|
274
274
|
"value_allowed_null": false
|
275
275
|
},
|
276
276
|
{
|
277
277
|
"disabled": false,
|
278
|
-
"document": "
|
278
|
+
"document": "联系人信息",
|
279
279
|
"example": "老王",
|
280
280
|
"member": "string",
|
281
281
|
"name": "ContactName",
|
282
|
-
"
|
282
|
+
"output_required": true,
|
283
283
|
"type": "string",
|
284
|
-
"value_allowed_null":
|
284
|
+
"value_allowed_null": false
|
285
285
|
}
|
286
286
|
],
|
287
287
|
"usage": "out"
|
@@ -624,13 +624,13 @@
|
|
624
624
|
},
|
625
625
|
{
|
626
626
|
"disabled": false,
|
627
|
-
"document": "任务ID
|
627
|
+
"document": "任务ID",
|
628
628
|
"example": "170143813*******360",
|
629
629
|
"member": "string",
|
630
630
|
"name": "TaskID",
|
631
631
|
"output_required": true,
|
632
632
|
"type": "string",
|
633
|
-
"value_allowed_null":
|
633
|
+
"value_allowed_null": false
|
634
634
|
},
|
635
635
|
{
|
636
636
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
@@ -665,7 +665,7 @@
|
|
665
665
|
{
|
666
666
|
"disabled": false,
|
667
667
|
"document": "任务id",
|
668
|
-
"example": "
|
668
|
+
"example": "6bb56a09278740bc80c5dc6dab783eff",
|
669
669
|
"member": "string",
|
670
670
|
"name": "TaskID",
|
671
671
|
"required": true,
|
@@ -692,7 +692,7 @@
|
|
692
692
|
{
|
693
693
|
"disabled": false,
|
694
694
|
"document": "子渠道APP MD5值",
|
695
|
-
"example": "
|
695
|
+
"example": "d7849918ab117b2857d6335a76eceea8",
|
696
696
|
"member": "string",
|
697
697
|
"name": "AppMD5",
|
698
698
|
"required": true,
|
@@ -710,24 +710,27 @@
|
|
710
710
|
"example": "0",
|
711
711
|
"member": "int64",
|
712
712
|
"name": "Result",
|
713
|
+
"output_required": true,
|
713
714
|
"type": "int",
|
714
715
|
"value_allowed_null": false
|
715
716
|
},
|
716
717
|
{
|
717
718
|
"disabled": false,
|
718
719
|
"document": "诊断报告/堆栈信息/报告json结果下载链接",
|
719
|
-
"example": "
|
720
|
+
"example": "https://xxxx.xxxx.com/report.pdf",
|
720
721
|
"member": "string",
|
721
722
|
"name": "ReportUrl",
|
723
|
+
"output_required": true,
|
722
724
|
"type": "string",
|
723
725
|
"value_allowed_null": false
|
724
726
|
},
|
725
727
|
{
|
726
728
|
"disabled": false,
|
727
729
|
"document": "诊断报告/堆栈/报告json结果的名称",
|
728
|
-
"example": "
|
730
|
+
"example": "xxxx诊断报告",
|
729
731
|
"member": "string",
|
730
732
|
"name": "ReportTitle",
|
733
|
+
"output_required": true,
|
731
734
|
"type": "string",
|
732
735
|
"value_allowed_null": false
|
733
736
|
},
|
@@ -867,7 +870,7 @@
|
|
867
870
|
"example": "0",
|
868
871
|
"member": "int64",
|
869
872
|
"name": "Result",
|
870
|
-
"
|
873
|
+
"output_required": true,
|
871
874
|
"type": "int",
|
872
875
|
"value_allowed_null": false
|
873
876
|
},
|
@@ -877,7 +880,7 @@
|
|
877
880
|
"example": "无",
|
878
881
|
"member": "ResourceUsageInfoData",
|
879
882
|
"name": "Data",
|
880
|
-
"
|
883
|
+
"output_required": true,
|
881
884
|
"type": "object",
|
882
885
|
"value_allowed_null": false
|
883
886
|
},
|
@@ -1079,39 +1082,39 @@
|
|
1079
1082
|
"example": "0",
|
1080
1083
|
"member": "int64",
|
1081
1084
|
"name": "Result",
|
1082
|
-
"
|
1085
|
+
"output_required": true,
|
1083
1086
|
"type": "int",
|
1084
1087
|
"value_allowed_null": false
|
1085
1088
|
},
|
1086
1089
|
{
|
1087
1090
|
"disabled": false,
|
1088
|
-
"document": "诊断报告/堆栈信息/报告json
|
1091
|
+
"document": "诊断报告/堆栈信息/报告json结果下载链接",
|
1089
1092
|
"example": "诊断报告下载链接",
|
1090
1093
|
"member": "string",
|
1091
1094
|
"name": "ReportUrl",
|
1092
|
-
"
|
1095
|
+
"output_required": true,
|
1093
1096
|
"type": "string",
|
1094
|
-
"value_allowed_null":
|
1097
|
+
"value_allowed_null": false
|
1095
1098
|
},
|
1096
1099
|
{
|
1097
1100
|
"disabled": false,
|
1098
|
-
"document": "诊断报告/堆栈/报告json
|
1101
|
+
"document": "诊断报告/堆栈/报告json结果的名称",
|
1099
1102
|
"example": "诊断报告名称",
|
1100
1103
|
"member": "string",
|
1101
1104
|
"name": "ReportTitle",
|
1102
|
-
"
|
1105
|
+
"output_required": true,
|
1103
1106
|
"type": "string",
|
1104
|
-
"value_allowed_null":
|
1107
|
+
"value_allowed_null": false
|
1105
1108
|
},
|
1106
1109
|
{
|
1107
1110
|
"disabled": false,
|
1108
|
-
"document": "诊断json
|
1111
|
+
"document": "诊断json结果内容",
|
1109
1112
|
"example": "诊断json结果内容",
|
1110
1113
|
"member": "string",
|
1111
1114
|
"name": "ReportResult",
|
1112
|
-
"
|
1115
|
+
"output_required": true,
|
1113
1116
|
"type": "string",
|
1114
|
-
"value_allowed_null":
|
1117
|
+
"value_allowed_null": false
|
1115
1118
|
},
|
1116
1119
|
{
|
1117
1120
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
@@ -1257,13 +1260,13 @@
|
|
1257
1260
|
"members": [
|
1258
1261
|
{
|
1259
1262
|
"disabled": false,
|
1260
|
-
"document": "
|
1263
|
+
"document": "流程编号",
|
1261
1264
|
"example": "1.1",
|
1262
1265
|
"member": "string",
|
1263
1266
|
"name": "FlowNo",
|
1264
|
-
"
|
1267
|
+
"output_required": true,
|
1265
1268
|
"type": "string",
|
1266
|
-
"value_allowed_null":
|
1269
|
+
"value_allowed_null": false
|
1267
1270
|
},
|
1268
1271
|
{
|
1269
1272
|
"disabled": false,
|
@@ -1271,7 +1274,7 @@
|
|
1271
1274
|
"example": "APK 下载",
|
1272
1275
|
"member": "string",
|
1273
1276
|
"name": "FlowName",
|
1274
|
-
"
|
1277
|
+
"output_required": true,
|
1275
1278
|
"type": "string",
|
1276
1279
|
"value_allowed_null": false
|
1277
1280
|
},
|
@@ -1281,39 +1284,39 @@
|
|
1281
1284
|
"example": "1",
|
1282
1285
|
"member": "int64",
|
1283
1286
|
"name": "FlowStatus",
|
1284
|
-
"
|
1287
|
+
"output_required": true,
|
1285
1288
|
"type": "int",
|
1286
1289
|
"value_allowed_null": false
|
1287
1290
|
},
|
1288
1291
|
{
|
1289
1292
|
"disabled": false,
|
1290
|
-
"document": "
|
1293
|
+
"document": "流程状态描述",
|
1291
1294
|
"example": "进行中",
|
1292
1295
|
"member": "string",
|
1293
1296
|
"name": "FlowStateDesc",
|
1294
|
-
"
|
1297
|
+
"output_required": true,
|
1295
1298
|
"type": "string",
|
1296
|
-
"value_allowed_null":
|
1299
|
+
"value_allowed_null": false
|
1297
1300
|
},
|
1298
1301
|
{
|
1299
1302
|
"disabled": false,
|
1300
|
-
"document": "
|
1303
|
+
"document": "流程启动时间",
|
1301
1304
|
"example": "2022-03-21 15:17:18",
|
1302
1305
|
"member": "string",
|
1303
1306
|
"name": "StartTime",
|
1304
|
-
"
|
1307
|
+
"output_required": true,
|
1305
1308
|
"type": "string",
|
1306
|
-
"value_allowed_null":
|
1309
|
+
"value_allowed_null": false
|
1307
1310
|
},
|
1308
1311
|
{
|
1309
1312
|
"disabled": false,
|
1310
|
-
"document": "
|
1313
|
+
"document": "流程完成时间",
|
1311
1314
|
"example": "2022-03-21 15:17:18",
|
1312
1315
|
"member": "string",
|
1313
1316
|
"name": "EndTime",
|
1314
|
-
"
|
1317
|
+
"output_required": true,
|
1315
1318
|
"type": "string",
|
1316
|
-
"value_allowed_null":
|
1319
|
+
"value_allowed_null": false
|
1317
1320
|
}
|
1318
1321
|
],
|
1319
1322
|
"usage": "out"
|
@@ -34,7 +34,7 @@
|
|
34
34
|
{
|
35
35
|
"document": "",
|
36
36
|
"input": "POST / HTTP/1.1\nHost: acp.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateAppScanTask\n<公共请求参数>\n\n{\n \"AppPackage\": \"com.test.app\",\n \"Source\": \"2\",\n \"Platform\": \"0\",\n \"TaskType\": \"0\"\n}",
|
37
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
37
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"ed2aa90dc-2354a9d8ee8304-a7a9-4a29-0\",\n \"Result\": 0,\n \"TaskID\": \"170143813*******360\"\n }\n}",
|
38
38
|
"title": "创建App隐私合规基础诊断任务"
|
39
39
|
},
|
40
40
|
{
|
@@ -69,6 +69,58 @@ def doSubmitMemeJob(args, parsed_globals):
|
|
69
69
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
70
|
|
71
71
|
|
72
|
+
def doRefineImage(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.AiartClient(cred, g_param[OptionsDefine.Region], profile)
|
99
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
100
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
+
model = models.RefineImageRequest()
|
102
|
+
model.from_json_string(json.dumps(args))
|
103
|
+
start_time = time.time()
|
104
|
+
while True:
|
105
|
+
rsp = client.RefineImage(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 doSketchToImage(args, parsed_globals):
|
73
125
|
g_param = parse_global_arg(parsed_globals)
|
74
126
|
|
@@ -1017,6 +1069,7 @@ MODELS_MAP = {
|
|
1017
1069
|
|
1018
1070
|
ACTION_MAP = {
|
1019
1071
|
"SubmitMemeJob": doSubmitMemeJob,
|
1072
|
+
"RefineImage": doRefineImage,
|
1020
1073
|
"SketchToImage": doSketchToImage,
|
1021
1074
|
"SubmitTextToImageProJob": doSubmitTextToImageProJob,
|
1022
1075
|
"ReplaceBackground": doReplaceBackground,
|
@@ -70,6 +70,13 @@
|
|
70
70
|
"output": "QueryTrainPortraitModelJobResponse",
|
71
71
|
"status": "online"
|
72
72
|
},
|
73
|
+
"RefineImage": {
|
74
|
+
"document": "将图像变清晰,增强图像细节。变清晰后的图片将保持原图比例,长边为2048。\n默认提供1个并发,代表最多能同时处理1个已提交的任务。",
|
75
|
+
"input": "RefineImageRequest",
|
76
|
+
"name": "图片变清晰",
|
77
|
+
"output": "RefineImageResponse",
|
78
|
+
"status": "online"
|
79
|
+
},
|
73
80
|
"ReplaceBackground": {
|
74
81
|
"document": "商品背景生成接口根据指定的背景描述 Prompt,将商品图中的原背景替换为自定义的新背景并保留商品主体形象,实现商品背景的自由生成与更换。\n\n商品背景生成默认提供1个并发任务数,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。",
|
75
82
|
"input": "ReplaceBackgroundRequest",
|
@@ -1233,6 +1240,61 @@
|
|
1233
1240
|
],
|
1234
1241
|
"usage": "both"
|
1235
1242
|
},
|
1243
|
+
"RefineImageRequest": {
|
1244
|
+
"document": "RefineImage请求参数结构体",
|
1245
|
+
"members": [
|
1246
|
+
{
|
1247
|
+
"disabled": false,
|
1248
|
+
"document": "输入图 Url。\nBase64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
|
1249
|
+
"example": "https://xxx.com/image.jpg",
|
1250
|
+
"member": "string",
|
1251
|
+
"name": "InputUrl",
|
1252
|
+
"required": false,
|
1253
|
+
"type": "string"
|
1254
|
+
},
|
1255
|
+
{
|
1256
|
+
"disabled": false,
|
1257
|
+
"document": "输入图 Base64 数据。\nBase64 和 Url 必须提供一个,如果都提供以 Url 为准。\n图片限制:转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。",
|
1258
|
+
"example": "9j/4QlQaHR0c...N6a2M5ZCI",
|
1259
|
+
"member": "string",
|
1260
|
+
"name": "InputImage",
|
1261
|
+
"required": false,
|
1262
|
+
"type": "string"
|
1263
|
+
},
|
1264
|
+
{
|
1265
|
+
"disabled": false,
|
1266
|
+
"document": "返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。 示例值:url",
|
1267
|
+
"example": "url",
|
1268
|
+
"member": "string",
|
1269
|
+
"name": "RspImgType",
|
1270
|
+
"required": false,
|
1271
|
+
"type": "string"
|
1272
|
+
}
|
1273
|
+
],
|
1274
|
+
"type": "object"
|
1275
|
+
},
|
1276
|
+
"RefineImageResponse": {
|
1277
|
+
"document": "RefineImage返回参数结构体",
|
1278
|
+
"members": [
|
1279
|
+
{
|
1280
|
+
"disabled": false,
|
1281
|
+
"document": "根据入参 RspImgType 填入不同,返回不同的内容。\n如果传入 base64 则返回生成图 Base64 编码。\n如果传入 url 则返回的生成图 URL , 有效期1小时,请及时保存。",
|
1282
|
+
"example": "url",
|
1283
|
+
"member": "string",
|
1284
|
+
"name": "ResultImage",
|
1285
|
+
"output_required": false,
|
1286
|
+
"type": "string",
|
1287
|
+
"value_allowed_null": false
|
1288
|
+
},
|
1289
|
+
{
|
1290
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
1291
|
+
"member": "string",
|
1292
|
+
"name": "RequestId",
|
1293
|
+
"type": "string"
|
1294
|
+
}
|
1295
|
+
],
|
1296
|
+
"type": "object"
|
1297
|
+
},
|
1236
1298
|
"ReplaceBackgroundRequest": {
|
1237
1299
|
"document": "ReplaceBackground请求参数结构体",
|
1238
1300
|
"members": [
|
@@ -80,6 +80,14 @@
|
|
80
80
|
"title": "查询成功"
|
81
81
|
}
|
82
82
|
],
|
83
|
+
"RefineImage": [
|
84
|
+
{
|
85
|
+
"document": "",
|
86
|
+
"input": "POST / HTTP/1.1\nHost: aiart.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RefineImage\n<公共请求参数>\n\n{\n \"InputUrl\": \"https://xxx.com/image.jpg\",\n \"RspImgType\": \"url\"\n}",
|
87
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"75c9d572-a163-4ffd-852f-eb6e11bd6ff9\",\n \"ResultImage\": \"https://xxx.cos.ap-guangzhou.myqcloud.com/refine_image/xxx.jpg\"\n }\n}",
|
88
|
+
"title": "请求调用示例"
|
89
|
+
}
|
90
|
+
],
|
83
91
|
"ReplaceBackground": [
|
84
92
|
{
|
85
93
|
"document": "成功调用并生成图片",
|
@@ -246,7 +246,7 @@
|
|
246
246
|
"status": "online"
|
247
247
|
},
|
248
248
|
"ExitStandby": {
|
249
|
-
"document": "伸缩组内实例退出备用中状态。\n*
|
249
|
+
"document": "伸缩组内实例退出备用中状态。\n* 退出备用中状态后,实例会进入运行中状态,CLB 权重值恢复为预设值\n* 调用弹性伸缩开关机接口会使得备用中状态发生变化,而云服务器开关机接口不会影响\n* 实例退出备用中状态后,伸缩组会上调期望实例数,新期望数不能大于最大值",
|
250
250
|
"input": "ExitStandbyRequest",
|
251
251
|
"name": "实例退出备用中状态",
|
252
252
|
"output": "ExitStandbyResponse",
|
@@ -2026,6 +2026,15 @@
|
|
2026
2026
|
"name": "ExtractConfig",
|
2027
2027
|
"required": false,
|
2028
2028
|
"type": "list"
|
2029
|
+
},
|
2030
|
+
{
|
2031
|
+
"disabled": false,
|
2032
|
+
"document": "模型温度控制",
|
2033
|
+
"example": "0",
|
2034
|
+
"member": "float",
|
2035
|
+
"name": "Temperature",
|
2036
|
+
"required": false,
|
2037
|
+
"type": "float"
|
2029
2038
|
}
|
2030
2039
|
],
|
2031
2040
|
"type": "object"
|