tccli 3.0.1301.1__py2.py3-none-any.whl → 3.0.1302.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 (38) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/cdc/cdc_client.py +173 -67
  3. tccli/services/cdc/v20201214/api.json +96 -0
  4. tccli/services/cdc/v20201214/examples.json +16 -0
  5. tccli/services/cdn/v20180606/api.json +11 -0
  6. tccli/services/cdwpg/v20201230/api.json +1 -1
  7. tccli/services/cdwpg/v20201230/examples.json +1 -1
  8. tccli/services/clb/v20180317/api.json +2 -2
  9. tccli/services/cvm/v20170312/api.json +18 -0
  10. tccli/services/dbbrain/dbbrain_client.py +57 -4
  11. tccli/services/dbbrain/v20210527/api.json +62 -0
  12. tccli/services/dbbrain/v20210527/examples.json +8 -0
  13. tccli/services/dlc/dlc_client.py +53 -0
  14. tccli/services/dlc/v20210125/api.json +71 -0
  15. tccli/services/dlc/v20210125/examples.json +8 -0
  16. tccli/services/es/v20180416/api.json +3 -3
  17. tccli/services/es/v20180416/examples.json +3 -3
  18. tccli/services/lkeap/v20240522/api.json +1 -1
  19. tccli/services/monitor/v20180724/api.json +5 -5
  20. tccli/services/monitor/v20180724/examples.json +1 -1
  21. tccli/services/mps/v20190612/api.json +94 -29
  22. tccli/services/mps/v20190612/examples.json +1 -1
  23. tccli/services/postgres/v20170312/api.json +2 -2
  24. tccli/services/ssm/v20190923/api.json +27 -0
  25. tccli/services/tccatalog/v20241024/api.json +1 -1
  26. tccli/services/tccatalog/v20241024/examples.json +1 -1
  27. tccli/services/tds/tds_client.py +53 -0
  28. tccli/services/tds/v20220801/api.json +265 -0
  29. tccli/services/tds/v20220801/examples.json +8 -0
  30. tccli/services/tem/v20210701/api.json +664 -575
  31. tccli/services/tem/v20210701/examples.json +2 -2
  32. tccli/services/teo/v20220901/api.json +2 -2
  33. tccli/services/waf/v20180125/api.json +116 -0
  34. {tccli-3.0.1301.1.dist-info → tccli-3.0.1302.1.dist-info}/METADATA +2 -2
  35. {tccli-3.0.1301.1.dist-info → tccli-3.0.1302.1.dist-info}/RECORD +38 -38
  36. {tccli-3.0.1301.1.dist-info → tccli-3.0.1302.1.dist-info}/WHEEL +0 -0
  37. {tccli-3.0.1301.1.dist-info → tccli-3.0.1302.1.dist-info}/entry_points.txt +0 -0
  38. {tccli-3.0.1301.1.dist-info → tccli-3.0.1302.1.dist-info}/license_files/LICENSE +0 -0
@@ -7,6 +7,13 @@
7
7
  "output": "CreateDedicatedClusterResponse",
8
8
  "status": "online"
9
9
  },
10
+ "CreateDedicatedClusterImageCache": {
11
+ "document": "创建云上镜像缓存到本地专用集群中",
12
+ "input": "CreateDedicatedClusterImageCacheRequest",
13
+ "name": "创建本地专有集群云上镜像缓存",
14
+ "output": "CreateDedicatedClusterImageCacheResponse",
15
+ "status": "online"
16
+ },
10
17
  "CreateDedicatedClusterOrder": {
11
18
  "document": "创建专用集群订单",
12
19
  "input": "CreateDedicatedClusterOrderRequest",
@@ -21,6 +28,13 @@
21
28
  "output": "CreateSiteResponse",
22
29
  "status": "online"
23
30
  },
31
+ "DeleteDedicatedClusterImageCache": {
32
+ "document": "删除本地专用集群的云上镜像缓存",
33
+ "input": "DeleteDedicatedClusterImageCacheRequest",
34
+ "name": "删除本地专用集群镜像缓存",
35
+ "output": "DeleteDedicatedClusterImageCacheResponse",
36
+ "status": "online"
37
+ },
24
38
  "DeleteDedicatedClusters": {
25
39
  "document": "删除专用集群",
26
40
  "input": "DeleteDedicatedClustersRequest",
@@ -243,6 +257,52 @@
243
257
  ],
244
258
  "usage": "in"
245
259
  },
260
+ "CreateDedicatedClusterImageCacheRequest": {
261
+ "document": "CreateDedicatedClusterImageCache请求参数结构体",
262
+ "members": [
263
+ {
264
+ "disabled": false,
265
+ "document": "集群ID",
266
+ "example": "cluster-d8htgb6k",
267
+ "member": "string",
268
+ "name": "DedicatedClusterId",
269
+ "required": true,
270
+ "type": "string"
271
+ },
272
+ {
273
+ "disabled": false,
274
+ "document": "镜像ID",
275
+ "example": "img-cxi9luq2",
276
+ "member": "string",
277
+ "name": "ImageId",
278
+ "required": true,
279
+ "type": "string"
280
+ }
281
+ ],
282
+ "type": "object"
283
+ },
284
+ "CreateDedicatedClusterImageCacheResponse": {
285
+ "document": "CreateDedicatedClusterImageCache返回参数结构体",
286
+ "members": [
287
+ {
288
+ "disabled": false,
289
+ "document": "任务id",
290
+ "example": "36182738",
291
+ "member": "int64",
292
+ "name": "TaskId",
293
+ "output_required": false,
294
+ "type": "int",
295
+ "value_allowed_null": false
296
+ },
297
+ {
298
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
299
+ "member": "string",
300
+ "name": "RequestId",
301
+ "type": "string"
302
+ }
303
+ ],
304
+ "type": "object"
305
+ },
246
306
  "CreateDedicatedClusterOrderRequest": {
247
307
  "document": "CreateDedicatedClusterOrder请求参数结构体",
248
308
  "members": [
@@ -1470,6 +1530,42 @@
1470
1530
  ],
1471
1531
  "usage": "in"
1472
1532
  },
1533
+ "DeleteDedicatedClusterImageCacheRequest": {
1534
+ "document": "DeleteDedicatedClusterImageCache请求参数结构体",
1535
+ "members": [
1536
+ {
1537
+ "disabled": false,
1538
+ "document": "集群id",
1539
+ "example": "cluster-d8htgb6k",
1540
+ "member": "string",
1541
+ "name": "DedicatedClusterId",
1542
+ "required": true,
1543
+ "type": "string"
1544
+ },
1545
+ {
1546
+ "disabled": false,
1547
+ "document": "镜像id",
1548
+ "example": "img-cxi9luq2",
1549
+ "member": "string",
1550
+ "name": "ImageId",
1551
+ "required": true,
1552
+ "type": "string"
1553
+ }
1554
+ ],
1555
+ "type": "object"
1556
+ },
1557
+ "DeleteDedicatedClusterImageCacheResponse": {
1558
+ "document": "DeleteDedicatedClusterImageCache返回参数结构体",
1559
+ "members": [
1560
+ {
1561
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
1562
+ "member": "string",
1563
+ "name": "RequestId",
1564
+ "type": "string"
1565
+ }
1566
+ ],
1567
+ "type": "object"
1568
+ },
1473
1569
  "DeleteDedicatedClustersRequest": {
1474
1570
  "document": "DeleteDedicatedClusters请求参数结构体",
1475
1571
  "members": [
@@ -8,6 +8,14 @@
8
8
  "title": "创建专用集群"
9
9
  }
10
10
  ],
11
+ "CreateDedicatedClusterImageCache": [
12
+ {
13
+ "document": "创建云上镜像缓存",
14
+ "input": "POST / HTTP/1.1\nHost: cdc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateDedicatedClusterImageCache\n<公共请求参数>\n\n{\n \"DedicatedClusterId\": \"cluster-d8htgb6k\",\n \"ImageId\": \"img-1n0le98u\"\n}",
15
+ "output": "{\n \"Response\": {\n \"TaskId\": 15249,\n \"RequestId\": \"b621f9e4-ea1c-455c-98b4-7f85d857f222\"\n }\n}",
16
+ "title": "创建云上镜像缓存"
17
+ }
18
+ ],
11
19
  "CreateDedicatedClusterOrder": [
12
20
  {
13
21
  "document": "创建专用集群订单",
@@ -24,6 +32,14 @@
24
32
  "title": "创建站点"
25
33
  }
26
34
  ],
35
+ "DeleteDedicatedClusterImageCache": [
36
+ {
37
+ "document": "删除本地专用集群的云上镜像缓存",
38
+ "input": "POST / HTTP/1.1\nHost: cdc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: SyncDedicatedClusterImage\n<公共请求参数>\n\n{\n \"DedicatedClusterId\": \"cluster-d8htgb6k\",\n \"ImageId\": \"img-1n0le98u\"\n}",
39
+ "output": "{\n \"Response\": {\n \"RequestId\": \"27d4ca38-284b-4ffb-ae1d-e9ff12c065b8\"\n }\n}",
40
+ "title": "删除本地专用集群的云上镜像缓存"
41
+ }
42
+ ],
27
43
  "DeleteDedicatedClusters": [
28
44
  {
29
45
  "document": "删除专用集群",
@@ -10723,6 +10723,17 @@
10723
10723
  "required": true,
10724
10724
  "type": "list",
10725
10725
  "value_allowed_null": true
10726
+ },
10727
+ {
10728
+ "disabled": false,
10729
+ "document": "备注信息, 最多支持50个字符",
10730
+ "example": "remark",
10731
+ "member": "string",
10732
+ "name": "Remark",
10733
+ "output_required": false,
10734
+ "required": false,
10735
+ "type": "string",
10736
+ "value_allowed_null": false
10726
10737
  }
10727
10738
  ],
10728
10739
  "usage": "both"
@@ -1652,7 +1652,7 @@
1652
1652
  {
1653
1653
  "disabled": false,
1654
1654
  "document": "升级记录具体数据\n注意:此字段可能返回 null,表示取不到有效值。",
1655
- "example": "{\"TaskName\":\"test\",\"SourceVersion\":\"3.16.4.7\",\"TargetVersion\":\"3.16.4.8\",\"CreateTime\":\"2025-01-06 12:12:12\",\"EndTime\":\"2025-01-06 12:18:12\",\"Status\":\"2\",\"OperateUin\":\"102213435355\"}",
1655
+ "example": "{\"TaskName\":\"UpgradeTo3.15.2.0_2023-02-16 00:12:44\",\"SourceVersion\":\"3.16.4.7\",\"TargetVersion\":\"3.16.4.8\",\"CreateTime\":\"2025-01-06 12:12:12\",\"EndTime\":\"2025-01-06 12:18:12\",\"Status\":\"2\",\"OperateUin\":\"102213435355\"}",
1656
1656
  "member": "UpgradeItem",
1657
1657
  "name": "UpgradeItems",
1658
1658
  "output_required": true,
@@ -108,7 +108,7 @@
108
108
  {
109
109
  "document": "升级记录",
110
110
  "input": "POST / HTTP/1.1\nHost: cdwpg.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeUpgradeList\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdwpg-xx\",\n \"Offset\": 0,\n \"Limit\": 0\n}",
111
- "output": "{\n \"Response\": {\n \"TotalCount\": \"2\",\n \"UpgradeItems\": [\n {\n \"TaskName\": \"test\",\n \"SourceVersion\": \"3.16.4.7\",\n \"TargetVersion\": \"3.16.4.8\",\n \"CreateTime\": \"2025-01-06 12:12:12\",\n \"EndTime\": \"2025-01-06 12:18:12\",\n \"Status\": \"2\",\n \"OperateUin\": \"1002132343435\"\n }\n ],\n \"RequestId\": \"ssxx\"\n }\n}",
111
+ "output": "{\n \"Response\": {\n \"TotalCount\": \"2\",\n \"UpgradeItems\": [\n {\n \"TaskName\": \"UpgradeTo3.16.4.8_2025-01-06 12:12:12\",\n \"SourceVersion\": \"3.16.4.7\",\n \"TargetVersion\": \"3.16.4.8\",\n \"CreateTime\": \"2025-01-06 12:12:12\",\n \"EndTime\": \"2025-01-06 12:18:12\",\n \"Status\": \"2\",\n \"OperateUin\": \"1002132343435\"\n }\n ],\n \"RequestId\": \"ssxx\"\n }\n}",
112
112
  "title": "升级记录"
113
113
  }
114
114
  ],
@@ -1372,13 +1372,13 @@
1372
1372
  },
1373
1373
  {
1374
1374
  "disabled": false,
1375
- "document": "监听器名字\n注意:此字段可能返回 null,表示取不到有效值。",
1375
+ "document": "监听器名字",
1376
1376
  "example": "lb-1fb1sdsa-tcp-80-443",
1377
1377
  "member": "string",
1378
1378
  "name": "ListenerName",
1379
1379
  "output_required": true,
1380
1380
  "type": "string",
1381
- "value_allowed_null": true
1381
+ "value_allowed_null": false
1382
1382
  },
1383
1383
  {
1384
1384
  "disabled": false,
@@ -6888,6 +6888,24 @@
6888
6888
  "name": "ForceStop",
6889
6889
  "required": false,
6890
6890
  "type": "bool"
6891
+ },
6892
+ {
6893
+ "disabled": false,
6894
+ "document": "待扩容的系统盘配置信息。只支持扩容云盘。\n<dx-alert infotype=\"explain\" title=\"\">您必须指定参数DataDisks与SystemDisk的其中一个,但不能同时指定。</dx-alert>",
6895
+ "example": "无",
6896
+ "member": "SystemDisk",
6897
+ "name": "SystemDisk",
6898
+ "required": false,
6899
+ "type": "object"
6900
+ },
6901
+ {
6902
+ "disabled": false,
6903
+ "document": "是否在线扩容",
6904
+ "example": "true",
6905
+ "member": "bool",
6906
+ "name": "ResizeOnline",
6907
+ "required": false,
6908
+ "type": "bool"
6891
6909
  }
6892
6910
  ],
6893
6911
  "type": "object"
@@ -71,6 +71,58 @@ def doDescribeDBAutonomyEvents(args, parsed_globals):
71
71
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
72
72
 
73
73
 
74
+ def doVerifyUserAccount(args, parsed_globals):
75
+ g_param = parse_global_arg(parsed_globals)
76
+
77
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
78
+ cred = credential.CVMRoleCredential()
79
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
80
+ cred = credential.STSAssumeRoleCredential(
81
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
82
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
83
+ )
84
+ 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):
85
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
86
+ else:
87
+ cred = credential.Credential(
88
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
89
+ )
90
+ http_profile = HttpProfile(
91
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
92
+ reqMethod="POST",
93
+ endpoint=g_param[OptionsDefine.Endpoint],
94
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
95
+ )
96
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
97
+ if g_param[OptionsDefine.Language]:
98
+ profile.language = g_param[OptionsDefine.Language]
99
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
100
+ client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
101
+ client._sdkVersion += ("_CLI_" + __version__)
102
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
103
+ model = models.VerifyUserAccountRequest()
104
+ model.from_json_string(json.dumps(args))
105
+ start_time = time.time()
106
+ while True:
107
+ rsp = client.VerifyUserAccount(model)
108
+ result = rsp.to_json_string()
109
+ try:
110
+ json_obj = json.loads(result)
111
+ except TypeError as e:
112
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
113
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
114
+ break
115
+ cur_time = time.time()
116
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
117
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
118
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
119
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
120
+ else:
121
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
122
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
123
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
124
+
125
+
74
126
  def doDescribeSecurityAuditLogDownloadUrls(args, parsed_globals):
75
127
  g_param = parse_global_arg(parsed_globals)
76
128
 
@@ -3659,7 +3711,7 @@ def doCreateDBDiagReportUrl(args, parsed_globals):
3659
3711
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3660
3712
 
3661
3713
 
3662
- def doVerifyUserAccount(args, parsed_globals):
3714
+ def doDescribeDBDiagReportContent(args, parsed_globals):
3663
3715
  g_param = parse_global_arg(parsed_globals)
3664
3716
 
3665
3717
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3688,11 +3740,11 @@ def doVerifyUserAccount(args, parsed_globals):
3688
3740
  client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
3689
3741
  client._sdkVersion += ("_CLI_" + __version__)
3690
3742
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3691
- model = models.VerifyUserAccountRequest()
3743
+ model = models.DescribeDBDiagReportContentRequest()
3692
3744
  model.from_json_string(json.dumps(args))
3693
3745
  start_time = time.time()
3694
3746
  while True:
3695
- rsp = client.VerifyUserAccount(model)
3747
+ rsp = client.DescribeDBDiagReportContent(model)
3696
3748
  result = rsp.to_json_string()
3697
3749
  try:
3698
3750
  json_obj = json.loads(result)
@@ -4037,6 +4089,7 @@ MODELS_MAP = {
4037
4089
 
4038
4090
  ACTION_MAP = {
4039
4091
  "DescribeDBAutonomyEvents": doDescribeDBAutonomyEvents,
4092
+ "VerifyUserAccount": doVerifyUserAccount,
4040
4093
  "DescribeSecurityAuditLogDownloadUrls": doDescribeSecurityAuditLogDownloadUrls,
4041
4094
  "DeleteDBDiagReportTasks": doDeleteDBDiagReportTasks,
4042
4095
  "DescribeMailProfile": doDescribeMailProfile,
@@ -4106,7 +4159,7 @@ ACTION_MAP = {
4106
4159
  "OpenAuditService": doOpenAuditService,
4107
4160
  "KillMySqlThreads": doKillMySqlThreads,
4108
4161
  "CreateDBDiagReportUrl": doCreateDBDiagReportUrl,
4109
- "VerifyUserAccount": doVerifyUserAccount,
4162
+ "DescribeDBDiagReportContent": doDescribeDBDiagReportContent,
4110
4163
  "DescribeRedisCommandCostStatistics": doDescribeRedisCommandCostStatistics,
4111
4164
  "ModifySqlFilters": doModifySqlFilters,
4112
4165
  "DescribeProxySessionKillTasks": doDescribeProxySessionKillTasks,
@@ -217,6 +217,13 @@
217
217
  "output": "DescribeDBDiagHistoryResponse",
218
218
  "status": "online"
219
219
  },
220
+ "DescribeDBDiagReportContent": {
221
+ "document": "健康报告内容。",
222
+ "input": "DescribeDBDiagReportContentRequest",
223
+ "name": "查询健康诊断报告内容",
224
+ "output": "DescribeDBDiagReportContentResponse",
225
+ "status": "online"
226
+ },
220
227
  "DescribeDBDiagReportTasks": {
221
228
  "document": "查询健康报告生成任务列表。",
222
229
  "input": "DescribeDBDiagReportTasksRequest",
@@ -3730,6 +3737,61 @@
3730
3737
  ],
3731
3738
  "type": "object"
3732
3739
  },
3740
+ "DescribeDBDiagReportContentRequest": {
3741
+ "document": "DescribeDBDiagReportContent请求参数结构体",
3742
+ "members": [
3743
+ {
3744
+ "disabled": false,
3745
+ "document": "实例名",
3746
+ "example": "cdb-c1nl9rpv",
3747
+ "member": "string",
3748
+ "name": "InstanceId",
3749
+ "required": true,
3750
+ "type": "string"
3751
+ },
3752
+ {
3753
+ "disabled": false,
3754
+ "document": "异步任务ID",
3755
+ "example": "59",
3756
+ "member": "uint64",
3757
+ "name": "AsyncRequestId",
3758
+ "required": true,
3759
+ "type": "int"
3760
+ },
3761
+ {
3762
+ "disabled": false,
3763
+ "document": "服务产品类型,支持值:\"mysql\" - 云数据库 MySQL,\"redis\" - 云数据库 Redis,\"mongodb\" - 云数据库 MongoDB,默认为\"mysql\"。",
3764
+ "example": "mysql",
3765
+ "member": "string",
3766
+ "name": "Product",
3767
+ "required": false,
3768
+ "type": "string"
3769
+ }
3770
+ ],
3771
+ "type": "object"
3772
+ },
3773
+ "DescribeDBDiagReportContentResponse": {
3774
+ "document": "DescribeDBDiagReportContent返回参数结构体",
3775
+ "members": [
3776
+ {
3777
+ "disabled": false,
3778
+ "document": "报告内容。",
3779
+ "example": "无",
3780
+ "member": "string",
3781
+ "name": "Report",
3782
+ "output_required": true,
3783
+ "type": "string",
3784
+ "value_allowed_null": false
3785
+ },
3786
+ {
3787
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
3788
+ "member": "string",
3789
+ "name": "RequestId",
3790
+ "type": "string"
3791
+ }
3792
+ ],
3793
+ "type": "object"
3794
+ },
3733
3795
  "DescribeDBDiagReportTasksRequest": {
3734
3796
  "document": "DescribeDBDiagReportTasks请求参数结构体",
3735
3797
  "members": [
@@ -248,6 +248,14 @@
248
248
  "title": "获取实例诊断事件列表"
249
249
  }
250
250
  ],
251
+ "DescribeDBDiagReportContent": [
252
+ {
253
+ "document": "",
254
+ "input": "https://dbbrain.tencentcloudapi.com/?Action=DescribeDBDiagReportTasks\n&Product=mysql\n&AsyncRequestId=1\n&InstanceId=cdb-xxxxx\n&<公共请求参数>",
255
+ "output": "{\n \"Response\": {\n \"Report\": \"{\\\"DiagEvents\\\":[],\\\"RiskAccounts\\\":null,\\\"PerfDataBrief\\\":[{\\\"Status\\\":\\\"IDLE\\\",\\\"Min\\\":1,\\\"Avg\\\":5.32,\\\"Max\\\":43,\\\"RecMin\\\":800,\\\"FlavorMax\\\":1200,\\\"Metric\\\":\\\"queries\\\",\\\"Unit\\\":\\\"次/秒\\\",\\\"RecMax\\\":1000},{\\\"Status\\\":\\\"IDLE\\\",\\\"Min\\\":0.1,\\\"Avg\\\":0.25,\\\"Max\\\":0.75,\\\"RecMin\\\":20,\\\"FlavorMax\\\":100,\\\"Metric\\\":\\\"cpu_use_rate\\\",\\\"Unit\\\":\\\"%\\\",\\\"RecMax\\\":60},{\\\"Status\\\":\\\"IDLE\\\",\\\"Min\\\":4,\\\"Avg\\\":5.76,\\\"Max\\\":7,\\\"RecMin\\\":400,\\\"FlavorMax\\\":1200,\\\"Metric\\\":\\\"threads_connected\\\",\\\"Unit\\\":\\\"个\\\",\\\"RecMax\\\":1000},{\\\"Status\\\":\\\"IDLE\\\",\\\"Min\\\":28.87,\\\"Avg\\\":29.01,\\\"Max\\\":29.26,\\\"RecMin\\\":60,\\\"FlavorMax\\\":100,\\\"Metric\\\":\\\"memory_use_rate\\\",\\\"Unit\\\":\\\"%\\\",\\\"RecMax\\\":80},{\\\"Status\\\":\\\"IDLE\\\",\\\"Min\\\":2.34,\\\"Avg\\\":2.34,\\\"Max\\\":2.34,\\\"RecMin\\\":20,\\\"FlavorMax\\\":100,\\\"Metric\\\":\\\"volume_rate\\\",\\\"Unit\\\":\\\"%\\\",\\\"RecMax\\\":80}],\\\"NoPrimaryKeyTables\\\":{},\\\"SourceType\\\":\\\"\\\",\\\"HealthStatus\\\":{},\\\"SlowLogTopSqls\\\":[],\\\"InstBasicInfo\\\":{\\\"CdbVersion\\\":\\\"8.0\\\",\\\"InternalVip\\\":\\\"\\\",\\\"DeviceTypeName\\\":\\\"通用型\\\",\\\"InstanceId\\\":\\\"cdb-xxxxx\\\",\\\"InternalVport\\\":0,\\\"Memory\\\":8000,\\\"Zone\\\":110001,\\\"Vport\\\":3306,\\\"Product\\\":\\\"MySQL\\\",\\\"Cpu\\\":4,\\\"InstanceName\\\":\\\"长稳CFT_2\\\",\\\"ZoneName\\\":\\\"深圳金融一区\\\",\\\"DeployMode\\\":\\\"CUSTOM\\\",\\\"Volume\\\":200,\\\"InstanceTypeName\\\":\\\"主实例\\\",\\\"Region\\\":\\\"深圳金融\\\",\\\"Vip\\\":\\\"172.23.32.5\\\"},\\\"PerfDataSeries\\\":[],\\\"ReportBasicInfo\\\":{\\\"UserName\\\":\\\"数据库智能管家DBbrain\\\",\\\"EndTime\\\":\\\"2025-04-10 00:00:00\\\",\\\"Language\\\":\\\"cn\\\",\\\"StartTime\\\":\\\"2025-04-09 00:00:00\\\"},\\\"TopSpaceTables\\\":{\\\"Names\\\":[\\\"TableSchema\\\",\\\"TableName\\\",\\\"Engine\\\",\\\"DataFree\\\",\\\"DataLength\\\",\\\"IndexLength\\\",\\\"TotalLength\\\",\\\"FragRatio\\\",\\\"TableRows\\\",\\\"PhysicalFileSize\\\"],\\\"Data\\\":[{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"stk_order_36\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"newdts\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":0,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.2},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"cuacct_1\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"newdts\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":0,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.2},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"cubsb_log\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"newdts\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":0,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.2},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"fund_dispatch_log\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"newdts\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":0,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.2},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"eg_sync-3dlgfz9a\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"__tencentdb__\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":0,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"aa\\\\\\\\na\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"newdts\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":0,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"special_column_test14\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"newdts\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":0,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"t125_btree_desc\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"full_syntax\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":1,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"gtid_executed\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"__tencentdb__\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":2,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"all_kinds_of_fields\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"newdts\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":2,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"special_column_test15\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"newdts\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":0,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"t125_hash\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"full_syntax\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":1,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"heartbeat_sync-3dlgfz9a\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"__tencentdb__\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":1,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"all_kinds_of_fields_0\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"newdts\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":2,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"special_column_test16\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"newdts\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":0,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"t125_hash_desc\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"full_syntax\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":0,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"identify\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"__tencentdb__\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":0,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"all_kinds_of_fields_1\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"newdts\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":5,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"special_column_test17\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"newdts\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":0,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1},{\\\"DataFree\\\":0,\\\"TableName\\\":\\\"t126\\\",\\\"TotalLength\\\":0,\\\"TableSchema\\\":\\\"full_syntax\\\",\\\"FragRatio\\\":0,\\\"DataLength\\\":0,\\\"TableRows\\\":1,\\\"Engine\\\":\\\"InnoDB\\\",\\\"IndexLength\\\":0,\\\"PhysicalFileSize\\\":0.1}]}}\",\n \"RequestId\": \"46b24e25-ad04-4cb1-8739-fdcd37aaf238\"\n }\n}",
256
+ "title": "查询健康报告内容"
257
+ }
258
+ ],
251
259
  "DescribeDBDiagReportTasks": [
252
260
  {
253
261
  "document": "",
@@ -6673,6 +6673,58 @@ def doDescribeNotebookSessionStatement(args, parsed_globals):
6673
6673
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6674
6674
 
6675
6675
 
6676
+ def doDescribeClusterMonitorInfos(args, parsed_globals):
6677
+ g_param = parse_global_arg(parsed_globals)
6678
+
6679
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
6680
+ cred = credential.CVMRoleCredential()
6681
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
6682
+ cred = credential.STSAssumeRoleCredential(
6683
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
6684
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
6685
+ )
6686
+ 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):
6687
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
6688
+ else:
6689
+ cred = credential.Credential(
6690
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
6691
+ )
6692
+ http_profile = HttpProfile(
6693
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
6694
+ reqMethod="POST",
6695
+ endpoint=g_param[OptionsDefine.Endpoint],
6696
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
6697
+ )
6698
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
6699
+ if g_param[OptionsDefine.Language]:
6700
+ profile.language = g_param[OptionsDefine.Language]
6701
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
6702
+ client = mod.DlcClient(cred, g_param[OptionsDefine.Region], profile)
6703
+ client._sdkVersion += ("_CLI_" + __version__)
6704
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
6705
+ model = models.DescribeClusterMonitorInfosRequest()
6706
+ model.from_json_string(json.dumps(args))
6707
+ start_time = time.time()
6708
+ while True:
6709
+ rsp = client.DescribeClusterMonitorInfos(model)
6710
+ result = rsp.to_json_string()
6711
+ try:
6712
+ json_obj = json.loads(result)
6713
+ except TypeError as e:
6714
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
6715
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
6716
+ break
6717
+ cur_time = time.time()
6718
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
6719
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
6720
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
6721
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
6722
+ else:
6723
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
6724
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
6725
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
6726
+
6727
+
6676
6728
  def doRenewDataEngine(args, parsed_globals):
6677
6729
  g_param = parse_global_arg(parsed_globals)
6678
6730
 
@@ -7748,6 +7800,7 @@ ACTION_MAP = {
7748
7800
  "CreateScript": doCreateScript,
7749
7801
  "RestartDataEngine": doRestartDataEngine,
7750
7802
  "DescribeNotebookSessionStatement": doDescribeNotebookSessionStatement,
7803
+ "DescribeClusterMonitorInfos": doDescribeClusterMonitorInfos,
7751
7804
  "RenewDataEngine": doRenewDataEngine,
7752
7805
  "ModifySparkApp": doModifySparkApp,
7753
7806
  "DescribeViews": doDescribeViews,
@@ -371,6 +371,13 @@
371
371
  "output": "DescribeAdvancedStoreLocationResponse",
372
372
  "status": "online"
373
373
  },
374
+ "DescribeClusterMonitorInfos": {
375
+ "document": "查询任务监控指标信息",
376
+ "input": "DescribeClusterMonitorInfosRequest",
377
+ "name": "查询集群监控信息",
378
+ "output": "DescribeClusterMonitorInfosResponse",
379
+ "status": "online"
380
+ },
374
381
  "DescribeDLCCatalogAccess": {
375
382
  "document": "查询DLC Catalog授权列表",
376
383
  "input": "DescribeDLCCatalogAccessRequest",
@@ -8161,6 +8168,70 @@
8161
8168
  ],
8162
8169
  "type": "object"
8163
8170
  },
8171
+ "DescribeClusterMonitorInfosRequest": {
8172
+ "document": "DescribeClusterMonitorInfos请求参数结构体",
8173
+ "members": [
8174
+ {
8175
+ "disabled": false,
8176
+ "document": "引擎Id",
8177
+ "example": "DataEngine-b7pgx1ci",
8178
+ "member": "string",
8179
+ "name": "DataEngineId",
8180
+ "required": true,
8181
+ "type": "string"
8182
+ },
8183
+ {
8184
+ "disabled": false,
8185
+ "document": "任务创建时间的起始时间",
8186
+ "example": "20250301",
8187
+ "member": "string",
8188
+ "name": "TimeStart",
8189
+ "required": false,
8190
+ "type": "string"
8191
+ },
8192
+ {
8193
+ "disabled": false,
8194
+ "document": "任务创建时间的结束时间",
8195
+ "example": "20250302",
8196
+ "member": "string",
8197
+ "name": "TimeEnd",
8198
+ "required": false,
8199
+ "type": "string"
8200
+ },
8201
+ {
8202
+ "disabled": false,
8203
+ "document": "指标名称",
8204
+ "example": "cluster_cpu_usage_average",
8205
+ "member": "string",
8206
+ "name": "MetricName",
8207
+ "required": false,
8208
+ "type": "string"
8209
+ }
8210
+ ],
8211
+ "type": "object"
8212
+ },
8213
+ "DescribeClusterMonitorInfosResponse": {
8214
+ "document": "DescribeClusterMonitorInfos返回参数结构体",
8215
+ "members": [
8216
+ {
8217
+ "disabled": false,
8218
+ "document": "集群监控信息列表",
8219
+ "example": "{\"max\":[8.65515625]}",
8220
+ "member": "string",
8221
+ "name": "Info",
8222
+ "output_required": false,
8223
+ "type": "string",
8224
+ "value_allowed_null": false
8225
+ },
8226
+ {
8227
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
8228
+ "member": "string",
8229
+ "name": "RequestId",
8230
+ "type": "string"
8231
+ }
8232
+ ],
8233
+ "type": "object"
8234
+ },
8164
8235
  "DescribeDLCCatalogAccessRequest": {
8165
8236
  "document": "DescribeDLCCatalogAccess请求参数结构体",
8166
8237
  "members": [
@@ -430,6 +430,14 @@
430
430
  "title": "查询高级设置"
431
431
  }
432
432
  ],
433
+ "DescribeClusterMonitorInfos": [
434
+ {
435
+ "document": "",
436
+ "input": "POST / HTTP/1.1\nHost: dlc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeClusterMonitorInfos\n<公共请求参数>\n\n{\n \"DataEngineId\": \"dataengine-9omoklhv\"\n}",
437
+ "output": "{\n \"Response\": {\n \"Info\": \"{\\\"cluster_cpu_usage_average\\\":[8.65515625]}\",\n \"RequestId\": \"87bb46a9-1ff4-455e-92b5-fc4dd86bf0c2\"\n }\n}",
438
+ "title": "获取cpu平均 使用率"
439
+ }
440
+ ],
433
441
  "DescribeDLCCatalogAccess": [
434
442
  {
435
443
  "document": "查询DLC Catalog授权列表",
@@ -3903,7 +3903,7 @@
3903
3903
  {
3904
3904
  "disabled": false,
3905
3905
  "document": "vpcId信息数组",
3906
- "example": "",
3906
+ "example": "[\"vpc-abfeaefm\"]",
3907
3907
  "member": "string",
3908
3908
  "name": "VpcIds",
3909
3909
  "required": false,
@@ -3912,7 +3912,7 @@
3912
3912
  {
3913
3913
  "disabled": false,
3914
3914
  "document": "分页起始",
3915
- "example": "",
3915
+ "example": "1",
3916
3916
  "member": "int64",
3917
3917
  "name": "Offset",
3918
3918
  "required": false,
@@ -3921,7 +3921,7 @@
3921
3921
  {
3922
3922
  "disabled": false,
3923
3923
  "document": "分页条数",
3924
- "example": "",
3924
+ "example": "10",
3925
3925
  "member": "int64",
3926
3926
  "name": "Limit",
3927
3927
  "required": false,