tccli 3.0.1391.1__py2.py3-none-any.whl → 3.0.1414.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.

Potentially problematic release.


This version of tccli might be problematic. Click here for more details.

Files changed (226) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +2 -1
  3. tccli/services/ai3d/v20250513/api.json +22 -4
  4. tccli/services/aiart/aiart_client.py +173 -67
  5. tccli/services/aiart/v20221229/api.json +193 -0
  6. tccli/services/aiart/v20221229/examples.json +16 -0
  7. tccli/services/apm/apm_client.py +53 -0
  8. tccli/services/apm/v20210622/api.json +354 -0
  9. tccli/services/apm/v20210622/examples.json +8 -0
  10. tccli/services/asr/v20190614/api.json +3 -3
  11. tccli/services/autoscaling/v20180419/api.json +24 -2
  12. tccli/services/batch/v20170312/api.json +1 -1
  13. tccli/services/bda/bda_client.py +15 -704
  14. tccli/services/bda/v20200324/api.json +107 -1819
  15. tccli/services/bda/v20200324/examples.json +0 -176
  16. tccli/services/billing/billing_client.py +326 -8
  17. tccli/services/billing/v20180709/api.json +2200 -255
  18. tccli/services/billing/v20180709/examples.json +48 -0
  19. tccli/services/cam/v20190116/api.json +4 -4
  20. tccli/services/captcha/v20190722/api.json +3 -3
  21. tccli/services/cat/v20180409/api.json +7 -7
  22. tccli/services/ccc/ccc_client.py +235 -76
  23. tccli/services/ccc/v20200210/api.json +502 -18
  24. tccli/services/ccc/v20200210/examples.json +24 -0
  25. tccli/services/cdb/cdb_client.py +106 -0
  26. tccli/services/cdb/v20170320/api.json +257 -44
  27. tccli/services/cdb/v20170320/examples.json +22 -6
  28. tccli/services/cdn/cdn_client.py +4 -163
  29. tccli/services/cdn/v20180606/api.json +61 -310
  30. tccli/services/cdn/v20180606/examples.json +1 -25
  31. tccli/services/cdwdoris/v20211228/api.json +51 -12
  32. tccli/services/cdwpg/v20201230/api.json +11 -1
  33. tccli/services/cdwpg/v20201230/examples.json +1 -1
  34. tccli/services/cfg/v20210820/api.json +11 -1
  35. tccli/services/cfs/cfs_client.py +41 -94
  36. tccli/services/cfs/v20190719/api.json +171 -55
  37. tccli/services/cfs/v20190719/examples.json +1 -9
  38. tccli/services/cfw/v20190904/api.json +122 -10
  39. tccli/services/ckafka/ckafka_client.py +188 -29
  40. tccli/services/ckafka/v20190819/api.json +277 -4
  41. tccli/services/ckafka/v20190819/examples.json +25 -1
  42. tccli/services/clb/clb_client.py +0 -265
  43. tccli/services/clb/v20180317/api.json +130 -296
  44. tccli/services/clb/v20180317/examples.json +12 -40
  45. tccli/services/cloudapp/v20220530/api.json +55 -0
  46. tccli/services/cloudaudit/v20190319/api.json +11 -0
  47. tccli/services/cloudhsm/v20191112/api.json +10 -10
  48. tccli/services/cls/v20201016/api.json +63 -45
  49. tccli/services/cls/v20201016/examples.json +10 -4
  50. tccli/services/csip/v20221121/api.json +53 -3
  51. tccli/services/ctem/v20231128/api.json +320 -0
  52. tccli/services/ctem/v20231128/examples.json +3 -3
  53. tccli/services/cvm/cvm_client.py +0 -212
  54. tccli/services/cvm/v20170312/api.json +91 -843
  55. tccli/services/cvm/v20170312/examples.json +32 -58
  56. tccli/services/cynosdb/cynosdb_client.py +167 -8
  57. tccli/services/cynosdb/v20190107/api.json +1126 -148
  58. tccli/services/cynosdb/v20190107/examples.json +31 -7
  59. tccli/services/dbbrain/dbbrain_client.py +246 -87
  60. tccli/services/dbbrain/v20191016/api.json +74 -62
  61. tccli/services/dbbrain/v20191016/examples.json +1 -1
  62. tccli/services/dbbrain/v20210527/api.json +601 -177
  63. tccli/services/dbbrain/v20210527/examples.json +28 -4
  64. tccli/services/dc/v20180410/api.json +101 -3
  65. tccli/services/dcdb/v20180411/api.json +1 -1
  66. tccli/services/dlc/dlc_client.py +53 -0
  67. tccli/services/dlc/v20210125/api.json +237 -24
  68. tccli/services/dlc/v20210125/examples.json +12 -4
  69. tccli/services/dnspod/dnspod_client.py +106 -0
  70. tccli/services/dnspod/v20210323/api.json +126 -20
  71. tccli/services/dnspod/v20210323/examples.json +17 -7
  72. tccli/services/dsgc/v20190723/api.json +73 -15
  73. tccli/services/dts/v20180330/api.json +4 -4
  74. tccli/services/dts/v20211206/api.json +408 -127
  75. tccli/services/dts/v20211206/examples.json +15 -9
  76. tccli/services/eb/v20210416/api.json +41 -1
  77. tccli/services/eb/v20210416/examples.json +1 -1
  78. tccli/services/emr/v20190103/api.json +56 -9
  79. tccli/services/emr/v20190103/examples.json +5 -5
  80. tccli/services/es/es_client.py +273 -8
  81. tccli/services/es/v20180416/api.json +845 -33
  82. tccli/services/es/v20180416/examples.json +33 -1
  83. tccli/services/es/v20250101/api.json +135 -2
  84. tccli/services/es/v20250101/examples.json +8 -0
  85. tccli/services/ess/ess_client.py +509 -32
  86. tccli/services/ess/v20201111/api.json +1366 -113
  87. tccli/services/ess/v20201111/examples.json +94 -10
  88. tccli/services/essbasic/v20210526/api.json +265 -27
  89. tccli/services/essbasic/v20210526/examples.json +12 -12
  90. tccli/services/facefusion/v20220927/api.json +1 -1
  91. tccli/services/gaap/v20180529/api.json +18 -8
  92. tccli/services/gme/gme_client.py +53 -0
  93. tccli/services/gme/v20180711/api.json +241 -1
  94. tccli/services/gme/v20180711/examples.json +8 -0
  95. tccli/services/gs/gs_client.py +216 -4
  96. tccli/services/gs/v20191118/api.json +202 -1
  97. tccli/services/gs/v20191118/examples.json +32 -0
  98. tccli/services/gwlb/gwlb_client.py +53 -0
  99. tccli/services/gwlb/v20240906/api.json +150 -0
  100. tccli/services/gwlb/v20240906/examples.json +8 -0
  101. tccli/services/hai/v20230812/api.json +5 -5
  102. tccli/services/hunyuan/v20230901/api.json +3 -3
  103. tccli/services/hunyuan/v20230901/examples.json +1 -1
  104. tccli/services/iai/v20180301/api.json +227 -207
  105. tccli/services/iai/v20180301/examples.json +26 -26
  106. tccli/services/iai/v20200303/api.json +4 -4
  107. tccli/services/iai/v20200303/examples.json +1 -1
  108. tccli/services/ioa/ioa_client.py +265 -0
  109. tccli/services/ioa/v20220601/api.json +781 -85
  110. tccli/services/ioa/v20220601/examples.json +46 -0
  111. tccli/services/iotexplorer/iotexplorer_client.py +387 -16
  112. tccli/services/iotexplorer/v20190423/api.json +1183 -63
  113. tccli/services/iotexplorer/v20190423/examples.json +92 -0
  114. tccli/services/keewidb/v20220308/api.json +69 -17
  115. tccli/services/keewidb/v20220308/examples.json +5 -5
  116. tccli/services/lcic/v20220817/api.json +61 -15
  117. tccli/services/lighthouse/v20200324/api.json +193 -24
  118. tccli/services/lighthouse/v20200324/examples.json +9 -3
  119. tccli/services/live/v20180801/api.json +6 -6
  120. tccli/services/live/v20180801/examples.json +7 -1
  121. tccli/services/lke/lke_client.py +40 -93
  122. tccli/services/lke/v20231130/api.json +943 -390
  123. tccli/services/lke/v20231130/examples.json +38 -46
  124. tccli/services/lkeap/v20240522/api.json +39 -12
  125. tccli/services/lkeap/v20240522/examples.json +12 -0
  126. tccli/services/mariadb/v20170312/api.json +1 -1
  127. tccli/services/mna/v20210119/api.json +11 -2
  128. tccli/services/mna/v20210119/examples.json +1 -1
  129. tccli/services/mongodb/mongodb_client.py +334 -16
  130. tccli/services/mongodb/v20190725/api.json +1092 -383
  131. tccli/services/mongodb/v20190725/examples.json +69 -21
  132. tccli/services/monitor/monitor_client.py +106 -0
  133. tccli/services/monitor/v20180724/api.json +383 -12
  134. tccli/services/monitor/v20180724/examples.json +24 -2
  135. tccli/services/mps/mps_client.py +220 -8
  136. tccli/services/mps/v20190612/api.json +1999 -179
  137. tccli/services/mps/v20190612/examples.json +56 -6
  138. tccli/services/mqtt/v20240516/api.json +10 -0
  139. tccli/services/mqtt/v20240516/examples.json +3 -9
  140. tccli/services/nlp/v20190408/api.json +6 -6
  141. tccli/services/oceanus/oceanus_client.py +318 -0
  142. tccli/services/oceanus/v20190422/api.json +461 -26
  143. tccli/services/oceanus/v20190422/examples.json +50 -2
  144. tccli/services/ocr/ocr_client.py +41 -253
  145. tccli/services/ocr/v20181119/api.json +153 -659
  146. tccli/services/ocr/v20181119/examples.json +8 -40
  147. tccli/services/omics/v20221128/api.json +90 -7
  148. tccli/services/organization/v20210331/api.json +46 -7
  149. tccli/services/postgres/v20170312/api.json +333 -77
  150. tccli/services/postgres/v20170312/examples.json +37 -31
  151. tccli/services/privatedns/privatedns_client.py +641 -58
  152. tccli/services/privatedns/v20201028/api.json +930 -19
  153. tccli/services/privatedns/v20201028/examples.json +91 -3
  154. tccli/services/pts/v20210728/api.json +2 -2
  155. tccli/services/redis/v20180412/api.json +303 -109
  156. tccli/services/redis/v20180412/examples.json +12 -12
  157. tccli/services/region/v20220627/api.json +1 -1
  158. tccli/services/rum/v20210622/api.json +22 -4
  159. tccli/services/rum/v20210622/examples.json +2 -2
  160. tccli/services/sms/v20190711/api.json +12 -12
  161. tccli/services/sms/v20190711/examples.json +9 -3
  162. tccli/services/sms/v20210111/api.json +13 -13
  163. tccli/services/sms/v20210111/examples.json +8 -2
  164. tccli/services/sqlserver/v20180328/api.json +46 -7
  165. tccli/services/sqlserver/v20180328/examples.json +2 -2
  166. tccli/services/ssl/v20191205/api.json +28 -0
  167. tccli/services/svp/v20240125/api.json +14 -4
  168. tccli/services/tag/v20180813/api.json +3 -3
  169. tccli/services/tat/v20201028/api.json +22 -3
  170. tccli/services/tcb/v20180608/api.json +1 -1
  171. tccli/services/tcss/tcss_client.py +228 -69
  172. tccli/services/tcss/v20201101/api.json +273 -25
  173. tccli/services/tcss/v20201101/examples.json +26 -2
  174. tccli/services/teo/teo_client.py +317 -52
  175. tccli/services/teo/v20220901/api.json +1824 -242
  176. tccli/services/teo/v20220901/examples.json +109 -21
  177. tccli/services/thpc/thpc_client.py +57 -4
  178. tccli/services/thpc/v20230321/api.json +163 -21
  179. tccli/services/thpc/v20230321/examples.json +13 -5
  180. tccli/services/tione/tione_client.py +163 -4
  181. tccli/services/tione/v20211111/api.json +285 -21
  182. tccli/services/tione/v20211111/examples.json +27 -3
  183. tccli/services/tke/tke_client.py +8 -8
  184. tccli/services/tke/v20180525/api.json +168 -130
  185. tccli/services/tke/v20180525/examples.json +20 -20
  186. tccli/services/tke/v20220501/api.json +215 -3
  187. tccli/services/tke/v20220501/examples.json +8 -0
  188. tccli/services/tms/tms_client.py +106 -0
  189. tccli/services/tms/v20201229/api.json +249 -3
  190. tccli/services/tms/v20201229/examples.json +16 -0
  191. tccli/services/tmt/v20180321/api.json +78 -1
  192. tccli/services/trabbit/v20230418/api.json +271 -4
  193. tccli/services/trabbit/v20230418/examples.json +9 -3
  194. tccli/services/trocket/v20230308/api.json +4 -4
  195. tccli/services/trro/trro_client.py +106 -0
  196. tccli/services/trro/v20220325/api.json +456 -0
  197. tccli/services/trro/v20220325/examples.json +16 -0
  198. tccli/services/trtc/v20190722/api.json +197 -49
  199. tccli/services/trtc/v20190722/examples.json +4 -4
  200. tccli/services/tse/v20201207/api.json +69 -2
  201. tccli/services/tse/v20201207/examples.json +3 -3
  202. tccli/services/tsf/v20180326/api.json +70 -7
  203. tccli/services/tsf/v20180326/examples.json +2 -2
  204. tccli/services/vclm/v20240523/api.json +145 -0
  205. tccli/services/vclm/v20240523/examples.json +16 -0
  206. tccli/services/vclm/vclm_client.py +106 -0
  207. tccli/services/vcube/v20220410/api.json +1 -1
  208. tccli/services/vod/v20180717/api.json +7 -7
  209. tccli/services/vpc/v20170312/api.json +1216 -70
  210. tccli/services/vpc/v20170312/examples.json +139 -3
  211. tccli/services/vpc/vpc_client.py +1023 -122
  212. tccli/services/vrs/v20200824/api.json +11 -11
  213. tccli/services/vrs/v20200824/examples.json +1 -1
  214. tccli/services/vtc/v20240223/api.json +14 -14
  215. tccli/services/waf/v20180125/api.json +812 -143
  216. tccli/services/waf/v20180125/examples.json +2 -2
  217. tccli/services/wedata/v20210820/api.json +1281 -601
  218. tccli/services/wedata/v20210820/examples.json +127 -157
  219. tccli/services/wedata/v20250806/api.json +19335 -0
  220. tccli/services/wedata/v20250806/examples.json +999 -0
  221. tccli/services/wedata/wedata_client.py +7072 -1131
  222. {tccli-3.0.1391.1.dist-info → tccli-3.0.1414.1.dist-info}/METADATA +9 -7
  223. {tccli-3.0.1391.1.dist-info → tccli-3.0.1414.1.dist-info}/RECORD +226 -224
  224. {tccli-3.0.1391.1.dist-info → tccli-3.0.1414.1.dist-info}/WHEEL +1 -1
  225. {tccli-3.0.1391.1.dist-info → tccli-3.0.1414.1.dist-info}/entry_points.txt +0 -0
  226. {tccli-3.0.1391.1.dist-info/license_files → tccli-3.0.1414.1.dist-info/licenses}/LICENSE +0 -0
@@ -3,7 +3,7 @@
3
3
  "AssignProject": [
4
4
  {
5
5
  "document": "",
6
- "input": "https://mongodb.tencentcloudapi.com/?Action=AssignProject\n&InstanceIds.0=cmgo-eqmoa5sf\n&ProjectId=12\n&<公共请求参数>",
6
+ "input": "https://mongodb.tencentcloudapi.com/?Action=AssignProject\n&InstanceIds.0=cmgo-eqmo****\n&ProjectId=12\n&<公共请求参数>",
7
7
  "output": "{\n \"Response\": {\n \"FlowIds\": [\n 1081\n ],\n \"RequestId\": \"8e2a339e-5ba9-4da3-8dc2-65a0a6314811\"\n }\n}",
8
8
  "title": "指定云数据库实例的所属项目"
9
9
  }
@@ -56,6 +56,14 @@
56
56
  "title": "创建参数模板"
57
57
  }
58
58
  ],
59
+ "CreateLogDownloadTask": [
60
+ {
61
+ "document": "创建日志下载任务",
62
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateLogDownloadTask\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-k2p5su09\",\n \"StartTime\": \"2024-03-07 9:22:15\",\n \"EndTime\": \"2024-03-07 15:33:15\",\n \"LogComponents\": [\n \"NETWORK\"\n ],\n \"LogConnections\": [],\n \"LogIds\": [],\n \"LogDetailParams\": [\n \"client metadata\"\n ]\n}",
63
+ "output": "{\n \"Response\": {\n \"Status\": 0,\n \"RequestId\": \"1233vvae-23f9dfd\"\n }\n}",
64
+ "title": "创建日志下载任务"
65
+ }
66
+ ],
59
67
  "DeleteAccountUser": [
60
68
  {
61
69
  "document": "删除实例账号",
@@ -64,6 +72,14 @@
64
72
  "title": "删除实例账号"
65
73
  }
66
74
  ],
75
+ "DeleteLogDownloadTask": [
76
+ {
77
+ "document": "删除日志下载任务",
78
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteLogDownloadTask\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-k2p5su09\",\n \"TaskId\": \"export-28439fb3-90a6-4ca2-bd2f-ad99e99a14e9\"\n}",
79
+ "output": "{\n \"Response\": {\n \"RequestId\": \"q87sfsfds-897asd\",\n \"Status\": 0\n }\n}",
80
+ "title": "删除日志下载任务"
81
+ }
82
+ ],
67
83
  "DescribeAccountUsers": [
68
84
  {
69
85
  "document": "查询当前实例的全部账户信息",
@@ -83,8 +99,8 @@
83
99
  "DescribeBackupDownloadTask": [
84
100
  {
85
101
  "document": "",
86
- "input": "https://mongodb.tencentcloudapi.com/?Action=DescribeBackupDownloadTask\n&InstanceId=cmgo-dygv1rnp\n&Status.0=2\n&<公共请求参数>",
87
- "output": "{\n \"Response\": {\n \"RequestId\": \"c41c0c46-7d5a-49b9-832a-557880c1e9ef\",\n \"Tasks\": [\n {\n \"BackupName\": \"cmgo-dygv1rnp_2021-03-26 10:44\",\n \"BackupSize\": 844,\n \"CreateTime\": \"2021-03-26 10:47:37\",\n \"Percent\": 100,\n \"ReplicaSetId\": \"cmgo-dygv1rnp_0\",\n \"Status\": 2,\n \"TimeSpend\": 0,\n \"Url\": \"https://mognodb-backup-test-tar-1251937656.cos.ap-guangzhou.myqcloud.com/cmgo-dygv1rnp_2021-03-26%2010%3A44%2Fcmgo-dygv1rnp_0.tar?q-sign-algorithm=sha1&q-ak=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&q-sign-time=1616726859%3B1616813259&q-key-time=1616726859%3B1616813259&q-header-list=host&q-url-param-list=&q-signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n }\n ],\n \"TotalCount\": 1\n }\n}",
102
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeBackupDownloadTask\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-fdzf****\",\n \"Status\": [\n \"2\"\n ]\n}",
103
+ "output": "{\n \"Response\": {\n \"RequestId\": \"c7c0c495-4826-4938-a6d7-32146cad2632\",\n \"Tasks\": [\n {\n \"BackupDesc\": \"系统后台每日定时自动备份\",\n \"BackupMethod\": 0,\n \"BackupName\": \"cmgo-fdzf****_2025-09-23 22:03\",\n \"BackupSize\": 5747378,\n \"Bucket\": \"sh-backup-remote-125758****\",\n \"CreateTime\": \"2025-09-24 10:58:55\",\n \"Percent\": 100,\n \"Region\": \"ap-shanghai\",\n \"ReplicaSetId\": \"cmgo-fdzf******\",\n \"Status\": 2,\n \"TimeSpend\": 1,\n \"Url\": \"https://sh-backup-remote-tar-**************\"\n }\n ],\n \"TotalCount\": 1\n }\n}",
88
104
  "title": "查询备份下载任务"
89
105
  }
90
106
  ],
@@ -107,16 +123,16 @@
107
123
  "DescribeCurrentOp": [
108
124
  {
109
125
  "document": "查询云数据库实例的当前操作",
110
- "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCurrentOp\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-p8vn****\"\n}",
111
- "output": "{\n \"Response\": {\n \"TotalCount\": 1,\n \"CurrentOps\": [\n {\n \"OpId\": 1804858933,\n \"Ns\": \"db.****\",\n \"Query\": \"\",\n \"Op\": \"command\",\n \"ReplicaSetName\": \"salve-1\",\n \"NodeName\": \"salve-1\",\n \"Operation\": \"****\",\n \"State\": \"Primary\",\n \"MicrosecsRunning\": 30353723,\n \"ExecNode\": \"从节点\"\n }\n ],\n \"RequestId\": \"66956cf3-2d10-4c68-87c0-7bd558deae7e\"\n }\n}",
126
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCurrentOp\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-r3p8****\",\n \"State\": \"primary\"\n}",
127
+ "output": "{\n \"Response\": {\n \"CurrentOps\": [\n {\n \"ExecNode\": \"主节点\",\n \"MicrosecsRunning\": 103,\n \"NodeName\": \"**.**.**.**:****:*********\",\n \"Ns\": \"admin.$cmd.aggregate\",\n \"Op\": \"command\",\n \"OpId\": 42431451,\n \"Operation\": \"{\\\"Active\\\":true,\\\"AppName\\\":\\\"CMongo\\\",\\\"Client\\\":\\\"**.**.**.**:**\\\",\\\"ClientMetadata\\\":{\\\"application\\\":{\\\"name\\\":\\\"CMongo\\\"},\\\"driver\\\":{\\\"name\\\":\\\"mongo-go-driver\\\",\\\"version\\\":\\\"v1.*.*\\\"},\\\"os\\\":{\\\"architecture\\\":\\\"amd64\\\",\\\"type\\\":\\\"linux\\\"},\\\"platform\\\":\\\"***.**.*\\\"},\\\"Command\\\":{\\\"$db\\\":\\\"admin\\\",\\\"$readPreference\\\":{\\\"mode\\\":\\\"primaryPreferred\\\"},\\\"currentOp\\\":1,\\\"lsid\\\":{\\\"id\\\":{\\\"Data\\\":\\\"************************==\\\",\\\"Subtype\\\":4}},\\\"microsecs_running\\\":{\\\"$gt\\\":0}},\\\"ConnectionId\\\":********,\\\"CurrentOpTime\\\":\\\"2025-09-25T17:41:42.146+0800\\\",\\\"Desc\\\":\\\"conn*******\\\",\\\"Host\\\":\\\"*******64.site:7029\\\",\\\"Insert\\\":null,\\\"KillPending\\\":false,\\\"LockStats\\\":{},\\\"Locks\\\":{},\\\"Lsid\\\":{\\\"id\\\":{\\\"Data\\\":\\\"*******************==\\\",\\\"Subtype\\\":4},\\\"uid\\\":{\\\"Data\\\":\\\"********************************=\\\",\\\"Subtype\\\":0}},\\\"MicroSecsRunning\\\":103,\\\"Msg\\\":\\\"\\\",\\\"Ns\\\":\\\"admin.$cmd.aggregate\\\",\\\"NumYields\\\":0,\\\"Op\\\":\\\"command\\\",\\\"OpId\\\":********,\\\"OriginatingCommand\\\":null,\\\"PlanSummary\\\":\\\"\\\",\\\"Progress\\\":null,\\\"Query\\\":null,\\\"SecsRunning\\\":0,\\\"Transaction\\\":null,\\\"WaitingForLock\\\":false}\",\n \"Query\": \"{\\\"$db\\\":\\\"admin\\\",\\\"$readPreference\\\":{\\\"mode\\\":\\\"primaryPreferred\\\"},\\\"currentOp\\\":1,\\\"lsid\\\":{\\\"id\\\":{\\\"Data\\\":\\\"***********************==\\\",\\\"Subtype\\\":4}},\\\"microsecs_running\\\":{\\\"$gt\\\":0}}\",\n \"ReplicaSetName\": \"cmgo-r3p8****_0\",\n \"State\": \"primary\"\n }\n ],\n \"RequestId\": \"a1f20aaa-83c2-4062-b4f3-7c46ad2e1157\",\n \"TotalCount\": 1\n }\n}",
112
128
  "title": "查询云数据库实例的当前操作"
113
129
  }
114
130
  ],
115
131
  "DescribeDBBackups": [
116
132
  {
117
133
  "document": "",
118
- "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDBBackups\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-f555zzzz\",\n \"BackupMethod\": 1\n}",
119
- "output": "{\n \"Response\": {\n \"RequestId\": \"6EF60BEC-0242-43AF-BB20-270359FB54A7\",\n \"BackupList\": [],\n \"TotalCount\": 0\n }\n}",
134
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDBBackups\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-fdzf****\",\n \"BackupMethod\": 0\n}",
135
+ "output": "{\n \"Response\": {\n \"BackupList\": [\n {\n \"BackId\": 10657020,\n \"BackupDesc\": \"系统后台每日定时自动备份\",\n \"BackupMethod\": 0,\n \"BackupName\": \"cmgo-fdzf****_2025-09-17 22:01\",\n \"BackupRegion\": \"\",\n \"BackupSize\": 5747379,\n \"BackupType\": 0,\n \"DeleteTime\": \"2025-09-24 22:01:58\",\n \"EndTime\": \"2025-09-17 22:01:58\",\n \"InstanceId\": \"cmgo-fdzf****\",\n \"RestoreTime\": \"\",\n \"StartTime\": \"2025-09-17 22:01:52\",\n \"Status\": 2\n },\n {\n \"BackId\": 10688339,\n \"BackupDesc\": \"系统后台每日定时自动备份\",\n \"BackupMethod\": 0,\n \"BackupName\": \"cmgo-fdzf****_2025-09-18 22:03\",\n \"BackupRegion\": \"ap-shanghai\",\n \"BackupSize\": 5747378,\n \"BackupType\": 0,\n \"DeleteTime\": \"2025-09-20 22:03:37\",\n \"EndTime\": \"2025-09-18 22:03:44\",\n \"InstanceId\": \"cmgo-fdzf****\",\n \"RestoreTime\": \"\",\n \"StartTime\": \"2025-09-18 22:03:42\",\n \"Status\": 2\n }\n ],\n \"RequestId\": \"0e2eb0e1-f775-4ba8-af9f-e5650a55dce1\",\n \"TotalCount\": 2\n }\n}",
120
136
  "title": "查询云数据库实例的备份文件信息"
121
137
  }
122
138
  ],
@@ -133,7 +149,7 @@
133
149
  "document": "输入参数 DbName 为空时,查看当前实例全部数据库列表。",
134
150
  "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDBInstanceNamespace\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-qny2****\"\n}",
135
151
  "output": "{\n \"Response\": {\n \"Databases\": [\n \"demo_db7\",\n \"demo_db8\",\n \"demo_db9\"\n ],\n \"RequestId\": \"18cfe2bf-6934-4f17-a089-8d2e5d6cfc53\"\n }\n}",
136
- "title": "查询当前实例的DB列表。"
152
+ "title": "查询当前实例的DB列表"
137
153
  },
138
154
  {
139
155
  "document": "指定 DbName,查询该数据库下的所有集合信息。",
@@ -185,8 +201,8 @@
185
201
  "DescribeDetailedSlowLogs": [
186
202
  {
187
203
  "document": "",
188
- "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDetailedSlowLogs\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-qny2****\",\n \"StartTime\": \"2025-03-27 12:00:00\",\n \"EndTime\": \"2025-03-27 13:33:00\"\n}",
189
- "output": "{\n \"Response\": {\n \"DetailedSlowLogs\": [\n {\n \"Log\": \"xxxxxxx\",\n \"NodeName\": \"cmgo-xxxx_0-node-primary\",\n \"QueryHash\": \"BA0DFF88\"\n }\n ],\n \"RequestId\": \"a1460a2d-dc8e-467c-b2d5-0beb6b84a7a7\",\n \"TotalCount\": 2\n }\n}",
204
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDetailedSlowLogs\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-r3p8****\",\n \"StartTime\": \"2025-09-22 11:53:15\",\n \"EndTime\": \"2025-09-23 11:53:15\"\n}",
205
+ "output": "{\n \"Response\": {\n \"DetailedSlowLogs\": [\n {\n \"Log\": \"Mon Sep 22 20:30:19.980 I COMMAND [conn3725696] command admin.$cmd command: saslContinue { saslContinue: 1, conversationId: 1, payload: BinData(0, ), $clusterTime: { clusterTime: Timestamp(1758544211, 1), signature: { hash: BinData(0, C28B5E1C1EE29**************************), keyId: 75428892796********* } }, $db: \\\"admin\\\", $readPreference: { mode: \\\"primaryPreferred\\\" } } numYields:0 reslen:204 locks:{} protocol:op_msg 184ms\",\n \"NodeName\": \"cmgo-r3p8****_0-node-primary\",\n \"QueryHash\": \"admin..****Continue\"\n }\n ],\n \"RequestId\": \"5e35a1bd-60e6-4a45-8792-d033581b9209\",\n \"TotalCount\": 1\n }\n}",
190
206
  "title": "查询慢日志详情"
191
207
  }
192
208
  ],
@@ -198,18 +214,34 @@
198
214
  "title": "InstanceEnumParam"
199
215
  }
200
216
  ],
217
+ "DescribeLogDownloadTasks": [
218
+ {
219
+ "document": "日志下载任务查询",
220
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeLogDownloadTasks\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-k2p5su09\",\n \"StartTime\": \"2024-03-07 9:22:15\",\n \"EndTime\": \"2024-03-07 15:33:15\"\n}",
221
+ "output": "{\n \"Response\": {\n \"RequestId\": \"832423fdfsfsd-312jdsf\",\n \"Tasks\": [\n {\n \"CreateTime\": \"2024-03-07 21:01:00\",\n \"FileSize\": 372432,\n \"Percent\": 100,\n \"Status\": 2,\n \"TaskId\": \"export-28439fb3-90a6-4ca2-bd2f-ad99e99a14e9\",\n \"TaskType\": 0,\n \"UpdateTime\": \"2024-03-07 21:14:02\",\n \"Url\": \"\"\n }\n ],\n \"TotalCount\": 1\n }\n}",
222
+ "title": "日志下载任务查询"
223
+ }
224
+ ],
225
+ "DescribeMongodbLogs": [
226
+ {
227
+ "document": "本接口用于查询实例日志",
228
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeMongodbLogs\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-k2p5su09\",\n \"StartTime\": \"2024-03-07 9:22:15\",\n \"EndTime\": \"2024-03-07 15:33:15\",\n \"LogComponents\": [\n \"NETWORK\"\n ],\n \"LogConnections\": [],\n \"LogIds\": [],\n \"LogDetailParams\": [\n \"client metadata\"\n ]\n}",
229
+ "output": "{\n \"Response\": {\n \"LogList\": [\n {\n \"LogComponent\": \"NETWORK\",\n \"LogConnection\": \"conn269939\",\n \"LogDetail\": \"{\\\"t\\\":{\\\"$date\\\":\\\"2024-03-07T10:29:50.027+08:00\\\"},\\\"s\\\":\\\"I\\\", \\\"c\\\":\\\"NETWORK\\\", \\\"id\\\":51800, \\\"ctx\\\":\\\"conn269939\\\",\\\"msg\\\":\\\"client metadata\\\",\\\"attr\\\":{\\\"remote\\\":\\\"127.0.0.1:39024\\\",\\\"client\\\":\\\"conn269939\\\",\\\"doc\\\":{\\\"driver\\\":{\\\"name\\\":\\\"mongo-go-driver\\\",\\\"version\\\":\\\"v1.10.6\\\"},\\\"os\\\":{\\\"type\\\":\\\"linux\\\",\\\"architecture\\\":\\\"amd64\\\"},\\\"platform\\\":\\\"go1.20.4\\\",\\\"application\\\":{\\\"name\\\":\\\"CMongo\\\"}}}}\",\n \"LogId\": \"51800\",\n \"LogLevel\": \"WARNING\",\n \"LogTime\": \"2024-03-07T10:29:50.027+08:00\"\n }\n ],\n \"RequestId\": \"ab2323tf-rqew1111\",\n \"TotalCount\": 1\n }\n}",
230
+ "title": "查询日志"
231
+ }
232
+ ],
201
233
  "DescribeSecurityGroup": [
202
234
  {
203
235
  "document": "查询当前实例已绑定的全部安全组",
204
236
  "input": "https://mongodb.tencentcloudapi.com/?Action=DescribeSecurityGroup\n&InstanceId=cmgo-p8vn****\n&<公共请求参数>",
205
- "output": "{\n \"Response\": {\n \"Groups\": [\n {\n \"ProjectId\": 0,\n \"CreateTime\": \"2022-03-23 12:05:22\",\n \"Inbound\": [\n {\n \"Action\": \"Describe*\",\n \"CidrIp\": \"127.0.0.1\",\n \"PortRange\": \"27017\",\n \"IpProtocol\": \"tcp\",\n \"Id\": \"\",\n \"AddressModule\": \"\",\n \"ServiceModule\": \"\",\n \"Desc\": \"localip\"\n }\n ],\n \"Outbound\": [\n {\n \"Action\": \"Describe*\",\n \"CidrIp\": \"127.0.0.1\",\n \"PortRange\": \"27017\",\n \"IpProtocol\": \"tcp\",\n \"AddressModule\": \"\",\n \"ServiceModule\": \"\",\n \"Desc\": \"localip\"\n }\n ],\n \"SecurityGroupId\": \"sg-cade***\",\n \"SecurityGroupName\": \"sg\",\n \"SecurityGroupRemark\": \"sg-mark\"\n }\n ],\n \"RequestId\": \"bc59fa05-d429-4bcf-863f-1f6f99295485\"\n }\n}",
237
+ "output": "{\n \"Response\": {\n \"Groups\": [\n {\n \"CreateTime\": \"2022-06-08 17:06:38\",\n \"Inbound\": [\n {\n \"Action\": \"ACCEPT\",\n \"AddressModule\": \"\",\n \"CidrIp\": \"**.**.**.**/24\",\n \"Desc\": \"\",\n \"Id\": \"\",\n \"IpProtocol\": \"tcp\",\n \"PortRange\": \"8086\",\n \"ServiceModule\": \"\"\n },\n {\n \"Action\": \"ACCEPT\",\n \"AddressModule\": \"\",\n \"CidrIp\": \"**.**.**.**/24\",\n \"Desc\": \"\",\n \"Id\": \"\",\n \"IpProtocol\": \"tcp\",\n \"PortRange\": \"****\",\n \"ServiceModule\": \"\"\n },\n {\n \"Action\": \"ACCEPT\",\n \"AddressModule\": \"\",\n \"CidrIp\": \"**.**.**.**/24\",\n \"Desc\": \"\",\n \"Id\": \"\",\n \"IpProtocol\": \"tcp\",\n \"PortRange\": \"****\",\n \"ServiceModule\": \"\"\n },\n {\n \"Action\": \"ACCEPT\",\n \"AddressModule\": \"\",\n \"CidrIp\": \"**.**.**.**/24\",\n \"Desc\": \"\",\n \"Id\": \"\",\n \"IpProtocol\": \"tcp\",\n \"PortRange\": \"****\",\n \"ServiceModule\": \"\"\n },\n {\n \"Action\": \"ACCEPT\",\n \"AddressModule\": \"\",\n \"CidrIp\": \"**.**.**.**/24\",\n \"Desc\": \"\",\n \"Id\": \"\",\n \"IpProtocol\": \"tcp\",\n \"PortRange\": \"****\",\n \"ServiceModule\": \"\"\n },\n {\n \"Action\": \"ACCEPT\",\n \"AddressModule\": \"ipm-pvcdf2ty\",\n \"CidrIp\": \"\",\n \"Desc\": \"\",\n \"Id\": \"\",\n \"IpProtocol\": \"tcp\",\n \"PortRange\": \"**,**,**,****,**,****\",\n \"ServiceModule\": \"\"\n }\n ],\n \"Outbound\": [],\n \"ProjectId\": 0,\n \"SecurityGroupId\": \"sg-0klp****\",\n \"SecurityGroupName\": \"default\",\n \"SecurityGroupRemark\": \"System created security group\"\n }\n ],\n \"RequestId\": \"21d6a495-f46d-4440-bd25-d4e36f51afdd\"\n }\n}",
206
238
  "title": "查询实例安全组"
207
239
  }
208
240
  ],
209
241
  "DescribeSlowLogPatterns": [
210
242
  {
211
243
  "document": "",
212
- "input": "https://mongodb.tencentcloudapi.com/?Action=DescribeSlowLogPatterns\n&InstanceId=cmgo-a3bm93hf\n&StartTime=2020-04-20 00:00:00\n&EndTime=2020-04-20 22:00:00\n&SlowMS=100\n&Offset=0\n&Limit=100\n&<公共请求参数>",
244
+ "input": "https://mongodb.tencentcloudapi.com/?Action=DescribeSlowLogPatterns\n&InstanceId=cmgo-a3bm****\n&StartTime=2020-04-20 00:00:00\n&EndTime=2020-04-20 22:00:00\n&SlowMS=100\n&Offset=0\n&Limit=100\n&<公共请求参数>",
213
245
  "output": "{\n \"Response\": {\n \"Count\": 2,\n \"RequestId\": \"895de939-f726-4cb0-bb02-3890289479e3\",\n \"SlowLogPatterns\": [\n {\n \"AverageTime\": 699,\n \"MaxTime\": 5335,\n \"Pattern\": \"admin.$cmd.command\",\n \"Total\": 12\n },\n {\n \"AverageTime\": 271,\n \"MaxTime\": 423,\n \"Pattern\": \"local.system.replset.command\",\n \"Total\": 8\n }\n ]\n }\n}",
214
246
  "title": "查询数据库慢日志统计信息"
215
247
  }
@@ -217,8 +249,8 @@
217
249
  "DescribeSlowLogs": [
218
250
  {
219
251
  "document": "以下示例为获取一实例的慢日志信息。",
220
- "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSlowLogs\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-a1sh112****\",\n \"StartTime\": \"2020-09-22 00:00:00\",\n \"EndTime\": \"2020-09-22 00:00:00\",\n \"SlowMS\": 1,\n \"Offset\": 1,\n \"Limit\": 1,\n \"Format\": \"json\"\n}",
221
- "output": "{\n \"Response\": {\n \"Count\": 20,\n \"RequestId\": \"3a36aa6e-67e2-42a9-adfe-fc694334cc78\",\n \"SlowLogs\": [\n \"Mon Apr 20 13:55:21.623 I COMMAND [conn16903] command admin.$cmd command: _flushRoutingTableCacheUpdates { forceRoutingTableRefresh: \\\"config.system.sessions\\\", maxTimeMS: 30000, $clusterTime: { clusterTime: Timestamp(1587362114, 1), signature: { hash: BinData(0, 259955995BDC7E0CA35C4276EB23341C03910A48), keyId: 6817613949303783443 } }, $configServerState: { opTime: { ts: Timestamp(1587362108, 1), t: 1 } }, $db: \\\"admin\\\" } numYields:0 reslen:288 locks:{ Global: { acquireCount: { r: 4 } }, Database: { acquireCount: { r: 2 } }, Collection: { acquireCount: { r: 2 } } } protocol:op_msg 5335ms\",\n \"Mon Apr 20 14:01:00.309 I COMMAND [conn1313] command admin.$cmd command: _flushRoutingTableCacheUpdates { forceRoutingTableRefresh: \\\"config.system.sessions\\\", maxTimeMS: 30000, $clusterTime: { clusterTime: Timestamp(1587362457, 1), signature: { hash: BinData(0, DC2B16681C70845D7B6C8C6C97400D4DFB394CA0), keyId: 6817613949303783443 } }, $configServerState: { opTime: { ts: Timestamp(1587362455, 1), t: 1 } }, $db: \\\"admin\\\" } numYields:0 reslen:288 locks:{ Global: { acquireCount: { r: 4 } }, Database: { acquireCount: { r: 2 } }, Collection: { acquireCount: { r: 2 } } } protocol:op_msg 1264ms\",\n \"Mon Apr 20 14:20:15.283 I COMMAND [conn586] command admin.$cmd command: _flushRoutingTableCacheUpdates { forceRoutingTableRefresh: \\\"config.system.sessions\\\", maxTimeMS: 30000, $clusterTime: { clusterTime: Timestamp(1587363613, 1), signature: { hash: BinData(0, 72D24884320C8A9A26AF8C4DD1127874085DFAE5), keyId: 6817613949303783443 } }, $configServerState: { opTime: { ts: Timestamp(1587363603, 1), t: 1 } }, $db: \\\"admin\\\" } numYields:0 reslen:288 locks:{ Global: { acquireCount: { r: 4 } }, Database: { acquireCount: { r: 2 } }, Collection: { acquireCount: { r: 2 } } } protocol:op_msg 426ms\",\n \"Mon Apr 20 10:25:45.487 I COMMAND [conn48] command local.system.replset command: replSetReconfig { replSetReconfig: { _id: \\\"cmgo-a3bm93hf_1\\\", version: 3, protocolVersion: 1, members: [ { _id: 1, host: \\\"100.93.44.85:7005\\\", arbiterOnly: false, buildIndexes: true, hidden: false, priority: 1.0, slaveDelay: 0, votes: 1 }, { _id: 2, host: \\\"10.112.91.43:7009\\\", arbiterOnly: false, buildIndexes: true, hidden: false, priority: 1.0, slaveDelay: 0, votes: 1 }, { _id: 3, host: \\\"10.53.61.24:7004\\\" } ], settings: { chainingAllowed: true, heartbeatIntervalMillis: 2000, heartbeatTimeoutSecs: 10, electionTimeoutMillis: 10000, catchUpTimeoutMillis: -1, catchUpTakeoverDelayMillis: 30000, getLastErrorDefaults: { wtimeout: 0, w: 1 }, replicaSetId: ObjectId('5e9d08160c269352426f9575') } }, $db: \\\"admin\\\" } numYields:0 reslen:60 locks:{ Global: { acquireCount: { r: 3, w: 2, W: 1 } }, Database: { acquireCount: { w: 1, W: 1 } }, oplog: { acquireCount: { w: 1 } } } protocol:op_query 423ms\",\n \"Mon Apr 20 10:25:34.934 I COMMAND [conn28] command local.system.replset command: replSetReconfig { replSetReconfig: { _id: \\\"cmgo-a3bm93hf_1\\\", version: 2, protocolVersion: 1, members: [ { _id: 1, host: \\\"100.93.44.85:7005\\\", arbiterOnly: false, buildIndexes: true, hidden: false, priority: 1.0, slaveDelay: 0, votes: 1 }, { _id: 2, host: \\\"10.112.91.43:7009\\\" } ], settings: { chainingAllowed: true, heartbeatIntervalMillis: 2000, heartbeatTimeoutSecs: 10, electionTimeoutMillis: 10000, catchUpTimeoutMillis: -1, catchUpTakeoverDelayMillis: 30000, getLastErrorDefaults: { w: 1, wtimeout: 0 }, replicaSetId: ObjectId('5e9d08160c269352426f9575') } }, $db: \\\"admin\\\" } numYields:0 reslen:60 locks:{ Global: { acquireCount: { r: 3, w: 2, W: 1 } }, Database: { acquireCount: { w: 1, W: 1 } }, oplog: { acquireCount: { w: 1 } } } protocol:op_query 414ms\",\n \"Mon Apr 20 10:24:52.278 I COMMAND [conn30] command local.system.replset command: replSetReconfig { replSetReconfig: { _id: \\\"cmgo-a3bm93hf_0\\\", version: 2, protocolVersion: 1, members: [ { _id: 1, host: \\\"10.53.80.6:7011\\\", arbiterOnly: false, buildIndexes: true, hidden: false, priority: 1.0, slaveDelay: 0, votes: 1 }, { _id: 2, host: \\\"100.93.44.26:7012\\\" } ], settings: { chainingAllowed: true, heartbeatIntervalMillis: 2000, heartbeatTimeoutSecs: 10, electionTimeoutMillis: 10000, catchUpTimeoutMillis: -1, catchUpTakeoverDelayMillis: 30000, getLastErrorDefaults: { w: 1, wtimeout: 0 }, replicaSetId: ObjectId('5e9d07ebf3f99b58c95a33fb') } }, $db: \\\"admin\\\" } numYields:0 reslen:60 locks:{ Global: { acquireCount: { r: 3, w: 2, W: 1 } }, Database: { acquireCount: { w: 1, W: 1 } }, oplog: { acquireCount: { w: 1 } } } protocol:op_query 406ms\",\n \"Mon Apr 20 10:25:02.675 I COMMAND [conn50] command local.system.replset command: replSetReconfig { replSetReconfig: { _id: \\\"cmgo-a3bm93hf_0\\\", version: 3, protocolVersion: 1, members: [ { _id: 1, host: \\\"10.53.80.6:7011\\\", arbiterOnly: false, buildIndexes: true, hidden: false, priority: 1.0, slaveDelay: 0, votes: 1 }, { _id: 2, host: \\\"100.93.44.26:7012\\\", arbiterOnly: false, buildIndexes: true, hidden: false, priority: 1.0, slaveDelay: 0, votes: 1 }, { _id: 3, host: \\\"9.34.46.139:7003\\\" } ], settings: { chainingAllowed: true, heartbeatIntervalMillis: 2000, heartbeatTimeoutSecs: 10, electionTimeoutMillis: 10000, catchUpTimeoutMillis: -1, catchUpTakeoverDelayMillis: 30000, getLastErrorDefaults: { w: 1, wtimeout: 0 }, replicaSetId: ObjectId('5e9d07ebf3f99b58c95a33fb') } }, $db: \\\"admin\\\" } numYields:0 reslen:60 locks:{ Global: { acquireCount: { r: 3, w: 2, W: 1 } }, Database: { acquireCount: { w: 1, W: 1 } }, oplog: { acquireCount: { w: 1 } } } protocol:op_query 373ms\",\n \"Mon Apr 20 18:35:15.103 I COMMAND [conn586] command admin.$cmd command: _flushRoutingTableCacheUpdates { forceRoutingTableRefresh: \\\"config.system.sessions\\\", maxTimeMS: 30000, $clusterTime: { clusterTime: Timestamp(1587378913, 1), signature: { hash: BinData(0, A3C176F81B64A7473F88F3F40B84C59EC9E1E1AE), keyId: 6817613949303783443 } }, $configServerState: { opTime: { ts: Timestamp(1587378912, 1), t: 2 } }, $db: \\\"admin\\\" } numYields:0 reslen:288 locks:{ Global: { acquireCount: { r: 4 } }, Database: { acquireCount: { r: 2 } }, Collection: { acquireCount: { r: 2 } } } protocol:op_msg 248ms\",\n \"Mon Apr 20 10:27:38.171 I COMMAND [conn281] command admin.$cmd command: setFeatureCompatibilityVersion { setFeatureCompatibilityVersion: \\\"4.0\\\", $db: \\\"admin\\\" } numYields:0 reslen:288 locks:{ Global: { acquireCount: { r: 5, w: 4, R: 1 } }, Database: { acquireCount: { w: 2, W: 2 } }, Collection: { acquireCount: { w: 2 } }, Mutex: { acquireCount: { W: 1 } }, oplog: { acquireCount: { w: 2 } } } protocol:op_msg 212ms\",\n \"Mon Apr 20 10:26:27.924 I COMMAND [conn111] command local.system.replset command: replSetReconfig { replSetReconfig: { _id: \\\"cmgo-a3bm93hf_2\\\", version: 3, protocolVersion: 1, members: [ { _id: 1, host: \\\"10.112.90.165:7002\\\", arbiterOnly: false, buildIndexes: true, hidden: false, priority: 1.0, slaveDelay: 0, votes: 1 }, { _id: 2, host: \\\"10.53.80.6:7012\\\", arbiterOnly: false, buildIndexes: true, hidden: false, priority: 1.0, slaveDelay: 0, votes: 1 }, { _id: 3, host: \\\"100.93.44.26:7013\\\" } ], settings: { chainingAllowed: true, heartbeatIntervalMillis: 2000, heartbeatTimeoutSecs: 10, electionTimeoutMillis: 10000, catchUpTimeoutMillis: -1, catchUpTakeoverDelayMillis: 30000, getLastErrorDefaults: { w: 1, wtimeout: 0 }, replicaSetId: ObjectId('5e9d0841f0f688fc992fd087') } }, $db: \\\"admin\\\" } numYields:0 reslen:60 locks:{ Global: { acquireCount: { r: 3, w: 2, W: 1 } }, Database: { acquireCount: { w: 1, W: 1 } }, oplog: { acquireCount: { w: 1 } } } protocol:op_query 212ms\",\n \"Mon Apr 20 13:55:15.051 I COMMAND [conn586] command admin.$cmd command: _flushRoutingTableCacheUpdates { forceRoutingTableRefresh: \\\"config.system.sessions\\\", maxTimeMS: 30000, $clusterTime: { clusterTime: Timestamp(1587362114, 1), signature: { hash: BinData(0, 259955995BDC7E0CA35C4276EB23341C03910A48), keyId: 6817613949303783443 } }, $configServerState: { opTime: { ts: Timestamp(1587362085, 6), t: 1 } }, $db: \\\"admin\\\" } numYields:0 reslen:288 locks:{ Global: { acquireCount: { r: 4 } }, Database: { acquireCount: { r: 2 } }, Collection: { acquireCount: { r: 2 } } } protocol:op_msg 192ms\",\n \"Mon Apr 20 10:27:39.400 I COMMAND [conn213] command admin.$cmd command: setFeatureCompatibilityVersion { setFeatureCompatibilityVersion: \\\"4.0\\\", $db: \\\"admin\\\" } numYields:0 reslen:288 locks:{ Global: { acquireCount: { r: 5, w: 4, R: 1 } }, Database: { acquireCount: { w: 2, W: 2 } }, Collection: { acquireCount: { w: 2 } }, Mutex: { acquireCount: { W: 1 } }, oplog: { acquireCount: { w: 2 } } } protocol:op_msg 183ms\",\n \"Mon Apr 20 10:26:09.357 I COMMAND [conn36] command local.system.replset command: replSetInitiate { replSetInitiate: { _id: \\\"cmgo-a3bm93hf_2\\\", version: 1, members: [ { _id: 1, host: \\\"10.112.90.165:7002\\\" } ] }, $readPreference: { mode: \\\"secondaryPreferred\\\" }, $db: \\\"admin\\\" } numYields:0 reslen:60 locks:{ Global: { acquireCount: { r: 23, w: 7, W: 2 }, acquireWaitCount: { W: 1 }, timeAcquiringMicros: { W: 59 } }, Database: { acquireCount: { r: 7, w: 4, W: 3 } }, Collection: { acquireCount: { r: 3, w: 2 } }, oplog: { acquireCount: { r: 2, w: 3 } } } protocol:op_query 134ms\",\n \"Mon Apr 20 13:00:16.363 I COMMAND [conn16903] command admin.$cmd command: _flushRoutingTableCacheUpdates { forceRoutingTableRefresh: \\\"config.system.sessions\\\", maxTimeMS: 30000, $clusterTime: { clusterTime: Timestamp(1587358814, 1), signature: { hash: BinData(0, 90BD7BB9B481B9825527D89A3579B52E6C0C3915), keyId: 6817613949303783443 } }, $configServerState: { opTime: { ts: Timestamp(1587358809, 2), t: 1 } }, $db: \\\"admin\\\" } numYields:0 reslen:288 locks:{ Global: { acquireCount: { r: 4 } }, Database: { acquireCount: { r: 2 } }, Collection: { acquireCount: { r: 2 } } } protocol:op_msg 123ms\",\n \"Mon Apr 20 13:35:14.983 I COMMAND [conn586] command admin.$cmd command: _flushRoutingTableCacheUpdates { forceRoutingTableRefresh: \\\"config.system.sessions\\\", maxTimeMS: 30000, $clusterTime: { clusterTime: Timestamp(1587360912, 1), signature: { hash: BinData(0, 06A84575A66B9316D1ECBFB9FB1C7B2F605AB3A8), keyId: 6817613949303783443 } }, $configServerState: { opTime: { ts: Timestamp(1587360909, 5), t: 1 } }, $db: \\\"admin\\\" } numYields:0 reslen:288 locks:{ Global: { acquireCount: { r: 4 } }, Database: { acquireCount: { r: 2 } }, Collection: { acquireCount: { r: 2 } } } protocol:op_msg 122ms\",\n \"Mon Apr 20 10:24:43.760 I COMMAND [conn16] command local.system.replset command: replSetInitiate { replSetInitiate: { _id: \\\"cmgo-a3bm93hf_0\\\", version: 1, members: [ { _id: 1, host: \\\"10.53.80.6:7011\\\" } ] }, $readPreference: { mode: \\\"secondaryPreferred\\\" }, $db: \\\"admin\\\" } numYields:0 reslen:60 locks:{ Global: { acquireCount: { r: 23, w: 7, W: 2 }, acquireWaitCount: { W: 1 }, timeAcquiringMicros: { W: 39 } }, Database: { acquireCount: { r: 7, w: 4, W: 3 } }, Collection: { acquireCount: { r: 3, w: 2 } }, oplog: { acquireCount: { r: 2, w: 3 } } } protocol:op_query 112ms\",\n \"Mon Apr 20 10:25:26.300 I COMMAND [conn15] command local.system.replset command: replSetInitiate { replSetInitiate: { _id: \\\"cmgo-a3bm93hf_1\\\", version: 1, members: [ { _id: 1, host: \\\"100.93.44.85:7005\\\" } ] }, $readPreference: { mode: \\\"secondaryPreferred\\\" }, $db: \\\"admin\\\" } numYields:0 reslen:60 locks:{ Global: { acquireCount: { r: 23, w: 7, W: 2 }, acquireWaitCount: { W: 1 }, timeAcquiringMicros: { W: 24 } }, Database: { acquireCount: { r: 7, w: 4, W: 3 }, acquireWaitCount: { W: 1 }, timeAcquiringMicros: { W: 7 } }, Collection: { acquireCount: { r: 3, w: 2 } }, oplog: { acquireCount: { r: 2, w: 3 } } } protocol:op_query 110ms\",\n \"Mon Apr 20 10:27:39.400 I COMMAND [conn213] command admin.$cmd command: update { update: \\\"system.version\\\", writeConcern: { w: \\\"majority\\\" }, $db: \\\"admin\\\" } numYields:0 reslen:370 locks:{ Global: { acquireCount: { r: 5, w: 4, R: 1 } }, Database: { acquireCount: { w: 2, W: 2 } }, Collection: { acquireCount: { w: 2 } }, Mutex: { acquireCount: { W: 1 } }, oplog: { acquireCount: { w: 2 } } } protocol:op_msg 107ms\",\n \"Mon Apr 20 10:27:38.065 I COMMAND [conn281] command admin.$cmd command: update { update: \\\"system.version\\\", writeConcern: { w: \\\"majority\\\" }, $db: \\\"admin\\\" } numYields:0 reslen:370 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 1, W: 1 } }, Collection: { acquireCount: { w: 1 } }, Mutex: { acquireCount: { W: 1 } }, oplog: { acquireCount: { w: 1 } } } protocol:op_msg 107ms\",\n \"Mon Apr 20 10:27:38.170 I COMMAND [conn281] command admin.$cmd command: update { update: \\\"system.version\\\", writeConcern: { w: \\\"majority\\\" }, $db: \\\"admin\\\" } numYields:0 reslen:370 locks:{ Global: { acquireCount: { r: 5, w: 4, R: 1 } }, Database: { acquireCount: { w: 2, W: 2 } }, Collection: { acquireCount: { w: 2 } }, Mutex: { acquireCount: { W: 1 } }, oplog: { acquireCount: { w: 2 } } } protocol:op_msg 105ms\"\n ]\n }\n}",
252
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSlowLogs\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-r3p8****\",\n \"StartTime\": \"2025-09-22 00:00:00\",\n \"EndTime\": \"2025-09-23 00:00:00\",\n \"SlowMS\": 100,\n \"Offset\": 1,\n \"Limit\": 1,\n \"Format\": \"json\"\n}",
253
+ "output": "{\n \"Response\": {\n \"Count\": 1,\n \"RequestId\": \"ec514cb8-55a6-41d4-a6e4-896da43886db\",\n \"SlowLogs\": [\n \"Mon Sep 22 20:30:19.980 I COMMAND [conn3725696] command admin.$cmd command: ****Continue { ****Continue: 1, conversationId: 1, payload: BinData(0, ), $clusterTime: { clusterTime: Timestamp(1758544211, 1), signature: { hash: BinData(0, *************************************), keyId: 7542889************ } }, $db: \\\"admin\\\", $readPreference: { mode: \\\"primaryPreferred\\\" } } numYields:0 reslen:204 locks:{} protocol:op_msg 184ms\"\n ]\n }\n}",
222
254
  "title": "获取实例慢日志信息"
223
255
  }
224
256
  ],
@@ -234,7 +266,7 @@
234
266
  {
235
267
  "document": "",
236
268
  "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTransparentDataEncryptionStatus\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-igjy****\"\n}",
237
- "output": "{\n \"Response\": {\n \"TransparentDataEncryptionStatus\": \"open\",\n \"KeyInfoList\": [\n {\n \"KeyId\": \"65362a4b-5ec4-11ef-8467-**********\",\n \"KeyName\": \"myKey\",\n \"CreateTime\": \"2021-10-10 19:55:12\",\n \"Status\": \"Enabled\",\n \"KeyUsage\": \"TENCENT_KMS\",\n \"KeyOrigin\": \"TENCENT_KMS\"\n }\n ],\n \"RequestId\": \"59b477da-6473-4ea8-85b3-7f4473744981\"\n }\n}",
269
+ "output": "{\n \"Response\": {\n \"KeyInfoList\": [\n {\n \"CreateTime\": \"2025-08-01 11:22:18\",\n \"KeyId\": \"***********************************\",\n \"KeyName\": \"******_test\",\n \"KeyOrigin\": \"******_KMS\",\n \"KeyUsage\": \"ENCRYPT_DECRYPT\",\n \"KmsRegion\": \"ap-guangzhou\",\n \"Status\": \"Enabled\"\n }\n ],\n \"RequestId\": \"38cac06f-7c6e-4596-9bd1-64eba8ed3e36\",\n \"TransparentDataEncryptionStatus\": \"open\"\n }\n}",
238
270
  "title": "获取当前实例是否已开启数据加密"
239
271
  }
240
272
  ],
@@ -313,7 +345,7 @@
313
345
  "ModifyDBInstanceNetworkAddress": [
314
346
  {
315
347
  "document": "修改云数据库实例的VIP信息",
316
- "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyDBInstanceNetworkAddress\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-9d0p****\",\n \"OldIpExpiredTime\": 1,\n \"NetworkAddresses\": [\n {\n \"NewIPAddress\": \"10.0.0.10\",\n \"OldIpAddress\": \"10.0.0.1\"\n }\n ],\n \"NewUniqVpcId\": \"vpc-gfb3pqo1\",\n \"NewUniqSubnetId\": \"ins-wsdn61fw\"\n}",
348
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyDBInstanceNetworkAddress\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-9d0p****\",\n \"OldIpExpiredTime\": 1,\n \"NetworkAddresses\": [\n {\n \"NewIPAddress\": \"10.0.0.10\",\n \"OldIpAddress\": \"10.0.0.1\"\n }\n ],\n \"NewUniqVpcId\": \"vpc-gfb3****\",\n \"NewUniqSubnetId\": \"subnet-6fe2****\"\n}",
317
349
  "output": "{\n \"Response\": {\n \"FlowId\": 1679402995,\n \"RequestId\": \"8279f6c2-db93-4b2e-931b-233d780b1a91\"\n }\n}",
318
350
  "title": "修改云数据库实例网络信息"
319
351
  }
@@ -345,13 +377,13 @@
345
377
  "document": "广州二区和三区共删除2个从节点,最终节点数量变更为3",
346
378
  "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyDBInstanceSpec\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-abcdef\",\n \"Memory\": 4,\n \"Volume\": 100,\n \"OplogSize\": 30,\n \"NodeNum\": 3,\n \"ReplicateSetNum\": 1,\n \"InMaintenance\": 1,\n \"RemoveNodeList\": [\n {\n \"NodeName\": \"cmgo-3iecwbfx_0-node0\",\n \"Role\": \"SECONDARY\",\n \"Zone\": \"ap-guangzhou-2\"\n },\n {\n \"NodeName\": \"cmgo-3iecwbfx_0-node1\",\n \"Role\": \"SECONDARY\",\n \"Zone\": \"ap-guangzhou-3\"\n }\n ]\n}",
347
379
  "output": "{\n \"Response\": {\n \"DealId\": \"7142863\",\n \"RequestId\": \"d88095e5-50e8-4245-a0cf-993a536f9b20\"\n }\n}",
348
- "title": "删除mognodb云数据库实例从节点"
380
+ "title": "删除 mongodb 云数据库实例从节点"
349
381
  },
350
382
  {
351
383
  "document": "广州二区和三区共新增2个从节点,最终节点数量变更为5",
352
- "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyDBInstanceSpec\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-abcdef\",\n \"Memory\": 4,\n \"Volume\": 100,\n \"OplogSize\": 30,\n \"NodeNum\": 5,\n \"ReplicateSetNum\": 1,\n \"InMaintenance\": 1,\n \"AddNodeList\": [\n {\n \"Role\": \"SECONDARY\",\n \"Zone\": \"ap-guangzhou-2\"\n },\n {\n \"Role\": \"SECONDARY\",\n \"Zone\": \"ap-guangzhou-3\"\n }\n ]\n}",
384
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyDBInstanceSpec\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-p8vn****\",\n \"Memory\": 4,\n \"Volume\": 100,\n \"OplogSize\": 30,\n \"NodeNum\": 5,\n \"ReplicateSetNum\": 1,\n \"InMaintenance\": 1,\n \"AddNodeList\": [\n {\n \"Role\": \"SECONDARY\",\n \"Zone\": \"ap-guangzhou-2\"\n },\n {\n \"Role\": \"SECONDARY\",\n \"Zone\": \"ap-guangzhou-3\"\n }\n ]\n}",
353
385
  "output": "{\n \"Response\": {\n \"DealId\": \"7142863\",\n \"RequestId\": \"d88095e5-50e8-4245-a0cf-993a536f9b20\"\n }\n}",
354
- "title": "新增mognodb云数据库实例从节点"
386
+ "title": "新增 mongodb 云数据库实例从节点"
355
387
  }
356
388
  ],
357
389
  "ModifyInstanceParams": [
@@ -388,8 +420,8 @@
388
420
  ],
389
421
  "ResetDBInstancePassword": [
390
422
  {
391
- "document": "",
392
- "input": "https://mongodb.tencentcloudapi.com/?Action=ResetDBInstancePassword\n&InstanceId=cmgo-7pjedvz7\n&UserName=rwuser\n&Password=111111\n&<公共请求参数>",
423
+ "document": "修改实例用户的密码",
424
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ResetDBInstancePassword\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-7pje****\",\n \"UserName\": \"rwuser\",\n \"Password\": \"*******\"\n}",
393
425
  "output": "{\n \"Response\": {\n \"AsyncRequestId\": \"4769\",\n \"RequestId\": \"e600a8d0-9014-11ea-84c1-01cccde830c6\"\n }\n}",
394
426
  "title": "修改实例用户的密码"
395
427
  }
@@ -441,6 +473,22 @@
441
473
  "output": "{\n \"Response\": {\n \"RequestId\": \"ccfe11c0-b1d3-11ea-8b51-552abe435100\"\n }\n}",
442
474
  "title": "包年包月实例退货退费"
443
475
  }
476
+ ],
477
+ "UpgradeDBInstanceKernelVersion": [
478
+ {
479
+ "document": "当新版本内核被推出时,可以通过升级内核版本到最新版本",
480
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpgradeDBInstanceKernelVersion\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-p8vnipr5\"\n}",
481
+ "output": "{\n \"Response\": {\n \"RequestId\": \"2efcf780-9970-11ec-8975-6bc44e3bfad7\",\n \"FlowId\": 19677\n }\n}",
482
+ "title": "升级实例当前内核版本号"
483
+ }
484
+ ],
485
+ "UpgradeDbInstanceVersion": [
486
+ {
487
+ "document": "用于MongoDB数据库3.6版本升级到4.0版本",
488
+ "input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpgradeDbInstanceVersion\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-p8vnipr5\",\n \"MongoVersion\": \"MONGO_42_WT\"\n}",
489
+ "output": "{\n \"Response\": {\n \"RequestId\": \"2efcf780-9970-11ec-8975-6bc44e3bfad7\",\n \"FlowId\": 19677\n }\n}",
490
+ "title": "升级3.6版本实例到4.0版本"
491
+ }
444
492
  ]
445
493
  },
446
494
  "version": "1.0"
@@ -2463,6 +2463,58 @@ def doDeletePrometheusTemp(args, parsed_globals):
2463
2463
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2464
2464
 
2465
2465
 
2466
+ def doDescribePrometheusScrapeStatistics(args, parsed_globals):
2467
+ g_param = parse_global_arg(parsed_globals)
2468
+
2469
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2470
+ cred = credential.CVMRoleCredential()
2471
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2472
+ cred = credential.STSAssumeRoleCredential(
2473
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2474
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2475
+ )
2476
+ 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):
2477
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2478
+ else:
2479
+ cred = credential.Credential(
2480
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2481
+ )
2482
+ http_profile = HttpProfile(
2483
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2484
+ reqMethod="POST",
2485
+ endpoint=g_param[OptionsDefine.Endpoint],
2486
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2487
+ )
2488
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2489
+ if g_param[OptionsDefine.Language]:
2490
+ profile.language = g_param[OptionsDefine.Language]
2491
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2492
+ client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
2493
+ client._sdkVersion += ("_CLI_" + __version__)
2494
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2495
+ model = models.DescribePrometheusScrapeStatisticsRequest()
2496
+ model.from_json_string(json.dumps(args))
2497
+ start_time = time.time()
2498
+ while True:
2499
+ rsp = client.DescribePrometheusScrapeStatistics(model)
2500
+ result = rsp.to_json_string()
2501
+ try:
2502
+ json_obj = json.loads(result)
2503
+ except TypeError as e:
2504
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2505
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2506
+ break
2507
+ cur_time = time.time()
2508
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2509
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2510
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2511
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2512
+ else:
2513
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2514
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2515
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2516
+
2517
+
2466
2518
  def doCreateAlarmShield(args, parsed_globals):
2467
2519
  g_param = parse_global_arg(parsed_globals)
2468
2520
 
@@ -2983,6 +3035,58 @@ def doUpgradeGrafanaInstance(args, parsed_globals):
2983
3035
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2984
3036
 
2985
3037
 
3038
+ def doDescribeRemoteWrites(args, parsed_globals):
3039
+ g_param = parse_global_arg(parsed_globals)
3040
+
3041
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3042
+ cred = credential.CVMRoleCredential()
3043
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3044
+ cred = credential.STSAssumeRoleCredential(
3045
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3046
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3047
+ )
3048
+ 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):
3049
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3050
+ else:
3051
+ cred = credential.Credential(
3052
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3053
+ )
3054
+ http_profile = HttpProfile(
3055
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3056
+ reqMethod="POST",
3057
+ endpoint=g_param[OptionsDefine.Endpoint],
3058
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3059
+ )
3060
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3061
+ if g_param[OptionsDefine.Language]:
3062
+ profile.language = g_param[OptionsDefine.Language]
3063
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3064
+ client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
3065
+ client._sdkVersion += ("_CLI_" + __version__)
3066
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3067
+ model = models.DescribeRemoteWritesRequest()
3068
+ model.from_json_string(json.dumps(args))
3069
+ start_time = time.time()
3070
+ while True:
3071
+ rsp = client.DescribeRemoteWrites(model)
3072
+ result = rsp.to_json_string()
3073
+ try:
3074
+ json_obj = json.loads(result)
3075
+ except TypeError as e:
3076
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3077
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3078
+ break
3079
+ cur_time = time.time()
3080
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3081
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3082
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3083
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3084
+ else:
3085
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3086
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3087
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3088
+
3089
+
2986
3090
  def doDescribeAlarmNotifyHistories(args, parsed_globals):
2987
3091
  g_param = parse_global_arg(parsed_globals)
2988
3092
 
@@ -8815,6 +8919,7 @@ ACTION_MAP = {
8815
8919
  "DeleteServiceDiscovery": doDeleteServiceDiscovery,
8816
8920
  "DeleteExporterIntegration": doDeleteExporterIntegration,
8817
8921
  "DeletePrometheusTemp": doDeletePrometheusTemp,
8922
+ "DescribePrometheusScrapeStatistics": doDescribePrometheusScrapeStatistics,
8818
8923
  "CreateAlarmShield": doCreateAlarmShield,
8819
8924
  "CreatePrometheusMultiTenantInstancePostPayMode": doCreatePrometheusMultiTenantInstancePostPayMode,
8820
8925
  "UpdateGrafanaEnvironments": doUpdateGrafanaEnvironments,
@@ -8825,6 +8930,7 @@ ACTION_MAP = {
8825
8930
  "UpdatePrometheusScrapeJob": doUpdatePrometheusScrapeJob,
8826
8931
  "DescribePrometheusInstanceInitStatus": doDescribePrometheusInstanceInitStatus,
8827
8932
  "UpgradeGrafanaInstance": doUpgradeGrafanaInstance,
8933
+ "DescribeRemoteWrites": doDescribeRemoteWrites,
8828
8934
  "DescribeAlarmNotifyHistories": doDescribeAlarmNotifyHistories,
8829
8935
  "DescribeGrafanaChannels": doDescribeGrafanaChannels,
8830
8936
  "DeleteGrafanaIntegration": doDeleteGrafanaIntegration,