tccli 3.0.1206.1__py2.py3-none-any.whl → 3.0.1207.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/cbs/v20170312/api.json +5 -5
- tccli/services/cdn/v20180606/api.json +1 -1
- tccli/services/cdwch/v20200915/api.json +20 -0
- tccli/services/clb/v20180317/api.json +6 -6
- tccli/services/cvm/v20170312/examples.json +1 -1
- tccli/services/cynosdb/v20190107/api.json +84 -2
- tccli/services/cynosdb/v20190107/examples.json +1 -1
- tccli/services/dsgc/v20190723/api.json +150 -22
- tccli/services/dsgc/v20190723/examples.json +4 -4
- tccli/services/ess/v20201111/api.json +73 -15
- tccli/services/essbasic/essbasic_client.py +53 -0
- tccli/services/essbasic/v20210526/api.json +95 -2
- tccli/services/essbasic/v20210526/examples.json +8 -0
- tccli/services/iotexplorer/iotexplorer_client.py +106 -0
- tccli/services/iotexplorer/v20190423/api.json +198 -0
- tccli/services/iotexplorer/v20190423/examples.json +22 -0
- tccli/services/lke/v20231130/api.json +1 -1
- tccli/services/mongodb/v20190725/api.json +1 -1
- tccli/services/mps/mps_client.py +220 -8
- tccli/services/mps/v20190612/api.json +627 -11
- tccli/services/mps/v20190612/examples.json +40 -2
- tccli/services/oceanus/oceanus_client.py +53 -0
- tccli/services/oceanus/v20190422/api.json +88 -0
- tccli/services/oceanus/v20190422/examples.json +8 -0
- tccli/services/redis/redis_client.py +53 -0
- tccli/services/redis/v20180412/api.json +75 -8
- tccli/services/redis/v20180412/examples.json +8 -0
- tccli/services/tcss/v20201101/api.json +10 -10
- tccli/services/tms/v20201229/api.json +17 -17
- tccli/services/trtc/v20190722/api.json +23 -5
- tccli/services/waf/v20180125/api.json +655 -1
- tccli/services/waf/v20180125/examples.json +22 -0
- tccli/services/waf/waf_client.py +114 -8
- {tccli-3.0.1206.1.dist-info → tccli-3.0.1207.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1206.1.dist-info → tccli-3.0.1207.1.dist-info}/RECORD +39 -39
- {tccli-3.0.1206.1.dist-info → tccli-3.0.1207.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1206.1.dist-info → tccli-3.0.1207.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1206.1.dist-info → tccli-3.0.1207.1.dist-info}/license_files/LICENSE +0 -0
@@ -91,6 +91,13 @@
|
|
91
91
|
"output": "CreateDeviceResponse",
|
92
92
|
"status": "online"
|
93
93
|
},
|
94
|
+
"CreateExternalSourceAIServiceTask": {
|
95
|
+
"document": "创建外部视频 AI 分析任务",
|
96
|
+
"input": "CreateExternalSourceAIServiceTaskRequest",
|
97
|
+
"name": "创建外部视频AI分析任务",
|
98
|
+
"output": "CreateExternalSourceAIServiceTaskResponse",
|
99
|
+
"status": "online"
|
100
|
+
},
|
94
101
|
"CreateFenceBind": {
|
95
102
|
"document": "创建围栏绑定信息",
|
96
103
|
"input": "CreateFenceBindRequest",
|
@@ -749,6 +756,13 @@
|
|
749
756
|
"output": "InheritCloudStorageUserResponse",
|
750
757
|
"status": "online"
|
751
758
|
},
|
759
|
+
"InvokeExternalSourceAIServiceTask": {
|
760
|
+
"document": "创建外部视频 AI 分析任务",
|
761
|
+
"input": "InvokeExternalSourceAIServiceTaskRequest",
|
762
|
+
"name": "同步执行外部视频AI分析任务",
|
763
|
+
"output": "InvokeExternalSourceAIServiceTaskResponse",
|
764
|
+
"status": "online"
|
765
|
+
},
|
752
766
|
"ListEventHistory": {
|
753
767
|
"document": "获取设备的历史事件",
|
754
768
|
"input": "ListEventHistoryRequest",
|
@@ -2545,6 +2559,88 @@
|
|
2545
2559
|
],
|
2546
2560
|
"type": "object"
|
2547
2561
|
},
|
2562
|
+
"CreateExternalSourceAIServiceTaskRequest": {
|
2563
|
+
"document": "CreateExternalSourceAIServiceTask请求参数结构体",
|
2564
|
+
"members": [
|
2565
|
+
{
|
2566
|
+
"disabled": false,
|
2567
|
+
"document": "产品 ID",
|
2568
|
+
"example": "TQBDY6RPI9",
|
2569
|
+
"member": "string",
|
2570
|
+
"name": "ProductId",
|
2571
|
+
"required": true,
|
2572
|
+
"type": "string"
|
2573
|
+
},
|
2574
|
+
{
|
2575
|
+
"disabled": false,
|
2576
|
+
"document": "云存 AI 服务类型。可选值:\n- `RealtimeObjectDetect`:目标检测\n- `Highlight`:视频浓缩\n- `VideoToText`:视频语义理解",
|
2577
|
+
"example": "Highlight",
|
2578
|
+
"member": "string",
|
2579
|
+
"name": "ServiceType",
|
2580
|
+
"required": true,
|
2581
|
+
"type": "string"
|
2582
|
+
},
|
2583
|
+
{
|
2584
|
+
"disabled": false,
|
2585
|
+
"document": "分析外部传入的视频 URL 列表,支持 HLS 点播(m3u8)及常见视频格式(mp4 等)",
|
2586
|
+
"example": "[\"https://example.com/timeshift.m3u8\"]",
|
2587
|
+
"member": "string",
|
2588
|
+
"name": "VideoURLs",
|
2589
|
+
"required": true,
|
2590
|
+
"type": "list"
|
2591
|
+
},
|
2592
|
+
{
|
2593
|
+
"disabled": false,
|
2594
|
+
"document": "自定义任务 ID",
|
2595
|
+
"example": "event-123",
|
2596
|
+
"member": "string",
|
2597
|
+
"name": "CustomId",
|
2598
|
+
"required": false,
|
2599
|
+
"type": "string"
|
2600
|
+
},
|
2601
|
+
{
|
2602
|
+
"disabled": false,
|
2603
|
+
"document": "视频分析配置参数",
|
2604
|
+
"example": "{\"param1\":\"value1\"}",
|
2605
|
+
"member": "string",
|
2606
|
+
"name": "Config",
|
2607
|
+
"required": false,
|
2608
|
+
"type": "string"
|
2609
|
+
},
|
2610
|
+
{
|
2611
|
+
"disabled": false,
|
2612
|
+
"document": "视频分析识别区域",
|
2613
|
+
"example": "{}",
|
2614
|
+
"member": "string",
|
2615
|
+
"name": "ROI",
|
2616
|
+
"required": false,
|
2617
|
+
"type": "string"
|
2618
|
+
}
|
2619
|
+
],
|
2620
|
+
"type": "object"
|
2621
|
+
},
|
2622
|
+
"CreateExternalSourceAIServiceTaskResponse": {
|
2623
|
+
"document": "CreateExternalSourceAIServiceTask返回参数结构体",
|
2624
|
+
"members": [
|
2625
|
+
{
|
2626
|
+
"disabled": false,
|
2627
|
+
"document": "任务 ID",
|
2628
|
+
"example": "fb066d7a-baac-4706-acda-058f56f82759",
|
2629
|
+
"member": "string",
|
2630
|
+
"name": "TaskId",
|
2631
|
+
"output_required": true,
|
2632
|
+
"type": "string",
|
2633
|
+
"value_allowed_null": false
|
2634
|
+
},
|
2635
|
+
{
|
2636
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
2637
|
+
"member": "string",
|
2638
|
+
"name": "RequestId",
|
2639
|
+
"type": "string"
|
2640
|
+
}
|
2641
|
+
],
|
2642
|
+
"type": "object"
|
2643
|
+
},
|
2548
2644
|
"CreateFenceBindRequest": {
|
2549
2645
|
"document": "CreateFenceBind请求参数结构体",
|
2550
2646
|
"members": [
|
@@ -9972,6 +10068,108 @@
|
|
9972
10068
|
],
|
9973
10069
|
"usage": "out"
|
9974
10070
|
},
|
10071
|
+
"InvokeExternalSourceAIServiceTaskRequest": {
|
10072
|
+
"document": "InvokeExternalSourceAIServiceTask请求参数结构体",
|
10073
|
+
"members": [
|
10074
|
+
{
|
10075
|
+
"disabled": false,
|
10076
|
+
"document": "产品 ID",
|
10077
|
+
"example": "TQBDY6RPI9",
|
10078
|
+
"member": "string",
|
10079
|
+
"name": "ProductId",
|
10080
|
+
"required": true,
|
10081
|
+
"type": "string"
|
10082
|
+
},
|
10083
|
+
{
|
10084
|
+
"disabled": false,
|
10085
|
+
"document": "云存 AI 服务类型。可选值:\n- `RealtimeObjectDetect`:目标检测\n- `Highlight`:视频浓缩\n- `VideoToText`:视频语义理解",
|
10086
|
+
"example": "Highlight",
|
10087
|
+
"member": "string",
|
10088
|
+
"name": "ServiceType",
|
10089
|
+
"required": true,
|
10090
|
+
"type": "string"
|
10091
|
+
},
|
10092
|
+
{
|
10093
|
+
"disabled": false,
|
10094
|
+
"document": "分析外部传入的视频 URL 列表,支持 HLS 点播(m3u8)及常见视频格式(mp4 等)",
|
10095
|
+
"example": "[\"https://example.com/timeshift.m3u8\"]",
|
10096
|
+
"member": "string",
|
10097
|
+
"name": "VideoURLs",
|
10098
|
+
"required": true,
|
10099
|
+
"type": "list"
|
10100
|
+
},
|
10101
|
+
{
|
10102
|
+
"disabled": false,
|
10103
|
+
"document": "自定义任务 ID",
|
10104
|
+
"example": "event-123",
|
10105
|
+
"member": "string",
|
10106
|
+
"name": "CustomId",
|
10107
|
+
"required": false,
|
10108
|
+
"type": "string"
|
10109
|
+
},
|
10110
|
+
{
|
10111
|
+
"disabled": false,
|
10112
|
+
"document": "视频分析配置参数",
|
10113
|
+
"example": "{\"param1\":\"value1\"}",
|
10114
|
+
"member": "string",
|
10115
|
+
"name": "Config",
|
10116
|
+
"required": false,
|
10117
|
+
"type": "string"
|
10118
|
+
},
|
10119
|
+
{
|
10120
|
+
"disabled": false,
|
10121
|
+
"document": "视频分析识别区域",
|
10122
|
+
"example": "{}",
|
10123
|
+
"member": "string",
|
10124
|
+
"name": "ROI",
|
10125
|
+
"required": false,
|
10126
|
+
"type": "string"
|
10127
|
+
}
|
10128
|
+
],
|
10129
|
+
"type": "object"
|
10130
|
+
},
|
10131
|
+
"InvokeExternalSourceAIServiceTaskResponse": {
|
10132
|
+
"document": "InvokeExternalSourceAIServiceTask返回参数结构体",
|
10133
|
+
"members": [
|
10134
|
+
{
|
10135
|
+
"disabled": false,
|
10136
|
+
"document": "任务是否执行完成",
|
10137
|
+
"example": "true",
|
10138
|
+
"member": "bool",
|
10139
|
+
"name": "Completed",
|
10140
|
+
"output_required": true,
|
10141
|
+
"type": "bool",
|
10142
|
+
"value_allowed_null": false
|
10143
|
+
},
|
10144
|
+
{
|
10145
|
+
"disabled": false,
|
10146
|
+
"document": "任务 ID",
|
10147
|
+
"example": "fb066d7a-baac-4706-acda-058f56f82759",
|
10148
|
+
"member": "string",
|
10149
|
+
"name": "TaskId",
|
10150
|
+
"output_required": true,
|
10151
|
+
"type": "string",
|
10152
|
+
"value_allowed_null": false
|
10153
|
+
},
|
10154
|
+
{
|
10155
|
+
"disabled": false,
|
10156
|
+
"document": "任务信息\n注意:此字段可能返回 null,表示取不到有效值。",
|
10157
|
+
"example": "无",
|
10158
|
+
"member": "CloudStorageAIServiceTask",
|
10159
|
+
"name": "TaskInfo",
|
10160
|
+
"output_required": true,
|
10161
|
+
"type": "object",
|
10162
|
+
"value_allowed_null": true
|
10163
|
+
},
|
10164
|
+
{
|
10165
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
10166
|
+
"member": "string",
|
10167
|
+
"name": "RequestId",
|
10168
|
+
"type": "string"
|
10169
|
+
}
|
10170
|
+
],
|
10171
|
+
"type": "object"
|
10172
|
+
},
|
9975
10173
|
"ListEventHistoryRequest": {
|
9976
10174
|
"document": "ListEventHistory请求参数结构体",
|
9977
10175
|
"members": [
|
@@ -176,6 +176,14 @@
|
|
176
176
|
"title": "创建手动指定psk的设备"
|
177
177
|
}
|
178
178
|
],
|
179
|
+
"CreateExternalSourceAIServiceTask": [
|
180
|
+
{
|
181
|
+
"document": "",
|
182
|
+
"input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateExternalSourceAIServiceTask\n<公共请求参数>\n\n{\n \"ProductId\": \"TQBDY6RPI9\",\n \"ServiceType\": \"Highlight\",\n \"VideoURLs\": [\n \"https://example.com/video.mp4\"\n ],\n \"Config\": \"{}\"\n}",
|
183
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"c497cdcb-8eaf-46b0-8850-311cfb278798\",\n \"TaskId\": \"fb066d7a-baac-4706-acda-058f56f82759\"\n }\n}",
|
184
|
+
"title": "创建外部视频 AI 分析任务"
|
185
|
+
}
|
186
|
+
],
|
179
187
|
"CreateFenceBind": [
|
180
188
|
{
|
181
189
|
"document": "创建围栏绑定信息",
|
@@ -934,6 +942,20 @@
|
|
934
942
|
"title": "继承云存用户"
|
935
943
|
}
|
936
944
|
],
|
945
|
+
"InvokeExternalSourceAIServiceTask": [
|
946
|
+
{
|
947
|
+
"document": "",
|
948
|
+
"input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: InvokeExternalSourceAIServiceTask\n<公共请求参数>\n\n{\n \"ProductId\": \"TQBDY6RPI9\",\n \"ServiceType\": \"Highlight\",\n \"VideoURLs\": [\n \"https://example.com/video.mp4\"\n ],\n \"Config\": \"{}\"\n}",
|
949
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"8b490930-d119-4ee2-963c-c58973a1ebe6\",\n \"Completed\": true,\n \"TaskId\": \"c31aa4f2-08c9-4088-9603-186d7311fdd8\",\n \"TaskInfo\": {\n \"ChannelId\": 0,\n \"CreateTime\": 1714240802,\n \"DeviceName\": \"dev001\",\n \"EndTime\": 1714233600,\n \"Files\": [\n \"output.mp4\"\n ],\n \"ProductId\": \"TSLFHRWDSD\",\n \"Result\": \"\",\n \"ServiceType\": \"Highlight\",\n \"StartTime\": 1714147200,\n \"Status\": 3,\n \"TaskId\": \"c31aa4f2-08c9-4088-9603-186d7311fdd8\",\n \"UpdateTime\": 1714240802\n }\n }\n}",
|
950
|
+
"title": "创建外部视频 AI 分析任务(执行成功)"
|
951
|
+
},
|
952
|
+
{
|
953
|
+
"document": "",
|
954
|
+
"input": "POST / HTTP/1.1\nHost: iotexplorer.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: InvokeExternalSourceAIServiceTask\n<公共请求参数>\n\n{\n \"ProductId\": \"TQBDY6RPI9\",\n \"ServiceType\": \"Highlight\",\n \"VideoURLs\": [\n \"https://example.com/video.mp4\"\n ],\n \"Config\": \"{}\"\n}",
|
955
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"8b490930-d119-4ee2-963c-c58973a1ebe6\",\n \"Completed\": false,\n \"TaskId\": \"c31aa4f2-08c9-4088-9603-186d7311fdd8\",\n \"TaskInfo\": {\n \"ChannelId\": 0,\n \"CreateTime\": 1714240802,\n \"DeviceName\": \"dev001\",\n \"EndTime\": 1714233600,\n \"Files\": [],\n \"ProductId\": \"TSLFHRWDSD\",\n \"Result\": \"\",\n \"ServiceType\": \"Highlight\",\n \"StartTime\": 1714147200,\n \"Status\": 4,\n \"TaskId\": \"c31aa4f2-08c9-4088-9603-186d7311fdd8\",\n \"UpdateTime\": 1714240802\n }\n }\n}",
|
956
|
+
"title": "创建外部视频 AI 分析任务(超时未完成,转异步)"
|
957
|
+
}
|
958
|
+
],
|
937
959
|
"ListEventHistory": [
|
938
960
|
{
|
939
961
|
"document": "用于查询设备上报的所有类型历史事件信息",
|
@@ -3158,7 +3158,7 @@
|
|
3158
3158
|
},
|
3159
3159
|
{
|
3160
3160
|
"disabled": false,
|
3161
|
-
"document": "
|
3161
|
+
"document": "文档状态: 1-未生成 2-生成中 3-生成成功 4-生成失败 5-删除中 6-删除成功 7-审核中 8-审核失败 9-审核成功 10-待发布 11-发布中 12-已发布 13-学习中 14-学习失败 15-更新中 16-更新失败 17-解析中 18-解析失败 19-导入失败 20-已过期 21-超量失效 22-超量失效恢复",
|
3162
3162
|
"example": "无",
|
3163
3163
|
"member": "int64",
|
3164
3164
|
"name": "Status",
|
@@ -1497,7 +1497,7 @@
|
|
1497
1497
|
},
|
1498
1498
|
{
|
1499
1499
|
"disabled": false,
|
1500
|
-
"document": "
|
1500
|
+
"document": "若多可用区部署云数据库实例,指定多可用区列表。\n- 多可用区部署实例,参数 **Zone** 指定实例主可用区信息;**AvailabilityZoneList** 指定所有可用区信息,包含主可用区。输入格式如:[ap-guangzhou-2,ap-guangzhou-3,ap-guangzhou-4]。\n- 通过接口 [DescribeSpecInfo](https://cloud.tencent.com/document/product/240/38567) 可获取云数据库不同地域规划的可用区信息,以便指定有效的可用区。\n- 多可用区部署节点只能部署在3个不同可用区。不支持将集群的大多数节点部署在同一个可用区。例如:3节点集群不支持2个节点部署在同一个区。",
|
1501
1501
|
"example": "无",
|
1502
1502
|
"member": "string",
|
1503
1503
|
"name": "AvailabilityZoneList",
|
tccli/services/mps/mps_client.py
CHANGED
@@ -1837,6 +1837,58 @@ def doDescribeMediaMetaData(args, parsed_globals):
|
|
1837
1837
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1838
1838
|
|
1839
1839
|
|
1840
|
+
def doDescribeVideoSearchTaskDetail(args, parsed_globals):
|
1841
|
+
g_param = parse_global_arg(parsed_globals)
|
1842
|
+
|
1843
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1844
|
+
cred = credential.CVMRoleCredential()
|
1845
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1846
|
+
cred = credential.STSAssumeRoleCredential(
|
1847
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1848
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1849
|
+
)
|
1850
|
+
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):
|
1851
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1852
|
+
else:
|
1853
|
+
cred = credential.Credential(
|
1854
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1855
|
+
)
|
1856
|
+
http_profile = HttpProfile(
|
1857
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1858
|
+
reqMethod="POST",
|
1859
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1860
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1861
|
+
)
|
1862
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1863
|
+
if g_param[OptionsDefine.Language]:
|
1864
|
+
profile.language = g_param[OptionsDefine.Language]
|
1865
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1866
|
+
client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
|
1867
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1868
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1869
|
+
model = models.DescribeVideoSearchTaskDetailRequest()
|
1870
|
+
model.from_json_string(json.dumps(args))
|
1871
|
+
start_time = time.time()
|
1872
|
+
while True:
|
1873
|
+
rsp = client.DescribeVideoSearchTaskDetail(model)
|
1874
|
+
result = rsp.to_json_string()
|
1875
|
+
try:
|
1876
|
+
json_obj = json.loads(result)
|
1877
|
+
except TypeError as e:
|
1878
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1879
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1880
|
+
break
|
1881
|
+
cur_time = time.time()
|
1882
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1883
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1884
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1885
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1886
|
+
else:
|
1887
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1888
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1889
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1890
|
+
|
1891
|
+
|
1840
1892
|
def doModifySampleSnapshotTemplate(args, parsed_globals):
|
1841
1893
|
g_param = parse_global_arg(parsed_globals)
|
1842
1894
|
|
@@ -3345,7 +3397,7 @@ def doDescribeStreamLinkActivateState(args, parsed_globals):
|
|
3345
3397
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3346
3398
|
|
3347
3399
|
|
3348
|
-
def
|
3400
|
+
def doCreateImageSpriteTemplate(args, parsed_globals):
|
3349
3401
|
g_param = parse_global_arg(parsed_globals)
|
3350
3402
|
|
3351
3403
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3374,11 +3426,11 @@ def doCreateWatermarkTemplate(args, parsed_globals):
|
|
3374
3426
|
client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
|
3375
3427
|
client._sdkVersion += ("_CLI_" + __version__)
|
3376
3428
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3377
|
-
model = models.
|
3429
|
+
model = models.CreateImageSpriteTemplateRequest()
|
3378
3430
|
model.from_json_string(json.dumps(args))
|
3379
3431
|
start_time = time.time()
|
3380
3432
|
while True:
|
3381
|
-
rsp = client.
|
3433
|
+
rsp = client.CreateImageSpriteTemplate(model)
|
3382
3434
|
result = rsp.to_json_string()
|
3383
3435
|
try:
|
3384
3436
|
json_obj = json.loads(result)
|
@@ -3605,6 +3657,58 @@ def doDescribeAnimatedGraphicsTemplates(args, parsed_globals):
|
|
3605
3657
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3606
3658
|
|
3607
3659
|
|
3660
|
+
def doCreateVideoSearchTask(args, parsed_globals):
|
3661
|
+
g_param = parse_global_arg(parsed_globals)
|
3662
|
+
|
3663
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3664
|
+
cred = credential.CVMRoleCredential()
|
3665
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3666
|
+
cred = credential.STSAssumeRoleCredential(
|
3667
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3668
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3669
|
+
)
|
3670
|
+
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):
|
3671
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3672
|
+
else:
|
3673
|
+
cred = credential.Credential(
|
3674
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3675
|
+
)
|
3676
|
+
http_profile = HttpProfile(
|
3677
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3678
|
+
reqMethod="POST",
|
3679
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3680
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3681
|
+
)
|
3682
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3683
|
+
if g_param[OptionsDefine.Language]:
|
3684
|
+
profile.language = g_param[OptionsDefine.Language]
|
3685
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3686
|
+
client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
|
3687
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3688
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3689
|
+
model = models.CreateVideoSearchTaskRequest()
|
3690
|
+
model.from_json_string(json.dumps(args))
|
3691
|
+
start_time = time.time()
|
3692
|
+
while True:
|
3693
|
+
rsp = client.CreateVideoSearchTask(model)
|
3694
|
+
result = rsp.to_json_string()
|
3695
|
+
try:
|
3696
|
+
json_obj = json.loads(result)
|
3697
|
+
except TypeError as e:
|
3698
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3699
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3700
|
+
break
|
3701
|
+
cur_time = time.time()
|
3702
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3703
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3704
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3705
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3706
|
+
else:
|
3707
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3708
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3709
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3710
|
+
|
3711
|
+
|
3608
3712
|
def doManageTask(args, parsed_globals):
|
3609
3713
|
g_param = parse_global_arg(parsed_globals)
|
3610
3714
|
|
@@ -3657,6 +3761,58 @@ def doManageTask(args, parsed_globals):
|
|
3657
3761
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3658
3762
|
|
3659
3763
|
|
3764
|
+
def doDescribeVideoDatabaseEntryTaskDetail(args, parsed_globals):
|
3765
|
+
g_param = parse_global_arg(parsed_globals)
|
3766
|
+
|
3767
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3768
|
+
cred = credential.CVMRoleCredential()
|
3769
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3770
|
+
cred = credential.STSAssumeRoleCredential(
|
3771
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3772
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3773
|
+
)
|
3774
|
+
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):
|
3775
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3776
|
+
else:
|
3777
|
+
cred = credential.Credential(
|
3778
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3779
|
+
)
|
3780
|
+
http_profile = HttpProfile(
|
3781
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3782
|
+
reqMethod="POST",
|
3783
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3784
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3785
|
+
)
|
3786
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3787
|
+
if g_param[OptionsDefine.Language]:
|
3788
|
+
profile.language = g_param[OptionsDefine.Language]
|
3789
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3790
|
+
client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
|
3791
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3792
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3793
|
+
model = models.DescribeVideoDatabaseEntryTaskDetailRequest()
|
3794
|
+
model.from_json_string(json.dumps(args))
|
3795
|
+
start_time = time.time()
|
3796
|
+
while True:
|
3797
|
+
rsp = client.DescribeVideoDatabaseEntryTaskDetail(model)
|
3798
|
+
result = rsp.to_json_string()
|
3799
|
+
try:
|
3800
|
+
json_obj = json.loads(result)
|
3801
|
+
except TypeError as e:
|
3802
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3803
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3804
|
+
break
|
3805
|
+
cur_time = time.time()
|
3806
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3807
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3808
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3809
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3810
|
+
else:
|
3811
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3812
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3813
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3814
|
+
|
3815
|
+
|
3660
3816
|
def doModifySnapshotByTimeOffsetTemplate(args, parsed_globals):
|
3661
3817
|
g_param = parse_global_arg(parsed_globals)
|
3662
3818
|
|
@@ -4073,7 +4229,7 @@ def doDescribeWatermarkTemplates(args, parsed_globals):
|
|
4073
4229
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4074
4230
|
|
4075
4231
|
|
4076
|
-
def
|
4232
|
+
def doCreateWatermarkTemplate(args, parsed_globals):
|
4077
4233
|
g_param = parse_global_arg(parsed_globals)
|
4078
4234
|
|
4079
4235
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4102,11 +4258,11 @@ def doCreateImageSpriteTemplate(args, parsed_globals):
|
|
4102
4258
|
client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
|
4103
4259
|
client._sdkVersion += ("_CLI_" + __version__)
|
4104
4260
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4105
|
-
model = models.
|
4261
|
+
model = models.CreateWatermarkTemplateRequest()
|
4106
4262
|
model.from_json_string(json.dumps(args))
|
4107
4263
|
start_time = time.time()
|
4108
4264
|
while True:
|
4109
|
-
rsp = client.
|
4265
|
+
rsp = client.CreateWatermarkTemplate(model)
|
4110
4266
|
result = rsp.to_json_string()
|
4111
4267
|
try:
|
4112
4268
|
json_obj = json.loads(result)
|
@@ -4645,6 +4801,58 @@ def doEnableSchedule(args, parsed_globals):
|
|
4645
4801
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4646
4802
|
|
4647
4803
|
|
4804
|
+
def doCreateVideoDatabaseEntryTask(args, parsed_globals):
|
4805
|
+
g_param = parse_global_arg(parsed_globals)
|
4806
|
+
|
4807
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4808
|
+
cred = credential.CVMRoleCredential()
|
4809
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4810
|
+
cred = credential.STSAssumeRoleCredential(
|
4811
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4812
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4813
|
+
)
|
4814
|
+
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):
|
4815
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4816
|
+
else:
|
4817
|
+
cred = credential.Credential(
|
4818
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4819
|
+
)
|
4820
|
+
http_profile = HttpProfile(
|
4821
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4822
|
+
reqMethod="POST",
|
4823
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4824
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4825
|
+
)
|
4826
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4827
|
+
if g_param[OptionsDefine.Language]:
|
4828
|
+
profile.language = g_param[OptionsDefine.Language]
|
4829
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4830
|
+
client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
|
4831
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4832
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4833
|
+
model = models.CreateVideoDatabaseEntryTaskRequest()
|
4834
|
+
model.from_json_string(json.dumps(args))
|
4835
|
+
start_time = time.time()
|
4836
|
+
while True:
|
4837
|
+
rsp = client.CreateVideoDatabaseEntryTask(model)
|
4838
|
+
result = rsp.to_json_string()
|
4839
|
+
try:
|
4840
|
+
json_obj = json.loads(result)
|
4841
|
+
except TypeError as e:
|
4842
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4843
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4844
|
+
break
|
4845
|
+
cur_time = time.time()
|
4846
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4847
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4848
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4849
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4850
|
+
else:
|
4851
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4852
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4853
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4854
|
+
|
4855
|
+
|
4648
4856
|
def doProcessLiveStream(args, parsed_globals):
|
4649
4857
|
g_param = parse_global_arg(parsed_globals)
|
4650
4858
|
|
@@ -5471,6 +5679,7 @@ ACTION_MAP = {
|
|
5471
5679
|
"DeleteAIAnalysisTemplate": doDeleteAIAnalysisTemplate,
|
5472
5680
|
"ModifySchedule": doModifySchedule,
|
5473
5681
|
"DescribeMediaMetaData": doDescribeMediaMetaData,
|
5682
|
+
"DescribeVideoSearchTaskDetail": doDescribeVideoSearchTaskDetail,
|
5474
5683
|
"ModifySampleSnapshotTemplate": doModifySampleSnapshotTemplate,
|
5475
5684
|
"ResetWorkflow": doResetWorkflow,
|
5476
5685
|
"DeleteQualityControlTemplate": doDeleteQualityControlTemplate,
|
@@ -5500,12 +5709,14 @@ ACTION_MAP = {
|
|
5500
5709
|
"ModifyWatermarkTemplate": doModifyWatermarkTemplate,
|
5501
5710
|
"DeleteWordSamples": doDeleteWordSamples,
|
5502
5711
|
"DescribeStreamLinkActivateState": doDescribeStreamLinkActivateState,
|
5503
|
-
"
|
5712
|
+
"CreateImageSpriteTemplate": doCreateImageSpriteTemplate,
|
5504
5713
|
"DescribePersonSamples": doDescribePersonSamples,
|
5505
5714
|
"ParseNotification": doParseNotification,
|
5506
5715
|
"DeleteAIRecognitionTemplate": doDeleteAIRecognitionTemplate,
|
5507
5716
|
"DescribeAnimatedGraphicsTemplates": doDescribeAnimatedGraphicsTemplates,
|
5717
|
+
"CreateVideoSearchTask": doCreateVideoSearchTask,
|
5508
5718
|
"ManageTask": doManageTask,
|
5719
|
+
"DescribeVideoDatabaseEntryTaskDetail": doDescribeVideoDatabaseEntryTaskDetail,
|
5509
5720
|
"ModifySnapshotByTimeOffsetTemplate": doModifySnapshotByTimeOffsetTemplate,
|
5510
5721
|
"BatchStartStreamLinkFlow": doBatchStartStreamLinkFlow,
|
5511
5722
|
"CreateWorkflow": doCreateWorkflow,
|
@@ -5514,7 +5725,7 @@ ACTION_MAP = {
|
|
5514
5725
|
"ModifyWordSample": doModifyWordSample,
|
5515
5726
|
"DescribeImageSpriteTemplates": doDescribeImageSpriteTemplates,
|
5516
5727
|
"DescribeWatermarkTemplates": doDescribeWatermarkTemplates,
|
5517
|
-
"
|
5728
|
+
"CreateWatermarkTemplate": doCreateWatermarkTemplate,
|
5518
5729
|
"ModifyStreamLinkOutputInfo": doModifyStreamLinkOutputInfo,
|
5519
5730
|
"DescribeContentReviewTemplates": doDescribeContentReviewTemplates,
|
5520
5731
|
"WithdrawsWatermark": doWithdrawsWatermark,
|
@@ -5525,6 +5736,7 @@ ACTION_MAP = {
|
|
5525
5736
|
"DeletePersonSample": doDeletePersonSample,
|
5526
5737
|
"ParseLiveStreamProcessNotification": doParseLiveStreamProcessNotification,
|
5527
5738
|
"EnableSchedule": doEnableSchedule,
|
5739
|
+
"CreateVideoDatabaseEntryTask": doCreateVideoDatabaseEntryTask,
|
5528
5740
|
"ProcessLiveStream": doProcessLiveStream,
|
5529
5741
|
"DeleteSampleSnapshotTemplate": doDeleteSampleSnapshotTemplate,
|
5530
5742
|
"DescribeStreamLinkFlowMediaStatistics": doDescribeStreamLinkFlowMediaStatistics,
|