tccli 3.0.1285.1__py2.py3-none-any.whl → 3.0.1287.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 (37) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/autoscaling/autoscaling_client.py +53 -0
  3. tccli/services/autoscaling/v20180419/api.json +53 -0
  4. tccli/services/autoscaling/v20180419/examples.json +8 -0
  5. tccli/services/cdc/v20201214/api.json +107 -97
  6. tccli/services/cdwch/v20200915/api.json +70 -2
  7. tccli/services/cdwch/v20200915/examples.json +2 -2
  8. tccli/services/cdz/v20221123/api.json +10 -10
  9. tccli/services/cynosdb/v20190107/api.json +298 -298
  10. tccli/services/dbbrain/v20210527/api.json +11 -2
  11. tccli/services/dlc/dlc_client.py +61 -8
  12. tccli/services/dlc/v20210125/api.json +252 -1
  13. tccli/services/dlc/v20210125/examples.json +9 -1
  14. tccli/services/hunyuan/hunyuan_client.py +53 -0
  15. tccli/services/hunyuan/v20230901/api.json +284 -0
  16. tccli/services/hunyuan/v20230901/examples.json +8 -0
  17. tccli/services/lcic/v20220817/api.json +2 -2
  18. tccli/services/lighthouse/v20200324/api.json +47 -47
  19. tccli/services/lke/v20231130/api.json +6 -6
  20. tccli/services/ocr/v20181119/api.json +36 -0
  21. tccli/services/ssl/v20191205/api.json +317 -317
  22. tccli/services/ssl/v20191205/examples.json +6 -6
  23. tccli/services/tat/v20201028/examples.json +1 -1
  24. tccli/services/tchd/tchd_client.py +53 -0
  25. tccli/services/tchd/v20230306/api.json +89 -0
  26. tccli/services/tchd/v20230306/examples.json +8 -0
  27. tccli/services/tdmq/v20200217/api.json +1 -1
  28. tccli/services/tiw/tiw_client.py +91 -1416
  29. tccli/services/tiw/v20190919/api.json +351 -2897
  30. tccli/services/tiw/v20190919/examples.json +6 -206
  31. tccli/services/wedata/v20210820/api.json +124 -204
  32. tccli/services/wedata/v20210820/examples.json +7 -1
  33. {tccli-3.0.1285.1.dist-info → tccli-3.0.1287.1.dist-info}/METADATA +2 -2
  34. {tccli-3.0.1285.1.dist-info → tccli-3.0.1287.1.dist-info}/RECORD +37 -37
  35. {tccli-3.0.1285.1.dist-info → tccli-3.0.1287.1.dist-info}/WHEEL +0 -0
  36. {tccli-3.0.1285.1.dist-info → tccli-3.0.1287.1.dist-info}/entry_points.txt +0 -0
  37. {tccli-3.0.1285.1.dist-info → tccli-3.0.1287.1.dist-info}/license_files/LICENSE +0 -0
@@ -2863,6 +2863,15 @@
2863
2863
  "required": false,
2864
2864
  "type": "list"
2865
2865
  },
2866
+ {
2867
+ "disabled": false,
2868
+ "document": "服务产品类型,支持值包括:\"mysql\" - 云数据库 MySQL,\"redis\" - 云数据库 Redis,默认为\"mysql\"。",
2869
+ "example": "mysql",
2870
+ "member": "string",
2871
+ "name": "Product",
2872
+ "required": false,
2873
+ "type": "string"
2874
+ },
2866
2875
  {
2867
2876
  "disabled": false,
2868
2877
  "document": "偏移量,默认0。",
@@ -2893,7 +2902,7 @@
2893
2902
  "example": "1",
2894
2903
  "member": "int64",
2895
2904
  "name": "TotalCount",
2896
- "required": true,
2905
+ "output_required": true,
2897
2906
  "type": "int",
2898
2907
  "value_allowed_null": false
2899
2908
  },
@@ -2903,7 +2912,7 @@
2903
2912
  "example": "无",
2904
2913
  "member": "DiagHistoryEventItem",
2905
2914
  "name": "Items",
2906
- "required": true,
2915
+ "output_required": true,
2907
2916
  "type": "list",
2908
2917
  "value_allowed_null": false
2909
2918
  },
@@ -381,7 +381,7 @@ def doDescribeWorkGroupInfo(args, parsed_globals):
381
381
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
382
382
 
383
383
 
384
- def doListTaskJobLogName(args, parsed_globals):
384
+ def doDescribeTaskMonitorInfos(args, parsed_globals):
385
385
  g_param = parse_global_arg(parsed_globals)
386
386
 
387
387
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -410,11 +410,11 @@ def doListTaskJobLogName(args, parsed_globals):
410
410
  client = mod.DlcClient(cred, g_param[OptionsDefine.Region], profile)
411
411
  client._sdkVersion += ("_CLI_" + __version__)
412
412
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
413
- model = models.ListTaskJobLogNameRequest()
413
+ model = models.DescribeTaskMonitorInfosRequest()
414
414
  model.from_json_string(json.dumps(args))
415
415
  start_time = time.time()
416
416
  while True:
417
- rsp = client.ListTaskJobLogName(model)
417
+ rsp = client.DescribeTaskMonitorInfos(model)
418
418
  result = rsp.to_json_string()
419
419
  try:
420
420
  json_obj = json.loads(result)
@@ -1785,7 +1785,7 @@ def doDescribeTables(args, parsed_globals):
1785
1785
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1786
1786
 
1787
1787
 
1788
- def doModifySparkAppBatch(args, parsed_globals):
1788
+ def doListTaskJobLogName(args, parsed_globals):
1789
1789
  g_param = parse_global_arg(parsed_globals)
1790
1790
 
1791
1791
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1814,11 +1814,11 @@ def doModifySparkAppBatch(args, parsed_globals):
1814
1814
  client = mod.DlcClient(cred, g_param[OptionsDefine.Region], profile)
1815
1815
  client._sdkVersion += ("_CLI_" + __version__)
1816
1816
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1817
- model = models.ModifySparkAppBatchRequest()
1817
+ model = models.ListTaskJobLogNameRequest()
1818
1818
  model.from_json_string(json.dumps(args))
1819
1819
  start_time = time.time()
1820
1820
  while True:
1821
- rsp = client.ModifySparkAppBatch(model)
1821
+ rsp = client.ListTaskJobLogName(model)
1822
1822
  result = rsp.to_json_string()
1823
1823
  try:
1824
1824
  json_obj = json.loads(result)
@@ -6829,6 +6829,58 @@ def doDeleteThirdPartyAccessUser(args, parsed_globals):
6829
6829
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6830
6830
 
6831
6831
 
6832
+ def doModifySparkAppBatch(args, parsed_globals):
6833
+ g_param = parse_global_arg(parsed_globals)
6834
+
6835
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
6836
+ cred = credential.CVMRoleCredential()
6837
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
6838
+ cred = credential.STSAssumeRoleCredential(
6839
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
6840
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
6841
+ )
6842
+ 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):
6843
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
6844
+ else:
6845
+ cred = credential.Credential(
6846
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
6847
+ )
6848
+ http_profile = HttpProfile(
6849
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
6850
+ reqMethod="POST",
6851
+ endpoint=g_param[OptionsDefine.Endpoint],
6852
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
6853
+ )
6854
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
6855
+ if g_param[OptionsDefine.Language]:
6856
+ profile.language = g_param[OptionsDefine.Language]
6857
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
6858
+ client = mod.DlcClient(cred, g_param[OptionsDefine.Region], profile)
6859
+ client._sdkVersion += ("_CLI_" + __version__)
6860
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
6861
+ model = models.ModifySparkAppBatchRequest()
6862
+ model.from_json_string(json.dumps(args))
6863
+ start_time = time.time()
6864
+ while True:
6865
+ rsp = client.ModifySparkAppBatch(model)
6866
+ result = rsp.to_json_string()
6867
+ try:
6868
+ json_obj = json.loads(result)
6869
+ except TypeError as e:
6870
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
6871
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
6872
+ break
6873
+ cur_time = time.time()
6874
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
6875
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
6876
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
6877
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
6878
+ else:
6879
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
6880
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
6881
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6882
+
6883
+
6832
6884
  def doDescribeDMSDatabase(args, parsed_globals):
6833
6885
  g_param = parse_global_arg(parsed_globals)
6834
6886
 
@@ -7523,7 +7575,7 @@ ACTION_MAP = {
7523
7575
  "DescribeUserRoles": doDescribeUserRoles,
7524
7576
  "ModifyUserType": doModifyUserType,
7525
7577
  "DescribeWorkGroupInfo": doDescribeWorkGroupInfo,
7526
- "ListTaskJobLogName": doListTaskJobLogName,
7578
+ "DescribeTaskMonitorInfos": doDescribeTaskMonitorInfos,
7527
7579
  "DescribeNotebookSession": doDescribeNotebookSession,
7528
7580
  "CreateNotebookSession": doCreateNotebookSession,
7529
7581
  "DeleteWorkGroup": doDeleteWorkGroup,
@@ -7550,7 +7602,7 @@ ACTION_MAP = {
7550
7602
  "RevokeDLCCatalogAccess": doRevokeDLCCatalogAccess,
7551
7603
  "CreateUser": doCreateUser,
7552
7604
  "DescribeTables": doDescribeTables,
7553
- "ModifySparkAppBatch": doModifySparkAppBatch,
7605
+ "ListTaskJobLogName": doListTaskJobLogName,
7554
7606
  "DescribeNotebookSessions": doDescribeNotebookSessions,
7555
7607
  "DescribeLakeFsTaskResult": doDescribeLakeFsTaskResult,
7556
7608
  "AddOptimizerEngines": doAddOptimizerEngines,
@@ -7647,6 +7699,7 @@ ACTION_MAP = {
7647
7699
  "ModifySparkApp": doModifySparkApp,
7648
7700
  "DescribeViews": doDescribeViews,
7649
7701
  "DeleteThirdPartyAccessUser": doDeleteThirdPartyAccessUser,
7702
+ "ModifySparkAppBatch": doModifySparkAppBatch,
7650
7703
  "DescribeDMSDatabase": doDescribeDMSDatabase,
7651
7704
  "BindWorkGroupsToUser": doBindWorkGroupsToUser,
7652
7705
  "DescribeUserDataEngineConfig": doDescribeUserDataEngineConfig,
@@ -637,6 +637,13 @@
637
637
  "output": "DescribeTaskLogResponse",
638
638
  "status": "online"
639
639
  },
640
+ "DescribeTaskMonitorInfos": {
641
+ "document": "查询任务监控指标信息",
642
+ "input": "DescribeTaskMonitorInfosRequest",
643
+ "name": "查询任务监控信息",
644
+ "output": "DescribeTaskMonitorInfosResponse",
645
+ "status": "online"
646
+ },
640
647
  "DescribeTaskResult": {
641
648
  "document": "查询任务结果,仅支持30天以内的任务查询结果,且返回数据大小超过近50M会进行截断。",
642
649
  "input": "DescribeTaskResultRequest",
@@ -1093,7 +1100,44 @@
1093
1100
  },
1094
1101
  "AddOptimizerEnginesRequest": {
1095
1102
  "document": "AddOptimizerEngines请求参数结构体",
1096
- "members": [],
1103
+ "members": [
1104
+ {
1105
+ "disabled": false,
1106
+ "document": "数据目录名称",
1107
+ "example": "DataLakeCatalog",
1108
+ "member": "string",
1109
+ "name": "Catalog",
1110
+ "required": true,
1111
+ "type": "string"
1112
+ },
1113
+ {
1114
+ "disabled": false,
1115
+ "document": "引擎信息列表",
1116
+ "example": "无",
1117
+ "member": "OptimizerEngineInfo",
1118
+ "name": "Engines",
1119
+ "required": true,
1120
+ "type": "list"
1121
+ },
1122
+ {
1123
+ "disabled": false,
1124
+ "document": "数据库名称",
1125
+ "example": "test_db",
1126
+ "member": "string",
1127
+ "name": "Database",
1128
+ "required": false,
1129
+ "type": "string"
1130
+ },
1131
+ {
1132
+ "disabled": false,
1133
+ "document": "数据表名称",
1134
+ "example": "test_tb",
1135
+ "member": "string",
1136
+ "name": "Table",
1137
+ "required": false,
1138
+ "type": "string"
1139
+ }
1140
+ ],
1097
1141
  "type": "object"
1098
1142
  },
1099
1143
  "AddOptimizerEnginesResponse": {
@@ -11125,6 +11169,98 @@
11125
11169
  ],
11126
11170
  "type": "object"
11127
11171
  },
11172
+ "DescribeTaskMonitorInfosRequest": {
11173
+ "document": "DescribeTaskMonitorInfos请求参数结构体",
11174
+ "members": [
11175
+ {
11176
+ "disabled": false,
11177
+ "document": "任务ID列表,上限50个",
11178
+ "example": "[\"bba8a49efe4911ef9e535254001a35f3\",\"bba8a49efe4911ef9e535254001a3523]",
11179
+ "member": "string",
11180
+ "name": "TaskIdList",
11181
+ "required": false,
11182
+ "type": "list"
11183
+ },
11184
+ {
11185
+ "disabled": false,
11186
+ "document": "引擎名称",
11187
+ "example": "uanalysis_dlc_presto_512s",
11188
+ "member": "string",
11189
+ "name": "HouseName",
11190
+ "required": false,
11191
+ "type": "string"
11192
+ },
11193
+ {
11194
+ "disabled": false,
11195
+ "document": "任务创建时间的起始时间",
11196
+ "example": "20250301",
11197
+ "member": "string",
11198
+ "name": "CreateTimeStart",
11199
+ "required": false,
11200
+ "type": "string"
11201
+ },
11202
+ {
11203
+ "disabled": false,
11204
+ "document": "任务创建时间的结束时间",
11205
+ "example": "20250302",
11206
+ "member": "string",
11207
+ "name": "CreateTimeEnd",
11208
+ "required": false,
11209
+ "type": "string"
11210
+ },
11211
+ {
11212
+ "disabled": false,
11213
+ "document": "每一页条数",
11214
+ "example": "100",
11215
+ "member": "int64",
11216
+ "name": "Limit",
11217
+ "required": false,
11218
+ "type": "int"
11219
+ },
11220
+ {
11221
+ "disabled": false,
11222
+ "document": "偏移量",
11223
+ "example": "100",
11224
+ "member": "int64",
11225
+ "name": "Offset",
11226
+ "required": false,
11227
+ "type": "int"
11228
+ }
11229
+ ],
11230
+ "type": "object"
11231
+ },
11232
+ "DescribeTaskMonitorInfosResponse": {
11233
+ "document": "DescribeTaskMonitorInfos返回参数结构体",
11234
+ "members": [
11235
+ {
11236
+ "disabled": false,
11237
+ "document": "任务监控信息列表",
11238
+ "example": "无",
11239
+ "member": "TaskMonitorInfo",
11240
+ "name": "TaskMonitorInfoList",
11241
+ "output_required": true,
11242
+ "type": "list",
11243
+ "value_allowed_null": false
11244
+ },
11245
+ {
11246
+ "disabled": false,
11247
+ "document": "任务总数",
11248
+ "example": "10",
11249
+ "member": "int64",
11250
+ "name": "TotalCount",
11251
+ "output_required": true,
11252
+ "type": "int",
11253
+ "value_allowed_null": false
11254
+ },
11255
+ {
11256
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
11257
+ "member": "string",
11258
+ "name": "RequestId",
11259
+ "type": "string"
11260
+ }
11261
+ ],
11262
+ "type": "object"
11263
+ },
11128
11264
  "DescribeTaskResultRequest": {
11129
11265
  "document": "DescribeTaskResult请求参数结构体",
11130
11266
  "members": [
@@ -15375,6 +15511,45 @@
15375
15511
  ],
15376
15512
  "usage": "out"
15377
15513
  },
15514
+ "OptimizerEngineInfo": {
15515
+ "document": "数据优化引擎信息",
15516
+ "members": [
15517
+ {
15518
+ "disabled": false,
15519
+ "document": "引擎资源名称\n注意:此字段可能返回 null,表示取不到有效值。",
15520
+ "example": "test_engine",
15521
+ "member": "string",
15522
+ "name": "HouseName",
15523
+ "output_required": true,
15524
+ "required": true,
15525
+ "type": "string",
15526
+ "value_allowed_null": true
15527
+ },
15528
+ {
15529
+ "disabled": false,
15530
+ "document": "引擎资源ID\n注意:此字段可能返回 null,表示取不到有效值。",
15531
+ "example": "DataEngine-123456",
15532
+ "member": "string",
15533
+ "name": "HouseId",
15534
+ "output_required": true,
15535
+ "required": true,
15536
+ "type": "string",
15537
+ "value_allowed_null": true
15538
+ },
15539
+ {
15540
+ "disabled": false,
15541
+ "document": "该参数仅针对spark作业引擎有效,用于执行数据优化任务的资源大小,不填时将采用该引擎所有资源\n注意:此字段可能返回 null,表示取不到有效值。",
15542
+ "example": "36",
15543
+ "member": "int64",
15544
+ "name": "HouseSize",
15545
+ "output_required": true,
15546
+ "required": false,
15547
+ "type": "int",
15548
+ "value_allowed_null": true
15549
+ }
15550
+ ],
15551
+ "usage": "both"
15552
+ },
15378
15553
  "Other": {
15379
15554
  "document": "数据格式其它类型。",
15380
15555
  "members": [
@@ -18373,6 +18548,82 @@
18373
18548
  ],
18374
18549
  "usage": "in"
18375
18550
  },
18551
+ "TaskMonitorInfo": {
18552
+ "document": "任务监控信息",
18553
+ "members": [
18554
+ {
18555
+ "disabled": false,
18556
+ "document": "任务id",
18557
+ "example": "3c2c581afe4d11efbde1525400b3a056",
18558
+ "member": "string",
18559
+ "name": "TaskId",
18560
+ "output_required": false,
18561
+ "type": "string",
18562
+ "value_allowed_null": false
18563
+ },
18564
+ {
18565
+ "disabled": false,
18566
+ "document": "引擎名称",
18567
+ "example": "engine1",
18568
+ "member": "string",
18569
+ "name": "HouseName",
18570
+ "output_required": false,
18571
+ "type": "string",
18572
+ "value_allowed_null": false
18573
+ },
18574
+ {
18575
+ "disabled": false,
18576
+ "document": "sql语句",
18577
+ "example": "select 1;",
18578
+ "member": "string",
18579
+ "name": "QuerySQL",
18580
+ "output_required": false,
18581
+ "type": "string",
18582
+ "value_allowed_null": false
18583
+ },
18584
+ {
18585
+ "disabled": false,
18586
+ "document": "任务时间",
18587
+ "example": "2023-08-10T12:35:02.123Z",
18588
+ "member": "string",
18589
+ "name": "CreateTime",
18590
+ "output_required": false,
18591
+ "type": "string",
18592
+ "value_allowed_null": false
18593
+ },
18594
+ {
18595
+ "disabled": false,
18596
+ "document": "执行时间",
18597
+ "example": "100",
18598
+ "member": "string",
18599
+ "name": "UsedTime",
18600
+ "output_required": false,
18601
+ "type": "string",
18602
+ "value_allowed_null": false
18603
+ },
18604
+ {
18605
+ "disabled": false,
18606
+ "document": "数据扫描量",
18607
+ "example": "1024",
18608
+ "member": "string",
18609
+ "name": "DataAmount",
18610
+ "output_required": false,
18611
+ "type": "string",
18612
+ "value_allowed_null": false
18613
+ },
18614
+ {
18615
+ "disabled": false,
18616
+ "document": "指标信息",
18617
+ "example": "{\"elapsedTime\": \"5.34s\", \"executionTime\": \"4.89s\", \"cumulativeUserMemory\": 1234567.89, \"peakUserMemoryReservation\": \"64MB\", \"totalBytes\": \"1.23MB\", \"totalRows\": 1000 }",
18618
+ "member": "string",
18619
+ "name": "QueryStats",
18620
+ "output_required": false,
18621
+ "type": "string",
18622
+ "value_allowed_null": false
18623
+ }
18624
+ ],
18625
+ "usage": "out"
18626
+ },
18376
18627
  "TaskResponseInfo": {
18377
18628
  "document": "任务实例。",
18378
18629
  "members": [
@@ -11,7 +11,7 @@
11
11
  "AddOptimizerEngines": [
12
12
  {
13
13
  "document": "",
14
- "input": "POST / HTTP/1.1\nHost: dlc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddOptimizerEngines\n<公共请求参数>\n\n{}",
14
+ "input": "POST / HTTP/1.1\nHost: dlc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: AddOptimizerEngines\n<公共请求参数>\n\n{\n \"Catalog\": \"DataLakeCatalog\",\n \"Engines\": [\n {\n \"HouseName\": \"test_engine\",\n \"HouseId\": \"DataEngine-123\",\n \"HouseSize\": 0\n }\n ],\n \"Database\": \"mydb\",\n \"Table\": \"mytb\"\n}",
15
15
  "output": "{\n \"Response\": {\n \"RequestId\": \"1304581893_25027_1709796072623_223\"\n }\n}",
16
16
  "title": "实例一"
17
17
  }
@@ -734,6 +734,14 @@
734
734
  "title": "获取spark 作业任务日志详情"
735
735
  }
736
736
  ],
737
+ "DescribeTaskMonitorInfos": [
738
+ {
739
+ "document": "",
740
+ "input": "POST / HTTP/1.1\nHost: dlc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTaskMonitorInfos\n<公共请求参数>\n\n{\n \"TaskIdList\": [\n \"bba8a49efe4911ef9e535254001a35f3\"\n ],\n \"HouseName\": \"engine1\",\n \"CreateTimeStart\": \"20250301\",\n \"CreateTimeEnd\": \"20250302\",\n \"Limit\": 100,\n \"Offset\": 0\n}",
741
+ "output": "{\n \"Response\": {\n \"RequestId\": \"9a79d797-2c6c-4773-a983-895e401b0a86\",\n \"TaskMonitorInfoList\": [\n {\n \"TaskId\": \"bba8a49efe4911ef9e535254001a35f3\",\n \"HouseName\": \"engine1\",\n \"QuerySQL\": \"select 1;\",\n \"CreateTime\": \"2023-08-10T12:35:02.123Z\",\n \"UsedTime\": \"100\",\n \"DataAmount\": \"1024\",\n \"QueryStats\": \"{\\\"elapsedTime\\\": \\\"5.34s\\\", \\\"executionTime\\\": \\\"4.89s\\\", \\\"cumulativeUserMemory\\\": 1234567.89, \\\"peakUserMemoryReservation\\\": \\\"64MB\\\", \\\"totalBytes\\\": \\\"1.23MB\\\", \\\"totalRows\\\": 1000 }\"\n }\n ],\n \"TotalCount\": 1\n }\n}",
742
+ "title": "获取任务监控信息"
743
+ }
744
+ ],
737
745
  "DescribeTaskResult": [
738
746
  {
739
747
  "document": "查询任务结果,每次返回1000行数据",
@@ -433,6 +433,58 @@ def doGetTokenCount(args, parsed_globals):
433
433
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
434
434
 
435
435
 
436
+ def doGroupChatCompletions(args, parsed_globals):
437
+ g_param = parse_global_arg(parsed_globals)
438
+
439
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
440
+ cred = credential.CVMRoleCredential()
441
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
442
+ cred = credential.STSAssumeRoleCredential(
443
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
444
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
445
+ )
446
+ 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):
447
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
448
+ else:
449
+ cred = credential.Credential(
450
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
451
+ )
452
+ http_profile = HttpProfile(
453
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
454
+ reqMethod="POST",
455
+ endpoint=g_param[OptionsDefine.Endpoint],
456
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
457
+ )
458
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
459
+ if g_param[OptionsDefine.Language]:
460
+ profile.language = g_param[OptionsDefine.Language]
461
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
462
+ client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
463
+ client._sdkVersion += ("_CLI_" + __version__)
464
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
465
+ model = models.GroupChatCompletionsRequest()
466
+ model.from_json_string(json.dumps(args))
467
+ start_time = time.time()
468
+ while True:
469
+ rsp = client.GroupChatCompletions(model)
470
+ result = rsp.to_json_string()
471
+ try:
472
+ json_obj = json.loads(result)
473
+ except TypeError as e:
474
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
475
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
476
+ break
477
+ cur_time = time.time()
478
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
479
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
480
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
481
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
482
+ else:
483
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
484
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
485
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
486
+
487
+
436
488
  def doSubmitHunyuanImageChatJob(args, parsed_globals):
437
489
  g_param = parse_global_arg(parsed_globals)
438
490
 
@@ -1024,6 +1076,7 @@ ACTION_MAP = {
1024
1076
  "FilesDeletions": doFilesDeletions,
1025
1077
  "FilesUploads": doFilesUploads,
1026
1078
  "GetTokenCount": doGetTokenCount,
1079
+ "GroupChatCompletions": doGroupChatCompletions,
1027
1080
  "SubmitHunyuanImageChatJob": doSubmitHunyuanImageChatJob,
1028
1081
  "RunThread": doRunThread,
1029
1082
  "GetThreadMessage": doGetThreadMessage,