tccli 3.0.1372.1__py2.py3-none-any.whl → 3.0.1374.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 (52) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/ai3d/v20250513/api.json +1 -1
  3. tccli/services/batch/v20170312/api.json +3 -3
  4. tccli/services/cfs/v20190719/api.json +10 -10
  5. tccli/services/cfs/v20190719/examples.json +1 -1
  6. tccli/services/clb/v20180317/api.json +252 -3
  7. tccli/services/cls/v20201016/api.json +244 -106
  8. tccli/services/cls/v20201016/examples.json +7 -7
  9. tccli/services/emr/v20190103/api.json +2 -2
  10. tccli/services/ess/v20201111/api.json +69 -0
  11. tccli/services/essbasic/v20210526/api.json +39 -0
  12. tccli/services/keewidb/v20220308/api.json +24 -24
  13. tccli/services/lcic/v20220817/api.json +46 -18
  14. tccli/services/lighthouse/v20200324/examples.json +3 -3
  15. tccli/services/live/v20180801/examples.json +1 -1
  16. tccli/services/lke/v20231130/api.json +1344 -246
  17. tccli/services/lke/v20231130/examples.json +1 -1
  18. tccli/services/mongodb/v20190725/api.json +4 -4
  19. tccli/services/monitor/v20180724/api.json +4 -4
  20. tccli/services/mps/v20190612/api.json +42 -2
  21. tccli/services/ocr/v20181119/api.json +31 -12
  22. tccli/services/partners/v20180321/api.json +4 -4
  23. tccli/services/postgres/postgres_client.py +12 -171
  24. tccli/services/postgres/v20170312/api.json +20 -819
  25. tccli/services/postgres/v20170312/examples.json +6 -30
  26. tccli/services/scf/v20180416/api.json +2 -0
  27. tccli/services/sqlserver/v20180328/api.json +19 -17
  28. tccli/services/sqlserver/v20180328/examples.json +2 -2
  29. tccli/services/sts/v20180813/api.json +4 -4
  30. tccli/services/tcbr/v20220217/api.json +92 -0
  31. tccli/services/tcss/v20201101/api.json +32 -2
  32. tccli/services/tcss/v20201101/examples.json +3 -3
  33. tccli/services/tke/v20180525/api.json +10 -1
  34. tccli/services/trabbit/v20230418/api.json +50 -2
  35. tccli/services/trocket/trocket_client.py +65 -12
  36. tccli/services/trocket/v20230308/api.json +156 -0
  37. tccli/services/trocket/v20230308/examples.json +8 -0
  38. tccli/services/trtc/v20190722/api.json +10 -10
  39. tccli/services/tsf/v20180326/api.json +573 -371
  40. tccli/services/tsf/v20180326/examples.json +8 -8
  41. tccli/services/vod/v20180717/api.json +325 -32
  42. tccli/services/vod/v20180717/examples.json +33 -1
  43. tccli/services/vod/vod_client.py +212 -0
  44. tccli/services/waf/v20180125/api.json +717 -38
  45. tccli/services/waf/v20180125/examples.json +56 -0
  46. tccli/services/waf/waf_client.py +444 -73
  47. tccli/services/wedata/v20210820/api.json +138 -6
  48. {tccli-3.0.1372.1.dist-info → tccli-3.0.1374.1.dist-info}/METADATA +2 -2
  49. {tccli-3.0.1372.1.dist-info → tccli-3.0.1374.1.dist-info}/RECORD +52 -52
  50. {tccli-3.0.1372.1.dist-info → tccli-3.0.1374.1.dist-info}/WHEEL +0 -0
  51. {tccli-3.0.1372.1.dist-info → tccli-3.0.1374.1.dist-info}/entry_points.txt +0 -0
  52. {tccli-3.0.1372.1.dist-info → tccli-3.0.1374.1.dist-info}/license_files/LICENSE +0 -0
@@ -4,7 +4,7 @@
4
4
  {
5
5
  "document": "",
6
6
  "input": "POST / HTTP/1.1\nHost: vod.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ApplyUpload\n<公共请求参数>\n\n{\n \"SubAppId\": \"1\",\n \"MediaType\": \"mp4\"\n}",
7
- "output": "{\n \"Response\": {\n \"CoverStoragePath\": \"/dir/cover.xx\",\n \"RequestId\": \"880f3005-a8c9-4bba-8c87-74e216a17a0b\",\n \"StorageBucket\": \"xadagzp111211-100922\",\n \"StorageRegion\": \"ap-guangzhou-2\",\n \"MediaStoragePath\": \"/dir/name.xx\",\n \"VodSessionKey\": \"VodSessionKey\",\n \"TempCertificate\": {\n \"SecretId\": \"xxxxxxx\",\n \"SecretKey\": \"xxxxxxxx\",\n \"Token\": \"xxxxxxxx\",\n \"ExpiredTime\": 182823331\n }\n }\n}",
7
+ "output": "{\n \"Response\": {\n \"CoverStoragePath\": \"/dir/cover.xx\",\n \"RequestId\": \"880f3005-a8c9-4bba-8c87-74e216a17a0b\",\n \"StorageBucket\": \"xadacq111211-100922\",\n \"StorageRegion\": \"ap-chongqing\",\n \"MediaStoragePath\": \"/dir/name.xx\",\n \"VodSessionKey\": \"VodSessionKey\",\n \"TempCertificate\": {\n \"SecretId\": \"xxxxxxx\",\n \"SecretKey\": \"xxxxxxxx\",\n \"Token\": \"xxxxxxxx\",\n \"ExpiredTime\": 182823331\n }\n }\n}",
8
8
  "title": "申请上传成功例子"
9
9
  }
10
10
  ],
@@ -226,6 +226,14 @@
226
226
  "title": "创建即时转码模板"
227
227
  }
228
228
  ],
229
+ "CreateMPSTemplate": [
230
+ {
231
+ "document": "",
232
+ "input": "POST / HTTP/1.1\nHost: vod.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateMPSTemplate\n<公共请求参数>\n\n{\n \"SubAppId\": 1500000001,\n \"TemplateType\": \"Transcode\",\n \"MPSCreateTemplateParams\": \"{\\\"Container\\\":\\\"mp4\\\",\\\"Name\\\":\\\"test\\\",\\\"RemoveAudio\\\":1,\\\"VideoTemplate\\\":{\\\"Codec\\\":\\\"h264\\\",\\\"Fps\\\":0,\\\"Bitrate\\\":0},\\\"EnhanceConfig\\\":{\\\"VideoEnhance\\\":{\\\"FrameRate\\\":{\\\"Switch\\\":\\\"ON\\\",\\\"Fps\\\":50}}}}\"\n}",
233
+ "output": "{\n \"Response\": {\n \"Definition\": 22143,\n \"RequestId\": \"6ca31e3a-6b8e-4b4e-9256-fdc700064ef3\"\n }\n}",
234
+ "title": "创建 MPS 音视频增强任务模板"
235
+ }
236
+ ],
229
237
  "CreatePersonSample": [
230
238
  {
231
239
  "document": "",
@@ -484,6 +492,14 @@
484
492
  "title": "删除即时转码模板"
485
493
  }
486
494
  ],
495
+ "DeleteMPSTemplate": [
496
+ {
497
+ "document": "",
498
+ "input": "POST / HTTP/1.1\nHost: vod.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteMPSTemplate\n<公共请求参数>\n\n{\n \"SubAppId\": 1500000001,\n \"TemplateType\": \"Transcode\",\n \"Definition\": 24214\n}",
499
+ "output": "{\n \"Response\": {\n \"RequestId\": \"6ca31e3a-6b8e-4b4e-9256-fdc700064ef3\"\n }\n}",
500
+ "title": "删除 MPS 音视频增强任务模板"
501
+ }
502
+ ],
487
503
  "DeleteMedia": [
488
504
  {
489
505
  "document": "视频文件不需要保存,删除该FileId下全部文件和信息。",
@@ -878,6 +894,14 @@
878
894
  "title": "查询 DRM 加密播放 License 请求次数"
879
895
  }
880
896
  ],
897
+ "DescribeMPSTemplates": [
898
+ {
899
+ "document": "",
900
+ "input": "POST / HTTP/1.1\nHost: vod.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeMPSTemplate\n<公共请求参数>\n\n{\n \"SubAppId\": 1500000001,\n \"TemplateType\": \"Transcode\",\n \"MPSDescribeTemplateParams\": \"{\\\"Definitions\\\": [100010],\\\"Type\\\": \\\"Custom\\\"}\"\n}",
901
+ "output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"MPSTemplateSet\": [\n {\n \"TaskType\": \"Transcode\",\n \"MPSTemplateInfo\": \"{\\\"Definition\\\":\\\"100010\\\",\\\"Container\\\":\\\"mp4\\\",\\\"Name\\\":\\\"test\\\",\\\"Comment\\\":\\\"\\\",\\\"Type\\\":\\\"Custom\\\",\\\"RemoveVideo\\\":0,\\\"RemoveAudio\\\":0,\\\"VideoTemplate\\\":{\\\"Codec\\\":\\\"h264\\\",\\\"Fps\\\":0,\\\"Bitrate\\\":0,\\\"ResolutionAdaptive\\\":\\\"open\\\",\\\"Width\\\":0,\\\"Height\\\":0,\\\"FillType\\\":\\\"black\\\",\\\"Gop\\\":0,\\\"VideoProfile\\\":\\\"\\\",\\\"VideoLevel\\\":\\\"\\\",\\\"Subjective\\\":0,\\\"ContentAdaptStream\\\":0,\\\"SegmentType\\\":0,\\\"FpsDenominator\\\":1,\\\"Stereo3dType\\\":\\\"\\\",\\\"HlsTime\\\":0,\\\"Mode\\\":\\\"VBR\\\",\\\"Sar\\\":\\\"\\\",\\\"NoScenecut\\\":0,\\\"BitDepth\\\":8,\\\"RawPts\\\":0,\\\"ScenarioBased\\\":0,\\\"SceneType\\\":\\\"\\\",\\\"CompressType\\\":\\\"\\\"},\\\"AudioTemplate\\\":{\\\"Codec\\\":\\\"aac\\\",\\\"Bitrate\\\":0,\\\"SampleRate\\\":44100,\\\"AudioChannel\\\":2,\\\"StreamSelects\\\":[]},\\\"ContainerType\\\":\\\"Video\\\",\\\"CreateTime\\\":\\\"2025-07-22T20:28:36+08:00\\\",\\\"UpdateTime\\\":\\\"2025-07-22T20:28:36+08:00\\\",\\\"TEHDConfig\\\":null,\\\"EnhanceConfig\\\":{\\\"VideoEnhance\\\":{\\\"FrameRate\\\":{\\\"Switch\\\":\\\"ON\\\",\\\"Fps\\\":0},\\\"SuperResolution\\\":{\\\"Switch\\\":\\\"ON\\\",\\\"Type\\\":\\\"hq\\\",\\\"Size\\\":2},\\\"Hdr\\\":{\\\"Switch\\\":\\\"OFF\\\",\\\"Type\\\":\\\"HDR10\\\"},\\\"Denoise\\\":{\\\"Switch\\\":\\\"OFF\\\",\\\"Type\\\":\\\"weak\\\"},\\\"ImageQualityEnhance\\\":{\\\"Switch\\\":\\\"ON\\\",\\\"Type\\\":\\\"normal\\\"},\\\"ColorEnhance\\\":{\\\"Switch\\\":\\\"ON\\\",\\\"Type\\\":\\\"weak\\\"},\\\"SharpEnhance\\\":{\\\"Switch\\\":\\\"OFF\\\",\\\"Intensity\\\":0},\\\"FaceEnhance\\\":{\\\"Switch\\\":\\\"OFF\\\",\\\"Intensity\\\":0},\\\"LowLightEnhance\\\":{\\\"Switch\\\":\\\"OFF\\\",\\\"Type\\\":\\\"normal\\\"},\\\"ScratchRepair\\\":{\\\"Switch\\\":\\\"OFF\\\",\\\"Intensity\\\":0},\\\"ArtifactRepair\\\":{\\\"Switch\\\":\\\"OFF\\\",\\\"Type\\\":\\\"weak\\\"}},\\\"AudioEnhance\\\":{\\\"Denoise\\\":{\\\"Switch\\\":\\\"OFF\\\"},\\\"Separate\\\":{\\\"Switch\\\":\\\"OFF\\\",\\\"Type\\\":\\\"normal\\\",\\\"Track\\\":\\\"vocal\\\"},\\\"VolumeBalance\\\":{\\\"Switch\\\":\\\"OFF\\\",\\\"Type\\\":\\\"loudNorm\\\"},\\\"Beautify\\\":{\\\"Switch\\\":\\\"OFF\\\",\\\"Types\\\":[\\\"declick\\\"]}}},\\\"StdExtInfo\\\":null,\\\"AliasName\\\":\\\"\\\"}\"\n }\n ],\n \"RequestId\": \"6ca31e3a-6b8e-4b4e-9256-fdc700064ef3\"\n }\n}",
902
+ "title": "获取 MPS 任务的参数模板列表"
903
+ }
904
+ ],
881
905
  "DescribeMediaInfos": [
882
906
  {
883
907
  "document": "获取媒体全部信息,不指定 Filters。",
@@ -1408,6 +1432,14 @@
1408
1432
  "title": "修改即时转码模板"
1409
1433
  }
1410
1434
  ],
1435
+ "ModifyMPSTemplate": [
1436
+ {
1437
+ "document": "",
1438
+ "input": "POST / HTTP/1.1\nHost: vod.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyMPSTemplate\n<公共请求参数>\n\n{\n \"SubAppId\": 1500000001,\n \"TemplateType\": \"Transcode\",\n \"MPSModifyTemplateParams\": \"{\\\"Definition\\\":24214,\\\"Container\\\":\\\"mp4\\\",\\\"Name\\\":\\\"test\\\",\\\"RemoveAudio\\\":1,\\\"VideoTemplate\\\":{\\\"Codec\\\":\\\"h264\\\",\\\"Fps\\\":0,\\\"Bitrate\\\":0},\\\"EnhanceConfig\\\":{\\\"VideoEnhance\\\":{\\\"FrameRate\\\":{\\\"Switch\\\":\\\"ON\\\",\\\"Fps\\\":50}}}}\"\n}",
1439
+ "output": "{\n \"Response\": {\n \"RequestId\": \"6ca31e3a-6b8e-4b4e-9256-fdc700064ef3\"\n }\n}",
1440
+ "title": "修改 MPS 音视频增强任务模板"
1441
+ }
1442
+ ],
1411
1443
  "ModifyMediaInfo": [
1412
1444
  {
1413
1445
  "document": "",
@@ -2983,6 +2983,58 @@ def doCreateContentReviewTemplate(args, parsed_globals):
2983
2983
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2984
2984
 
2985
2985
 
2986
+ def doDescribeMPSTemplates(args, parsed_globals):
2987
+ g_param = parse_global_arg(parsed_globals)
2988
+
2989
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2990
+ cred = credential.CVMRoleCredential()
2991
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2992
+ cred = credential.STSAssumeRoleCredential(
2993
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2994
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2995
+ )
2996
+ 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):
2997
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2998
+ else:
2999
+ cred = credential.Credential(
3000
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3001
+ )
3002
+ http_profile = HttpProfile(
3003
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3004
+ reqMethod="POST",
3005
+ endpoint=g_param[OptionsDefine.Endpoint],
3006
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3007
+ )
3008
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3009
+ if g_param[OptionsDefine.Language]:
3010
+ profile.language = g_param[OptionsDefine.Language]
3011
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3012
+ client = mod.VodClient(cred, g_param[OptionsDefine.Region], profile)
3013
+ client._sdkVersion += ("_CLI_" + __version__)
3014
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3015
+ model = models.DescribeMPSTemplatesRequest()
3016
+ model.from_json_string(json.dumps(args))
3017
+ start_time = time.time()
3018
+ while True:
3019
+ rsp = client.DescribeMPSTemplates(model)
3020
+ result = rsp.to_json_string()
3021
+ try:
3022
+ json_obj = json.loads(result)
3023
+ except TypeError as e:
3024
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3025
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3026
+ break
3027
+ cur_time = time.time()
3028
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3029
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3030
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3031
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3032
+ else:
3033
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3034
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3035
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3036
+
3037
+
2986
3038
  def doRebuildMedia(args, parsed_globals):
2987
3039
  g_param = parse_global_arg(parsed_globals)
2988
3040
 
@@ -5895,6 +5947,58 @@ def doDeleteWordSamples(args, parsed_globals):
5895
5947
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5896
5948
 
5897
5949
 
5950
+ def doCreateMPSTemplate(args, parsed_globals):
5951
+ g_param = parse_global_arg(parsed_globals)
5952
+
5953
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5954
+ cred = credential.CVMRoleCredential()
5955
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5956
+ cred = credential.STSAssumeRoleCredential(
5957
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5958
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5959
+ )
5960
+ 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):
5961
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5962
+ else:
5963
+ cred = credential.Credential(
5964
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5965
+ )
5966
+ http_profile = HttpProfile(
5967
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5968
+ reqMethod="POST",
5969
+ endpoint=g_param[OptionsDefine.Endpoint],
5970
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5971
+ )
5972
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5973
+ if g_param[OptionsDefine.Language]:
5974
+ profile.language = g_param[OptionsDefine.Language]
5975
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5976
+ client = mod.VodClient(cred, g_param[OptionsDefine.Region], profile)
5977
+ client._sdkVersion += ("_CLI_" + __version__)
5978
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5979
+ model = models.CreateMPSTemplateRequest()
5980
+ model.from_json_string(json.dumps(args))
5981
+ start_time = time.time()
5982
+ while True:
5983
+ rsp = client.CreateMPSTemplate(model)
5984
+ result = rsp.to_json_string()
5985
+ try:
5986
+ json_obj = json.loads(result)
5987
+ except TypeError as e:
5988
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5989
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5990
+ break
5991
+ cur_time = time.time()
5992
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5993
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5994
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5995
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5996
+ else:
5997
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5998
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5999
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6000
+
6001
+
5898
6002
  def doFastEditMedia(args, parsed_globals):
5899
6003
  g_param = parse_global_arg(parsed_globals)
5900
6004
 
@@ -7975,6 +8079,58 @@ def doDescribeDefaultDistributionConfig(args, parsed_globals):
7975
8079
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
7976
8080
 
7977
8081
 
8082
+ def doDeleteMPSTemplate(args, parsed_globals):
8083
+ g_param = parse_global_arg(parsed_globals)
8084
+
8085
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
8086
+ cred = credential.CVMRoleCredential()
8087
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
8088
+ cred = credential.STSAssumeRoleCredential(
8089
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
8090
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
8091
+ )
8092
+ 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):
8093
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
8094
+ else:
8095
+ cred = credential.Credential(
8096
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
8097
+ )
8098
+ http_profile = HttpProfile(
8099
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
8100
+ reqMethod="POST",
8101
+ endpoint=g_param[OptionsDefine.Endpoint],
8102
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
8103
+ )
8104
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
8105
+ if g_param[OptionsDefine.Language]:
8106
+ profile.language = g_param[OptionsDefine.Language]
8107
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
8108
+ client = mod.VodClient(cred, g_param[OptionsDefine.Region], profile)
8109
+ client._sdkVersion += ("_CLI_" + __version__)
8110
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
8111
+ model = models.DeleteMPSTemplateRequest()
8112
+ model.from_json_string(json.dumps(args))
8113
+ start_time = time.time()
8114
+ while True:
8115
+ rsp = client.DeleteMPSTemplate(model)
8116
+ result = rsp.to_json_string()
8117
+ try:
8118
+ json_obj = json.loads(result)
8119
+ except TypeError as e:
8120
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
8121
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
8122
+ break
8123
+ cur_time = time.time()
8124
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
8125
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
8126
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
8127
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
8128
+ else:
8129
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
8130
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
8131
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
8132
+
8133
+
7978
8134
  def doDescribeReviewTemplates(args, parsed_globals):
7979
8135
  g_param = parse_global_arg(parsed_globals)
7980
8136
 
@@ -8547,6 +8703,58 @@ def doModifyAnimatedGraphicsTemplate(args, parsed_globals):
8547
8703
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
8548
8704
 
8549
8705
 
8706
+ def doModifyMPSTemplate(args, parsed_globals):
8707
+ g_param = parse_global_arg(parsed_globals)
8708
+
8709
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
8710
+ cred = credential.CVMRoleCredential()
8711
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
8712
+ cred = credential.STSAssumeRoleCredential(
8713
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
8714
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
8715
+ )
8716
+ 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):
8717
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
8718
+ else:
8719
+ cred = credential.Credential(
8720
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
8721
+ )
8722
+ http_profile = HttpProfile(
8723
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
8724
+ reqMethod="POST",
8725
+ endpoint=g_param[OptionsDefine.Endpoint],
8726
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
8727
+ )
8728
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
8729
+ if g_param[OptionsDefine.Language]:
8730
+ profile.language = g_param[OptionsDefine.Language]
8731
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
8732
+ client = mod.VodClient(cred, g_param[OptionsDefine.Region], profile)
8733
+ client._sdkVersion += ("_CLI_" + __version__)
8734
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
8735
+ model = models.ModifyMPSTemplateRequest()
8736
+ model.from_json_string(json.dumps(args))
8737
+ start_time = time.time()
8738
+ while True:
8739
+ rsp = client.ModifyMPSTemplate(model)
8740
+ result = rsp.to_json_string()
8741
+ try:
8742
+ json_obj = json.loads(result)
8743
+ except TypeError as e:
8744
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
8745
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
8746
+ break
8747
+ cur_time = time.time()
8748
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
8749
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
8750
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
8751
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
8752
+ else:
8753
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
8754
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
8755
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
8756
+
8757
+
8550
8758
  def doAttachMediaSubtitles(args, parsed_globals):
8551
8759
  g_param = parse_global_arg(parsed_globals)
8552
8760
 
@@ -9917,6 +10125,7 @@ ACTION_MAP = {
9917
10125
  "ConfirmEvents": doConfirmEvents,
9918
10126
  "DescribeAdaptiveDynamicStreamingTemplates": doDescribeAdaptiveDynamicStreamingTemplates,
9919
10127
  "CreateContentReviewTemplate": doCreateContentReviewTemplate,
10128
+ "DescribeMPSTemplates": doDescribeMPSTemplates,
9920
10129
  "RebuildMedia": doRebuildMedia,
9921
10130
  "CreateSampleSnapshotTemplate": doCreateSampleSnapshotTemplate,
9922
10131
  "DeleteAIAnalysisTemplate": doDeleteAIAnalysisTemplate,
@@ -9973,6 +10182,7 @@ ACTION_MAP = {
9973
10182
  "ModifyWatermarkTemplate": doModifyWatermarkTemplate,
9974
10183
  "DescribeStorageDetails": doDescribeStorageDetails,
9975
10184
  "DeleteWordSamples": doDeleteWordSamples,
10185
+ "CreateMPSTemplate": doCreateMPSTemplate,
9976
10186
  "FastEditMedia": doFastEditMedia,
9977
10187
  "CreateVodDomain": doCreateVodDomain,
9978
10188
  "ProcessMedia": doProcessMedia,
@@ -10013,6 +10223,7 @@ ACTION_MAP = {
10013
10223
  "DeleteIncrementalMigrationStrategy": doDeleteIncrementalMigrationStrategy,
10014
10224
  "DescribeHeadTailTemplates": doDescribeHeadTailTemplates,
10015
10225
  "DescribeDefaultDistributionConfig": doDescribeDefaultDistributionConfig,
10226
+ "DeleteMPSTemplate": doDeleteMPSTemplate,
10016
10227
  "DescribeReviewTemplates": doDescribeReviewTemplates,
10017
10228
  "CommitUpload": doCommitUpload,
10018
10229
  "ModifyAIRecognitionTemplate": doModifyAIRecognitionTemplate,
@@ -10024,6 +10235,7 @@ ACTION_MAP = {
10024
10235
  "DescribeEnhanceMediaTemplates": doDescribeEnhanceMediaTemplates,
10025
10236
  "CreateAnimatedGraphicsTemplate": doCreateAnimatedGraphicsTemplate,
10026
10237
  "ModifyAnimatedGraphicsTemplate": doModifyAnimatedGraphicsTemplate,
10238
+ "ModifyMPSTemplate": doModifyMPSTemplate,
10027
10239
  "AttachMediaSubtitles": doAttachMediaSubtitles,
10028
10240
  "ModifyEventConfig": doModifyEventConfig,
10029
10241
  "DescribeDailyPlayStatFileList": doDescribeDailyPlayStatFileList,