tccli 3.0.1395.1__py2.py3-none-any.whl → 3.0.1397.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.
Files changed (42) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/ai3d/v20250513/api.json +3 -3
  3. tccli/services/cdn/cdn_client.py +4 -163
  4. tccli/services/cdn/v20180606/api.json +0 -297
  5. tccli/services/cdn/v20180606/examples.json +0 -24
  6. tccli/services/ckafka/v20190819/api.json +1 -1
  7. tccli/services/ckafka/v20190819/examples.json +1 -1
  8. tccli/services/cls/v20201016/api.json +6 -6
  9. tccli/services/cls/v20201016/examples.json +1 -1
  10. tccli/services/ess/v20201111/api.json +24 -24
  11. tccli/services/essbasic/v20210526/examples.json +2 -2
  12. tccli/services/iai/v20180301/api.json +112 -114
  13. tccli/services/iai/v20180301/examples.json +7 -7
  14. tccli/services/iai/v20200303/api.json +4 -4
  15. tccli/services/iai/v20200303/examples.json +1 -1
  16. tccli/services/iotexplorer/v20190423/api.json +20 -2
  17. tccli/services/lcic/v20220817/api.json +6 -6
  18. tccli/services/lke/lke_client.py +0 -106
  19. tccli/services/lke/v20231130/api.json +0 -106
  20. tccli/services/lke/v20231130/examples.json +0 -16
  21. tccli/services/lkeap/v20240522/api.json +37 -10
  22. tccli/services/mongodb/v20190725/api.json +38 -36
  23. tccli/services/mongodb/v20190725/examples.json +3 -3
  24. tccli/services/mps/mps_client.py +220 -8
  25. tccli/services/mps/v20190612/api.json +420 -3
  26. tccli/services/mps/v20190612/examples.json +50 -0
  27. tccli/services/redis/v20180412/api.json +4 -4
  28. tccli/services/tcb/v20180608/api.json +1 -1
  29. tccli/services/tcss/v20201101/api.json +30 -10
  30. tccli/services/teo/v20220901/api.json +10 -0
  31. tccli/services/trtc/v20190722/api.json +57 -18
  32. tccli/services/tse/v20201207/api.json +39 -1
  33. tccli/services/tse/v20201207/examples.json +3 -3
  34. tccli/services/tsf/v20180326/api.json +2 -2
  35. tccli/services/vpc/v20170312/api.json +1 -1
  36. tccli/services/waf/v20180125/api.json +796 -146
  37. tccli/services/waf/v20180125/examples.json +1 -1
  38. {tccli-3.0.1395.1.dist-info → tccli-3.0.1397.1.dist-info}/METADATA +2 -2
  39. {tccli-3.0.1395.1.dist-info → tccli-3.0.1397.1.dist-info}/RECORD +42 -42
  40. {tccli-3.0.1395.1.dist-info → tccli-3.0.1397.1.dist-info}/WHEEL +0 -0
  41. {tccli-3.0.1395.1.dist-info → tccli-3.0.1397.1.dist-info}/entry_points.txt +0 -0
  42. {tccli-3.0.1395.1.dist-info → tccli-3.0.1397.1.dist-info}/license_files/LICENSE +0 -0
@@ -323,7 +323,7 @@
323
323
  "status": "online"
324
324
  },
325
325
  "ResetDBInstancePassword": {
326
- "document": "修改实例用户的密码",
326
+ "document": "本接口(ResetDBInstancePassword)用于重置实例访问密码。",
327
327
  "input": "ResetDBInstancePasswordRequest",
328
328
  "name": "修改实例用户的密码",
329
329
  "output": "ResetDBInstancePasswordResponse",
@@ -417,7 +417,7 @@
417
417
  },
418
418
  {
419
419
  "disabled": false,
420
- "document": "项目ID,用户已创建项目的唯一ID。请在控制台账号中心的项目管理中复制项目 ID。",
420
+ "document": "项目ID,用户已创建项目的唯一ID。请在控制台账号中心的[项目管理](https://console.cloud.tencent.com/project)中复制项目 ID。",
421
421
  "example": "12",
422
422
  "member": "uint64",
423
423
  "name": "ProjectId",
@@ -454,7 +454,7 @@
454
454
  "members": [
455
455
  {
456
456
  "disabled": false,
457
- "document": "当前账号具有的权限信息。<ul><li>0:无权限。</li><li>1:只读。</li><li>2:只写。</li><li>3:读写。</li></ul>\n注意:此字段可能返回 null,表示取不到有效值。",
457
+ "document": "当前账号具有的权限信息。\n- 0:无权限。\n- 1:只读。\n- 3:读写。\n注意:此字段可能返回 null,表示取不到有效值。",
458
458
  "example": "1",
459
459
  "member": "int64",
460
460
  "name": "Mask",
@@ -465,7 +465,7 @@
465
465
  },
466
466
  {
467
467
  "disabled": false,
468
- "document": "指具有当前账号权限的数据库名。\n<ul><li>* :表示所有数据库。</li><li>db.name:表示特定name的数据库。</li></ul>\n注意:此字段可能返回 null,表示取不到有效值。",
468
+ "document": "指具有当前账号权限的数据库名。\n- \\* :表示所有数据库。\n- db.name:表示特定 name 的数据库。\n注意:此字段可能返回 null,表示取不到有效值。",
469
469
  "example": "\"db_test\"",
470
470
  "member": "string",
471
471
  "name": "NameSpace",
@@ -760,31 +760,31 @@
760
760
  "members": [
761
761
  {
762
762
  "disabled": false,
763
- "document": "连接的客户端IP",
763
+ "document": "连接的客户端 IP",
764
764
  "example": "192.168.1.1",
765
765
  "member": "string",
766
766
  "name": "IP",
767
- "required": true,
767
+ "output_required": true,
768
768
  "type": "string",
769
769
  "value_allowed_null": false
770
770
  },
771
771
  {
772
772
  "disabled": false,
773
- "document": "对应客户端IP的连接数",
773
+ "document": "对应客户端 IP 的连接数。",
774
774
  "example": "9",
775
775
  "member": "uint64",
776
776
  "name": "Count",
777
- "required": true,
777
+ "output_required": true,
778
778
  "type": "int",
779
779
  "value_allowed_null": false
780
780
  },
781
781
  {
782
782
  "disabled": false,
783
- "document": "是否为内部ip",
783
+ "document": "是否为内部 IP。",
784
784
  "example": "true",
785
785
  "member": "bool",
786
786
  "name": "InternalService",
787
- "required": true,
787
+ "output_required": true,
788
788
  "type": "bool",
789
789
  "value_allowed_null": false
790
790
  }
@@ -805,7 +805,7 @@
805
805
  },
806
806
  {
807
807
  "disabled": false,
808
- "document": "新账号名称。其格式要求如下:<ul><li>字符范围[1,32]。</li><li>可输入[A,Z]、[a,z]、[1,9]范围的字符以及下划线“_”与短划线“-”。</li></ul>",
808
+ "document": "新账号名称。其格式要求如下:\n- 字符范围[1,64]。\n- 可输入[A,Z]、[a,z]、[1,9]范围的字符以及下划线“\\_”与短划线“-”。",
809
809
  "example": "mong_test",
810
810
  "member": "string",
811
811
  "name": "UserName",
@@ -814,8 +814,8 @@
814
814
  },
815
815
  {
816
816
  "disabled": false,
817
- "document": "新账号密码。密码复杂度要求如下:<ul><li>字符长度范围[8,32]。</li><li>至少包含字母、数字和特殊字符(叹号“!”、at\"@\"、井号“#”、百分号“%”、插入符“^”、星号“*”、小括号“()”、下划线“_”)中的两种。</li></ul>",
818
- "example": "abc123!@",
817
+ "document": "新账号密码。密码复杂度要求如下:\n- 字符长度范围[8,32]。\n- 至少包含字母、数字和特殊字符(叹号“!”、at\"@\"、井号“#”、百分号“%”、插入符“^”、星号“\\*”、小括号“()”、下划线“\\_”)中的两种。",
818
+ "example": "password",
819
819
  "member": "string",
820
820
  "name": "Password",
821
821
  "required": true,
@@ -824,10 +824,10 @@
824
824
  {
825
825
  "disabled": false,
826
826
  "document": "mongouser 账号对应的密码。mongouser 为系统默认账号,即为创建实例时,设置的密码。",
827
- "example": "Abc123...",
827
+ "example": "password...",
828
828
  "member": "string",
829
829
  "name": "MongoUserPassword",
830
- "required": true,
830
+ "required": false,
831
831
  "type": "string"
832
832
  },
833
833
  {
@@ -1791,7 +1791,7 @@
1791
1791
  "members": [
1792
1792
  {
1793
1793
  "disabled": false,
1794
- "document": "单价",
1794
+ "document": "实例单价。单位:元。",
1795
1795
  "example": "0.17",
1796
1796
  "member": "float",
1797
1797
  "name": "UnitPrice",
@@ -1802,7 +1802,7 @@
1802
1802
  },
1803
1803
  {
1804
1804
  "disabled": false,
1805
- "document": "原价",
1805
+ "document": "实例原价。单位:元。",
1806
1806
  "example": "210",
1807
1807
  "member": "float",
1808
1808
  "name": "OriginalPrice",
@@ -1813,7 +1813,7 @@
1813
1813
  },
1814
1814
  {
1815
1815
  "disabled": false,
1816
- "document": "折扣价",
1816
+ "document": "实例折扣价。单位:元。",
1817
1817
  "example": "198",
1818
1818
  "member": "float",
1819
1819
  "name": "DiscountPrice",
@@ -3859,7 +3859,7 @@
3859
3859
  "members": [
3860
3860
  {
3861
3861
  "disabled": false,
3862
- "document": "实例所属区域及可用区信息。格式:ap-guangzhou-2。",
3862
+ "document": "实例所属区域及可用区信息。具体信息,请参见[地域和可用区](https://cloud.tencent.com/document/product/240/3637)。",
3863
3863
  "example": "ap-guangzhou-4",
3864
3864
  "member": "string",
3865
3865
  "name": "Zone",
@@ -3895,8 +3895,8 @@
3895
3895
  },
3896
3896
  {
3897
3897
  "disabled": false,
3898
- "document": "实例版本信息。具体支持的版本,请通过接口[DescribeSpecInfo](https://cloud.tencent.com/document/product/240/38567)查询,其返回的数据结构SpecItems中的参数MongoVersionCode为实例所支持的版本信息。版本信息与版本号对应关系如下:\n- MONGO_36_WT:MongoDB 3.6 WiredTiger存储引擎版本。\n- MONGO_40_WT:MongoDB 4.0 WiredTiger存储引擎版本。\n- MONGO_42_WT:MongoDB 4.2 WiredTiger存储引擎版本。\n- MONGO_44_WT:MongoDB 4.4 WiredTiger存储引擎版本。\n- MONGO_50_WT:MongoDB 5.0 WiredTiger存储引擎版本。\n- MONGO_60_WT:MongoDB 6.0 WiredTiger存储引擎版本。",
3899
- "example": "MONGO_36_WT",
3898
+ "document": "实例版本信息。具体支持的版本,请通过接口[DescribeSpecInfo](https://cloud.tencent.com/document/product/240/38567)查询,其返回的数据结构SpecItems中的参数MongoVersionCode为实例所支持的版本信息。版本信息与版本号对应关系如下:\n- MONGO_40_WT:MongoDB 4.0 WiredTiger存储引擎版本。\n- MONGO_42_WT:MongoDB 4.2 WiredTiger存储引擎版本。\n- MONGO_44_WT:MongoDB 4.4 WiredTiger存储引擎版本。\n- MONGO_50_WT:MongoDB 5.0 WiredTiger存储引擎版本。\n- MONGO_60_WT:MongoDB 6.0 WiredTiger存储引擎版本。\n- MONGO_70_WT:MongoDB 7.0 WiredTiger存储引擎版本。",
3899
+ "example": "MONGO_50_WT",
3900
3900
  "member": "string",
3901
3901
  "name": "MongoVersion",
3902
3902
  "required": true,
@@ -4040,7 +4040,7 @@
4040
4040
  "members": [
4041
4041
  {
4042
4042
  "disabled": false,
4043
- "document": "实例 ID,格式如:cmgo-p8vn****。与云数据库控制台页面中显示的实例ID相同。",
4043
+ "document": "实例 ID,例如:cmgo-p8vn****。请登录 [MongoDB 控制台](https://console.cloud.tencent.com/mongodb)在实例列表复制实例 ID",
4044
4044
  "example": "cmgo-8oij5631",
4045
4045
  "member": "string",
4046
4046
  "name": "InstanceId",
@@ -4049,7 +4049,7 @@
4049
4049
  },
4050
4050
  {
4051
4051
  "disabled": false,
4052
- "document": "变更配置后实例内存大小,单位:GB",
4052
+ "document": "变更配置后实例内存大小,单位:GB。具体售卖的内存规格,请通过接口 [DescribeSpecInfo](https://cloud.tencent.com/document/product/240/38567) 获取。",
4053
4053
  "example": "8",
4054
4054
  "member": "int64",
4055
4055
  "name": "Memory",
@@ -4058,7 +4058,7 @@
4058
4058
  },
4059
4059
  {
4060
4060
  "disabled": false,
4061
- "document": "变更配置后实例磁盘大小,单位:GB",
4061
+ "document": "变更配置后实例磁盘大小,单位:GB。每一个 CPU 规格对应的最大磁盘与最小磁盘范围,请通过接口 [DescribeSpecInfo](https://cloud.tencent.com/document/product/240/38567) 获取。",
4062
4062
  "example": "200",
4063
4063
  "member": "int64",
4064
4064
  "name": "Volume",
@@ -4067,7 +4067,7 @@
4067
4067
  },
4068
4068
  {
4069
4069
  "disabled": false,
4070
- "document": "实例节点数。默认为不变更节点数,暂不支持变更。",
4070
+ "document": "实例节点数量。请通过接口 [DescribeSpecInfo](https://cloud.tencent.com/document/product/240/38567) 获取。\n- 副本集实例,指变更配置后实例的主从节点数量。\n- 分片集群实例,指变更配置后实例每一个分片的主从节点数。\n**说明**:切勿同时发起调整节点数、调整分片数、调整节点规格的任务。",
4071
4071
  "example": "3",
4072
4072
  "member": "int64",
4073
4073
  "name": "NodeNum",
@@ -4076,7 +4076,7 @@
4076
4076
  },
4077
4077
  {
4078
4078
  "disabled": false,
4079
- "document": "实例分片数。默认为不变更分片数,暂不支持变更。",
4079
+ "document": "分片集群实例,指变更配置后实例的分片数量。取值范围:[2,36] 。\n**说明**:变更后的分片数量不能小于当前现有的数量。切勿同时发起调整节点数、调整分片数与调整节点规格的任务。",
4080
4080
  "example": "2",
4081
4081
  "member": "int64",
4082
4082
  "name": "ReplicateSetNum",
@@ -4095,6 +4095,7 @@
4095
4095
  "example": "无",
4096
4096
  "member": "DBInstancePrice",
4097
4097
  "name": "Price",
4098
+ "output_required": true,
4098
4099
  "type": "object",
4099
4100
  "value_allowed_null": false
4100
4101
  },
@@ -6025,7 +6026,7 @@
6025
6026
  "members": [
6026
6027
  {
6027
6028
  "disabled": false,
6028
- "document": "实例Id",
6029
+ "document": "指定实例 ID。请登录 [MongoDB 控制台](https://console.cloud.tencent.com/mongodb)在实例列表复制实例 ID。",
6029
6030
  "example": "cmgo-7pjedvz7",
6030
6031
  "member": "string",
6031
6032
  "name": "InstanceId",
@@ -6034,7 +6035,7 @@
6034
6035
  },
6035
6036
  {
6036
6037
  "disabled": false,
6037
- "document": "实例账号名",
6038
+ "document": "指定需修改密码的账号名称。可通过接口 [DescribeAccountUsers](https://cloud.tencent.com/document/product/240/80800) 获取账号列表,复制需修改密码的账号。",
6038
6039
  "example": "rwuser",
6039
6040
  "member": "string",
6040
6041
  "name": "UserName",
@@ -6043,8 +6044,8 @@
6043
6044
  },
6044
6045
  {
6045
6046
  "disabled": false,
6046
- "document": "新密码,新密码长度不能少于8",
6047
- "example": "111111",
6047
+ "document": "指定账户的新密码。密码复杂度要求:\n- 8-32个字符长度。\n- 至少包含字母、数字和字符(!@#%^\\*()\\_)中的两种。",
6048
+ "example": "test_123***",
6048
6049
  "member": "string",
6049
6050
  "name": "Password",
6050
6051
  "required": true,
@@ -6058,11 +6059,11 @@
6058
6059
  "members": [
6059
6060
  {
6060
6061
  "disabled": false,
6061
- "document": "异步请求Id,用户查询该流程的运行状态",
6062
+ "document": "任务请求 ID。",
6062
6063
  "example": "4769",
6063
6064
  "member": "string",
6064
6065
  "name": "AsyncRequestId",
6065
- "required": true,
6066
+ "output_required": true,
6066
6067
  "type": "string",
6067
6068
  "value_allowed_null": false
6068
6069
  },
@@ -6297,8 +6298,8 @@
6297
6298
  },
6298
6299
  {
6299
6300
  "disabled": false,
6300
- "document": "设置账号名称。",
6301
- "example": "bob",
6301
+ "document": "设置访问实例的账号名称。设置要求为:字母开头的1-64个字符,只可输入[A,Z]、[a,z]、[1,9]范围的字符以及下划线“_”与短划线“-”。",
6302
+ "example": "test_123",
6302
6303
  "member": "string",
6303
6304
  "name": "UserName",
6304
6305
  "required": true,
@@ -6307,7 +6308,7 @@
6307
6308
  {
6308
6309
  "disabled": false,
6309
6310
  "document": "设置权限信息。",
6310
- "example": "11",
6311
+ "example": "",
6311
6312
  "member": "Auth",
6312
6313
  "name": "AuthRole",
6313
6314
  "required": true,
@@ -6325,6 +6326,7 @@
6325
6326
  "example": "100000",
6326
6327
  "member": "uint64",
6327
6328
  "name": "FlowId",
6329
+ "output_required": true,
6328
6330
  "type": "int",
6329
6331
  "value_allowed_null": false
6330
6332
  },
@@ -6954,7 +6956,7 @@
6954
6956
  "members": [
6955
6957
  {
6956
6958
  "disabled": false,
6957
- "document": "指定预隔离实例ID。格式如:cmgo-p8vnipr5。",
6959
+ "document": "指定预隔离实例 ID。请登录 [MongoDB 控制台](https://console.cloud.tencent.com/mongodb)在实例列表复制预隔离实例 ID。",
6958
6960
  "example": "cmgo-7pje****",
6959
6961
  "member": "string",
6960
6962
  "name": "InstanceId",
@@ -3,7 +3,7 @@
3
3
  "AssignProject": [
4
4
  {
5
5
  "document": "",
6
- "input": "https://mongodb.tencentcloudapi.com/?Action=AssignProject\n&InstanceIds.0=cmgo-eqmoa5sf\n&ProjectId=12\n&<公共请求参数>",
6
+ "input": "https://mongodb.tencentcloudapi.com/?Action=AssignProject\n&InstanceIds.0=cmgo-eqmo****\n&ProjectId=12\n&<公共请求参数>",
7
7
  "output": "{\n \"Response\": {\n \"FlowIds\": [\n 1081\n ],\n \"RequestId\": \"8e2a339e-5ba9-4da3-8dc2-65a0a6314811\"\n }\n}",
8
8
  "title": "指定云数据库实例的所属项目"
9
9
  }
@@ -388,8 +388,8 @@
388
388
  ],
389
389
  "ResetDBInstancePassword": [
390
390
  {
391
- "document": "",
392
- "input": "https://mongodb.tencentcloudapi.com/?Action=ResetDBInstancePassword\n&InstanceId=cmgo-7pjedvz7\n&UserName=rwuser\n&Password=111111\n&<公共请求参数>",
391
+ "document": "修改实例用户的密码",
392
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ResetDBInstancePassword\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-7pje****\",\n \"UserName\": \"rwuser\",\n \"Password\": \"*******\"\n}",
393
393
  "output": "{\n \"Response\": {\n \"AsyncRequestId\": \"4769\",\n \"RequestId\": \"e600a8d0-9014-11ea-84c1-01cccde830c6\"\n }\n}",
394
394
  "title": "修改实例用户的密码"
395
395
  }
@@ -3137,6 +3137,110 @@ def doModifyStreamLinkInput(args, parsed_globals):
3137
3137
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3138
3138
 
3139
3139
 
3140
+ def doDescribeSmartEraseTemplates(args, parsed_globals):
3141
+ g_param = parse_global_arg(parsed_globals)
3142
+
3143
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3144
+ cred = credential.CVMRoleCredential()
3145
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3146
+ cred = credential.STSAssumeRoleCredential(
3147
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3148
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3149
+ )
3150
+ 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):
3151
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3152
+ else:
3153
+ cred = credential.Credential(
3154
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3155
+ )
3156
+ http_profile = HttpProfile(
3157
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3158
+ reqMethod="POST",
3159
+ endpoint=g_param[OptionsDefine.Endpoint],
3160
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3161
+ )
3162
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3163
+ if g_param[OptionsDefine.Language]:
3164
+ profile.language = g_param[OptionsDefine.Language]
3165
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3166
+ client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
3167
+ client._sdkVersion += ("_CLI_" + __version__)
3168
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3169
+ model = models.DescribeSmartEraseTemplatesRequest()
3170
+ model.from_json_string(json.dumps(args))
3171
+ start_time = time.time()
3172
+ while True:
3173
+ rsp = client.DescribeSmartEraseTemplates(model)
3174
+ result = rsp.to_json_string()
3175
+ try:
3176
+ json_obj = json.loads(result)
3177
+ except TypeError as e:
3178
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3179
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3180
+ break
3181
+ cur_time = time.time()
3182
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3183
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3184
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3185
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3186
+ else:
3187
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3188
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3189
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3190
+
3191
+
3192
+ def doModifySmartEraseTemplate(args, parsed_globals):
3193
+ g_param = parse_global_arg(parsed_globals)
3194
+
3195
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3196
+ cred = credential.CVMRoleCredential()
3197
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3198
+ cred = credential.STSAssumeRoleCredential(
3199
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3200
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3201
+ )
3202
+ 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):
3203
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3204
+ else:
3205
+ cred = credential.Credential(
3206
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3207
+ )
3208
+ http_profile = HttpProfile(
3209
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3210
+ reqMethod="POST",
3211
+ endpoint=g_param[OptionsDefine.Endpoint],
3212
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3213
+ )
3214
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3215
+ if g_param[OptionsDefine.Language]:
3216
+ profile.language = g_param[OptionsDefine.Language]
3217
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3218
+ client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
3219
+ client._sdkVersion += ("_CLI_" + __version__)
3220
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3221
+ model = models.ModifySmartEraseTemplateRequest()
3222
+ model.from_json_string(json.dumps(args))
3223
+ start_time = time.time()
3224
+ while True:
3225
+ rsp = client.ModifySmartEraseTemplate(model)
3226
+ result = rsp.to_json_string()
3227
+ try:
3228
+ json_obj = json.loads(result)
3229
+ except TypeError as e:
3230
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3231
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3232
+ break
3233
+ cur_time = time.time()
3234
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3235
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3236
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3237
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3238
+ else:
3239
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3240
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3241
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3242
+
3243
+
3140
3244
  def doCreateSmartSubtitleTemplate(args, parsed_globals):
3141
3245
  g_param = parse_global_arg(parsed_globals)
3142
3246
 
@@ -5425,7 +5529,7 @@ def doDescribeStreamLinkFlow(args, parsed_globals):
5425
5529
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5426
5530
 
5427
5531
 
5428
- def doDeleteSchedule(args, parsed_globals):
5532
+ def doModifyAIRecognitionTemplate(args, parsed_globals):
5429
5533
  g_param = parse_global_arg(parsed_globals)
5430
5534
 
5431
5535
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -5454,11 +5558,11 @@ def doDeleteSchedule(args, parsed_globals):
5454
5558
  client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
5455
5559
  client._sdkVersion += ("_CLI_" + __version__)
5456
5560
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
5457
- model = models.DeleteScheduleRequest()
5561
+ model = models.ModifyAIRecognitionTemplateRequest()
5458
5562
  model.from_json_string(json.dumps(args))
5459
5563
  start_time = time.time()
5460
5564
  while True:
5461
- rsp = client.DeleteSchedule(model)
5565
+ rsp = client.ModifyAIRecognitionTemplate(model)
5462
5566
  result = rsp.to_json_string()
5463
5567
  try:
5464
5568
  json_obj = json.loads(result)
@@ -6517,6 +6621,58 @@ def doDisassociateSecurityGroup(args, parsed_globals):
6517
6621
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6518
6622
 
6519
6623
 
6624
+ def doCreateSmartEraseTemplate(args, parsed_globals):
6625
+ g_param = parse_global_arg(parsed_globals)
6626
+
6627
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
6628
+ cred = credential.CVMRoleCredential()
6629
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
6630
+ cred = credential.STSAssumeRoleCredential(
6631
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
6632
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
6633
+ )
6634
+ 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):
6635
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
6636
+ else:
6637
+ cred = credential.Credential(
6638
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
6639
+ )
6640
+ http_profile = HttpProfile(
6641
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
6642
+ reqMethod="POST",
6643
+ endpoint=g_param[OptionsDefine.Endpoint],
6644
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
6645
+ )
6646
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
6647
+ if g_param[OptionsDefine.Language]:
6648
+ profile.language = g_param[OptionsDefine.Language]
6649
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
6650
+ client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
6651
+ client._sdkVersion += ("_CLI_" + __version__)
6652
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
6653
+ model = models.CreateSmartEraseTemplateRequest()
6654
+ model.from_json_string(json.dumps(args))
6655
+ start_time = time.time()
6656
+ while True:
6657
+ rsp = client.CreateSmartEraseTemplate(model)
6658
+ result = rsp.to_json_string()
6659
+ try:
6660
+ json_obj = json.loads(result)
6661
+ except TypeError as e:
6662
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
6663
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
6664
+ break
6665
+ cur_time = time.time()
6666
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
6667
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
6668
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
6669
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
6670
+ else:
6671
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
6672
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
6673
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6674
+
6675
+
6520
6676
  def doModifyContentReviewTemplate(args, parsed_globals):
6521
6677
  g_param = parse_global_arg(parsed_globals)
6522
6678
 
@@ -6673,7 +6829,7 @@ def doBatchStopStreamLinkFlow(args, parsed_globals):
6673
6829
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6674
6830
 
6675
6831
 
6676
- def doModifyAIRecognitionTemplate(args, parsed_globals):
6832
+ def doDeleteSchedule(args, parsed_globals):
6677
6833
  g_param = parse_global_arg(parsed_globals)
6678
6834
 
6679
6835
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -6702,11 +6858,11 @@ def doModifyAIRecognitionTemplate(args, parsed_globals):
6702
6858
  client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
6703
6859
  client._sdkVersion += ("_CLI_" + __version__)
6704
6860
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
6705
- model = models.ModifyAIRecognitionTemplateRequest()
6861
+ model = models.DeleteScheduleRequest()
6706
6862
  model.from_json_string(json.dumps(args))
6707
6863
  start_time = time.time()
6708
6864
  while True:
6709
- rsp = client.ModifyAIRecognitionTemplate(model)
6865
+ rsp = client.DeleteSchedule(model)
6710
6866
  result = rsp.to_json_string()
6711
6867
  try:
6712
6868
  json_obj = json.loads(result)
@@ -6777,6 +6933,58 @@ def doDeleteStreamLinkEvent(args, parsed_globals):
6777
6933
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6778
6934
 
6779
6935
 
6936
+ def doDeleteSmartEraseTemplate(args, parsed_globals):
6937
+ g_param = parse_global_arg(parsed_globals)
6938
+
6939
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
6940
+ cred = credential.CVMRoleCredential()
6941
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
6942
+ cred = credential.STSAssumeRoleCredential(
6943
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
6944
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
6945
+ )
6946
+ 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):
6947
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
6948
+ else:
6949
+ cred = credential.Credential(
6950
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
6951
+ )
6952
+ http_profile = HttpProfile(
6953
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
6954
+ reqMethod="POST",
6955
+ endpoint=g_param[OptionsDefine.Endpoint],
6956
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
6957
+ )
6958
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
6959
+ if g_param[OptionsDefine.Language]:
6960
+ profile.language = g_param[OptionsDefine.Language]
6961
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
6962
+ client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
6963
+ client._sdkVersion += ("_CLI_" + __version__)
6964
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
6965
+ model = models.DeleteSmartEraseTemplateRequest()
6966
+ model.from_json_string(json.dumps(args))
6967
+ start_time = time.time()
6968
+ while True:
6969
+ rsp = client.DeleteSmartEraseTemplate(model)
6970
+ result = rsp.to_json_string()
6971
+ try:
6972
+ json_obj = json.loads(result)
6973
+ except TypeError as e:
6974
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
6975
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
6976
+ break
6977
+ cur_time = time.time()
6978
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
6979
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
6980
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
6981
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
6982
+ else:
6983
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
6984
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
6985
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6986
+
6987
+
6780
6988
  def doDescribeStreamLinkFlowLogs(args, parsed_globals):
6781
6989
  g_param = parse_global_arg(parsed_globals)
6782
6990
 
@@ -6952,6 +7160,8 @@ ACTION_MAP = {
6952
7160
  "StartStreamLinkFlow": doStartStreamLinkFlow,
6953
7161
  "ProcessImage": doProcessImage,
6954
7162
  "ModifyStreamLinkInput": doModifyStreamLinkInput,
7163
+ "DescribeSmartEraseTemplates": doDescribeSmartEraseTemplates,
7164
+ "ModifySmartEraseTemplate": doModifySmartEraseTemplate,
6955
7165
  "CreateSmartSubtitleTemplate": doCreateSmartSubtitleTemplate,
6956
7166
  "DescribeStreamLinkRegions": doDescribeStreamLinkRegions,
6957
7167
  "DescribeSchedules": doDescribeSchedules,
@@ -6996,7 +7206,7 @@ ACTION_MAP = {
6996
7206
  "DescribeContentReviewTemplates": doDescribeContentReviewTemplates,
6997
7207
  "WithdrawsWatermark": doWithdrawsWatermark,
6998
7208
  "DescribeStreamLinkFlow": doDescribeStreamLinkFlow,
6999
- "DeleteSchedule": doDeleteSchedule,
7209
+ "ModifyAIRecognitionTemplate": doModifyAIRecognitionTemplate,
7000
7210
  "ModifyAdaptiveDynamicStreamingTemplate": doModifyAdaptiveDynamicStreamingTemplate,
7001
7211
  "ModifySmartSubtitleTemplate": doModifySmartSubtitleTemplate,
7002
7212
  "DeletePersonSample": doDeletePersonSample,
@@ -7017,11 +7227,13 @@ ACTION_MAP = {
7017
7227
  "DisableSchedule": doDisableSchedule,
7018
7228
  "CreateStreamLinkInput": doCreateStreamLinkInput,
7019
7229
  "DisassociateSecurityGroup": doDisassociateSecurityGroup,
7230
+ "CreateSmartEraseTemplate": doCreateSmartEraseTemplate,
7020
7231
  "ModifyContentReviewTemplate": doModifyContentReviewTemplate,
7021
7232
  "CreateAIRecognitionTemplate": doCreateAIRecognitionTemplate,
7022
7233
  "BatchStopStreamLinkFlow": doBatchStopStreamLinkFlow,
7023
- "ModifyAIRecognitionTemplate": doModifyAIRecognitionTemplate,
7234
+ "DeleteSchedule": doDeleteSchedule,
7024
7235
  "DeleteStreamLinkEvent": doDeleteStreamLinkEvent,
7236
+ "DeleteSmartEraseTemplate": doDeleteSmartEraseTemplate,
7025
7237
  "DescribeStreamLinkFlowLogs": doDescribeStreamLinkFlowLogs,
7026
7238
  "DeleteImageSpriteTemplate": doDeleteImageSpriteTemplate,
7027
7239