tccli 3.0.1091.1__py2.py3-none-any.whl → 3.0.1092.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 (138) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/cdb/v20170320/CheckMigrateCluster.md +18 -0
  3. tccli/examples/cdb/v20170320/DescribeClusterInfo.md +59 -0
  4. tccli/examples/domain/v20180808/BidPreDomains.md +21 -0
  5. tccli/examples/domain/v20180808/DescribeReservedBidInfo.md +43 -0
  6. tccli/examples/domain/v20180808/DescribeReservedPreDomainInfo.md +31 -0
  7. tccli/examples/es/v20180416/UpdateInstance.md +27 -27
  8. tccli/examples/es/v20180416/UpdatePlugins.md +6 -6
  9. tccli/examples/ess/v20201111/CreateBatchOrganizationRegistrationTasks.md +146 -0
  10. tccli/examples/ess/v20201111/CreateOrganizationAuthUrl.md +18 -0
  11. tccli/examples/ess/v20201111/CreateOrganizationBatchSignUrl.md +28 -0
  12. tccli/examples/hunyuan/v20230901/ChatPro.md +69 -31
  13. tccli/examples/hunyuan/v20230901/ChatStd.md +40 -1
  14. tccli/examples/lke/v20231130/CheckAttributeLabelExist.md +24 -0
  15. tccli/examples/lke/v20231130/CheckAttributeLabelRefer.md +23 -0
  16. tccli/examples/lke/v20231130/CreateApp.md +24 -0
  17. tccli/examples/lke/v20231130/CreateAttributeLabel.md +24 -0
  18. tccli/examples/lke/v20231130/CreateCorp.md +24 -0
  19. tccli/examples/lke/v20231130/CreateQA.md +24 -0
  20. tccli/examples/lke/v20231130/CreateQACate.md +26 -0
  21. tccli/examples/lke/v20231130/CreateRejectedQuestion.md +22 -0
  22. tccli/examples/lke/v20231130/CreateRelease.md +21 -0
  23. tccli/examples/lke/v20231130/DeleteApp.md +21 -0
  24. tccli/examples/lke/v20231130/DeleteAttributeLabel.md +21 -0
  25. tccli/examples/lke/v20231130/DeleteDoc.md +21 -0
  26. tccli/examples/lke/v20231130/DeleteQA.md +21 -0
  27. tccli/examples/lke/v20231130/DeleteQACate.md +21 -0
  28. tccli/examples/lke/v20231130/DeleteRejectedQuestion.md +21 -0
  29. tccli/examples/lke/v20231130/DescribeApp.md +29 -0
  30. tccli/examples/lke/v20231130/DescribeAttributeLabel.md +28 -0
  31. tccli/examples/lke/v20231130/DescribeCorp.md +21 -0
  32. tccli/examples/lke/v20231130/DescribeDoc.md +44 -0
  33. tccli/examples/lke/v20231130/DescribeQA.md +42 -0
  34. tccli/examples/lke/v20231130/DescribeRefer.md +35 -0
  35. tccli/examples/lke/v20231130/DescribeRelease.md +25 -0
  36. tccli/examples/lke/v20231130/DescribeReleaseInfo.md +24 -0
  37. tccli/examples/lke/v20231130/DescribeRobotBizIDByAppKey.md +21 -0
  38. tccli/examples/lke/v20231130/DescribeStorageCredential.md +32 -0
  39. tccli/examples/lke/v20231130/DescribeUnsatisfiedReplyContext.md +121 -0
  40. tccli/examples/lke/v20231130/ExportAttributeLabel.md +21 -0
  41. tccli/examples/lke/v20231130/ExportQAList.md +21 -0
  42. tccli/examples/lke/v20231130/ExportUnsatisfiedReply.md +21 -0
  43. tccli/examples/lke/v20231130/GenerateQA.md +21 -0
  44. tccli/examples/lke/v20231130/GetAppKnowledgeCount.md +22 -0
  45. tccli/examples/lke/v20231130/GetAppSecret.md +24 -0
  46. tccli/examples/lke/v20231130/GetDocPreview.md +26 -0
  47. tccli/examples/lke/v20231130/GetEmbedding.md +29 -0
  48. tccli/examples/lke/v20231130/GetMsgRecord.md +51 -0
  49. tccli/examples/lke/v20231130/GetTaskStatus.md +0 -0
  50. tccli/examples/lke/v20231130/GetWsToken.md +44 -0
  51. tccli/examples/lke/v20231130/GroupQA.md +44 -0
  52. tccli/examples/lke/v20231130/IgnoreUnsatisfiedReply.md +21 -0
  53. tccli/examples/lke/v20231130/IsTransferIntent.md +22 -0
  54. tccli/examples/lke/v20231130/ListApp.md +36 -0
  55. tccli/examples/lke/v20231130/ListAppCategory.md +25 -0
  56. tccli/examples/lke/v20231130/ListAttributeLabel.md +33 -0
  57. tccli/examples/lke/v20231130/ListDoc.md +52 -0
  58. tccli/examples/lke/v20231130/ListModel.md +31 -0
  59. tccli/examples/lke/v20231130/ListQA.md +66 -0
  60. tccli/examples/lke/v20231130/ListQACate.md +41 -0
  61. tccli/examples/lke/v20231130/ListRejectedQuestion.md +52 -0
  62. tccli/examples/lke/v20231130/ListRejectedQuestionPreview.md +37 -0
  63. tccli/examples/lke/v20231130/ListRelease.md +36 -0
  64. tccli/examples/lke/v20231130/ListReleaseConfigPreview.md +129 -0
  65. tccli/examples/lke/v20231130/ListReleaseDocPreview.md +38 -0
  66. tccli/examples/lke/v20231130/ListReleaseQAPreview.md +107 -0
  67. tccli/examples/lke/v20231130/ListSelectDoc.md +27 -0
  68. tccli/examples/lke/v20231130/ListUnsatisfiedReply.md +24 -0
  69. tccli/examples/lke/v20231130/ModifyApp.md +25 -0
  70. tccli/examples/lke/v20231130/ModifyAttributeLabel.md +23 -0
  71. tccli/examples/lke/v20231130/ModifyDoc.md +25 -0
  72. tccli/examples/lke/v20231130/ModifyDocAttrRange.md +25 -0
  73. tccli/examples/lke/v20231130/ModifyQA.md +24 -0
  74. tccli/examples/lke/v20231130/ModifyQAAttrRange.md +25 -0
  75. tccli/examples/lke/v20231130/ModifyQACate.md +22 -0
  76. tccli/examples/lke/v20231130/ModifyRejectedQuestion.md +22 -0
  77. tccli/examples/lke/v20231130/ParseDoc.md +25 -0
  78. tccli/examples/lke/v20231130/QueryParseDocResult.md +24 -0
  79. tccli/examples/lke/v20231130/QueryRewrite.md +25 -0
  80. tccli/examples/lke/v20231130/RateMsgRecord.md +22 -0
  81. tccli/examples/lke/v20231130/ResetSession.md +20 -0
  82. tccli/examples/lke/v20231130/RetryDocAudit.md +21 -0
  83. tccli/examples/lke/v20231130/RetryDocParse.md +21 -0
  84. tccli/examples/lke/v20231130/RetryRelease.md +21 -0
  85. tccli/examples/lke/v20231130/SaveDoc.md +34 -0
  86. tccli/examples/lke/v20231130/StopDocParse.md +21 -0
  87. tccli/examples/lke/v20231130/UploadAttributeLabel.md +27 -0
  88. tccli/examples/lke/v20231130/VerifyQA.md +27 -0
  89. tccli/examples/mna/v20210119/GetFlowPackages.md +3 -1
  90. tccli/examples/mna/v20210119/GetFlowStatistic.md +42 -0
  91. tccli/examples/ocr/v20181119/GeneralBasicOCR.md +0 -1
  92. tccli/examples/sqlserver/v20180328/DescribeRestoreTimeRange.md +23 -0
  93. tccli/services/__init__.py +3 -0
  94. tccli/services/aiart/v20221229/api.json +6 -6
  95. tccli/services/antiddos/v20200309/api.json +10 -0
  96. tccli/services/cdb/cdb_client.py +106 -0
  97. tccli/services/cdb/v20170320/api.json +255 -0
  98. tccli/services/cdb/v20170320/examples.json +16 -0
  99. tccli/services/cdn/v20180606/api.json +4 -4
  100. tccli/services/ckafka/v20190819/api.json +29 -24
  101. tccli/services/domain/domain_client.py +114 -8
  102. tccli/services/domain/v20180808/api.json +174 -1
  103. tccli/services/domain/v20180808/examples.json +22 -0
  104. tccli/services/es/v20180416/api.json +12 -12
  105. tccli/services/es/v20180416/examples.json +21 -21
  106. tccli/services/ess/ess_client.py +149 -43
  107. tccli/services/ess/v20201111/api.json +214 -4
  108. tccli/services/ess/v20201111/examples.json +34 -0
  109. tccli/services/essbasic/v20210526/api.json +2 -2
  110. tccli/services/faceid/v20180301/api.json +10 -1
  111. tccli/services/hunyuan/v20230901/api.json +67 -21
  112. tccli/services/hunyuan/v20230901/examples.json +17 -5
  113. tccli/services/iai/v20180301/api.json +19 -19
  114. tccli/services/lke/__init__.py +4 -0
  115. tccli/services/lke/lke_client.py +4117 -0
  116. tccli/services/lke/v20231130/api.json +9010 -0
  117. tccli/services/lke/v20231130/examples.json +617 -0
  118. tccli/services/mna/v20210119/api.json +249 -29
  119. tccli/services/mna/v20210119/examples.json +7 -1
  120. tccli/services/monitor/v20180724/api.json +30 -10
  121. tccli/services/ocr/v20181119/api.json +5 -0
  122. tccli/services/ocr/v20181119/examples.json +1 -1
  123. tccli/services/redis/v20180412/api.json +1 -1
  124. tccli/services/scf/v20180416/api.json +18 -9
  125. tccli/services/sms/v20210111/api.json +1 -1
  126. tccli/services/sqlserver/sqlserver_client.py +110 -57
  127. tccli/services/sqlserver/v20180328/api.json +63 -0
  128. tccli/services/sqlserver/v20180328/examples.json +8 -0
  129. tccli/services/tione/v20211111/api.json +25 -1
  130. tccli/services/trtc/v20190722/api.json +46 -4
  131. tccli/services/wedata/v20210820/api.json +295 -1437
  132. tccli/services/wedata/v20210820/examples.json +0 -88
  133. tccli/services/wedata/wedata_client.py +33 -616
  134. {tccli-3.0.1091.1.dist-info → tccli-3.0.1092.1.dist-info}/METADATA +2 -2
  135. {tccli-3.0.1091.1.dist-info → tccli-3.0.1092.1.dist-info}/RECORD +138 -52
  136. {tccli-3.0.1091.1.dist-info → tccli-3.0.1092.1.dist-info}/WHEEL +0 -0
  137. {tccli-3.0.1091.1.dist-info → tccli-3.0.1092.1.dist-info}/entry_points.txt +0 -0
  138. {tccli-3.0.1091.1.dist-info → tccli-3.0.1092.1.dist-info}/license_files/LICENSE +0 -0
@@ -39,3 +39,45 @@ Output:
39
39
  }
40
40
  ```
41
41
 
42
+ **Example 2: 获取多个设备的流量使用信息之和**
43
+
44
+
45
+
46
+ Input:
47
+
48
+ ```
49
+ tccli mna GetFlowStatistic --cli-unfold-argument \
50
+ --EndTime 1659514692 \
51
+ --Type 1 \
52
+ --DeviceId \
53
+ --DeviceList abc bcd \
54
+ --TimeGranularity 1 \
55
+ --BeginTime 1659513692
56
+ ```
57
+
58
+ Output:
59
+ ```
60
+ {
61
+ "Response": {
62
+ "MaxValue": 51548,
63
+ "AvgValue": 15441,
64
+ "TotalValue": 656546,
65
+ "NetDetails": [
66
+ {
67
+ "Time": "1659513692",
68
+ "Current": 3546545
69
+ },
70
+ {
71
+ "Time": "1659513692",
72
+ "Current": 4454864
73
+ },
74
+ {
75
+ "Time": "1659513692",
76
+ "Current": 4848941
77
+ }
78
+ ],
79
+ "RequestId": ""
80
+ }
81
+ }
82
+ ```
83
+
@@ -13,7 +13,6 @@ Output:
13
13
  ```
14
14
  {
15
15
  "Response": {
16
- "Angel": 359.989990234375,
17
16
  "Angle": 359.989990234375,
18
17
  "Language": "zh",
19
18
  "PdfPageSize": 0,
@@ -0,0 +1,23 @@
1
+ **Example 1: 查询按照时间点可回档的时间范围。**
2
+
3
+ 本接口(DescribeRestoreTimeRange)用于查询按照时间点可回档的时间范围。
4
+
5
+ Input:
6
+
7
+ ```
8
+ tccli sqlserver DescribeRestoreTimeRange --cli-unfold-argument \
9
+ --InstanceId mssql-aj89iq78 \
10
+ --TargetInstanceId mssql-jkoa09sf
11
+ ```
12
+
13
+ Output:
14
+ ```
15
+ {
16
+ "Response": {
17
+ "MinTime": "2024-01-01 00:00:00",
18
+ "MaxTime": "2024-01-07 00:00:00",
19
+ "RequestId": "cd7a35be-2fbf-f3a6-210a-ea9afe158817"
20
+ }
21
+ }
22
+ ```
23
+
@@ -442,6 +442,9 @@ SERVICE_VERSIONS = {
442
442
  "live": [
443
443
  "2018-08-01"
444
444
  ],
445
+ "lke": [
446
+ "2023-11-30"
447
+ ],
445
448
  "lowcode": [
446
449
  "2021-01-08"
447
450
  ],
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "actions": {
3
3
  "ImageToImage": {
4
- "document": "智能图生图接口将根据输入的图片及辅助描述文本,智能生成与之相关的结果图。\n输入:单边分辨率小于2000、转成 Base64 字符串后小于 5MB 的图片,建议同时输入描述文本。\n输出:对应风格及分辨率的 AI 生成图。\n可支持的风格详见 [智能图生图风格列表](https://cloud.tencent.com/document/product/1668/86250),请将列表中的“风格编号”传入 Styles 数组,建议选择一种风格。\n\n请求频率限制为1次/秒。",
4
+ "document": "智能图生图接口提供基础版图生图能力,将根据输入的图像及文本描述,智能生成风格转化后的图像。建议避免输入人像过小、姿势复杂、人数较多的人像图片。\n智能图生图默认提供3个并发任务数,代表最多能同时处理3个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。",
5
5
  "input": "ImageToImageRequest",
6
6
  "name": "智能图生图",
7
7
  "output": "ImageToImageResponse",
@@ -22,7 +22,7 @@
22
22
  "status": "online"
23
23
  },
24
24
  "TextToImage": {
25
- "document": "智能文生图接口将根据输入的描述文本,智能生成与之相关的结果图。\n输入:256个字符以内的描述性文本,推荐使用中文。\n输出:对应风格及分辨率的 AI 生成图。\n可支持的风格详见 [智能文生图风格列表](https://cloud.tencent.com/document/product/1668/86249),请将列表中的“风格编号”传入 Styles 数组,建议选择一种风格。\n\n请求频率限制为1次/秒。",
25
+ "document": "智能文生图接口提供基础版文生图能力,将根据输入的文本描述,智能生成与之相关的结果图。\n\n智能文生图默认提供3个并发任务数,代表最多能同时处理3个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。",
26
26
  "input": "TextToImageRequest",
27
27
  "name": "智能文生图",
28
28
  "output": "TextToImageResponse",
@@ -41,7 +41,7 @@
41
41
  "members": [
42
42
  {
43
43
  "disabled": false,
44
- "document": "输入图 Base64 数据。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于2000,转成 Base64 字符串后小于 5MB。",
44
+ "document": "输入图 Base64 数据。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 8MB。",
45
45
  "example": "无",
46
46
  "member": "string",
47
47
  "name": "InputImage",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  {
52
52
  "disabled": false,
53
- "document": "输入图 Url。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于2000,转成 Base64 字符串后小于 5MB。",
53
+ "document": "输入图 Url。\n算法将根据输入的图片,结合文本描述智能生成与之相关的图像。\nBase64 和 Url 必须提供一个,如果都提供以 Base64 为准。\n图片限制:单边分辨率小于5000,转成 Base64 字符串后小于8MB。",
54
54
  "example": "无",
55
55
  "member": "string",
56
56
  "name": "InputUrl",
@@ -86,7 +86,7 @@
86
86
  },
87
87
  {
88
88
  "disabled": false,
89
- "document": "生成图结果的配置,包括输出图片分辨率和尺寸等。\n支持生成以下分辨率的图片:origin(与输入图分辨率一致)、768:768(1:1)、768:1024(3:4)、1024:768(4:3),不传默认使用origin。",
89
+ "document": "生成图结果的配置,包括输出图片分辨率和尺寸等。\n支持生成以下分辨率的图片:origin(与输入图分辨率一致,长边最高为2000,超出将做等比例缩小)、768:768(1:1)、768:1024(3:4)、1024:768(4:3)。\n不传默认使用origin。",
90
90
  "example": "无",
91
91
  "member": "ResultConfig",
92
92
  "name": "ResultConfig",
@@ -328,7 +328,7 @@
328
328
  "members": [
329
329
  {
330
330
  "disabled": false,
331
- "document": "生成图分辨率\n\n智能文生图支持生成以下分辨率的图片:768:768(1:1)、768:1024(3:4)、1024:768(4:3)、1024:1024(1:1)、720:1280(9:16)、1280:720(16:9)、768:1280(3:5)、1280:768(5:3)、1080:1920(9:16)、1920:1080(16:9),不传默认使用768:768\n\n智能图生图支持生成以下分辨率的图片:origin(与输入图分辨率一致)、768:768(1:1)、768:1024(3:4)、1024:768(4:3),不传默认使用origin,如果指定生成的长宽比与输入图长宽比差异过大可能导致图片内容被裁剪",
331
+ "document": "生成图分辨率\n\n智能文生图支持生成以下分辨率的图片:768:768(1:1)、768:1024(3:4)、1024:768(4:3)、1024:1024(1:1)、720:1280(9:16)、1280:720(16:9)、768:1280(3:5)、1280:768(5:3)、1080:1920(9:16)、1920:1080(16:9),不传默认使用768:768。\n\n智能图生图支持生成以下分辨率的图片:origin(与输入图分辨率一致,长边最高为2000,超出将做等比例缩小)、768:768(1:1)、768:1024(3:4)、1024:768(4:3),不传默认使用origin,如果指定生成的长宽比与输入图长宽比差异过大可能导致图片内容被裁剪。",
332
332
  "example": "768:768",
333
333
  "member": "string",
334
334
  "name": "Resolution",
@@ -1858,6 +1858,16 @@
1858
1858
  "output_required": false,
1859
1859
  "type": "int",
1860
1860
  "value_allowed_null": true
1861
+ },
1862
+ {
1863
+ "disabled": false,
1864
+ "document": "是否为超级高防包\n注意:此字段可能返回 null,表示取不到有效值。",
1865
+ "example": "1",
1866
+ "member": "uint64",
1867
+ "name": "SuperPackFlag",
1868
+ "output_required": false,
1869
+ "type": "int",
1870
+ "value_allowed_null": true
1861
1871
  }
1862
1872
  ],
1863
1873
  "usage": "out"
@@ -1213,6 +1213,58 @@ def doDescribeRollbackTaskDetail(args, parsed_globals):
1213
1213
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1214
1214
 
1215
1215
 
1216
+ def doCheckMigrateCluster(args, parsed_globals):
1217
+ g_param = parse_global_arg(parsed_globals)
1218
+
1219
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1220
+ cred = credential.CVMRoleCredential()
1221
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1222
+ cred = credential.STSAssumeRoleCredential(
1223
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1224
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1225
+ )
1226
+ 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):
1227
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1228
+ else:
1229
+ cred = credential.Credential(
1230
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1231
+ )
1232
+ http_profile = HttpProfile(
1233
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1234
+ reqMethod="POST",
1235
+ endpoint=g_param[OptionsDefine.Endpoint],
1236
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1237
+ )
1238
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1239
+ if g_param[OptionsDefine.Language]:
1240
+ profile.language = g_param[OptionsDefine.Language]
1241
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1242
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
1243
+ client._sdkVersion += ("_CLI_" + __version__)
1244
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1245
+ model = models.CheckMigrateClusterRequest()
1246
+ model.from_json_string(json.dumps(args))
1247
+ start_time = time.time()
1248
+ while True:
1249
+ rsp = client.CheckMigrateCluster(model)
1250
+ result = rsp.to_json_string()
1251
+ try:
1252
+ json_obj = json.loads(result)
1253
+ except TypeError as e:
1254
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1255
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1256
+ break
1257
+ cur_time = time.time()
1258
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1259
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1260
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1261
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1262
+ else:
1263
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1264
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1265
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1266
+
1267
+
1216
1268
  def doModifyBackupDownloadRestriction(args, parsed_globals):
1217
1269
  g_param = parse_global_arg(parsed_globals)
1218
1270
 
@@ -4645,6 +4697,58 @@ def doDescribeDBInstanceInfo(args, parsed_globals):
4645
4697
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4646
4698
 
4647
4699
 
4700
+ def doDescribeClusterInfo(args, parsed_globals):
4701
+ g_param = parse_global_arg(parsed_globals)
4702
+
4703
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4704
+ cred = credential.CVMRoleCredential()
4705
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4706
+ cred = credential.STSAssumeRoleCredential(
4707
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4708
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4709
+ )
4710
+ 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):
4711
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4712
+ else:
4713
+ cred = credential.Credential(
4714
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4715
+ )
4716
+ http_profile = HttpProfile(
4717
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4718
+ reqMethod="POST",
4719
+ endpoint=g_param[OptionsDefine.Endpoint],
4720
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4721
+ )
4722
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4723
+ if g_param[OptionsDefine.Language]:
4724
+ profile.language = g_param[OptionsDefine.Language]
4725
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4726
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
4727
+ client._sdkVersion += ("_CLI_" + __version__)
4728
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4729
+ model = models.DescribeClusterInfoRequest()
4730
+ model.from_json_string(json.dumps(args))
4731
+ start_time = time.time()
4732
+ while True:
4733
+ rsp = client.DescribeClusterInfo(model)
4734
+ result = rsp.to_json_string()
4735
+ try:
4736
+ json_obj = json.loads(result)
4737
+ except TypeError as e:
4738
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4739
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4740
+ break
4741
+ cur_time = time.time()
4742
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4743
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4744
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4745
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4746
+ else:
4747
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4748
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4749
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4750
+
4751
+
4648
4752
  def doDescribeRollbackRangeTime(args, parsed_globals):
4649
4753
  g_param = parse_global_arg(parsed_globals)
4650
4754
 
@@ -8319,6 +8423,7 @@ ACTION_MAP = {
8319
8423
  "CreateAuditLogFile": doCreateAuditLogFile,
8320
8424
  "OpenDBInstanceGTID": doOpenDBInstanceGTID,
8321
8425
  "DescribeRollbackTaskDetail": doDescribeRollbackTaskDetail,
8426
+ "CheckMigrateCluster": doCheckMigrateCluster,
8322
8427
  "ModifyBackupDownloadRestriction": doModifyBackupDownloadRestriction,
8323
8428
  "CloseCdbProxyAddress": doCloseCdbProxyAddress,
8324
8429
  "DescribeTasks": doDescribeTasks,
@@ -8385,6 +8490,7 @@ ACTION_MAP = {
8385
8490
  "SwitchDrInstanceToMaster": doSwitchDrInstanceToMaster,
8386
8491
  "DeleteAccounts": doDeleteAccounts,
8387
8492
  "DescribeDBInstanceInfo": doDescribeDBInstanceInfo,
8493
+ "DescribeClusterInfo": doDescribeClusterInfo,
8388
8494
  "DescribeRollbackRangeTime": doDescribeRollbackRangeTime,
8389
8495
  "DescribeParamTemplates": doDescribeParamTemplates,
8390
8496
  "DeleteBackup": doDeleteBackup,
@@ -42,6 +42,13 @@
42
42
  "output": "BalanceRoGroupLoadResponse",
43
43
  "status": "online"
44
44
  },
45
+ "CheckMigrateCluster": {
46
+ "document": "高可用实例一键迁移到集群版校验",
47
+ "input": "CheckMigrateClusterRequest",
48
+ "name": "迁移集群版校验",
49
+ "output": "CheckMigrateClusterResponse",
50
+ "status": "online"
51
+ },
45
52
  "CloseAuditService": {
46
53
  "document": "实例关闭审计服务",
47
54
  "input": "CloseAuditServiceRequest",
@@ -413,6 +420,13 @@
413
420
  "output": "DescribeCloneListResponse",
414
421
  "status": "online"
415
422
  },
423
+ "DescribeClusterInfo": {
424
+ "document": "本接口(DescribeClusterInfo)用于查询集群版实例信息。",
425
+ "input": "DescribeClusterInfoRequest",
426
+ "name": "查询集群版实例信息",
427
+ "output": "DescribeClusterInfoResponse",
428
+ "status": "online"
429
+ },
416
430
  "DescribeCpuExpandStrategy": {
417
431
  "document": "通过该 API 可以查询实例的 CPU 弹性扩容策略",
418
432
  "input": "DescribeCpuExpandStrategyRequest",
@@ -1320,6 +1334,82 @@
1320
1334
  ],
1321
1335
  "type": "object"
1322
1336
  },
1337
+ "AddressInfo": {
1338
+ "document": "实例地址信息",
1339
+ "members": [
1340
+ {
1341
+ "disabled": false,
1342
+ "document": "地址的资源id标识。",
1343
+ "example": "cdb-xxx",
1344
+ "member": "string",
1345
+ "name": "ResourceId",
1346
+ "output_required": true,
1347
+ "type": "string",
1348
+ "value_allowed_null": false
1349
+ },
1350
+ {
1351
+ "disabled": false,
1352
+ "document": "地址所在的vpc。",
1353
+ "example": "vpc-xxx",
1354
+ "member": "string",
1355
+ "name": "UniqVpcId",
1356
+ "output_required": true,
1357
+ "type": "string",
1358
+ "value_allowed_null": false
1359
+ },
1360
+ {
1361
+ "disabled": false,
1362
+ "document": "地址所在的子网。",
1363
+ "example": "subnet-xxx",
1364
+ "member": "string",
1365
+ "name": "UniqSubnetId",
1366
+ "output_required": true,
1367
+ "type": "string",
1368
+ "value_allowed_null": false
1369
+ },
1370
+ {
1371
+ "disabled": false,
1372
+ "document": "地址的vip。",
1373
+ "example": "无",
1374
+ "member": "string",
1375
+ "name": "Vip",
1376
+ "output_required": true,
1377
+ "type": "string",
1378
+ "value_allowed_null": false
1379
+ },
1380
+ {
1381
+ "disabled": false,
1382
+ "document": "地址的端口。",
1383
+ "example": "无",
1384
+ "member": "int64",
1385
+ "name": "VPort",
1386
+ "output_required": true,
1387
+ "type": "int",
1388
+ "value_allowed_null": false
1389
+ },
1390
+ {
1391
+ "disabled": false,
1392
+ "document": "外网地址域名。",
1393
+ "example": "无",
1394
+ "member": "string",
1395
+ "name": "WanDomain",
1396
+ "output_required": false,
1397
+ "type": "string",
1398
+ "value_allowed_null": false
1399
+ },
1400
+ {
1401
+ "disabled": false,
1402
+ "document": "外网地址端口。",
1403
+ "example": "无",
1404
+ "member": "int64",
1405
+ "name": "WanPort",
1406
+ "output_required": false,
1407
+ "type": "int",
1408
+ "value_allowed_null": false
1409
+ }
1410
+ ],
1411
+ "usage": "out"
1412
+ },
1323
1413
  "AdjustCdbProxyAddressRequest": {
1324
1414
  "document": "AdjustCdbProxyAddress请求参数结构体",
1325
1415
  "members": [
@@ -3719,6 +3809,23 @@
3719
3809
  ],
3720
3810
  "usage": "out"
3721
3811
  },
3812
+ "CheckMigrateClusterRequest": {
3813
+ "document": "CheckMigrateCluster请求参数结构体",
3814
+ "members": [],
3815
+ "type": "object"
3816
+ },
3817
+ "CheckMigrateClusterResponse": {
3818
+ "document": "CheckMigrateCluster返回参数结构体",
3819
+ "members": [
3820
+ {
3821
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
3822
+ "member": "string",
3823
+ "name": "RequestId",
3824
+ "type": "string"
3825
+ }
3826
+ ],
3827
+ "type": "object"
3828
+ },
3722
3829
  "CloneItem": {
3723
3830
  "document": "克隆任务记录。",
3724
3831
  "members": [
@@ -3970,6 +4077,67 @@
3970
4077
  ],
3971
4078
  "type": "object"
3972
4079
  },
4080
+ "ClusterNodeInfo": {
4081
+ "document": "集群版实例节点信息",
4082
+ "members": [
4083
+ {
4084
+ "disabled": false,
4085
+ "document": "节点id。",
4086
+ "example": "dbn-xxx",
4087
+ "member": "string",
4088
+ "name": "NodeId",
4089
+ "output_required": true,
4090
+ "required": false,
4091
+ "type": "string",
4092
+ "value_allowed_null": false
4093
+ },
4094
+ {
4095
+ "disabled": false,
4096
+ "document": "节点的角色。",
4097
+ "example": "master/ro",
4098
+ "member": "string",
4099
+ "name": "Role",
4100
+ "output_required": true,
4101
+ "required": false,
4102
+ "type": "string",
4103
+ "value_allowed_null": false
4104
+ },
4105
+ {
4106
+ "disabled": false,
4107
+ "document": "节点所在可用区。",
4108
+ "example": "ap-guangzhou-3",
4109
+ "member": "string",
4110
+ "name": "Zone",
4111
+ "output_required": true,
4112
+ "required": false,
4113
+ "type": "string",
4114
+ "value_allowed_null": false
4115
+ },
4116
+ {
4117
+ "disabled": false,
4118
+ "document": "节点的权重",
4119
+ "example": "100",
4120
+ "member": "uint64",
4121
+ "name": "Weight",
4122
+ "output_required": true,
4123
+ "required": false,
4124
+ "type": "int",
4125
+ "value_allowed_null": false
4126
+ },
4127
+ {
4128
+ "disabled": false,
4129
+ "document": "节点状态。\n注意:此字段可能返回 null,表示取不到有效值。",
4130
+ "example": "normal",
4131
+ "member": "string",
4132
+ "name": "Status",
4133
+ "output_required": true,
4134
+ "required": false,
4135
+ "type": "string",
4136
+ "value_allowed_null": true
4137
+ }
4138
+ ],
4139
+ "usage": "both"
4140
+ },
3973
4141
  "ColumnPrivilege": {
3974
4142
  "document": "列权限信息",
3975
4143
  "members": [
@@ -8580,6 +8748,93 @@
8580
8748
  ],
8581
8749
  "type": "object"
8582
8750
  },
8751
+ "DescribeClusterInfoRequest": {
8752
+ "document": "DescribeClusterInfo请求参数结构体",
8753
+ "members": [
8754
+ {
8755
+ "disabled": false,
8756
+ "document": "实例id。",
8757
+ "example": "cdb-xxx",
8758
+ "member": "string",
8759
+ "name": "InstanceId",
8760
+ "required": true,
8761
+ "type": "string"
8762
+ }
8763
+ ],
8764
+ "type": "object"
8765
+ },
8766
+ "DescribeClusterInfoResponse": {
8767
+ "document": "DescribeClusterInfo返回参数结构体",
8768
+ "members": [
8769
+ {
8770
+ "disabled": false,
8771
+ "document": "实例名称。",
8772
+ "example": "无",
8773
+ "member": "string",
8774
+ "name": "ClusterName",
8775
+ "output_required": false,
8776
+ "type": "string",
8777
+ "value_allowed_null": false
8778
+ },
8779
+ {
8780
+ "disabled": false,
8781
+ "document": "集群读写地址信息。",
8782
+ "example": "无",
8783
+ "member": "AddressInfo",
8784
+ "name": "ReadWriteAddress",
8785
+ "output_required": false,
8786
+ "type": "object",
8787
+ "value_allowed_null": false
8788
+ },
8789
+ {
8790
+ "disabled": false,
8791
+ "document": "集群只读地址信息。",
8792
+ "example": "无",
8793
+ "member": "AddressInfo",
8794
+ "name": "ReadOnlyAddress",
8795
+ "output_required": false,
8796
+ "type": "list",
8797
+ "value_allowed_null": false
8798
+ },
8799
+ {
8800
+ "disabled": false,
8801
+ "document": "集群节点列表信息。",
8802
+ "example": "无",
8803
+ "member": "ClusterNodeInfo",
8804
+ "name": "NodeList",
8805
+ "output_required": false,
8806
+ "type": "list",
8807
+ "value_allowed_null": false
8808
+ },
8809
+ {
8810
+ "disabled": false,
8811
+ "document": "只读空间保护阈值,单位GB",
8812
+ "example": "无",
8813
+ "member": "int64",
8814
+ "name": "ReadonlyLimit",
8815
+ "output_required": false,
8816
+ "type": "int",
8817
+ "value_allowed_null": false
8818
+ },
8819
+ {
8820
+ "disabled": false,
8821
+ "document": "实例节点数。",
8822
+ "example": "无",
8823
+ "member": "int64",
8824
+ "name": "NodeCount",
8825
+ "output_required": false,
8826
+ "type": "int",
8827
+ "value_allowed_null": false
8828
+ },
8829
+ {
8830
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
8831
+ "member": "string",
8832
+ "name": "RequestId",
8833
+ "type": "string"
8834
+ }
8835
+ ],
8836
+ "type": "object"
8837
+ },
8583
8838
  "DescribeCpuExpandStrategyRequest": {
8584
8839
  "document": "DescribeCpuExpandStrategy请求参数结构体",
8585
8840
  "members": [
@@ -54,6 +54,14 @@
54
54
  "title": "均衡RO组内实例的负载"
55
55
  }
56
56
  ],
57
+ "CheckMigrateCluster": [
58
+ {
59
+ "document": "",
60
+ "input": "POST / HTTP/1.1\nHost: cdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CheckMigrateCluster\n<公共请求参数>\n\n{}",
61
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abc\"\n }\n}",
62
+ "title": "高可用实例一键迁移到集群版校验"
63
+ }
64
+ ],
57
65
  "CloseAuditService": [
58
66
  {
59
67
  "document": "无",
@@ -508,6 +516,14 @@
508
516
  "title": "查询克隆列表"
509
517
  }
510
518
  ],
519
+ "DescribeClusterInfo": [
520
+ {
521
+ "document": "",
522
+ "input": "POST / HTTP/1.1\nHost: cdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeClusterInfo\n<公共请求参数>\n\n{\n \"InstanceId\": \"cdb-xxx\"\n}",
523
+ "output": "{\n \"Response\": {\n \"ClusterName\": \"dbname\",\n \"ReadWriteAddress\": {\n \"ResourceId\": \"cdb-xxx\",\n \"UniqVpcId\": \"vpc-xxx\",\n \"UniqSubnetId\": \"subnet-xxx\",\n \"Vip\": \"192.168.3.4\",\n \"VPort\": 3306,\n \"WanDomain\": \"\",\n \"WanPort\": 0\n },\n \"ReadOnlyAddress\": [\n {\n \"ResourceId\": \"cdb-xxx|readonly\",\n \"UniqVpcId\": \"vpc-xxx\",\n \"UniqSubnetId\": \"subnet-xxx\",\n \"Vip\": \"192.168.3.5\",\n \"VPort\": 3306,\n \"WanDomain\": \"\",\n \"WanPort\": 0\n }\n ],\n \"NodeList\": [\n {\n \"NodeId\": \"dbn-xxx\",\n \"Role\": \"master\",\n \"Zone\": \"ap-guangzhou-1\",\n \"Weight\": 1,\n \"Status\": \"online\"\n },\n {\n \"NodeId\": \"dbn-xxx\",\n \"Role\": \"slave\",\n \"Zone\": \"ap-guangzhou-2\",\n \"Weight\": 1,\n \"Status\": \"online\"\n }\n ],\n \"ReadonlyLimit\": 10,\n \"NodeCount\": 2,\n \"RequestId\": \"abc\"\n }\n}",
524
+ "title": "查询集群版实例信息"
525
+ }
526
+ ],
511
527
  "DescribeCpuExpandStrategy": [
512
528
  {
513
529
  "document": "用于查询实例的弹性扩容配置。",
@@ -10047,7 +10047,7 @@
10047
10047
  {
10048
10048
  "disabled": false,
10049
10049
  "document": "http2 配置开关\non:开启\noff:关闭\n注意:此字段可能返回 null,表示取不到有效值。",
10050
- "example": "rewrew",
10050
+ "example": "on",
10051
10051
  "member": "string",
10052
10052
  "name": "Http2",
10053
10053
  "output_required": true,
@@ -10058,7 +10058,7 @@
10058
10058
  {
10059
10059
  "disabled": false,
10060
10060
  "document": "OCSP 配置开关\non:开启\noff:关闭\n默认为关闭状态\n注意:此字段可能返回 null,表示取不到有效值。",
10061
- "example": "123456",
10061
+ "example": "on",
10062
10062
  "member": "string",
10063
10063
  "name": "OcspStapling",
10064
10064
  "output_required": true,
@@ -10069,7 +10069,7 @@
10069
10069
  {
10070
10070
  "disabled": false,
10071
10071
  "document": "客户端证书校验功能\non:开启\noff:关闭\n默认为关闭状态,开启时需要上传客户端证书信息,该配置项目前在灰度中,尚未全量\n注意:此字段可能返回 null,表示取不到有效值。",
10072
- "example": "dsadsa",
10072
+ "example": "on",
10073
10073
  "member": "string",
10074
10074
  "name": "VerifyClient",
10075
10075
  "output_required": true,
@@ -10102,7 +10102,7 @@
10102
10102
  {
10103
10103
  "disabled": false,
10104
10104
  "document": "Spdy 配置开关\non:开启\noff:关闭\n默认为关闭状态\n注意:此字段可能返回 null,表示取不到有效值。",
10105
- "example": "dfdf",
10105
+ "example": "on",
10106
10106
  "member": "string",
10107
10107
  "name": "Spdy",
10108
10108
  "output_required": true,