tccli 3.0.1390.1__py2.py3-none-any.whl → 3.0.1391.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/ai3d/ai3d_client.py +114 -8
- tccli/services/ai3d/v20250513/api.json +154 -0
- tccli/services/ai3d/v20250513/examples.json +16 -0
- tccli/services/asr/v20190614/api.json +1 -1
- tccli/services/ccc/v20200210/api.json +1 -1
- tccli/services/ckafka/v20190819/api.json +2 -2
- tccli/services/clb/v20180317/api.json +20 -1
- tccli/services/gs/gs_client.py +57 -4
- tccli/services/gs/v20191118/api.json +79 -0
- tccli/services/gs/v20191118/examples.json +8 -0
- tccli/services/gwlb/v20240906/api.json +117 -0
- tccli/services/lkeap/v20240522/api.json +25 -1
- tccli/services/ocr/v20181119/api.json +1 -1
- tccli/services/trtc/v20190722/api.json +1 -1
- tccli/services/vtc/v20240223/api.json +7 -7
- tccli/services/waf/v20180125/api.json +277 -0
- tccli/services/waf/v20180125/examples.json +24 -0
- tccli/services/waf/waf_client.py +159 -0
- {tccli-3.0.1390.1.dist-info → tccli-3.0.1391.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1390.1.dist-info → tccli-3.0.1391.1.dist-info}/RECORD +24 -24
- {tccli-3.0.1390.1.dist-info → tccli-3.0.1391.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1390.1.dist-info → tccli-3.0.1391.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1390.1.dist-info → tccli-3.0.1391.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1391.1'
|
@@ -17,6 +17,58 @@ from tencentcloud.ai3d.v20250513 import models as models_v20250513
|
|
17
17
|
from jmespath import search
|
18
18
|
import time
|
19
19
|
|
20
|
+
def doQueryHunyuanTo3DJob(args, parsed_globals):
|
21
|
+
g_param = parse_global_arg(parsed_globals)
|
22
|
+
|
23
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
24
|
+
cred = credential.CVMRoleCredential()
|
25
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
26
|
+
cred = credential.STSAssumeRoleCredential(
|
27
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
28
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
29
|
+
)
|
30
|
+
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):
|
31
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
32
|
+
else:
|
33
|
+
cred = credential.Credential(
|
34
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
35
|
+
)
|
36
|
+
http_profile = HttpProfile(
|
37
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
38
|
+
reqMethod="POST",
|
39
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
40
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
41
|
+
)
|
42
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
43
|
+
if g_param[OptionsDefine.Language]:
|
44
|
+
profile.language = g_param[OptionsDefine.Language]
|
45
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
46
|
+
client = mod.Ai3dClient(cred, g_param[OptionsDefine.Region], profile)
|
47
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
48
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
+
model = models.QueryHunyuanTo3DJobRequest()
|
50
|
+
model.from_json_string(json.dumps(args))
|
51
|
+
start_time = time.time()
|
52
|
+
while True:
|
53
|
+
rsp = client.QueryHunyuanTo3DJob(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
|
+
|
20
72
|
def doSubmitHunyuanTo3DProJob(args, parsed_globals):
|
21
73
|
g_param = parse_global_arg(parsed_globals)
|
22
74
|
|
@@ -69,7 +121,7 @@ def doSubmitHunyuanTo3DProJob(args, parsed_globals):
|
|
69
121
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
122
|
|
71
123
|
|
72
|
-
def
|
124
|
+
def doQueryHunyuanTo3DRapidJob(args, parsed_globals):
|
73
125
|
g_param = parse_global_arg(parsed_globals)
|
74
126
|
|
75
127
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -98,11 +150,11 @@ def doQueryHunyuanTo3DProJob(args, parsed_globals):
|
|
98
150
|
client = mod.Ai3dClient(cred, g_param[OptionsDefine.Region], profile)
|
99
151
|
client._sdkVersion += ("_CLI_" + __version__)
|
100
152
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
-
model = models.
|
153
|
+
model = models.QueryHunyuanTo3DRapidJobRequest()
|
102
154
|
model.from_json_string(json.dumps(args))
|
103
155
|
start_time = time.time()
|
104
156
|
while True:
|
105
|
-
rsp = client.
|
157
|
+
rsp = client.QueryHunyuanTo3DRapidJob(model)
|
106
158
|
result = rsp.to_json_string()
|
107
159
|
try:
|
108
160
|
json_obj = json.loads(result)
|
@@ -173,7 +225,7 @@ def doSubmitHunyuanTo3DJob(args, parsed_globals):
|
|
173
225
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
226
|
|
175
227
|
|
176
|
-
def
|
228
|
+
def doQueryHunyuanTo3DProJob(args, parsed_globals):
|
177
229
|
g_param = parse_global_arg(parsed_globals)
|
178
230
|
|
179
231
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -202,11 +254,63 @@ def doQueryHunyuanTo3DJob(args, parsed_globals):
|
|
202
254
|
client = mod.Ai3dClient(cred, g_param[OptionsDefine.Region], profile)
|
203
255
|
client._sdkVersion += ("_CLI_" + __version__)
|
204
256
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
205
|
-
model = models.
|
257
|
+
model = models.QueryHunyuanTo3DProJobRequest()
|
206
258
|
model.from_json_string(json.dumps(args))
|
207
259
|
start_time = time.time()
|
208
260
|
while True:
|
209
|
-
rsp = client.
|
261
|
+
rsp = client.QueryHunyuanTo3DProJob(model)
|
262
|
+
result = rsp.to_json_string()
|
263
|
+
try:
|
264
|
+
json_obj = json.loads(result)
|
265
|
+
except TypeError as e:
|
266
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
267
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
268
|
+
break
|
269
|
+
cur_time = time.time()
|
270
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
271
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
272
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
273
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
274
|
+
else:
|
275
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
276
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
277
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
|
+
|
279
|
+
|
280
|
+
def doSubmitHunyuanTo3DRapidJob(args, parsed_globals):
|
281
|
+
g_param = parse_global_arg(parsed_globals)
|
282
|
+
|
283
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
284
|
+
cred = credential.CVMRoleCredential()
|
285
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
286
|
+
cred = credential.STSAssumeRoleCredential(
|
287
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
288
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
289
|
+
)
|
290
|
+
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):
|
291
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
292
|
+
else:
|
293
|
+
cred = credential.Credential(
|
294
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
295
|
+
)
|
296
|
+
http_profile = HttpProfile(
|
297
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
298
|
+
reqMethod="POST",
|
299
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
300
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
301
|
+
)
|
302
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
303
|
+
if g_param[OptionsDefine.Language]:
|
304
|
+
profile.language = g_param[OptionsDefine.Language]
|
305
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
306
|
+
client = mod.Ai3dClient(cred, g_param[OptionsDefine.Region], profile)
|
307
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
308
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
+
model = models.SubmitHunyuanTo3DRapidJobRequest()
|
310
|
+
model.from_json_string(json.dumps(args))
|
311
|
+
start_time = time.time()
|
312
|
+
while True:
|
313
|
+
rsp = client.SubmitHunyuanTo3DRapidJob(model)
|
210
314
|
result = rsp.to_json_string()
|
211
315
|
try:
|
212
316
|
json_obj = json.loads(result)
|
@@ -236,10 +340,12 @@ MODELS_MAP = {
|
|
236
340
|
}
|
237
341
|
|
238
342
|
ACTION_MAP = {
|
343
|
+
"QueryHunyuanTo3DJob": doQueryHunyuanTo3DJob,
|
239
344
|
"SubmitHunyuanTo3DProJob": doSubmitHunyuanTo3DProJob,
|
240
|
-
"
|
345
|
+
"QueryHunyuanTo3DRapidJob": doQueryHunyuanTo3DRapidJob,
|
241
346
|
"SubmitHunyuanTo3DJob": doSubmitHunyuanTo3DJob,
|
242
|
-
"
|
347
|
+
"QueryHunyuanTo3DProJob": doQueryHunyuanTo3DProJob,
|
348
|
+
"SubmitHunyuanTo3DRapidJob": doSubmitHunyuanTo3DRapidJob,
|
243
349
|
|
244
350
|
}
|
245
351
|
|
@@ -14,6 +14,13 @@
|
|
14
14
|
"output": "QueryHunyuanTo3DProJobResponse",
|
15
15
|
"status": "online"
|
16
16
|
},
|
17
|
+
"QueryHunyuanTo3DRapidJob": {
|
18
|
+
"document": "混元生3D接口,基于混元大模型,根据输入的文本描述/图片智能生成3D。\n默认提供1个并发,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后,才能开始处理下一个任务。",
|
19
|
+
"input": "QueryHunyuanTo3DRapidJobRequest",
|
20
|
+
"name": "查询混元生3D极速版任务",
|
21
|
+
"output": "QueryHunyuanTo3DRapidJobResponse",
|
22
|
+
"status": "online"
|
23
|
+
},
|
17
24
|
"SubmitHunyuanTo3DJob": {
|
18
25
|
"document": "混元生3D接口,基于混元大模型,根据输入的文本描述/图片智能生成3D。\n默认提供1个并发,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后,才能开始处理下一个任务。",
|
19
26
|
"input": "SubmitHunyuanTo3DJobRequest",
|
@@ -27,6 +34,13 @@
|
|
27
34
|
"name": "提交混元生3D专业版任务",
|
28
35
|
"output": "SubmitHunyuanTo3DProJobResponse",
|
29
36
|
"status": "online"
|
37
|
+
},
|
38
|
+
"SubmitHunyuanTo3DRapidJob": {
|
39
|
+
"document": "混元生3D接口,基于混元大模型,根据输入的文本描述/图片智能生成3D。\n默认提供1个并发,代表最多能同时处理1个已提交的任务,上一个任务处理完毕后,才能开始处理下一个任务。",
|
40
|
+
"input": "SubmitHunyuanTo3DRapidJobRequest",
|
41
|
+
"name": "提交混元生3D极速版任务",
|
42
|
+
"output": "SubmitHunyuanTo3DRapidJobResponse",
|
43
|
+
"status": "online"
|
30
44
|
}
|
31
45
|
},
|
32
46
|
"metadata": {
|
@@ -209,6 +223,73 @@
|
|
209
223
|
],
|
210
224
|
"type": "object"
|
211
225
|
},
|
226
|
+
"QueryHunyuanTo3DRapidJobRequest": {
|
227
|
+
"document": "QueryHunyuanTo3DRapidJob请求参数结构体",
|
228
|
+
"members": [
|
229
|
+
{
|
230
|
+
"disabled": false,
|
231
|
+
"document": "任务ID。",
|
232
|
+
"example": "1315932989749215232",
|
233
|
+
"member": "string",
|
234
|
+
"name": "JobId",
|
235
|
+
"required": false,
|
236
|
+
"type": "string"
|
237
|
+
}
|
238
|
+
],
|
239
|
+
"type": "object"
|
240
|
+
},
|
241
|
+
"QueryHunyuanTo3DRapidJobResponse": {
|
242
|
+
"document": "QueryHunyuanTo3DRapidJob返回参数结构体",
|
243
|
+
"members": [
|
244
|
+
{
|
245
|
+
"disabled": false,
|
246
|
+
"document": "任务状态。WAIT:等待中,RUN:执行中,FAIL:任务失败,DONE:任务成功",
|
247
|
+
"example": "RUN",
|
248
|
+
"member": "string",
|
249
|
+
"name": "Status",
|
250
|
+
"output_required": false,
|
251
|
+
"type": "string",
|
252
|
+
"value_allowed_null": false
|
253
|
+
},
|
254
|
+
{
|
255
|
+
"disabled": false,
|
256
|
+
"document": "错误码",
|
257
|
+
"example": "InvalidParameter",
|
258
|
+
"member": "string",
|
259
|
+
"name": "ErrorCode",
|
260
|
+
"output_required": false,
|
261
|
+
"type": "string",
|
262
|
+
"value_allowed_null": false
|
263
|
+
},
|
264
|
+
{
|
265
|
+
"disabled": false,
|
266
|
+
"document": "错误信息",
|
267
|
+
"example": "参数错误",
|
268
|
+
"member": "string",
|
269
|
+
"name": "ErrorMessage",
|
270
|
+
"output_required": false,
|
271
|
+
"type": "string",
|
272
|
+
"value_allowed_null": false
|
273
|
+
},
|
274
|
+
{
|
275
|
+
"disabled": false,
|
276
|
+
"document": "生成的3D文件数组。",
|
277
|
+
"example": "无",
|
278
|
+
"member": "File3D",
|
279
|
+
"name": "ResultFile3Ds",
|
280
|
+
"output_required": false,
|
281
|
+
"type": "list",
|
282
|
+
"value_allowed_null": false
|
283
|
+
},
|
284
|
+
{
|
285
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
286
|
+
"member": "string",
|
287
|
+
"name": "RequestId",
|
288
|
+
"type": "string"
|
289
|
+
}
|
290
|
+
],
|
291
|
+
"type": "object"
|
292
|
+
},
|
212
293
|
"SubmitHunyuanTo3DJobRequest": {
|
213
294
|
"document": "SubmitHunyuanTo3DJob请求参数结构体",
|
214
295
|
"members": [
|
@@ -382,6 +463,79 @@
|
|
382
463
|
],
|
383
464
|
"type": "object"
|
384
465
|
},
|
466
|
+
"SubmitHunyuanTo3DRapidJobRequest": {
|
467
|
+
"document": "SubmitHunyuanTo3DRapidJob请求参数结构体",
|
468
|
+
"members": [
|
469
|
+
{
|
470
|
+
"disabled": false,
|
471
|
+
"document": "文生3D,3D内容的描述,中文正向提示词。\n最多支持200个 utf-8 字符。\n文生3D, image、image_url和 prompt必填其一,且prompt和image/image_url不能同时存在。",
|
472
|
+
"example": "一只小猫",
|
473
|
+
"member": "string",
|
474
|
+
"name": "Prompt",
|
475
|
+
"required": false,
|
476
|
+
"type": "string"
|
477
|
+
},
|
478
|
+
{
|
479
|
+
"disabled": false,
|
480
|
+
"document": "输入图 Base64 数据。\n大小:单边分辨率要求不小于128,不大于5000。大小不超过8m(base64编码后会大30%左右,建议实际输入图片不超过6m)\n格式:jpg,png,jpeg,webp。\nImageBase64、ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。",
|
481
|
+
"example": "/9j/4QlQaHR0c...N6a2M5ZCI",
|
482
|
+
"member": "string",
|
483
|
+
"name": "ImageBase64",
|
484
|
+
"required": false,
|
485
|
+
"type": "string"
|
486
|
+
},
|
487
|
+
{
|
488
|
+
"disabled": false,
|
489
|
+
"document": "输入图Url。\n大小:单边分辨率要求不小于128,不大于5000。大小不超过8m(base64编码后会大30%左右,建议实际输入图片不超过6m)\n格式:jpg,png,jpeg,webp。\nImageBase64/ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。",
|
490
|
+
"example": "https://***.cos.ap-guangzhou.myqcloud.com/***.jpg",
|
491
|
+
"member": "string",
|
492
|
+
"name": "ImageUrl",
|
493
|
+
"required": false,
|
494
|
+
"type": "string"
|
495
|
+
},
|
496
|
+
{
|
497
|
+
"disabled": false,
|
498
|
+
"document": "生成模型的格式,仅限制生成一种格式。\n生成模型文件组默认返回obj格式。\n可选值:OBJ,GLB,STL,USDZ,FBX,MP4。",
|
499
|
+
"example": "OBJ",
|
500
|
+
"member": "string",
|
501
|
+
"name": "ResultFormat",
|
502
|
+
"required": false,
|
503
|
+
"type": "string"
|
504
|
+
},
|
505
|
+
{
|
506
|
+
"disabled": false,
|
507
|
+
"document": "是否开启 PBR材质生成,默认 false。",
|
508
|
+
"example": "false",
|
509
|
+
"member": "bool",
|
510
|
+
"name": "EnablePBR",
|
511
|
+
"required": false,
|
512
|
+
"type": "bool"
|
513
|
+
}
|
514
|
+
],
|
515
|
+
"type": "object"
|
516
|
+
},
|
517
|
+
"SubmitHunyuanTo3DRapidJobResponse": {
|
518
|
+
"document": "SubmitHunyuanTo3DRapidJob返回参数结构体",
|
519
|
+
"members": [
|
520
|
+
{
|
521
|
+
"disabled": false,
|
522
|
+
"document": "任务ID(有效期24小时)",
|
523
|
+
"example": "1315932989749215232",
|
524
|
+
"member": "string",
|
525
|
+
"name": "JobId",
|
526
|
+
"output_required": false,
|
527
|
+
"type": "string",
|
528
|
+
"value_allowed_null": false
|
529
|
+
},
|
530
|
+
{
|
531
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
532
|
+
"member": "string",
|
533
|
+
"name": "RequestId",
|
534
|
+
"type": "string"
|
535
|
+
}
|
536
|
+
],
|
537
|
+
"type": "object"
|
538
|
+
},
|
385
539
|
"ViewImage": {
|
386
540
|
"document": "多视角图片",
|
387
541
|
"members": [
|
@@ -16,6 +16,14 @@
|
|
16
16
|
"title": "查询生3D专业版示例"
|
17
17
|
}
|
18
18
|
],
|
19
|
+
"QueryHunyuanTo3DRapidJob": [
|
20
|
+
{
|
21
|
+
"document": "",
|
22
|
+
"input": "POST / HTTP/1.1\nHost: ai3d.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: QueryHunyuanTo3DRapidJob\n<公共请求参数>\n\n{\n \"JobId\": \"1336255233494892544\"\n}",
|
23
|
+
"output": "{\n \"Response\": {\n \"ErrorCode\": \"\",\n \"ErrorMessage\": \"\",\n \"RequestId\": \"3020cd6c-4ad6-4df3-8560-c233f35d6221\",\n \"ResultFile3Ds\": [\n {\n \"PreviewImageUrl\": \"https://xxx.cos.ap-guangzhou.tencentcos.cn/xxx.png\",\n \"Type\": \"OBJ\",\n \"Url\": \"https:/xxx.cos.ap-guangzhou.tencentcos.cn/xxx.zip\"\n }\n ],\n \"Status\": \"DONE\"\n }\n}",
|
24
|
+
"title": "查询任务调用示例"
|
25
|
+
}
|
26
|
+
],
|
19
27
|
"SubmitHunyuanTo3DJob": [
|
20
28
|
{
|
21
29
|
"document": "",
|
@@ -31,6 +39,14 @@
|
|
31
39
|
"output": "{\n \"Response\": {\n \"JobId\": \"1357237233311637504\",\n \"RequestId\": \"173f8c3b-d559-4e17-aac7-4e42303773ac\"\n }\n}",
|
32
40
|
"title": "提交生3D专业版示例"
|
33
41
|
}
|
42
|
+
],
|
43
|
+
"SubmitHunyuanTo3DRapidJob": [
|
44
|
+
{
|
45
|
+
"document": "",
|
46
|
+
"input": "POST / HTTP/1.1\nHost: ai3d.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SubmitHunyuanTo3DRapidJob\n<公共请求参数>\n\n{\n \"ImageUrl\": \"https://***.cos.ap-guangzhou.myqcloud.com/***.jpg\"\n}",
|
47
|
+
"output": "{\n \"Response\": {\n \"JobId\": \"1335141824121323520\",\n \"RequestId\": \"5f84f1df-7a29-4f93-8dc0-d9e6dea6bff9\"\n }\n}",
|
48
|
+
"title": "提交任务调用示例"
|
49
|
+
}
|
34
50
|
]
|
35
51
|
},
|
36
52
|
"version": "1.0"
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"status": "online"
|
23
23
|
},
|
24
24
|
"CreateAsyncRecognitionTask": {
|
25
|
-
"document": "本接口用于对语音流进行准实时识别,通过异步回调来返回识别结果。适用于直播审核等场景。\n<br>• 支持rtmp、rtsp等流媒体协议,以及各类基于http协议的直播流(不支持hls)\n<br>• 音频流时长无限制,服务会自动拉取音频流数据,若连续10
|
25
|
+
"document": "本接口用于对语音流进行准实时识别,通过异步回调来返回识别结果。适用于直播审核等场景。\n<br>• 支持rtmp、rtsp等流媒体协议,以及各类基于http协议的直播流(不支持hls)\n<br>• 音频流时长无限制,服务会自动拉取音频流数据,若连续10分钟拉不到流或流数据无人声时,服务会终止识别任务\n<br>• 服务通过回调的方式来提供识别结果,用户需要提供CallbackUrl。回调时机为一小段话(最长15秒)回调一次。\n<br>• 签名方法参考 [公共参数](https://cloud.tencent.com/document/api/1093/35640) 中签名方法v3。\n<br>• 默认单账号限制并发数为20路,如您有提高并发限制的需求,请提[工单](https://console.cloud.tencent.com/workorder/category)进行咨询。",
|
26
26
|
"input": "CreateAsyncRecognitionTaskRequest",
|
27
27
|
"name": "语音流异步识别任务创建",
|
28
28
|
"output": "CreateAsyncRecognitionTaskResponse",
|
@@ -9741,7 +9741,7 @@
|
|
9741
9741
|
},
|
9742
9742
|
{
|
9743
9743
|
"disabled": false,
|
9744
|
-
"document": "EndStatus与EndStatusString一一对应,具体枚举如下:\n\n**场景\t EndStatus\tEndStatusString\t状态说明**\n\n电话呼入&呼出\t1\t ok\t
|
9744
|
+
"document": "EndStatus与EndStatusString一一对应,具体枚举如下:\n\n**场景\t EndStatus\tEndStatusString\t状态说明**\n\n电话呼入&呼出\t1\t ok\t **正常通话**\n\n电话呼入\t 102\t ivrGiveUp\t **IVR期间用户放弃**\n\n电话呼入\t 103\t waitingGiveUp\t **排队时用户放弃**\n\n电话呼入\t 104\t ringingGiveUp\t **振铃时用户放弃**\n\n电话呼入\t 105\t noSeatOnline\t **无座席在线**\n\n电话呼入 106\t notWorkTime\t **非工作时间** \n\n电话呼入\t 107\t ivrEnd\t **IVR全自动结束(无人工介入)**\n\n电话呼入\t 100\t blackList **黑名单(系统侧)**\n\n电话呼出 108\t restrictedCallee\t**全局外呼风险号码拦截(系统侧)**\n\n电话呼出 109\t tooManyRequest\t **外呼频控拦截(系统侧)**\n\n电话呼出 110\t restrictedArea\t **外呼地域拦截(系统侧)**\n\n电话呼出 111\t restrictedTime\t**外呼时段拦截(系统侧)**\n \n电话呼出 202 notAnswer\t **被叫未接听**\n\n电话呼出 203\t userReject\t**被叫拒接挂断**\n\n电话呼出\t 204\t powerOff\t**被叫关机**\n\n电话呼出 205 numberNotExist\t**被叫空号**\n\n电话呼出\t 206\t busy\t**被叫忙**\n\n电话呼出 \t 207\t outOfCredit\t**被叫欠费**\n\n电话呼出\t 208\t operatorError\t**运营商线路异常**\n\n电话呼出 \t209\t callerCancel\t**主叫取消**\n\n电话呼出\t 210\t notInService\t**被叫不在服务区**\n\n电话呼入&呼出\t211 clientError **座席客户端错误**\n\n电话呼出 212 carrierBlocked **运营商拦截**\n\n电话呼出 213 callReminder **提示来电提醒**\n\n电话呼出 215 numberInvalid **被叫号码无效**\n\n电话呼出 216 callRestricted **提示呼叫受限**\n\n电话呼出 217 calleeRestricted **被叫黑名单受限**\n\n电话呼出 218 areaRestricted **被叫区域受限**\n\n电话呼出 219 promptCallForwarding **提示呼叫转移**\n\n电话呼出 220 callerCancelWhileRing **振铃中主叫取消**\n\n电话呼出 221 callerCancelWithoutRing **未振铃被叫号码异常**\n\n音频呼入 501 callConflict **VoIP用户呼叫冲突终止**\n\n音频呼入 502 clientTimeout **VoIP用户客户端超时**\n\n音频呼入 503 voipClientError **VoIP用户客户端错误**\n\n中文详情[参考](https://www.tencentcloud.com/zh/document/product/1229/71847)\n\n英文详情[参考](https://www.tencentcloud.com/document/product/1229/71847?lang=en)",
|
9745
9745
|
"example": "1",
|
9746
9746
|
"member": "int64",
|
9747
9747
|
"name": "EndStatus",
|
@@ -472,7 +472,7 @@
|
|
472
472
|
"DescribeUser": {
|
473
473
|
"document": "查询用户信息",
|
474
474
|
"input": "DescribeUserRequest",
|
475
|
-
"name": "查询用户信息",
|
475
|
+
"name": "根据实例id查询用户信息",
|
476
476
|
"output": "DescribeUserResponse",
|
477
477
|
"status": "online"
|
478
478
|
},
|
@@ -8930,7 +8930,7 @@
|
|
8930
8930
|
{
|
8931
8931
|
"disabled": false,
|
8932
8932
|
"document": "返回结果",
|
8933
|
-
"example": "
|
8933
|
+
"example": "无",
|
8934
8934
|
"member": "UserResponse",
|
8935
8935
|
"name": "Result",
|
8936
8936
|
"output_required": true,
|
@@ -3624,6 +3624,15 @@
|
|
3624
3624
|
"name": "SessionExpireTime",
|
3625
3625
|
"required": false,
|
3626
3626
|
"type": "int"
|
3627
|
+
},
|
3628
|
+
{
|
3629
|
+
"disabled": false,
|
3630
|
+
"document": "IP版本类型。",
|
3631
|
+
"example": "IPv4",
|
3632
|
+
"member": "string",
|
3633
|
+
"name": "IpVersion",
|
3634
|
+
"required": false,
|
3635
|
+
"type": "string"
|
3627
3636
|
}
|
3628
3637
|
],
|
3629
3638
|
"type": "object"
|
@@ -10840,7 +10849,7 @@
|
|
10840
10849
|
},
|
10841
10850
|
{
|
10842
10851
|
"disabled": false,
|
10843
|
-
"document": "后端服务修改后的标签。此参数的优先级低于前述[Target](https://cloud.tencent.com/document/api/214/30694#Target)中的Tag参数,即最终的标签以Target中的Tag参数值为准,仅当Target中的
|
10852
|
+
"document": "后端服务修改后的标签。此参数的优先级低于前述[Target](https://cloud.tencent.com/document/api/214/30694#Target)中的Tag参数,即最终的标签以Target中的Tag参数值为准,仅当Target中的Tag参数为空时,才以RsTagRule中的Tag参数为准。",
|
10844
10853
|
"example": "tag_target",
|
10845
10854
|
"member": "string",
|
10846
10855
|
"name": "Tag",
|
@@ -12428,6 +12437,16 @@
|
|
12428
12437
|
"output_required": false,
|
12429
12438
|
"type": "int",
|
12430
12439
|
"value_allowed_null": false
|
12440
|
+
},
|
12441
|
+
{
|
12442
|
+
"disabled": false,
|
12443
|
+
"document": "IP版本。",
|
12444
|
+
"example": "IPv4",
|
12445
|
+
"member": "string",
|
12446
|
+
"name": "IpVersion",
|
12447
|
+
"output_required": true,
|
12448
|
+
"type": "string",
|
12449
|
+
"value_allowed_null": false
|
12431
12450
|
}
|
12432
12451
|
],
|
12433
12452
|
"usage": "out"
|
tccli/services/gs/gs_client.py
CHANGED
@@ -693,6 +693,58 @@ def doModifyAndroidInstancesProperties(args, parsed_globals):
|
|
693
693
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
694
|
|
695
695
|
|
696
|
+
def doCreateSession(args, parsed_globals):
|
697
|
+
g_param = parse_global_arg(parsed_globals)
|
698
|
+
|
699
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
700
|
+
cred = credential.CVMRoleCredential()
|
701
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
702
|
+
cred = credential.STSAssumeRoleCredential(
|
703
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
704
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
705
|
+
)
|
706
|
+
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):
|
707
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
708
|
+
else:
|
709
|
+
cred = credential.Credential(
|
710
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
711
|
+
)
|
712
|
+
http_profile = HttpProfile(
|
713
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
714
|
+
reqMethod="POST",
|
715
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
716
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
717
|
+
)
|
718
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
719
|
+
if g_param[OptionsDefine.Language]:
|
720
|
+
profile.language = g_param[OptionsDefine.Language]
|
721
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
722
|
+
client = mod.GsClient(cred, g_param[OptionsDefine.Region], profile)
|
723
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
724
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
+
model = models.CreateSessionRequest()
|
726
|
+
model.from_json_string(json.dumps(args))
|
727
|
+
start_time = time.time()
|
728
|
+
while True:
|
729
|
+
rsp = client.CreateSession(model)
|
730
|
+
result = rsp.to_json_string()
|
731
|
+
try:
|
732
|
+
json_obj = json.loads(result)
|
733
|
+
except TypeError as e:
|
734
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
735
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
736
|
+
break
|
737
|
+
cur_time = time.time()
|
738
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
739
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
740
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
741
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
742
|
+
else:
|
743
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
744
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
745
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
|
+
|
747
|
+
|
696
748
|
def doModifyAndroidInstancesInformation(args, parsed_globals):
|
697
749
|
g_param = parse_global_arg(parsed_globals)
|
698
750
|
|
@@ -1369,7 +1421,7 @@ def doDeleteAndroidInstanceLabel(args, parsed_globals):
|
|
1369
1421
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1370
1422
|
|
1371
1423
|
|
1372
|
-
def
|
1424
|
+
def doDistributeAndroidInstanceImageToHosts(args, parsed_globals):
|
1373
1425
|
g_param = parse_global_arg(parsed_globals)
|
1374
1426
|
|
1375
1427
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1398,11 +1450,11 @@ def doCreateSession(args, parsed_globals):
|
|
1398
1450
|
client = mod.GsClient(cred, g_param[OptionsDefine.Region], profile)
|
1399
1451
|
client._sdkVersion += ("_CLI_" + __version__)
|
1400
1452
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1401
|
-
model = models.
|
1453
|
+
model = models.DistributeAndroidInstanceImageToHostsRequest()
|
1402
1454
|
model.from_json_string(json.dumps(args))
|
1403
1455
|
start_time = time.time()
|
1404
1456
|
while True:
|
1405
|
-
rsp = client.
|
1457
|
+
rsp = client.DistributeAndroidInstanceImageToHosts(model)
|
1406
1458
|
result = rsp.to_json_string()
|
1407
1459
|
try:
|
1408
1460
|
json_obj = json.loads(result)
|
@@ -3993,6 +4045,7 @@ ACTION_MAP = {
|
|
3993
4045
|
"UninstallAndroidInstancesApp": doUninstallAndroidInstancesApp,
|
3994
4046
|
"CreateAndroidInstanceImage": doCreateAndroidInstanceImage,
|
3995
4047
|
"ModifyAndroidInstancesProperties": doModifyAndroidInstancesProperties,
|
4048
|
+
"CreateSession": doCreateSession,
|
3996
4049
|
"ModifyAndroidInstancesInformation": doModifyAndroidInstancesInformation,
|
3997
4050
|
"DeleteAndroidInstanceImages": doDeleteAndroidInstanceImages,
|
3998
4051
|
"DistributeFileToAndroidInstances": doDistributeFileToAndroidInstances,
|
@@ -4006,7 +4059,7 @@ ACTION_MAP = {
|
|
4006
4059
|
"RestartAndroidInstancesApp": doRestartAndroidInstancesApp,
|
4007
4060
|
"ModifyAndroidInstancesResolution": doModifyAndroidInstancesResolution,
|
4008
4061
|
"DeleteAndroidInstanceLabel": doDeleteAndroidInstanceLabel,
|
4009
|
-
"
|
4062
|
+
"DistributeAndroidInstanceImageToHosts": doDistributeAndroidInstanceImageToHosts,
|
4010
4063
|
"CreateAndroidInstanceLabel": doCreateAndroidInstanceLabel,
|
4011
4064
|
"RenewAndroidInstancesAccessToken": doRenewAndroidInstancesAccessToken,
|
4012
4065
|
"CreateAndroidApp": doCreateAndroidApp,
|