tccli 3.0.827.1__py2.py3-none-any.whl → 3.0.829.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/services/autoscaling/v20180419/api.json +14 -14
- tccli/services/cam/v20190116/api.json +16 -9
- tccli/services/cam/v20190116/examples.json +2 -2
- tccli/services/cdn/v20180606/api.json +6 -6
- tccli/services/cdn/v20180606/examples.json +4 -4
- tccli/services/cloudstudio/cloudstudio_client.py +53 -0
- tccli/services/cloudstudio/v20210524/api.json +89 -0
- tccli/services/cloudstudio/v20210524/examples.json +8 -0
- tccli/services/cvm/v20170312/api.json +1 -1
- tccli/services/ess/v20201111/api.json +9 -0
- tccli/services/ess/v20201111/examples.json +1 -1
- tccli/services/essbasic/v20210526/api.json +134 -383
- tccli/services/essbasic/v20210526/examples.json +89 -95
- tccli/services/faceid/v20180301/api.json +19 -33
- tccli/services/ic/v20190307/api.json +1 -1
- tccli/services/ims/ims_client.py +53 -0
- tccli/services/ims/v20200713/api.json +3 -23
- tccli/services/ims/v20200713/examples.json +2 -2
- tccli/services/ims/v20201229/api.json +107 -2
- tccli/services/ims/v20201229/examples.json +10 -2
- tccli/services/live/v20180801/api.json +2 -6
- tccli/services/live/v20180801/examples.json +1 -1
- tccli/services/mongodb/v20190725/api.json +50 -51
- tccli/services/mongodb/v20190725/examples.json +1 -1
- tccli/services/mrs/v20200910/api.json +8130 -2302
- tccli/services/mrs/v20200910/examples.json +1 -1
- tccli/services/ocr/v20181119/api.json +32 -134
- tccli/services/ocr/v20181119/examples.json +15 -15
- tccli/services/pts/v20210728/api.json +27 -78
- tccli/services/sqlserver/v20180328/api.json +5 -5
- tccli/services/sslpod/v20190605/api.json +1 -1
- tccli/services/tem/v20210701/api.json +1 -1
- tccli/services/tione/v20191022/api.json +1 -1
- tccli/services/tione/v20211111/api.json +1 -1
- tccli/services/tke/v20180525/api.json +26 -32
- tccli/services/tke/v20180525/examples.json +9 -9
- tccli/services/trtc/v20190722/api.json +3 -25
- tccli/services/vpc/v20170312/api.json +60 -51
- tccli/services/vpc/v20170312/examples.json +17 -17
- {tccli-3.0.827.1.dist-info → tccli-3.0.829.1.dist-info}/METADATA +2 -2
- {tccli-3.0.827.1.dist-info → tccli-3.0.829.1.dist-info}/RECORD +46 -46
- {tccli-3.0.827.1.dist-info → tccli-3.0.829.1.dist-info}/LICENSE +0 -0
- {tccli-3.0.827.1.dist-info → tccli-3.0.829.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.827.1.dist-info → tccli-3.0.829.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.827.1.dist-info → tccli-3.0.829.1.dist-info}/top_level.txt +0 -0
@@ -1373,7 +1373,6 @@
|
|
1373
1373
|
"document": "核身文本信息",
|
1374
1374
|
"members": [
|
1375
1375
|
{
|
1376
|
-
"default": "",
|
1377
1376
|
"document": "本次流程最终验证结果。0为成功\n注意:此字段可能返回 null,表示取不到有效值。",
|
1378
1377
|
"example": "0",
|
1379
1378
|
"member": "int64",
|
@@ -1383,7 +1382,6 @@
|
|
1383
1382
|
"value_allowed_null": true
|
1384
1383
|
},
|
1385
1384
|
{
|
1386
|
-
"default": "",
|
1387
1385
|
"document": "本次流程最终验证结果描述。(仅描述用,文案更新时不会通知。)\n注意:此字段可能返回 null,表示取不到有效值。",
|
1388
1386
|
"example": "成功",
|
1389
1387
|
"member": "string",
|
@@ -1393,7 +1391,6 @@
|
|
1393
1391
|
"value_allowed_null": true
|
1394
1392
|
},
|
1395
1393
|
{
|
1396
|
-
"default": "",
|
1397
1394
|
"document": "本次验证使用的身份证号。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1398
1395
|
"example": "440111111111111111",
|
1399
1396
|
"member": "string",
|
@@ -1403,7 +1400,6 @@
|
|
1403
1400
|
"value_allowed_null": true
|
1404
1401
|
},
|
1405
1402
|
{
|
1406
|
-
"default": "",
|
1407
1403
|
"document": "本次验证使用的姓名。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1408
1404
|
"example": "爱新觉罗永琪",
|
1409
1405
|
"member": "string",
|
@@ -1413,8 +1409,7 @@
|
|
1413
1409
|
"value_allowed_null": true
|
1414
1410
|
},
|
1415
1411
|
{
|
1416
|
-
"
|
1417
|
-
"document": "Ocr识别结果。民族。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1412
|
+
"document": "身份校验环节识别结果:民族。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1418
1413
|
"example": "汉族",
|
1419
1414
|
"member": "string",
|
1420
1415
|
"name": "OcrNation",
|
@@ -1423,8 +1418,7 @@
|
|
1423
1418
|
"value_allowed_null": true
|
1424
1419
|
},
|
1425
1420
|
{
|
1426
|
-
"
|
1427
|
-
"document": "Ocr识别结果。家庭住址。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1421
|
+
"document": "身份校验环节识别结果:家庭住址。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1428
1422
|
"example": "广东省",
|
1429
1423
|
"member": "string",
|
1430
1424
|
"name": "OcrAddress",
|
@@ -1433,9 +1427,8 @@
|
|
1433
1427
|
"value_allowed_null": true
|
1434
1428
|
},
|
1435
1429
|
{
|
1436
|
-
"
|
1437
|
-
"
|
1438
|
-
"example": "1999/01/01",
|
1430
|
+
"document": "身份校验环节识别结果:生日。格式为:YYYY/M/D\n注意:此字段可能返回 null,表示取不到有效值。",
|
1431
|
+
"example": "1999/1/12",
|
1439
1432
|
"member": "string",
|
1440
1433
|
"name": "OcrBirth",
|
1441
1434
|
"required": true,
|
@@ -1443,8 +1436,7 @@
|
|
1443
1436
|
"value_allowed_null": true
|
1444
1437
|
},
|
1445
1438
|
{
|
1446
|
-
"
|
1447
|
-
"document": "Ocr识别结果。签发机关。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1439
|
+
"document": "身份校验环节识别结果:签发机关。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1448
1440
|
"example": "广东省",
|
1449
1441
|
"member": "string",
|
1450
1442
|
"name": "OcrAuthority",
|
@@ -1453,9 +1445,8 @@
|
|
1453
1445
|
"value_allowed_null": true
|
1454
1446
|
},
|
1455
1447
|
{
|
1456
|
-
"
|
1457
|
-
"
|
1458
|
-
"example": "1999/01/01",
|
1448
|
+
"document": "身份校验环节识别结果:有效日期。格式为:YYYY.MM.DD-YYYY.MM.DD\n注意:此字段可能返回 null,表示取不到有效值。",
|
1449
|
+
"example": "1999.01.01-2009.01.01",
|
1459
1450
|
"member": "string",
|
1460
1451
|
"name": "OcrValidDate",
|
1461
1452
|
"required": true,
|
@@ -1463,8 +1454,7 @@
|
|
1463
1454
|
"value_allowed_null": true
|
1464
1455
|
},
|
1465
1456
|
{
|
1466
|
-
"
|
1467
|
-
"document": "Ocr识别结果。姓名。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1457
|
+
"document": "身份校验环节识别结果:姓名。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1468
1458
|
"example": "爱新觉罗永琪",
|
1469
1459
|
"member": "string",
|
1470
1460
|
"name": "OcrName",
|
@@ -1473,8 +1463,7 @@
|
|
1473
1463
|
"value_allowed_null": true
|
1474
1464
|
},
|
1475
1465
|
{
|
1476
|
-
"
|
1477
|
-
"document": "Ocr识别结果。身份证号。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1466
|
+
"document": "身份校验环节识别结果:身份证号。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1478
1467
|
"example": "440111111111111111",
|
1479
1468
|
"member": "string",
|
1480
1469
|
"name": "OcrIdCard",
|
@@ -1483,8 +1472,7 @@
|
|
1483
1472
|
"value_allowed_null": true
|
1484
1473
|
},
|
1485
1474
|
{
|
1486
|
-
"
|
1487
|
-
"document": "Ocr识别结果。性别。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1475
|
+
"document": "身份校验环节识别结果:性别。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1488
1476
|
"example": "女",
|
1489
1477
|
"member": "string",
|
1490
1478
|
"name": "OcrGender",
|
@@ -1493,7 +1481,15 @@
|
|
1493
1481
|
"value_allowed_null": true
|
1494
1482
|
},
|
1495
1483
|
{
|
1496
|
-
"
|
1484
|
+
"document": "身份校验环节采用的信息上传方式。\n取值有\"NFC\"、\"OCR\"、\"手动输入\"、\"其他\"\n注意:此字段可能返回 null,表示取不到有效值。",
|
1485
|
+
"example": "NFC",
|
1486
|
+
"member": "string",
|
1487
|
+
"name": "IdInfoFrom",
|
1488
|
+
"required": false,
|
1489
|
+
"type": "string",
|
1490
|
+
"value_allowed_null": true
|
1491
|
+
},
|
1492
|
+
{
|
1497
1493
|
"document": "本次流程最终活体结果。0为成功\n注意:此字段可能返回 null,表示取不到有效值。",
|
1498
1494
|
"example": "0",
|
1499
1495
|
"member": "int64",
|
@@ -1503,7 +1499,6 @@
|
|
1503
1499
|
"value_allowed_null": true
|
1504
1500
|
},
|
1505
1501
|
{
|
1506
|
-
"default": "",
|
1507
1502
|
"document": "本次流程最终活体结果描述。(仅描述用,文案更新时不会通知。)\n注意:此字段可能返回 null,表示取不到有效值。",
|
1508
1503
|
"example": "成功",
|
1509
1504
|
"member": "string",
|
@@ -1513,7 +1508,6 @@
|
|
1513
1508
|
"value_allowed_null": true
|
1514
1509
|
},
|
1515
1510
|
{
|
1516
|
-
"default": "",
|
1517
1511
|
"document": "本次流程最终一比一结果。0为成功\n注意:此字段可能返回 null,表示取不到有效值。",
|
1518
1512
|
"example": "0",
|
1519
1513
|
"member": "int64",
|
@@ -1523,7 +1517,6 @@
|
|
1523
1517
|
"value_allowed_null": true
|
1524
1518
|
},
|
1525
1519
|
{
|
1526
|
-
"default": "",
|
1527
1520
|
"document": "本次流程最终一比一结果描述。(仅描述用,文案更新时不会通知。)\n注意:此字段可能返回 null,表示取不到有效值。",
|
1528
1521
|
"example": "成功",
|
1529
1522
|
"member": "string",
|
@@ -1533,7 +1526,6 @@
|
|
1533
1526
|
"value_allowed_null": true
|
1534
1527
|
},
|
1535
1528
|
{
|
1536
|
-
"default": "",
|
1537
1529
|
"document": "本次流程活体一比一的分数,取值范围 [0.00, 100.00]。相似度大于等于70时才判断为同一人,也可根据具体场景自行调整阈值(阈值70的误通过率为千分之一,阈值80的误通过率是万分之一)\n注意:此字段可能返回 null,表示取不到有效值。",
|
1538
1530
|
"example": "88.3",
|
1539
1531
|
"member": "string",
|
@@ -1543,7 +1535,6 @@
|
|
1543
1535
|
"value_allowed_null": true
|
1544
1536
|
},
|
1545
1537
|
{
|
1546
|
-
"default": "",
|
1547
1538
|
"document": "地理位置经纬度。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1548
1539
|
"example": "2",
|
1549
1540
|
"member": "string",
|
@@ -1553,7 +1544,6 @@
|
|
1553
1544
|
"value_allowed_null": true
|
1554
1545
|
},
|
1555
1546
|
{
|
1556
|
-
"default": "",
|
1557
1547
|
"document": "Auth接口带入额外信息。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1558
1548
|
"example": "2",
|
1559
1549
|
"member": "string",
|
@@ -1563,7 +1553,6 @@
|
|
1563
1553
|
"value_allowed_null": true
|
1564
1554
|
},
|
1565
1555
|
{
|
1566
|
-
"default": "",
|
1567
1556
|
"document": "本次流程进行的活体一比一流水。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1568
1557
|
"example": "{}",
|
1569
1558
|
"member": "DetectDetail",
|
@@ -1573,7 +1562,6 @@
|
|
1573
1562
|
"value_allowed_null": true
|
1574
1563
|
},
|
1575
1564
|
{
|
1576
|
-
"default": "",
|
1577
1565
|
"document": "手机号码。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1578
1566
|
"example": "1",
|
1579
1567
|
"member": "string",
|
@@ -1583,7 +1571,6 @@
|
|
1583
1571
|
"value_allowed_null": true
|
1584
1572
|
},
|
1585
1573
|
{
|
1586
|
-
"default": "",
|
1587
1574
|
"document": "本次流程最终比对库源类型。包括:\n权威库;\n业务方自有库(用户上传照片、客户的混合库、混合部署库);\n二次验证库;\n人工审核库;\n注意:此字段可能返回 null,表示取不到有效值。",
|
1588
1575
|
"example": "权威库",
|
1589
1576
|
"member": "string",
|
@@ -1593,7 +1580,6 @@
|
|
1593
1580
|
"value_allowed_null": true
|
1594
1581
|
},
|
1595
1582
|
{
|
1596
|
-
"default": "",
|
1597
1583
|
"document": "本次流程最终活体类型。包括:\n0:未知\n1:数字活体\n2:动作活体\n3:静默活体\n4:一闪活体(动作+光线)\n注意:此字段可能返回 null,表示取不到有效值。",
|
1598
1584
|
"example": "0",
|
1599
1585
|
"member": "uint64",
|
tccli/services/ims/ims_client.py
CHANGED
@@ -19,6 +19,58 @@ from tencentcloud.ims.v20200713 import models as models_v20200713
|
|
19
19
|
from jmespath import search
|
20
20
|
import time
|
21
21
|
|
22
|
+
def doCreateImageModerationAsyncTask(args, parsed_globals):
|
23
|
+
g_param = parse_global_arg(parsed_globals)
|
24
|
+
|
25
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
26
|
+
cred = credential.CVMRoleCredential()
|
27
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
28
|
+
cred = credential.STSAssumeRoleCredential(
|
29
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
30
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
31
|
+
)
|
32
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
33
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
34
|
+
else:
|
35
|
+
cred = credential.Credential(
|
36
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
37
|
+
)
|
38
|
+
http_profile = HttpProfile(
|
39
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
40
|
+
reqMethod="POST",
|
41
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
42
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
43
|
+
)
|
44
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
45
|
+
if g_param[OptionsDefine.Language]:
|
46
|
+
profile.language = g_param[OptionsDefine.Language]
|
47
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
48
|
+
client = mod.ImsClient(cred, g_param[OptionsDefine.Region], profile)
|
49
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
50
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
51
|
+
model = models.CreateImageModerationAsyncTaskRequest()
|
52
|
+
model.from_json_string(json.dumps(args))
|
53
|
+
start_time = time.time()
|
54
|
+
while True:
|
55
|
+
rsp = client.CreateImageModerationAsyncTask(model)
|
56
|
+
result = rsp.to_json_string()
|
57
|
+
try:
|
58
|
+
json_obj = json.loads(result)
|
59
|
+
except TypeError as e:
|
60
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
61
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
62
|
+
break
|
63
|
+
cur_time = time.time()
|
64
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
65
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
66
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
67
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
68
|
+
else:
|
69
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
70
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
71
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
72
|
+
|
73
|
+
|
22
74
|
def doImageModeration(args, parsed_globals):
|
23
75
|
g_param = parse_global_arg(parsed_globals)
|
24
76
|
|
@@ -84,6 +136,7 @@ MODELS_MAP = {
|
|
84
136
|
}
|
85
137
|
|
86
138
|
ACTION_MAP = {
|
139
|
+
"CreateImageModerationAsyncTask": doCreateImageModerationAsyncTask,
|
87
140
|
"ImageModeration": doImageModeration,
|
88
141
|
|
89
142
|
}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"ImageModeration": {
|
4
|
-
"document": "
|
4
|
+
"document": "图片同步检测服务(Image Moderation, IM)能自动扫描图片,识别可能令人反感、不安全或不适宜的内容,同时支持用户配置图片黑名单,打击自定义识别类型的图片。\n\n<div class=\"rno-api-explorer\" style=\"margin-bottom:20px\">\n <div class=\"rno-api-explorer-inner\">\n <div class=\"rno-api-explorer-hd\">\n <div class=\"rno-api-explorer-title\">\n 关于版本迭代的描述\n </div>\n </div>\n <div class=\"rno-api-explorer-body\">\n <div class=\"rno-api-explorer-cont\">\n <p>当前页面版本为图片内容安全2020版本,2020.11.3日前接入的图片内容安全接口为2019版本,在此时间前接入的用户可直接访问以下链接进行维护操作:<a href=\"https://cloud.tencent.com/document/product/1125/38206\" target=\"_blank\">图片内容安全-2019版本</a></p>\n <p>2020版本相对2019版本进行了升级,支持更灵活的多场景业务策略配置以及更丰富的识别回调信息,满足不同业务的识别需求,建议按照2020版本接入指引进行接口升级;同时,2019版本也会持续维护直至用户不再使用为止。</p>\n </div>\n </div>\n </div>\n</div>",
|
5
5
|
"input": "ImageModerationRequest",
|
6
|
-
"name": "
|
6
|
+
"name": "图片同步检测",
|
7
7
|
"output": "ImageModerationResponse",
|
8
8
|
"status": "online"
|
9
9
|
}
|
@@ -97,7 +97,6 @@
|
|
97
97
|
"document": "ImageModeration请求参数结构体",
|
98
98
|
"members": [
|
99
99
|
{
|
100
|
-
"default": "",
|
101
100
|
"document": "该字段用于标识业务场景。您可以在内容安全控制台创建对应的ID,配置不同的内容审核策略,通过接口调用,默认不填为0,后端使用默认策略。 -- 该字段暂未开放。",
|
102
101
|
"example": "test_1001",
|
103
102
|
"member": "string",
|
@@ -106,7 +105,6 @@
|
|
106
105
|
"type": "string"
|
107
106
|
},
|
108
107
|
{
|
109
|
-
"default": "",
|
110
108
|
"document": "数据ID,可以由英文字母、数字、下划线、-、@#组成,不超过64个字符",
|
111
109
|
"example": "1213",
|
112
110
|
"member": "string",
|
@@ -115,7 +113,6 @@
|
|
115
113
|
"type": "string"
|
116
114
|
},
|
117
115
|
{
|
118
|
-
"default": "",
|
119
116
|
"document": "数据Base64编码,图片检测接口为图片文件内容,大小不能超过5M",
|
120
117
|
"example": "aHR0cDovL2lubmVycG9ybnNjcmVlbnNob3QtMTI1MjgxMzg1MC5jb3MuYXAtZ3Vh",
|
121
118
|
"member": "string",
|
@@ -124,8 +121,7 @@
|
|
124
121
|
"type": "string"
|
125
122
|
},
|
126
123
|
{
|
127
|
-
"
|
128
|
-
"document": "图片资源访问链接,__与FileContent参数必须二选一输入__",
|
124
|
+
"document": "图片资源访问链接,__与FileContent参数必须二选一输入__ 。由于网络安全策略,送审带重定向的链接,可能引起下载失败,请尽量避免,比如Http返回302状态码的链接,可能导致接口返回ResourceUnavailable.ImageDownloadError",
|
129
125
|
"example": "https://xxx.jpg",
|
130
126
|
"member": "string",
|
131
127
|
"name": "FileUrl",
|
@@ -133,7 +129,6 @@
|
|
133
129
|
"type": "string"
|
134
130
|
},
|
135
131
|
{
|
136
|
-
"default": "",
|
137
132
|
"document": "截帧频率,GIF图/长图检测专用,默认值为0,表示只会检测GIF图/长图的第一帧",
|
138
133
|
"example": "1",
|
139
134
|
"member": "int64",
|
@@ -142,7 +137,6 @@
|
|
142
137
|
"type": "int"
|
143
138
|
},
|
144
139
|
{
|
145
|
-
"default": "",
|
146
140
|
"document": "GIF图/长图检测专用,代表均匀最大截帧数量,默认值为1(即只取GIF第一张,或长图不做切分处理(可能会造成处理超时))。",
|
147
141
|
"example": "1",
|
148
142
|
"member": "int64",
|
@@ -151,7 +145,6 @@
|
|
151
145
|
"type": "int"
|
152
146
|
},
|
153
147
|
{
|
154
|
-
"default": "",
|
155
148
|
"document": "账号相关信息字段,填入后可识别违规风险账号。",
|
156
149
|
"example": "无",
|
157
150
|
"member": "User",
|
@@ -160,7 +153,6 @@
|
|
160
153
|
"type": "object"
|
161
154
|
},
|
162
155
|
{
|
163
|
-
"default": "",
|
164
156
|
"document": "设备相关信息字段,填入后可识别违规风险设备。",
|
165
157
|
"example": "无",
|
166
158
|
"member": "Device",
|
@@ -179,7 +171,6 @@
|
|
179
171
|
"example": "1",
|
180
172
|
"member": "int64",
|
181
173
|
"name": "HitFlag",
|
182
|
-
"required": true,
|
183
174
|
"type": "int",
|
184
175
|
"value_allowed_null": false
|
185
176
|
},
|
@@ -188,7 +179,6 @@
|
|
188
179
|
"example": "Block",
|
189
180
|
"member": "string",
|
190
181
|
"name": "Suggestion",
|
191
|
-
"required": true,
|
192
182
|
"type": "string",
|
193
183
|
"value_allowed_null": false
|
194
184
|
},
|
@@ -197,7 +187,6 @@
|
|
197
187
|
"example": "Porn",
|
198
188
|
"member": "string",
|
199
189
|
"name": "Label",
|
200
|
-
"required": true,
|
201
190
|
"type": "string",
|
202
191
|
"value_allowed_null": false
|
203
192
|
},
|
@@ -206,7 +195,6 @@
|
|
206
195
|
"example": "SexBehavior",
|
207
196
|
"member": "string",
|
208
197
|
"name": "SubLabel",
|
209
|
-
"required": true,
|
210
198
|
"type": "string",
|
211
199
|
"value_allowed_null": false
|
212
200
|
},
|
@@ -215,7 +203,6 @@
|
|
215
203
|
"example": "90",
|
216
204
|
"member": "int64",
|
217
205
|
"name": "Score",
|
218
|
-
"required": true,
|
219
206
|
"type": "int",
|
220
207
|
"value_allowed_null": false
|
221
208
|
},
|
@@ -224,7 +211,6 @@
|
|
224
211
|
"example": "无",
|
225
212
|
"member": "LabelResult",
|
226
213
|
"name": "LabelResults",
|
227
|
-
"required": true,
|
228
214
|
"type": "list",
|
229
215
|
"value_allowed_null": true
|
230
216
|
},
|
@@ -233,7 +219,6 @@
|
|
233
219
|
"example": "无",
|
234
220
|
"member": "ObjectResult",
|
235
221
|
"name": "ObjectResults",
|
236
|
-
"required": true,
|
237
222
|
"type": "list",
|
238
223
|
"value_allowed_null": true
|
239
224
|
},
|
@@ -242,7 +227,6 @@
|
|
242
227
|
"example": "无",
|
243
228
|
"member": "OcrResult",
|
244
229
|
"name": "OcrResults",
|
245
|
-
"required": true,
|
246
230
|
"type": "list",
|
247
231
|
"value_allowed_null": true
|
248
232
|
},
|
@@ -251,7 +235,6 @@
|
|
251
235
|
"example": "无",
|
252
236
|
"member": "LibResult",
|
253
237
|
"name": "LibResults",
|
254
|
-
"required": true,
|
255
238
|
"type": "list",
|
256
239
|
"value_allowed_null": true
|
257
240
|
},
|
@@ -260,7 +243,6 @@
|
|
260
243
|
"example": "a61237dd-c2a0-43e7-a3da-d27022d39ba7",
|
261
244
|
"member": "string",
|
262
245
|
"name": "DataId",
|
263
|
-
"required": true,
|
264
246
|
"type": "string",
|
265
247
|
"value_allowed_null": false
|
266
248
|
},
|
@@ -269,7 +251,6 @@
|
|
269
251
|
"example": "test_1001",
|
270
252
|
"member": "string",
|
271
253
|
"name": "BizType",
|
272
|
-
"required": true,
|
273
254
|
"type": "string",
|
274
255
|
"value_allowed_null": false
|
275
256
|
},
|
@@ -278,7 +259,6 @@
|
|
278
259
|
"example": "无",
|
279
260
|
"member": "string",
|
280
261
|
"name": "Extra",
|
281
|
-
"required": true,
|
282
262
|
"type": "string",
|
283
263
|
"value_allowed_null": true
|
284
264
|
},
|
@@ -2,10 +2,10 @@
|
|
2
2
|
"actions": {
|
3
3
|
"ImageModeration": [
|
4
4
|
{
|
5
|
-
"document": "
|
5
|
+
"document": "图片同步检测",
|
6
6
|
"input": "POST / HTTP/1.1\nHost: ims.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ImageModeration\n<公共请求参数>\n\n{\n \"BizType\": \"test_1001\",\n \"DataId\": \"1213\",\n \"FileUrl\": \"https://xxx.jpg\"\n}",
|
7
7
|
"output": "{\n \"Response\": {\n \"RequestId\": \"a61237dd-c2a0-43e7-a3da-d27022d39ba7\",\n \"DataId\": \"a61237dd-c2a0-43e7-a3da-d27022d39ba7\",\n \"BizType\": \"test_1001\",\n \"Suggestion\": \"Block\",\n \"Label\": \"Porn\",\n \"SubLabel\": \"SexBehavior\",\n \"Score\": 90,\n \"HitFlag\": 1,\n \"LabelResults\": [\n {\n \"Scene\": \"Porn\",\n \"Suggestion\": \"Block\",\n \"Label\": \"Porn\",\n \"SubLabel\": \"SexBehavior\",\n \"Score\": 90,\n \"Details\": [\n {\n \"Id\": 0,\n \"Name\": \"SexBehavior\",\n \"Score\": 90\n }\n ]\n }\n ],\n \"ObjectResults\": [\n {\n \"Scene\": \"QrCode\",\n \"Suggestion\": \"Block\",\n \"Label\": \"Ad\",\n \"SubLabel\": \"\",\n \"Score\": 100,\n \"Names\": [\n \"QRCODE\"\n ],\n \"Details\": [\n {\n \"Id\": 0,\n \"Name\": \"QRCODE\",\n \"Score\": 100,\n \"Location\": {\n \"X\": 155.01746,\n \"Y\": 396.01746,\n \"Width\": 769.9824,\n \"Height\": 769.98254,\n \"Rotate\": 0\n }\n }\n ]\n }\n ],\n \"OcrResults\": [\n {\n \"HitFlag\": 0,\n \"Scene\": \"OCR\",\n \"Suggestion\": \"Pass\",\n \"Label\": \"Normal\",\n \"SubLabel\": \"\",\n \"Score\": 0,\n \"Text\": \"hello world\",\n \"Details\": [\n {\n \"Text\": \"hello world\",\n \"Label\": \"\",\n \"LibId\": \"\",\n \"LibName\": \"\",\n \"Keywords\": [],\n \"Rate\": 0,\n \"Score\": 0,\n \"Location\": {\n \"X\": 8,\n \"Y\": 0,\n \"Width\": 111,\n \"Height\": 19,\n \"Rotate\": 0\n }\n }\n ]\n }\n ],\n \"LibResults\": [\n {\n \"Scene\": \"Similar\",\n \"Label\": \"Porn\",\n \"SubLabel\": \"\",\n \"Score\": 99,\n \"Details\": [\n {\n \"LibName\": \"123\",\n \"Score\": 99,\n \"Label\": \"Porn\",\n \"Tag\": \"\",\n \"ImageId\": \"111\",\n \"Id\": 0,\n \"LibId\": \"\"\n }\n ],\n \"Suggestion\": \"Block\"\n }\n ],\n \"Extra\": \"\"\n }\n}",
|
8
|
-
"title": "
|
8
|
+
"title": "图片同步检测"
|
9
9
|
}
|
10
10
|
]
|
11
11
|
},
|
@@ -1,9 +1,16 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
|
+
"CreateImageModerationAsyncTask": {
|
4
|
+
"document": "本接口用于提交图片文件进行异步智能审核任务。使用前请您使用腾讯云主账号登录控制台 [开通图片内容安全服务](https://console.cloud.tencent.com/cms/image/package) 并调整好对应的业务配置。\n### 接口使用说明:\n- 前往“[内容安全控制台-图片内容安全](https://console.cloud.tencent.com/cms/image/package)”开启使用图片内容安全服务,首次开通服务的用户可免费领用试用套餐包,包含**1万张图片**识别额度,有效期为1个月。\n- 该接口为收费接口,计费方式敬请参见 [腾讯云图片内容安全定价](https://cloud.tencent.com/product/ims/pricing)。\n\n### 接口功能说明:\n- 支持对图片文件或链接进行检测,通过深度学习技术,识别可能令人反感、不安全或不适宜的违规图片内容;\n- 支持对GIF图/长图进行截帧或拆分检测;\n- 支持识别多种违规场景,包括:低俗、违法违规、色情、广告等场景;\n- 支持多种物体检测(实体、广告台标、二维码等)及图片中文本的OCR文本识别;\n- 支持根据不同的业务场景配置自定义的审核策略;\n- 支持用户自定义选择图片风险库,打击自定义识别类型的违规图片(目前仅支持黑名单配置);\n- 支持在审核图片内容时同时关联账号或设备信息,可识别违规风险账号或设备。\n### 接口调用说明:\n- 图片尺寸支持:**长或者宽 >50分辨率**和**长或者宽<40000分辨率**,并且**图片长宽比<90:1;**\n- 图片文件分辨率支持:建议**分辨率大于256x256**,否则可能会影响识别效果;\n- 图片文件支持格式:PNG、JPG、JPEG、BMP、GIF、WEBP格式;\n- 图片文件链接支持的传输协议:HTTP、HTTPS;\n- 若传入图片文件的访问链接,则需要注意**图片下载时间限制为3秒**,为保障被检测图片的稳定性和可靠性,建议您使用腾讯云COS存储或者CDN缓存等;\n- 默认接口请求频率限制:**20次/秒**,超过此调用频率则会报错。",
|
5
|
+
"input": "CreateImageModerationAsyncTaskRequest",
|
6
|
+
"name": "图片异步检测",
|
7
|
+
"output": "CreateImageModerationAsyncTaskResponse",
|
8
|
+
"status": "online"
|
9
|
+
},
|
3
10
|
"ImageModeration": {
|
4
|
-
"document": "本接口(Image Moderation, IM
|
11
|
+
"document": "本接口(Image Moderation, IM)用于提交图片文件进行同步智能审核任务。使用前请您使用腾讯云主账号登录控制台 [开通图片内容安全服务](https://console.cloud.tencent.com/cms/image/package) 并调整好对应的业务配置。\n### 接口使用说明:\n- 前往“[内容安全控制台-图片内容安全](https://console.cloud.tencent.com/cms/image/package)”开启使用图片内容安全服务,首次开通服务的用户可免费领用试用套餐包,包含**1万张图片**识别额度,有效期为1个月。\n- 该接口为收费接口,计费方式敬请参见 [腾讯云图片内容安全定价](https://cloud.tencent.com/product/ims/pricing)。\n\n### 接口功能说明:\n- 支持对图片文件或链接进行检测,通过深度学习技术,识别可能令人反感、不安全或不适宜的违规图片内容;\n- 支持对GIF图/长图进行截帧或拆分检测;\n- 支持识别多种违规场景,包括:低俗、违法违规、色情、广告等场景;\n- 支持多种物体检测(实体、广告台标、二维码等)及图片中文本的OCR文本识别;\n- 支持根据不同的业务场景配置自定义的审核策略;\n- 支持用户自定义选择图片风险库,打击自定义识别类型的违规图片(目前仅支持黑名单配置);\n- 支持在审核图片内容时同时关联账号或设备信息,可识别违规风险账号或设备。\n\n### 接口调用说明:\n- 图片文件大小支持:**文件 < 5M**\n- 图片尺寸支持:**长或者宽 >50分辨率**和**长或者宽<10000分辨率**\n- 图片文件分辨率支持:建议**分辨率大于256x256**,否则可能会影响识别效果;\n- 图片文件支持格式:PNG、JPG、JPEG、BMP、GIF、WEBP格式;\n- 图片文件链接支持的传输协议:HTTP、HTTPS;\n- 若传入图片文件的访问链接,则需要注意**图片下载时间限制为3秒**,为保障被检测图片的稳定性和可靠性,建议您使用腾讯云COS存储或者CDN缓存等;\n- 默认接口请求频率限制:**100次/秒**,超过此调用频率则会报错。\n-审核列表中,排序是按照用户通过API接口上传调用的时间进行排序;\n\n<div class=\"rno-api-explorer\" style=\"margin-bottom:20px\">\n <div class=\"rno-api-explorer-inner\">\n <div class=\"rno-api-explorer-hd\">\n <div class=\"rno-api-explorer-title\">\n 关于版本迭代的描述\n </div>\n </div>\n <div class=\"rno-api-explorer-body\">\n <div class=\"rno-api-explorer-cont\">\n <p>当前页面版本为图片内容安全2020版本,2020.11.3日前接入的图片内容安全接口为2019版本,在此时间前接入的用户可直接访问以下链接进行维护操作:<a href=\"https://cloud.tencent.com/document/product/1125/38206\" target=\"_blank\">图片内容安全-2019版本</a></p>\n <p>2020版本相对2019版本进行了升级,支持更灵活的多场景业务策略配置以及更丰富的识别回调信息,满足不同业务的识别需求,建议按照2020版本接入指引进行接口升级;同时,2019版本也会持续维护直至用户不再使用为止。</p>\n </div>\n </div>\n </div>\n</div>",
|
5
12
|
"input": "ImageModerationRequest",
|
6
|
-
"name": "
|
13
|
+
"name": "图片同步检测",
|
7
14
|
"output": "ImageModerationResponse",
|
8
15
|
"status": "online"
|
9
16
|
}
|
@@ -15,6 +22,104 @@
|
|
15
22
|
"serviceShortName": "ims"
|
16
23
|
},
|
17
24
|
"objects": {
|
25
|
+
"CreateImageModerationAsyncTaskRequest": {
|
26
|
+
"document": "CreateImageModerationAsyncTask请求参数结构体",
|
27
|
+
"members": [
|
28
|
+
{
|
29
|
+
"document": "接收审核信息回调地址,审核过程中产生的所有结果发送至此地址。",
|
30
|
+
"example": "http://example.com",
|
31
|
+
"member": "string",
|
32
|
+
"name": "CallbackUrl",
|
33
|
+
"required": true,
|
34
|
+
"type": "string"
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"document": "该字段表示策略的具体编号,用于接口调度,在内容安全控制台中可配置。若不传入Biztype参数(留空),则代表采用默认的识别策略;传入则会在审核时根据业务场景采取不同的审核策略。<br>备注:Biztype仅为数字、字母与下划线的组合,长度为3-32个字符;不同Biztype关联不同的业务场景与识别能力策略,调用前请确认正确的Biztype。",
|
38
|
+
"example": "test_1001",
|
39
|
+
"member": "string",
|
40
|
+
"name": "BizType",
|
41
|
+
"required": false,
|
42
|
+
"type": "string"
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"document": "该字段表示您为待检测对象分配的数据ID,传入后可方便您对文件进行标识和管理。<br>取值:由英文字母(大小写均可)、数字及四个特殊符号(_,-,@,#)组成,**长度不超过64个字符**。",
|
46
|
+
"example": "1213",
|
47
|
+
"member": "string",
|
48
|
+
"name": "DataId",
|
49
|
+
"required": false,
|
50
|
+
"type": "string"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"document": "该字段表示待检测图片文件内容的Base64编码,图片**大小不超过5MB**,建议**分辨率不低于256x256**,否则可能会影响识别效果。<br>备注: **该字段与FileUrl必须选择输入其中一个**。",
|
54
|
+
"example": "aHR0cDovL2lubmVycG9ybnNjcmVlbnNob3QtMTI1MjgxMzg1MC5jb3MuYXAtZ3Vh",
|
55
|
+
"member": "string",
|
56
|
+
"name": "FileContent",
|
57
|
+
"required": false,
|
58
|
+
"type": "string"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"document": "该字段表示待检测图片文件的访问链接,图片支持PNG、JPG、JPEG、BMP、GIF、WEBP格式,**大小不超过5MB**,建议**分辨率不低于256x256**;图片下载时间限制为3秒,超过则会返回下载超时;由于网络安全策略,**送审带重定向的链接,可能引起下载失败**,请尽量避免,比如Http返回302状态码的链接,可能导致接口返回ResourceUnavailable.ImageDownloadError。<br>备注:**该字段与FileContent必须选择输入其中一个**。",
|
62
|
+
"example": "https://xxx.jpg",
|
63
|
+
"member": "string",
|
64
|
+
"name": "FileUrl",
|
65
|
+
"required": false,
|
66
|
+
"type": "string"
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"document": "**GIF/长图检测专用**,用于表示GIF截帧频率(每隔多少张图片抽取一帧进行检测),长图则按照长边:短边取整计算要切割的总图数;默认值为0,此时只会检测GIF的第一帧或对长图不进行切分处理。<br>备注:Interval与MaxFrames参数需要组合使用。例如,Interval=3, MaxFrames=400,则代表在检测GIF/长图时,将每间隔2帧检测一次且最多检测400帧。",
|
70
|
+
"example": "1",
|
71
|
+
"member": "int64",
|
72
|
+
"name": "Interval",
|
73
|
+
"required": false,
|
74
|
+
"type": "int"
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"document": "**GIF/长图检测专用**,用于标识最大截帧数量;默认值为1,此时只会检测输入GIF的第一帧或对长图不进行切分处理(可能会造成处理超时)。<br>备注:Interval与MaxFrames参数需要组合使用。例如,Interval=3, MaxFrames=400,则代表在检测GIF/长图时,将每间隔2帧检测一次且最多检测400帧。",
|
78
|
+
"example": "1",
|
79
|
+
"member": "int64",
|
80
|
+
"name": "MaxFrames",
|
81
|
+
"required": false,
|
82
|
+
"type": "int"
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"document": "该字段表示待检测对象对应的用户相关信息,若填入则可甄别相应违规风险用户。",
|
86
|
+
"example": "无",
|
87
|
+
"member": "User",
|
88
|
+
"name": "User",
|
89
|
+
"required": false,
|
90
|
+
"type": "object"
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"document": "该字段表示待检测对象对应的设备相关信息,若填入则可甄别相应违规风险设备。",
|
94
|
+
"example": "无",
|
95
|
+
"member": "Device",
|
96
|
+
"name": "Device",
|
97
|
+
"required": false,
|
98
|
+
"type": "object"
|
99
|
+
}
|
100
|
+
],
|
101
|
+
"type": "object"
|
102
|
+
},
|
103
|
+
"CreateImageModerationAsyncTaskResponse": {
|
104
|
+
"document": "CreateImageModerationAsyncTask返回参数结构体",
|
105
|
+
"members": [
|
106
|
+
{
|
107
|
+
"document": "该字段用于返回检测对象对应请求参数中的DataId。",
|
108
|
+
"example": "a61237dd-c2a0-43e7-a3da-d27022d39ba7",
|
109
|
+
"member": "string",
|
110
|
+
"name": "DataId",
|
111
|
+
"type": "string",
|
112
|
+
"value_allowed_null": false
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
|
116
|
+
"member": "string",
|
117
|
+
"name": "RequestId",
|
118
|
+
"type": "string"
|
119
|
+
}
|
120
|
+
],
|
121
|
+
"type": "object"
|
122
|
+
},
|
18
123
|
"Device": {
|
19
124
|
"document": "用于表示业务用户对应的设备信息",
|
20
125
|
"members": [
|
@@ -1,11 +1,19 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
|
+
"CreateImageModerationAsyncTask": [
|
4
|
+
{
|
5
|
+
"document": "创建异步审核任务示例",
|
6
|
+
"input": "POST / HTTP/1.1\nHost: ims.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateImageModerationAsyncTask\n<公共请求参数>\n\n{\n \"DataId\": \"test_data\",\n \"BizType\": \"brookyu_console_test\",\n \"FileUrl\": \"https://test.jpg\",\n \"CallbackUrl\": \"http://xxx.com\"\n}",
|
7
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"193101e1-e9b6-4a9b-b29e-6e37db58beef\",\n \"DataId\": \"test_data\"\n }\n}",
|
8
|
+
"title": "创建异步审核任务示例"
|
9
|
+
}
|
10
|
+
],
|
3
11
|
"ImageModeration": [
|
4
12
|
{
|
5
|
-
"document": "
|
13
|
+
"document": "图片同步检测",
|
6
14
|
"input": "POST / HTTP/1.1\nHost: ims.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ImageModeration\n<公共请求参数>\n\n{\n \"BizType\": \"test_1001\",\n \"DataId\": \"1213\",\n \"FileUrl\": \"https://xxx.jpg\"\n}",
|
7
15
|
"output": "{\n \"Response\": {\n \"RequestId\": \"a61237dd-c2a0-43e7-a3da-d27022d39ba7\",\n \"DataId\": \"a61237dd-c2a0-43e7-a3da-d27022d39ba7\",\n \"BizType\": \"test_1001\",\n \"Suggestion\": \"Block\",\n \"FileMD5\": \"\",\n \"Label\": \"Porn\",\n \"SubLabel\": \"SexBehavior\",\n \"Score\": 90,\n \"LabelResults\": [\n {\n \"Scene\": \"Porn\",\n \"Suggestion\": \"Block\",\n \"Label\": \"Porn\",\n \"SubLabel\": \"SexBehavior\",\n \"Score\": 90,\n \"Details\": []\n }\n ],\n \"ObjectResults\": [\n {\n \"Scene\": \"QrCode\",\n \"Suggestion\": \"Block\",\n \"Label\": \"Ad\",\n \"SubLabel\": \"\",\n \"Score\": 100,\n \"Names\": [\n \"QRCODE\"\n ],\n \"Details\": [\n {\n \"Id\": 0,\n \"Name\": \"QRCODE\",\n \"Score\": 100,\n \"Location\": {\n \"X\": 155.01746,\n \"Y\": 396.01746,\n \"Width\": 769.9824,\n \"Height\": 769.98254,\n \"Rotate\": 0\n }\n }\n ]\n }\n ],\n \"OcrResults\": [],\n \"LibResults\": [],\n \"RecognitionResults\": [\n {\n \"Label\": \"Scene\",\n \"Tags\": [\n {\n \"Name\": \"MedicalImage\",\n \"Score\": 30,\n \"Location\": {\n \"X\": 0,\n \"Y\": 0,\n \"Width\": 0,\n \"Height\": 0,\n \"Rotate\": 0\n }\n }\n ]\n }\n ],\n \"Extra\": \"\"\n }\n}",
|
8
|
-
"title": "
|
16
|
+
"title": "图片同步检测"
|
9
17
|
}
|
10
18
|
]
|
11
19
|
},
|