kingsoftcloud-sdk-python 1.1.1__py2.py3-none-any.whl → 1.5.8.49__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 (294) hide show
  1. kingsoftcloud_sdk_python-1.5.8.49.dist-info/METADATA +71 -0
  2. kingsoftcloud_sdk_python-1.5.8.49.dist-info/RECORD +337 -0
  3. {kingsoftcloud_sdk_python-1.1.1.dist-info → kingsoftcloud_sdk_python-1.5.8.49.dist-info}/WHEEL +1 -1
  4. ksyun/__init__.py +1 -1
  5. ksyun/client/actiontrail/v20190401/client.py +2 -4
  6. ksyun/client/aicp/v20240612/client.py +1344 -0
  7. ksyun/client/aicp/v20240612/models.py +1963 -0
  8. ksyun/client/aicp/v20251212/__init__.py +0 -0
  9. ksyun/client/aicp/v20251212/client.py +56 -0
  10. ksyun/client/aicp/v20251212/models.py +114 -0
  11. ksyun/client/bill/v20180601/client.py +6 -77
  12. ksyun/client/bill/v20180601/models.py +29 -41
  13. ksyun/client/bill/v20220601/__init__.py +0 -0
  14. ksyun/client/bill/v20220601/client.py +54 -0
  15. ksyun/client/bill/v20220601/models.py +54 -0
  16. ksyun/client/bill_union/v20200101/client.py +81 -14
  17. ksyun/client/bill_union/v20200101/models.py +119 -3
  18. ksyun/client/bill_union/v20221222/__init__.py +0 -0
  19. ksyun/client/bill_union/v20221222/client.py +146 -0
  20. ksyun/client/bill_union/v20221222/models.py +193 -0
  21. ksyun/client/bill_union/v20250801/__init__.py +0 -0
  22. ksyun/client/bill_union/v20250801/client.py +54 -0
  23. ksyun/client/bill_union/v20250801/models.py +64 -0
  24. ksyun/client/bws/v20160304/client.py +33 -12
  25. ksyun/client/bws/v20160304/models.py +51 -0
  26. ksyun/client/cdn/__init__.py +0 -0
  27. ksyun/client/cdn/v20160901/__init__.py +0 -0
  28. ksyun/client/cdn/v20160901/client.py +77 -0
  29. ksyun/client/cdn/v20160901/models.py +51 -0
  30. ksyun/client/cdn/v20200630/__init__.py +0 -0
  31. ksyun/client/cdn/v20200630/client.py +399 -0
  32. ksyun/client/cdn/v20200630/models.py +826 -0
  33. ksyun/client/cdn/v20200901/__init__.py +0 -0
  34. ksyun/client/cdn/v20200901/client.py +169 -0
  35. ksyun/client/cdn/v20200901/models.py +224 -0
  36. ksyun/client/cdn/v20211201/__init__.py +0 -0
  37. ksyun/client/cdn/v20211201/client.py +31 -0
  38. ksyun/client/cdn/v20211201/models.py +23 -0
  39. ksyun/client/cdn/v3/__init__.py +0 -0
  40. ksyun/client/cdn/v3/client.py +997 -0
  41. ksyun/client/cdn/v3/models.py +1323 -0
  42. ksyun/client/cen/__init__.py +0 -0
  43. ksyun/client/cen/v20160304/__init__.py +0 -0
  44. ksyun/client/cen/v20160304/client.py +606 -0
  45. ksyun/client/cen/v20160304/models.py +718 -0
  46. ksyun/client/clickhouse/__init__.py +0 -0
  47. ksyun/client/clickhouse/v20210101/__init__.py +0 -0
  48. ksyun/client/clickhouse/v20210101/client.py +905 -0
  49. ksyun/client/clickhouse/v20210101/models.py +1127 -0
  50. ksyun/client/cloud_advisor/__init__.py +0 -0
  51. ksyun/client/cloud_advisor/v20250610/__init__.py +0 -0
  52. ksyun/client/cloud_advisor/v20250610/client.py +77 -0
  53. ksyun/client/cloud_advisor/v20250610/models.py +80 -0
  54. ksyun/client/dmp/__init__.py +0 -0
  55. ksyun/client/dmp/v20240101/__init__.py +0 -0
  56. ksyun/client/dmp/v20240101/client.py +468 -0
  57. ksyun/client/dmp/v20240101/models.py +423 -0
  58. ksyun/client/dts/__init__.py +0 -0
  59. ksyun/client/dts/v20180108/__init__.py +0 -0
  60. ksyun/client/dts/v20180108/client.py +445 -0
  61. ksyun/client/dts/v20180108/models.py +734 -0
  62. ksyun/client/ebs/v20160304/client.py +260 -55
  63. ksyun/client/ebs/v20160304/models.py +320 -66
  64. ksyun/client/eip/v20160304/client.py +127 -14
  65. ksyun/client/eip/v20160304/models.py +95 -1
  66. ksyun/client/epc/v20151101/client.py +1309 -184
  67. ksyun/client/epc/v20151101/models.py +2623 -137
  68. ksyun/client/iam/v20151101/client.py +325 -120
  69. ksyun/client/iam/v20151101/models.py +284 -28
  70. ksyun/client/iam/v20240513/__init__.py +0 -0
  71. ksyun/client/iam/v20240513/client.py +31 -0
  72. ksyun/client/iam/v20240513/models.py +33 -0
  73. ksyun/client/iam/v20240703/__init__.py +0 -0
  74. ksyun/client/iam/v20240703/client.py +31 -0
  75. ksyun/client/iam/v20240703/models.py +18 -0
  76. ksyun/client/influxdb/__init__.py +0 -0
  77. ksyun/client/influxdb/v20191010/__init__.py +0 -0
  78. ksyun/client/influxdb/v20191010/client.py +629 -0
  79. ksyun/client/influxdb/v20191010/models.py +655 -0
  80. ksyun/client/kad/v20161122/client.py +56 -12
  81. ksyun/client/kad/v20161122/models.py +38 -0
  82. ksyun/client/kce/__init__.py +0 -0
  83. ksyun/client/kce/v20180314/__init__.py +0 -0
  84. ksyun/client/kce/v20180314/client.py +399 -0
  85. ksyun/client/kce/v20180314/models.py +374 -0
  86. ksyun/client/kce/v20190806/__init__.py +0 -0
  87. ksyun/client/kce/v20190806/client.py +790 -0
  88. ksyun/client/kce/v20190806/models.py +1099 -0
  89. ksyun/client/kce/v20201231/__init__.py +0 -0
  90. ksyun/client/{slb/v20171210 → kce/v20201231}/client.py +10 -12
  91. ksyun/client/kce/v20201231/models.py +137 -0
  92. ksyun/client/kce/v20230101/__init__.py +0 -0
  93. ksyun/client/kce/v20230101/client.py +215 -0
  94. ksyun/client/kce/v20230101/models.py +259 -0
  95. ksyun/client/kce/v20230306/__init__.py +0 -0
  96. ksyun/client/kce/v20230306/client.py +514 -0
  97. ksyun/client/kce/v20230306/models.py +655 -0
  98. ksyun/client/kce/v20231115/__init__.py +0 -0
  99. ksyun/client/kce/v20231115/client.py +54 -0
  100. ksyun/client/kce/v20231115/models.py +59 -0
  101. ksyun/client/kce2/__init__.py +0 -0
  102. ksyun/client/kce2/v20230101/__init__.py +0 -0
  103. ksyun/client/kce2/v20230101/client.py +353 -0
  104. ksyun/client/kce2/v20230101/models.py +483 -0
  105. ksyun/client/kcf/__init__.py +0 -0
  106. ksyun/client/kcf/v20211215/__init__.py +0 -0
  107. ksyun/client/kcf/v20211215/client.py +215 -0
  108. ksyun/client/kcf/v20211215/models.py +313 -0
  109. ksyun/client/kci/__init__.py +0 -0
  110. ksyun/client/kci/v20200702/__init__.py +0 -0
  111. ksyun/client/kci/v20200702/client.py +353 -0
  112. ksyun/client/kci/v20200702/models.py +614 -0
  113. ksyun/client/kcm/__init__.py +0 -0
  114. ksyun/client/kcm/v20160304/__init__.py +0 -0
  115. ksyun/client/kcm/v20160304/client.py +238 -0
  116. ksyun/client/kcm/v20160304/models.py +394 -0
  117. ksyun/client/kcrs/__init__.py +0 -0
  118. ksyun/client/kcrs/v20211109/__init__.py +0 -0
  119. ksyun/client/kcrs/v20211109/client.py +1020 -0
  120. ksyun/client/kcrs/v20211109/models.py +1282 -0
  121. ksyun/client/kcs/__init__.py +0 -0
  122. ksyun/client/kcs/v20160701/__init__.py +0 -0
  123. ksyun/client/kcs/v20160701/client.py +1526 -0
  124. ksyun/client/kcs/v20160701/models.py +1917 -0
  125. ksyun/client/kcs/v20170401/__init__.py +0 -0
  126. ksyun/client/kcs/v20170401/client.py +31 -0
  127. ksyun/client/kcs/v20170401/models.py +28 -0
  128. ksyun/client/kcs/v20240701/__init__.py +0 -0
  129. ksyun/client/kcs/v20240701/client.py +31 -0
  130. ksyun/client/kcs/v20240701/models.py +23 -0
  131. ksyun/client/kead/v20200101/client.py +48 -4
  132. ksyun/client/kead/v20200101/models.py +52 -42
  133. ksyun/client/kec/v20160304/client.py +890 -223
  134. ksyun/client/kec/v20160304/models.py +1377 -140
  135. ksyun/client/ked/__init__.py +0 -0
  136. ksyun/client/ked/v1/__init__.py +0 -0
  137. ksyun/client/ked/v1/client.py +1020 -0
  138. ksyun/client/ked/v1/models.py +1132 -0
  139. ksyun/client/kes/__init__.py +0 -0
  140. ksyun/client/kes/v20201215/__init__.py +0 -0
  141. ksyun/client/kes/v20201215/client.py +192 -0
  142. ksyun/client/kes/v20201215/models.py +252 -0
  143. ksyun/client/ket/__init__.py +0 -0
  144. ksyun/client/ket/v20170101/__init__.py +0 -0
  145. ksyun/client/ket/v20170101/client.py +192 -0
  146. ksyun/client/ket/v20170101/models.py +265 -0
  147. ksyun/client/kfw/__init__.py +0 -0
  148. ksyun/client/kfw/v20160304/__init__.py +0 -0
  149. ksyun/client/kfw/v20160304/client.py +692 -0
  150. ksyun/client/kfw/v20160304/models.py +1029 -0
  151. ksyun/client/kingpay/__init__.py +0 -0
  152. ksyun/client/kingpay/v1/__init__.py +0 -0
  153. ksyun/client/kingpay/v1/client.py +31 -0
  154. ksyun/client/kingpay/v1/models.py +18 -0
  155. ksyun/client/kkms/__init__.py +0 -0
  156. ksyun/client/kkms/v20160304/__init__.py +0 -0
  157. ksyun/client/kkms/v20160304/client.py +192 -0
  158. ksyun/client/kkms/v20160304/models.py +185 -0
  159. ksyun/client/klog/__init__.py +0 -0
  160. ksyun/client/klog/v20200731/__init__.py +0 -0
  161. ksyun/client/klog/v20200731/client.py +376 -0
  162. ksyun/client/klog/v20200731/models.py +508 -0
  163. ksyun/client/kls/__init__.py +0 -0
  164. ksyun/client/kls/v20170101/__init__.py +0 -0
  165. ksyun/client/kls/v20170101/client.py +192 -0
  166. ksyun/client/kls/v20170101/models.py +320 -0
  167. ksyun/client/kmr/__init__.py +0 -0
  168. ksyun/client/kmr/v20210902/__init__.py +0 -0
  169. ksyun/client/kmr/v20210902/client.py +537 -0
  170. ksyun/client/kmr/v20210902/models.py +536 -0
  171. ksyun/client/kmr/v20231231/__init__.py +0 -0
  172. ksyun/client/kmr/v20231231/client.py +169 -0
  173. ksyun/client/kmr/v20231231/models.py +201 -0
  174. ksyun/client/kmr/v20240814/__init__.py +0 -0
  175. ksyun/client/kmr/v20240814/client.py +445 -0
  176. ksyun/client/kmr/v20240814/models.py +523 -0
  177. ksyun/client/knad/__init__.py +0 -0
  178. ksyun/client/knad/v20230323/__init__.py +0 -0
  179. ksyun/client/knad/v20230323/client.py +399 -0
  180. ksyun/client/knad/v20230323/models.py +470 -0
  181. ksyun/client/kpfs/__init__.py +0 -0
  182. ksyun/client/kpfs/v20240930/__init__.py +0 -0
  183. ksyun/client/kpfs/v20240930/client.py +217 -0
  184. ksyun/client/kpfs/v20240930/models.py +396 -0
  185. ksyun/client/krds/__init__.py +0 -0
  186. ksyun/client/krds/v20160701/__init__.py +0 -0
  187. ksyun/client/krds/v20160701/client.py +2101 -0
  188. ksyun/client/krds/v20160701/models.py +2722 -0
  189. ksyun/client/krds/v20200825/__init__.py +0 -0
  190. ksyun/client/krds/v20200825/client.py +238 -0
  191. ksyun/client/krds/v20200825/models.py +336 -0
  192. ksyun/client/memcached/__init__.py +0 -0
  193. ksyun/client/memcached/v20180627/__init__.py +0 -0
  194. ksyun/client/memcached/v20180627/client.py +307 -0
  195. ksyun/client/memcached/v20180627/models.py +317 -0
  196. ksyun/client/milvus/__init__.py +0 -0
  197. ksyun/client/milvus/v20231010/__init__.py +0 -0
  198. ksyun/client/milvus/v20231010/client.py +445 -0
  199. ksyun/client/milvus/v20231010/models.py +520 -0
  200. ksyun/client/mongodb/v20170101/client.py +312 -84
  201. ksyun/client/mongodb/v20170101/models.py +251 -34
  202. ksyun/client/mongodb/v20250101/__init__.py +0 -0
  203. ksyun/client/mongodb/v20250101/client.py +31 -0
  204. ksyun/client/mongodb/v20250101/models.py +18 -0
  205. ksyun/client/monitor/__init__.py +0 -0
  206. ksyun/client/monitor/v20100525/__init__.py +0 -0
  207. ksyun/client/monitor/v20100525/client.py +54 -0
  208. ksyun/client/monitor/v20100525/models.py +108 -0
  209. ksyun/client/monitor/v20181114/__init__.py +0 -0
  210. ksyun/client/monitor/v20181114/client.py +31 -0
  211. ksyun/client/monitor/v20181114/models.py +59 -0
  212. ksyun/client/monitor/v20210101/__init__.py +0 -0
  213. ksyun/client/monitor/v20210101/client.py +284 -0
  214. ksyun/client/monitor/v20210101/models.py +330 -0
  215. ksyun/client/monitor/v20220101/__init__.py +0 -0
  216. ksyun/client/monitor/v20220101/client.py +54 -0
  217. ksyun/client/monitor/v20220101/models.py +32 -0
  218. ksyun/client/monitor/v20250101/__init__.py +0 -0
  219. ksyun/client/monitor/v20250101/client.py +121 -0
  220. ksyun/client/monitor/v20250101/models.py +188 -0
  221. ksyun/client/pdns/__init__.py +0 -0
  222. ksyun/client/pdns/v20160304/__init__.py +0 -0
  223. ksyun/client/pdns/v20160304/client.py +813 -0
  224. ksyun/client/pdns/v20160304/models.py +805 -0
  225. ksyun/client/postgresql/__init__.py +0 -0
  226. ksyun/client/postgresql/v20181225/__init__.py +0 -0
  227. ksyun/client/postgresql/v20181225/client.py +1158 -0
  228. ksyun/client/postgresql/v20181225/models.py +1629 -0
  229. ksyun/client/rabbitmq/__init__.py +0 -0
  230. ksyun/client/rabbitmq/v20191017/__init__.py +0 -0
  231. ksyun/client/rabbitmq/v20191017/client.py +445 -0
  232. ksyun/client/rabbitmq/v20191017/models.py +413 -0
  233. ksyun/client/relyt/__init__.py +0 -0
  234. ksyun/client/relyt/v20240117/__init__.py +0 -0
  235. ksyun/client/{bill_union/v20211209 → relyt/v20240117}/client.py +10 -12
  236. ksyun/client/relyt/v20240117/models.py +23 -0
  237. ksyun/client/resourcemanager/v20210320/client.py +16 -18
  238. ksyun/client/sks/v20151101/client.py +11 -13
  239. ksyun/client/sks/v20151101/models.py +28 -2
  240. ksyun/client/slb/v20160304/client.py +1099 -112
  241. ksyun/client/slb/v20160304/models.py +1697 -24
  242. ksyun/client/slb/v20250430/__init__.py +0 -0
  243. ksyun/client/slb/v20250430/client.py +813 -0
  244. ksyun/client/slb/v20250430/models.py +1372 -0
  245. ksyun/client/sqlserver/__init__.py +0 -0
  246. ksyun/client/sqlserver/v20190425/__init__.py +0 -0
  247. ksyun/client/sqlserver/v20190425/client.py +1066 -0
  248. ksyun/client/sqlserver/v20190425/models.py +1528 -0
  249. ksyun/client/sts/v20151101/client.py +23 -2
  250. ksyun/client/sts/v20151101/models.py +54 -1
  251. ksyun/client/tagv2/v20200901/client.py +60 -16
  252. ksyun/client/tagv2/v20200901/models.py +56 -4
  253. ksyun/client/ter/__init__.py +0 -0
  254. ksyun/client/ter/v20240415/__init__.py +0 -0
  255. ksyun/client/ter/v20240415/client.py +123 -0
  256. ksyun/client/ter/v20240415/models.py +115 -0
  257. ksyun/client/tidb/__init__.py +0 -0
  258. ksyun/client/tidb/v20210520/__init__.py +0 -0
  259. ksyun/client/tidb/v20210520/client.py +928 -0
  260. ksyun/client/tidb/v20210520/models.py +1162 -0
  261. ksyun/client/trade/v20200114/client.py +2 -4
  262. ksyun/client/trade/v20200831/client.py +2 -4
  263. ksyun/client/trade/v20250220/__init__.py +0 -0
  264. ksyun/client/trade/v20250220/client.py +100 -0
  265. ksyun/client/trade/v20250220/models.py +91 -0
  266. ksyun/client/trade/v20250321/__init__.py +0 -0
  267. ksyun/client/trade/v20250321/client.py +100 -0
  268. ksyun/client/trade/v20250321/models.py +71 -0
  269. ksyun/client/trade/v20250828/__init__.py +0 -0
  270. ksyun/client/trade/v20250828/client.py +31 -0
  271. ksyun/client/trade/v20250828/models.py +81 -0
  272. ksyun/client/vpc/v20160304/client.py +1377 -229
  273. ksyun/client/vpc/v20160304/models.py +1540 -138
  274. ksyun/client/waf/__init__.py +0 -0
  275. ksyun/client/waf/v20200707/__init__.py +0 -0
  276. ksyun/client/waf/v20200707/client.py +468 -0
  277. ksyun/client/waf/v20200707/models.py +738 -0
  278. ksyun/common/abstract_client.py +57 -21
  279. ksyun/common/abstract_model.py +3 -3
  280. ksyun/common/common_client.py +2 -0
  281. ksyun/common/credential.py +2 -0
  282. ksyun/common/exception/ksyun_sdk_exception.py +11 -7
  283. ksyun/common/http/request.py +45 -6
  284. ksyun/common/profile/client_profile.py +3 -0
  285. ksyun/common/profile/http_profile.py +28 -1
  286. kingsoftcloud_sdk_python-1.1.1.dist-info/METADATA +0 -47
  287. kingsoftcloud_sdk_python-1.1.1.dist-info/RECORD +0 -105
  288. ksyun/client/bill_union/v20211209/models.py +0 -38
  289. ksyun/client/slb/v20171210/models.py +0 -33
  290. ksyun/common/sign.py +0 -33
  291. {kingsoftcloud_sdk_python-1.1.1.dist-info → kingsoftcloud_sdk_python-1.5.8.49.dist-info/licenses}/LICENSE +0 -0
  292. {kingsoftcloud_sdk_python-1.1.1.dist-info → kingsoftcloud_sdk_python-1.5.8.49.dist-info}/top_level.txt +0 -0
  293. /ksyun/client/{bill_union/v20211209 → aicp}/__init__.py +0 -0
  294. /ksyun/client/{slb/v20171210 → aicp/v20240612}/__init__.py +0 -0
@@ -0,0 +1,536 @@
1
+ from ksyun.common.abstract_model import AbstractModel
2
+
3
+ class DescribeClusterRequest(AbstractModel):
4
+ """DescribeCluster请求参数结构体
5
+ """
6
+
7
+ def __init__(self):
8
+ r"""集群详情
9
+ :param ClusterId: 集群id
10
+ :type PathPrefix: String
11
+ """
12
+ self.ClusterId = None
13
+
14
+ def _deserialize(self, params):
15
+ if params.get("ClusterId"):
16
+ self.ClusterId = params.get("ClusterId")
17
+
18
+
19
+ class LaunchClusterRequest(AbstractModel):
20
+ """LaunchCluster请求参数结构体
21
+ """
22
+
23
+ def __init__(self):
24
+ r"""创建集群
25
+ :param ClusterName: 集群名称
26
+ :type PathPrefix: String
27
+ :param Distribution: 集群类型
28
+ 可选值:
29
+ - Hadoop
30
+ - Kafka
31
+ - RocketMQ
32
+ - Zookeeper
33
+ :type PathPrefix: String
34
+ :param MainVersion: 产品版本,对应于不同的集群类型
35
+ 可选值:
36
+ - Hadoop版本:5.3.0,5.2.1,5.2.0,5.1.0,5.0.0
37
+ - Kafka版本:2.8.1,2.2.2
38
+ - RocketMQ版本:4.9.2
39
+ - Zookeeper版本:3.6.4,3.5.8,3.4.6
40
+ :type PathPrefix: String
41
+ :param ChargeType: 计费方式
42
+ 可选值:
43
+ - 按日月结:Daily
44
+ - 按量付费:HourlyInstantSettlement
45
+ :type PathPrefix: String
46
+ :param DatabaseInfo: 元数组高可用信息:
47
+ :type PathPrefix: Object
48
+ :param Services: 组件列表:
49
+ 1. Hadoop
50
+ - 必选组件: zookeeper(3.6.4)、hdfs(3.3.6)、yarn(3.3.6)、mapreduce(3.3.6)、tez(0.10.2)
51
+ - 可选组件:hbase(2.5.5)、hive(3.1.3)、ranger(2.3.0)、spark(3.3.3)、flink(1.17.1)、presto(0.283)、trino(433)、sqoop(1.4.7)、hue(4.10.0)、zeppelin(0.10.0)、kafka(2.8.1)、iceberg(1.3.1)、hudi(0.12.3)、kudu(1.15.0)、impala(3.4.0)、prometheus(2.37.2)、grafana(8.5.15)、dolphinscheduler(3.1.9)、celeborn(0.5.0)
52
+ 2. Kafka
53
+ - 必选组件:zookeeper(3.4.6)、kafka(2.8.1)
54
+ 3. RocketMQ
55
+ - 必选组件:rocketmq(4.9.2)
56
+ 4. Zookeeper
57
+ - 必选组件:zookeeper(3.6.4)
58
+ :type PathPrefix: Array
59
+ :param ProjectId: 项目 ID,参考「项目管理」,默认为 0
60
+ :type PathPrefix: Int
61
+ :param VpcDomainId: VPC 网络的 ID
62
+ :type PathPrefix: String
63
+ :param SecurityGroupId: 安全组的 ID
64
+ :type PathPrefix: String
65
+ :param InstanceGroups: 节点组信息
66
+ :type PathPrefix: Array
67
+ """
68
+ self.ClusterName = None
69
+ self.Distribution = None
70
+ self.MainVersion = None
71
+ self.ChargeType = None
72
+ self.DatabaseInfo = None
73
+ self.Services = None
74
+ self.ProjectId = None
75
+ self.VpcDomainId = None
76
+ self.SecurityGroupId = None
77
+ self.InstanceGroups = None
78
+
79
+ def _deserialize(self, params):
80
+ if params.get("ClusterName"):
81
+ self.ClusterName = params.get("ClusterName")
82
+ if params.get("Distribution"):
83
+ self.Distribution = params.get("Distribution")
84
+ if params.get("MainVersion"):
85
+ self.MainVersion = params.get("MainVersion")
86
+ if params.get("ChargeType"):
87
+ self.ChargeType = params.get("ChargeType")
88
+ if params.get("DatabaseInfo"):
89
+ self.DatabaseInfo = params.get("DatabaseInfo")
90
+ if params.get("Services"):
91
+ self.Services = params.get("Services")
92
+ if params.get("ProjectId"):
93
+ self.ProjectId = params.get("ProjectId")
94
+ if params.get("VpcDomainId"):
95
+ self.VpcDomainId = params.get("VpcDomainId")
96
+ if params.get("SecurityGroupId"):
97
+ self.SecurityGroupId = params.get("SecurityGroupId")
98
+ if params.get("InstanceGroups"):
99
+ self.InstanceGroups = params.get("InstanceGroups")
100
+
101
+
102
+ class ScaleInInstanceGroupsRequest(AbstractModel):
103
+ """ScaleInInstanceGroups请求参数结构体
104
+ """
105
+
106
+ def __init__(self):
107
+ r"""缩容集群
108
+ :param ClusterId: 集群ID
109
+ :type PathPrefix: String
110
+ :param InstanceGroups: 要缩容的节点组,需要注意的是,一次只能对一个节点组进行操作
111
+ :type PathPrefix: Array
112
+ :param GracefulScaleIn: 是否开启优雅缩容
113
+ :type PathPrefix: Boolean
114
+ :param GracefulScaleInTimeout: 优雅缩容等待时间,如果开启优雅缩容,则需要设定该参数,范围0-120, 单位秒
115
+ :type PathPrefix: Int
116
+ """
117
+ self.ClusterId = None
118
+ self.InstanceGroups = None
119
+ self.GracefulScaleIn = None
120
+ self.GracefulScaleInTimeout = None
121
+
122
+ def _deserialize(self, params):
123
+ if params.get("ClusterId"):
124
+ self.ClusterId = params.get("ClusterId")
125
+ if params.get("InstanceGroups"):
126
+ self.InstanceGroups = params.get("InstanceGroups")
127
+ if params.get("GracefulScaleIn"):
128
+ self.GracefulScaleIn = params.get("GracefulScaleIn")
129
+ if params.get("GracefulScaleInTimeout"):
130
+ self.GracefulScaleInTimeout = params.get("GracefulScaleInTimeout")
131
+
132
+
133
+ class ScaleOutInstanceGroupsRequest(AbstractModel):
134
+ """ScaleOutInstanceGroups请求参数结构体
135
+ """
136
+
137
+ def __init__(self):
138
+ r"""扩容集群
139
+ :param ClusterId: 集群ID
140
+
141
+ :type PathPrefix: String
142
+ :param InstanceGroups: 节点组信息
143
+ :type PathPrefix: Array
144
+ :param ProjectId: 项目 ID,参考「项目管理」
145
+ :type PathPrefix: Int
146
+ """
147
+ self.ClusterId = None
148
+ self.InstanceGroups = None
149
+ self.ProjectId = None
150
+
151
+ def _deserialize(self, params):
152
+ if params.get("ClusterId"):
153
+ self.ClusterId = params.get("ClusterId")
154
+ if params.get("InstanceGroups"):
155
+ self.InstanceGroups = params.get("InstanceGroups")
156
+ if params.get("ProjectId"):
157
+ self.ProjectId = params.get("ProjectId")
158
+
159
+
160
+ class DescribeClusterInfoRequest(AbstractModel):
161
+ """DescribeClusterInfo请求参数结构体
162
+ """
163
+
164
+ def __init__(self):
165
+ r"""集群详情描述
166
+ :param ClusterId: 集群ID
167
+
168
+ :type PathPrefix: String
169
+ """
170
+ self.ClusterId = None
171
+
172
+ def _deserialize(self, params):
173
+ if params.get("ClusterId"):
174
+ self.ClusterId = params.get("ClusterId")
175
+
176
+
177
+ class ListServiceStatusRequest(AbstractModel):
178
+ """ListServiceStatus请求参数结构体
179
+ """
180
+
181
+ def __init__(self):
182
+ r"""查看服务列表
183
+ :param ClusterId: 集群ID
184
+ :type PathPrefix: String
185
+ """
186
+ self.ClusterId = None
187
+
188
+ def _deserialize(self, params):
189
+ if params.get("ClusterId"):
190
+ self.ClusterId = params.get("ClusterId")
191
+
192
+
193
+ class ListClustersRequest(AbstractModel):
194
+ """ListClusters请求参数结构体
195
+ """
196
+
197
+ def __init__(self):
198
+ r"""集群列表
199
+ :param Marker: 分页参数
200
+ :type PathPrefix: String
201
+ """
202
+ self.Marker = None
203
+
204
+ def _deserialize(self, params):
205
+ if params.get("Marker"):
206
+ self.Marker = params.get("Marker")
207
+
208
+
209
+ class ListClusterVersionsRequest(AbstractModel):
210
+ """ListClusterVersions请求参数结构体
211
+ """
212
+
213
+ def __init__(self):
214
+ r"""集群版本列表
215
+ :param DistributionVersion: KMR 集群类型
216
+ 可选值:
217
+ - Hadoop
218
+ - Kafka
219
+ - Zookeeper
220
+ - RocketMQ
221
+ :type PathPrefix: String
222
+ """
223
+ self.DistributionVersion = None
224
+
225
+ def _deserialize(self, params):
226
+ if params.get("DistributionVersion"):
227
+ self.DistributionVersion = params.get("DistributionVersion")
228
+
229
+
230
+ class DescribeServiceRequest(AbstractModel):
231
+ """DescribeService请求参数结构体
232
+ """
233
+
234
+ def __init__(self):
235
+ r"""查看服务详情
236
+ :param ClusterId: 集群ID
237
+
238
+ :type PathPrefix: String
239
+ """
240
+ self.ClusterId = None
241
+
242
+ def _deserialize(self, params):
243
+ if params.get("ClusterId"):
244
+ self.ClusterId = params.get("ClusterId")
245
+
246
+
247
+ class ListConfigurationsRequest(AbstractModel):
248
+ """ListConfigurations请求参数结构体
249
+ """
250
+
251
+ def __init__(self):
252
+ r"""配置列表
253
+ :param ClusterId:
254
+ :type PathPrefix: String
255
+ :param ServiceName: 服务名称:hdfs,mapreduce,yarn,gaea,zookeeper,spark,spark2,flink,flink1,hive,tez,presto,trino,oozie,sqoop,hue,zeppelin,hbase,kafka,knox,rocketmq,impala,iceberg,hudi,kudu,gatherer,prometheus,grafana,kerberos,ranger,dolphinscheduler,celeborn
256
+ :type PathPrefix: String
257
+ """
258
+ self.ClusterId = None
259
+ self.ServiceName = None
260
+
261
+ def _deserialize(self, params):
262
+ if params.get("ClusterId"):
263
+ self.ClusterId = params.get("ClusterId")
264
+ if params.get("ServiceName"):
265
+ self.ServiceName = params.get("ServiceName")
266
+
267
+
268
+ class ListConfigurationHistoryRequest(AbstractModel):
269
+ """ListConfigurationHistory请求参数结构体
270
+ """
271
+
272
+ def __init__(self):
273
+ r"""配置历史
274
+ :param ClusterId: 集群ID
275
+ :type PathPrefix: String
276
+ :param ServiceName: 服务名称:hdfs,mapreduce,yarn,gaea,zookeeper,spark,spark2,flink,flink1,hive,tez,presto,trino,oozie,sqoop,hue,zeppelin,hbase,kafka,knox,rocketmq,impala,iceberg,hudi,kudu,gatherer,prometheus,grafana,kerberos,ranger,dolphinscheduler,celeborn
277
+ :type PathPrefix: String
278
+ :param Marker: 分页信息
279
+ :type PathPrefix: String
280
+ """
281
+ self.ClusterId = None
282
+ self.ServiceName = None
283
+ self.Marker = None
284
+
285
+ def _deserialize(self, params):
286
+ if params.get("ClusterId"):
287
+ self.ClusterId = params.get("ClusterId")
288
+ if params.get("ServiceName"):
289
+ self.ServiceName = params.get("ServiceName")
290
+ if params.get("Marker"):
291
+ self.Marker = params.get("Marker")
292
+
293
+
294
+ class ListTagValuesRequest(AbstractModel):
295
+ """ListTagValues请求参数结构体
296
+ """
297
+
298
+ def __init__(self):
299
+ r"""标签值列表
300
+ :param ClusterId: 集群ID
301
+
302
+ :type PathPrefix: String
303
+ """
304
+ self.ClusterId = None
305
+
306
+ def _deserialize(self, params):
307
+ if params.get("ClusterId"):
308
+ self.ClusterId = params.get("ClusterId")
309
+
310
+
311
+ class ListTagKeysRequest(AbstractModel):
312
+ """ListTagKeys请求参数结构体
313
+ """
314
+
315
+ def __init__(self):
316
+ r"""标签列表
317
+ :param ClusterId: 集群ID
318
+
319
+ :type PathPrefix: String
320
+ """
321
+ self.ClusterId = None
322
+
323
+ def _deserialize(self, params):
324
+ if params.get("ClusterId"):
325
+ self.ClusterId = params.get("ClusterId")
326
+
327
+
328
+ class BindTagsRequest(AbstractModel):
329
+ """BindTags请求参数结构体
330
+ """
331
+
332
+ def __init__(self):
333
+ r"""绑定标签
334
+ :param ClusterId: 集群ID
335
+ :type PathPrefix: String
336
+ :param Tags: 标签列表
337
+ :type PathPrefix: Array
338
+ """
339
+ self.ClusterId = None
340
+ self.Tags = None
341
+
342
+ def _deserialize(self, params):
343
+ if params.get("ClusterId"):
344
+ self.ClusterId = params.get("ClusterId")
345
+ if params.get("Tags"):
346
+ self.Tags = params.get("Tags")
347
+
348
+
349
+ class StartInstancesRequest(AbstractModel):
350
+ """StartInstances请求参数结构体
351
+ """
352
+
353
+ def __init__(self):
354
+ r"""启动实例
355
+ :param ClusterId: 集群ID
356
+
357
+ :type PathPrefix: String
358
+ :param InstanceIds: 主机实例ID
359
+
360
+ :type PathPrefix: Array
361
+ """
362
+ self.ClusterId = None
363
+ self.InstanceIds = None
364
+
365
+ def _deserialize(self, params):
366
+ if params.get("ClusterId"):
367
+ self.ClusterId = params.get("ClusterId")
368
+ if params.get("InstanceIds"):
369
+ self.InstanceIds = params.get("InstanceIds")
370
+
371
+
372
+ class RestartInstancesRequest(AbstractModel):
373
+ """RestartInstances请求参数结构体
374
+ """
375
+
376
+ def __init__(self):
377
+ r"""重启实例
378
+ :param ClusterId: 集群ID
379
+ :type PathPrefix: String
380
+ :param InstanceIds: 主机实例ID
381
+ :type PathPrefix: Array
382
+ :param Interval: 滚动重启间隔时间,RollingRestart为true时填写,默认60s
383
+ :type PathPrefix: Int
384
+ :param RollingRestart: 是否滚动重启
385
+ :type PathPrefix: Boolean
386
+ :param ForceReboot: 是否强制重启
387
+ :type PathPrefix: Boolean
388
+ """
389
+ self.ClusterId = None
390
+ self.InstanceIds = None
391
+ self.Interval = None
392
+ self.RollingRestart = None
393
+ self.ForceReboot = None
394
+
395
+ def _deserialize(self, params):
396
+ if params.get("ClusterId"):
397
+ self.ClusterId = params.get("ClusterId")
398
+ if params.get("InstanceIds"):
399
+ self.InstanceIds = params.get("InstanceIds")
400
+ if params.get("Interval"):
401
+ self.Interval = params.get("Interval")
402
+ if params.get("RollingRestart"):
403
+ self.RollingRestart = params.get("RollingRestart")
404
+ if params.get("ForceReboot"):
405
+ self.ForceReboot = params.get("ForceReboot")
406
+
407
+
408
+ class StopInstancesRequest(AbstractModel):
409
+ """StopInstances请求参数结构体
410
+ """
411
+
412
+ def __init__(self):
413
+ r"""停止实例
414
+ :param ClusterId: 集群ID
415
+ :type PathPrefix: String
416
+ :param InstanceIds: 主机实例ID
417
+ :type PathPrefix: Array
418
+ """
419
+ self.ClusterId = None
420
+ self.InstanceIds = None
421
+
422
+ def _deserialize(self, params):
423
+ if params.get("ClusterId"):
424
+ self.ClusterId = params.get("ClusterId")
425
+ if params.get("InstanceIds"):
426
+ self.InstanceIds = params.get("InstanceIds")
427
+
428
+
429
+ class ListScaleStrategyRequest(AbstractModel):
430
+ """ListScaleStrategy请求参数结构体
431
+ """
432
+
433
+ def __init__(self):
434
+ r"""弹性策略列表
435
+ :param ClusterId: 集群ID
436
+ :type PathPrefix: String
437
+ """
438
+ self.ClusterId = None
439
+
440
+ def _deserialize(self, params):
441
+ if params.get("ClusterId"):
442
+ self.ClusterId = params.get("ClusterId")
443
+
444
+
445
+ class ModifyScaleStrategyRequest(AbstractModel):
446
+ """ModifyScaleStrategy请求参数结构体
447
+ """
448
+
449
+ def __init__(self):
450
+ r"""弹性策略描述
451
+ :param ClusterId: 集群ID
452
+ :type PathPrefix: String
453
+ """
454
+ self.ClusterId = None
455
+
456
+ def _deserialize(self, params):
457
+ if params.get("ClusterId"):
458
+ self.ClusterId = params.get("ClusterId")
459
+
460
+
461
+ class DeleteScaleStrategyRequest(AbstractModel):
462
+ """DeleteScaleStrategy请求参数结构体
463
+ """
464
+
465
+ def __init__(self):
466
+ r"""删除弹性策略
467
+ :param ClusterId: 集群ID
468
+ :type PathPrefix: String
469
+ :param StrategyId: 弹性策略的ID
470
+ :type PathPrefix: String
471
+ :param StrategyModule: 弹性策略的类型
472
+ - 时间弹性:Time-Based
473
+ - 负载弹性:Load-Based
474
+ :type PathPrefix: String
475
+ """
476
+ self.ClusterId = None
477
+ self.StrategyId = None
478
+ self.StrategyModule = None
479
+
480
+ def _deserialize(self, params):
481
+ if params.get("ClusterId"):
482
+ self.ClusterId = params.get("ClusterId")
483
+ if params.get("StrategyId"):
484
+ self.StrategyId = params.get("StrategyId")
485
+ if params.get("StrategyModule"):
486
+ self.StrategyModule = params.get("StrategyModule")
487
+
488
+
489
+ class ListScaleHistoryRequest(AbstractModel):
490
+ """ListScaleHistory请求参数结构体
491
+ """
492
+
493
+ def __init__(self):
494
+ r"""弹性伸缩历史
495
+ :param ClusterId: 集群ID
496
+ :type PathPrefix: String
497
+ """
498
+ self.ClusterId = None
499
+
500
+ def _deserialize(self, params):
501
+ if params.get("ClusterId"):
502
+ self.ClusterId = params.get("ClusterId")
503
+
504
+
505
+ class AddLoadBasedScaleStrategyRequest(AbstractModel):
506
+ """AddLoadBasedScaleStrategy请求参数结构体
507
+ """
508
+
509
+ def __init__(self):
510
+ r"""添加负载弹性策略
511
+ :param ClusterId: 集群ID
512
+ :type PathPrefix: String
513
+ """
514
+ self.ClusterId = None
515
+
516
+ def _deserialize(self, params):
517
+ if params.get("ClusterId"):
518
+ self.ClusterId = params.get("ClusterId")
519
+
520
+
521
+ class ModifyLoadBasedScaleStrategyRequest(AbstractModel):
522
+ """ModifyLoadBasedScaleStrategy请求参数结构体
523
+ """
524
+
525
+ def __init__(self):
526
+ r"""修改负载弹性策略
527
+ :param ClusterId: 集群ID
528
+ :type PathPrefix: String
529
+ """
530
+ self.ClusterId = None
531
+
532
+ def _deserialize(self, params):
533
+ if params.get("ClusterId"):
534
+ self.ClusterId = params.get("ClusterId")
535
+
536
+
File without changes
@@ -0,0 +1,169 @@
1
+ import json
2
+
3
+ from ksyun.common.exception.ksyun_sdk_exception import KsyunSDKException
4
+ from ksyun.common.abstract_client import AbstractClient
5
+
6
+
7
+ class KmrClient(AbstractClient):
8
+ _apiVersion = '2023-12-31'
9
+ _endpoint = 'kmr.api.ksyun.com'
10
+ _service = 'kmr'
11
+ def ListInstances(self, request):
12
+ """查询实例列表
13
+ :param request: Request instance for ListInstances.
14
+ :type request: :class:`ksyun.client.kmr.v20231231.models.ListInstancesRequest`
15
+ """
16
+ try:
17
+ params = request._serialize()
18
+ body = self.call_judge("ListInstances", params, "application/json")
19
+ response = json.loads(body)
20
+ if "Error" not in response:
21
+ return body
22
+ else:
23
+ code = response["Error"]["Code"]
24
+ message = response["Error"]["Message"]
25
+ req_id = response["RequestId"]
26
+ raise KsyunSDKException(code, message, req_id)
27
+ except Exception as e:
28
+ if isinstance(e, KsyunSDKException):
29
+ raise
30
+ else:
31
+ raise KsyunSDKException(message=str(e))
32
+
33
+
34
+ def GetInstanceDetail(self, request):
35
+ """实例信息
36
+ :param request: Request instance for GetInstanceDetail.
37
+ :type request: :class:`ksyun.client.kmr.v20231231.models.GetInstanceDetailRequest`
38
+ """
39
+ try:
40
+ params = request._serialize()
41
+ body = self.call_judge("GetInstanceDetail", params, "application/x-www-form-urlencoded")
42
+ response = json.loads(body)
43
+ if "Error" not in response:
44
+ return body
45
+ else:
46
+ code = response["Error"]["Code"]
47
+ message = response["Error"]["Message"]
48
+ req_id = response["RequestId"]
49
+ raise KsyunSDKException(code, message, req_id)
50
+ except Exception as e:
51
+ if isinstance(e, KsyunSDKException):
52
+ raise
53
+ else:
54
+ raise KsyunSDKException(message=str(e))
55
+
56
+
57
+ def ModifyHosts(self, request):
58
+ """修改域名解析地址
59
+ :param request: Request instance for ModifyHosts.
60
+ :type request: :class:`ksyun.client.kmr.v20231231.models.ModifyHostsRequest`
61
+ """
62
+ try:
63
+ params = request._serialize()
64
+ body = self.call_judge("ModifyHosts", params, "application/json")
65
+ response = json.loads(body)
66
+ if "Error" not in response:
67
+ return body
68
+ else:
69
+ code = response["Error"]["Code"]
70
+ message = response["Error"]["Message"]
71
+ req_id = response["RequestId"]
72
+ raise KsyunSDKException(code, message, req_id)
73
+ except Exception as e:
74
+ if isinstance(e, KsyunSDKException):
75
+ raise
76
+ else:
77
+ raise KsyunSDKException(message=str(e))
78
+
79
+
80
+ def ListAutoScaleHistory(self, request):
81
+ """查看弹性伸缩策略历史
82
+ :param request: Request instance for ListAutoScaleHistory.
83
+ :type request: :class:`ksyun.client.kmr.v20231231.models.ListAutoScaleHistoryRequest`
84
+ """
85
+ try:
86
+ params = request._serialize()
87
+ body = self.call_judge("ListAutoScaleHistory", params, "application/x-www-form-urlencoded")
88
+ response = json.loads(body)
89
+ if "Error" not in response:
90
+ return body
91
+ else:
92
+ code = response["Error"]["Code"]
93
+ message = response["Error"]["Message"]
94
+ req_id = response["RequestId"]
95
+ raise KsyunSDKException(code, message, req_id)
96
+ except Exception as e:
97
+ if isinstance(e, KsyunSDKException):
98
+ raise
99
+ else:
100
+ raise KsyunSDKException(message=str(e))
101
+
102
+
103
+ def CreateAutoScalePolicy(self, request):
104
+ """新增弹性伸缩策略
105
+ :param request: Request instance for CreateAutoScalePolicy.
106
+ :type request: :class:`ksyun.client.kmr.v20231231.models.CreateAutoScalePolicyRequest`
107
+ """
108
+ try:
109
+ params = request._serialize()
110
+ body = self.call_judge("CreateAutoScalePolicy", params, "application/x-www-form-urlencoded")
111
+ response = json.loads(body)
112
+ if "Error" not in response:
113
+ return body
114
+ else:
115
+ code = response["Error"]["Code"]
116
+ message = response["Error"]["Message"]
117
+ req_id = response["RequestId"]
118
+ raise KsyunSDKException(code, message, req_id)
119
+ except Exception as e:
120
+ if isinstance(e, KsyunSDKException):
121
+ raise
122
+ else:
123
+ raise KsyunSDKException(message=str(e))
124
+
125
+
126
+ def ListAutoScalePolicy(self, request):
127
+ """查看弹性伸缩策略
128
+ :param request: Request instance for ListAutoScalePolicy.
129
+ :type request: :class:`ksyun.client.kmr.v20231231.models.ListAutoScalePolicyRequest`
130
+ """
131
+ try:
132
+ params = request._serialize()
133
+ body = self.call_judge("ListAutoScalePolicy", params, "application/x-www-form-urlencoded")
134
+ response = json.loads(body)
135
+ if "Error" not in response:
136
+ return body
137
+ else:
138
+ code = response["Error"]["Code"]
139
+ message = response["Error"]["Message"]
140
+ req_id = response["RequestId"]
141
+ raise KsyunSDKException(code, message, req_id)
142
+ except Exception as e:
143
+ if isinstance(e, KsyunSDKException):
144
+ raise
145
+ else:
146
+ raise KsyunSDKException(message=str(e))
147
+
148
+
149
+ def DeleteAutoScalePolicy(self, request):
150
+ """删除弹性伸缩策略
151
+ :param request: Request instance for DeleteAutoScalePolicy.
152
+ :type request: :class:`ksyun.client.kmr.v20231231.models.DeleteAutoScalePolicyRequest`
153
+ """
154
+ try:
155
+ params = request._serialize()
156
+ body = self.call_judge("DeleteAutoScalePolicy", params, "application/x-www-form-urlencoded")
157
+ response = json.loads(body)
158
+ if "Error" not in response:
159
+ return body
160
+ else:
161
+ code = response["Error"]["Code"]
162
+ message = response["Error"]["Message"]
163
+ req_id = response["RequestId"]
164
+ raise KsyunSDKException(code, message, req_id)
165
+ except Exception as e:
166
+ if isinstance(e, KsyunSDKException):
167
+ raise
168
+ else:
169
+ raise KsyunSDKException(message=str(e))