tccli 3.0.1313.1__py2.py3-none-any.whl → 3.0.1315.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.
@@ -19,7 +19,7 @@
19
19
  "CreateAutoSnapshotPolicy": [
20
20
  {
21
21
  "document": "创建文件系统快照策略",
22
- "input": "POST / HTTP/1.1\nHost: cfs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateAutoSnapshotPolicy\n<公共请求参数>\n\n{\n \"DayOfWeek\": \"\\\"1,2\\\"\",\n \"Hour\": \"\\\"2,3\\\"\"\n}",
22
+ "input": "POST / HTTP/1.1\nHost: cfs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateAutoSnapshotPolicy\n<公共请求参数>\n\n{\n \"DayOfWeek\": \"1,2\",\n \"Hour\": \"2,4\"\n}",
23
23
  "output": "{\n \"Response\": {\n \"RequestId\": \"fjo8aejo-fjei-32eu-2je9-fhue83nd81\",\n \"AutoSnapshotPolicyId\": \"asp-12345\"\n }\n}",
24
24
  "title": "创建文件系统快照策略"
25
25
  }
@@ -43,7 +43,7 @@
43
43
  "CreateCfsRule": [
44
44
  {
45
45
  "document": "",
46
- "input": "POST / HTTP/1.1\nHost: cfs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateCfsRule\n<公共请求参数>\n\n{\n \"RWPermission\": \"rw\",\n \"AuthClientIp\": \"10.1.1.10\",\n \"PGroupId\": \"pgroup-12345\",\n \"Priority\": \"9\",\n \"UserPermission\": \"root_squash\"\n}",
46
+ "input": "POST / HTTP/1.1\nHost: cfs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateCfsRule\n<公共请求参数>\n\n{\n \"RWPermission\": \"rw\",\n \"AuthClientIp\": \"10.1.1.10\",\n \"PGroupId\": \"pgroup-12345\",\n \"Priority\": 9,\n \"UserPermission\": \"root_squash\"\n}",
47
47
  "output": "{\n \"Response\": {\n \"RequestId\": \"fjo8aejo-fjei-32eu-2je9-fhue83nd81\",\n \"RuleId\": \"rule-12345\",\n \"PGroupId\": \"pgroup-12345\",\n \"AuthClientIp\": \"10.1.1.10\",\n \"RWPermission\": \"rw\",\n \"UserPermission\": \"root_squash\",\n \"Priority\": 9\n }\n}",
48
48
  "title": "创建权限组规则"
49
49
  }
@@ -51,7 +51,7 @@
51
51
  "CreateCfsSnapshot": [
52
52
  {
53
53
  "document": "",
54
- "input": "https://cfs.tencentcloudapi.com/?Action=CreateCfsSnapshot\n&FileSystemId=cfs-abcdefgh\n&SnapshotName=test\n&<公共请求参数>",
54
+ "input": "https://cfs.tencentcloudapi.com/?Action=CreateCfsSnapshot\n&FileSystemId=cfs-abcdefgh\n&SnapshotName=defaulsnapshot\n&<公共请求参数>",
55
55
  "output": "{\n \"Response\": {\n \"RequestId\": \"fjo8aejo-fjei-32eu-2je9-fhue83nd81\",\n \"SnapshotId\": \"snapcfs-abababb\"\n }\n}",
56
56
  "title": "创建文件系统快照"
57
57
  }
@@ -76,7 +76,7 @@
76
76
  {
77
77
  "document": "",
78
78
  "input": "POST / HTTP/1.1\nHost: cfs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteCfsFileSystem\n<公共请求参数>\n\n{\n \"FileSystemId\": \"cfs-12345\"\n}",
79
- "output": "{\n \"Response\": {\n \"RequestId\": \"xxxx\"\n }\n}",
79
+ "output": "{\n \"Response\": {\n \"RequestId\": \"fjo8aejo-fjei-32eu-2je9-fhue83nd81\"\n }\n}",
80
80
  "title": "删除文件系统"
81
81
  }
82
82
  ],
@@ -98,7 +98,7 @@
98
98
  ],
99
99
  "DeleteCfsSnapshot": [
100
100
  {
101
- "document": "",
101
+ "document": "删除快照的场景",
102
102
  "input": "POST / HTTP/1.1\nHost: cfs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteCfsSnapshot\n<公共请求参数>\n\n{\n \"SnapshotId\": \"snapcfs-12345\"\n}",
103
103
  "output": "{\n \"Response\": {\n \"RequestId\": \"fjo8aejo-fjei-32eu-2je9-fhue83nd81\",\n \"SnapshotId\": \"snapcfs-12345\"\n }\n}",
104
104
  "title": "删除快照"
@@ -164,7 +164,7 @@
164
164
  {
165
165
  "document": "查询文件系统",
166
166
  "input": "POST / HTTP/1.1\nHost: cfs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCfsFileSystems\n<公共请求参数>\n\n{\n \"FileSystemId\": \"cfs-318f2b7ba\"\n}",
167
- "output": "{\n \"Response\": {\n \"FileSystems\": [\n {\n \"AppId\": 1300275735,\n \"AutoScaleUpRule\": null,\n \"AutoSnapshotPolicyId\": \"\",\n \"BandwidthLimit\": 100,\n \"BandwidthResourcePkg\": \"\",\n \"Capacity\": 2097152,\n \"CreationTime\": \"2024-07-09 10:52:35\",\n \"CreationToken\": \"denny-test-003\",\n \"Encrypted\": false,\n \"FileSystemId\": \"cfs-318f2b7ba\",\n \"FsName\": \"denny-test-003\",\n \"KmsKeyId\": \"\",\n \"LifeCycleState\": \"available\",\n \"PGroup\": {\n \"Name\": \"默认权限组\",\n \"PGroupId\": \"pgroupbasic\"\n },\n \"Protocol\": \"NFS\",\n \"SizeByte\": 0,\n \"SizeLimit\": 1000000,\n \"SnapStatus\": \"normal\",\n \"StorageResourcePkg\": \"\",\n \"StorageType\": \"SD\",\n \"Tags\": [],\n \"TieringDetail\": {\n \"SecondaryTieringSizeInBytes\": -1,\n \"TieringSizeInBytes\": -1\n },\n \"TieringState\": \"NotAvailable\",\n \"Zone\": \"ap-guangzhou-2\",\n \"ZoneId\": 100002\n }\n ],\n \"RequestId\": \"8edb5b83-6bd2-4f0a-8ee9-d8ee96fff8dc\",\n \"TotalCount\": 1\n }\n}",
167
+ "output": "{\n \"Response\": {\n \"FileSystems\": [\n {\n \"AppId\": 1300275735,\n \"AutoScaleUpRule\": {\n \"ScaleThreshold\": 80,\n \"TargetThreshold\": 70,\n \"Status\": \"open\"\n },\n \"AutoSnapshotPolicyId\": \"\",\n \"BandwidthLimit\": 100,\n \"BandwidthResourcePkg\": \"\",\n \"Capacity\": 2097152,\n \"CreationTime\": \"2024-07-09 10:52:35\",\n \"CreationToken\": \"denny-test-003\",\n \"Encrypted\": false,\n \"FileSystemId\": \"cfs-318f2b7ba\",\n \"FsName\": \"denny-test-003\",\n \"KmsKeyId\": \"\",\n \"LifeCycleState\": \"available\",\n \"PGroup\": {\n \"Name\": \"默认权限组\",\n \"PGroupId\": \"pgroupbasic\"\n },\n \"Protocol\": \"NFS\",\n \"SizeByte\": 0,\n \"SizeLimit\": 1000000,\n \"SnapStatus\": \"normal\",\n \"StorageResourcePkg\": \"\",\n \"StorageType\": \"SD\",\n \"Tags\": [],\n \"TieringDetail\": {\n \"SecondaryTieringSizeInBytes\": -1,\n \"TieringSizeInBytes\": -1\n },\n \"TieringState\": \"NotAvailable\",\n \"Zone\": \"ap-guangzhou-2\",\n \"ZoneId\": 100002\n }\n ],\n \"RequestId\": \"8edb5b83-6bd2-4f0a-8ee9-d8ee96fff8dc\",\n \"TotalCount\": 1\n }\n}",
168
168
  "title": "查询文件系统"
169
169
  }
170
170
  ],
@@ -337,7 +337,7 @@
337
337
  "UpdateCfsRule": [
338
338
  {
339
339
  "document": "",
340
- "input": "POST / HTTP/1.1\nHost: cfs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateCfsRule\n<公共请求参数>\n\n{\n \"RWPermission\": \"rw\",\n \"Priority\": \"7\",\n \"PGroupId\": \"pgroup-12345\",\n \"RuleId\": \"rule-12345\",\n \"AuthClientIp\": \"10.0.0.10\",\n \"UserPermission\": \"no_root_squash\"\n}",
340
+ "input": "POST / HTTP/1.1\nHost: cfs.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateCfsRule\n<公共请求参数>\n\n{\n \"RWPermission\": \"rw\",\n \"Priority\": 7,\n \"PGroupId\": \"pgroup-12345\",\n \"RuleId\": \"rule-12345\",\n \"AuthClientIp\": \"10.0.0.10\",\n \"UserPermission\": \"no_root_squash\"\n}",
341
341
  "output": "{\n \"Response\": {\n \"RequestId\": \"fjo8aejo-fjei-32eu-2je9-fhue83nd81\",\n \"PGroupId\": \"pgroup-12345\",\n \"RuleId\": \"rule-12345\",\n \"AuthClientIp\": \"10.0.0.10\",\n \"RWPermission\": \"rw\",\n \"UserPermission\": \"no_root_squash\",\n \"Priority\": 7\n }\n}",
342
342
  "title": "更新权限组规则"
343
343
  }
@@ -15,7 +15,7 @@
15
15
  "status": "online"
16
16
  },
17
17
  "AssociateTargetGroups": {
18
- "document": "本接口(AssociateTargetGroups)用来将目标组绑定到负载均衡的监听器(四层协议)或转发规则(七层协议)上。\n本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 [DescribeTaskStatus](https://cloud.tencent.com/document/product/214/30683) 接口查询本次任务是否成功。\n限制说明:\n- 四层监听器绑定旧版目标组需要监听器开启后端目标组。\n- 七层绑定目标组,数据结构 TargetGroupAssosication 中 LocationId 为必填项。\n- 负载均衡的 VPC 需要和目标组的 VPC 一致。",
18
+ "document": "本接口(AssociateTargetGroups)用来将目标组绑定到负载均衡的监听器(四层协议)或转发规则(七层协议)上。\n本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 [DescribeTaskStatus](https://cloud.tencent.com/document/product/214/30683) 接口查询本次任务是否成功。\n限制说明:\n- 四层监听器绑定旧版目标组需要监听器开启后端目标组。\n- 七层绑定目标组,数据结构 TargetGroupAssociation 中 LocationId 为必填项。\n- 负载均衡的 VPC 需要和目标组的 VPC 一致。",
19
19
  "input": "AssociateTargetGroupsRequest",
20
20
  "name": "规则关联目标组",
21
21
  "output": "AssociateTargetGroupsResponse",
@@ -4767,7 +4767,7 @@
4767
4767
  "members": [
4768
4768
  {
4769
4769
  "disabled": false,
4770
- "document": "返回数量,默认为20,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。",
4770
+ "document": "返回数量,最大值为100。关于`Limit`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。",
4771
4771
  "example": "20",
4772
4772
  "member": "int64",
4773
4773
  "name": "Limit",
@@ -4776,7 +4776,7 @@
4776
4776
  },
4777
4777
  {
4778
4778
  "disabled": false,
4779
- "document": "偏移量,默认为0。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。",
4779
+ "document": "偏移量。关于`Offset`的更进一步介绍请参考 API [简介](https://cloud.tencent.com/document/api/213/15688)中的相关小节。",
4780
4780
  "example": "0",
4781
4781
  "member": "int64",
4782
4782
  "name": "Offset",
@@ -4821,7 +4821,7 @@
4821
4821
  },
4822
4822
  {
4823
4823
  "disabled": false,
4824
- "document": "按照一个或者多个实例ID查询。实例ID形如:`ins-xxxxxxxx`。",
4824
+ "document": "按照一个或者多个实例ID查询。实例ID形如:`ins-xxxxxxxx`,可通过 [DescribeInstances](https://cloud.tencent.com/document/api/213/15728) 接口返回值中的`InstanceId`获取。",
4825
4825
  "example": "[\"ins-xxxxxxxx\"]",
4826
4826
  "member": "string",
4827
4827
  "name": "InstanceIds",
@@ -4839,7 +4839,7 @@
4839
4839
  },
4840
4840
  {
4841
4841
  "disabled": false,
4842
- "document": "时间查询区间的起始位置,会根据任务创建时间`CreateTime`进行过滤。未传入时默认为当天`00:00:00`。",
4842
+ "document": "时间查询区间的起始位置,会根据任务创建时间`CreateTime`进行过滤,格式为`YYYY-MM-DD hh:mm:ss`。未传入时默认为当天`00:00:00`。",
4843
4843
  "example": "2023-01-01 00:00:00",
4844
4844
  "member": "datetime",
4845
4845
  "name": "StartDate",
@@ -4848,7 +4848,7 @@
4848
4848
  },
4849
4849
  {
4850
4850
  "disabled": false,
4851
- "document": "时间查询区间的终止位置,会根据任务创建时间`CreateTime`进行过滤。未传入时默认为当前时刻。",
4851
+ "document": "时间查询区间的终止位置,会根据任务创建时间`CreateTime`进行过滤,格式为`YYYY-MM-DD hh:mm:ss`。未传入时默认为当前时刻。",
4852
4852
  "example": "2023-02-01 00:00:00",
4853
4853
  "member": "datetime",
4854
4854
  "name": "EndDate",
@@ -10537,7 +10537,7 @@
10537
10537
  },
10538
10538
  {
10539
10539
  "disabled": false,
10540
- "document": "指定待操作的实例ID列表,仅允许对列表中的实例ID相关的维修任务发起授权。",
10540
+ "document": "指定待操作的实例ID列表,仅允许对列表中的实例ID相关的维修任务发起授权,可通过 [DescribeTaskInfo](https://cloud.tencent.com/document/api/213/87933) 接口返回值中的`InstanceId`获取。",
10541
10541
  "example": "[\"ins-xxxxxxx1\", \"ins-xxxxxxx2\"]",
10542
10542
  "member": "string",
10543
10543
  "name": "InstanceIds",
@@ -10546,7 +10546,7 @@
10546
10546
  },
10547
10547
  {
10548
10548
  "disabled": false,
10549
- "document": "维修任务ID",
10549
+ "document": "指定待操作的维修任务ID,可通过 [DescribeTaskInfo](https://cloud.tencent.com/document/api/213/87933) 接口返回值中的`TaskId`获取。",
10550
10550
  "example": "rep-xxxxxxxx",
10551
10551
  "member": "string",
10552
10552
  "name": "TaskId",
@@ -10573,7 +10573,7 @@
10573
10573
  },
10574
10574
  {
10575
10575
  "disabled": false,
10576
- "document": "附加的授权处理策略。",
10576
+ "document": "附加的授权处理策略,不传或为空时,按默认授权方式进行处理。对于支持弃盘迁移授权的维修任务,当且仅当传入`LossyLocal`时,代表本次授权可允许发起弃盘迁移。\n\n注意:\n1. 指定`TaskSubMethod`为`LossyLocal`调用接口发起**弃盘迁移授权**时,本地盘实例的**所有本地盘数据都会清空**,相当于**重新部署本地盘实例**。\n2. 对于非本地盘实例,或不支持弃盘迁移选项的任务,指定`TaskSubMethod`为`LossyLocal`时接口不会报错,不过后端会自动忽略该参数。\n3. 特别的:如果本地盘实例系统盘是CBS云盘,并且`/etc/fstab`里之前配置了本地盘的自动挂载项,建议可根据业务侧的实际需求,评估是否在对应挂载项追加上`nofail`参数(代表对应挂载点挂载失败不阻塞开机流程)或注释对应的挂载路径。否则授权弃盘迁移后,对应本地盘数据已清空,自动挂载失败会导致实例开机流程失败进入救援模式。具体可参考 [Linux 实例:/etc/fstab 配置错误导致无法登录](https://cloud.tencent.com/document/product/213/72039)。",
10577
10577
  "example": "NA",
10578
10578
  "member": "string",
10579
10579
  "name": "TaskSubMethod",
@@ -10830,7 +10830,7 @@
10830
10830
  },
10831
10831
  {
10832
10832
  "disabled": false,
10833
- "document": "任务授权类型",
10833
+ "document": "任务授权类型,当前`AuthType`和维修任务提供的授权选项的对应关系如下:\n\n- `\"1\"`:仅提供【在线迁移授权】\n- `\"2\"`:仅提供【停机授权】\n- `\"3\"`:仅提供【在线换盘授权】\n- `\"4\"`:提供【停机换盘授权】(默认)、【弃盘迁移授权】(可选)\n- `\"5\"`:提供【停机授权】(默认)、【弃盘迁移授权】(可选)\n- `\"6\"`:仅提供【在线维护授权】\n- `\"7\"`:提供【在线维护授权】(默认)、【停机授权】(可选)\n- `\"8\"`:仅提供【弃盘迁移授权】",
10834
10834
  "example": "1",
10835
10835
  "member": "uint64",
10836
10836
  "name": "AuthType",
@@ -8681,7 +8681,7 @@
8681
8681
  "members": [
8682
8682
  {
8683
8683
  "disabled": false,
8684
- "document": "应用类型;knowledge_qa-知识问答管理;summary-知识摘要;classifys-知识标签提取",
8684
+ "document": "应用类型;knowledge_qa - 知识问答管理 ",
8685
8685
  "example": "无",
8686
8686
  "member": "string",
8687
8687
  "name": "AppType",
@@ -277,6 +277,58 @@ def doDeleteWatermarkTemplate(args, parsed_globals):
277
277
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
278
 
279
279
 
280
+ def doDescribeBatchTaskDetail(args, parsed_globals):
281
+ g_param = parse_global_arg(parsed_globals)
282
+
283
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
284
+ cred = credential.CVMRoleCredential()
285
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
286
+ cred = credential.STSAssumeRoleCredential(
287
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
288
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
289
+ )
290
+ 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):
291
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
292
+ else:
293
+ cred = credential.Credential(
294
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
295
+ )
296
+ http_profile = HttpProfile(
297
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
298
+ reqMethod="POST",
299
+ endpoint=g_param[OptionsDefine.Endpoint],
300
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
301
+ )
302
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
303
+ if g_param[OptionsDefine.Language]:
304
+ profile.language = g_param[OptionsDefine.Language]
305
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
306
+ client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
307
+ client._sdkVersion += ("_CLI_" + __version__)
308
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
309
+ model = models.DescribeBatchTaskDetailRequest()
310
+ model.from_json_string(json.dumps(args))
311
+ start_time = time.time()
312
+ while True:
313
+ rsp = client.DescribeBatchTaskDetail(model)
314
+ result = rsp.to_json_string()
315
+ try:
316
+ json_obj = json.loads(result)
317
+ except TypeError as e:
318
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
319
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
320
+ break
321
+ cur_time = time.time()
322
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
323
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
324
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
325
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
326
+ else:
327
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
328
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
329
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
330
+
331
+
280
332
  def doModifyLiveRecordTemplate(args, parsed_globals):
281
333
  g_param = parse_global_arg(parsed_globals)
282
334
 
@@ -1733,6 +1785,58 @@ def doExecuteFunction(args, parsed_globals):
1733
1785
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1734
1786
 
1735
1787
 
1788
+ def doBatchProcessMedia(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.MpsClient(cred, g_param[OptionsDefine.Region], profile)
1815
+ client._sdkVersion += ("_CLI_" + __version__)
1816
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1817
+ model = models.BatchProcessMediaRequest()
1818
+ model.from_json_string(json.dumps(args))
1819
+ start_time = time.time()
1820
+ while True:
1821
+ rsp = client.BatchProcessMedia(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
+
1736
1840
  def doDescribeStreamLinkFlows(args, parsed_globals):
1737
1841
  g_param = parse_global_arg(parsed_globals)
1738
1842
 
@@ -1837,6 +1941,58 @@ def doDescribeSnapshotByTimeOffsetTemplates(args, parsed_globals):
1837
1941
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1838
1942
 
1839
1943
 
1944
+ def doDeleteSampleSnapshotTemplate(args, parsed_globals):
1945
+ g_param = parse_global_arg(parsed_globals)
1946
+
1947
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1948
+ cred = credential.CVMRoleCredential()
1949
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1950
+ cred = credential.STSAssumeRoleCredential(
1951
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1952
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1953
+ )
1954
+ 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):
1955
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1956
+ else:
1957
+ cred = credential.Credential(
1958
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1959
+ )
1960
+ http_profile = HttpProfile(
1961
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1962
+ reqMethod="POST",
1963
+ endpoint=g_param[OptionsDefine.Endpoint],
1964
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1965
+ )
1966
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1967
+ if g_param[OptionsDefine.Language]:
1968
+ profile.language = g_param[OptionsDefine.Language]
1969
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1970
+ client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
1971
+ client._sdkVersion += ("_CLI_" + __version__)
1972
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1973
+ model = models.DeleteSampleSnapshotTemplateRequest()
1974
+ model.from_json_string(json.dumps(args))
1975
+ start_time = time.time()
1976
+ while True:
1977
+ rsp = client.DeleteSampleSnapshotTemplate(model)
1978
+ result = rsp.to_json_string()
1979
+ try:
1980
+ json_obj = json.loads(result)
1981
+ except TypeError as e:
1982
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1983
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1984
+ break
1985
+ cur_time = time.time()
1986
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1987
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1988
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1989
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1990
+ else:
1991
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1992
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1993
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1994
+
1995
+
1840
1996
  def doDeleteStreamLinkOutput(args, parsed_globals):
1841
1997
  g_param = parse_global_arg(parsed_globals)
1842
1998
 
@@ -4021,7 +4177,7 @@ def doModifyWatermarkTemplate(args, parsed_globals):
4021
4177
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4022
4178
 
4023
4179
 
4024
- def doDeleteWordSamples(args, parsed_globals):
4180
+ def doCreateVideoSearchTask(args, parsed_globals):
4025
4181
  g_param = parse_global_arg(parsed_globals)
4026
4182
 
4027
4183
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4050,11 +4206,11 @@ def doDeleteWordSamples(args, parsed_globals):
4050
4206
  client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
4051
4207
  client._sdkVersion += ("_CLI_" + __version__)
4052
4208
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4053
- model = models.DeleteWordSamplesRequest()
4209
+ model = models.CreateVideoSearchTaskRequest()
4054
4210
  model.from_json_string(json.dumps(args))
4055
4211
  start_time = time.time()
4056
4212
  while True:
4057
- rsp = client.DeleteWordSamples(model)
4213
+ rsp = client.CreateVideoSearchTask(model)
4058
4214
  result = rsp.to_json_string()
4059
4215
  try:
4060
4216
  json_obj = json.loads(result)
@@ -4385,7 +4541,7 @@ def doDescribeAnimatedGraphicsTemplates(args, parsed_globals):
4385
4541
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4386
4542
 
4387
4543
 
4388
- def doCreateVideoSearchTask(args, parsed_globals):
4544
+ def doDeleteWordSamples(args, parsed_globals):
4389
4545
  g_param = parse_global_arg(parsed_globals)
4390
4546
 
4391
4547
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -4414,11 +4570,11 @@ def doCreateVideoSearchTask(args, parsed_globals):
4414
4570
  client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
4415
4571
  client._sdkVersion += ("_CLI_" + __version__)
4416
4572
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
4417
- model = models.CreateVideoSearchTaskRequest()
4573
+ model = models.DeleteWordSamplesRequest()
4418
4574
  model.from_json_string(json.dumps(args))
4419
4575
  start_time = time.time()
4420
4576
  while True:
4421
- rsp = client.CreateVideoSearchTask(model)
4577
+ rsp = client.DeleteWordSamples(model)
4422
4578
  result = rsp.to_json_string()
4423
4579
  try:
4424
4580
  json_obj = json.loads(result)
@@ -5789,7 +5945,7 @@ def doDeleteContentReviewTemplate(args, parsed_globals):
5789
5945
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5790
5946
 
5791
5947
 
5792
- def doDeleteSampleSnapshotTemplate(args, parsed_globals):
5948
+ def doDescribeImageTaskDetail(args, parsed_globals):
5793
5949
  g_param = parse_global_arg(parsed_globals)
5794
5950
 
5795
5951
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -5818,11 +5974,11 @@ def doDeleteSampleSnapshotTemplate(args, parsed_globals):
5818
5974
  client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
5819
5975
  client._sdkVersion += ("_CLI_" + __version__)
5820
5976
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
5821
- model = models.DeleteSampleSnapshotTemplateRequest()
5977
+ model = models.DescribeImageTaskDetailRequest()
5822
5978
  model.from_json_string(json.dumps(args))
5823
5979
  start_time = time.time()
5824
5980
  while True:
5825
- rsp = client.DeleteSampleSnapshotTemplate(model)
5981
+ rsp = client.DescribeImageTaskDetail(model)
5826
5982
  result = rsp.to_json_string()
5827
5983
  try:
5828
5984
  json_obj = json.loads(result)
@@ -6689,6 +6845,7 @@ ACTION_MAP = {
6689
6845
  "DescribeStreamLinkFlowRealtimeStatus": doDescribeStreamLinkFlowRealtimeStatus,
6690
6846
  "CreateAnimatedGraphicsTemplate": doCreateAnimatedGraphicsTemplate,
6691
6847
  "DeleteWatermarkTemplate": doDeleteWatermarkTemplate,
6848
+ "DescribeBatchTaskDetail": doDescribeBatchTaskDetail,
6692
6849
  "ModifyLiveRecordTemplate": doModifyLiveRecordTemplate,
6693
6850
  "EditMedia": doEditMedia,
6694
6851
  "DescribeStreamLinkEvent": doDescribeStreamLinkEvent,
@@ -6717,8 +6874,10 @@ ACTION_MAP = {
6717
6874
  "CreateTranscodeTemplate": doCreateTranscodeTemplate,
6718
6875
  "CreateStreamLinkFlow": doCreateStreamLinkFlow,
6719
6876
  "ExecuteFunction": doExecuteFunction,
6877
+ "BatchProcessMedia": doBatchProcessMedia,
6720
6878
  "DescribeStreamLinkFlows": doDescribeStreamLinkFlows,
6721
6879
  "DescribeSnapshotByTimeOffsetTemplates": doDescribeSnapshotByTimeOffsetTemplates,
6880
+ "DeleteSampleSnapshotTemplate": doDeleteSampleSnapshotTemplate,
6722
6881
  "DeleteStreamLinkOutput": doDeleteStreamLinkOutput,
6723
6882
  "CreateContentReviewTemplate": doCreateContentReviewTemplate,
6724
6883
  "DescribeGroupAttachFlowsById": doDescribeGroupAttachFlowsById,
@@ -6761,14 +6920,14 @@ ACTION_MAP = {
6761
6920
  "CreateStreamLinkOutputInfo": doCreateStreamLinkOutputInfo,
6762
6921
  "DescribeWorkflows": doDescribeWorkflows,
6763
6922
  "ModifyWatermarkTemplate": doModifyWatermarkTemplate,
6764
- "DeleteWordSamples": doDeleteWordSamples,
6923
+ "CreateVideoSearchTask": doCreateVideoSearchTask,
6765
6924
  "DescribeStreamLinkActivateState": doDescribeStreamLinkActivateState,
6766
6925
  "CreateImageSpriteTemplate": doCreateImageSpriteTemplate,
6767
6926
  "DescribePersonSamples": doDescribePersonSamples,
6768
6927
  "ParseNotification": doParseNotification,
6769
6928
  "DeleteAIRecognitionTemplate": doDeleteAIRecognitionTemplate,
6770
6929
  "DescribeAnimatedGraphicsTemplates": doDescribeAnimatedGraphicsTemplates,
6771
- "CreateVideoSearchTask": doCreateVideoSearchTask,
6930
+ "DeleteWordSamples": doDeleteWordSamples,
6772
6931
  "ManageTask": doManageTask,
6773
6932
  "DescribeVideoDatabaseEntryTaskDetail": doDescribeVideoDatabaseEntryTaskDetail,
6774
6933
  "ModifySnapshotByTimeOffsetTemplate": doModifySnapshotByTimeOffsetTemplate,
@@ -6795,7 +6954,7 @@ ACTION_MAP = {
6795
6954
  "ProcessLiveStream": doProcessLiveStream,
6796
6955
  "DeleteLiveRecordTemplate": doDeleteLiveRecordTemplate,
6797
6956
  "DeleteContentReviewTemplate": doDeleteContentReviewTemplate,
6798
- "DeleteSampleSnapshotTemplate": doDeleteSampleSnapshotTemplate,
6957
+ "DescribeImageTaskDetail": doDescribeImageTaskDetail,
6799
6958
  "DescribeStreamLinkFlowMediaStatistics": doDescribeStreamLinkFlowMediaStatistics,
6800
6959
  "CreateAsrHotwords": doCreateAsrHotwords,
6801
6960
  "CreateStreamLinkEvent": doCreateStreamLinkEvent,