tccli 3.0.1144.1__py2.py3-none-any.whl → 3.0.1146.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 (35) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/asr/v20190614/api.json +2 -2
  3. tccli/services/cdb/cdb_client.py +167 -8
  4. tccli/services/cdb/v20170320/api.json +158 -2
  5. tccli/services/cdb/v20170320/examples.json +24 -0
  6. tccli/services/ckafka/v20190819/api.json +1 -1
  7. tccli/services/ckafka/v20190819/examples.json +2 -2
  8. tccli/services/dbdc/v20201029/api.json +14 -12
  9. tccli/services/dbdc/v20201029/examples.json +1 -1
  10. tccli/services/dlc/v20210125/api.json +52 -2
  11. tccli/services/emr/v20190103/api.json +5 -5
  12. tccli/services/es/es_client.py +61 -8
  13. tccli/services/es/v20180416/api.json +96 -2
  14. tccli/services/es/v20180416/examples.json +11 -3
  15. tccli/services/ess/v20201111/api.json +9 -0
  16. tccli/services/essbasic/v20210526/api.json +24 -15
  17. tccli/services/iotexplorer/v20190423/api.json +11 -0
  18. tccli/services/iotvideo/v20211125/api.json +11 -0
  19. tccli/services/lke/v20231130/api.json +11 -1
  20. tccli/services/mps/mps_client.py +228 -16
  21. tccli/services/mps/v20190612/api.json +494 -1
  22. tccli/services/mps/v20190612/examples.json +32 -0
  23. tccli/services/ocr/v20181119/api.json +9 -0
  24. tccli/services/smpn/smpn_client.py +0 -159
  25. tccli/services/smpn/v20190822/api.json +4 -316
  26. tccli/services/smpn/v20190822/examples.json +0 -24
  27. tccli/services/tke/v20180525/api.json +3 -0
  28. tccli/services/trtc/v20190722/api.json +13 -4
  29. tccli/services/tsi/v20210325/api.json +2 -2
  30. tccli/services/tts/v20190823/api.json +1 -1
  31. {tccli-3.0.1144.1.dist-info → tccli-3.0.1146.1.dist-info}/METADATA +2 -2
  32. {tccli-3.0.1144.1.dist-info → tccli-3.0.1146.1.dist-info}/RECORD +35 -35
  33. {tccli-3.0.1144.1.dist-info → tccli-3.0.1146.1.dist-info}/WHEEL +0 -0
  34. {tccli-3.0.1144.1.dist-info → tccli-3.0.1146.1.dist-info}/entry_points.txt +0 -0
  35. {tccli-3.0.1144.1.dist-info → tccli-3.0.1146.1.dist-info}/license_files/LICENSE +0 -0
@@ -2921,6 +2921,15 @@
2921
2921
  "name": "Agent",
2922
2922
  "required": false,
2923
2923
  "type": "object"
2924
+ },
2925
+ {
2926
+ "disabled": false,
2927
+ "document": "链接/二维码的有效截止时间,格式为unix时间戳。最长不超过 2099年12月31日(4102415999)。\n默认值为有效期为当前时间后7天。",
2928
+ "example": "无",
2929
+ "member": "uint64",
2930
+ "name": "ExpiredOn",
2931
+ "required": false,
2932
+ "type": "int"
2924
2933
  }
2925
2934
  ],
2926
2935
  "type": "object"
@@ -6233,6 +6233,15 @@
6233
6233
  "name": "FlowId",
6234
6234
  "required": true,
6235
6235
  "type": "string"
6236
+ },
6237
+ {
6238
+ "disabled": false,
6239
+ "document": "链接/二维码的有效截止时间,格式为unix时间戳。最长不超过 2099年12月31日(4102415999)。\n默认值为有效期为当前时间后7天。",
6240
+ "example": "无",
6241
+ "member": "uint64",
6242
+ "name": "ExpiredOn",
6243
+ "required": false,
6244
+ "type": "int"
6236
6245
  }
6237
6246
  ],
6238
6247
  "type": "object"
@@ -7701,7 +7710,7 @@
7701
7710
  },
7702
7711
  {
7703
7712
  "disabled": false,
7704
- "document": "合同模板ID数组,每一个合同模板ID为32位字符串, 最多支持200个模板的批量查询。\n\n注意: \n1.` 此参数TemplateIds与TemplateId互为独立,若两者均传入,以TemplateId为准。`\n2. `请确保每个模板均正确且属于当前企业,若有任一模板不存在,则返回错误。`\n4. `若传递此参数,分页参数(Limit,Offset)无效`\n\n\n[点击查看模板Id在控制台上的位置](https://qcloudimg.tencent-cloud.cn/raw/e988be12bf28a89b4716aed4502c2e02.png)\n",
7713
+ "document": "合同模板ID数组,每一个合同模板ID为32位字符串, 最多支持100个模板的批量查询。\n\n注意: \n1.` 此参数TemplateIds与TemplateId互为独立,若两者均传入,以TemplateId为准。`\n2. `请确保每个模板均正确且属于当前企业,若有任一模板不存在,则返回错误。`\n4. `若传递此参数,分页参数(Limit,Offset)无效`\n\n\n[点击查看模板Id在控制台上的位置](https://qcloudimg.tencent-cloud.cn/raw/e988be12bf28a89b4716aed4502c2e02.png)\n",
7705
7714
  "example": "无",
7706
7715
  "member": "string",
7707
7716
  "name": "TemplateIds",
@@ -7710,7 +7719,7 @@
7710
7719
  },
7711
7720
  {
7712
7721
  "disabled": false,
7713
- "document": "指定每页返回的数据条数,和Offset参数配合使用。\n\n注:`1.默认值为20,单页做大值为200。`",
7722
+ "document": "指定每页返回的数据条数,和Offset参数配合使用。\n\n注:`1.默认值为20,单页做大值为100。`",
7714
7723
  "example": "无",
7715
7724
  "member": "uint64",
7716
7725
  "name": "Limit",
@@ -11322,27 +11331,27 @@
11322
11331
  "example": "无",
11323
11332
  "member": "string",
11324
11333
  "name": "UserId",
11325
- "required": true,
11334
+ "output_required": true,
11326
11335
  "type": "string",
11327
11336
  "value_allowed_null": false
11328
11337
  },
11329
11338
  {
11330
11339
  "disabled": false,
11331
- "document": "显示的员工名",
11340
+ "document": "显示的员工名\n注意:2024-07-08 及之后创建的应用号,该字段返回的是打码信息",
11332
11341
  "example": "无",
11333
11342
  "member": "string",
11334
11343
  "name": "DisplayName",
11335
- "required": true,
11344
+ "output_required": true,
11336
11345
  "type": "string",
11337
11346
  "value_allowed_null": false
11338
11347
  },
11339
11348
  {
11340
11349
  "disabled": false,
11341
- "document": "员工手机号",
11350
+ "document": "员工手机号\n注意:2024-07-08 及之后创建的应用号,该字段返回的是打码信息",
11342
11351
  "example": "无",
11343
11352
  "member": "string",
11344
11353
  "name": "Mobile",
11345
- "required": true,
11354
+ "output_required": true,
11346
11355
  "type": "string",
11347
11356
  "value_allowed_null": false
11348
11357
  },
@@ -11352,7 +11361,7 @@
11352
11361
  "example": "无",
11353
11362
  "member": "string",
11354
11363
  "name": "Email",
11355
- "required": true,
11364
+ "output_required": true,
11356
11365
  "type": "string",
11357
11366
  "value_allowed_null": true
11358
11367
  },
@@ -11362,7 +11371,7 @@
11362
11371
  "example": "无",
11363
11372
  "member": "string",
11364
11373
  "name": "OpenId",
11365
- "required": true,
11374
+ "output_required": true,
11366
11375
  "type": "string",
11367
11376
  "value_allowed_null": true
11368
11377
  },
@@ -11372,7 +11381,7 @@
11372
11381
  "example": "无",
11373
11382
  "member": "StaffRole",
11374
11383
  "name": "Roles",
11375
- "required": true,
11384
+ "output_required": true,
11376
11385
  "type": "list",
11377
11386
  "value_allowed_null": true
11378
11387
  },
@@ -11382,7 +11391,7 @@
11382
11391
  "example": "无",
11383
11392
  "member": "Department",
11384
11393
  "name": "Department",
11385
- "required": true,
11394
+ "output_required": true,
11386
11395
  "type": "object",
11387
11396
  "value_allowed_null": true
11388
11397
  },
@@ -11392,7 +11401,7 @@
11392
11401
  "example": "无",
11393
11402
  "member": "bool",
11394
11403
  "name": "Verified",
11395
- "required": true,
11404
+ "output_required": true,
11396
11405
  "type": "bool",
11397
11406
  "value_allowed_null": false
11398
11407
  },
@@ -11402,7 +11411,7 @@
11402
11411
  "example": "无",
11403
11412
  "member": "int64",
11404
11413
  "name": "CreatedOn",
11405
- "required": true,
11414
+ "output_required": true,
11406
11415
  "type": "int",
11407
11416
  "value_allowed_null": false
11408
11417
  },
@@ -11412,7 +11421,7 @@
11412
11421
  "example": "无",
11413
11422
  "member": "int64",
11414
11423
  "name": "VerifiedOn",
11415
- "required": true,
11424
+ "output_required": true,
11416
11425
  "type": "int",
11417
11426
  "value_allowed_null": false
11418
11427
  },
@@ -11422,7 +11431,7 @@
11422
11431
  "example": "无",
11423
11432
  "member": "int64",
11424
11433
  "name": "QuiteJob",
11425
- "required": true,
11434
+ "output_required": true,
11426
11435
  "type": "int",
11427
11436
  "value_allowed_null": false
11428
11437
  }
@@ -2010,6 +2010,17 @@
2010
2010
  "required": false,
2011
2011
  "type": "string",
2012
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
2013
2024
  }
2014
2025
  ],
2015
2026
  "usage": "both"
@@ -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"
@@ -477,7 +477,7 @@
477
477
  "status": "online"
478
478
  },
479
479
  "ParseDoc": {
480
- "document": "接口即将下线,请切换使用新接口:[文档解析](https://cloud.tencent.com/document/product/1759/107504)\n解析拆分文档。该接口需开通文档解析原子能力后调用。文档解析原子能力内测中,如有需要请联系架构师或 [联系客服](https://cloud.tencent.com/act/event/Online_service) 。",
480
+ "document": "接口即将下线,请切换使用新接口:[文档解析](https://cloud.tencent.com/document/product/1759/107504)",
481
481
  "input": "ParseDocRequest",
482
482
  "name": "文档解析旧版(请迁移新接口)",
483
483
  "output": "ParseDocResponse",
@@ -6026,6 +6026,16 @@
6026
6026
  "output_required": false,
6027
6027
  "type": "string",
6028
6028
  "value_allowed_null": true
6029
+ },
6030
+ {
6031
+ "disabled": false,
6032
+ "document": "是否允许重试,0:否,1:是\n注意:此字段可能返回 null,表示取不到有效值。",
6033
+ "example": "无",
6034
+ "member": "bool",
6035
+ "name": "IsAllowRetry",
6036
+ "output_required": false,
6037
+ "type": "bool",
6038
+ "value_allowed_null": true
6029
6039
  }
6030
6040
  ],
6031
6041
  "usage": "out"
@@ -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,