ucloud-sdk-python3 0.11.81__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 (280) hide show
  1. ucloud/__init__.py +0 -0
  2. ucloud/client.py +469 -0
  3. ucloud/core/__init__.py +0 -0
  4. ucloud/core/auth/__init__.py +3 -0
  5. ucloud/core/auth/_cfg.py +72 -0
  6. ucloud/core/client/__init__.py +8 -0
  7. ucloud/core/client/_cfg.py +96 -0
  8. ucloud/core/client/_client.py +176 -0
  9. ucloud/core/exc/__init__.py +9 -0
  10. ucloud/core/exc/_exc.py +94 -0
  11. ucloud/core/transport/__init__.py +4 -0
  12. ucloud/core/transport/_requests.py +135 -0
  13. ucloud/core/transport/http.py +120 -0
  14. ucloud/core/transport/utils.py +40 -0
  15. ucloud/core/typesystem/__init__.py +0 -0
  16. ucloud/core/typesystem/abstract.py +60 -0
  17. ucloud/core/typesystem/encoder.py +33 -0
  18. ucloud/core/typesystem/fields.py +149 -0
  19. ucloud/core/typesystem/schema.py +97 -0
  20. ucloud/core/utils/__init__.py +0 -0
  21. ucloud/core/utils/compat.py +15 -0
  22. ucloud/core/utils/deco.py +31 -0
  23. ucloud/core/utils/log.py +29 -0
  24. ucloud/core/utils/middleware.py +63 -0
  25. ucloud/helpers/__init__.py +0 -0
  26. ucloud/helpers/utils.py +90 -0
  27. ucloud/helpers/wait.py +108 -0
  28. ucloud/services/__init__.py +0 -0
  29. ucloud/services/cube/__init__.py +0 -0
  30. ucloud/services/cube/client.py +618 -0
  31. ucloud/services/cube/schemas/__init__.py +0 -0
  32. ucloud/services/cube/schemas/apis.py +548 -0
  33. ucloud/services/cube/schemas/models.py +58 -0
  34. ucloud/services/iam/__init__.py +0 -0
  35. ucloud/services/iam/client.py +1078 -0
  36. ucloud/services/iam/schemas/__init__.py +0 -0
  37. ucloud/services/iam/schemas/apis.py +973 -0
  38. ucloud/services/iam/schemas/models.py +127 -0
  39. ucloud/services/ipsecvpn/__init__.py +0 -0
  40. ucloud/services/ipsecvpn/client.py +522 -0
  41. ucloud/services/ipsecvpn/schemas/__init__.py +0 -0
  42. ucloud/services/ipsecvpn/schemas/apis.py +455 -0
  43. ucloud/services/ipsecvpn/schemas/models.py +134 -0
  44. ucloud/services/ipv6gw/__init__.py +0 -0
  45. ucloud/services/ipv6gw/client.py +44 -0
  46. ucloud/services/ipv6gw/schemas/__init__.py +0 -0
  47. ucloud/services/ipv6gw/schemas/apis.py +34 -0
  48. ucloud/services/ipv6gw/schemas/models.py +3 -0
  49. ucloud/services/isms/__init__.py +0 -0
  50. ucloud/services/isms/client.py +330 -0
  51. ucloud/services/isms/schemas/__init__.py +0 -0
  52. ucloud/services/isms/schemas/apis.py +272 -0
  53. ucloud/services/isms/schemas/models.py +50 -0
  54. ucloud/services/pathx/__init__.py +0 -0
  55. ucloud/services/pathx/client.py +1656 -0
  56. ucloud/services/pathx/schemas/__init__.py +0 -0
  57. ucloud/services/pathx/schemas/apis.py +1289 -0
  58. ucloud/services/pathx/schemas/models.py +420 -0
  59. ucloud/services/stepflow/__init__.py +0 -0
  60. ucloud/services/stepflow/client.py +98 -0
  61. ucloud/services/stepflow/schemas/__init__.py +0 -0
  62. ucloud/services/stepflow/schemas/apis.py +67 -0
  63. ucloud/services/stepflow/schemas/models.py +37 -0
  64. ucloud/services/sts/__init__.py +0 -0
  65. ucloud/services/sts/client.py +46 -0
  66. ucloud/services/sts/schemas/__init__.py +0 -0
  67. ucloud/services/sts/schemas/apis.py +35 -0
  68. ucloud/services/sts/schemas/models.py +16 -0
  69. ucloud/services/tidb/__init__.py +0 -0
  70. ucloud/services/tidb/client.py +120 -0
  71. ucloud/services/tidb/schemas/__init__.py +0 -0
  72. ucloud/services/tidb/schemas/apis.py +103 -0
  73. ucloud/services/tidb/schemas/models.py +11 -0
  74. ucloud/services/uaaa/__init__.py +0 -0
  75. ucloud/services/uaaa/client.py +311 -0
  76. ucloud/services/uaaa/schemas/__init__.py +0 -0
  77. ucloud/services/uaaa/schemas/apis.py +252 -0
  78. ucloud/services/uaaa/schemas/models.py +47 -0
  79. ucloud/services/uaccount/__init__.py +0 -0
  80. ucloud/services/uaccount/client.py +547 -0
  81. ucloud/services/uaccount/schemas/__init__.py +0 -0
  82. ucloud/services/uaccount/schemas/apis.py +442 -0
  83. ucloud/services/uaccount/schemas/models.py +128 -0
  84. ucloud/services/uads/__init__.py +0 -0
  85. ucloud/services/uads/client.py +1148 -0
  86. ucloud/services/uads/schemas/__init__.py +0 -0
  87. ucloud/services/uads/schemas/apis.py +983 -0
  88. ucloud/services/uads/schemas/models.py +199 -0
  89. ucloud/services/ubill/__init__.py +0 -0
  90. ucloud/services/ubill/client.py +248 -0
  91. ucloud/services/ubill/schemas/__init__.py +0 -0
  92. ucloud/services/ubill/schemas/apis.py +183 -0
  93. ucloud/services/ubill/schemas/models.py +107 -0
  94. ucloud/services/ucdn/__init__.py +0 -0
  95. ucloud/services/ucdn/client.py +1964 -0
  96. ucloud/services/ucdn/schemas/__init__.py +0 -0
  97. ucloud/services/ucdn/schemas/apis.py +1395 -0
  98. ucloud/services/ucdn/schemas/models.py +576 -0
  99. ucloud/services/ucloudstack/__init__.py +0 -0
  100. ucloud/services/ucloudstack/client.py +3352 -0
  101. ucloud/services/ucloudstack/schemas/__init__.py +0 -0
  102. ucloud/services/ucloudstack/schemas/apis.py +2887 -0
  103. ucloud/services/ucloudstack/schemas/models.py +560 -0
  104. ucloud/services/ucompshare/__init__.py +0 -0
  105. ucloud/services/ucompshare/client.py +820 -0
  106. ucloud/services/ucompshare/schemas/__init__.py +0 -0
  107. ucloud/services/ucompshare/schemas/apis.py +623 -0
  108. ucloud/services/ucompshare/schemas/models.py +241 -0
  109. ucloud/services/udb/__init__.py +0 -0
  110. ucloud/services/udb/client.py +2463 -0
  111. ucloud/services/udb/schemas/__init__.py +0 -0
  112. ucloud/services/udb/schemas/apis.py +2053 -0
  113. ucloud/services/udb/schemas/models.py +319 -0
  114. ucloud/services/udbproxy/__init__.py +0 -0
  115. ucloud/services/udbproxy/client.py +67 -0
  116. ucloud/services/udbproxy/schemas/__init__.py +0 -0
  117. ucloud/services/udbproxy/schemas/apis.py +38 -0
  118. ucloud/services/udbproxy/schemas/models.py +31 -0
  119. ucloud/services/uddb/__init__.py +0 -0
  120. ucloud/services/uddb/client.py +456 -0
  121. ucloud/services/uddb/schemas/__init__.py +0 -0
  122. ucloud/services/uddb/schemas/apis.py +520 -0
  123. ucloud/services/uddb/schemas/models.py +96 -0
  124. ucloud/services/udi/__init__.py +0 -0
  125. ucloud/services/udi/client.py +250 -0
  126. ucloud/services/udi/schemas/__init__.py +0 -0
  127. ucloud/services/udi/schemas/apis.py +205 -0
  128. ucloud/services/udi/schemas/models.py +58 -0
  129. ucloud/services/udisk/__init__.py +0 -0
  130. ucloud/services/udisk/client.py +832 -0
  131. ucloud/services/udisk/schemas/__init__.py +0 -0
  132. ucloud/services/udisk/schemas/apis.py +741 -0
  133. ucloud/services/udisk/schemas/models.py +100 -0
  134. ucloud/services/udns/__init__.py +0 -0
  135. ucloud/services/udns/client.py +380 -0
  136. ucloud/services/udns/schemas/__init__.py +0 -0
  137. ucloud/services/udns/schemas/apis.py +293 -0
  138. ucloud/services/udns/schemas/models.py +58 -0
  139. ucloud/services/udpn/__init__.py +0 -0
  140. ucloud/services/udpn/client.py +240 -0
  141. ucloud/services/udpn/schemas/__init__.py +0 -0
  142. ucloud/services/udpn/schemas/apis.py +203 -0
  143. ucloud/services/udpn/schemas/models.py +29 -0
  144. ucloud/services/udts/__init__.py +0 -0
  145. ucloud/services/udts/client.py +410 -0
  146. ucloud/services/udts/schemas/__init__.py +0 -0
  147. ucloud/services/udts/schemas/apis.py +403 -0
  148. ucloud/services/udts/schemas/models.py +93 -0
  149. ucloud/services/uec/__init__.py +0 -0
  150. ucloud/services/uec/client.py +1510 -0
  151. ucloud/services/uec/schemas/__init__.py +0 -0
  152. ucloud/services/uec/schemas/apis.py +1195 -0
  153. ucloud/services/uec/schemas/models.py +316 -0
  154. ucloud/services/ufile/__init__.py +0 -0
  155. ucloud/services/ufile/client.py +698 -0
  156. ucloud/services/ufile/schemas/__init__.py +0 -0
  157. ucloud/services/ufile/schemas/apis.py +542 -0
  158. ucloud/services/ufile/schemas/models.py +139 -0
  159. ucloud/services/ufs/__init__.py +0 -0
  160. ucloud/services/ufs/client.py +328 -0
  161. ucloud/services/ufs/schemas/__init__.py +0 -0
  162. ucloud/services/ufs/schemas/apis.py +265 -0
  163. ucloud/services/ufs/schemas/models.py +52 -0
  164. ucloud/services/ugn/__init__.py +0 -0
  165. ucloud/services/ugn/client.py +857 -0
  166. ucloud/services/ugn/schemas/__init__.py +0 -0
  167. ucloud/services/ugn/schemas/apis.py +678 -0
  168. ucloud/services/ugn/schemas/models.py +191 -0
  169. ucloud/services/uhost/__init__.py +0 -0
  170. ucloud/services/uhost/client.py +1647 -0
  171. ucloud/services/uhost/schemas/__init__.py +0 -0
  172. ucloud/services/uhost/schemas/apis.py +1483 -0
  173. ucloud/services/uhost/schemas/models.py +427 -0
  174. ucloud/services/uhub/__init__.py +0 -0
  175. ucloud/services/uhub/client.py +229 -0
  176. ucloud/services/uhub/schemas/__init__.py +0 -0
  177. ucloud/services/uhub/schemas/apis.py +194 -0
  178. ucloud/services/uhub/schemas/models.py +39 -0
  179. ucloud/services/uk8s/__init__.py +0 -0
  180. ucloud/services/uk8s/client.py +729 -0
  181. ucloud/services/uk8s/schemas/__init__.py +0 -0
  182. ucloud/services/uk8s/schemas/apis.py +639 -0
  183. ucloud/services/uk8s/schemas/models.py +179 -0
  184. ucloud/services/ulb/__init__.py +0 -0
  185. ucloud/services/ulb/client.py +2285 -0
  186. ucloud/services/ulb/schemas/__init__.py +0 -0
  187. ucloud/services/ulb/schemas/apis.py +1678 -0
  188. ucloud/services/ulb/schemas/models.py +591 -0
  189. ucloud/services/ulighthost/__init__.py +0 -0
  190. ucloud/services/ulighthost/client.py +576 -0
  191. ucloud/services/ulighthost/schemas/__init__.py +0 -0
  192. ucloud/services/ulighthost/schemas/apis.py +445 -0
  193. ucloud/services/ulighthost/schemas/models.py +133 -0
  194. ucloud/services/umem/__init__.py +0 -0
  195. ucloud/services/umem/client.py +1829 -0
  196. ucloud/services/umem/schemas/__init__.py +0 -0
  197. ucloud/services/umem/schemas/apis.py +1477 -0
  198. ucloud/services/umem/schemas/models.py +327 -0
  199. ucloud/services/umongodb/__init__.py +0 -0
  200. ucloud/services/umongodb/client.py +752 -0
  201. ucloud/services/umongodb/schemas/__init__.py +0 -0
  202. ucloud/services/umongodb/schemas/apis.py +567 -0
  203. ucloud/services/umongodb/schemas/models.py +220 -0
  204. ucloud/services/unet/__init__.py +0 -0
  205. ucloud/services/unet/client.py +1278 -0
  206. ucloud/services/unet/schemas/__init__.py +0 -0
  207. ucloud/services/unet/schemas/apis.py +1006 -0
  208. ucloud/services/unet/schemas/models.py +275 -0
  209. ucloud/services/unvs/__init__.py +0 -0
  210. ucloud/services/unvs/client.py +87 -0
  211. ucloud/services/unvs/schemas/__init__.py +0 -0
  212. ucloud/services/unvs/schemas/apis.py +66 -0
  213. ucloud/services/unvs/schemas/models.py +19 -0
  214. ucloud/services/upfs/__init__.py +0 -0
  215. ucloud/services/upfs/client.py +252 -0
  216. ucloud/services/upfs/schemas/__init__.py +0 -0
  217. ucloud/services/upfs/schemas/apis.py +204 -0
  218. ucloud/services/upfs/schemas/models.py +36 -0
  219. ucloud/services/upgsql/__init__.py +0 -0
  220. ucloud/services/upgsql/client.py +1007 -0
  221. ucloud/services/upgsql/schemas/__init__.py +0 -0
  222. ucloud/services/upgsql/schemas/apis.py +827 -0
  223. ucloud/services/upgsql/schemas/models.py +158 -0
  224. ucloud/services/uphone/__init__.py +0 -0
  225. ucloud/services/uphone/client.py +2122 -0
  226. ucloud/services/uphone/schemas/__init__.py +0 -0
  227. ucloud/services/uphone/schemas/apis.py +1799 -0
  228. ucloud/services/uphone/schemas/models.py +357 -0
  229. ucloud/services/uphost/__init__.py +0 -0
  230. ucloud/services/uphost/client.py +847 -0
  231. ucloud/services/uphost/schemas/__init__.py +0 -0
  232. ucloud/services/uphost/schemas/apis.py +689 -0
  233. ucloud/services/uphost/schemas/models.py +175 -0
  234. ucloud/services/urocketmq/__init__.py +0 -0
  235. ucloud/services/urocketmq/client.py +117 -0
  236. ucloud/services/urocketmq/schemas/__init__.py +0 -0
  237. ucloud/services/urocketmq/schemas/apis.py +92 -0
  238. ucloud/services/urocketmq/schemas/models.py +14 -0
  239. ucloud/services/uslk/__init__.py +0 -0
  240. ucloud/services/uslk/client.py +249 -0
  241. ucloud/services/uslk/schemas/__init__.py +0 -0
  242. ucloud/services/uslk/schemas/apis.py +191 -0
  243. ucloud/services/uslk/schemas/models.py +74 -0
  244. ucloud/services/usms/__init__.py +0 -0
  245. ucloud/services/usms/client.py +759 -0
  246. ucloud/services/usms/schemas/__init__.py +0 -0
  247. ucloud/services/usms/schemas/apis.py +653 -0
  248. ucloud/services/usms/schemas/models.py +215 -0
  249. ucloud/services/utsdb/__init__.py +0 -0
  250. ucloud/services/utsdb/client.py +604 -0
  251. ucloud/services/utsdb/schemas/__init__.py +0 -0
  252. ucloud/services/utsdb/schemas/apis.py +515 -0
  253. ucloud/services/utsdb/schemas/models.py +61 -0
  254. ucloud/services/uvms/__init__.py +0 -0
  255. ucloud/services/uvms/client.py +119 -0
  256. ucloud/services/uvms/schemas/__init__.py +0 -0
  257. ucloud/services/uvms/schemas/apis.py +88 -0
  258. ucloud/services/uvms/schemas/models.py +40 -0
  259. ucloud/services/vpc/__init__.py +0 -0
  260. ucloud/services/vpc/client.py +3233 -0
  261. ucloud/services/vpc/schemas/__init__.py +0 -0
  262. ucloud/services/vpc/schemas/apis.py +2529 -0
  263. ucloud/services/vpc/schemas/models.py +651 -0
  264. ucloud/testing/__init__.py +0 -0
  265. ucloud/testing/driver/__init__.py +5 -0
  266. ucloud/testing/driver/_scenario.py +93 -0
  267. ucloud/testing/driver/_specification.py +57 -0
  268. ucloud/testing/driver/_step.py +166 -0
  269. ucloud/testing/env.py +28 -0
  270. ucloud/testing/exc.py +18 -0
  271. ucloud/testing/funcs.py +68 -0
  272. ucloud/testing/mock.py +28 -0
  273. ucloud/testing/op.py +177 -0
  274. ucloud/testing/utest.py +195 -0
  275. ucloud/version.py +1 -0
  276. ucloud_sdk_python3-0.11.81.dist-info/LICENSE +202 -0
  277. ucloud_sdk_python3-0.11.81.dist-info/METADATA +71 -0
  278. ucloud_sdk_python3-0.11.81.dist-info/RECORD +280 -0
  279. ucloud_sdk_python3-0.11.81.dist-info/WHEEL +5 -0
  280. ucloud_sdk_python3-0.11.81.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1829 @@
1
+ """ Code is generated by ucloud-model, DO NOT EDIT IT. """
2
+
3
+ import typing
4
+
5
+
6
+ from ucloud.core.client import Client
7
+ from ucloud.services.umem.schemas import apis
8
+
9
+
10
+ class UMemClient(Client):
11
+ def __init__(
12
+ self, config: dict, transport=None, middleware=None, logger=None
13
+ ):
14
+ super(UMemClient, self).__init__(config, transport, middleware, logger)
15
+
16
+ def check_udredis_space_allowance(
17
+ self, req: typing.Optional[dict] = None, **kwargs
18
+ ) -> dict:
19
+ """CheckUDredisSpaceAllowance - 检查高性能UMem剩余资源,以及分片扩容前的资源预检查
20
+
21
+ **Request**
22
+
23
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
24
+ - **Count** (str) - (Required) 创建实例的数量,[1-10]
25
+ - **Size** (int) - (Required) 创建实例的容量大小,,扩容时的分片目标容量大小
26
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
27
+ - **GroupId** (str) - 资源ID,扩缩容时的必传参数
28
+
29
+ **Response**
30
+
31
+ - **Count** (int) - 创建实例资源时,表示可创建的数量;扩容资源时,返回1表示可以扩容,0表示可用区资源不足不能扩容
32
+
33
+ """
34
+ # build request
35
+ d = {
36
+ "Region": self.config.region,
37
+ }
38
+ req and d.update(req)
39
+ d = apis.CheckUDredisSpaceAllowanceRequestSchema().dumps(d)
40
+
41
+ resp = self.invoke("CheckUDredisSpaceAllowance", d, **kwargs)
42
+ return apis.CheckUDredisSpaceAllowanceResponseSchema().loads(resp)
43
+
44
+ def check_uredis_allowance(
45
+ self, req: typing.Optional[dict] = None, **kwargs
46
+ ) -> dict:
47
+ """CheckURedisAllowance - 检查主备Redis的资源是否足够创建新实例,以及主备Redis的扩容资源预检查
48
+
49
+ **Request**
50
+
51
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
52
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
53
+ - **Count** (int) - (Required) 创建实例的数量,[1-10]
54
+ - **Size** (int) - (Required) 创建实例的容量大小, 单位:GB 目前仅支持1/2/4/8/16/32六种规格;扩缩容时,表示实例的目标资源大小
55
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
56
+ - **GroupId** (str) - 资源ID,扩容实例资源时的必传参数
57
+ - **Protocol** (str) -
58
+ - **RegionFlag** (bool) - 是否是跨机房URedis(默认false)
59
+ - **SlaveZone** (str) -
60
+
61
+ **Response**
62
+
63
+ - **Count** (int) - 创建实例资源时,表示可创建的数量;扩容资源时,返回1表示可以扩容,0表示可用区资源不足不能扩容
64
+
65
+ """
66
+ # build request
67
+ d = {
68
+ "ProjectId": self.config.project_id,
69
+ "Region": self.config.region,
70
+ }
71
+ req and d.update(req)
72
+ d = apis.CheckURedisAllowanceRequestSchema().dumps(d)
73
+
74
+ resp = self.invoke("CheckURedisAllowance", d, **kwargs)
75
+ return apis.CheckURedisAllowanceResponseSchema().loads(resp)
76
+
77
+ def create_scan_hot_big_keys(
78
+ self, req: typing.Optional[dict] = None, **kwargs
79
+ ) -> dict:
80
+ """CreateScanHotBigKeys - 创建执行扫大key和热key的任务
81
+
82
+ **Request**
83
+
84
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
85
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
86
+ - **GroupId** (str) - (Required) 资源id
87
+ - **Type** (str) - (Required) 任务类型。"ScanBigKeys":扫大key,"ScanHotKeys":扫热key
88
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
89
+ - **IsRetry** (bool) - 是否要重试任务,如果是的话,TaskId必填
90
+ - **TaskId** (str) - 要重试的任务id
91
+
92
+ **Response**
93
+
94
+
95
+ """
96
+ # build request
97
+ d = {
98
+ "ProjectId": self.config.project_id,
99
+ "Region": self.config.region,
100
+ }
101
+ req and d.update(req)
102
+ d = apis.CreateScanHotBigKeysRequestSchema().dumps(d)
103
+
104
+ # build options
105
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
106
+
107
+ resp = self.invoke("CreateScanHotBigKeys", d, **kwargs)
108
+ return apis.CreateScanHotBigKeysResponseSchema().loads(resp)
109
+
110
+ def create_umem_backup(
111
+ self, req: typing.Optional[dict] = None, **kwargs
112
+ ) -> dict:
113
+ """CreateUMemBackup - 创建分布式redis备份
114
+
115
+ **Request**
116
+
117
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
118
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
119
+ - **BackupName** (str) - (Required) 请求创建备份的名称 (范围[6-63],只能包含英文、数字以及符号-和_)
120
+ - **SpaceId** (str) - (Required) 资源id
121
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
122
+
123
+ **Response**
124
+
125
+ - **BackupId** (str) - 备份Id
126
+
127
+ """
128
+ # build request
129
+ d = {
130
+ "ProjectId": self.config.project_id,
131
+ "Region": self.config.region,
132
+ }
133
+ req and d.update(req)
134
+ d = apis.CreateUMemBackupRequestSchema().dumps(d)
135
+
136
+ # build options
137
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
138
+
139
+ resp = self.invoke("CreateUMemBackup", d, **kwargs)
140
+ return apis.CreateUMemBackupResponseSchema().loads(resp)
141
+
142
+ def create_umem_space(
143
+ self, req: typing.Optional[dict] = None, **kwargs
144
+ ) -> dict:
145
+ """CreateUMemSpace - 创建UMem内存空间
146
+
147
+ **Request**
148
+
149
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
150
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
151
+ - **Name** (str) - (Required) 空间名称,长度(6<=size<=63)
152
+ - **Size** (int) - (Required) 内存大小, 单位:GB, 范围[1~1024]
153
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
154
+ - **BackupId** (str) - 备份ID,选择从该备份新建集群
155
+ - **BlockCnt** (int) - 分片个数
156
+ - **ChargeType** (str) - Year , Month, Dynamic 默认: Month
157
+ - **ClusterMode** (str) - "RWMode":表示创建读写分离版本;其他为创建普通版本
158
+ - **CouponId** (str) - 使用的代金券id
159
+ - **HighPerformance** (bool) - 是否创建性能增强性。默认为false,或者不填,填true为性能增强型。
160
+ - **Password** (str) - URedis密码。请遵照 `字段规范 <https://docs.ucloud.cn/api/uhost-api/specification>`_ 设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。
161
+ - **Port** (int) - 分片端口, 默认为 6379
162
+ - **Protocol** (str) - 协议:memcache, redis (默认redis).注意:redis无single类型
163
+ - **ProxyPort** (int) - 代理端口, 默认为 6379
164
+ - **ProxySize** (int) - 分布式代理CPU核数,不填或者传0时默认不创建代理
165
+ - **Quantity** (int) - 购买时长 默认: 1
166
+ - **RollbackSpaceId** (str) - 如果是通过回档创建,该实例ID不为空
167
+ - **RollbackTime** (int) - 要回档的时间戳
168
+ - **SlaveZone** (str) - 跨机房UDRedis,slave所在可用区(必须和Zone在同一Region,且不可相同)
169
+ - **SpaceId** (str) - 集群ID,选择某个备份创建时,需要填写源集群ID
170
+ - **SubnetId** (str) - 子网ID
171
+ - **Tag** (str) - 业务组名称
172
+ - **Type** (str) - 空间类型:single(无热备),double(热备)(默认: double)
173
+ - **UlbMode** (bool) - 是否创建负载均衡型分布式代理,true时表示创建负载均衡型代理
174
+ - **VPCId** (str) - VPC的ID
175
+ - **Version** (str) - 分布式分片版本(默认版本是4.0,其他版本见DescribeUDRedisBlockVersion)
176
+
177
+ **Response**
178
+
179
+ - **SpaceId** (str) - 创建内存空间ID列表
180
+
181
+ """
182
+ # build request
183
+ d = {
184
+ "ProjectId": self.config.project_id,
185
+ "Region": self.config.region,
186
+ }
187
+ req and d.update(req)
188
+ d = apis.CreateUMemSpaceRequestSchema().dumps(d)
189
+
190
+ # build options
191
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
192
+
193
+ resp = self.invoke("CreateUMemSpace", d, **kwargs)
194
+ return apis.CreateUMemSpaceResponseSchema().loads(resp)
195
+
196
+ def create_umem_cache_group(
197
+ self, req: typing.Optional[dict] = None, **kwargs
198
+ ) -> dict:
199
+ """CreateUMemcacheGroup - 创建单机Memcache
200
+
201
+ **Request**
202
+
203
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
204
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
205
+ - **Name** (str) - (Required) 请求创建组的名称 范围[6-60]
206
+ - **ChargeType** (str) - 计费模式,Year , Month, Dynamic 默认: Month
207
+ - **ConfigId** (str) - 配置ID,目前仅支持默认配置id 默认配置id:"9a891891-c245-4b66-bce8-67e59430d67c"
208
+ - **CouponId** (str) - 代金券ID
209
+ - **Protocol** (str) -
210
+ - **Quantity** (int) - 购买时长,默认为1
211
+ - **Size** (int) - 每个节点的内存大小,单位GB,默认1GB 目前仅支持1/2/4/8/16/32这几档
212
+ - **SubnetId** (str) -
213
+ - **Tag** (str) - 业务组 默认:Default
214
+ - **VPCId** (str) -
215
+ - **Version** (str) - Memcache版本信息,默认为1.4.31
216
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
217
+
218
+ **Response**
219
+
220
+ - **GroupId** (str) - 创建的组ID
221
+
222
+ """
223
+ # build request
224
+ d = {
225
+ "ProjectId": self.config.project_id,
226
+ "Region": self.config.region,
227
+ }
228
+ req and d.update(req)
229
+ d = apis.CreateUMemcacheGroupRequestSchema().dumps(d)
230
+
231
+ # build options
232
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
233
+
234
+ resp = self.invoke("CreateUMemcacheGroup", d, **kwargs)
235
+ return apis.CreateUMemcacheGroupResponseSchema().loads(resp)
236
+
237
+ def create_uredis_backup(
238
+ self, req: typing.Optional[dict] = None, **kwargs
239
+ ) -> dict:
240
+ """CreateURedisBackup - 创建主备Redis备份
241
+
242
+ **Request**
243
+
244
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
245
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
246
+ - **BackupName** (str) - (Required) 请求创建组的名称 (范围[6-63],只能包含英文、数字以及符号-和_)
247
+ - **GroupId** (str) - (Required) 资源id
248
+ - **SlaveZone** (str) - 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同)
249
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
250
+
251
+ **Response**
252
+
253
+ - **BackupId** (str) - 备份id
254
+
255
+ """
256
+ # build request
257
+ d = {
258
+ "ProjectId": self.config.project_id,
259
+ "Region": self.config.region,
260
+ }
261
+ req and d.update(req)
262
+ d = apis.CreateURedisBackupRequestSchema().dumps(d)
263
+
264
+ # build options
265
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
266
+
267
+ resp = self.invoke("CreateURedisBackup", d, **kwargs)
268
+ return apis.CreateURedisBackupResponseSchema().loads(resp)
269
+
270
+ def create_uredis_group(
271
+ self, req: typing.Optional[dict] = None, **kwargs
272
+ ) -> dict:
273
+ """CreateURedisGroup - 创建主备redis
274
+
275
+ **Request**
276
+
277
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
278
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
279
+ - **HighAvailability** (str) - (Required) 是否开启高可用,enable或disable
280
+ - **Name** (str) - (Required) 请求创建组的名称 (范围[6-63],只能包含英文、数字以及符号-和_)
281
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
282
+ - **AOFID** (str) - 回档的AOF文件ID
283
+ - **AutoBackup** (str) - 是否自动备份,enable或disable,默认disable
284
+ - **BackupId** (str) - 有此项代表从备份中创建,无代表正常创建
285
+ - **BackupTime** (int) - 自动备份开始时间,范围[0-23],默认3点
286
+ - **ChargeType** (str) - 计费模式,Year , Month, Dynamic 默认: Month
287
+ - **ConfigId** (str) - 配置ID,目前支持 4.0版本配置ID:"6c9298a3-9d7f-428c-b1d0-e87ab3b8a1ea", 5.0版本配置ID:"3cdeeb90-dcbf-46e8-95cd-a05d8860a22c",6.0版本配置ID:"1d990520-aac8-4e0f-9384-f58611e8eb28",7.0版本配置ID:"48dcf534-db41-11ec-a1a6-52670028d520",默认版本4.0,从备份创建为必传项
288
+ - **CouponId** (str) - 代金券ID
289
+ - **EnableIpV6** (bool) - 【即将下线,请勿使用】是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true
290
+ - **HighPerformance** (bool) - 是否创建高性能Redis, 默认为false, 或者不填, 创建高性能为true
291
+ - **MasterGroupId** (str) - Master Redis Group的ID,创建只读Slave时,必须填写
292
+ - **Password** (str) - 初始化密码,需要 base64 编码
293
+ - **Port** (int) - 端口
294
+ - **Quantity** (int) - 购买时长,默认为1
295
+ - **RollbackGroupId** (str) - 如果是通过回档创建实例,需要传回档实例的GroupId
296
+ - **RollbackTime** (int) - 回档时间点
297
+ - **Size** (int) - 每个节点的内存大小,单位GB,默认1GB,目前仅支持1/2/4/8/16/32,六种
298
+ - **SlaveZone** (str) - 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同)
299
+ - **SubnetId** (str) - 子网ID
300
+ - **Tag** (str) - 业务组名称
301
+ - **VPCId** (str) - VPC的ID
302
+ - **Version** (str) - Redis版本信息(详见DescribeURedisVersion返回结果),默认版本4.0
303
+
304
+ **Response**
305
+
306
+ - **GroupId** (str) - 创建的组ID
307
+
308
+ """
309
+ # build request
310
+ d = {
311
+ "ProjectId": self.config.project_id,
312
+ "Region": self.config.region,
313
+ }
314
+ req and d.update(req)
315
+ d = apis.CreateURedisGroupRequestSchema().dumps(d)
316
+
317
+ # build options
318
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
319
+
320
+ resp = self.invoke("CreateURedisGroup", d, **kwargs)
321
+ return apis.CreateURedisGroupResponseSchema().loads(resp)
322
+
323
+ def delete_umem_space(
324
+ self, req: typing.Optional[dict] = None, **kwargs
325
+ ) -> dict:
326
+ """DeleteUMemSpace - 删除UMem内存空间
327
+
328
+ **Request**
329
+
330
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
331
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
332
+ - **SpaceId** (str) - (Required) UMem内存空间ID
333
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
334
+
335
+ **Response**
336
+
337
+
338
+ """
339
+ # build request
340
+ d = {
341
+ "ProjectId": self.config.project_id,
342
+ "Region": self.config.region,
343
+ }
344
+ req and d.update(req)
345
+ d = apis.DeleteUMemSpaceRequestSchema().dumps(d)
346
+
347
+ resp = self.invoke("DeleteUMemSpace", d, **kwargs)
348
+ return apis.DeleteUMemSpaceResponseSchema().loads(resp)
349
+
350
+ def delete_umem_cache_group(
351
+ self, req: typing.Optional[dict] = None, **kwargs
352
+ ) -> dict:
353
+ """DeleteUMemcacheGroup - 删除单机Memcache
354
+
355
+ **Request**
356
+
357
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
358
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
359
+ - **GroupId** (str) - (Required) 组ID
360
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
361
+
362
+ **Response**
363
+
364
+
365
+ """
366
+ # build request
367
+ d = {
368
+ "ProjectId": self.config.project_id,
369
+ "Region": self.config.region,
370
+ }
371
+ req and d.update(req)
372
+ d = apis.DeleteUMemcacheGroupRequestSchema().dumps(d)
373
+
374
+ resp = self.invoke("DeleteUMemcacheGroup", d, **kwargs)
375
+ return apis.DeleteUMemcacheGroupResponseSchema().loads(resp)
376
+
377
+ def delete_uredis_group(
378
+ self, req: typing.Optional[dict] = None, **kwargs
379
+ ) -> dict:
380
+ """DeleteURedisGroup - 删除主备redis
381
+
382
+ **Request**
383
+
384
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
385
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
386
+ - **GroupId** (str) - (Required) 组ID
387
+
388
+ **Response**
389
+
390
+
391
+ """
392
+ # build request
393
+ d = {
394
+ "ProjectId": self.config.project_id,
395
+ "Region": self.config.region,
396
+ }
397
+ req and d.update(req)
398
+ d = apis.DeleteURedisGroupRequestSchema().dumps(d)
399
+
400
+ resp = self.invoke("DeleteURedisGroup", d, **kwargs)
401
+ return apis.DeleteURedisGroupResponseSchema().loads(resp)
402
+
403
+ def describe_ud_redis_proxy_info(
404
+ self, req: typing.Optional[dict] = None, **kwargs
405
+ ) -> dict:
406
+ """DescribeUDRedisProxyInfo - 拉取udredis所有的代理信息
407
+
408
+ **Request**
409
+
410
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
411
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
412
+ - **SpaceId** (str) - (Required) udredis实例id
413
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
414
+
415
+ **Response**
416
+
417
+ - **DataSet** (list) - 见 **UDRedisProxyInfo** 模型定义
418
+
419
+ **Response Model**
420
+
421
+ **UDRedisProxyInfo**
422
+ - **ProxyId** (str) - 代理id
423
+ - **ResourceId** (str) - 代理资源id
424
+ - **State** (str) - 代理状态
425
+ - **Vip** (str) - 代理ip
426
+
427
+
428
+ """
429
+ # build request
430
+ d = {
431
+ "ProjectId": self.config.project_id,
432
+ "Region": self.config.region,
433
+ }
434
+ req and d.update(req)
435
+ d = apis.DescribeUDRedisProxyInfoRequestSchema().dumps(d)
436
+
437
+ resp = self.invoke("DescribeUDRedisProxyInfo", d, **kwargs)
438
+ return apis.DescribeUDRedisProxyInfoResponseSchema().loads(resp)
439
+
440
+ def describe_ud_redis_slowlog(
441
+ self, req: typing.Optional[dict] = None, **kwargs
442
+ ) -> dict:
443
+ """DescribeUDRedisSlowlog - 查询UDRedis慢日志
444
+
445
+ **Request**
446
+
447
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
448
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
449
+ - **InstanceId** (str) - (Required) 实例id
450
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
451
+ - **Limit** (int) - 分页显示的条目数,默认为10
452
+ - **ProxyId** (str) - 代理Id
453
+
454
+ **Response**
455
+
456
+ - **DataSet** (list) - 见 **UDRedisSlowlogSet** 模型定义
457
+ - **TotalCount** (int) - 总条目数
458
+
459
+ **Response Model**
460
+
461
+ **UDRedisSlowlogSet**
462
+ - **BlockId** (str) - 分片id
463
+ - **Client** (str) - 慢日志的的客户信息
464
+ - **Command** (str) - 查询命令
465
+ - **SpendTime** (int) - 查询消耗的时间
466
+ - **StartTime** (int) - 查询发生的时间
467
+
468
+
469
+ """
470
+ # build request
471
+ d = {
472
+ "ProjectId": self.config.project_id,
473
+ "Region": self.config.region,
474
+ }
475
+ req and d.update(req)
476
+ d = apis.DescribeUDRedisSlowlogRequestSchema().dumps(d)
477
+
478
+ resp = self.invoke("DescribeUDRedisSlowlog", d, **kwargs)
479
+ return apis.DescribeUDRedisSlowlogResponseSchema().loads(resp)
480
+
481
+ def describe_umem(
482
+ self, req: typing.Optional[dict] = None, **kwargs
483
+ ) -> dict:
484
+ """DescribeUMem - 获取UMem列表
485
+
486
+ **Request**
487
+
488
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
489
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
490
+ - **Protocol** (str) - (Required) 协议类型: memcache, redis
491
+ - **Limit** (int) - 分页显示的条目数, 默认值为20
492
+ - **Offset** (int) - 分页显示的起始偏移, 默认值为0
493
+ - **ResourceId** (str) - 资源ID
494
+ - **ResourceType** (str) -
495
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
496
+
497
+ **Response**
498
+
499
+ - **DataSet** (list) - 见 **UMemDataSet** 模型定义
500
+ - **TotalCount** (int) - 根据过滤条件得到的总数
501
+
502
+ **Response Model**
503
+
504
+ **UMemDataSet**
505
+ - **Address** (list) - 见 **UMemSpaceAddressSet** 模型定义
506
+ - **AutoBackup** (str) - 是否需要自动备份,enable,disable
507
+ - **BackupTime** (int) - 自动备份开始时间,单位小时计,范围[0-23]
508
+ - **ChargeType** (str) - 计费模式,Year, Month, Dynamic, Trial
509
+ - **ConfigId** (str) - 节点的配置ID
510
+ - **CreateTime** (int) - 创建时间
511
+ - **DataSet** (list) - 见 **UMemSlaveDataSet** 模型定义
512
+ - **ExpireTime** (int) - 到期时间
513
+ - **HighAvailability** (str) - 是否开启高可用,enable,disable
514
+ - **Name** (str) - 资源名称
515
+ - **OwnSlave** (str) - 是否拥有只读Slave“Yes” 包含“No” 不包含
516
+ - **Protocol** (str) - 协议类型: memcache, redis
517
+ - **ResourceId** (str) - 资源ID
518
+ - **ResourceType** (str) - distributed: 分布式版Redis,或者分布式Memcache;single:主备版Redis,或者单机Memcache;performance:高性能版
519
+ - **RewriteTime** (int) - 主备redis和分布式redis运维时间0 //0点1 //1点以此类推单机版memcache不返回该项
520
+ - **Role** (str) - 表示实例是主库还是从库,master,slave仅主备redis返回该项参数
521
+ - **Size** (int) - 容量单位GB
522
+ - **SlaveZone** (str) - 跨机房URedis,slave redis所在可用区,参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
523
+ - **State** (str) - 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中SetPasswordFail //设置密码失败
524
+ - **SubnetId** (str) - 子网
525
+ - **Tag** (str) - 业务组名称
526
+ - **Type** (str) - 空间类型:single(无热备),double(热备)
527
+ - **UsedSize** (int) - 使用量单位MB
528
+ - **VPCId** (str) - vpc
529
+ - **Version** (str) - Redis版本信息
530
+ - **Zone** (str) - 实例所在可用区,或者master redis所在可用区,参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
531
+
532
+
533
+ **UMemSpaceAddressSet**
534
+ - **IP** (str) - UMem实例访问IP
535
+ - **Port** (int) - UMem实例访问Port
536
+
537
+
538
+ **UMemSlaveDataSet**
539
+ - **ChargeType** (str) - 计费模式,Year, Month, Dynamic, Trial
540
+ - **ConfigId** (str) - 节点的配置ID
541
+ - **CreateTime** (int) - 创建时间
542
+ - **ExpireTime** (int) - 到期时间
543
+ - **GroupId** (str) - 资源id
544
+ - **GroupName** (str) - 资源名称
545
+ - **MasterGroupId** (str) - 主实例id
546
+ - **MemorySize** (int) - 实力大小
547
+ - **ModifyTime** (int) - 修改时间
548
+ - **Name** (str) - 资源名称
549
+ - **Port** (int) - 端口
550
+ - **ResourceType** (str) - distributed: 分布式版Redis,或者分布式Memcache;single:主备版Redis,或者单机Memcache;performance:高性能版
551
+ - **RewriteTime** (int) - 主备Redis返回运维时间 0//0点 1 //1点 以此类推
552
+ - **Role** (str) - 表示实例是主库还是从库,master,slave
553
+ - **Size** (int) - 容量单位GB
554
+ - **State** (str) - 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中SetPasswordFail //设置密码失败
555
+ - **SubnetId** (str) - 子网
556
+ - **Tag** (str) - 业务组名称
557
+ - **UsedSize** (int) - 使用量单位MB
558
+ - **VPCId** (str) - vpc
559
+ - **Version** (str) - Redis版本信息
560
+ - **VirtualIP** (str) -
561
+ - **Zone** (str) - 实例所在可用区,或者master redis所在可用区,参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
562
+
563
+
564
+ """
565
+ # build request
566
+ d = {
567
+ "ProjectId": self.config.project_id,
568
+ "Region": self.config.region,
569
+ }
570
+ req and d.update(req)
571
+ d = apis.DescribeUMemRequestSchema().dumps(d)
572
+
573
+ resp = self.invoke("DescribeUMem", d, **kwargs)
574
+ return apis.DescribeUMemResponseSchema().loads(resp)
575
+
576
+ def describe_umem_backup(
577
+ self, req: typing.Optional[dict] = None, **kwargs
578
+ ) -> dict:
579
+ """DescribeUMemBackup - 查询分布式redis备份
580
+
581
+ **Request**
582
+
583
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
584
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
585
+ - **SpaceId** (str) - (Required) 资源id
586
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
587
+ - **Limit** (int) - 分页显示的条目数, 默认值为10
588
+ - **Offset** (int) - 分页显示的起始偏移, 默认值为0
589
+
590
+ **Response**
591
+
592
+ - **DataSet** (list) - 见 **UMemBackupSet** 模型定义
593
+ - **TotalCount** (int) - 备份总数
594
+
595
+ **Response Model**
596
+
597
+ **UMemBackupSet**
598
+ - **BackupId** (str) - 空间的备份ID
599
+ - **BackupName** (str) - 备份名称
600
+ - **BackupType** (str) - 备份类型: auto(自动) ,manual(手动)
601
+ - **BlockCount** (int) - 本次备份,分片的数量
602
+ - **BlockSize** (int) - 备份大小
603
+ - **CreateTime** (int) - 创建时间
604
+ - **State** (str) - Starting:备份中 Done:完成
605
+
606
+
607
+ """
608
+ # build request
609
+ d = {
610
+ "ProjectId": self.config.project_id,
611
+ "Region": self.config.region,
612
+ }
613
+ req and d.update(req)
614
+ d = apis.DescribeUMemBackupRequestSchema().dumps(d)
615
+
616
+ resp = self.invoke("DescribeUMemBackup", d, **kwargs)
617
+ return apis.DescribeUMemBackupResponseSchema().loads(resp)
618
+
619
+ def describe_umem_backup_url(
620
+ self, req: typing.Optional[dict] = None, **kwargs
621
+ ) -> dict:
622
+ """DescribeUMemBackupURL - 获取分布式redis 备份下载链接
623
+
624
+ **Request**
625
+
626
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
627
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
628
+ - **BackupId** (str) - (Required) 备份Id
629
+ - **SpaceId** (str) - (Required) 资源id
630
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
631
+ - **BlockId** (str) - 分片id
632
+
633
+ **Response**
634
+
635
+ - **BackupURL** (list) - 备份url,每个分片一个下载URL
636
+
637
+ """
638
+ # build request
639
+ d = {
640
+ "ProjectId": self.config.project_id,
641
+ "Region": self.config.region,
642
+ }
643
+ req and d.update(req)
644
+ d = apis.DescribeUMemBackupURLRequestSchema().dumps(d)
645
+
646
+ resp = self.invoke("DescribeUMemBackupURL", d, **kwargs)
647
+ return apis.DescribeUMemBackupURLResponseSchema().loads(resp)
648
+
649
+ def describe_umem_block_info(
650
+ self, req: typing.Optional[dict] = None, **kwargs
651
+ ) -> dict:
652
+ """DescribeUMemBlockInfo - 拉取UDRedis分片信息
653
+
654
+ **Request**
655
+
656
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
657
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
658
+ - **Limit** (int) - (Required) 分页显示的条目数, 默认值为10
659
+ - **Offset** (int) - (Required) 分页显示的起始偏移, 默认值为0
660
+ - **SpaceId** (str) - (Required) UMem内存资源ID
661
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
662
+
663
+ **Response**
664
+
665
+ - **DataSet** (list) - 见 **UMemBlockInfo** 模型定义
666
+ - **ReadMode** (str) - 集群读写分离策略。 枚举值[ "Custom": 用户自定义节点权重, "Uniform": 包括主节点在内的所有节点平均读请求, "ReadOnly": 读请求均分至只读节点]
667
+
668
+ **Response Model**
669
+
670
+ **UMemBlockInfo**
671
+ - **BlockId** (str) - 分片id
672
+ - **BlockName** (str) - 分片名称
673
+ - **BlockPort** (int) - 分片端口
674
+ - **BlockReadWeight** (int) - 分片读权重
675
+ - **BlockSize** (int) - 容量单位GB
676
+ - **BlockSlotBegin** (int) - 分片维护的键槽起始值
677
+ - **BlockSlotEnd** (int) - 分片维护的键槽结束值
678
+ - **BlockState** (str) - 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中 SetPasswordFail //设置密码失败UpgradeMemInit //任务初始化
679
+ - **BlockType** (str) - 分片类型,master 或者 slave
680
+ - **BlockUsedSize** (int) - 使用量单位MB
681
+ - **BlockVip** (str) - 分片ip
682
+
683
+
684
+ """
685
+ # build request
686
+ d = {
687
+ "ProjectId": self.config.project_id,
688
+ "Region": self.config.region,
689
+ }
690
+ req and d.update(req)
691
+ d = apis.DescribeUMemBlockInfoRequestSchema().dumps(d)
692
+
693
+ resp = self.invoke("DescribeUMemBlockInfo", d, **kwargs)
694
+ return apis.DescribeUMemBlockInfoResponseSchema().loads(resp)
695
+
696
+ def describe_umem_price(
697
+ self, req: typing.Optional[dict] = None, **kwargs
698
+ ) -> dict:
699
+ """DescribeUMemPrice - 获取UMem实例价格信息
700
+
701
+ **Request**
702
+
703
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
704
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
705
+ - **Size** (int) - (Required) 购买umem大小,单位:GB,范围[1~1024]
706
+ - **Type** (str) - (Required) 空间类型:single(无热备),double(热备)(默认: double)
707
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
708
+ - **BlockCnt** (int) - umem 分片个数
709
+ - **ChargeType** (str) - Year, Month, Dynamic 如果不指定,则一次性获取三种计费
710
+ - **ClusterMode** (str) - 数据库类型,RWMode为读写分离
711
+ - **HighPerformance** (bool) - 实例类型是否为性能增强型。默认为false,或者不填,true为性能增强型。
712
+ - **ProxySize** (int) - umem 代理CPU核心数
713
+ - **Quantity** (int) - 购买UMem的时长,默认值为1
714
+ - **UlbMode** (str) - umem分布式代理类型,默认false,true为负载均衡型代理
715
+
716
+ **Response**
717
+
718
+ - **DataSet** (list) - 见 **UMemPriceSet** 模型定义
719
+
720
+ **Response Model**
721
+
722
+ **UMemPriceSet**
723
+ - **ChargeType** (str) - Year, Month, Dynamic,Trial
724
+ - **OriginalPrice** (int) - 原价
725
+ - **Price** (int) - 现价
726
+
727
+
728
+ """
729
+ # build request
730
+ d = {
731
+ "ProjectId": self.config.project_id,
732
+ "Region": self.config.region,
733
+ }
734
+ req and d.update(req)
735
+ d = apis.DescribeUMemPriceRequestSchema().dumps(d)
736
+
737
+ resp = self.invoke("DescribeUMemPrice", d, **kwargs)
738
+ return apis.DescribeUMemPriceResponseSchema().loads(resp)
739
+
740
+ def describe_umem_space(
741
+ self, req: typing.Optional[dict] = None, **kwargs
742
+ ) -> dict:
743
+ """DescribeUMemSpace - 获取UMem内存空间列表(已废弃,建议是使用DescribeUMem接口)
744
+
745
+ **Request**
746
+
747
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
748
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
749
+ - **Limit** (int) - 返回数据长度, 默认为20
750
+ - **Offset** (int) - 数据偏移量, 默认为0
751
+ - **Protocol** (str) - 协议类型: memcache, redis
752
+ - **SpaceId** (str) - 内存空间ID (无ID,则获取所有)
753
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
754
+
755
+ **Response**
756
+
757
+ - **DataSet** (list) - 见 **UMemSpaceSet** 模型定义
758
+ - **TotalCount** (int) - 根据过滤条件得到的总数
759
+
760
+ **Response Model**
761
+
762
+ **UMemSpaceSet**
763
+ - **Address** (list) - 见 **UMemSpaceAddressSet** 模型定义
764
+ - **AofRollbackEnable** (bool) - 实例是否开启了回档
765
+ - **ChargeType** (str) - Year, Month, Dynamic, Trial
766
+ - **CreateTime** (int) - 创建时间
767
+ - **ExpireTime** (int) - 到期时间
768
+ - **Name** (str) - 内存空间名称
769
+ - **Protocol** (str) - 协议类型: memcache, redis
770
+ - **RewriteTime** (int) - 运维时间0 //0点1 //1点依次类推
771
+ - **Size** (int) - 容量单位GB
772
+ - **SpaceId** (str) - 内存空间ID
773
+ - **State** (str) - Starting:创建中 Running:运行中 Fail:失败
774
+ - **SubnetId** (str) - 子网ID
775
+ - **SupportAofRollback** (bool) - 实例是否支持回档
776
+ - **Tag** (str) - 实例tag
777
+ - **Type** (str) - 空间类型:single(无热备),double(热备)
778
+ - **UsedSize** (int) - 使用量单位MB
779
+ - **VPCId** (str) - VPC ID
780
+ - **Zone** (str) - 可用区,参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
781
+
782
+
783
+ **UMemSpaceAddressSet**
784
+ - **IP** (str) - UMem实例访问IP
785
+ - **Port** (int) - UMem实例访问Port
786
+
787
+
788
+ """
789
+ # build request
790
+ d = {
791
+ "ProjectId": self.config.project_id,
792
+ "Region": self.config.region,
793
+ }
794
+ req and d.update(req)
795
+ d = apis.DescribeUMemSpaceRequestSchema().dumps(d)
796
+
797
+ resp = self.invoke("DescribeUMemSpace", d, **kwargs)
798
+ return apis.DescribeUMemSpaceResponseSchema().loads(resp)
799
+
800
+ def describe_umem_upgrade_price(
801
+ self, req: typing.Optional[dict] = None, **kwargs
802
+ ) -> dict:
803
+ """DescribeUMemUpgradePrice - 获取UMem升级价格信息
804
+
805
+ **Request**
806
+
807
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
808
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
809
+ - **Size** (int) - (Required) 购买UMem大小,单位:GB
810
+ - **SpaceId** (str) - (Required) 需要升级的空间的SpaceId
811
+ - **Type** (str) - (Required) 空间类型:single(无热备),double(热备)(默认: double)
812
+ - **BlockIds** (list) - 进行容量调整分片的分片ID(性能增强型不需要传入)
813
+ - **BlockSize** (list) - 进行容量调整的分片的目标容量,单位 GB(性能增强型不需要传入)
814
+ - **HighPerformance** (str) - 是否为性能增强型。默认为false,或者不填,true为性能增强型。
815
+ - **IsSplit** (str) - 如果是拆分按钮查询价格就填 true, 否则就填 false,默认为 false
816
+ - **NewCPU** (int) - 代理升级后CPU核数
817
+ - **ProxyId** (str) - 代理id
818
+ - **ReplicaSize** (int) - 新增读写分离节点容量大小
819
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
820
+
821
+ **Response**
822
+
823
+ - **OriginalPrice** (int) - 原价
824
+ - **Price** (int) - 价格
825
+
826
+ **Response Model**
827
+
828
+ **PriceDataSet**
829
+ - **CustomPrice** (int) -
830
+ - **PurchaseValue** (int) -
831
+ - **TotalPrice** (int) -
832
+
833
+
834
+ """
835
+ # build request
836
+ d = {
837
+ "ProjectId": self.config.project_id,
838
+ "Region": self.config.region,
839
+ }
840
+ req and d.update(req)
841
+ d = apis.DescribeUMemUpgradePriceRequestSchema().dumps(d)
842
+
843
+ resp = self.invoke("DescribeUMemUpgradePrice", d, **kwargs)
844
+ return apis.DescribeUMemUpgradePriceResponseSchema().loads(resp)
845
+
846
+ def describe_umem_cache_group(
847
+ self, req: typing.Optional[dict] = None, **kwargs
848
+ ) -> dict:
849
+ """DescribeUMemcacheGroup - 显示Memcache
850
+
851
+ **Request**
852
+
853
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
854
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
855
+ - **GroupId** (str) - 组的ID,如果指定则获取描述,否则为列表操 作,需指定Offset/Limit
856
+ - **Limit** (int) - 分页显示的条目数, 默认值为20
857
+ - **Offset** (int) - 分页显示的起始偏移, 默认值为0
858
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
859
+
860
+ **Response**
861
+
862
+ - **DataSet** (list) - 见 **UMemcacheGroupSet** 模型定义
863
+ - **TotalCount** (int) - 组的总的节点个数
864
+
865
+ **Response Model**
866
+
867
+ **UMemcacheGroupSet**
868
+ - **ChargeType** (str) - 计费类型:Year,Month,Dynamic 默认Dynamic
869
+ - **ConfigId** (str) - 节点的配置ID
870
+ - **CreateTime** (int) - 创建时间 (UNIX时间戳)
871
+ - **ExpireTime** (int) - 过期时间 (UNIX时间戳)
872
+ - **GroupId** (str) - 组ID
873
+ - **ModifyTime** (int) - 修改时间 (UNIX时间戳)
874
+ - **Name** (str) - 组名称
875
+ - **Port** (int) - 节点分配的服务端口
876
+ - **Size** (int) - 容量单位GB
877
+ - **State** (str) - 状态标记 Creating // 初始化中 CreateFail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中
878
+ - **SubnetId** (str) -
879
+ - **Tag** (str) - 业务组名称
880
+ - **UsedSize** (int) - 使用量单位MB
881
+ - **VPCId** (str) -
882
+ - **Version** (str) - Memcache版本信息,默认为1.4.31
883
+ - **VirtualIP** (str) - 节点的虚拟IP地址
884
+
885
+
886
+ """
887
+ # build request
888
+ d = {
889
+ "ProjectId": self.config.project_id,
890
+ "Region": self.config.region,
891
+ }
892
+ req and d.update(req)
893
+ d = apis.DescribeUMemcacheGroupRequestSchema().dumps(d)
894
+
895
+ resp = self.invoke("DescribeUMemcacheGroup", d, **kwargs)
896
+ return apis.DescribeUMemcacheGroupResponseSchema().loads(resp)
897
+
898
+ def describe_umem_cache_price(
899
+ self, req: typing.Optional[dict] = None, **kwargs
900
+ ) -> dict:
901
+ """DescribeUMemcachePrice - 获取umemcache组价格信息
902
+
903
+ **Request**
904
+
905
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
906
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
907
+ - **Size** (int) - (Required) 容量大小,单位:GB 取值范围[1-32]
908
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
909
+ - **ChargeType** (str) - 计费模式,Year, Month, Dynamic,默认: Dynamic 默认: 获取所有计费模式的价格
910
+ - **Quantity** (int) - 购买umemcache的时长,默认值为1
911
+ - **Type** (str) - 空间类型:single(无热备),double(热备)(默认: double)
912
+
913
+ **Response**
914
+
915
+ - **DataSet** (list) - 见 **UMemcachePriceSet** 模型定义
916
+
917
+ **Response Model**
918
+
919
+ **UMemcachePriceSet**
920
+ - **ChargeType** (str) - 计费模式,Year, Month, Dynamic
921
+ - **ListPrice** (int) - 产品列表价
922
+ - **OriginalPrice** (int) - 原价
923
+ - **Price** (int) - 总价格
924
+
925
+
926
+ """
927
+ # build request
928
+ d = {
929
+ "ProjectId": self.config.project_id,
930
+ "Region": self.config.region,
931
+ }
932
+ req and d.update(req)
933
+ d = apis.DescribeUMemcachePriceRequestSchema().dumps(d)
934
+
935
+ resp = self.invoke("DescribeUMemcachePrice", d, **kwargs)
936
+ return apis.DescribeUMemcachePriceResponseSchema().loads(resp)
937
+
938
+ def describe_umem_cache_upgrade_price(
939
+ self, req: typing.Optional[dict] = None, **kwargs
940
+ ) -> dict:
941
+ """DescribeUMemcacheUpgradePrice - 获取umemcache升级价格信息
942
+
943
+ **Request**
944
+
945
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
946
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
947
+ - **GroupId** (str) - (Required) 需要升级的空间的GroupId,请参考DescribeUMemcacheGroup接口
948
+ - **Size** (int) - (Required) 购买umemcache大小,单位:GB
949
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
950
+
951
+ **Response**
952
+
953
+ - **ListPrice** (int) - 列表价格
954
+ - **OriginalPrice** (int) - 原价
955
+ - **Price** (int) - 价格
956
+
957
+ """
958
+ # build request
959
+ d = {
960
+ "ProjectId": self.config.project_id,
961
+ "Region": self.config.region,
962
+ }
963
+ req and d.update(req)
964
+ d = apis.DescribeUMemcacheUpgradePriceRequestSchema().dumps(d)
965
+
966
+ resp = self.invoke("DescribeUMemcacheUpgradePrice", d, **kwargs)
967
+ return apis.DescribeUMemcacheUpgradePriceResponseSchema().loads(resp)
968
+
969
+ def describe_uredis_backup(
970
+ self, req: typing.Optional[dict] = None, **kwargs
971
+ ) -> dict:
972
+ """DescribeURedisBackup - 查询主备redis备份
973
+
974
+ **Request**
975
+
976
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
977
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
978
+ - **GroupId** (str) - (Required) 组的ID
979
+ - **Limit** (int) - 分页显示的条目数, 默认值为10
980
+ - **Offset** (int) - 分页显示的起始偏移, 默认值为0
981
+ - **SlaveZone** (str) - 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同)
982
+
983
+ **Response**
984
+
985
+ - **DataSet** (list) - 见 **URedisBackupSet** 模型定义
986
+ - **TotalCount** (int) - 用户名下总的备份个数
987
+
988
+ **Response Model**
989
+
990
+ **URedisBackupSet**
991
+ - **BackupId** (str) - 备份ID
992
+ - **BackupName** (str) - 备份的名称
993
+ - **BackupSize** (int) - 备份文件大小, 以字节为单位
994
+ - **BackupTime** (int) - 备份时间 (UNIX时间戳)
995
+ - **BackupType** (str) - 备份类型: Manual 手动 Auto 自动
996
+ - **GroupId** (str) - 对应的实例ID
997
+ - **GroupName** (str) - 组名称
998
+ - **State** (str) - 备份的状态: Backuping 备份中 Success 备份成功 Error 备份失败 Expired 备份过期
999
+ - **Zone** (str) - 可用区,参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1000
+
1001
+
1002
+ """
1003
+ # build request
1004
+ d = {
1005
+ "ProjectId": self.config.project_id,
1006
+ "Region": self.config.region,
1007
+ }
1008
+ req and d.update(req)
1009
+ d = apis.DescribeURedisBackupRequestSchema().dumps(d)
1010
+
1011
+ resp = self.invoke("DescribeURedisBackup", d, **kwargs)
1012
+ return apis.DescribeURedisBackupResponseSchema().loads(resp)
1013
+
1014
+ def describe_uredis_backup_url(
1015
+ self, req: typing.Optional[dict] = None, **kwargs
1016
+ ) -> dict:
1017
+ """DescribeURedisBackupURL - 获取主备Redis备份下载链接
1018
+
1019
+ **Request**
1020
+
1021
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1022
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1023
+ - **BackupId** (str) - (Required) 备份ID
1024
+ - **GroupId** (str) - 实例ID
1025
+ - **RegionFlag** (bool) - 是否是跨机房URedis(默认false)
1026
+ - **SlaveZone** (str) - 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同)
1027
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1028
+
1029
+ **Response**
1030
+
1031
+ - **BackupPath** (str) - 备份文件公网的地址
1032
+ - **BackupURL** (str) - [即将下线,请使用BackupPath]
1033
+
1034
+ """
1035
+ # build request
1036
+ d = {
1037
+ "ProjectId": self.config.project_id,
1038
+ "Region": self.config.region,
1039
+ }
1040
+ req and d.update(req)
1041
+ d = apis.DescribeURedisBackupURLRequestSchema().dumps(d)
1042
+
1043
+ resp = self.invoke("DescribeURedisBackupURL", d, **kwargs)
1044
+ return apis.DescribeURedisBackupURLResponseSchema().loads(resp)
1045
+
1046
+ def describe_uredis_config(
1047
+ self, req: typing.Optional[dict] = None, **kwargs
1048
+ ) -> dict:
1049
+ """DescribeURedisConfig - 查询主备Redis所有配置文件
1050
+
1051
+ **Request**
1052
+
1053
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1054
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1055
+ - **RegionFlag** (bool) - (Required) 是否是跨机房URedis(默认false)
1056
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1057
+ - **ConfigId** (str) - 配置文件ID
1058
+ - **Limit** (int) - 页显示的条目数, 默认值为10
1059
+ - **Offset** (int) - 页显示的起始偏移, 默认值为0
1060
+ - **Version** (str) - Redis版本号
1061
+
1062
+ **Response**
1063
+
1064
+ - **DataSet** (list) - 见 **URedisConfigSet** 模型定义
1065
+ - **TotalCount** (int) - 根据过滤条件得到的总数
1066
+
1067
+ **Response Model**
1068
+
1069
+ **URedisConfigSet**
1070
+ - **ConfigId** (str) - 配置ID
1071
+ - **CreateTime** (int) - 创建时间 (UNIX时间戳)
1072
+ - **Description** (str) - 配置描述
1073
+ - **IsModify** (str) - 置是否可以修改
1074
+ - **ModifyTime** (int) - 修改时间 (UNIX时间戳)
1075
+ - **Name** (str) - 配置名称
1076
+ - **RegionFlag** (bool) - 是否是跨机房URedis(默认false)
1077
+ - **State** (str) - 配置所处的状态
1078
+ - **Version** (str) - 配置对应的Redis版本
1079
+ - **Zone** (str) - Zone
1080
+
1081
+
1082
+ """
1083
+ # build request
1084
+ d = {
1085
+ "ProjectId": self.config.project_id,
1086
+ "Region": self.config.region,
1087
+ }
1088
+ req and d.update(req)
1089
+ d = apis.DescribeURedisConfigRequestSchema().dumps(d)
1090
+
1091
+ resp = self.invoke("DescribeURedisConfig", d, **kwargs)
1092
+ return apis.DescribeURedisConfigResponseSchema().loads(resp)
1093
+
1094
+ def describe_uredis_group(
1095
+ self, req: typing.Optional[dict] = None, **kwargs
1096
+ ) -> dict:
1097
+ """DescribeURedisGroup - 查询主备Redis(已废弃,建议使用DescribeUMem)
1098
+
1099
+ **Request**
1100
+
1101
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1102
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1103
+ - **GroupId** (str) - 组的ID,如果指定则获取描述,否则为列表操 作,需指定Offset/Limit
1104
+ - **Limit** (int) - 分页显示的条目数, 默认值为20
1105
+ - **Offset** (int) - 分页显示的起始偏移, 默认值为0
1106
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1107
+
1108
+ **Response**
1109
+
1110
+ - **DataSet** (list) - 见 **URedisGroupSet** 模型定义
1111
+ - **TotalCount** (int) - 组的总的节点个数
1112
+
1113
+ **Response Model**
1114
+
1115
+ **URedisGroupSet**
1116
+ - **AutoBackup** (str) - 是否需要自动备份,enable,disable
1117
+ - **BackupTime** (int) - 组自动备份开始时间,单位小时计,范围[0-23]
1118
+ - **ChargeType** (str) - 计费类型:Year,Month,Dynamic 默认Dynamic
1119
+ - **ConfigId** (str) - 节点的配置ID
1120
+ - **CreateTime** (int) - 创建时间 (UNIX时间戳)
1121
+ - **ExpireTime** (int) - 过期时间 (UNIX时间戳)
1122
+ - **GroupId** (str) - 组ID
1123
+ - **GroupName** (str) - [即将下线,请使用Name] 组名称
1124
+ - **HighAvailability** (str) - 是否开启高可用,enable,disable
1125
+ - **IsHighPerformance** (bool) - 是否是高性能Redis, true表示是; false表示否
1126
+ - **MemorySize** (int) - [即将下线,请使用Size] 容量单位GB
1127
+ - **ModifyTime** (int) - 修改时间 (UNIX时间戳)
1128
+ - **Name** (str) - 组名称
1129
+ - **Port** (int) - 节点分配的服务端口
1130
+ - **Protocol** (str) - 协议
1131
+ - **RewriteTime** (int) - 返回运维时间 0 //0点 1 //1点 以此类推
1132
+ - **Role** (str) - 实例类型
1133
+ - **SSLCertExpireTime** (int) - 证书过期时间
1134
+ - **SSLEnable** (bool) - 实例是否开启SSL
1135
+ - **SSLVersion** (str) - SSL版本
1136
+ - **SecPolicy** (int) - 安全策略。1:内网隔离,2:加密通信,3:内网隔离+加密通信
1137
+ - **Size** (int) - 容量单位GB
1138
+ - **SlaveZone** (str) - 跨机房URedis,slave redis所在可用区,参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1139
+ - **State** (str) - 状态标记 Creating // 初始化中 CreateFail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败// 修改SSL中SSLSwitching //SSLSwitchFail修改SSL失败
1140
+ - **SubnetId** (str) - subnetid
1141
+ - **Tag** (str) - 业务组名称
1142
+ - **Type** (str) - 空间类型:single(无热备),double(热备)
1143
+ - **UsedSize** (int) - 使用量单位MB
1144
+ - **VPCId** (str) - vpcid
1145
+ - **Version** (str) - Redis版本信息
1146
+ - **VirtualIP** (str) - 节点的虚拟IP地址
1147
+ - **Zone** (str) - 实例所在可用区,或者master redis所在可用区,参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1148
+
1149
+
1150
+ """
1151
+ # build request
1152
+ d = {
1153
+ "ProjectId": self.config.project_id,
1154
+ "Region": self.config.region,
1155
+ }
1156
+ req and d.update(req)
1157
+ d = apis.DescribeURedisGroupRequestSchema().dumps(d)
1158
+
1159
+ resp = self.invoke("DescribeURedisGroup", d, **kwargs)
1160
+ return apis.DescribeURedisGroupResponseSchema().loads(resp)
1161
+
1162
+ def describe_uredis_price(
1163
+ self, req: typing.Optional[dict] = None, **kwargs
1164
+ ) -> dict:
1165
+ """DescribeURedisPrice - 获取URedis价格信息
1166
+
1167
+ **Request**
1168
+
1169
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1170
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1171
+ - **Size** (int) - (Required) 量大小,单位:GB 取值范围[1-32]
1172
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1173
+ - **ChargeType** (str) - 计费模式,Year, Month, Dynamic;如果不指定,则一次性获取三种计费
1174
+ - **HighPerformance** (bool) - 查询高性能Redis, 默认为false, 或者不填, 查询高性能为true
1175
+ - **ProductType** (str) - 产品类型:MS_Redis(标准主备版),S_Redis(从库),默认为MS_Redis
1176
+ - **Quantity** (int) - 计费模式为Dynamic时,购买的时长, 默认为1
1177
+ - **RegionFlag** (bool) - 是否是跨机房URedis(默认false)
1178
+
1179
+ **Response**
1180
+
1181
+ - **DataSet** (list) - 见 **URedisPriceSet** 模型定义
1182
+
1183
+ **Response Model**
1184
+
1185
+ **URedisPriceSet**
1186
+ - **ChargeType** (str) - Year, Month, Dynamic,Trial
1187
+ - **ListPrice** (int) - 产品列表价
1188
+ - **OriginalPrice** (int) - 原价
1189
+ - **Price** (int) - 总价格
1190
+
1191
+
1192
+ """
1193
+ # build request
1194
+ d = {
1195
+ "ProjectId": self.config.project_id,
1196
+ "Region": self.config.region,
1197
+ }
1198
+ req and d.update(req)
1199
+ d = apis.DescribeURedisPriceRequestSchema().dumps(d)
1200
+
1201
+ resp = self.invoke("DescribeURedisPrice", d, **kwargs)
1202
+ return apis.DescribeURedisPriceResponseSchema().loads(resp)
1203
+
1204
+ def describe_uredis_slowlog(
1205
+ self, req: typing.Optional[dict] = None, **kwargs
1206
+ ) -> dict:
1207
+ """DescribeURedisSlowlog - 查询URedis慢日志
1208
+
1209
+ **Request**
1210
+
1211
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1212
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1213
+ - **GroupId** (str) - (Required) 资源ID
1214
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1215
+ - **Limit** (int) - 分页显示的条目数,默认为10
1216
+
1217
+ **Response**
1218
+
1219
+ - **DataSet** (list) - 见 **URedisSlowlogSet** 模型定义
1220
+ - **TotalCount** (int) - 总条目数
1221
+
1222
+ **Response Model**
1223
+
1224
+ **URedisSlowlogSet**
1225
+ - **Command** (str) - 查询命令
1226
+ - **SpendTime** (int) - 查询消耗的时间
1227
+ - **StartTime** (int) - 查询发生的时间
1228
+
1229
+
1230
+ """
1231
+ # build request
1232
+ d = {
1233
+ "ProjectId": self.config.project_id,
1234
+ "Region": self.config.region,
1235
+ }
1236
+ req and d.update(req)
1237
+ d = apis.DescribeURedisSlowlogRequestSchema().dumps(d)
1238
+
1239
+ resp = self.invoke("DescribeURedisSlowlog", d, **kwargs)
1240
+ return apis.DescribeURedisSlowlogResponseSchema().loads(resp)
1241
+
1242
+ def describe_uredis_upgrade_price(
1243
+ self, req: typing.Optional[dict] = None, **kwargs
1244
+ ) -> dict:
1245
+ """DescribeURedisUpgradePrice - 获取uredis升级价格信息
1246
+
1247
+ **Request**
1248
+
1249
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1250
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1251
+ - **GroupId** (str) - (Required) 要升级的空间的GroupId,请参考DescribeURedisGroup接口
1252
+ - **Size** (int) - (Required) 购买uredis大小,单位:GB,范围是[1-32]
1253
+ - **HighPerformance** (bool) - 查询高性能Redis, 默认为false, 或者不填, 查询高性能为true
1254
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1255
+
1256
+ **Response**
1257
+
1258
+ - **OriginalPrice** (int) - 原价
1259
+ - **Price** (float) - 价格
1260
+
1261
+ """
1262
+ # build request
1263
+ d = {
1264
+ "ProjectId": self.config.project_id,
1265
+ "Region": self.config.region,
1266
+ }
1267
+ req and d.update(req)
1268
+ d = apis.DescribeURedisUpgradePriceRequestSchema().dumps(d)
1269
+
1270
+ resp = self.invoke("DescribeURedisUpgradePrice", d, **kwargs)
1271
+ return apis.DescribeURedisUpgradePriceResponseSchema().loads(resp)
1272
+
1273
+ def describe_uredis_version(
1274
+ self, req: typing.Optional[dict] = None, **kwargs
1275
+ ) -> dict:
1276
+ """DescribeURedisVersion - 获取主Redis可用版本
1277
+
1278
+ **Request**
1279
+
1280
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1281
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1282
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1283
+
1284
+ **Response**
1285
+
1286
+ - **DataSet** (list) - 见 **URedisVersionSet** 模型定义
1287
+ - **TotalCount** (int) - 总版本个数
1288
+
1289
+ **Response Model**
1290
+
1291
+ **URedisVersionSet**
1292
+ - **Version** (str) - Redis版本
1293
+
1294
+
1295
+ """
1296
+ # build request
1297
+ d = {
1298
+ "ProjectId": self.config.project_id,
1299
+ "Region": self.config.region,
1300
+ }
1301
+ req and d.update(req)
1302
+ d = apis.DescribeURedisVersionRequestSchema().dumps(d)
1303
+
1304
+ resp = self.invoke("DescribeURedisVersion", d, **kwargs)
1305
+ return apis.DescribeURedisVersionResponseSchema().loads(resp)
1306
+
1307
+ def flushall_uredis_group(
1308
+ self, req: typing.Optional[dict] = None, **kwargs
1309
+ ) -> dict:
1310
+ """FlushallURedisGroup - 清除主备redis数据
1311
+
1312
+ **Request**
1313
+
1314
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1315
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1316
+ - **FlushType** (str) - (Required) FlushDb或FlushAll
1317
+ - **GroupId** (str) - (Required) 组的ID
1318
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1319
+ - **DbNum** (int) - 清空的db,FlushType为FlushDb,此项为必传项
1320
+ - **OrganizationId** (int) - OrganizationId
1321
+ - **SlaveZone** (str) - 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同)
1322
+ - **TopOrganizationId** (int) - company_id
1323
+
1324
+ **Response**
1325
+
1326
+
1327
+ """
1328
+ # build request
1329
+ d = {
1330
+ "ProjectId": self.config.project_id,
1331
+ "Region": self.config.region,
1332
+ }
1333
+ req and d.update(req)
1334
+ d = apis.FlushallURedisGroupRequestSchema().dumps(d)
1335
+
1336
+ resp = self.invoke("FlushallURedisGroup", d, **kwargs)
1337
+ return apis.FlushallURedisGroupResponseSchema().loads(resp)
1338
+
1339
+ def get_umem_space_state(
1340
+ self, req: typing.Optional[dict] = None, **kwargs
1341
+ ) -> dict:
1342
+ """GetUMemSpaceState - 获取UMem内存空间列表
1343
+
1344
+ **Request**
1345
+
1346
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1347
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1348
+ - **SpaceId** (str) - (Required) 内存空间ID
1349
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1350
+
1351
+ **Response**
1352
+
1353
+ - **State** (str) - Starting:创建中 Running:运行中 Fail:失败
1354
+
1355
+ """
1356
+ # build request
1357
+ d = {
1358
+ "ProjectId": self.config.project_id,
1359
+ "Region": self.config.region,
1360
+ }
1361
+ req and d.update(req)
1362
+ d = apis.GetUMemSpaceStateRequestSchema().dumps(d)
1363
+
1364
+ resp = self.invoke("GetUMemSpaceState", d, **kwargs)
1365
+ return apis.GetUMemSpaceStateResponseSchema().loads(resp)
1366
+
1367
+ def i_solation_uredis_group(
1368
+ self, req: typing.Optional[dict] = None, **kwargs
1369
+ ) -> dict:
1370
+ """ISolationURedisGroup - 打开/关闭URedis
1371
+
1372
+ **Request**
1373
+
1374
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1375
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1376
+ - **GroupId** (str) - (Required) 组的ID
1377
+ - **TransformType** (str) - (Required) UNBind(关闭)或Bind(打开)
1378
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1379
+ - **SlaveZone** (str) - 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同)
1380
+
1381
+ **Response**
1382
+
1383
+
1384
+ """
1385
+ # build request
1386
+ d = {
1387
+ "ProjectId": self.config.project_id,
1388
+ "Region": self.config.region,
1389
+ }
1390
+ req and d.update(req)
1391
+ d = apis.ISolationURedisGroupRequestSchema().dumps(d)
1392
+
1393
+ resp = self.invoke("ISolationURedisGroup", d, **kwargs)
1394
+ return apis.ISolationURedisGroupResponseSchema().loads(resp)
1395
+
1396
+ def modify_umem_space_name(
1397
+ self, req: typing.Optional[dict] = None, **kwargs
1398
+ ) -> dict:
1399
+ """ModifyUMemSpaceName - 修改UMem内存空间名称
1400
+
1401
+ **Request**
1402
+
1403
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1404
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1405
+ - **Name** (str) - (Required) 新的名称,长度(6<=size<=63)
1406
+ - **SpaceId** (str) - (Required) UMem内存空间ID
1407
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1408
+
1409
+ **Response**
1410
+
1411
+
1412
+ """
1413
+ # build request
1414
+ d = {
1415
+ "ProjectId": self.config.project_id,
1416
+ "Region": self.config.region,
1417
+ }
1418
+ req and d.update(req)
1419
+ d = apis.ModifyUMemSpaceNameRequestSchema().dumps(d)
1420
+
1421
+ resp = self.invoke("ModifyUMemSpaceName", d, **kwargs)
1422
+ return apis.ModifyUMemSpaceNameResponseSchema().loads(resp)
1423
+
1424
+ def modify_uredis_config(
1425
+ self, req: typing.Optional[dict] = None, **kwargs
1426
+ ) -> dict:
1427
+ """ModifyURedisConfig - 修改主备Redis配置文件参数
1428
+
1429
+ **Request**
1430
+
1431
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1432
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1433
+ - **ConfigId** (str) - (Required) 配置文件的ID
1434
+ - **Key** (str) - (Required) 参数名称
1435
+ - **Value** (str) - (Required) 对应参数的值
1436
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1437
+ - **GroupId** (str) - 如果实例使用默认配置创建,修改配置信息需要填写GroupId
1438
+ - **RegionFlag** (bool) - 是否是跨机房URedis(默认false)
1439
+
1440
+ **Response**
1441
+
1442
+
1443
+ """
1444
+ # build request
1445
+ d = {
1446
+ "ProjectId": self.config.project_id,
1447
+ "Region": self.config.region,
1448
+ }
1449
+ req and d.update(req)
1450
+ d = apis.ModifyURedisConfigRequestSchema().dumps(d)
1451
+
1452
+ resp = self.invoke("ModifyURedisConfig", d, **kwargs)
1453
+ return apis.ModifyURedisConfigResponseSchema().loads(resp)
1454
+
1455
+ def modify_uredis_group_name(
1456
+ self, req: typing.Optional[dict] = None, **kwargs
1457
+ ) -> dict:
1458
+ """ModifyURedisGroupName - 修改主备redis名称
1459
+
1460
+ **Request**
1461
+
1462
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1463
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1464
+ - **GroupId** (str) - (Required) 组的ID
1465
+ - **Name** (str) - (Required) Redis组名称 (范围[6-63],只能包含英文、数字以及符号-和_)
1466
+
1467
+ **Response**
1468
+
1469
+
1470
+ """
1471
+ # build request
1472
+ d = {
1473
+ "ProjectId": self.config.project_id,
1474
+ "Region": self.config.region,
1475
+ }
1476
+ req and d.update(req)
1477
+ d = apis.ModifyURedisGroupNameRequestSchema().dumps(d)
1478
+
1479
+ resp = self.invoke("ModifyURedisGroupName", d, **kwargs)
1480
+ return apis.ModifyURedisGroupNameResponseSchema().loads(resp)
1481
+
1482
+ def modify_uredis_group_password(
1483
+ self, req: typing.Optional[dict] = None, **kwargs
1484
+ ) -> dict:
1485
+ """ModifyURedisGroupPassword - 修改主备密码/重置密码
1486
+
1487
+ **Request**
1488
+
1489
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1490
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1491
+ - **GroupId** (str) - (Required) 组的ID
1492
+ - **Password** (str) - (Required) 新密码字符串,要求长度为6~36个字符,且只能包含英文、数字以及-和下划线;并且需要base64加密;如要取消密码,此值为空字符串,
1493
+ - **ResourceType** (str) -
1494
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1495
+
1496
+ **Response**
1497
+
1498
+
1499
+ """
1500
+ # build request
1501
+ d = {
1502
+ "ProjectId": self.config.project_id,
1503
+ "Region": self.config.region,
1504
+ }
1505
+ req and d.update(req)
1506
+ d = apis.ModifyURedisGroupPasswordRequestSchema().dumps(d)
1507
+
1508
+ resp = self.invoke("ModifyURedisGroupPassword", d, **kwargs)
1509
+ return apis.ModifyURedisGroupPasswordResponseSchema().loads(resp)
1510
+
1511
+ def register_umem_defrag(
1512
+ self, req: typing.Optional[dict] = None, **kwargs
1513
+ ) -> dict:
1514
+ """RegisterUMemDefrag - 动态开关redis碎片整理选项
1515
+
1516
+ **Request**
1517
+
1518
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1519
+ - **ResourceId** (str) - (Required) 资源ID
1520
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1521
+ - **EndHour** (int) - 结束整点数值(分布式实例该参数无效)。
1522
+ - **EndMin** (int) - 结束分钟数(分布式实例该参数无效)。
1523
+ - **EndTime** (int) - 关闭时间戳
1524
+ - **FragSize** (int) - 碎片整理阈值,范围为 100-200(分布式实例该参数无效)。
1525
+ - **FragTime** (int) - 任务时间周期,单位为分钟。
1526
+ - **IsUnion** (bool) - AND逻辑字段,表示 阈值和时间段都满足(分布式实例该参数无效)。
1527
+ - **OperateType** (str) - 操作类型:“Once”: 表示单次执行, “Open”:表示开启策略“Close”: 表示关闭策略(分布式实例只支持Once)。
1528
+ - **StartHour** (int) - 开始整点数值(分布式实例该参数无效)。
1529
+ - **StartMin** (int) - 开始分钟数(分布式实例该参数无效)。
1530
+ - **StartTime** (int) - 开始时间戳
1531
+
1532
+ **Response**
1533
+
1534
+
1535
+ """
1536
+ # build request
1537
+ d = {
1538
+ "Region": self.config.region,
1539
+ }
1540
+ req and d.update(req)
1541
+ d = apis.RegisterUMemDefragRequestSchema().dumps(d)
1542
+
1543
+ # build options
1544
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
1545
+
1546
+ resp = self.invoke("RegisterUMemDefrag", d, **kwargs)
1547
+ return apis.RegisterUMemDefragResponseSchema().loads(resp)
1548
+
1549
+ def remove_ud_redis_data(
1550
+ self, req: typing.Optional[dict] = None, **kwargs
1551
+ ) -> dict:
1552
+ """RemoveUDRedisData - 清除udredis实例数据
1553
+
1554
+ **Request**
1555
+
1556
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1557
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1558
+ - **SpaceId** (str) - (Required) 实例id
1559
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1560
+
1561
+ **Response**
1562
+
1563
+
1564
+ """
1565
+ # build request
1566
+ d = {
1567
+ "ProjectId": self.config.project_id,
1568
+ "Region": self.config.region,
1569
+ }
1570
+ req and d.update(req)
1571
+ d = apis.RemoveUDRedisDataRequestSchema().dumps(d)
1572
+
1573
+ resp = self.invoke("RemoveUDRedisData", d, **kwargs)
1574
+ return apis.RemoveUDRedisDataResponseSchema().loads(resp)
1575
+
1576
+ def resize_ud_redis_block_size(
1577
+ self, req: typing.Optional[dict] = None, **kwargs
1578
+ ) -> dict:
1579
+ """ResizeUDRedisBlockSize - 更改udredis分片容量
1580
+
1581
+ **Request**
1582
+
1583
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1584
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1585
+ - **BlockId** (str) - (Required) 分片id
1586
+ - **BlockSize** (int) - (Required) 分片容量(单位GB)4/8/12/16/20
1587
+ - **SpaceId** (str) - (Required) spaceid
1588
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1589
+ - **HighPerformance** (bool) - 是否为性能增强型。默认为false,或者不填,true为性能增强型。
1590
+ - **StartTime** (int) - 任务执行时间戳,时间戳需满足未来一天时间范围内。默认不传或者值为0时,即为立即执行
1591
+
1592
+ **Response**
1593
+
1594
+
1595
+ """
1596
+ # build request
1597
+ d = {
1598
+ "ProjectId": self.config.project_id,
1599
+ "Region": self.config.region,
1600
+ }
1601
+ req and d.update(req)
1602
+ d = apis.ResizeUDRedisBlockSizeRequestSchema().dumps(d)
1603
+
1604
+ resp = self.invoke("ResizeUDRedisBlockSize", d, **kwargs)
1605
+ return apis.ResizeUDRedisBlockSizeResponseSchema().loads(resp)
1606
+
1607
+ def resize_umem_space(
1608
+ self, req: typing.Optional[dict] = None, **kwargs
1609
+ ) -> dict:
1610
+ """ResizeUMemSpace - 调整内存空间容量,只支持存量老分布式产品,不支持高性能分布式。(已废弃,不建议使用)
1611
+
1612
+ **Request**
1613
+
1614
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1615
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1616
+ - **Size** (int) - (Required) 内存大小, 单位:GB (需要大于原size,<= 1024)
1617
+ - **SpaceId** (str) - (Required) UMem 内存空间Id
1618
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1619
+ - **CouponId** (str) - 使用的代金券Id
1620
+ - **Type** (str) - 空间类型:single(无热备),double(热备)(默认: double)
1621
+
1622
+ **Response**
1623
+
1624
+
1625
+ """
1626
+ # build request
1627
+ d = {
1628
+ "ProjectId": self.config.project_id,
1629
+ "Region": self.config.region,
1630
+ }
1631
+ req and d.update(req)
1632
+ d = apis.ResizeUMemSpaceRequestSchema().dumps(d)
1633
+
1634
+ resp = self.invoke("ResizeUMemSpace", d, **kwargs)
1635
+ return apis.ResizeUMemSpaceResponseSchema().loads(resp)
1636
+
1637
+ def resize_uredis_group(
1638
+ self, req: typing.Optional[dict] = None, **kwargs
1639
+ ) -> dict:
1640
+ """ResizeURedisGroup - 通过调用CheckURedisAllowance接口,检查资源情况,根据不同情形来调整主备redis容量,其中主要包括可用区资源不足无法扩容,主备所在宿主机资源不足需要迁移完成扩容(需要主从切换,会闪断及负载升高),以及直接扩容(业务无感知)
1641
+
1642
+ **Request**
1643
+
1644
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1645
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1646
+ - **GroupId** (str) - (Required) 组ID
1647
+ - **Size** (int) - (Required) 内存大小, 单位:GB (需要大于原size,且小于等于32) 目前仅支持1/2/4/8/16/32 G 六种容量规格
1648
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1649
+ - **ChargeType** (str) - 计费类型
1650
+ - **CouponId** (int) - 代金券ID 请参考DescribeCoupon接口
1651
+ - **HighPerformance** (bool) - 高性能Redis, 默认为false, 或者不填, 高性能为true
1652
+ - **StartTime** (int) - 任务执行时间戳,默认为0或者不传时,为立即执行,传入时间需满足未来一天范围
1653
+ - **Type** (str) - 空间类型:single(无热备),double(热备)(默认: double)
1654
+
1655
+ **Response**
1656
+
1657
+
1658
+ """
1659
+ # build request
1660
+ d = {
1661
+ "ProjectId": self.config.project_id,
1662
+ "Region": self.config.region,
1663
+ }
1664
+ req and d.update(req)
1665
+ d = apis.ResizeURedisGroupRequestSchema().dumps(d)
1666
+
1667
+ resp = self.invoke("ResizeURedisGroup", d, **kwargs)
1668
+ return apis.ResizeURedisGroupResponseSchema().loads(resp)
1669
+
1670
+ def restart_umem_cache_group(
1671
+ self, req: typing.Optional[dict] = None, **kwargs
1672
+ ) -> dict:
1673
+ """RestartUMemcacheGroup - 重启单机Memcache
1674
+
1675
+ **Request**
1676
+
1677
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1678
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1679
+ - **GroupId** (str) - (Required) 组的ID
1680
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1681
+
1682
+ **Response**
1683
+
1684
+
1685
+ """
1686
+ # build request
1687
+ d = {
1688
+ "ProjectId": self.config.project_id,
1689
+ "Region": self.config.region,
1690
+ }
1691
+ req and d.update(req)
1692
+ d = apis.RestartUMemcacheGroupRequestSchema().dumps(d)
1693
+
1694
+ resp = self.invoke("RestartUMemcacheGroup", d, **kwargs)
1695
+ return apis.RestartUMemcacheGroupResponseSchema().loads(resp)
1696
+
1697
+ def restart_uredis_group(
1698
+ self, req: typing.Optional[dict] = None, **kwargs
1699
+ ) -> dict:
1700
+ """RestartURedisGroup - 重启主备实例
1701
+
1702
+ **Request**
1703
+
1704
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1705
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1706
+ - **GroupId** (str) - (Required) 资源ID
1707
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1708
+
1709
+ **Response**
1710
+
1711
+
1712
+ """
1713
+ # build request
1714
+ d = {
1715
+ "ProjectId": self.config.project_id,
1716
+ "Region": self.config.region,
1717
+ }
1718
+ req and d.update(req)
1719
+ d = apis.RestartURedisGroupRequestSchema().dumps(d)
1720
+
1721
+ resp = self.invoke("RestartURedisGroup", d, **kwargs)
1722
+ return apis.RestartURedisGroupResponseSchema().loads(resp)
1723
+
1724
+ def shutdown_uredis_group(
1725
+ self, req: typing.Optional[dict] = None, **kwargs
1726
+ ) -> dict:
1727
+ """ShutdownURedisGroup - 关闭主备实例
1728
+
1729
+ **Request**
1730
+
1731
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1732
+ - **GroupId** (str) - (Required) 资源ID
1733
+
1734
+ **Response**
1735
+
1736
+
1737
+ """
1738
+ # build request
1739
+ d = {
1740
+ "Region": self.config.region,
1741
+ }
1742
+ req and d.update(req)
1743
+ d = apis.ShutdownURedisGroupRequestSchema().dumps(d)
1744
+
1745
+ resp = self.invoke("ShutdownURedisGroup", d, **kwargs)
1746
+ return apis.ShutdownURedisGroupResponseSchema().loads(resp)
1747
+
1748
+ def start_uredis_group(
1749
+ self, req: typing.Optional[dict] = None, **kwargs
1750
+ ) -> dict:
1751
+ """StartURedisGroup - 实例关闭状态下,启动实例
1752
+
1753
+ **Request**
1754
+
1755
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1756
+ - **GroupId** (str) - (Required) 资源ID
1757
+
1758
+ **Response**
1759
+
1760
+
1761
+ """
1762
+ # build request
1763
+ d = {
1764
+ "Region": self.config.region,
1765
+ }
1766
+ req and d.update(req)
1767
+ d = apis.StartURedisGroupRequestSchema().dumps(d)
1768
+
1769
+ resp = self.invoke("StartURedisGroup", d, **kwargs)
1770
+ return apis.StartURedisGroupResponseSchema().loads(resp)
1771
+
1772
+ def update_uredis_backup_strategy(
1773
+ self, req: typing.Optional[dict] = None, **kwargs
1774
+ ) -> dict:
1775
+ """UpdateURedisBackupStrategy - URedisBackupStrategy
1776
+
1777
+ **Request**
1778
+
1779
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1780
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1781
+ - **BackupTime** (str) - (Required) 备份时间,默认为0
1782
+ - **GroupId** (str) - (Required) 组的ID
1783
+ - **AutoBackup** (str) - 是否打开默认备份功能。enable(打开),disable(关闭),默认enable
1784
+ - **SlaveZone** (str) - 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同)
1785
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1786
+
1787
+ **Response**
1788
+
1789
+
1790
+ """
1791
+ # build request
1792
+ d = {
1793
+ "ProjectId": self.config.project_id,
1794
+ "Region": self.config.region,
1795
+ }
1796
+ req and d.update(req)
1797
+ d = apis.UpdateURedisBackupStrategyRequestSchema().dumps(d)
1798
+
1799
+ resp = self.invoke("UpdateURedisBackupStrategy", d, **kwargs)
1800
+ return apis.UpdateURedisBackupStrategyResponseSchema().loads(resp)
1801
+
1802
+ def update_uredis_rewrite_time(
1803
+ self, req: typing.Optional[dict] = None, **kwargs
1804
+ ) -> dict:
1805
+ """UpdateURedisRewriteTime - 修改主备redis重写时间
1806
+
1807
+ **Request**
1808
+
1809
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1810
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1811
+ - **GroupId** (str) - (Required) 实例名称
1812
+ - **RewriteTime** (int) - (Required) 重写时间
1813
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1814
+ - **SlaveZone** (str) - 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同)
1815
+
1816
+ **Response**
1817
+
1818
+
1819
+ """
1820
+ # build request
1821
+ d = {
1822
+ "ProjectId": self.config.project_id,
1823
+ "Region": self.config.region,
1824
+ }
1825
+ req and d.update(req)
1826
+ d = apis.UpdateURedisRewriteTimeRequestSchema().dumps(d)
1827
+
1828
+ resp = self.invoke("UpdateURedisRewriteTime", d, **kwargs)
1829
+ return apis.UpdateURedisRewriteTimeResponseSchema().loads(resp)