tccli 3.0.1241.1__py2.py3-none-any.whl → 3.0.1242.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/apm/v20210622/api.json +216 -216
- tccli/services/apm/v20210622/examples.json +5 -5
- tccli/services/bh/v20230418/api.json +9 -0
- tccli/services/bh/v20230418/examples.json +2 -2
- tccli/services/cfs/v20190719/api.json +20 -20
- tccli/services/cfs/v20190719/examples.json +5 -5
- tccli/services/ckafka/v20190819/api.json +27 -0
- tccli/services/clb/v20180317/api.json +84 -64
- tccli/services/cls/cls_client.py +220 -8
- tccli/services/cls/v20201016/api.json +417 -39
- tccli/services/cls/v20201016/examples.json +89 -45
- tccli/services/cwp/v20180228/api.json +3 -3
- tccli/services/cwp/v20180228/examples.json +2 -2
- tccli/services/cynosdb/v20190107/api.json +18 -18
- tccli/services/dbbrain/v20210527/api.json +1 -1
- tccli/services/dnspod/v20210323/api.json +173 -119
- tccli/services/dnspod/v20210323/examples.json +18 -18
- tccli/services/ess/v20201111/api.json +16 -7
- tccli/services/ess/v20201111/examples.json +6 -0
- tccli/services/essbasic/v20210526/api.json +78 -0
- tccli/services/gaap/v20180529/api.json +13 -13
- tccli/services/goosefs/v20220519/api.json +17 -17
- tccli/services/goosefs/v20220519/examples.json +4 -4
- tccli/services/iotvideoindustry/v20201201/api.json +84 -84
- tccli/services/iotvideoindustry/v20201201/examples.json +29 -29
- tccli/services/live/v20180801/api.json +1 -1
- tccli/services/mna/v20210119/api.json +32 -29
- tccli/services/mna/v20210119/examples.json +49 -49
- tccli/services/mps/v20190612/api.json +9 -0
- tccli/services/ocr/ocr_client.py +110 -4
- tccli/services/ocr/v20181119/api.json +360 -6
- tccli/services/ocr/v20181119/examples.json +18 -2
- tccli/services/pts/v20210728/api.json +1 -1
- tccli/services/pts/v20210728/examples.json +1 -1
- tccli/services/sqlserver/v20180328/api.json +38 -5
- tccli/services/ssl/v20191205/api.json +52 -50
- tccli/services/ssl/v20191205/examples.json +7 -7
- tccli/services/tbaas/v20180416/api.json +9 -6
- tccli/services/tbaas/v20180416/examples.json +2 -2
- tccli/services/tcb/v20180608/api.json +211 -171
- tccli/services/tcb/v20180608/examples.json +21 -21
- tccli/services/tcm/v20210413/api.json +2 -2
- tccli/services/tcm/v20210413/examples.json +2 -2
- tccli/services/tcr/v20190924/api.json +8 -8
- tccli/services/tcr/v20190924/examples.json +4 -4
- tccli/services/tdmq/tdmq_client.py +167 -8
- tccli/services/tdmq/v20200217/api.json +307 -0
- tccli/services/tdmq/v20200217/examples.json +24 -0
- tccli/services/tem/v20210701/api.json +1 -1
- tccli/services/tem/v20210701/examples.json +2 -2
- tccli/services/teo/v20220901/api.json +2 -2
- tccli/services/teo/v20220901/examples.json +3 -3
- tccli/services/thpc/v20211109/api.json +46 -58
- tccli/services/thpc/v20211109/examples.json +2 -2
- tccli/services/thpc/v20220401/api.json +168 -181
- tccli/services/thpc/v20220401/examples.json +1 -1
- tccli/services/thpc/v20230321/api.json +99 -102
- tccli/services/thpc/v20230321/examples.json +3 -3
- tccli/services/tke/v20220501/api.json +146 -97
- tccli/services/tke/v20220501/examples.json +15 -21
- tccli/services/trocket/trocket_client.py +53 -0
- tccli/services/trocket/v20230308/api.json +219 -0
- tccli/services/trocket/v20230308/examples.json +8 -0
- tccli/services/trtc/v20190722/api.json +31 -20
- tccli/services/trtc/v20190722/examples.json +11 -11
- tccli/services/tse/v20201207/api.json +141 -113
- tccli/services/tse/v20201207/examples.json +5 -5
- tccli/services/tsf/v20180326/examples.json +1 -1
- tccli/services/vpc/v20170312/api.json +304 -254
- tccli/services/vpc/v20170312/examples.json +19 -19
- tccli/services/waf/v20180125/api.json +2 -2
- {tccli-3.0.1241.1.dist-info → tccli-3.0.1242.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1241.1.dist-info → tccli-3.0.1242.1.dist-info}/RECORD +77 -77
- {tccli-3.0.1241.1.dist-info → tccli-3.0.1242.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1241.1.dist-info → tccli-3.0.1242.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1241.1.dist-info → tccli-3.0.1242.1.dist-info}/license_files/LICENSE +0 -0
@@ -3,16 +3,16 @@
|
|
3
3
|
"ActivateHardware": [
|
4
4
|
{
|
5
5
|
"document": "批量激活设备",
|
6
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ActivateHardware\n<公共请求参数>\n\n{\n \"Hardware\": [\n {\n \"Vendor\": \"
|
7
|
-
"output": "{\n \"Response\": {\n \"HardwareInfo\": [\n {\n \"Vendor\": \"
|
6
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ActivateHardware\n<公共请求参数>\n\n{\n \"Hardware\": [\n {\n \"Vendor\": \"vendor\",\n \"SN\": \"AN\",\n \"DeviceName\": \"name\",\n \"Description\": \"test\",\n \"DataKey\": \"keys\"\n }\n ]\n}",
|
7
|
+
"output": "{\n \"Response\": {\n \"HardwareInfo\": [\n {\n \"Vendor\": \"vendor\",\n \"SN\": \"AN\",\n \"DeviceName\": \"name\",\n \"Description\": \"test\",\n \"DataKey\": \"keys\",\n \"LicensePayMode\": 1,\n \"AccessScope\": 1\n }\n ],\n \"RequestId\": \"edd378f7-2511-4692-a029-5ca3d22c1884\"\n }\n}",
|
8
8
|
"title": "批量激活设备"
|
9
9
|
}
|
10
10
|
],
|
11
11
|
"AddDevice": [
|
12
12
|
{
|
13
13
|
"document": "",
|
14
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddDevice\n<公共请求参数>\n\n{\n \"DeviceName\": \"
|
15
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
14
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddDevice\n<公共请求参数>\n\n{\n \"DeviceName\": \"mna-test1\",\n \"Remark\": \"mna-test1\",\n \"DataKey\": \"mna-test1\",\n \"Encrypted\": \"false\"\n}",
|
15
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"527cc5c7-0413-33e9-2adc-632e0f6a9dff\",\n \"DeviceId\": \"mna-test1\",\n \"DataKey\": \"test\",\n \"Signature\": \"test\"\n }\n}",
|
16
16
|
"title": "新建设备"
|
17
17
|
}
|
18
18
|
],
|
@@ -35,8 +35,8 @@
|
|
35
35
|
"AddL3Conn": [
|
36
36
|
{
|
37
37
|
"document": "",
|
38
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddL3Conn\n<公共请求参数>\n\n{\n \"Cidr1\": \"173.12.0.0/16\",\n \"Cidr2\": \"173.13.0.0/16\",\n \"DeviceId1\": \"
|
39
|
-
"output": "{\n \"Response\": {\n \"L3ConnId\": \"
|
38
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddL3Conn\n<公共请求参数>\n\n{\n \"Cidr1\": \"173.12.0.0/16\",\n \"Cidr2\": \"173.13.0.0/16\",\n \"DeviceId1\": \"mna-der44545r\",\n \"DeviceId2\": \"cde\",\n \"Description\": \"this is a test rule\"\n}",
|
39
|
+
"output": "{\n \"Response\": {\n \"L3ConnId\": \"l3conn-h9boibynmp\",\n \"RequestId\": \"f0367096-b039-491c-b7eb-76669a2b22cf\"\n }\n}",
|
40
40
|
"title": "示例1"
|
41
41
|
}
|
42
42
|
],
|
@@ -44,7 +44,7 @@
|
|
44
44
|
{
|
45
45
|
"document": "",
|
46
46
|
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateEncryptedKey\n<公共请求参数>\n\n{}",
|
47
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
47
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"edd378f7-2511-4692-a029-5ca3d22c1884\",\n \"EncryptedKey\": \"BgkqhkiG9w0BAQ\"\n }\n}",
|
48
48
|
"title": "设置预置密钥"
|
49
49
|
}
|
50
50
|
],
|
@@ -67,16 +67,16 @@
|
|
67
67
|
"DeleteGroup": [
|
68
68
|
{
|
69
69
|
"document": "",
|
70
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteGroup\n<公共请求参数>\n\n{\n \"GroupId\": \"
|
71
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
70
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteGroup\n<公共请求参数>\n\n{\n \"GroupId\": \"group-1\"\n}",
|
71
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"bd89e515-20b4-445b-a88d-7355e76f8d22\"\n }\n}",
|
72
72
|
"title": "示例1"
|
73
73
|
}
|
74
74
|
],
|
75
75
|
"DeleteL3Conn": [
|
76
76
|
{
|
77
77
|
"document": "",
|
78
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteL3Conn\n<公共请求参数>\n\n{\n \"L3ConnIdList\": [\n \"
|
79
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
78
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteL3Conn\n<公共请求参数>\n\n{\n \"L3ConnIdList\": [\n \"lcn-test1\"\n ]\n}",
|
79
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"bd89e515-20b4-445b-a88d-7355e76f8d22\"\n }\n}",
|
80
80
|
"title": "示例1"
|
81
81
|
}
|
82
82
|
],
|
@@ -114,10 +114,10 @@
|
|
114
114
|
],
|
115
115
|
"GetDevices": [
|
116
116
|
{
|
117
|
-
"document": "
|
118
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetDevices\n<公共请求参数>\n\n{\n \"PageSize\":
|
119
|
-
"output": "{\n \"Response\": {\n \"DeviceInfos\": [\n {\n \"DeviceId\": \"
|
120
|
-
"title": "
|
117
|
+
"document": "",
|
118
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetDevices\n<公共请求参数>\n\n{\n \"PageSize\": 1,\n \"PageNumber\": 1\n}",
|
119
|
+
"output": "{\n \"Response\": {\n \"DeviceInfos\": [\n {\n \"AccessScope\": 0,\n \"CreateTime\": \"1663310188000\",\n \"DeviceId\": \"mna-w795bzezug\",\n \"DeviceName\": \"dev2233\",\n \"FlowTrunc\": 0,\n \"GroupId\": \"\",\n \"GroupName\": \"\",\n \"LastTime\": \"1719454676000\",\n \"LicensePayMode\": 0,\n \"Payer\": 0,\n \"Remark\": \"\",\n \"Sn\": \"\",\n \"Vendor\": \"\"\n }\n ],\n \"Length\": 899,\n \"RequestId\": \"8fbce821-acbb-49db-ad70-345b5d353324\",\n \"TotalPage\": 899\n }\n}",
|
120
|
+
"title": "示例"
|
121
121
|
}
|
122
122
|
],
|
123
123
|
"GetFlowAlarmInfo": [
|
@@ -131,21 +131,21 @@
|
|
131
131
|
"GetFlowPackages": [
|
132
132
|
{
|
133
133
|
"document": "",
|
134
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetFlowPackages\n<公共请求参数>\n\n{\n \"
|
135
|
-
"output": "{\n \"Response\": {\n \"
|
136
|
-
"title": "示例
|
134
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetFlowPackages\n<公共请求参数>\n\n{\n \"PageNumber\": 1,\n \"PageSize\": 1\n}",
|
135
|
+
"output": "{\n \"Response\": {\n \"PackageList\": [\n {\n \"ActiveTime\": 1734613941,\n \"AppId\": 251198806,\n \"CapacityRemain\": 50000,\n \"CapacityRemainPrecise\": 50000,\n \"CapacitySize\": 50000,\n \"CreateTime\": 1734613920,\n \"DeviceList\": [\n \"mna-6t5t54hcry\",\n \"mna-s72mu68gh3\"\n ],\n \"ExpireTime\": 1737292340,\n \"ModifyStatus\": 0,\n \"PackageType\": \"DEVICE_2_FLOW_50G\",\n \"RenewFlag\": true,\n \"ResourceId\": \"live-jjc000eABvgr_qt\",\n \"Status\": 1,\n \"TruncFlag\": false\n }\n ],\n \"RequestId\": \"e6972818-74b2-4228-a5ec-70c11e37fe6c\",\n \"Total\": 506\n }\n}",
|
136
|
+
"title": "示例"
|
137
137
|
}
|
138
138
|
],
|
139
139
|
"GetFlowStatistic": [
|
140
140
|
{
|
141
141
|
"document": "获取指定id设备流量使用信息",
|
142
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetFlowStatistic\n<公共请求参数>\n\n{\n \"EndTime\": 1659514692,\n \"Type\": 1,\n \"DeviceId\": \"
|
142
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetFlowStatistic\n<公共请求参数>\n\n{\n \"EndTime\": 1659514692,\n \"Type\": 1,\n \"DeviceId\": \"mna-dev1\",\n \"TimeGranularity\": 1,\n \"BeginTime\": 1659513692\n}",
|
143
143
|
"output": "{\n \"Response\": {\n \"MaxValue\": 51548,\n \"AvgValue\": 15441,\n \"TotalValue\": 656546,\n \"NetDetails\": [\n {\n \"Time\": \"1659513692\",\n \"Current\": 3546545\n },\n {\n \"Time\": \"1659513692\",\n \"Current\": 4454864\n },\n {\n \"Time\": \"1659513692\",\n \"Current\": 4848941\n }\n ],\n \"RequestId\": \"\"\n }\n}",
|
144
144
|
"title": "获取指定id设备流量使用信息"
|
145
145
|
},
|
146
146
|
{
|
147
147
|
"document": "",
|
148
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetFlowStatistic\n<公共请求参数>\n\n{\n \"EndTime\": 1659514692,\n \"Type\": 1,\n \"DeviceId\": \"\",\n \"DeviceList\": [\n \"
|
148
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetFlowStatistic\n<公共请求参数>\n\n{\n \"EndTime\": 1659514692,\n \"Type\": 1,\n \"DeviceId\": \"\",\n \"DeviceList\": [\n \"mna-dev1\",\n \"mna-dev2\"\n ],\n \"TimeGranularity\": 1,\n \"BeginTime\": 1659513692\n}",
|
149
149
|
"output": "{\n \"Response\": {\n \"MaxValue\": 51548,\n \"AvgValue\": 15441,\n \"TotalValue\": 656546,\n \"NetDetails\": [\n {\n \"Time\": \"1659513692\",\n \"Current\": 3546545\n },\n {\n \"Time\": \"1659513692\",\n \"Current\": 4454864\n },\n {\n \"Time\": \"1659513692\",\n \"Current\": 4848941\n }\n ],\n \"RequestId\": \"\"\n }\n}",
|
150
150
|
"title": "获取多个设备的流量使用信息之和"
|
151
151
|
}
|
@@ -162,15 +162,15 @@
|
|
162
162
|
{
|
163
163
|
"document": "",
|
164
164
|
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetFlowStatisticByRegion\n<公共请求参数>\n\n{\n \"BeginTime\": 0,\n \"EndTime\": 0,\n \"Type\": 0,\n \"TimeGranularity\": 0,\n \"AccessRegion\": \"MC\",\n \"GatewayType\": 0\n}",
|
165
|
-
"output": "{\n \"Response\": {\n \"NetDetails\": [\n {\n \"Current\": 0,\n \"Time\": \"
|
165
|
+
"output": "{\n \"Response\": {\n \"NetDetails\": [\n {\n \"Current\": 0,\n \"Time\": \"1735259400\"\n }\n ],\n \"MaxValue\": 0,\n \"AvgValue\": 0,\n \"TotalValue\": 0,\n \"RequestId\": \"bd89e515-20b4-445b-a88d-7355e76f8d22\"\n }\n}",
|
166
166
|
"title": "正常场景"
|
167
167
|
}
|
168
168
|
],
|
169
169
|
"GetGroupDetail": [
|
170
170
|
{
|
171
171
|
"document": "",
|
172
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetGroupDetail\n<公共请求参数>\n\n{\n \"GroupId\": \"
|
173
|
-
"output": "{\n \"Response\": {\n \"GroupInfo\": {\n \"GroupId\": \"
|
172
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetGroupDetail\n<公共请求参数>\n\n{\n \"GroupId\": \"cliGrp-xf8rboasb\",\n \"PageSize\": \"10\",\n \"PageNumber\": \"1\"\n}",
|
173
|
+
"output": "{\n \"Response\": {\n \"GroupInfo\": {\n \"GroupId\": \"cliGrp-xf8rboasb\",\n \"GroupName\": \"test\",\n \"CreateTime\": \"1711076263000\",\n \"UpdateTime\": \"1711076263000\",\n \"Description\": \"test\",\n \"DeviceNum\": 0\n },\n \"DeviceInfos\": [\n {\n \"DeviceId\": \"mna-detr244\",\n \"DeviceName\": \"name\",\n \"CreateTime\": \"1711076263000\",\n \"LastTime\": \"1711076263000\",\n \"Remark\": \"mark\",\n \"AccessScope\": 0,\n \"LicensePayMode\": 0,\n \"Payer\": 0,\n \"GroupId\": \"cliGrp-xf8rboasb\",\n \"GroupName\": \"test\"\n }\n ],\n \"Length\": 0,\n \"TotalPage\": 0,\n \"RequestId\": \"fd429f79-9914-46e7-94c3-c0695ee1c8b9\"\n }\n}",
|
174
174
|
"title": "示例1"
|
175
175
|
}
|
176
176
|
],
|
@@ -184,23 +184,17 @@
|
|
184
184
|
],
|
185
185
|
"GetHardwareList": [
|
186
186
|
{
|
187
|
-
"document": "
|
188
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetHardwareList\n<公共请求参数>\n\n{\n \"PageNumber\":
|
189
|
-
"output": "{\n \"Response\": {\n \"HardwareInfos\": [\n {\n \"
|
190
|
-
"title": "
|
191
|
-
},
|
192
|
-
{
|
193
|
-
"document": "租户查看厂商设备",
|
194
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetHardwareList\n<公共请求参数>\n\n{\n \"PageNumber\": 1,\n \"PageSize\": 11\n}",
|
195
|
-
"output": "{\n \"Response\": {\n \"HardwareInfos\": [\n {\n \"ActiveTime\": \"1685514528\",\n \"CreateTime\": \"1685510058\",\n \"Description\": \"\",\n \"DeviceId\": \"mna-fsap0nz6lp\",\n \"DeviceName\": \"DeviceName\",\n \"LicenseChargingMode\": 1,\n \"SN\": \"cpe-sn-08\",\n \"VendorDescription\": \"\",\n \"LastOnlineTime\": \"1685518319\"\n },\n {\n \"ActiveTime\": \"1685518319\",\n \"CreateTime\": \"1685518183\",\n \"Description\": \"\",\n \"DeviceId\": \"mna-yhf5rxj0ud\",\n \"DeviceName\": \"DeviceName1\",\n \"LicenseChargingMode\": 1,\n \"SN\": \"cpe-sn-13\",\n \"VendorDescription\": \"\",\n \"LastOnlineTime\": \"1685518319\"\n }\n ],\n \"Length\": 2,\n \"RequestId\": \"cad17990-449a-4961-830f-0cde5b8bd74a\",\n \"TotalPage\": 1\n }\n}",
|
196
|
-
"title": "租户查看厂商设备"
|
187
|
+
"document": "",
|
188
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetHardwareList\n<公共请求参数>\n\n{\n \"PageNumber\": 1,\n \"PageSize\": 1\n}",
|
189
|
+
"output": "{\n \"Response\": {\n \"HardwareInfos\": [\n {\n \"ActiveTime\": \"1686554927\",\n \"CreateTime\": \"1685673786\",\n \"Description\": \"测试00-00\",\n \"DeviceId\": \"mna-2x2tllhb18\",\n \"DeviceName\": \"test-vendor-hardware-00-00\",\n \"FlowTrunc\": 0,\n \"GroupId\": \"\",\n \"GroupName\": \"\",\n \"LicenseChargingMode\": 2,\n \"LicensePayMode\": 0,\n \"Payer\": 1,\n \"SN\": \"test-vendor-hardware-00\",\n \"VendorDescription\": \"测试00\"\n }\n ],\n \"Length\": 107,\n \"RequestId\": \"50f72657-2085-49fe-839f-71f3088c7f0a\",\n \"TotalPage\": 107\n }\n}",
|
190
|
+
"title": "示例"
|
197
191
|
}
|
198
192
|
],
|
199
193
|
"GetL3ConnList": [
|
200
194
|
{
|
201
195
|
"document": "",
|
202
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetL3ConnList\n<公共请求参数>\n\n{\n \"PageSize\": 10,\n \"PageNumber\": 1,\n \"DeviceId\": \"
|
203
|
-
"output": "{\n \"Response\": {\n \"L3ConnList\": [\n {\n \"L3ConnId\": \"
|
196
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetL3ConnList\n<公共请求参数>\n\n{\n \"PageSize\": 10,\n \"PageNumber\": 1,\n \"DeviceId\": \"mna-2x2tllhb18\"\n}",
|
197
|
+
"output": "{\n \"Response\": {\n \"L3ConnList\": [\n {\n \"L3ConnId\": \"l3conn-h9boibynmp\",\n \"DeviceId1\": \"mna-2x2tllhb18\",\n \"Cidr1\": \"192.168.1.0/26\",\n \"DeviceId2\": \"mna-2x2tllhb13\",\n \"Cidr2\": \"192.168.1.0/26\",\n \"Enable\": true,\n \"Description\": \"test\"\n }\n ],\n \"Length\": 1,\n \"TotalPage\": 1,\n \"RequestId\": \"e5b299c7-aaf4-4a5e-9d01-feb63273e347\"\n }\n}",
|
204
198
|
"title": "示例1"
|
205
199
|
}
|
206
200
|
],
|
@@ -216,7 +210,7 @@
|
|
216
210
|
{
|
217
211
|
"document": "获取流量监控信息",
|
218
212
|
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetNetMonitor\n<公共请求参数>\n\n{\n \"Metrics\": \"TxRate\",\n \"EndTime\": 1662624800,\n \"DeviceId\": \"mna-xxx\",\n \"BeginTime\": 1662622200\n}",
|
219
|
-
"output": "{\n \"Response\": {\n \"MonitorData\": [\n {\n \"Time\": \"1673601780\",\n \"BusinessMetrics\": 492350276.319998,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 27582845.919998\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 395158790.239997\n }\n ]\n },\n {\n \"Time\": \"1673601840\",\n \"BusinessMetrics\": 412655416,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 27228367.066665\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 397505721.866666\n }\n ]\n },\n {\n \"Time\": \"1673601900\",\n \"BusinessMetrics\": 411823866.666665,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 28047154.266665\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 396059005.333333\n }\n ]\n },\n {\n \"Time\": \"1673601960\",\n \"BusinessMetrics\": 412108687.733331,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 29244132.933331\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 395156858.266664\n }\n ]\n },\n {\n \"Time\": \"1673602020\",\n \"BusinessMetrics\": 412778279.866666,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 26898350.666666\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 398191465.733331\n }\n ]\n },\n {\n \"Time\": \"1673602080\",\n \"BusinessMetrics\": 412630582.533333,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 28580784.266665\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 396357362.933332\n }\n ]\n },\n {\n \"Time\": \"1673602140\",\n \"BusinessMetrics\": 412431913.466665,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 27329174.8\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 397404181.866666\n }\n ]\n },\n {\n \"Time\": \"1673602200\",\n \"BusinessMetrics\": 410982346.266665,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 29038580.399999\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 394201611.866666\n }\n ]\n },\n {\n \"Time\": \"1673602260\",\n \"BusinessMetrics\": 409923330.933332,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 28212205.599999\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 393937825.066666\n }\n ]\n },\n {\n \"Time\": \"1673602320\",\n \"BusinessMetrics\": 353662726.399999,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 25376171.542857\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 338834939.199999\n }\n ]\n }\n ],\n \"AccessRegion\": \"MC\",\n \"RequestId\": \"
|
213
|
+
"output": "{\n \"Response\": {\n \"MonitorData\": [\n {\n \"Time\": \"1673601780\",\n \"BusinessMetrics\": 492350276.319998,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 27582845.919998\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 395158790.239997\n }\n ]\n },\n {\n \"Time\": \"1673601840\",\n \"BusinessMetrics\": 412655416,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 27228367.066665\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 397505721.866666\n }\n ]\n },\n {\n \"Time\": \"1673601900\",\n \"BusinessMetrics\": 411823866.666665,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 28047154.266665\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 396059005.333333\n }\n ]\n },\n {\n \"Time\": \"1673601960\",\n \"BusinessMetrics\": 412108687.733331,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 29244132.933331\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 395156858.266664\n }\n ]\n },\n {\n \"Time\": \"1673602020\",\n \"BusinessMetrics\": 412778279.866666,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 26898350.666666\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 398191465.733331\n }\n ]\n },\n {\n \"Time\": \"1673602080\",\n \"BusinessMetrics\": 412630582.533333,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 28580784.266665\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 396357362.933332\n }\n ]\n },\n {\n \"Time\": \"1673602140\",\n \"BusinessMetrics\": 412431913.466665,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 27329174.8\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 397404181.866666\n }\n ]\n },\n {\n \"Time\": \"1673602200\",\n \"BusinessMetrics\": 410982346.266665,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 29038580.399999\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 394201611.866666\n }\n ]\n },\n {\n \"Time\": \"1673602260\",\n \"BusinessMetrics\": 409923330.933332,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 28212205.599999\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 393937825.066666\n }\n ]\n },\n {\n \"Time\": \"1673602320\",\n \"BusinessMetrics\": 353662726.399999,\n \"SlotNetInfo\": [\n {\n \"NetInfoName\": \"eth0\",\n \"PublicIP\": \"9.223.110.232\",\n \"Current\": 25376171.542857\n },\n {\n \"NetInfoName\": \"eth1\",\n \"PublicIP\": \"9.223.96.218\",\n \"Current\": 338834939.199999\n }\n ]\n }\n ],\n \"AccessRegion\": \"MC\",\n \"RequestId\": \"odgadasd-dasdasd-dadsada\"\n }\n}",
|
220
214
|
"title": "获取流量监控信息"
|
221
215
|
}
|
222
216
|
],
|
@@ -224,7 +218,7 @@
|
|
224
218
|
{
|
225
219
|
"document": "",
|
226
220
|
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetPublicKey\n<公共请求参数>\n\n{}",
|
227
|
-
"output": "{\n \"Response\": {\n \"PublicKey\": \"
|
221
|
+
"output": "{\n \"Response\": {\n \"PublicKey\": \"-----BEGIN RSA Public Key-----\\nMIIB\\n-----END RSA Public Key-----\",\n \"RequestId\": \"edd378f7-2511-4692-a029-5ca3d22c1884\"\n }\n}",
|
228
222
|
"title": "获取公钥"
|
229
223
|
}
|
230
224
|
],
|
@@ -285,7 +279,7 @@
|
|
285
279
|
"OrderPerLicense": [
|
286
280
|
{
|
287
281
|
"document": "",
|
288
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: OrderPerLicense\n<公共请求参数>\n\n{\n \"DeviceId\": \"
|
282
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: OrderPerLicense\n<公共请求参数>\n\n{\n \"DeviceId\": \"mna-devid\",\n \"Type\": 0,\n \"AutoVoucher\": true,\n \"VoucherIds\": [\n \"v-1\"\n ]\n}",
|
289
283
|
"output": "{\n \"Response\": {\n \"RequestId\": \"1206563f-f13f-4647-aaa8-37fa86954cc4-1\",\n \"ResourceId\": \"56d11777-50f7-4c60-9c89-e7076c8529a9-0\"\n }\n}",
|
290
284
|
"title": "示例1"
|
291
285
|
}
|
@@ -301,7 +295,7 @@
|
|
301
295
|
"UpdateDevice": [
|
302
296
|
{
|
303
297
|
"document": "更新设备",
|
304
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateDevice\n<公共请求参数>\n\n{\n \"DeviceId\": \"
|
298
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateDevice\n<公共请求参数>\n\n{\n \"DeviceId\": \"mna-yesydf\",\n \"DeviceName\": \"name1\",\n \"Remark\": \"remarks\",\n \"UpdateNetInfo\": [\n {\n \"Type\": 0,\n \"DataEnable\": true,\n \"UploadLimit\": 1,\n \"DownloadLimit\": 1,\n \"NetInfoName\": \"netname\"\n }\n ]\n}",
|
305
299
|
"output": "{\n \"Response\": {\n \"RequestId\": \"a400ac72-8f93-4340-a862-f74b56942703\"\n }\n}",
|
306
300
|
"title": "更新设备"
|
307
301
|
}
|
@@ -309,40 +303,46 @@
|
|
309
303
|
"UpdateGroup": [
|
310
304
|
{
|
311
305
|
"document": "",
|
312
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateGroup\n<公共请求参数>\n\n{\n \"GroupId\": \"
|
313
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
306
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateGroup\n<公共请求参数>\n\n{\n \"GroupId\": \"cliGrp-xf8rboasbh\",\n \"Description\": \"test\"\n}",
|
307
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"bcc2c1d2-be38-4249-a50b-d9c487a36354\"\n }\n}",
|
314
308
|
"title": "示例1"
|
315
309
|
}
|
316
310
|
],
|
317
311
|
"UpdateHardware": [
|
318
312
|
{
|
319
313
|
"document": "更新硬件信息",
|
320
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateHardware\n<公共请求参数>\n\n{\n \"HardwareId\": \"
|
321
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
314
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateHardware\n<公共请求参数>\n\n{\n \"HardwareId\": \"cpe-6zmf86knqu\",\n \"SN\": \"adsqda\",\n \"Description\": \"test\"\n}",
|
315
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"4ff707e0-c87a-6cff-5c65-93f21e212a81\"\n }\n}",
|
322
316
|
"title": "更新硬件信息"
|
317
|
+
},
|
318
|
+
{
|
319
|
+
"document": "示例",
|
320
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateHardware\n<公共请求参数>\n\n{\n \"HardwareId\": \"cpe-53g4emz6zc\",\n \"SN\": \"dd\"\n}",
|
321
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"004fa540-6023-46a1-8f92-bcf24d74e24f\"\n }\n}",
|
322
|
+
"title": "示例"
|
323
323
|
}
|
324
324
|
],
|
325
325
|
"UpdateL3Cidr": [
|
326
326
|
{
|
327
327
|
"document": "",
|
328
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetTenant\n<公共请求参数>\n\n{\n \"L3ConnId\": \"
|
329
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
328
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetTenant\n<公共请求参数>\n\n{\n \"L3ConnId\": \"l3conn-c0rkbqhig\",\n \"DeviceId1\": \"mna-f8v7e6o432\",\n \"Cidr1\": \"192.168.0.16/28\",\n \"DeviceId2\": \"mna-f8v7e6o43g\",\n \"Cidr2\": \"192.168.0.16/28\"\n}",
|
329
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"7ab57398-d79f-4195-b0d4-3aef1e43b9c7\"\n }\n}",
|
330
330
|
"title": "示例1"
|
331
331
|
}
|
332
332
|
],
|
333
333
|
"UpdateL3Conn": [
|
334
334
|
{
|
335
335
|
"document": "",
|
336
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateL3Conn\n<公共请求参数>\n\n{\n \"L3ConnId\": \"
|
337
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
336
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateL3Conn\n<公共请求参数>\n\n{\n \"L3ConnId\": \"l3conn-c0rkbqhig8\",\n \"Description\": \"test\"\n}",
|
337
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"7ab57398-d79f-4195-b0d4-3aef1e43b9c7\"\n }\n}",
|
338
338
|
"title": "示例1"
|
339
339
|
}
|
340
340
|
],
|
341
341
|
"UpdateL3Switch": [
|
342
342
|
{
|
343
343
|
"document": "",
|
344
|
-
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetTenant\n<公共请求参数>\n\n{\n \"L3ConnId\": \"
|
345
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
344
|
+
"input": "POST / HTTP/1.1\nHost: mna.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetTenant\n<公共请求参数>\n\n{\n \"L3ConnId\": \"id\",\n \"Enable\": true\n}",
|
345
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"7fa2c35a-ecca-454b-9521-65e17601143e\"\n }\n}",
|
346
346
|
"title": "示例1"
|
347
347
|
}
|
348
348
|
]
|
@@ -21713,6 +21713,15 @@
|
|
21713
21713
|
"name": "RISTSettings",
|
21714
21714
|
"required": false,
|
21715
21715
|
"type": "object"
|
21716
|
+
},
|
21717
|
+
{
|
21718
|
+
"disabled": false,
|
21719
|
+
"document": "输出类型:Internet/TencentCSS/StreamLive",
|
21720
|
+
"example": "TencentCSS",
|
21721
|
+
"member": "string",
|
21722
|
+
"name": "OutputType",
|
21723
|
+
"required": false,
|
21724
|
+
"type": "string"
|
21716
21725
|
}
|
21717
21726
|
],
|
21718
21727
|
"usage": "in"
|
tccli/services/ocr/ocr_client.py
CHANGED
@@ -1213,6 +1213,58 @@ def doQuotaInvoiceOCR(args, parsed_globals):
|
|
1213
1213
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1214
1214
|
|
1215
1215
|
|
1216
|
+
def doBankSlipOCR(args, parsed_globals):
|
1217
|
+
g_param = parse_global_arg(parsed_globals)
|
1218
|
+
|
1219
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1220
|
+
cred = credential.CVMRoleCredential()
|
1221
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1222
|
+
cred = credential.STSAssumeRoleCredential(
|
1223
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1224
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1225
|
+
)
|
1226
|
+
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):
|
1227
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1228
|
+
else:
|
1229
|
+
cred = credential.Credential(
|
1230
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1231
|
+
)
|
1232
|
+
http_profile = HttpProfile(
|
1233
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1234
|
+
reqMethod="POST",
|
1235
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1236
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1237
|
+
)
|
1238
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1239
|
+
if g_param[OptionsDefine.Language]:
|
1240
|
+
profile.language = g_param[OptionsDefine.Language]
|
1241
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1242
|
+
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
1243
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1244
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1245
|
+
model = models.BankSlipOCRRequest()
|
1246
|
+
model.from_json_string(json.dumps(args))
|
1247
|
+
start_time = time.time()
|
1248
|
+
while True:
|
1249
|
+
rsp = client.BankSlipOCR(model)
|
1250
|
+
result = rsp.to_json_string()
|
1251
|
+
try:
|
1252
|
+
json_obj = json.loads(result)
|
1253
|
+
except TypeError as e:
|
1254
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1255
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1256
|
+
break
|
1257
|
+
cur_time = time.time()
|
1258
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1259
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1260
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1261
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1262
|
+
else:
|
1263
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1264
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1265
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1266
|
+
|
1267
|
+
|
1216
1268
|
def doGeneralFastOCR(args, parsed_globals):
|
1217
1269
|
g_param = parse_global_arg(parsed_globals)
|
1218
1270
|
|
@@ -2929,7 +2981,7 @@ def doClassifyStoreName(args, parsed_globals):
|
|
2929
2981
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2930
2982
|
|
2931
2983
|
|
2932
|
-
def
|
2984
|
+
def doGetOCRResult(args, parsed_globals):
|
2933
2985
|
g_param = parse_global_arg(parsed_globals)
|
2934
2986
|
|
2935
2987
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2958,11 +3010,11 @@ def doBankSlipOCR(args, parsed_globals):
|
|
2958
3010
|
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
2959
3011
|
client._sdkVersion += ("_CLI_" + __version__)
|
2960
3012
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2961
|
-
model = models.
|
3013
|
+
model = models.GetOCRResultRequest()
|
2962
3014
|
model.from_json_string(json.dumps(args))
|
2963
3015
|
start_time = time.time()
|
2964
3016
|
while True:
|
2965
|
-
rsp = client.
|
3017
|
+
rsp = client.GetOCRResult(model)
|
2966
3018
|
result = rsp.to_json_string()
|
2967
3019
|
try:
|
2968
3020
|
json_obj = json.loads(result)
|
@@ -3865,6 +3917,58 @@ def doShipInvoiceOCR(args, parsed_globals):
|
|
3865
3917
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3866
3918
|
|
3867
3919
|
|
3920
|
+
def doGetOCRToken(args, parsed_globals):
|
3921
|
+
g_param = parse_global_arg(parsed_globals)
|
3922
|
+
|
3923
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3924
|
+
cred = credential.CVMRoleCredential()
|
3925
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3926
|
+
cred = credential.STSAssumeRoleCredential(
|
3927
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3928
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3929
|
+
)
|
3930
|
+
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):
|
3931
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3932
|
+
else:
|
3933
|
+
cred = credential.Credential(
|
3934
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3935
|
+
)
|
3936
|
+
http_profile = HttpProfile(
|
3937
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3938
|
+
reqMethod="POST",
|
3939
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3940
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3941
|
+
)
|
3942
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3943
|
+
if g_param[OptionsDefine.Language]:
|
3944
|
+
profile.language = g_param[OptionsDefine.Language]
|
3945
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3946
|
+
client = mod.OcrClient(cred, g_param[OptionsDefine.Region], profile)
|
3947
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3948
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3949
|
+
model = models.GetOCRTokenRequest()
|
3950
|
+
model.from_json_string(json.dumps(args))
|
3951
|
+
start_time = time.time()
|
3952
|
+
while True:
|
3953
|
+
rsp = client.GetOCRToken(model)
|
3954
|
+
result = rsp.to_json_string()
|
3955
|
+
try:
|
3956
|
+
json_obj = json.loads(result)
|
3957
|
+
except TypeError as e:
|
3958
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3959
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3960
|
+
break
|
3961
|
+
cur_time = time.time()
|
3962
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3963
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3964
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3965
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3966
|
+
else:
|
3967
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3968
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3969
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3970
|
+
|
3971
|
+
|
3868
3972
|
def doVerifyOfdVatInvoiceOCR(args, parsed_globals):
|
3869
3973
|
g_param = parse_global_arg(parsed_globals)
|
3870
3974
|
|
@@ -4367,6 +4471,7 @@ ACTION_MAP = {
|
|
4367
4471
|
"MLIDPassportOCR": doMLIDPassportOCR,
|
4368
4472
|
"VatRollInvoiceOCR": doVatRollInvoiceOCR,
|
4369
4473
|
"QuotaInvoiceOCR": doQuotaInvoiceOCR,
|
4474
|
+
"BankSlipOCR": doBankSlipOCR,
|
4370
4475
|
"GeneralFastOCR": doGeneralFastOCR,
|
4371
4476
|
"PropOwnerCertOCR": doPropOwnerCertOCR,
|
4372
4477
|
"RecognizeThaiIDCardOCR": doRecognizeThaiIDCardOCR,
|
@@ -4400,7 +4505,7 @@ ACTION_MAP = {
|
|
4400
4505
|
"SealOCR": doSealOCR,
|
4401
4506
|
"FinanBillOCR": doFinanBillOCR,
|
4402
4507
|
"ClassifyStoreName": doClassifyStoreName,
|
4403
|
-
"
|
4508
|
+
"GetOCRResult": doGetOCRResult,
|
4404
4509
|
"GeneralEfficientOCR": doGeneralEfficientOCR,
|
4405
4510
|
"TaxiInvoiceOCR": doTaxiInvoiceOCR,
|
4406
4511
|
"TrainTicketOCR": doTrainTicketOCR,
|
@@ -4418,6 +4523,7 @@ ACTION_MAP = {
|
|
4418
4523
|
"VatInvoiceVerify": doVatInvoiceVerify,
|
4419
4524
|
"InstitutionOCR": doInstitutionOCR,
|
4420
4525
|
"ShipInvoiceOCR": doShipInvoiceOCR,
|
4526
|
+
"GetOCRToken": doGetOCRToken,
|
4421
4527
|
"VerifyOfdVatInvoiceOCR": doVerifyOfdVatInvoiceOCR,
|
4422
4528
|
"RecognizeHealthCodeOCR": doRecognizeHealthCodeOCR,
|
4423
4529
|
"SmartStructuralPro": doSmartStructuralPro,
|