tccli 3.0.1334.1__py2.py3-none-any.whl → 3.0.1336.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/bi/v20220105/api.json +93 -0
- tccli/services/cdb/v20170320/api.json +3 -3
- tccli/services/cdn/v20180606/api.json +3 -3
- tccli/services/cfs/v20190719/api.json +7 -7
- tccli/services/cls/v20201016/api.json +10 -0
- tccli/services/essbasic/v20210526/api.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/lke/v20231130/api.json +25 -5
- 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 +129 -0
- tccli/services/ocr/ocr_client.py +4 -110
- tccli/services/ocr/v20181119/api.json +1 -283
- tccli/services/ocr/v20181119/examples.json +0 -16
- tccli/services/ssl/ssl_client.py +53 -0
- tccli/services/ssl/v20191205/api.json +100 -0
- tccli/services/ssl/v20191205/examples.json +8 -0
- tccli/services/tcbr/v20220217/api.json +22 -0
- tccli/services/trocket/v20230308/api.json +1 -1
- tccli/services/trocket/v20230308/examples.json +1 -1
- tccli/services/tse/v20201207/api.json +1 -1
- tccli/services/tsf/v20180326/api.json +3 -2
- {tccli-3.0.1334.1.dist-info → tccli-3.0.1336.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1334.1.dist-info → tccli-3.0.1336.1.dist-info}/RECORD +31 -31
- {tccli-3.0.1334.1.dist-info → tccli-3.0.1336.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1334.1.dist-info → tccli-3.0.1336.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1334.1.dist-info → tccli-3.0.1336.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1336.1'
|
@@ -4893,6 +4893,89 @@
|
|
4893
4893
|
],
|
4894
4894
|
"usage": "out"
|
4895
4895
|
},
|
4896
|
+
"UserGroupDTO": {
|
4897
|
+
"document": "用户组",
|
4898
|
+
"members": [
|
4899
|
+
{
|
4900
|
+
"disabled": false,
|
4901
|
+
"document": "id\n注意:此字段可能返回 null,表示取不到有效值。",
|
4902
|
+
"example": "1",
|
4903
|
+
"member": "int64",
|
4904
|
+
"name": "Id",
|
4905
|
+
"output_required": false,
|
4906
|
+
"required": false,
|
4907
|
+
"type": "int",
|
4908
|
+
"value_allowed_null": true
|
4909
|
+
},
|
4910
|
+
{
|
4911
|
+
"disabled": false,
|
4912
|
+
"document": "用户组名称\n注意:此字段可能返回 null,表示取不到有效值。",
|
4913
|
+
"example": "云产品",
|
4914
|
+
"member": "string",
|
4915
|
+
"name": "GroupName",
|
4916
|
+
"output_required": false,
|
4917
|
+
"required": false,
|
4918
|
+
"type": "string",
|
4919
|
+
"value_allowed_null": true
|
4920
|
+
},
|
4921
|
+
{
|
4922
|
+
"disabled": false,
|
4923
|
+
"document": "父节点id\n注意:此字段可能返回 null,表示取不到有效值。",
|
4924
|
+
"example": "1",
|
4925
|
+
"member": "int64",
|
4926
|
+
"name": "ParentId",
|
4927
|
+
"output_required": false,
|
4928
|
+
"required": false,
|
4929
|
+
"type": "int",
|
4930
|
+
"value_allowed_null": true
|
4931
|
+
},
|
4932
|
+
{
|
4933
|
+
"disabled": false,
|
4934
|
+
"document": "是否为默认\n注意:此字段可能返回 null,表示取不到有效值。",
|
4935
|
+
"example": "1",
|
4936
|
+
"member": "int64",
|
4937
|
+
"name": "IsDefault",
|
4938
|
+
"output_required": false,
|
4939
|
+
"required": false,
|
4940
|
+
"type": "int",
|
4941
|
+
"value_allowed_null": true
|
4942
|
+
},
|
4943
|
+
{
|
4944
|
+
"disabled": false,
|
4945
|
+
"document": "管理员用户id\n注意:此字段可能返回 null,表示取不到有效值。",
|
4946
|
+
"example": "test_user",
|
4947
|
+
"member": "string",
|
4948
|
+
"name": "AdminUserId",
|
4949
|
+
"output_required": false,
|
4950
|
+
"required": false,
|
4951
|
+
"type": "string",
|
4952
|
+
"value_allowed_null": true
|
4953
|
+
},
|
4954
|
+
{
|
4955
|
+
"disabled": false,
|
4956
|
+
"document": "描述\n注意:此字段可能返回 null,表示取不到有效值。",
|
4957
|
+
"example": "描述",
|
4958
|
+
"member": "string",
|
4959
|
+
"name": "Description",
|
4960
|
+
"output_required": false,
|
4961
|
+
"required": false,
|
4962
|
+
"type": "string",
|
4963
|
+
"value_allowed_null": true
|
4964
|
+
},
|
4965
|
+
{
|
4966
|
+
"disabled": false,
|
4967
|
+
"document": "定位\n注意:此字段可能返回 null,表示取不到有效值。",
|
4968
|
+
"example": "1",
|
4969
|
+
"member": "int64",
|
4970
|
+
"name": "Location",
|
4971
|
+
"output_required": false,
|
4972
|
+
"required": false,
|
4973
|
+
"type": "int",
|
4974
|
+
"value_allowed_null": true
|
4975
|
+
}
|
4976
|
+
],
|
4977
|
+
"usage": "both"
|
4978
|
+
},
|
4896
4979
|
"UserIdAndUserName": {
|
4897
4980
|
"document": "用户ID和用户名",
|
4898
4981
|
"members": [
|
@@ -5569,6 +5652,16 @@
|
|
5569
5652
|
"output_required": false,
|
5570
5653
|
"type": "int",
|
5571
5654
|
"value_allowed_null": true
|
5655
|
+
},
|
5656
|
+
{
|
5657
|
+
"disabled": false,
|
5658
|
+
"document": "用户组信息\n注意:此字段可能返回 null,表示取不到有效值。",
|
5659
|
+
"example": "[{\"Id\":1}]",
|
5660
|
+
"member": "UserGroupDTO",
|
5661
|
+
"name": "UserGroupList",
|
5662
|
+
"output_required": false,
|
5663
|
+
"type": "list",
|
5664
|
+
"value_allowed_null": true
|
5572
5665
|
}
|
5573
5666
|
],
|
5574
5667
|
"usage": "out"
|
@@ -13095,7 +13095,7 @@
|
|
13095
13095
|
},
|
13096
13096
|
{
|
13097
13097
|
"disabled": false,
|
13098
|
-
"document": "数据库名称,可使用[查询数据库](https://cloud.tencent.com/document/api/
|
13098
|
+
"document": "数据库名称,可使用[查询数据库](https://cloud.tencent.com/document/api/236/17493)接口获得。",
|
13099
13099
|
"example": "test_data_base",
|
13100
13100
|
"member": "string",
|
13101
13101
|
"name": "Database",
|
@@ -13123,7 +13123,7 @@
|
|
13123
13123
|
"example": "10",
|
13124
13124
|
"member": "int64",
|
13125
13125
|
"name": "TotalCount",
|
13126
|
-
"
|
13126
|
+
"output_required": true,
|
13127
13127
|
"type": "int",
|
13128
13128
|
"value_allowed_null": false
|
13129
13129
|
},
|
@@ -13133,7 +13133,7 @@
|
|
13133
13133
|
"example": "[ \"TABLE_CATALOG\", \"TABLE_SCHEMA\", ",
|
13134
13134
|
"member": "string",
|
13135
13135
|
"name": "Items",
|
13136
|
-
"
|
13136
|
+
"output_required": true,
|
13137
13137
|
"type": "list",
|
13138
13138
|
"value_allowed_null": false
|
13139
13139
|
},
|
@@ -5782,7 +5782,7 @@
|
|
5782
5782
|
{
|
5783
5783
|
"disabled": false,
|
5784
5784
|
"document": "域名列表,最多支持20个域名",
|
5785
|
-
"example": "[\"www.test.com
|
5785
|
+
"example": "[\"www.test.com\"]",
|
5786
5786
|
"member": "string",
|
5787
5787
|
"name": "Domains",
|
5788
5788
|
"required": true,
|
@@ -5818,7 +5818,7 @@
|
|
5818
5818
|
{
|
5819
5819
|
"disabled": false,
|
5820
5820
|
"document": "指定省份查询,不填充表示查询所有省份\n省份、国家/地区编码可以查看 [省份编码映射](https://cloud.tencent.com/document/product/228/6316#.E5.8C.BA.E5.9F.9F-.2F-.E8.BF.90.E8.90.A5.E5.95.86.E6.98.A0.E5.B0.84.E8.A1.A8)",
|
5821
|
-
"example": "122",
|
5821
|
+
"example": "[122]",
|
5822
5822
|
"member": "int64",
|
5823
5823
|
"name": "Districts",
|
5824
5824
|
"required": false,
|
@@ -5827,7 +5827,7 @@
|
|
5827
5827
|
{
|
5828
5828
|
"disabled": false,
|
5829
5829
|
"document": "指定运营商查询,不填充表示查询所有运营商\n运营商编码可以查看 [运营商编码映射](https://cloud.tencent.com/document/product/228/6316#.E5.8C.BA.E5.9F.9F-.2F-.E8.BF.90.E8.90.A5.E5.95.86.E6.98.A0.E5.B0.84.E8.A1.A8)",
|
5830
|
-
"example": "3947",
|
5830
|
+
"example": "[3947]",
|
5831
5831
|
"member": "int64",
|
5832
5832
|
"name": "Isps",
|
5833
5833
|
"required": false,
|
@@ -3433,7 +3433,7 @@
|
|
3433
3433
|
"members": [
|
3434
3434
|
{
|
3435
3435
|
"disabled": false,
|
3436
|
-
"document": "文件系统ID,通过查询文件系统列表获取;[DescribeCfsFileSystems](https://cloud.tencent.com/document/product/582/38170)",
|
3436
|
+
"document": "文件系统 ID,通过查询文件系统列表获取;[DescribeCfsFileSystems](https://cloud.tencent.com/document/product/582/38170)",
|
3437
3437
|
"example": "cfs-4abc12343",
|
3438
3438
|
"member": "string",
|
3439
3439
|
"name": "FileSystemId",
|
@@ -3451,7 +3451,7 @@
|
|
3451
3451
|
},
|
3452
3452
|
{
|
3453
3453
|
"disabled": false,
|
3454
|
-
"document": "
|
3454
|
+
"document": "扩容后目标阈值,范围[1-90],该值要小于 ScaleUpThreshold",
|
3455
3455
|
"example": "80",
|
3456
3456
|
"member": "uint64",
|
3457
3457
|
"name": "TargetThreshold",
|
@@ -3460,7 +3460,7 @@
|
|
3460
3460
|
},
|
3461
3461
|
{
|
3462
3462
|
"disabled": false,
|
3463
|
-
"document": "规则状态0
|
3463
|
+
"document": "规则状态 0:关闭,1:开启;不传保留原状态",
|
3464
3464
|
"example": "0",
|
3465
3465
|
"member": "uint64",
|
3466
3466
|
"name": "Status",
|
@@ -3475,7 +3475,7 @@
|
|
3475
3475
|
"members": [
|
3476
3476
|
{
|
3477
3477
|
"disabled": false,
|
3478
|
-
"document": "文件系统
|
3478
|
+
"document": "文件系统 ID",
|
3479
3479
|
"example": "cfs-x",
|
3480
3480
|
"member": "string",
|
3481
3481
|
"name": "FileSystemId",
|
@@ -3485,7 +3485,7 @@
|
|
3485
3485
|
},
|
3486
3486
|
{
|
3487
3487
|
"disabled": false,
|
3488
|
-
"document": "规则状态0
|
3488
|
+
"document": "规则状态 0:关闭,1:开启",
|
3489
3489
|
"example": "0",
|
3490
3490
|
"member": "uint64",
|
3491
3491
|
"name": "Status",
|
@@ -3495,7 +3495,7 @@
|
|
3495
3495
|
},
|
3496
3496
|
{
|
3497
3497
|
"disabled": false,
|
3498
|
-
"document": "
|
3498
|
+
"document": "扩容阈值,范围[10-90]",
|
3499
3499
|
"example": "85",
|
3500
3500
|
"member": "uint64",
|
3501
3501
|
"name": "ScaleUpThreshold",
|
@@ -3505,7 +3505,7 @@
|
|
3505
3505
|
},
|
3506
3506
|
{
|
3507
3507
|
"disabled": false,
|
3508
|
-
"document": "
|
3508
|
+
"document": "扩容后达到阈值,范围[1-90]",
|
3509
3509
|
"example": "75",
|
3510
3510
|
"member": "uint64",
|
3511
3511
|
"name": "TargetThreshold",
|
@@ -5118,6 +5118,15 @@
|
|
5118
5118
|
"name": "Tags",
|
5119
5119
|
"required": false,
|
5120
5120
|
"type": "list"
|
5121
|
+
},
|
5122
|
+
{
|
5123
|
+
"disabled": false,
|
5124
|
+
"document": "日志集ID,格式为:用户自定义部分-用户appid,用户自定义部分仅支持小写字母、数字和-,且不能以-开头和结尾,长度为3至40字符,尾部需要使用-拼接用户appid",
|
5125
|
+
"example": "user-define-34534566",
|
5126
|
+
"member": "string",
|
5127
|
+
"name": "LogsetId",
|
5128
|
+
"required": false,
|
5129
|
+
"type": "string"
|
5121
5130
|
}
|
5122
5131
|
],
|
5123
5132
|
"type": "object"
|
@@ -5131,6 +5140,7 @@
|
|
5131
5140
|
"example": "dc01b74a-49e4-11eb-b378-0242ac130002",
|
5132
5141
|
"member": "string",
|
5133
5142
|
"name": "LogsetId",
|
5143
|
+
"output_required": true,
|
5134
5144
|
"type": "string",
|
5135
5145
|
"value_allowed_null": false
|
5136
5146
|
},
|
@@ -13688,7 +13688,7 @@
|
|
13688
13688
|
},
|
13689
13689
|
{
|
13690
13690
|
"disabled": false,
|
13691
|
-
"document": "操作类型,对应的操作\n<ul><li> **CREATE** :新增员工</li>\n<li> **UPDATE**
|
13691
|
+
"document": "操作类型,对应的操作\n<ul><li> **CREATE** :新增员工</li>\n<li> **UPDATE** :修改员工(仅支持修改未实名员工的信息,如果已经实名并加入企业的员工基础信息修改需要到小程序中进行)</li>\n<li> **RESIGN** :离职员工</li></ul>",
|
13692
13692
|
"example": "RESIGN",
|
13693
13693
|
"member": "string",
|
13694
13694
|
"name": "OperatorType",
|
@@ -277,7 +277,7 @@ def doDescribeFirmwareUpdateStatus(args, parsed_globals):
|
|
277
277
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
278
|
|
279
279
|
|
280
|
-
def
|
280
|
+
def doDescribeAISearchTaskAsync(args, parsed_globals):
|
281
281
|
g_param = parse_global_arg(parsed_globals)
|
282
282
|
|
283
283
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -306,11 +306,11 @@ def doDescribeDevice(args, parsed_globals):
|
|
306
306
|
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
307
307
|
client._sdkVersion += ("_CLI_" + __version__)
|
308
308
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
-
model = models.
|
309
|
+
model = models.DescribeAISearchTaskAsyncRequest()
|
310
310
|
model.from_json_string(json.dumps(args))
|
311
311
|
start_time = time.time()
|
312
312
|
while True:
|
313
|
-
rsp = client.
|
313
|
+
rsp = client.DescribeAISearchTaskAsync(model)
|
314
314
|
result = rsp.to_json_string()
|
315
315
|
try:
|
316
316
|
json_obj = json.loads(result)
|
@@ -1785,6 +1785,58 @@ def doModifyLoRaGateway(args, parsed_globals):
|
|
1785
1785
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1786
1786
|
|
1787
1787
|
|
1788
|
+
def doDescribeDevice(args, parsed_globals):
|
1789
|
+
g_param = parse_global_arg(parsed_globals)
|
1790
|
+
|
1791
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1792
|
+
cred = credential.CVMRoleCredential()
|
1793
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1794
|
+
cred = credential.STSAssumeRoleCredential(
|
1795
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1796
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1797
|
+
)
|
1798
|
+
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):
|
1799
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1800
|
+
else:
|
1801
|
+
cred = credential.Credential(
|
1802
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1803
|
+
)
|
1804
|
+
http_profile = HttpProfile(
|
1805
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1806
|
+
reqMethod="POST",
|
1807
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1808
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1809
|
+
)
|
1810
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1811
|
+
if g_param[OptionsDefine.Language]:
|
1812
|
+
profile.language = g_param[OptionsDefine.Language]
|
1813
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1814
|
+
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
1815
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1816
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1817
|
+
model = models.DescribeDeviceRequest()
|
1818
|
+
model.from_json_string(json.dumps(args))
|
1819
|
+
start_time = time.time()
|
1820
|
+
while True:
|
1821
|
+
rsp = client.DescribeDevice(model)
|
1822
|
+
result = rsp.to_json_string()
|
1823
|
+
try:
|
1824
|
+
json_obj = json.loads(result)
|
1825
|
+
except TypeError as e:
|
1826
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1827
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1828
|
+
break
|
1829
|
+
cur_time = time.time()
|
1830
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1831
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1832
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1833
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1834
|
+
else:
|
1835
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1836
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1837
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1838
|
+
|
1839
|
+
|
1788
1840
|
def doControlDeviceData(args, parsed_globals):
|
1789
1841
|
g_param = parse_global_arg(parsed_globals)
|
1790
1842
|
|
@@ -3917,7 +3969,7 @@ def doDescribeCloudStorageStreamData(args, parsed_globals):
|
|
3917
3969
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3918
3970
|
|
3919
3971
|
|
3920
|
-
def
|
3972
|
+
def doCreateAISearchTaskAsync(args, parsed_globals):
|
3921
3973
|
g_param = parse_global_arg(parsed_globals)
|
3922
3974
|
|
3923
3975
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3946,11 +3998,11 @@ def doGetDeviceSumStatistics(args, parsed_globals):
|
|
3946
3998
|
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
3947
3999
|
client._sdkVersion += ("_CLI_" + __version__)
|
3948
4000
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3949
|
-
model = models.
|
4001
|
+
model = models.CreateAISearchTaskAsyncRequest()
|
3950
4002
|
model.from_json_string(json.dumps(args))
|
3951
4003
|
start_time = time.time()
|
3952
4004
|
while True:
|
3953
|
-
rsp = client.
|
4005
|
+
rsp = client.CreateAISearchTaskAsync(model)
|
3954
4006
|
result = rsp.to_json_string()
|
3955
4007
|
try:
|
3956
4008
|
json_obj = json.loads(result)
|
@@ -7141,6 +7193,58 @@ def doDescribeStudioProduct(args, parsed_globals):
|
|
7141
7193
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7142
7194
|
|
7143
7195
|
|
7196
|
+
def doGetDeviceSumStatistics(args, parsed_globals):
|
7197
|
+
g_param = parse_global_arg(parsed_globals)
|
7198
|
+
|
7199
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
7200
|
+
cred = credential.CVMRoleCredential()
|
7201
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7202
|
+
cred = credential.STSAssumeRoleCredential(
|
7203
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7204
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7205
|
+
)
|
7206
|
+
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):
|
7207
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
7208
|
+
else:
|
7209
|
+
cred = credential.Credential(
|
7210
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
7211
|
+
)
|
7212
|
+
http_profile = HttpProfile(
|
7213
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
7214
|
+
reqMethod="POST",
|
7215
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
7216
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
7217
|
+
)
|
7218
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
7219
|
+
if g_param[OptionsDefine.Language]:
|
7220
|
+
profile.language = g_param[OptionsDefine.Language]
|
7221
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
7222
|
+
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
7223
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
7224
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7225
|
+
model = models.GetDeviceSumStatisticsRequest()
|
7226
|
+
model.from_json_string(json.dumps(args))
|
7227
|
+
start_time = time.time()
|
7228
|
+
while True:
|
7229
|
+
rsp = client.GetDeviceSumStatistics(model)
|
7230
|
+
result = rsp.to_json_string()
|
7231
|
+
try:
|
7232
|
+
json_obj = json.loads(result)
|
7233
|
+
except TypeError as e:
|
7234
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
7235
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
7236
|
+
break
|
7237
|
+
cur_time = time.time()
|
7238
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
7239
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
7240
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
7241
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
7242
|
+
else:
|
7243
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
7244
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
7245
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7246
|
+
|
7247
|
+
|
7144
7248
|
def doDescribePositionFenceList(args, parsed_globals):
|
7145
7249
|
g_param = parse_global_arg(parsed_globals)
|
7146
7250
|
|
@@ -8665,7 +8769,7 @@ ACTION_MAP = {
|
|
8665
8769
|
"ModifyStudioProduct": doModifyStudioProduct,
|
8666
8770
|
"DescribeDevicePackages": doDescribeDevicePackages,
|
8667
8771
|
"DescribeFirmwareUpdateStatus": doDescribeFirmwareUpdateStatus,
|
8668
|
-
"
|
8772
|
+
"DescribeAISearchTaskAsync": doDescribeAISearchTaskAsync,
|
8669
8773
|
"DescribeP2PRoute": doDescribeP2PRoute,
|
8670
8774
|
"DescribeCloudStorageEventsWithAITasks": doDescribeCloudStorageEventsWithAITasks,
|
8671
8775
|
"DescribeTopicPolicy": doDescribeTopicPolicy,
|
@@ -8694,6 +8798,7 @@ ACTION_MAP = {
|
|
8694
8798
|
"DescribeActivateDevice": doDescribeActivateDevice,
|
8695
8799
|
"DescribeBindedProducts": doDescribeBindedProducts,
|
8696
8800
|
"ModifyLoRaGateway": doModifyLoRaGateway,
|
8801
|
+
"DescribeDevice": doDescribeDevice,
|
8697
8802
|
"ControlDeviceData": doControlDeviceData,
|
8698
8803
|
"DescribeUnbindedDevices": doDescribeUnbindedDevices,
|
8699
8804
|
"CreateIotVideoCloudStorage": doCreateIotVideoCloudStorage,
|
@@ -8735,7 +8840,7 @@ ACTION_MAP = {
|
|
8735
8840
|
"DescribeCloudStorageMultiThumbnail": doDescribeCloudStorageMultiThumbnail,
|
8736
8841
|
"CallDeviceActionAsync": doCallDeviceActionAsync,
|
8737
8842
|
"DescribeCloudStorageStreamData": doDescribeCloudStorageStreamData,
|
8738
|
-
"
|
8843
|
+
"CreateAISearchTaskAsync": doCreateAISearchTaskAsync,
|
8739
8844
|
"DeleteProject": doDeleteProject,
|
8740
8845
|
"DescribeCloudStorageAIServiceTask": doDescribeCloudStorageAIServiceTask,
|
8741
8846
|
"DescribeTopicRule": doDescribeTopicRule,
|
@@ -8797,6 +8902,7 @@ ACTION_MAP = {
|
|
8797
8902
|
"ModifyPositionFence": doModifyPositionFence,
|
8798
8903
|
"InvokeTWeSeeRecognitionTask": doInvokeTWeSeeRecognitionTask,
|
8799
8904
|
"DescribeStudioProduct": doDescribeStudioProduct,
|
8905
|
+
"GetDeviceSumStatistics": doGetDeviceSumStatistics,
|
8800
8906
|
"DescribePositionFenceList": doDescribePositionFenceList,
|
8801
8907
|
"DeleteLoRaFrequency": doDeleteLoRaFrequency,
|
8802
8908
|
"DescribePackageConsumeTask": doDescribePackageConsumeTask,
|
@@ -70,6 +70,13 @@
|
|
70
70
|
"output": "ControlDeviceDataResponse",
|
71
71
|
"status": "online"
|
72
72
|
},
|
73
|
+
"CreateAISearchTaskAsync": {
|
74
|
+
"document": "创建视频语义异步搜索任务",
|
75
|
+
"input": "CreateAISearchTaskAsyncRequest",
|
76
|
+
"name": "创建异步视频语义搜索任务",
|
77
|
+
"output": "CreateAISearchTaskAsyncResponse",
|
78
|
+
"status": "online"
|
79
|
+
},
|
73
80
|
"CreateBatchProduction": {
|
74
81
|
"document": "用于新建批量生产设备",
|
75
82
|
"input": "CreateBatchProductionRequest",
|
@@ -287,6 +294,13 @@
|
|
287
294
|
"output": "DeleteTopicRuleResponse",
|
288
295
|
"status": "online"
|
289
296
|
},
|
297
|
+
"DescribeAISearchTaskAsync": {
|
298
|
+
"document": "获取视频语义异步搜索任务详情",
|
299
|
+
"input": "DescribeAISearchTaskAsyncRequest",
|
300
|
+
"name": "获取异步视频语义搜索任务详情",
|
301
|
+
"output": "DescribeAISearchTaskAsyncResponse",
|
302
|
+
"status": "online"
|
303
|
+
},
|
290
304
|
"DescribeActivateDevice": {
|
291
305
|
"document": "获取设备激活详情",
|
292
306
|
"input": "DescribeActivateDeviceRequest",
|
@@ -1170,6 +1184,42 @@
|
|
1170
1184
|
"serviceShortName": "iotexplorer"
|
1171
1185
|
},
|
1172
1186
|
"objects": {
|
1187
|
+
"AISearchInfo": {
|
1188
|
+
"document": "AI视频搜索结果结构体。",
|
1189
|
+
"members": [
|
1190
|
+
{
|
1191
|
+
"disabled": false,
|
1192
|
+
"document": "基于搜索结果的总结",
|
1193
|
+
"example": "What happened on April 1st",
|
1194
|
+
"member": "string",
|
1195
|
+
"name": "Summary",
|
1196
|
+
"output_required": false,
|
1197
|
+
"type": "string",
|
1198
|
+
"value_allowed_null": false
|
1199
|
+
},
|
1200
|
+
{
|
1201
|
+
"disabled": false,
|
1202
|
+
"document": "视频结果集",
|
1203
|
+
"example": "无",
|
1204
|
+
"member": "TargetInfo",
|
1205
|
+
"name": "Targets",
|
1206
|
+
"output_required": false,
|
1207
|
+
"type": "list",
|
1208
|
+
"value_allowed_null": false
|
1209
|
+
},
|
1210
|
+
{
|
1211
|
+
"disabled": false,
|
1212
|
+
"document": "视频回放URL",
|
1213
|
+
"example": "https://domain.com/video.m3u8",
|
1214
|
+
"member": "string",
|
1215
|
+
"name": "VideoURL",
|
1216
|
+
"output_required": false,
|
1217
|
+
"type": "string",
|
1218
|
+
"value_allowed_null": false
|
1219
|
+
}
|
1220
|
+
],
|
1221
|
+
"usage": "out"
|
1222
|
+
},
|
1173
1223
|
"ActivateDeviceInfo": {
|
1174
1224
|
"document": "设备激活详情信息",
|
1175
1225
|
"members": [
|
@@ -2814,6 +2864,79 @@
|
|
2814
2864
|
],
|
2815
2865
|
"usage": "out"
|
2816
2866
|
},
|
2867
|
+
"CreateAISearchTaskAsyncRequest": {
|
2868
|
+
"document": "CreateAISearchTaskAsync请求参数结构体",
|
2869
|
+
"members": [
|
2870
|
+
{
|
2871
|
+
"disabled": false,
|
2872
|
+
"document": "产品ID",
|
2873
|
+
"example": "MVTYMD8YCD",
|
2874
|
+
"member": "string",
|
2875
|
+
"name": "ProductId",
|
2876
|
+
"required": true,
|
2877
|
+
"type": "string"
|
2878
|
+
},
|
2879
|
+
{
|
2880
|
+
"disabled": false,
|
2881
|
+
"document": "设备名称",
|
2882
|
+
"example": "dev001",
|
2883
|
+
"member": "string",
|
2884
|
+
"name": "DeviceName",
|
2885
|
+
"required": true,
|
2886
|
+
"type": "string"
|
2887
|
+
},
|
2888
|
+
{
|
2889
|
+
"disabled": false,
|
2890
|
+
"document": "自然语言查询",
|
2891
|
+
"example": "今天发生了什么?",
|
2892
|
+
"member": "string",
|
2893
|
+
"name": "Query",
|
2894
|
+
"required": true,
|
2895
|
+
"type": "string"
|
2896
|
+
},
|
2897
|
+
{
|
2898
|
+
"disabled": false,
|
2899
|
+
"document": "搜索结果总结的语言类型,支持的类型有:en-US、zh-CN、id-ID、th-TH",
|
2900
|
+
"example": "zh-CN",
|
2901
|
+
"member": "string",
|
2902
|
+
"name": "SummaryLang",
|
2903
|
+
"required": false,
|
2904
|
+
"type": "string"
|
2905
|
+
},
|
2906
|
+
{
|
2907
|
+
"disabled": false,
|
2908
|
+
"document": "通道ID",
|
2909
|
+
"example": "0",
|
2910
|
+
"member": "uint64",
|
2911
|
+
"name": "ChannelId",
|
2912
|
+
"required": false,
|
2913
|
+
"type": "int"
|
2914
|
+
}
|
2915
|
+
],
|
2916
|
+
"type": "object"
|
2917
|
+
},
|
2918
|
+
"CreateAISearchTaskAsyncResponse": {
|
2919
|
+
"document": "CreateAISearchTaskAsync返回参数结构体",
|
2920
|
+
"members": [
|
2921
|
+
{
|
2922
|
+
"disabled": false,
|
2923
|
+
"document": "任务ID",
|
2924
|
+
"example": "task_0001",
|
2925
|
+
"member": "string",
|
2926
|
+
"name": "TaskId",
|
2927
|
+
"output_required": false,
|
2928
|
+
"type": "string",
|
2929
|
+
"value_allowed_null": false
|
2930
|
+
},
|
2931
|
+
{
|
2932
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
2933
|
+
"member": "string",
|
2934
|
+
"name": "RequestId",
|
2935
|
+
"type": "string"
|
2936
|
+
}
|
2937
|
+
],
|
2938
|
+
"type": "object"
|
2939
|
+
},
|
2817
2940
|
"CreateBatchProductionRequest": {
|
2818
2941
|
"document": "CreateBatchProduction请求参数结构体",
|
2819
2942
|
"members": [
|
@@ -4825,6 +4948,53 @@
|
|
4825
4948
|
],
|
4826
4949
|
"type": "object"
|
4827
4950
|
},
|
4951
|
+
"DescribeAISearchTaskAsyncRequest": {
|
4952
|
+
"document": "DescribeAISearchTaskAsync请求参数结构体",
|
4953
|
+
"members": [
|
4954
|
+
{
|
4955
|
+
"disabled": false,
|
4956
|
+
"document": "任务ID",
|
4957
|
+
"example": "task_0001",
|
4958
|
+
"member": "string",
|
4959
|
+
"name": "TaskId",
|
4960
|
+
"required": true,
|
4961
|
+
"type": "string"
|
4962
|
+
}
|
4963
|
+
],
|
4964
|
+
"type": "object"
|
4965
|
+
},
|
4966
|
+
"DescribeAISearchTaskAsyncResponse": {
|
4967
|
+
"document": "DescribeAISearchTaskAsync返回参数结构体",
|
4968
|
+
"members": [
|
4969
|
+
{
|
4970
|
+
"disabled": false,
|
4971
|
+
"document": "状态。0-初始状态;1-正在处理;2-处理失败;3-成功",
|
4972
|
+
"example": "OK",
|
4973
|
+
"member": "int64",
|
4974
|
+
"name": "Status",
|
4975
|
+
"output_required": false,
|
4976
|
+
"type": "int",
|
4977
|
+
"value_allowed_null": false
|
4978
|
+
},
|
4979
|
+
{
|
4980
|
+
"disabled": false,
|
4981
|
+
"document": "任务处理结果数据",
|
4982
|
+
"example": "无",
|
4983
|
+
"member": "AISearchInfo",
|
4984
|
+
"name": "Data",
|
4985
|
+
"output_required": false,
|
4986
|
+
"type": "object",
|
4987
|
+
"value_allowed_null": false
|
4988
|
+
},
|
4989
|
+
{
|
4990
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
4991
|
+
"member": "string",
|
4992
|
+
"name": "RequestId",
|
4993
|
+
"type": "string"
|
4994
|
+
}
|
4995
|
+
],
|
4996
|
+
"type": "object"
|
4997
|
+
},
|
4828
4998
|
"DescribeActivateDeviceRequest": {
|
4829
4999
|
"document": "DescribeActivateDevice请求参数结构体",
|
4830
5000
|
"members": [
|