tccli 3.0.1143.1__py2.py3-none-any.whl → 3.0.1145.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 (41) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/asr/v20190614/api.json +2 -2
  3. tccli/services/bpaas/v20181217/api.json +45 -1
  4. tccli/services/cdb/cdb_client.py +167 -8
  5. tccli/services/cdb/v20170320/api.json +156 -0
  6. tccli/services/cdb/v20170320/examples.json +24 -0
  7. tccli/services/ckafka/v20190819/api.json +1 -1
  8. tccli/services/ckafka/v20190819/examples.json +2 -2
  9. tccli/services/cls/v20201016/api.json +37 -0
  10. tccli/services/cwp/v20180228/api.json +76 -8
  11. tccli/services/dbbrain/v20210527/api.json +2 -2
  12. tccli/services/dbdc/v20201029/api.json +14 -12
  13. tccli/services/dbdc/v20201029/examples.json +1 -1
  14. tccli/services/dlc/v20210125/api.json +52 -2
  15. tccli/services/es/es_client.py +61 -8
  16. tccli/services/es/v20180416/api.json +83 -2
  17. tccli/services/es/v20180416/examples.json +11 -3
  18. tccli/services/fmu/v20191213/api.json +6 -6
  19. tccli/services/hunyuan/v20230901/api.json +253 -3
  20. tccli/services/hunyuan/v20230901/examples.json +24 -0
  21. tccli/services/iotexplorer/v20190423/api.json +58 -1
  22. tccli/services/iotvideo/v20211125/api.json +11 -0
  23. tccli/services/mps/mps_client.py +228 -16
  24. tccli/services/mps/v20190612/api.json +474 -1
  25. tccli/services/mps/v20190612/examples.json +32 -0
  26. tccli/services/ocr/v20181119/api.json +1 -1
  27. tccli/services/postgres/v20170312/api.json +31 -21
  28. tccli/services/postgres/v20170312/examples.json +4 -4
  29. tccli/services/smpn/v20190822/api.json +10 -10
  30. tccli/services/ssl/v20191205/api.json +30 -0
  31. tccli/services/tiia/v20190529/api.json +2 -2
  32. tccli/services/trocket/v20230308/api.json +60 -48
  33. tccli/services/trtc/v20190722/api.json +13 -4
  34. tccli/services/tsi/v20210325/api.json +2 -2
  35. tccli/services/tts/v20190823/api.json +1 -1
  36. tccli/services/vod/v20180717/api.json +20 -2
  37. {tccli-3.0.1143.1.dist-info → tccli-3.0.1145.1.dist-info}/METADATA +2 -2
  38. {tccli-3.0.1143.1.dist-info → tccli-3.0.1145.1.dist-info}/RECORD +41 -41
  39. {tccli-3.0.1143.1.dist-info → tccli-3.0.1145.1.dist-info}/WHEEL +0 -0
  40. {tccli-3.0.1143.1.dist-info → tccli-3.0.1145.1.dist-info}/entry_points.txt +0 -0
  41. {tccli-3.0.1143.1.dist-info → tccli-3.0.1145.1.dist-info}/license_files/LICENSE +0 -0
@@ -1000,7 +1000,7 @@
1000
1000
  "members": [
1001
1001
  {
1002
1002
  "disabled": false,
1003
- "document": "TWecall类型: 1-家庭安防场景; 2-穿戴类场景; 3-生活娱乐场景; 4-对讲及其它场景",
1003
+ "document": "TWecall类型: 0-测试激活码; 1-家庭安防场景; 2-穿戴类场景; 3-生活娱乐场景; 4-对讲及其它场景",
1004
1004
  "example": "1",
1005
1005
  "member": "int64",
1006
1006
  "name": "PkgType",
@@ -1031,6 +1031,16 @@
1031
1031
  "ActivateTWeCallLicenseResponse": {
1032
1032
  "document": "ActivateTWeCallLicense返回参数结构体",
1033
1033
  "members": [
1034
+ {
1035
+ "disabled": false,
1036
+ "document": "设备激活返回数据\n注意:此字段可能返回 null,表示取不到有效值。",
1037
+ "example": "无",
1038
+ "member": "DeviceActiveResult",
1039
+ "name": "DeviceList",
1040
+ "output_required": false,
1041
+ "type": "list",
1042
+ "value_allowed_null": true
1043
+ },
1034
1044
  {
1035
1045
  "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
1036
1046
  "member": "string",
@@ -2000,6 +2010,17 @@
2000
2010
  "required": false,
2001
2011
  "type": "string",
2002
2012
  "value_allowed_null": true
2013
+ },
2014
+ {
2015
+ "disabled": false,
2016
+ "document": "事件自定义数据\t\n注意:此字段可能返回 null,表示取不到有效值。",
2017
+ "example": "name",
2018
+ "member": "string",
2019
+ "name": "Data",
2020
+ "output_required": false,
2021
+ "required": false,
2022
+ "type": "string",
2023
+ "value_allowed_null": true
2003
2024
  }
2004
2025
  ],
2005
2026
  "usage": "both"
@@ -6973,6 +6994,42 @@
6973
6994
  ],
6974
6995
  "type": "object"
6975
6996
  },
6997
+ "DeviceActiveResult": {
6998
+ "document": "设备激活结果数据",
6999
+ "members": [
7000
+ {
7001
+ "disabled": false,
7002
+ "document": "模版ID\n注意:此字段可能返回 null,表示取不到有效值。",
7003
+ "example": "12374tg",
7004
+ "member": "string",
7005
+ "name": "ModelId",
7006
+ "output_required": false,
7007
+ "type": "string",
7008
+ "value_allowed_null": true
7009
+ },
7010
+ {
7011
+ "disabled": false,
7012
+ "document": "SN信息\n注意:此字段可能返回 null,表示取不到有效值。",
7013
+ "example": "product_device",
7014
+ "member": "string",
7015
+ "name": "Sn",
7016
+ "output_required": false,
7017
+ "type": "string",
7018
+ "value_allowed_null": true
7019
+ },
7020
+ {
7021
+ "disabled": false,
7022
+ "document": "设备激活状态,0:激活成功;9800020:设备数超出限制;9800040:资源包类型和设备类型不匹配;9800039:资源包余额不足;9800037:激活码序号已使用;9800038:设备有效期超出限制;\n注意:此字段可能返回 null,表示取不到有效值。",
7023
+ "example": "0",
7024
+ "member": "uint64",
7025
+ "name": "ErrCode",
7026
+ "output_required": false,
7027
+ "type": "int",
7028
+ "value_allowed_null": true
7029
+ }
7030
+ ],
7031
+ "usage": "out"
7032
+ },
6976
7033
  "DeviceData": {
6977
7034
  "document": "DeviceData",
6978
7035
  "members": [
@@ -1749,6 +1749,17 @@
1749
1749
  "required": false,
1750
1750
  "type": "string",
1751
1751
  "value_allowed_null": true
1752
+ },
1753
+ {
1754
+ "disabled": false,
1755
+ "document": "事件自定义数据\n注意:此字段可能返回 null,表示取不到有效值。",
1756
+ "example": "name",
1757
+ "member": "string",
1758
+ "name": "Data",
1759
+ "output_required": false,
1760
+ "required": false,
1761
+ "type": "string",
1762
+ "value_allowed_null": true
1752
1763
  }
1753
1764
  ],
1754
1765
  "usage": "both"
@@ -1941,6 +1941,58 @@ def doResetWorkflow(args, parsed_globals):
1941
1941
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1942
1942
 
1943
1943
 
1944
+ def doDeleteQualityControlTemplate(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.DeleteQualityControlTemplateRequest()
1974
+ model.from_json_string(json.dumps(args))
1975
+ start_time = time.time()
1976
+ while True:
1977
+ rsp = client.DeleteQualityControlTemplate(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
+
1944
1996
  def doDeleteWorkflow(args, parsed_globals):
1945
1997
  g_param = parse_global_arg(parsed_globals)
1946
1998
 
@@ -1993,6 +2045,58 @@ def doDeleteWorkflow(args, parsed_globals):
1993
2045
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1994
2046
 
1995
2047
 
2048
+ def doCreateQualityControlTemplate(args, parsed_globals):
2049
+ g_param = parse_global_arg(parsed_globals)
2050
+
2051
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2052
+ cred = credential.CVMRoleCredential()
2053
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2054
+ cred = credential.STSAssumeRoleCredential(
2055
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2056
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2057
+ )
2058
+ 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):
2059
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2060
+ else:
2061
+ cred = credential.Credential(
2062
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2063
+ )
2064
+ http_profile = HttpProfile(
2065
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2066
+ reqMethod="POST",
2067
+ endpoint=g_param[OptionsDefine.Endpoint],
2068
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2069
+ )
2070
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2071
+ if g_param[OptionsDefine.Language]:
2072
+ profile.language = g_param[OptionsDefine.Language]
2073
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2074
+ client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
2075
+ client._sdkVersion += ("_CLI_" + __version__)
2076
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2077
+ model = models.CreateQualityControlTemplateRequest()
2078
+ model.from_json_string(json.dumps(args))
2079
+ start_time = time.time()
2080
+ while True:
2081
+ rsp = client.CreateQualityControlTemplate(model)
2082
+ result = rsp.to_json_string()
2083
+ try:
2084
+ json_obj = json.loads(result)
2085
+ except TypeError as e:
2086
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2087
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2088
+ break
2089
+ cur_time = time.time()
2090
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2091
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2092
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2093
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2094
+ else:
2095
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2096
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2097
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2098
+
2099
+
1996
2100
  def doModifyImageSpriteTemplate(args, parsed_globals):
1997
2101
  g_param = parse_global_arg(parsed_globals)
1998
2102
 
@@ -2513,6 +2617,58 @@ def doCreateAIAnalysisTemplate(args, parsed_globals):
2513
2617
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2514
2618
 
2515
2619
 
2620
+ def doModifyQualityControlTemplate(args, parsed_globals):
2621
+ g_param = parse_global_arg(parsed_globals)
2622
+
2623
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2624
+ cred = credential.CVMRoleCredential()
2625
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2626
+ cred = credential.STSAssumeRoleCredential(
2627
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2628
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2629
+ )
2630
+ 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):
2631
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2632
+ else:
2633
+ cred = credential.Credential(
2634
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2635
+ )
2636
+ http_profile = HttpProfile(
2637
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2638
+ reqMethod="POST",
2639
+ endpoint=g_param[OptionsDefine.Endpoint],
2640
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2641
+ )
2642
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2643
+ if g_param[OptionsDefine.Language]:
2644
+ profile.language = g_param[OptionsDefine.Language]
2645
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2646
+ client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
2647
+ client._sdkVersion += ("_CLI_" + __version__)
2648
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2649
+ model = models.ModifyQualityControlTemplateRequest()
2650
+ model.from_json_string(json.dumps(args))
2651
+ start_time = time.time()
2652
+ while True:
2653
+ rsp = client.ModifyQualityControlTemplate(model)
2654
+ result = rsp.to_json_string()
2655
+ try:
2656
+ json_obj = json.loads(result)
2657
+ except TypeError as e:
2658
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2659
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2660
+ break
2661
+ cur_time = time.time()
2662
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2663
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2664
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2665
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2666
+ else:
2667
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2668
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2669
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2670
+
2671
+
2516
2672
  def doStopStreamLinkFlow(args, parsed_globals):
2517
2673
  g_param = parse_global_arg(parsed_globals)
2518
2674
 
@@ -2773,7 +2929,7 @@ def doModifyTranscodeTemplate(args, parsed_globals):
2773
2929
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2774
2930
 
2775
2931
 
2776
- def doDescribeContentReviewTemplates(args, parsed_globals):
2932
+ def doDescribeAIRecognitionTemplates(args, parsed_globals):
2777
2933
  g_param = parse_global_arg(parsed_globals)
2778
2934
 
2779
2935
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -2802,11 +2958,11 @@ def doDescribeContentReviewTemplates(args, parsed_globals):
2802
2958
  client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
2803
2959
  client._sdkVersion += ("_CLI_" + __version__)
2804
2960
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
2805
- model = models.DescribeContentReviewTemplatesRequest()
2961
+ model = models.DescribeAIRecognitionTemplatesRequest()
2806
2962
  model.from_json_string(json.dumps(args))
2807
2963
  start_time = time.time()
2808
2964
  while True:
2809
- rsp = client.DescribeContentReviewTemplates(model)
2965
+ rsp = client.DescribeAIRecognitionTemplates(model)
2810
2966
  result = rsp.to_json_string()
2811
2967
  try:
2812
2968
  json_obj = json.loads(result)
@@ -3189,7 +3345,7 @@ def doDescribeStreamLinkActivateState(args, parsed_globals):
3189
3345
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3190
3346
 
3191
3347
 
3192
- def doCreateImageSpriteTemplate(args, parsed_globals):
3348
+ def doCreateWatermarkTemplate(args, parsed_globals):
3193
3349
  g_param = parse_global_arg(parsed_globals)
3194
3350
 
3195
3351
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3218,11 +3374,11 @@ def doCreateImageSpriteTemplate(args, parsed_globals):
3218
3374
  client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
3219
3375
  client._sdkVersion += ("_CLI_" + __version__)
3220
3376
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3221
- model = models.CreateImageSpriteTemplateRequest()
3377
+ model = models.CreateWatermarkTemplateRequest()
3222
3378
  model.from_json_string(json.dumps(args))
3223
3379
  start_time = time.time()
3224
3380
  while True:
3225
- rsp = client.CreateImageSpriteTemplate(model)
3381
+ rsp = client.CreateWatermarkTemplate(model)
3226
3382
  result = rsp.to_json_string()
3227
3383
  try:
3228
3384
  json_obj = json.loads(result)
@@ -3917,7 +4073,7 @@ def doDescribeWatermarkTemplates(args, parsed_globals):
3917
4073
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3918
4074
 
3919
4075
 
3920
- def doCreateWatermarkTemplate(args, parsed_globals):
4076
+ def doCreateImageSpriteTemplate(args, parsed_globals):
3921
4077
  g_param = parse_global_arg(parsed_globals)
3922
4078
 
3923
4079
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3946,11 +4102,11 @@ def doCreateWatermarkTemplate(args, parsed_globals):
3946
4102
  client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
3947
4103
  client._sdkVersion += ("_CLI_" + __version__)
3948
4104
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3949
- model = models.CreateWatermarkTemplateRequest()
4105
+ model = models.CreateImageSpriteTemplateRequest()
3950
4106
  model.from_json_string(json.dumps(args))
3951
4107
  start_time = time.time()
3952
4108
  while True:
3953
- rsp = client.CreateWatermarkTemplate(model)
4109
+ rsp = client.CreateImageSpriteTemplate(model)
3954
4110
  result = rsp.to_json_string()
3955
4111
  try:
3956
4112
  json_obj = json.loads(result)
@@ -4021,7 +4177,7 @@ def doModifyStreamLinkOutputInfo(args, parsed_globals):
4021
4177
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4022
4178
 
4023
4179
 
4024
- def doDescribeAIRecognitionTemplates(args, parsed_globals):
4180
+ def doDescribeContentReviewTemplates(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 doDescribeAIRecognitionTemplates(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.DescribeAIRecognitionTemplatesRequest()
4209
+ model = models.DescribeContentReviewTemplatesRequest()
4054
4210
  model.from_json_string(json.dumps(args))
4055
4211
  start_time = time.time()
4056
4212
  while True:
4057
- rsp = client.DescribeAIRecognitionTemplates(model)
4213
+ rsp = client.DescribeContentReviewTemplates(model)
4058
4214
  result = rsp.to_json_string()
4059
4215
  try:
4060
4216
  json_obj = json.loads(result)
@@ -4749,6 +4905,58 @@ def doCreatePersonSample(args, parsed_globals):
4749
4905
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4750
4906
 
4751
4907
 
4908
+ def doDescribeQualityControlTemplates(args, parsed_globals):
4909
+ g_param = parse_global_arg(parsed_globals)
4910
+
4911
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4912
+ cred = credential.CVMRoleCredential()
4913
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4914
+ cred = credential.STSAssumeRoleCredential(
4915
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4916
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4917
+ )
4918
+ 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):
4919
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4920
+ else:
4921
+ cred = credential.Credential(
4922
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4923
+ )
4924
+ http_profile = HttpProfile(
4925
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4926
+ reqMethod="POST",
4927
+ endpoint=g_param[OptionsDefine.Endpoint],
4928
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4929
+ )
4930
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4931
+ if g_param[OptionsDefine.Language]:
4932
+ profile.language = g_param[OptionsDefine.Language]
4933
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4934
+ client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
4935
+ client._sdkVersion += ("_CLI_" + __version__)
4936
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4937
+ model = models.DescribeQualityControlTemplatesRequest()
4938
+ model.from_json_string(json.dumps(args))
4939
+ start_time = time.time()
4940
+ while True:
4941
+ rsp = client.DescribeQualityControlTemplates(model)
4942
+ result = rsp.to_json_string()
4943
+ try:
4944
+ json_obj = json.loads(result)
4945
+ except TypeError as e:
4946
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4947
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4948
+ break
4949
+ cur_time = time.time()
4950
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4951
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4952
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4953
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4954
+ else:
4955
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4956
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4957
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4958
+
4959
+
4752
4960
  def doDisableSchedule(args, parsed_globals):
4753
4961
  g_param = parse_global_arg(parsed_globals)
4754
4962
 
@@ -5265,7 +5473,9 @@ ACTION_MAP = {
5265
5473
  "DescribeMediaMetaData": doDescribeMediaMetaData,
5266
5474
  "ModifySampleSnapshotTemplate": doModifySampleSnapshotTemplate,
5267
5475
  "ResetWorkflow": doResetWorkflow,
5476
+ "DeleteQualityControlTemplate": doDeleteQualityControlTemplate,
5268
5477
  "DeleteWorkflow": doDeleteWorkflow,
5478
+ "CreateQualityControlTemplate": doCreateQualityControlTemplate,
5269
5479
  "ModifyImageSpriteTemplate": doModifyImageSpriteTemplate,
5270
5480
  "DescribeTranscodeTemplates": doDescribeTranscodeTemplates,
5271
5481
  "DeleteStreamLinkFlow": doDeleteStreamLinkFlow,
@@ -5276,12 +5486,13 @@ ACTION_MAP = {
5276
5486
  "ModifyPersonSample": doModifyPersonSample,
5277
5487
  "DeleteContentReviewTemplate": doDeleteContentReviewTemplate,
5278
5488
  "CreateAIAnalysisTemplate": doCreateAIAnalysisTemplate,
5489
+ "ModifyQualityControlTemplate": doModifyQualityControlTemplate,
5279
5490
  "StopStreamLinkFlow": doStopStreamLinkFlow,
5280
5491
  "DescribeStreamLinkEventAttachedFlows": doDescribeStreamLinkEventAttachedFlows,
5281
5492
  "ModifyStreamLinkEvent": doModifyStreamLinkEvent,
5282
5493
  "ModifyAnimatedGraphicsTemplate": doModifyAnimatedGraphicsTemplate,
5283
5494
  "ModifyTranscodeTemplate": doModifyTranscodeTemplate,
5284
- "DescribeContentReviewTemplates": doDescribeContentReviewTemplates,
5495
+ "DescribeAIRecognitionTemplates": doDescribeAIRecognitionTemplates,
5285
5496
  "DescribeStreamLinkEvents": doDescribeStreamLinkEvents,
5286
5497
  "DescribeStreamLinkFlowSRTStatistics": doDescribeStreamLinkFlowSRTStatistics,
5287
5498
  "CreateStreamLinkOutputInfo": doCreateStreamLinkOutputInfo,
@@ -5289,7 +5500,7 @@ ACTION_MAP = {
5289
5500
  "ModifyWatermarkTemplate": doModifyWatermarkTemplate,
5290
5501
  "DeleteWordSamples": doDeleteWordSamples,
5291
5502
  "DescribeStreamLinkActivateState": doDescribeStreamLinkActivateState,
5292
- "CreateImageSpriteTemplate": doCreateImageSpriteTemplate,
5503
+ "CreateWatermarkTemplate": doCreateWatermarkTemplate,
5293
5504
  "DescribePersonSamples": doDescribePersonSamples,
5294
5505
  "ParseNotification": doParseNotification,
5295
5506
  "DeleteAIRecognitionTemplate": doDeleteAIRecognitionTemplate,
@@ -5303,9 +5514,9 @@ ACTION_MAP = {
5303
5514
  "ModifyWordSample": doModifyWordSample,
5304
5515
  "DescribeImageSpriteTemplates": doDescribeImageSpriteTemplates,
5305
5516
  "DescribeWatermarkTemplates": doDescribeWatermarkTemplates,
5306
- "CreateWatermarkTemplate": doCreateWatermarkTemplate,
5517
+ "CreateImageSpriteTemplate": doCreateImageSpriteTemplate,
5307
5518
  "ModifyStreamLinkOutputInfo": doModifyStreamLinkOutputInfo,
5308
- "DescribeAIRecognitionTemplates": doDescribeAIRecognitionTemplates,
5519
+ "DescribeContentReviewTemplates": doDescribeContentReviewTemplates,
5309
5520
  "WithdrawsWatermark": doWithdrawsWatermark,
5310
5521
  "DescribeStreamLinkFlow": doDescribeStreamLinkFlow,
5311
5522
  "DeleteSchedule": doDeleteSchedule,
@@ -5319,6 +5530,7 @@ ACTION_MAP = {
5319
5530
  "DescribeStreamLinkFlowMediaStatistics": doDescribeStreamLinkFlowMediaStatistics,
5320
5531
  "CreateStreamLinkEvent": doCreateStreamLinkEvent,
5321
5532
  "CreatePersonSample": doCreatePersonSample,
5533
+ "DescribeQualityControlTemplates": doDescribeQualityControlTemplates,
5322
5534
  "DisableSchedule": doDisableSchedule,
5323
5535
  "CreateStreamLinkInput": doCreateStreamLinkInput,
5324
5536
  "ModifyContentReviewTemplate": doModifyContentReviewTemplate,