tccli 3.0.1146.1__py2.py3-none-any.whl → 3.0.1147.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/aiart/v20221229/api.json +2 -2
  3. tccli/services/aiart/v20221229/examples.json +4 -4
  4. tccli/services/cdb/v20170320/api.json +14 -10
  5. tccli/services/cdn/v20180606/api.json +1 -1
  6. tccli/services/goosefs/v20220519/api.json +92 -12
  7. tccli/services/iotexplorer/v20190423/api.json +1 -1
  8. tccli/services/ivld/ivld_client.py +163 -4
  9. tccli/services/ivld/v20210903/api.json +443 -0
  10. tccli/services/ivld/v20210903/examples.json +24 -0
  11. tccli/services/live/v20180801/api.json +7 -5
  12. tccli/services/lke/v20231130/examples.json +2 -2
  13. tccli/services/postgres/v20170312/api.json +7 -7
  14. tccli/services/rum/v20210622/api.json +9 -0
  15. tccli/services/tdcpg/v20211118/api.json +4 -4
  16. tccli/services/tdcpg/v20211118/examples.json +2 -2
  17. tccli/services/trtc/trtc_client.py +163 -4
  18. tccli/services/trtc/v20190722/api.json +311 -0
  19. tccli/services/trtc/v20190722/examples.json +24 -0
  20. tccli/services/tse/v20201207/api.json +19 -0
  21. tccli/services/vpc/v20170312/api.json +143 -25
  22. tccli/services/vpc/v20170312/examples.json +10 -2
  23. tccli/services/vpc/vpc_client.py +69 -16
  24. tccli/services/waf/v20180125/api.json +2 -2
  25. {tccli-3.0.1146.1.dist-info → tccli-3.0.1147.1.dist-info}/METADATA +2 -2
  26. {tccli-3.0.1146.1.dist-info → tccli-3.0.1147.1.dist-info}/RECORD +29 -29
  27. {tccli-3.0.1146.1.dist-info → tccli-3.0.1147.1.dist-info}/WHEEL +0 -0
  28. {tccli-3.0.1146.1.dist-info → tccli-3.0.1147.1.dist-info}/entry_points.txt +0 -0
  29. {tccli-3.0.1146.1.dist-info → tccli-3.0.1147.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1146.1'
1
+ __version__ = '3.0.1147.1'
@@ -15,7 +15,7 @@
15
15
  "status": "online"
16
16
  },
17
17
  "QueryDrawPortraitJob": {
18
- "document": "AI 写真提供 AI 写真形象照的训练与生成能力,分为上传训练图片、训练模型、生成图片3个环节,需要依次调用对应接口。\n每个写真模型自训练完成起1年内有效,有效期内可使用写真模型 ID 生成图片,期满后需要重新训练。\n生成图片分为提交任务和查询任务2个接口。\n- 提交生成写真图片任务:完成训练写真模型后,选择写真风格模板,提交一个生成写真图片异步任务,根据写真模型 ID 开始生成人物形象在指定风格上的写真图片,获得任务 ID。\n- 查询生成写真图片任务:根据任务 ID 查询生成图片任务的处理状态、处理结果。\n\n默认接口请求频率限制:20次/秒。",
18
+ "document": "AI 写真提供 AI 写真形象照的训练与生成能力,分为上传训练图片、训练模型、生成图片3个环节,需要依次调用对应接口。\n每个写真模型自训练完成起1年内有效,有效期内可使用写真模型 ID 生成图片,期满后需要重新训练。\n生成图片分为提交任务和查询任务2个接口。\n- 提交生成写真图片任务:完成训练写真模型后,选择写真风格模板,提交一个生成写真图片异步任务,根据写真模型 ID 开始生成人物形象在指定风格上的写真图片,获得任务 ID。\n- 查询生成写真图片任务:根据任务 ID 查询生成图片任务的处理状态、处理结果。",
19
19
  "input": "QueryDrawPortraitJobRequest",
20
20
  "name": "查询生成写真图片任务",
21
21
  "output": "QueryDrawPortraitJobResponse",
@@ -29,7 +29,7 @@
29
29
  "status": "online"
30
30
  },
31
31
  "QueryTrainPortraitModelJob": {
32
- "document": "AI 写真提供 AI 写真形象照的训练与生成能力,分为上传训练图片、训练模型、生成图片3个环节,需要依次调用对应接口。\n每个写真模型自训练完成起1年内有效,有效期内可使用写真模型 ID 生成图片,期满后需要重新训练。\n训练模型分为提交任务和查询任务2个接口。\n- 提交训练写真模型任务:完成上传训练图片后,提交一个训练写真模型异步任务,根据写真模型 ID 开始训练模型。\n- 查询训练写真模型任务:根据写真模型 ID 查询训练任务的处理状态、处理结果。\n\n默认接口请求频率限制:20次/秒。",
32
+ "document": "AI 写真提供 AI 写真形象照的训练与生成能力,分为上传训练图片、训练模型、生成图片3个环节,需要依次调用对应接口。\n每个写真模型自训练完成起1年内有效,有效期内可使用写真模型 ID 生成图片,期满后需要重新训练。\n训练模型分为提交任务和查询任务2个接口。\n- 提交训练写真模型任务:完成上传训练图片后,提交一个训练写真模型异步任务,根据写真模型 ID 开始训练模型。\n- 查询训练写真模型任务:根据写真模型 ID 查询训练任务的处理状态、处理结果。",
33
33
  "input": "QueryTrainPortraitModelJobRequest",
34
34
  "name": "查询训练写真模型任务",
35
35
  "output": "QueryTrainPortraitModelJobResponse",
@@ -19,7 +19,7 @@
19
19
  "QueryDrawPortraitJob": [
20
20
  {
21
21
  "document": "成功请求",
22
- "input": "POST / HTTP/1.1\nHost: aiart.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: QueryDrawPortraitJob\n<公共请求参数>\n\n{\n \"JobId\": \"abc\"\n}",
22
+ "input": "POST / HTTP/1.1\nHost: aiart.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: QueryDrawPortraitJob\n<公共请求参数>\n\n{\n \"JobId\": \"eascexasdfasese\"\n}",
23
23
  "output": "{\n \"Response\": {\n \"JobErrorCode\": \"\",\n \"JobErrorMsg\": \"\",\n \"JobStatusCode\": \"DONE\",\n \"JobStatusMsg\": \"处理完成\",\n \"RequestId\": \"9202070d-02bd-4848-bf54-568a2597e400\",\n \"ResultDetails\": [\n \"SUCCESS\"\n ],\n \"ResultUrls\": [\n \"https://xxx.com/a.jpg\"\n ]\n }\n}",
24
24
  "title": "成功"
25
25
  }
@@ -35,7 +35,7 @@
35
35
  "QueryTrainPortraitModelJob": [
36
36
  {
37
37
  "document": "",
38
- "input": "POST / HTTP/1.1\nHost: aiart.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: QueryTrainPortraitModelJob\n<公共请求参数>\n\n{\n \"ModelId\": \"abc\"\n}",
38
+ "input": "POST / HTTP/1.1\nHost: aiart.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: QueryTrainPortraitModelJob\n<公共请求参数>\n\n{\n \"ModelId\": \"test\"\n}",
39
39
  "output": "{\n \"Response\": {\n \"JobErrorCode\": \"\",\n \"JobErrorMsg\": \"\",\n \"JobStatusCode\": \"DONE\",\n \"JobStatusMsg\": \"处理完成\",\n \"RequestId\": \"d643c325-5fe6-4d90-880c-40516ad27f8e\"\n }\n}",
40
40
  "title": "查询成功"
41
41
  }
@@ -67,8 +67,8 @@
67
67
  "SubmitTrainPortraitModelJob": [
68
68
  {
69
69
  "document": "提交训练任务成功",
70
- "input": "POST / HTTP/1.1\nHost: aiart.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SubmitTrainPortraitModelJob\n<公共请求参数>\n\n{\n \"ModelId\": \"abc\"\n}",
71
- "output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
70
+ "input": "POST / HTTP/1.1\nHost: aiart.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SubmitTrainPortraitModelJob\n<公共请求参数>\n\n{\n \"ModelId\": \"test\"\n}",
71
+ "output": "{\n \"Response\": {\n \"RequestId\": \"5ed6909b-9b97-4924-a3f3-3b7a9b02d1-ce\"\n }\n}",
72
72
  "title": "成功提交训练任务"
73
73
  }
74
74
  ],
@@ -1189,24 +1189,28 @@
1189
1189
  "members": [
1190
1190
  {
1191
1191
  "disabled": false,
1192
- "document": "新账户的名称",
1192
+ "document": "新账户的名称\n注意:此字段可能返回 null,表示取不到有效值。",
1193
1193
  "example": "无",
1194
1194
  "member": "string",
1195
1195
  "name": "User",
1196
+ "output_required": false,
1196
1197
  "required": true,
1197
- "type": "string"
1198
+ "type": "string",
1199
+ "value_allowed_null": true
1198
1200
  },
1199
1201
  {
1200
1202
  "disabled": false,
1201
- "document": "新账户的域名",
1203
+ "document": "新账户的域名\n注意:此字段可能返回 null,表示取不到有效值。",
1202
1204
  "example": "无",
1203
1205
  "member": "string",
1204
1206
  "name": "Host",
1207
+ "output_required": false,
1205
1208
  "required": true,
1206
- "type": "string"
1209
+ "type": "string",
1210
+ "value_allowed_null": true
1207
1211
  }
1208
1212
  ],
1209
- "usage": "in"
1213
+ "usage": "both"
1210
1214
  },
1211
1215
  "AccountInfo": {
1212
1216
  "document": "账号详细信息",
@@ -7779,7 +7783,7 @@
7779
7783
  "example": "1",
7780
7784
  "member": "int64",
7781
7785
  "name": "TotalCount",
7782
- "required": true,
7786
+ "output_required": true,
7783
7787
  "type": "int",
7784
7788
  "value_allowed_null": false
7785
7789
  },
@@ -7789,7 +7793,7 @@
7789
7793
  "example": "无",
7790
7794
  "member": "AuditPolicy",
7791
7795
  "name": "Items",
7792
- "required": true,
7796
+ "output_required": true,
7793
7797
  "type": "list",
7794
7798
  "value_allowed_null": true
7795
7799
  },
@@ -8037,7 +8041,7 @@
8037
8041
  "example": "1",
8038
8042
  "member": "int64",
8039
8043
  "name": "TotalCount",
8040
- "required": true,
8044
+ "output_required": true,
8041
8045
  "type": "int",
8042
8046
  "value_allowed_null": false
8043
8047
  },
@@ -8047,7 +8051,7 @@
8047
8051
  "example": "无",
8048
8052
  "member": "AuditRule",
8049
8053
  "name": "Items",
8050
- "required": true,
8054
+ "output_required": true,
8051
8055
  "type": "list",
8052
8056
  "value_allowed_null": true
8053
8057
  },
@@ -9485,7 +9489,7 @@
9485
9489
  "example": "1",
9486
9490
  "member": "int64",
9487
9491
  "name": "IsGTIDOpen",
9488
- "required": true,
9492
+ "output_required": true,
9489
9493
  "type": "int",
9490
9494
  "value_allowed_null": false
9491
9495
  },
@@ -12627,7 +12627,7 @@
12627
12627
  },
12628
12628
  {
12629
12629
  "disabled": false,
12630
- "document": "回源协议配置\nhttp:强制 http 回源\nfollow:协议跟随回源\nhttps:强制 https 回源,https 回源时仅支持源站 443 端口\n注意:此字段可能返回 null,表示取不到有效值。",
12630
+ "document": "回源协议配置\nhttp:强制 http 回源\nfollow:协议跟随回源\nhttps:强制 https 回源\n注意:此字段可能返回 null,表示取不到有效值。",
12631
12631
  "example": "http",
12632
12632
  "member": "string",
12633
12633
  "name": "OriginPullProtocol",
@@ -310,6 +310,56 @@
310
310
  ],
311
311
  "type": "object"
312
312
  },
313
+ "ChargeAttribute": {
314
+ "document": "付费信息详情",
315
+ "members": [
316
+ {
317
+ "disabled": false,
318
+ "document": "到期时间\n注意:此字段可能返回 null,表示取不到有效值。",
319
+ "example": "2024-01-01 00:00:00",
320
+ "member": "string",
321
+ "name": "CurDeadline",
322
+ "output_required": false,
323
+ "required": false,
324
+ "type": "string",
325
+ "value_allowed_null": true
326
+ },
327
+ {
328
+ "disabled": false,
329
+ "document": "付费方式\n注意:此字段可能返回 null,表示取不到有效值。",
330
+ "example": "prePay",
331
+ "member": "string",
332
+ "name": "PayMode",
333
+ "output_required": false,
334
+ "required": false,
335
+ "type": "string",
336
+ "value_allowed_null": true
337
+ },
338
+ {
339
+ "disabled": false,
340
+ "document": "自动付费标识:0:默认未设置 1:自动续费 2 不自动续费\n注意:此字段可能返回 null,表示取不到有效值。",
341
+ "example": "0",
342
+ "member": "int64",
343
+ "name": "AutoRenewFlag",
344
+ "output_required": false,
345
+ "required": false,
346
+ "type": "int",
347
+ "value_allowed_null": true
348
+ },
349
+ {
350
+ "disabled": false,
351
+ "document": "资源ID\n注意:此字段可能返回 null,表示取不到有效值。",
352
+ "example": "100026787145_sp_cdls_goosefs_1716879810",
353
+ "member": "string",
354
+ "name": "ResourceId",
355
+ "output_required": false,
356
+ "required": false,
357
+ "type": "string",
358
+ "value_allowed_null": true
359
+ }
360
+ ],
361
+ "usage": "both"
362
+ },
313
363
  "ClientClusterManagerNodeInfo": {
314
364
  "document": "客户侧集群管理节点信息",
315
365
  "members": [
@@ -1117,6 +1167,15 @@
1117
1167
  "name": "ExpandedCapacity",
1118
1168
  "required": true,
1119
1169
  "type": "int"
1170
+ },
1171
+ {
1172
+ "disabled": false,
1173
+ "document": "容量修改类型:add/sub",
1174
+ "example": "add",
1175
+ "member": "string",
1176
+ "name": "ModifyType",
1177
+ "required": false,
1178
+ "type": "string"
1120
1179
  }
1121
1180
  ],
1122
1181
  "type": "object"
@@ -1142,7 +1201,7 @@
1142
1201
  "example": "goosefsx",
1143
1202
  "member": "string",
1144
1203
  "name": "Type",
1145
- "required": true,
1204
+ "output_required": true,
1146
1205
  "type": "string",
1147
1206
  "value_allowed_null": false
1148
1207
  },
@@ -1152,7 +1211,7 @@
1152
1211
  "example": "x_c60_r3c4fa1f",
1153
1212
  "member": "string",
1154
1213
  "name": "FileSystemId",
1155
- "required": true,
1214
+ "output_required": true,
1156
1215
  "type": "string",
1157
1216
  "value_allowed_null": false
1158
1217
  },
@@ -1162,7 +1221,7 @@
1162
1221
  "example": "2022-01-01T12:00:00+08:00",
1163
1222
  "member": "datetime_iso",
1164
1223
  "name": "CreateTime",
1165
- "required": true,
1224
+ "output_required": true,
1166
1225
  "type": "string",
1167
1226
  "value_allowed_null": false
1168
1227
  },
@@ -1172,7 +1231,7 @@
1172
1231
  "example": "无",
1173
1232
  "member": "GooseFSxAttribute",
1174
1233
  "name": "GooseFSxAttribute",
1175
- "required": true,
1234
+ "output_required": true,
1176
1235
  "type": "object",
1177
1236
  "value_allowed_null": true
1178
1237
  },
@@ -1182,7 +1241,7 @@
1182
1241
  "example": "Active",
1183
1242
  "member": "string",
1184
1243
  "name": "Status",
1185
- "required": true,
1244
+ "output_required": true,
1186
1245
  "type": "string",
1187
1246
  "value_allowed_null": false
1188
1247
  },
@@ -1192,7 +1251,7 @@
1192
1251
  "example": "ai_fs",
1193
1252
  "member": "string",
1194
1253
  "name": "Name",
1195
- "required": true,
1254
+ "output_required": true,
1196
1255
  "type": "string",
1197
1256
  "value_allowed_null": false
1198
1257
  },
@@ -1202,7 +1261,7 @@
1202
1261
  "example": "our test fs",
1203
1262
  "member": "string",
1204
1263
  "name": "Description",
1205
- "required": true,
1264
+ "output_required": true,
1206
1265
  "type": "string",
1207
1266
  "value_allowed_null": false
1208
1267
  },
@@ -1212,7 +1271,7 @@
1212
1271
  "example": "vpc-a1b2c3d4",
1213
1272
  "member": "string",
1214
1273
  "name": "VpcId",
1215
- "required": true,
1274
+ "output_required": true,
1216
1275
  "type": "string",
1217
1276
  "value_allowed_null": false
1218
1277
  },
@@ -1222,7 +1281,7 @@
1222
1281
  "example": "subnet-m1n1g1h1",
1223
1282
  "member": "string",
1224
1283
  "name": "SubnetId",
1225
- "required": true,
1284
+ "output_required": true,
1226
1285
  "type": "string",
1227
1286
  "value_allowed_null": false
1228
1287
  },
@@ -1232,7 +1291,7 @@
1232
1291
  "example": "ap-guangzhou-3",
1233
1292
  "member": "string",
1234
1293
  "name": "Zone",
1235
- "required": true,
1294
+ "output_required": true,
1236
1295
  "type": "string",
1237
1296
  "value_allowed_null": false
1238
1297
  },
@@ -1242,7 +1301,7 @@
1242
1301
  "example": "无",
1243
1302
  "member": "Tag",
1244
1303
  "name": "Tag",
1245
- "required": true,
1304
+ "output_required": true,
1246
1305
  "type": "list",
1247
1306
  "value_allowed_null": true
1248
1307
  },
@@ -1252,9 +1311,19 @@
1252
1311
  "example": "2022-01-01T12:00:00+08:00",
1253
1312
  "member": "datetime_iso",
1254
1313
  "name": "ModifyTime",
1255
- "required": true,
1314
+ "output_required": true,
1256
1315
  "type": "string",
1257
1316
  "value_allowed_null": false
1317
+ },
1318
+ {
1319
+ "disabled": false,
1320
+ "document": "文件系统付费信息\n注意:此字段可能返回 null,表示取不到有效值。",
1321
+ "example": "无",
1322
+ "member": "ChargeAttribute",
1323
+ "name": "ChargeAttribute",
1324
+ "output_required": false,
1325
+ "type": "object",
1326
+ "value_allowed_null": true
1258
1327
  }
1259
1328
  ],
1260
1329
  "usage": "out"
@@ -1474,6 +1543,17 @@
1474
1543
  "required": false,
1475
1544
  "type": "string",
1476
1545
  "value_allowed_null": true
1546
+ },
1547
+ {
1548
+ "disabled": false,
1549
+ "document": "自定义Endpoint\n注意:此字段可能返回 null,表示取不到有效值。",
1550
+ "example": "172.0.1.16",
1551
+ "member": "string",
1552
+ "name": "Endpoint",
1553
+ "output_required": false,
1554
+ "required": false,
1555
+ "type": "string",
1556
+ "value_allowed_null": true
1477
1557
  }
1478
1558
  ],
1479
1559
  "usage": "both"
@@ -6118,7 +6118,7 @@
6118
6118
  },
6119
6119
  {
6120
6120
  "disabled": false,
6121
- "document": "升级状态:\n\n- 0:设备离线。\n- 1:待处理。\n- 2:消息下发成功。\n- 3:下载中。\n- 4:烧录中。\n- 5:失败。\n- 6:升级完成。\n- 7:正在处理中。\n- 8:等待用户确认。\n- 20:下载完成。\n",
6121
+ "document": "升级状态:- 0:设备离线。- 1:待处理。- 2:消息下发成功。- 3:下载中。- 4:烧录中。- 5:失败。- 6:升级完成。- 7:正在处理中。- 8:等待用户确认。- 10:升级超时。- 20:下载完成。",
6122
6122
  "example": "无",
6123
6123
  "member": "int64",
6124
6124
  "name": "Status",
@@ -381,6 +381,58 @@ def doUpdateCustomPerson(args, parsed_globals):
381
381
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
382
382
 
383
383
 
384
+ def doDescribeVideoSummaryDetail(args, parsed_globals):
385
+ g_param = parse_global_arg(parsed_globals)
386
+
387
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
388
+ cred = credential.CVMRoleCredential()
389
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
390
+ cred = credential.STSAssumeRoleCredential(
391
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
392
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
393
+ )
394
+ 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):
395
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
396
+ else:
397
+ cred = credential.Credential(
398
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
399
+ )
400
+ http_profile = HttpProfile(
401
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
402
+ reqMethod="POST",
403
+ endpoint=g_param[OptionsDefine.Endpoint],
404
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
405
+ )
406
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
407
+ if g_param[OptionsDefine.Language]:
408
+ profile.language = g_param[OptionsDefine.Language]
409
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
410
+ client = mod.IvldClient(cred, g_param[OptionsDefine.Region], profile)
411
+ client._sdkVersion += ("_CLI_" + __version__)
412
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
413
+ model = models.DescribeVideoSummaryDetailRequest()
414
+ model.from_json_string(json.dumps(args))
415
+ start_time = time.time()
416
+ while True:
417
+ rsp = client.DescribeVideoSummaryDetail(model)
418
+ result = rsp.to_json_string()
419
+ try:
420
+ json_obj = json.loads(result)
421
+ except TypeError as e:
422
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
423
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
424
+ break
425
+ cur_time = time.time()
426
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
427
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
428
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
429
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
430
+ else:
431
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
432
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
433
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
434
+
435
+
384
436
  def doDeleteCustomCategory(args, parsed_globals):
385
437
  g_param = parse_global_arg(parsed_globals)
386
438
 
@@ -641,6 +693,58 @@ def doCreateDefaultCategories(args, parsed_globals):
641
693
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
642
694
 
643
695
 
696
+ def doCreateVideoSummaryTask(args, parsed_globals):
697
+ g_param = parse_global_arg(parsed_globals)
698
+
699
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
700
+ cred = credential.CVMRoleCredential()
701
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
702
+ cred = credential.STSAssumeRoleCredential(
703
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
704
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
705
+ )
706
+ 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):
707
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
708
+ else:
709
+ cred = credential.Credential(
710
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
711
+ )
712
+ http_profile = HttpProfile(
713
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
714
+ reqMethod="POST",
715
+ endpoint=g_param[OptionsDefine.Endpoint],
716
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
717
+ )
718
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
719
+ if g_param[OptionsDefine.Language]:
720
+ profile.language = g_param[OptionsDefine.Language]
721
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
722
+ client = mod.IvldClient(cred, g_param[OptionsDefine.Region], profile)
723
+ client._sdkVersion += ("_CLI_" + __version__)
724
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
725
+ model = models.CreateVideoSummaryTaskRequest()
726
+ model.from_json_string(json.dumps(args))
727
+ start_time = time.time()
728
+ while True:
729
+ rsp = client.CreateVideoSummaryTask(model)
730
+ result = rsp.to_json_string()
731
+ try:
732
+ json_obj = json.loads(result)
733
+ except TypeError as e:
734
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
735
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
736
+ break
737
+ cur_time = time.time()
738
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
739
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
740
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
741
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
742
+ else:
743
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
744
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
745
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
+
747
+
644
748
  def doDescribeCustomPersonDetail(args, parsed_globals):
645
749
  g_param = parse_global_arg(parsed_globals)
646
750
 
@@ -901,6 +1005,58 @@ def doDescribeMedia(args, parsed_globals):
901
1005
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
1006
 
903
1007
 
1008
+ def doCreateCustomGroup(args, parsed_globals):
1009
+ g_param = parse_global_arg(parsed_globals)
1010
+
1011
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1012
+ cred = credential.CVMRoleCredential()
1013
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1014
+ cred = credential.STSAssumeRoleCredential(
1015
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1016
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1017
+ )
1018
+ 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):
1019
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1020
+ else:
1021
+ cred = credential.Credential(
1022
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1023
+ )
1024
+ http_profile = HttpProfile(
1025
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1026
+ reqMethod="POST",
1027
+ endpoint=g_param[OptionsDefine.Endpoint],
1028
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1029
+ )
1030
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1031
+ if g_param[OptionsDefine.Language]:
1032
+ profile.language = g_param[OptionsDefine.Language]
1033
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1034
+ client = mod.IvldClient(cred, g_param[OptionsDefine.Region], profile)
1035
+ client._sdkVersion += ("_CLI_" + __version__)
1036
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1037
+ model = models.CreateCustomGroupRequest()
1038
+ model.from_json_string(json.dumps(args))
1039
+ start_time = time.time()
1040
+ while True:
1041
+ rsp = client.CreateCustomGroup(model)
1042
+ result = rsp.to_json_string()
1043
+ try:
1044
+ json_obj = json.loads(result)
1045
+ except TypeError as e:
1046
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1047
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1048
+ break
1049
+ cur_time = time.time()
1050
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1051
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1052
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1053
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1054
+ else:
1055
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1056
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1057
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1058
+
1059
+
904
1060
  def doDeleteMedia(args, parsed_globals):
905
1061
  g_param = parse_global_arg(parsed_globals)
906
1062
 
@@ -1057,7 +1213,7 @@ def doDescribeTasks(args, parsed_globals):
1057
1213
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1058
1214
 
1059
1215
 
1060
- def doCreateCustomGroup(args, parsed_globals):
1216
+ def doDescribeUsageAmount(args, parsed_globals):
1061
1217
  g_param = parse_global_arg(parsed_globals)
1062
1218
 
1063
1219
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1086,11 +1242,11 @@ def doCreateCustomGroup(args, parsed_globals):
1086
1242
  client = mod.IvldClient(cred, g_param[OptionsDefine.Region], profile)
1087
1243
  client._sdkVersion += ("_CLI_" + __version__)
1088
1244
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1089
- model = models.CreateCustomGroupRequest()
1245
+ model = models.DescribeUsageAmountRequest()
1090
1246
  model.from_json_string(json.dumps(args))
1091
1247
  start_time = time.time()
1092
1248
  while True:
1093
- rsp = client.CreateCustomGroup(model)
1249
+ rsp = client.DescribeUsageAmount(model)
1094
1250
  result = rsp.to_json_string()
1095
1251
  try:
1096
1252
  json_obj = json.loads(result)
@@ -1335,20 +1491,23 @@ ACTION_MAP = {
1335
1491
  "QueryCallback": doQueryCallback,
1336
1492
  "UpdateCustomCategory": doUpdateCustomCategory,
1337
1493
  "UpdateCustomPerson": doUpdateCustomPerson,
1494
+ "DescribeVideoSummaryDetail": doDescribeVideoSummaryDetail,
1338
1495
  "DeleteCustomCategory": doDeleteCustomCategory,
1339
1496
  "AddCustomPersonImage": doAddCustomPersonImage,
1340
1497
  "DescribeTaskDetail": doDescribeTaskDetail,
1341
1498
  "DescribeTask": doDescribeTask,
1342
1499
  "CreateDefaultCategories": doCreateDefaultCategories,
1500
+ "CreateVideoSummaryTask": doCreateVideoSummaryTask,
1343
1501
  "DescribeCustomPersonDetail": doDescribeCustomPersonDetail,
1344
1502
  "CreateCustomCategory": doCreateCustomCategory,
1345
1503
  "DescribeCustomPersons": doDescribeCustomPersons,
1346
1504
  "DeleteCustomPerson": doDeleteCustomPerson,
1347
1505
  "DescribeMedia": doDescribeMedia,
1506
+ "CreateCustomGroup": doCreateCustomGroup,
1348
1507
  "DeleteMedia": doDeleteMedia,
1349
1508
  "ModifyCallback": doModifyCallback,
1350
1509
  "DescribeTasks": doDescribeTasks,
1351
- "CreateCustomGroup": doCreateCustomGroup,
1510
+ "DescribeUsageAmount": doDescribeUsageAmount,
1352
1511
  "DescribeCustomCategories": doDescribeCustomCategories,
1353
1512
  "DeleteTask": doDeleteTask,
1354
1513
  "DescribeCustomGroup": doDescribeCustomGroup,