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,752 @@
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.umongodb.schemas import apis
8
+
9
+
10
+ class UMongoDBClient(Client):
11
+ def __init__(
12
+ self, config: dict, transport=None, middleware=None, logger=None
13
+ ):
14
+ super(UMongoDBClient, self).__init__(
15
+ config, transport, middleware, logger
16
+ )
17
+
18
+ def backup_umon_go_db_cluster(
19
+ self, req: typing.Optional[dict] = None, **kwargs
20
+ ) -> dict:
21
+ """BackupUMongoDBCluster - 备份集群数据库
22
+
23
+ **Request**
24
+
25
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
26
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
27
+ - **BackupName** (str) - (Required) 备份名称
28
+ - **ClusterId** (str) - (Required) 实例ID
29
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
30
+
31
+ **Response**
32
+
33
+ - **BackupId** (str) - 备份ID
34
+ - **ClusterId** (str) - 实例ID
35
+ - **Message** (str) - 错误信息
36
+
37
+ """
38
+ # build request
39
+ d = {
40
+ "ProjectId": self.config.project_id,
41
+ "Region": self.config.region,
42
+ }
43
+ req and d.update(req)
44
+ d = apis.BackupUMongoDBClusterRequestSchema().dumps(d)
45
+
46
+ resp = self.invoke("BackupUMongoDBCluster", d, **kwargs)
47
+ return apis.BackupUMongoDBClusterResponseSchema().loads(resp)
48
+
49
+ def create_umon_go_db_config_template(
50
+ self, req: typing.Optional[dict] = None, **kwargs
51
+ ) -> dict:
52
+ """CreateUMongoDBConfigTemplate - 创建配置模板
53
+
54
+ **Request**
55
+
56
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
57
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
58
+ - **BaseTemplateId** (str) - (Required) 基础模板
59
+ - **ClusterType** (str) - (Required) 集群类型
60
+ - **MongodbVersion** (str) - (Required) mongo版本
61
+ - **TemplateName** (str) - (Required) 模板名称
62
+ - **Description** (str) - 模板描述
63
+
64
+ **Response**
65
+
66
+ - **Message** (str) - 错误信息
67
+ - **TemplateId** (str) - 模板Id
68
+
69
+ """
70
+ # build request
71
+ d = {
72
+ "ProjectId": self.config.project_id,
73
+ "Region": self.config.region,
74
+ }
75
+ req and d.update(req)
76
+ d = apis.CreateUMongoDBConfigTemplateRequestSchema().dumps(d)
77
+
78
+ # build options
79
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
80
+
81
+ resp = self.invoke("CreateUMongoDBConfigTemplate", d, **kwargs)
82
+ return apis.CreateUMongoDBConfigTemplateResponseSchema().loads(resp)
83
+
84
+ def create_umon_go_db_repl_set(
85
+ self, req: typing.Optional[dict] = None, **kwargs
86
+ ) -> dict:
87
+ """CreateUMongoDBReplSet - 创建一个Mongodb副本集群
88
+
89
+ **Request**
90
+
91
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
92
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
93
+ - **AdminPassword** (str) - (Required) 管理员密码
94
+ - **DBVersion** (str) - (Required) 副本集的Mongodb的版本,例如MongoDB_3_6, MongoDB_4_2
95
+ - **DiskSpace** (int) - (Required) 磁盘空间(GB)
96
+ - **MachineTypeId** (str) - (Required) 机型配置
97
+ - **Name** (str) - (Required) 副本集实例名称,至少6位
98
+ - **NodeCount** (int) - (Required) 副本集节点数量
99
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
100
+ - **ChargeType** (str) - 付费方式:Year, Month, Dynamic,Trial,默认: Month
101
+ - **ListenPort** (int) - mongo服务端口
102
+ - **Quantity** (int) - 购买时长,默认值1
103
+ - **SubnetId** (str) - 子网ID
104
+ - **Tag** (str) - 实例所在的业务组名称
105
+ - **VPCId** (str) - VPC的ID
106
+
107
+ **Response**
108
+
109
+
110
+ """
111
+ # build request
112
+ d = {
113
+ "ProjectId": self.config.project_id,
114
+ "Region": self.config.region,
115
+ }
116
+ req and d.update(req)
117
+ d = apis.CreateUMongoDBReplSetRequestSchema().dumps(d)
118
+
119
+ # build options
120
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
121
+
122
+ resp = self.invoke("CreateUMongoDBReplSet", d, **kwargs)
123
+ return apis.CreateUMongoDBReplSetResponseSchema().loads(resp)
124
+
125
+ def create_umon_go_db_sharded_cluster(
126
+ self, req: typing.Optional[dict] = None, **kwargs
127
+ ) -> dict:
128
+ """CreateUMongoDBShardedCluster - 创建一个Mongodb分片集群
129
+
130
+ **Request**
131
+
132
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
133
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
134
+ - **AdminPassword** (str) - (Required) 管理员密码
135
+ - **DBVersion** (str) - (Required) 副本集的Mongodb的版本,例如MongoDB-3.6, MongoDB-4.2
136
+ - **DiskSpace** (int) - (Required) 数据节点磁盘空间(GB)
137
+ - **MachineTypeId** (str) - (Required) 数据节点机型配置
138
+ - **MongosNodeCount** (int) - (Required) Mongos节点数量
139
+ - **Name** (str) - (Required) 副本集实例名称,至少6位
140
+ - **NodeCount** (int) - (Required) 每个分片中节点数量
141
+ - **ShardCount** (int) - (Required) 分片数量
142
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
143
+ - **ChargeType** (str) - 付费方式:Year, Month, Dynamic,Trial,默认: Month
144
+ - **ListenPort** (int) - mongo服务端口
145
+ - **MongosMachineTypeId** (str) - Mongos节点机型配置
146
+ - **Quantity** (int) - 购买时长,默认值1
147
+ - **SubnetId** (str) - 子网ID
148
+ - **Tag** (str) - 实例所在的业务组名称
149
+ - **TemplateId** (str) - 参数配置模版id
150
+ - **VPCId** (str) - VPC的ID
151
+
152
+ **Response**
153
+
154
+
155
+ """
156
+ # build request
157
+ d = {
158
+ "ProjectId": self.config.project_id,
159
+ "Region": self.config.region,
160
+ }
161
+ req and d.update(req)
162
+ d = apis.CreateUMongoDBShardedClusterRequestSchema().dumps(d)
163
+
164
+ # build options
165
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
166
+
167
+ resp = self.invoke("CreateUMongoDBShardedCluster", d, **kwargs)
168
+ return apis.CreateUMongoDBShardedClusterResponseSchema().loads(resp)
169
+
170
+ def describe_umon_go_db_backup_url(
171
+ self, req: typing.Optional[dict] = None, **kwargs
172
+ ) -> dict:
173
+ """DescribeUMongoDBBackupURL - 获取实例备份下载链接
174
+
175
+ **Request**
176
+
177
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
178
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
179
+ - **ClusterId** (str) - (Required) 集群ID
180
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
181
+ - **BackupId** (str) - 文件备份ID
182
+ - **PackageId** (int) - 打包ID
183
+ - **ValidTime** (int) - 备份链接过期时间(单位秒)
184
+
185
+ **Response**
186
+
187
+ - **InternetAddress** (str) - 备份文件公网地址
188
+ - **IntranetAddress** (str) - 备份文件内网地址
189
+
190
+ """
191
+ # build request
192
+ d = {
193
+ "ProjectId": self.config.project_id,
194
+ "Region": self.config.region,
195
+ }
196
+ req and d.update(req)
197
+ d = apis.DescribeUMongoDBBackupURLRequestSchema().dumps(d)
198
+
199
+ resp = self.invoke("DescribeUMongoDBBackupURL", d, **kwargs)
200
+ return apis.DescribeUMongoDBBackupURLResponseSchema().loads(resp)
201
+
202
+ def describe_umon_go_db_instance(
203
+ self, req: typing.Optional[dict] = None, **kwargs
204
+ ) -> dict:
205
+ """DescribeUMongoDBInstance - 描述MongoDB实例
206
+
207
+ **Request**
208
+
209
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
210
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
211
+ - **ClusterId** (str) - (Required) 实例资源ID
212
+ - **ClusterType** (str) - 集群类型,ReplicaSet:副本集,SharedCluster:分片集群
213
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
214
+
215
+ **Response**
216
+
217
+ - **ClusterInfo** (dict) - 见 **ClusterInfo** 模型定义
218
+
219
+ **Response Model**
220
+
221
+ **ClusterInfo**
222
+ - **ClusterId** (str) - 集群ID
223
+ - **ClusterType** (str) - 集群类型,ReplicaSet :副本集,SharedCluster:分片集
224
+ - **ConfigMachineType** (str) - Config配置集群节点配置,分片集有效
225
+ - **ConfigNodeCount** (int) - Config配置集群节点数量,分片集有效
226
+ - **ConfigReplicaInfo** (dict) - 见 **ReplicaInfo** 模型定义
227
+ - **ConnectURL** (str) - 副本集的访问地址
228
+ - **CreateTime** (int) - DB实例创建时间
229
+ - **DBVersion** (str) - 副本集的Mongodb的版本
230
+ - **DataReplicaInfos** (list) - 见 **ReplicaInfo** 模型定义
231
+ - **DeleteTime** (int) - DB实例删除时间
232
+ - **DiskSpace** (int) - 磁盘空间(GB), 默认根据配置机型
233
+ - **InstanceName** (str) - 实例名称
234
+ - **MachineTypeId** (str) - 计算规格
235
+ - **MongosCount** (int) - Mongos节点数量,分片集有效
236
+ - **MongosInfo** (list) - 见 **NodeInfo** 模型定义
237
+ - **ShardCount** (int) - 分片数量,分片集有效
238
+ - **ShardNodeCount** (int) - 每分片节点数量,分片集有效
239
+ - **State** (str) - 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。
240
+ - **SubnetId** (str) - 子网ID
241
+ - **Tag** (str) - 实例业务组
242
+ - **VPCId** (str) - VPC的ID
243
+ - **Zone** (str) - 可用区
244
+ - **ZoneId** (int) -
245
+
246
+
247
+ **ReplicaInfo**
248
+ - **ClusterId** (str) - 集群ID
249
+ - **CreateTime** (int) - 副本集创建时间
250
+ - **DeleteTime** (int) - 副本集删除时间
251
+ - **IsolationGroupId** (str) - 隔离组ID
252
+ - **MachineType** (str) - 机器类型
253
+ - **MachineTypeId** (str) - 机器类型Id
254
+ - **ModifyTime** (int) - 副本集修改时间
255
+ - **NodeCount** (int) - 副本集下的节点数量
256
+ - **NodeInfos** (list) - 见 **NodeInfo** 模型定义
257
+ - **ReplicaId** (str) - 副本集ID
258
+ - **ReplicaType** (str) - 副本类型,ConfigRepl或者DataRepl
259
+ - **State** (str) - 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。
260
+
261
+
262
+ **NodeInfo**
263
+ - **ClusterId** (str) - 节点所属副本集ID
264
+ - **CreateTime** (int) - DB实例创建时间
265
+ - **DBVersion** (str) - 副本集的Mongodb的版本
266
+ - **DataDisk** (dict) - 见 **DiskInfo** 模型定义
267
+ - **MachineType** (str) - 机型信息
268
+ - **MachineTypeId** (str) - 机型信息ID
269
+ - **NodeId** (str) - 节点ID
270
+ - **NodeRole** (str) - 节点角色,Primary/Secondary/Arbiter/Startup等等
271
+ - **NodeType** (str) - 节点类型
272
+ - **State** (str) - 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。
273
+ - **SysDisk** (dict) - 见 **DiskInfo** 模型定义
274
+ - **VirtualClusterId** (str) - 虚拟节点ID
275
+ - **Zone** (str) - 可用区
276
+ - **ZoneId** (int) - 可用区ID
277
+
278
+
279
+ **DiskInfo**
280
+ - **DiskId** (str) - 磁盘id
281
+ - **DiskSize** (int) - 磁盘容量单位GB
282
+
283
+
284
+ """
285
+ # build request
286
+ d = {
287
+ "ProjectId": self.config.project_id,
288
+ "Region": self.config.region,
289
+ }
290
+ req and d.update(req)
291
+ d = apis.DescribeUMongoDBInstanceRequestSchema().dumps(d)
292
+
293
+ resp = self.invoke("DescribeUMongoDBInstance", d, **kwargs)
294
+ return apis.DescribeUMongoDBInstanceResponseSchema().loads(resp)
295
+
296
+ def get_umon_go_db_backup_param(
297
+ self, req: typing.Optional[dict] = None, **kwargs
298
+ ) -> dict:
299
+ """GetUMongoDBBackupParam - 获取实例备份策略
300
+
301
+ **Request**
302
+
303
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
304
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
305
+ - **ClusterId** (str) - (Required) 实例ID
306
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
307
+
308
+ **Response**
309
+
310
+ - **DataSet** (dict) - 见 **BackupParam** 模型定义
311
+ - **Message** (str) - 错误信息
312
+
313
+ **Response Model**
314
+
315
+ **BackupParam**
316
+ - **AutoBackupCopies** (int) - 自动备份保存份数
317
+ - **AutoBackupToggleTime** (str) - 自动备份预期时间范围 (24小时制,精确到分钟,00:00~23:59)
318
+ - **AutoBackupToggleWeek** (str) - 自动备份预期周几 (1-7 表示 周一到周末,多个数据用','分割,eg: 3,7)
319
+ - **ClusterId** (str) - 实例ID
320
+ - **Disabled** (bool) - 是否禁用(false:未禁用;true:禁用)
321
+ - **ManualBackupCopies** (int) - 手动备份保存份数
322
+
323
+
324
+ """
325
+ # build request
326
+ d = {
327
+ "ProjectId": self.config.project_id,
328
+ "Region": self.config.region,
329
+ }
330
+ req and d.update(req)
331
+ d = apis.GetUMongoDBBackupParamRequestSchema().dumps(d)
332
+
333
+ resp = self.invoke("GetUMongoDBBackupParam", d, **kwargs)
334
+ return apis.GetUMongoDBBackupParamResponseSchema().loads(resp)
335
+
336
+ def get_umon_go_db_cfg_temp_item(
337
+ self, req: typing.Optional[dict] = None, **kwargs
338
+ ) -> dict:
339
+ """GetUMongoDBCfgTempItem - 获取配置模板内容
340
+
341
+ **Request**
342
+
343
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
344
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
345
+ - **TemplateId** (str) - (Required) 配置模板Id
346
+
347
+ **Response**
348
+
349
+ - **DataSet** (list) - 见 **ConfigTemplateItem** 模型定义
350
+ - **Message** (str) - 错误信息
351
+
352
+ **Response Model**
353
+
354
+ **ConfigTemplateItem**
355
+ - **ConfigName** (str) - 配置名称
356
+ - **ConfigOption** (dict) - 见 **ConfigOptions** 模型定义
357
+ - **ConfigValue** (str) - 配置值
358
+ - **CreateTime** (int) - 创建时间
359
+ - **ItemId** (str) - itemId
360
+ - **ModifyTime** (int) - 修改时间
361
+ - **NodeType** (str) - 节点类型: DataNode:数据节点 | ConfigSrvNode:配置节点 | MongosNode:路由节点
362
+ - **TemplateId** (str) - 模板ID
363
+
364
+
365
+ **ConfigOptions**
366
+ - **AllowedApplyType** (str) - 允许应用类型
367
+ - **Description** (str) - 描述
368
+ - **EnableDisplay** (bool) - 是否前端展示
369
+ - **EnableModify** (bool) - 是否可修改
370
+ - **ForceRestart** (bool) - 是否需重启
371
+ - **IsDefaultOption** (bool) - 是否为默认选项
372
+ - **MongodbVersion** (str) - mongo版本
373
+ - **OptionDefaultValue** (str) - 默认值
374
+ - **OptionFormatType** (str) - 选项值格式
375
+ - **OptionName** (str) - 配置选项名
376
+ - **OptionValueType** (str) - 配置选项类型 string,int,bool
377
+ - **OptionValues** (str) - 配置选项值范围
378
+
379
+
380
+ """
381
+ # build request
382
+ d = {
383
+ "ProjectId": self.config.project_id,
384
+ "Region": self.config.region,
385
+ }
386
+ req and d.update(req)
387
+ d = apis.GetUMongoDBCfgTempItemRequestSchema().dumps(d)
388
+
389
+ resp = self.invoke("GetUMongoDBCfgTempItem", d, **kwargs)
390
+ return apis.GetUMongoDBCfgTempItemResponseSchema().loads(resp)
391
+
392
+ def get_umon_go_db_recover_time_range(
393
+ self, req: typing.Optional[dict] = None, **kwargs
394
+ ) -> dict:
395
+ """GetUMongoDBRecoverTimeRange - 获取UMongoDB可回档时间范围
396
+
397
+ **Request**
398
+
399
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
400
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
401
+ - **ClusterId** (str) - (Required) 集群id
402
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
403
+
404
+ **Response**
405
+
406
+ - **EarliestTime** (int) - 最早可回档时间点
407
+ - **LatestTime** (int) - 最晚可回档时间点
408
+
409
+ """
410
+ # build request
411
+ d = {
412
+ "ProjectId": self.config.project_id,
413
+ "Region": self.config.region,
414
+ }
415
+ req and d.update(req)
416
+ d = apis.GetUMongoDBRecoverTimeRangeRequestSchema().dumps(d)
417
+
418
+ resp = self.invoke("GetUMongoDBRecoverTimeRange", d, **kwargs)
419
+ return apis.GetUMongoDBRecoverTimeRangeResponseSchema().loads(resp)
420
+
421
+ def list_umon_go_db_backup(
422
+ self, req: typing.Optional[dict] = None, **kwargs
423
+ ) -> dict:
424
+ """ListUMongoDBBackup - 拉取实例备份列表
425
+
426
+ **Request**
427
+
428
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
429
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
430
+ - **ClusterId** (str) - (Required) 实例ID
431
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
432
+
433
+ **Response**
434
+
435
+ - **DataSet** (list) - 见 **BackupInfo** 模型定义
436
+ - **Message** (str) - 错误信息
437
+
438
+ **Response Model**
439
+
440
+ **BackupInfo**
441
+ - **BackupId** (str) - 备份ID
442
+ - **BackupName** (str) - 备份名称
443
+ - **BackupSize** (int) - 备份数据大小
444
+ - **BackupType** (str) - 备份类型
445
+ - **BatchId** (str) - 批次id
446
+ - **ClusterId** (str) - 实例ID
447
+ - **EndTime** (int) - 备份结束时间
448
+ - **ReplicaType** (str) - 副本类型,ConfigRepl或者DataRepl
449
+ - **StartTime** (int) - 备份开始时间
450
+ - **State** (str) - 备份状态
451
+ - **VirtualClusterId** (str) - 虚拟节点id
452
+
453
+
454
+ """
455
+ # build request
456
+ d = {
457
+ "ProjectId": self.config.project_id,
458
+ "Region": self.config.region,
459
+ }
460
+ req and d.update(req)
461
+ d = apis.ListUMongoDBBackupRequestSchema().dumps(d)
462
+
463
+ resp = self.invoke("ListUMongoDBBackup", d, **kwargs)
464
+ return apis.ListUMongoDBBackupResponseSchema().loads(resp)
465
+
466
+ def list_umon_go_db_config_template(
467
+ self, req: typing.Optional[dict] = None, **kwargs
468
+ ) -> dict:
469
+ """ListUMongoDBConfigTemplate - 拉取配置模板
470
+
471
+ **Request**
472
+
473
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
474
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
475
+
476
+ **Response**
477
+
478
+ - **DataSet** (list) - 见 **ConfigTemplate** 模型定义
479
+ - **Message** (str) - 错误信息
480
+
481
+ **Response Model**
482
+
483
+ **ConfigTemplate**
484
+ - **ClusterType** (str) - 集群类型
485
+ - **CreateTime** (int) - 创建时间
486
+ - **DeleteTime** (int) - 删除时间
487
+ - **Description** (str) - 模板描述
488
+ - **ModifyTime** (int) - 修改时间
489
+ - **MongodbVersion** (str) - mongo版本
490
+ - **TemplateId** (str) - 模板ID
491
+ - **TemplateName** (str) - 模板名称
492
+ - **TemplateType** (str) - 模板类型 UsersTemplate DefaultTemplate
493
+
494
+
495
+ """
496
+ # build request
497
+ d = {
498
+ "ProjectId": self.config.project_id,
499
+ "Region": self.config.region,
500
+ }
501
+ req and d.update(req)
502
+ d = apis.ListUMongoDBConfigTemplateRequestSchema().dumps(d)
503
+
504
+ resp = self.invoke("ListUMongoDBConfigTemplate", d, **kwargs)
505
+ return apis.ListUMongoDBConfigTemplateResponseSchema().loads(resp)
506
+
507
+ def list_umon_go_db_machine_type(
508
+ self, req: typing.Optional[dict] = None, **kwargs
509
+ ) -> dict:
510
+ """ListUMongoDBMachineType - 获取UmongDB支持机器类型列表
511
+
512
+ **Request**
513
+
514
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
515
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
516
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
517
+
518
+ **Response**
519
+
520
+ - **DataSet** (list) - 见 **MongodbMachineType** 模型定义
521
+
522
+ **Response Model**
523
+
524
+ **MongodbMachineType**
525
+ - **Cpu** (int) - cpu核数
526
+ - **Description** (str) - 配置简称 2C4G
527
+ - **Group** (str) - 配置分组,2m , 4m
528
+ - **MachineTypeId** (str) - 机器类型ID o.mongo2m.medium,o.mongo2m.xlarge
529
+ - **Memory** (int) - 内存用量(GB)
530
+ - **UHhostMachineType** (str) - 机器类型,N/O
531
+
532
+
533
+ """
534
+ # build request
535
+ d = {
536
+ "ProjectId": self.config.project_id,
537
+ "Region": self.config.region,
538
+ }
539
+ req and d.update(req)
540
+ d = apis.ListUMongoDBMachineTypeRequestSchema().dumps(d)
541
+
542
+ resp = self.invoke("ListUMongoDBMachineType", d, **kwargs)
543
+ return apis.ListUMongoDBMachineTypeResponseSchema().loads(resp)
544
+
545
+ def list_umon_go_db_version(
546
+ self, req: typing.Optional[dict] = None, **kwargs
547
+ ) -> dict:
548
+ """ListUMongoDBVersion - 获取UMongoDB支持版本列表
549
+
550
+ **Request**
551
+
552
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
553
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
554
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
555
+
556
+ **Response**
557
+
558
+ - **DataSet** (list) - 见 **MongoDBVersion** 模型定义
559
+
560
+ **Response Model**
561
+
562
+ **MongoDBVersion**
563
+ - **DBVersion** (str) - MongoDB版本
564
+
565
+
566
+ """
567
+ # build request
568
+ d = {
569
+ "ProjectId": self.config.project_id,
570
+ "Region": self.config.region,
571
+ }
572
+ req and d.update(req)
573
+ d = apis.ListUMongoDBVersionRequestSchema().dumps(d)
574
+
575
+ resp = self.invoke("ListUMongoDBVersion", d, **kwargs)
576
+ return apis.ListUMongoDBVersionResponseSchema().loads(resp)
577
+
578
+ def modify_umon_go_db_admin_password(
579
+ self, req: typing.Optional[dict] = None, **kwargs
580
+ ) -> dict:
581
+ """ModifyUMongoDBAdminPassword - 修改MongoDB集群root密码
582
+
583
+ **Request**
584
+
585
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
586
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
587
+ - **ClusterId** (str) - (Required) 集群ID
588
+ - **Password** (str) - (Required) 集群新密码(密码格式使用BASE64编码)
589
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
590
+
591
+ **Response**
592
+
593
+ - **Message** (str) - 错误信息
594
+
595
+ """
596
+ # build request
597
+ d = {
598
+ "ProjectId": self.config.project_id,
599
+ "Region": self.config.region,
600
+ }
601
+ req and d.update(req)
602
+ d = apis.ModifyUMongoDBAdminPasswordRequestSchema().dumps(d)
603
+
604
+ resp = self.invoke("ModifyUMongoDBAdminPassword", d, **kwargs)
605
+ return apis.ModifyUMongoDBAdminPasswordResponseSchema().loads(resp)
606
+
607
+ def modify_umon_go_db_attribute(
608
+ self, req: typing.Optional[dict] = None, **kwargs
609
+ ) -> dict:
610
+ """ModifyUMongoDBAttribute - 修改MongoDB集群名称
611
+
612
+ **Request**
613
+
614
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
615
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
616
+ - **ClusterId** (str) - (Required) 集群id
617
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
618
+ - **Name** (str) - 集群新名称(输入长度为6~63位名称)
619
+ - **RemarkName** (str) - 集群备注(Name和RemarkName必传其一)
620
+
621
+ **Response**
622
+
623
+ - **Message** (str) - 返回错误信息
624
+
625
+ """
626
+ # build request
627
+ d = {
628
+ "ProjectId": self.config.project_id,
629
+ "Region": self.config.region,
630
+ }
631
+ req and d.update(req)
632
+ d = apis.ModifyUMongoDBAttributeRequestSchema().dumps(d)
633
+
634
+ resp = self.invoke("ModifyUMongoDBAttribute", d, **kwargs)
635
+ return apis.ModifyUMongoDBAttributeResponseSchema().loads(resp)
636
+
637
+ def modify_umon_go_db_backup_param(
638
+ self, req: typing.Optional[dict] = None, **kwargs
639
+ ) -> dict:
640
+ """ModifyUMongoDBBackupParam - 修改实例备份策略
641
+
642
+ **Request**
643
+
644
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
645
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
646
+ - **ClusterId** (str) - (Required) 实例ID
647
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
648
+ - **AutoBackupToggleTime** (str) - 自动备份预期开始时间范围(00:00~23:59),默认 5:00~6:00
649
+ - **AutoBackupToggleWeek** (str) - 自动备份预期星期几(1~7),默认 3,7 (周三,周日)
650
+ - **Disabled** (bool) - 是否禁用,true:禁用;false:开启
651
+
652
+ **Response**
653
+
654
+ - **Message** (str) - 错误信息
655
+
656
+ """
657
+ # build request
658
+ d = {
659
+ "ProjectId": self.config.project_id,
660
+ "Region": self.config.region,
661
+ }
662
+ req and d.update(req)
663
+ d = apis.ModifyUMongoDBBackupParamRequestSchema().dumps(d)
664
+
665
+ resp = self.invoke("ModifyUMongoDBBackupParam", d, **kwargs)
666
+ return apis.ModifyUMongoDBBackupParamResponseSchema().loads(resp)
667
+
668
+ def restart_umon_go_db_cluster(
669
+ self, req: typing.Optional[dict] = None, **kwargs
670
+ ) -> dict:
671
+ """RestartUMongoDBCluster - 重启集群
672
+
673
+ **Request**
674
+
675
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
676
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
677
+ - **ClusterId** (str) - (Required) 集群ID
678
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
679
+
680
+ **Response**
681
+
682
+ - **ClusterId** (str) - 集群ID
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.RestartUMongoDBClusterRequestSchema().dumps(d)
692
+
693
+ resp = self.invoke("RestartUMongoDBCluster", d, **kwargs)
694
+ return apis.RestartUMongoDBClusterResponseSchema().loads(resp)
695
+
696
+ def start_umon_go_db_cluster(
697
+ self, req: typing.Optional[dict] = None, **kwargs
698
+ ) -> dict:
699
+ """StartUMongoDBCluster - 启动集群
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
+ - **ClusterId** (str) - (Required) 集群ID
706
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
707
+
708
+ **Response**
709
+
710
+ - **ClusterId** (str) - 集群ID
711
+ - **Message** (str) - 错误信息
712
+
713
+ """
714
+ # build request
715
+ d = {
716
+ "ProjectId": self.config.project_id,
717
+ "Region": self.config.region,
718
+ }
719
+ req and d.update(req)
720
+ d = apis.StartUMongoDBClusterRequestSchema().dumps(d)
721
+
722
+ resp = self.invoke("StartUMongoDBCluster", d, **kwargs)
723
+ return apis.StartUMongoDBClusterResponseSchema().loads(resp)
724
+
725
+ def stop_umon_go_db_cluster(
726
+ self, req: typing.Optional[dict] = None, **kwargs
727
+ ) -> dict:
728
+ """StopUMongoDBCluster - 停止集群
729
+
730
+ **Request**
731
+
732
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
733
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
734
+ - **ClusterId** (str) - (Required) 集群ID
735
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
736
+
737
+ **Response**
738
+
739
+ - **ClusterId** (str) - 集群ID
740
+ - **Message** (str) - 错误信息
741
+
742
+ """
743
+ # build request
744
+ d = {
745
+ "ProjectId": self.config.project_id,
746
+ "Region": self.config.region,
747
+ }
748
+ req and d.update(req)
749
+ d = apis.StopUMongoDBClusterRequestSchema().dumps(d)
750
+
751
+ resp = self.invoke("StopUMongoDBCluster", d, **kwargs)
752
+ return apis.StopUMongoDBClusterResponseSchema().loads(resp)