tccli 3.0.1335.1__py2.py3-none-any.whl → 3.0.1337.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/antiddos/v20200309/api.json +2 -2
- tccli/services/bi/v20220105/api.json +93 -0
- tccli/services/captcha/v20190722/api.json +10 -0
- tccli/services/cdb/v20170320/api.json +4 -4
- tccli/services/cdwdoris/v20211228/api.json +2 -2
- tccli/services/cfs/v20190719/api.json +7 -7
- tccli/services/cfw/v20190904/api.json +9 -0
- tccli/services/cls/v20201016/api.json +10 -0
- tccli/services/cme/v20191029/api.json +1 -1
- tccli/services/csip/v20221121/api.json +10 -0
- tccli/services/es/v20250101/api.json +50 -0
- tccli/services/ess/v20201111/api.json +10 -1
- tccli/services/essbasic/v20210526/api.json +11 -2
- tccli/services/gs/v20191118/api.json +11 -1
- tccli/services/gs/v20191118/examples.json +1 -1
- tccli/services/iotexplorer/iotexplorer_client.py +114 -8
- tccli/services/iotexplorer/v20190423/api.json +170 -0
- tccli/services/iotexplorer/v20190423/examples.json +16 -0
- tccli/services/lighthouse/lighthouse_client.py +53 -0
- tccli/services/lighthouse/v20200324/api.json +43 -0
- tccli/services/lighthouse/v20200324/examples.json +8 -0
- tccli/services/lke/lke_client.py +110 -4
- tccli/services/lke/v20231130/api.json +163 -2
- tccli/services/lke/v20231130/examples.json +16 -0
- tccli/services/lkeap/v20240522/api.json +3 -3
- tccli/services/monitor/monitor_client.py +53 -0
- tccli/services/monitor/v20180724/api.json +43 -0
- tccli/services/monitor/v20180724/examples.json +8 -0
- tccli/services/mps/v20190612/api.json +117 -1
- tccli/services/ocr/v20181119/api.json +1 -1
- tccli/services/ocr/v20181119/examples.json +1 -1
- tccli/services/tcbr/v20220217/api.json +22 -0
- tccli/services/tdmq/v20200217/api.json +165 -25
- tccli/services/tdmq/v20200217/examples.json +1 -1
- tccli/services/teo/v20220901/api.json +1 -1
- tccli/services/tiia/tiia_client.py +73 -126
- tccli/services/tiia/v20190529/api.json +0 -112
- tccli/services/tiia/v20190529/examples.json +0 -14
- tccli/services/tione/tione_client.py +216 -4
- tccli/services/tione/v20211111/api.json +190 -0
- tccli/services/tione/v20211111/examples.json +32 -0
- tccli/services/trocket/trocket_client.py +57 -4
- tccli/services/trocket/v20230308/api.json +149 -1
- tccli/services/trocket/v20230308/examples.json +8 -0
- tccli/services/trtc/v20190722/api.json +2 -2
- tccli/services/tsf/v20180326/api.json +4 -3
- tccli/services/tsf/v20180326/examples.json +2 -2
- {tccli-3.0.1335.1.dist-info → tccli-3.0.1337.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1335.1.dist-info → tccli-3.0.1337.1.dist-info}/RECORD +53 -53
- {tccli-3.0.1335.1.dist-info → tccli-3.0.1337.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1335.1.dist-info → tccli-3.0.1337.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1335.1.dist-info → tccli-3.0.1337.1.dist-info}/license_files/LICENSE +0 -0
@@ -17,59 +17,7 @@ from tencentcloud.tiia.v20190529 import models as models_v20190529
|
|
17
17
|
from jmespath import search
|
18
18
|
import time
|
19
19
|
|
20
|
-
def
|
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.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
47
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
48
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
-
model = models.DetectEnvelopeRequest()
|
50
|
-
model.from_json_string(json.dumps(args))
|
51
|
-
start_time = time.time()
|
52
|
-
while True:
|
53
|
-
rsp = client.DetectEnvelope(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 doDescribeImages(args, parsed_globals):
|
20
|
+
def doCreateImage(args, parsed_globals):
|
73
21
|
g_param = parse_global_arg(parsed_globals)
|
74
22
|
|
75
23
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -98,11 +46,11 @@ def doDescribeImages(args, parsed_globals):
|
|
98
46
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
99
47
|
client._sdkVersion += ("_CLI_" + __version__)
|
100
48
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
-
model = models.
|
49
|
+
model = models.CreateImageRequest()
|
102
50
|
model.from_json_string(json.dumps(args))
|
103
51
|
start_time = time.time()
|
104
52
|
while True:
|
105
|
-
rsp = client.
|
53
|
+
rsp = client.CreateImage(model)
|
106
54
|
result = rsp.to_json_string()
|
107
55
|
try:
|
108
56
|
json_obj = json.loads(result)
|
@@ -121,7 +69,7 @@ def doDescribeImages(args, parsed_globals):
|
|
121
69
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
70
|
|
123
71
|
|
124
|
-
def
|
72
|
+
def doDetectLabelPro(args, parsed_globals):
|
125
73
|
g_param = parse_global_arg(parsed_globals)
|
126
74
|
|
127
75
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -150,11 +98,11 @@ def doDetectPet(args, parsed_globals):
|
|
150
98
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
151
99
|
client._sdkVersion += ("_CLI_" + __version__)
|
152
100
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
-
model = models.
|
101
|
+
model = models.DetectLabelProRequest()
|
154
102
|
model.from_json_string(json.dumps(args))
|
155
103
|
start_time = time.time()
|
156
104
|
while True:
|
157
|
-
rsp = client.
|
105
|
+
rsp = client.DetectLabelPro(model)
|
158
106
|
result = rsp.to_json_string()
|
159
107
|
try:
|
160
108
|
json_obj = json.loads(result)
|
@@ -173,7 +121,7 @@ def doDetectPet(args, parsed_globals):
|
|
173
121
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
122
|
|
175
123
|
|
176
|
-
def
|
124
|
+
def doRecognizeCar(args, parsed_globals):
|
177
125
|
g_param = parse_global_arg(parsed_globals)
|
178
126
|
|
179
127
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -202,11 +150,11 @@ def doCreateGroup(args, parsed_globals):
|
|
202
150
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
203
151
|
client._sdkVersion += ("_CLI_" + __version__)
|
204
152
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
205
|
-
model = models.
|
153
|
+
model = models.RecognizeCarRequest()
|
206
154
|
model.from_json_string(json.dumps(args))
|
207
155
|
start_time = time.time()
|
208
156
|
while True:
|
209
|
-
rsp = client.
|
157
|
+
rsp = client.RecognizeCar(model)
|
210
158
|
result = rsp.to_json_string()
|
211
159
|
try:
|
212
160
|
json_obj = json.loads(result)
|
@@ -277,7 +225,7 @@ def doDetectLabel(args, parsed_globals):
|
|
277
225
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
226
|
|
279
227
|
|
280
|
-
def
|
228
|
+
def doAssessQuality(args, parsed_globals):
|
281
229
|
g_param = parse_global_arg(parsed_globals)
|
282
230
|
|
283
231
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -306,11 +254,11 @@ def doDetectChefDress(args, parsed_globals):
|
|
306
254
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
307
255
|
client._sdkVersion += ("_CLI_" + __version__)
|
308
256
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
-
model = models.
|
257
|
+
model = models.AssessQualityRequest()
|
310
258
|
model.from_json_string(json.dumps(args))
|
311
259
|
start_time = time.time()
|
312
260
|
while True:
|
313
|
-
rsp = client.
|
261
|
+
rsp = client.AssessQuality(model)
|
314
262
|
result = rsp.to_json_string()
|
315
263
|
try:
|
316
264
|
json_obj = json.loads(result)
|
@@ -329,7 +277,7 @@ def doDetectChefDress(args, parsed_globals):
|
|
329
277
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
330
278
|
|
331
279
|
|
332
|
-
def
|
280
|
+
def doDetectChefDress(args, parsed_globals):
|
333
281
|
g_param = parse_global_arg(parsed_globals)
|
334
282
|
|
335
283
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -358,11 +306,11 @@ def doDeleteImages(args, parsed_globals):
|
|
358
306
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
359
307
|
client._sdkVersion += ("_CLI_" + __version__)
|
360
308
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
361
|
-
model = models.
|
309
|
+
model = models.DetectChefDressRequest()
|
362
310
|
model.from_json_string(json.dumps(args))
|
363
311
|
start_time = time.time()
|
364
312
|
while True:
|
365
|
-
rsp = client.
|
313
|
+
rsp = client.DetectChefDress(model)
|
366
314
|
result = rsp.to_json_string()
|
367
315
|
try:
|
368
316
|
json_obj = json.loads(result)
|
@@ -381,7 +329,7 @@ def doDeleteImages(args, parsed_globals):
|
|
381
329
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
330
|
|
383
331
|
|
384
|
-
def
|
332
|
+
def doDetectDisgust(args, parsed_globals):
|
385
333
|
g_param = parse_global_arg(parsed_globals)
|
386
334
|
|
387
335
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -410,11 +358,11 @@ def doAssessQuality(args, parsed_globals):
|
|
410
358
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
411
359
|
client._sdkVersion += ("_CLI_" + __version__)
|
412
360
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
-
model = models.
|
361
|
+
model = models.DetectDisgustRequest()
|
414
362
|
model.from_json_string(json.dumps(args))
|
415
363
|
start_time = time.time()
|
416
364
|
while True:
|
417
|
-
rsp = client.
|
365
|
+
rsp = client.DetectDisgust(model)
|
418
366
|
result = rsp.to_json_string()
|
419
367
|
try:
|
420
368
|
json_obj = json.loads(result)
|
@@ -433,7 +381,7 @@ def doAssessQuality(args, parsed_globals):
|
|
433
381
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
434
382
|
|
435
383
|
|
436
|
-
def
|
384
|
+
def doDescribeGroups(args, parsed_globals):
|
437
385
|
g_param = parse_global_arg(parsed_globals)
|
438
386
|
|
439
387
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -462,11 +410,11 @@ def doEnhanceImage(args, parsed_globals):
|
|
462
410
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
463
411
|
client._sdkVersion += ("_CLI_" + __version__)
|
464
412
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
465
|
-
model = models.
|
413
|
+
model = models.DescribeGroupsRequest()
|
466
414
|
model.from_json_string(json.dumps(args))
|
467
415
|
start_time = time.time()
|
468
416
|
while True:
|
469
|
-
rsp = client.
|
417
|
+
rsp = client.DescribeGroups(model)
|
470
418
|
result = rsp.to_json_string()
|
471
419
|
try:
|
472
420
|
json_obj = json.loads(result)
|
@@ -485,7 +433,7 @@ def doEnhanceImage(args, parsed_globals):
|
|
485
433
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
486
434
|
|
487
435
|
|
488
|
-
def
|
436
|
+
def doDeleteImages(args, parsed_globals):
|
489
437
|
g_param = parse_global_arg(parsed_globals)
|
490
438
|
|
491
439
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -514,11 +462,11 @@ def doCreateImage(args, parsed_globals):
|
|
514
462
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
515
463
|
client._sdkVersion += ("_CLI_" + __version__)
|
516
464
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
517
|
-
model = models.
|
465
|
+
model = models.DeleteImagesRequest()
|
518
466
|
model.from_json_string(json.dumps(args))
|
519
467
|
start_time = time.time()
|
520
468
|
while True:
|
521
|
-
rsp = client.
|
469
|
+
rsp = client.DeleteImages(model)
|
522
470
|
result = rsp.to_json_string()
|
523
471
|
try:
|
524
472
|
json_obj = json.loads(result)
|
@@ -537,7 +485,7 @@ def doCreateImage(args, parsed_globals):
|
|
537
485
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
486
|
|
539
487
|
|
540
|
-
def
|
488
|
+
def doCropImage(args, parsed_globals):
|
541
489
|
g_param = parse_global_arg(parsed_globals)
|
542
490
|
|
543
491
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -566,11 +514,11 @@ def doDetectLabelPro(args, parsed_globals):
|
|
566
514
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
567
515
|
client._sdkVersion += ("_CLI_" + __version__)
|
568
516
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
569
|
-
model = models.
|
517
|
+
model = models.CropImageRequest()
|
570
518
|
model.from_json_string(json.dumps(args))
|
571
519
|
start_time = time.time()
|
572
520
|
while True:
|
573
|
-
rsp = client.
|
521
|
+
rsp = client.CropImage(model)
|
574
522
|
result = rsp.to_json_string()
|
575
523
|
try:
|
576
524
|
json_obj = json.loads(result)
|
@@ -589,7 +537,7 @@ def doDetectLabelPro(args, parsed_globals):
|
|
589
537
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
538
|
|
591
539
|
|
592
|
-
def
|
540
|
+
def doDescribeImages(args, parsed_globals):
|
593
541
|
g_param = parse_global_arg(parsed_globals)
|
594
542
|
|
595
543
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -618,11 +566,11 @@ def doRecognizeCarPro(args, parsed_globals):
|
|
618
566
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
619
567
|
client._sdkVersion += ("_CLI_" + __version__)
|
620
568
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
621
|
-
model = models.
|
569
|
+
model = models.DescribeImagesRequest()
|
622
570
|
model.from_json_string(json.dumps(args))
|
623
571
|
start_time = time.time()
|
624
572
|
while True:
|
625
|
-
rsp = client.
|
573
|
+
rsp = client.DescribeImages(model)
|
626
574
|
result = rsp.to_json_string()
|
627
575
|
try:
|
628
576
|
json_obj = json.loads(result)
|
@@ -641,7 +589,7 @@ def doRecognizeCarPro(args, parsed_globals):
|
|
641
589
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
642
590
|
|
643
591
|
|
644
|
-
def
|
592
|
+
def doDetectMisbehavior(args, parsed_globals):
|
645
593
|
g_param = parse_global_arg(parsed_globals)
|
646
594
|
|
647
595
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -670,11 +618,11 @@ def doDetectDisgust(args, parsed_globals):
|
|
670
618
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
671
619
|
client._sdkVersion += ("_CLI_" + __version__)
|
672
620
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
673
|
-
model = models.
|
621
|
+
model = models.DetectMisbehaviorRequest()
|
674
622
|
model.from_json_string(json.dumps(args))
|
675
623
|
start_time = time.time()
|
676
624
|
while True:
|
677
|
-
rsp = client.
|
625
|
+
rsp = client.DetectMisbehavior(model)
|
678
626
|
result = rsp.to_json_string()
|
679
627
|
try:
|
680
628
|
json_obj = json.loads(result)
|
@@ -693,7 +641,7 @@ def doDetectDisgust(args, parsed_globals):
|
|
693
641
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
642
|
|
695
643
|
|
696
|
-
def
|
644
|
+
def doCreateGroup(args, parsed_globals):
|
697
645
|
g_param = parse_global_arg(parsed_globals)
|
698
646
|
|
699
647
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -722,11 +670,11 @@ def doDescribeGroups(args, parsed_globals):
|
|
722
670
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
723
671
|
client._sdkVersion += ("_CLI_" + __version__)
|
724
672
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
-
model = models.
|
673
|
+
model = models.CreateGroupRequest()
|
726
674
|
model.from_json_string(json.dumps(args))
|
727
675
|
start_time = time.time()
|
728
676
|
while True:
|
729
|
-
rsp = client.
|
677
|
+
rsp = client.CreateGroup(model)
|
730
678
|
result = rsp.to_json_string()
|
731
679
|
try:
|
732
680
|
json_obj = json.loads(result)
|
@@ -745,7 +693,7 @@ def doDescribeGroups(args, parsed_globals):
|
|
745
693
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
694
|
|
747
695
|
|
748
|
-
def
|
696
|
+
def doDetectProduct(args, parsed_globals):
|
749
697
|
g_param = parse_global_arg(parsed_globals)
|
750
698
|
|
751
699
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -774,11 +722,11 @@ def doDetectMisbehavior(args, parsed_globals):
|
|
774
722
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
775
723
|
client._sdkVersion += ("_CLI_" + __version__)
|
776
724
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
777
|
-
model = models.
|
725
|
+
model = models.DetectProductRequest()
|
778
726
|
model.from_json_string(json.dumps(args))
|
779
727
|
start_time = time.time()
|
780
728
|
while True:
|
781
|
-
rsp = client.
|
729
|
+
rsp = client.DetectProduct(model)
|
782
730
|
result = rsp.to_json_string()
|
783
731
|
try:
|
784
732
|
json_obj = json.loads(result)
|
@@ -797,7 +745,7 @@ def doDetectMisbehavior(args, parsed_globals):
|
|
797
745
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
798
746
|
|
799
747
|
|
800
|
-
def
|
748
|
+
def doSearchImage(args, parsed_globals):
|
801
749
|
g_param = parse_global_arg(parsed_globals)
|
802
750
|
|
803
751
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -826,11 +774,11 @@ def doDetectProduct(args, parsed_globals):
|
|
826
774
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
827
775
|
client._sdkVersion += ("_CLI_" + __version__)
|
828
776
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
829
|
-
model = models.
|
777
|
+
model = models.SearchImageRequest()
|
830
778
|
model.from_json_string(json.dumps(args))
|
831
779
|
start_time = time.time()
|
832
780
|
while True:
|
833
|
-
rsp = client.
|
781
|
+
rsp = client.SearchImage(model)
|
834
782
|
result = rsp.to_json_string()
|
835
783
|
try:
|
836
784
|
json_obj = json.loads(result)
|
@@ -849,7 +797,7 @@ def doDetectProduct(args, parsed_globals):
|
|
849
797
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
850
798
|
|
851
799
|
|
852
|
-
def
|
800
|
+
def doUpdateImage(args, parsed_globals):
|
853
801
|
g_param = parse_global_arg(parsed_globals)
|
854
802
|
|
855
803
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -878,11 +826,11 @@ def doCropImage(args, parsed_globals):
|
|
878
826
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
879
827
|
client._sdkVersion += ("_CLI_" + __version__)
|
880
828
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
881
|
-
model = models.
|
829
|
+
model = models.UpdateImageRequest()
|
882
830
|
model.from_json_string(json.dumps(args))
|
883
831
|
start_time = time.time()
|
884
832
|
while True:
|
885
|
-
rsp = client.
|
833
|
+
rsp = client.UpdateImage(model)
|
886
834
|
result = rsp.to_json_string()
|
887
835
|
try:
|
888
836
|
json_obj = json.loads(result)
|
@@ -901,7 +849,7 @@ def doCropImage(args, parsed_globals):
|
|
901
849
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
902
850
|
|
903
851
|
|
904
|
-
def
|
852
|
+
def doDetectEnvelope(args, parsed_globals):
|
905
853
|
g_param = parse_global_arg(parsed_globals)
|
906
854
|
|
907
855
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -930,11 +878,11 @@ def doDetectSecurity(args, parsed_globals):
|
|
930
878
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
931
879
|
client._sdkVersion += ("_CLI_" + __version__)
|
932
880
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
933
|
-
model = models.
|
881
|
+
model = models.DetectEnvelopeRequest()
|
934
882
|
model.from_json_string(json.dumps(args))
|
935
883
|
start_time = time.time()
|
936
884
|
while True:
|
937
|
-
rsp = client.
|
885
|
+
rsp = client.DetectEnvelope(model)
|
938
886
|
result = rsp.to_json_string()
|
939
887
|
try:
|
940
888
|
json_obj = json.loads(result)
|
@@ -953,7 +901,7 @@ def doDetectSecurity(args, parsed_globals):
|
|
953
901
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
954
902
|
|
955
903
|
|
956
|
-
def
|
904
|
+
def doDetectPet(args, parsed_globals):
|
957
905
|
g_param = parse_global_arg(parsed_globals)
|
958
906
|
|
959
907
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -982,11 +930,11 @@ def doRecognizeCar(args, parsed_globals):
|
|
982
930
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
983
931
|
client._sdkVersion += ("_CLI_" + __version__)
|
984
932
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
985
|
-
model = models.
|
933
|
+
model = models.DetectPetRequest()
|
986
934
|
model.from_json_string(json.dumps(args))
|
987
935
|
start_time = time.time()
|
988
936
|
while True:
|
989
|
-
rsp = client.
|
937
|
+
rsp = client.DetectPet(model)
|
990
938
|
result = rsp.to_json_string()
|
991
939
|
try:
|
992
940
|
json_obj = json.loads(result)
|
@@ -1005,7 +953,7 @@ def doRecognizeCar(args, parsed_globals):
|
|
1005
953
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1006
954
|
|
1007
955
|
|
1008
|
-
def
|
956
|
+
def doDetectSecurity(args, parsed_globals):
|
1009
957
|
g_param = parse_global_arg(parsed_globals)
|
1010
958
|
|
1011
959
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1034,11 +982,11 @@ def doDetectLabelBeta(args, parsed_globals):
|
|
1034
982
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
1035
983
|
client._sdkVersion += ("_CLI_" + __version__)
|
1036
984
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1037
|
-
model = models.
|
985
|
+
model = models.DetectSecurityRequest()
|
1038
986
|
model.from_json_string(json.dumps(args))
|
1039
987
|
start_time = time.time()
|
1040
988
|
while True:
|
1041
|
-
rsp = client.
|
989
|
+
rsp = client.DetectSecurity(model)
|
1042
990
|
result = rsp.to_json_string()
|
1043
991
|
try:
|
1044
992
|
json_obj = json.loads(result)
|
@@ -1057,7 +1005,7 @@ def doDetectLabelBeta(args, parsed_globals):
|
|
1057
1005
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1058
1006
|
|
1059
1007
|
|
1060
|
-
def
|
1008
|
+
def doRecognizeCarPro(args, parsed_globals):
|
1061
1009
|
g_param = parse_global_arg(parsed_globals)
|
1062
1010
|
|
1063
1011
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1086,11 +1034,11 @@ def doSearchImage(args, parsed_globals):
|
|
1086
1034
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
1087
1035
|
client._sdkVersion += ("_CLI_" + __version__)
|
1088
1036
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1089
|
-
model = models.
|
1037
|
+
model = models.RecognizeCarProRequest()
|
1090
1038
|
model.from_json_string(json.dumps(args))
|
1091
1039
|
start_time = time.time()
|
1092
1040
|
while True:
|
1093
|
-
rsp = client.
|
1041
|
+
rsp = client.RecognizeCarPro(model)
|
1094
1042
|
result = rsp.to_json_string()
|
1095
1043
|
try:
|
1096
1044
|
json_obj = json.loads(result)
|
@@ -1109,7 +1057,7 @@ def doSearchImage(args, parsed_globals):
|
|
1109
1057
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
1058
|
|
1111
1059
|
|
1112
|
-
def
|
1060
|
+
def doEnhanceImage(args, parsed_globals):
|
1113
1061
|
g_param = parse_global_arg(parsed_globals)
|
1114
1062
|
|
1115
1063
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1138,11 +1086,11 @@ def doUpdateImage(args, parsed_globals):
|
|
1138
1086
|
client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
|
1139
1087
|
client._sdkVersion += ("_CLI_" + __version__)
|
1140
1088
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1141
|
-
model = models.
|
1089
|
+
model = models.EnhanceImageRequest()
|
1142
1090
|
model.from_json_string(json.dumps(args))
|
1143
1091
|
start_time = time.time()
|
1144
1092
|
while True:
|
1145
|
-
rsp = client.
|
1093
|
+
rsp = client.EnhanceImage(model)
|
1146
1094
|
result = rsp.to_json_string()
|
1147
1095
|
try:
|
1148
1096
|
json_obj = json.loads(result)
|
@@ -1172,28 +1120,27 @@ MODELS_MAP = {
|
|
1172
1120
|
}
|
1173
1121
|
|
1174
1122
|
ACTION_MAP = {
|
1175
|
-
"DetectEnvelope": doDetectEnvelope,
|
1176
|
-
"DescribeImages": doDescribeImages,
|
1177
|
-
"DetectPet": doDetectPet,
|
1178
|
-
"CreateGroup": doCreateGroup,
|
1179
|
-
"DetectLabel": doDetectLabel,
|
1180
|
-
"DetectChefDress": doDetectChefDress,
|
1181
|
-
"DeleteImages": doDeleteImages,
|
1182
|
-
"AssessQuality": doAssessQuality,
|
1183
|
-
"EnhanceImage": doEnhanceImage,
|
1184
1123
|
"CreateImage": doCreateImage,
|
1185
1124
|
"DetectLabelPro": doDetectLabelPro,
|
1186
|
-
"
|
1125
|
+
"RecognizeCar": doRecognizeCar,
|
1126
|
+
"DetectLabel": doDetectLabel,
|
1127
|
+
"AssessQuality": doAssessQuality,
|
1128
|
+
"DetectChefDress": doDetectChefDress,
|
1187
1129
|
"DetectDisgust": doDetectDisgust,
|
1188
1130
|
"DescribeGroups": doDescribeGroups,
|
1131
|
+
"DeleteImages": doDeleteImages,
|
1132
|
+
"CropImage": doCropImage,
|
1133
|
+
"DescribeImages": doDescribeImages,
|
1189
1134
|
"DetectMisbehavior": doDetectMisbehavior,
|
1135
|
+
"CreateGroup": doCreateGroup,
|
1190
1136
|
"DetectProduct": doDetectProduct,
|
1191
|
-
"CropImage": doCropImage,
|
1192
|
-
"DetectSecurity": doDetectSecurity,
|
1193
|
-
"RecognizeCar": doRecognizeCar,
|
1194
|
-
"DetectLabelBeta": doDetectLabelBeta,
|
1195
1137
|
"SearchImage": doSearchImage,
|
1196
1138
|
"UpdateImage": doUpdateImage,
|
1139
|
+
"DetectEnvelope": doDetectEnvelope,
|
1140
|
+
"DetectPet": doDetectPet,
|
1141
|
+
"DetectSecurity": doDetectSecurity,
|
1142
|
+
"RecognizeCarPro": doRecognizeCarPro,
|
1143
|
+
"EnhanceImage": doEnhanceImage,
|
1197
1144
|
|
1198
1145
|
}
|
1199
1146
|
|
@@ -77,13 +77,6 @@
|
|
77
77
|
"output": "DetectLabelResponse",
|
78
78
|
"status": "online"
|
79
79
|
},
|
80
|
-
"DetectLabelBeta": {
|
81
|
-
"document": "图像标签测试接口\n\n> \n- 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。",
|
82
|
-
"input": "DetectLabelBetaRequest",
|
83
|
-
"name": "图像标签测试接口",
|
84
|
-
"output": "DetectLabelBetaResponse",
|
85
|
-
"status": "online"
|
86
|
-
},
|
87
80
|
"DetectLabelPro": {
|
88
81
|
"document": "通用图像标签可识别数千种常见物体或场景,覆盖日常物品、场景、动物、植物、食物、饮品、交通工具等多个大类,返回主体的标签名称和所属细分类目等。\n\n> \n- 可前往 [图像标签](https://cloud.tencent.com/document/product/1588) 产品文档中查看更多产品信息。\n- 公共参数中的签名方式必须指定为V3版本,即配置SignatureMethod参数为TC3-HMAC-SHA256。",
|
89
82
|
"input": "DetectLabelProRequest",
|
@@ -1341,111 +1334,6 @@
|
|
1341
1334
|
],
|
1342
1335
|
"type": "object"
|
1343
1336
|
},
|
1344
|
-
"DetectLabelBetaRequest": {
|
1345
|
-
"document": "DetectLabelBeta请求参数结构体",
|
1346
|
-
"members": [
|
1347
|
-
{
|
1348
|
-
"disabled": false,
|
1349
|
-
"document": "图片URL地址。 \n图片限制: \n• 图片格式:PNG、JPG、JPEG。 \n• 图片大小:所下载图片经Base64编码后不超过4M。图片下载时间不超过3秒。 \n建议:\n• 图片像素:大于50*50像素,否则影响识别效果; \n• 长宽比:长边:短边<5; \n接口响应时间会受到图片下载时间的影响,建议使用更可靠的存储服务,推荐将图片存储在腾讯云COS。",
|
1350
|
-
"example": "/9j/4AAQSkZJRgABAQAAAQABAAD/4gIo...lftXF/DjFZNXoSP5V2U0HMt/1FQf/Z",
|
1351
|
-
"member": "string",
|
1352
|
-
"name": "ImageUrl",
|
1353
|
-
"required": false,
|
1354
|
-
"type": "string"
|
1355
|
-
},
|
1356
|
-
{
|
1357
|
-
"disabled": false,
|
1358
|
-
"document": "图片经过base64编码的内容。最大不超过4M。与ImageUrl同时存在时优先使用ImageUrl字段。\n**注意:图片需要base64编码,并且要去掉编码头部。**",
|
1359
|
-
"example": "/9j/4AAQSkZJRgABAQAAAQABAAD/4gIo...lftXF/DjFZNXoSP5V2U0HMt/1FQf/Z",
|
1360
|
-
"member": "string",
|
1361
|
-
"name": "ImageBase64",
|
1362
|
-
"required": false,
|
1363
|
-
"type": "string"
|
1364
|
-
},
|
1365
|
-
{
|
1366
|
-
"disabled": false,
|
1367
|
-
"document": "本次调用支持的识别场景,可选值如下:\nWEB,针对网络图片优化;\nCAMERA,针对手机摄像头拍摄图片优化;\nALBUM,针对手机相册、网盘产品优化;\nNEWS,针对新闻、资讯、广电等行业优化;\nNONECAM,非实拍图;\nLOCATION,主体位置识别;\n如果不传此参数,则默认为WEB。\n\n支持多场景(Scenes)一起检测。例如,使用 Scenes=[\"WEB\", \"CAMERA\"],即对一张图片使用两个模型同时检测,输出两套识别结果。",
|
1368
|
-
"example": "[\"CAMERA\"]",
|
1369
|
-
"member": "string",
|
1370
|
-
"name": "Scenes",
|
1371
|
-
"required": false,
|
1372
|
-
"type": "list"
|
1373
|
-
}
|
1374
|
-
],
|
1375
|
-
"type": "object"
|
1376
|
-
},
|
1377
|
-
"DetectLabelBetaResponse": {
|
1378
|
-
"document": "DetectLabelBeta返回参数结构体",
|
1379
|
-
"members": [
|
1380
|
-
{
|
1381
|
-
"disabled": false,
|
1382
|
-
"document": "Web网络版标签结果数组。如未选择WEB场景,则为空。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1383
|
-
"example": "[{\"Name\":\"塔楼\",\"FirstCategory\":\"场景\",\"SecondCategory\":\"建筑\",\"Confidence\":81},{\"Name\":\"夜晚\",\"FirstCategory\":\"场景\",\"SecondCategory\":\"自然风光\",\"Confidence\":79}]",
|
1384
|
-
"member": "DetectLabelItem",
|
1385
|
-
"name": "Labels",
|
1386
|
-
"output_required": true,
|
1387
|
-
"type": "list",
|
1388
|
-
"value_allowed_null": true
|
1389
|
-
},
|
1390
|
-
{
|
1391
|
-
"disabled": false,
|
1392
|
-
"document": "Camera摄像头版标签结果数组。如未选择CAMERA场景,则为空。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1393
|
-
"example": "[{\"Name\":\"塔楼\",\"FirstCategory\":\"场景\",\"SecondCategory\":\"建筑\",\"Confidence\":81},{\"Name\":\"夜晚\",\"FirstCategory\":\"场景\",\"SecondCategory\":\"自然风光\",\"Confidence\":79}]",
|
1394
|
-
"member": "DetectLabelItem",
|
1395
|
-
"name": "CameraLabels",
|
1396
|
-
"output_required": true,
|
1397
|
-
"type": "list",
|
1398
|
-
"value_allowed_null": true
|
1399
|
-
},
|
1400
|
-
{
|
1401
|
-
"disabled": false,
|
1402
|
-
"document": "Album相册版标签结果数组。如未选择ALBUM场景,则为空。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1403
|
-
"example": "[{\"Name\":\"塔楼\",\"FirstCategory\":\"场景\",\"SecondCategory\":\"建筑\",\"Confidence\":81},{\"Name\":\"夜晚\",\"FirstCategory\":\"场景\",\"SecondCategory\":\"自然风光\",\"Confidence\":79}]",
|
1404
|
-
"member": "DetectLabelItem",
|
1405
|
-
"name": "AlbumLabels",
|
1406
|
-
"output_required": true,
|
1407
|
-
"type": "list",
|
1408
|
-
"value_allowed_null": true
|
1409
|
-
},
|
1410
|
-
{
|
1411
|
-
"disabled": false,
|
1412
|
-
"document": "News新闻版标签结果数组。如未选择NEWS场景,则为空。\n新闻版目前为测试阶段,暂不提供每个标签的一级、二级分类信息的输出。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1413
|
-
"example": "[{\"Name\":\"塔楼\",\"FirstCategory\":\"场景\",\"SecondCategory\":\"建筑\",\"Confidence\":81},{\"Name\":\"夜晚\",\"FirstCategory\":\"场景\",\"SecondCategory\":\"自然风光\",\"Confidence\":79}]",
|
1414
|
-
"member": "DetectLabelItem",
|
1415
|
-
"name": "NewsLabels",
|
1416
|
-
"output_required": true,
|
1417
|
-
"type": "list",
|
1418
|
-
"value_allowed_null": true
|
1419
|
-
},
|
1420
|
-
{
|
1421
|
-
"disabled": false,
|
1422
|
-
"document": "非实拍标签\n注意:此字段可能返回 null,表示取不到有效值。",
|
1423
|
-
"example": "[{\"Name\":\"塔楼\",\"FirstCategory\":\"场景\",\"SecondCategory\":\"建筑\",\"Confidence\":81},{\"Name\":\"夜晚\",\"FirstCategory\":\"场景\",\"SecondCategory\":\"自然风光\",\"Confidence\":79}]",
|
1424
|
-
"member": "DetectLabelItem",
|
1425
|
-
"name": "NoneCamLabels",
|
1426
|
-
"output_required": true,
|
1427
|
-
"type": "list",
|
1428
|
-
"value_allowed_null": true
|
1429
|
-
},
|
1430
|
-
{
|
1431
|
-
"disabled": false,
|
1432
|
-
"document": "识别结果\n注意:此字段可能返回 null,表示取不到有效值。",
|
1433
|
-
"example": "[{\"Name\":\"硬盘\",\"Parents\":\"电脑、办公-电脑配件,\"Confidence\":81,\"XMin\":120,YMin:100,\"XMax\":365,\"YMax\":580}]",
|
1434
|
-
"member": "Product",
|
1435
|
-
"name": "LocationLabels",
|
1436
|
-
"output_required": true,
|
1437
|
-
"type": "list",
|
1438
|
-
"value_allowed_null": true
|
1439
|
-
},
|
1440
|
-
{
|
1441
|
-
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
1442
|
-
"member": "string",
|
1443
|
-
"name": "RequestId",
|
1444
|
-
"type": "string"
|
1445
|
-
}
|
1446
|
-
],
|
1447
|
-
"type": "object"
|
1448
|
-
},
|
1449
1337
|
"DetectLabelItem": {
|
1450
1338
|
"document": "图像标签检测结果。",
|
1451
1339
|
"members": [
|