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,832 @@
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.udisk.schemas import apis
8
+
9
+
10
+ class UDiskClient(Client):
11
+ def __init__(
12
+ self, config: dict, transport=None, middleware=None, logger=None
13
+ ):
14
+ super(UDiskClient, self).__init__(config, transport, middleware, logger)
15
+
16
+ def attach_udisk(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
17
+ """AttachUDisk - 将一个可用的UDisk挂载到某台主机上,当UDisk挂载成功后,还需要在主机内部进行文件系统操作
18
+
19
+ **Request**
20
+
21
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
22
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
23
+ - **UDiskId** (str) - (Required) 需要挂载的UDisk实例ID.
24
+ - **EnableCrossPodAttach** (str) - 是否允许跨pod挂载(Yes:允许跨pod挂载,No:不允许跨pod挂载,不填默认No)
25
+ - **HostId** (str) - Host实例ID
26
+ - **MultiAttach** (str) - 是否允许多点挂载(Yes: 允许多点挂载, No: 不允许多点挂载, 不填默认Yes )
27
+ - **UHostId** (str) - UHost实例ID。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】
28
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
29
+
30
+ **Response**
31
+
32
+ - **DeviceName** (str) - 挂载的设备名称
33
+ - **HostId** (str) - 挂载的Host实例ID
34
+ - **UDiskId** (str) - 挂载的UDisk实例ID
35
+ - **UHostId** (str) - 挂载的UHost实例ID。【即将废弃,建议使用HostId】
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.AttachUDiskRequestSchema().dumps(d)
45
+
46
+ resp = self.invoke("AttachUDisk", d, **kwargs)
47
+ return apis.AttachUDiskResponseSchema().loads(resp)
48
+
49
+ def clone_udisk(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
50
+ """CloneUDisk - 从UDisk创建UDisk克隆
51
+
52
+ **Request**
53
+
54
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
55
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
56
+ - **Name** (str) - (Required) 实例名称
57
+ - **SourceId** (str) - (Required) 克隆父Disk的Id
58
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
59
+ - **BackupMode** (str) - 快照服务备份策略。默认采用基础版套餐开通,“Base”:基础版,“ Ultimate”:旗舰版,“ Custom”:自定义备份链
60
+ - **ChargeType** (str) - Year , Month, Dynamic,Postpay,Trial 默认: Month
61
+ - **Comment** (str) - Disk注释
62
+ - **CouponId** (str) - 使用的代金券id
63
+ - **Day** (int) - BackupMode为Custom时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30
64
+ - **HostId** (str) - Host实例ID。克隆出的云盘可直接挂载到该主机上。
65
+ - **Hour** (int) - BackupMode为Custom时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96
66
+ - **Journal** (int) - BackupMode为Custom时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48
67
+ - **Quantity** (int) - 购买时长 默认: 1
68
+ - **RdmaClusterId** (str) - RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。
69
+ - **Size** (int) - 新克隆UDisk的大小,单位:GB。指定Size须大于等于源盘Size,小于源盘Size或者不指定该参数均按源盘Size克隆新盘。普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。
70
+ - **SnapshotService** (str) - 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No
71
+ - **Tag** (str) - 业务组 默认:Default
72
+ - **UDataArkMode** (str) - 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No
73
+
74
+ **Response**
75
+
76
+ - **UDiskId** (list) - 创建UDisk Id
77
+
78
+ """
79
+ # build request
80
+ d = {
81
+ "ProjectId": self.config.project_id,
82
+ "Region": self.config.region,
83
+ }
84
+ req and d.update(req)
85
+ d = apis.CloneUDiskRequestSchema().dumps(d)
86
+
87
+ resp = self.invoke("CloneUDisk", d, **kwargs)
88
+ return apis.CloneUDiskResponseSchema().loads(resp)
89
+
90
+ def clone_udisk_snapshot(
91
+ self, req: typing.Optional[dict] = None, **kwargs
92
+ ) -> dict:
93
+ """CloneUDiskSnapshot - 从快照创建UDisk克隆
94
+
95
+ **Request**
96
+
97
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
98
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
99
+ - **Name** (str) - (Required) 实例名称
100
+ - **SourceId** (str) - (Required) 克隆父Snapshot的Id
101
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
102
+ - **BackupMode** (str) - 快照服务备份策略。默认采用基础版套餐开通,“Base”:基础版,“ Ultimate”:旗舰版,“ Custom”:自定义备份链
103
+ - **ChargeType** (str) - Year , Month, Dynamic,Postpay 默认: Dynamic
104
+ - **Comment** (str) - Disk注释
105
+ - **CouponId** (str) - 使用的代金券id
106
+ - **Day** (int) - BackupMode为Custom时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30
107
+ - **HostId** (str) - Host实例ID。克隆出的云盘可直接挂载到该主机上。
108
+ - **Hour** (int) - BackupMode为Custom时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96
109
+ - **Journal** (int) - BackupMode为Custom时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48
110
+ - **Quantity** (int) - 购买时长 默认: 1
111
+ - **RdmaClusterId** (str) - RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。
112
+ - **Size** (int) - 新克隆UDisk的大小,单位:GB。指定Size须大于等于源盘Size,小于源盘Size或者不指定该参数均按源盘Size克隆新盘。普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。
113
+ - **SnapshotService** (str) - 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No
114
+ - **Tag** (str) - 业务组 默认:Default
115
+ - **UDataArkMode** (str) - 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No
116
+
117
+ **Response**
118
+
119
+ - **UDiskId** (list) - 创建UDisk Id
120
+
121
+ """
122
+ # build request
123
+ d = {
124
+ "ProjectId": self.config.project_id,
125
+ "Region": self.config.region,
126
+ }
127
+ req and d.update(req)
128
+ d = apis.CloneUDiskSnapshotRequestSchema().dumps(d)
129
+
130
+ resp = self.invoke("CloneUDiskSnapshot", d, **kwargs)
131
+ return apis.CloneUDiskSnapshotResponseSchema().loads(resp)
132
+
133
+ def clone_udisk_udataark(
134
+ self, req: typing.Optional[dict] = None, **kwargs
135
+ ) -> dict:
136
+ """CloneUDiskUDataArk - 从数据方舟的备份创建UDisk
137
+
138
+ **Request**
139
+
140
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
141
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
142
+ - **Name** (str) - (Required) 实例名称
143
+ - **SnapshotTime** (int) - (Required) 指定从方舟克隆的备份时间点
144
+ - **UDiskId** (str) - (Required) 需要克隆的源盘id
145
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
146
+ - **BackupMode** (str) - 快照服务备份策略。默认采用基础版套餐开通,“Base”:基础版,“ Ultimate”:旗舰版,“ Custom”:自定义备份链
147
+ - **ChargeType** (str) - Year , Month, Dynamic,Postpay 默认: Dynamic
148
+ - **Comment** (str) - Disk注释
149
+ - **CouponId** (str) - 使用的代金券id
150
+ - **Day** (int) - BackupMode为Custom时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30
151
+ - **HostId** (str) - Host实例ID。克隆出的云盘可直接挂载到该主机上。
152
+ - **Hour** (int) - BackupMode为Custom时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96
153
+ - **Journal** (int) - BackupMode为Custom时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48
154
+ - **Quantity** (int) - 购买时长 默认: 1
155
+ - **RdmaClusterId** (str) - RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。
156
+ - **Size** (int) - 新克隆UDisk的大小,单位:GB。指定Size须大于等于源盘Size,小于源盘Size或者不指定该参数均按源盘Size克隆新盘。普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。
157
+ - **SnapshotService** (str) - 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No
158
+ - **Tag** (str) - 业务组 默认:Default
159
+ - **UDataArkMode** (str) - 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No
160
+
161
+ **Response**
162
+
163
+ - **UDiskId** (list) - 创建UDisk Id
164
+
165
+ """
166
+ # build request
167
+ d = {
168
+ "ProjectId": self.config.project_id,
169
+ "Region": self.config.region,
170
+ }
171
+ req and d.update(req)
172
+ d = apis.CloneUDiskUDataArkRequestSchema().dumps(d)
173
+
174
+ resp = self.invoke("CloneUDiskUDataArk", d, **kwargs)
175
+ return apis.CloneUDiskUDataArkResponseSchema().loads(resp)
176
+
177
+ def create_attach_udisk(
178
+ self, req: typing.Optional[dict] = None, **kwargs
179
+ ) -> dict:
180
+ """CreateAttachUDisk - 创建并挂载UDisk磁盘
181
+
182
+ **Request**
183
+
184
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
185
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
186
+ - **Name** (str) - (Required) 实例名称
187
+ - **Size** (int) - (Required) 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。
188
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
189
+ - **BackupMode** (str) - 快照服务备份策略。默认采用基础版套餐开通,“Base”:基础版,“ Ultimate”:旗舰版,“ Custom”:自定义备份链
190
+ - **ChargeType** (str) - Year , Month, Dynamic, Postpay, Trial 。 Size小于等于2000时,默认为Dynamic;Size大于2000时,默认为Month。
191
+ - **CmkId** (str) - 加密需要的cmk id,UKmsMode为Yes时,必填
192
+ - **CouponId** (str) - 使用的代金券id
193
+ - **Day** (int) - BackupMode为Custom时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30
194
+ - **DiskType** (str) - UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),默认值(DataDisk)
195
+ - **HostId** (str) - Host实例ID。当创建云盘类型为RSSDDataDisk时,根据传入的HostId,创建与虚机在同一PodId下的云盘。
196
+ - **Hour** (int) - BackupMode为Custom时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96
197
+ - **Journal** (int) - BackupMode为Custom时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48
198
+ - **MultiAttach** (str) - 是否允许多点挂载(Yes: 允许多点挂载, No: 不允许多点挂载, 不填默认Yes )
199
+ - **Quantity** (int) - 购买时长 默认: 1
200
+ - **SnapshotService** (str) - 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No
201
+ - **Tag** (str) - 业务组 默认:Default
202
+ - **UDataArkMode** (str) - 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No
203
+ - **UHostId** (str) - UHost实例ID。当创建云盘类型为RSSDDataDisk时,根据传入的UHostId,创建与虚机在同一PodId下的云盘。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】
204
+ - **UKmsMode** (str) - 是否加密。Yes:加密,No:不加密,默认值(No)
205
+
206
+ **Response**
207
+
208
+ - **DeviceName** (str) - 挂载设备名称
209
+ - **HostId** (str) - 挂载的Host实例ID
210
+ - **UDiskId** (str) - 挂载的UDisk实例ID
211
+ - **UHostId** (str) - 挂载的UHost实例ID。【即将废弃,建议使用HostId】
212
+
213
+ """
214
+ # build request
215
+ d = {
216
+ "ProjectId": self.config.project_id,
217
+ "Region": self.config.region,
218
+ }
219
+ req and d.update(req)
220
+ d = apis.CreateAttachUDiskRequestSchema().dumps(d)
221
+
222
+ # build options
223
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
224
+
225
+ resp = self.invoke("CreateAttachUDisk", d, **kwargs)
226
+ return apis.CreateAttachUDiskResponseSchema().loads(resp)
227
+
228
+ def create_udisk(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
229
+ """CreateUDisk - 创建UDisk磁盘
230
+
231
+ **Request**
232
+
233
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
234
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
235
+ - **Name** (str) - (Required) 实例名称
236
+ - **Size** (int) - (Required) 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。
237
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
238
+ - **BackupMode** (str) - 快照服务备份策略。默认采用基础版套餐开通,“Base”:基础版,“ Ultimate”:旗舰版,“ Custom”:自定义备份链
239
+ - **ChargeType** (str) - Year , Month, Dynamic, Postpay, Trial 。默认为Dynamic。
240
+ - **CmkId** (str) - 加密需要的cmk id,UKmsMode为Yes时,必填
241
+ - **CouponId** (str) - 使用的代金券id
242
+ - **Day** (int) - BackupMode为Custom时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30
243
+ - **DiskType** (str) - UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),默认值(DataDisk)
244
+ - **Hour** (int) - BackupMode为Custom时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96
245
+ - **Journal** (int) - BackupMode为Custom时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48
246
+ - **Quantity** (int) - 购买时长 默认: 1
247
+ - **RdmaClusterId** (str) - RDMA集群id。DiskType为RSSDDataDisk可填,指定云盘创建到对应的RDMA集群。
248
+ - **SnapshotService** (str) - 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No
249
+ - **Tag** (str) - 业务组 默认:Default
250
+ - **UDataArkMode** (str) - 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No
251
+ - **UKmsMode** (str) - 是否加密。Yes:加密,No:不加密,默认值(No)
252
+
253
+ **Response**
254
+
255
+ - **UDiskId** (list) - UDisk实例Id
256
+
257
+ """
258
+ # build request
259
+ d = {
260
+ "ProjectId": self.config.project_id,
261
+ "Region": self.config.region,
262
+ }
263
+ req and d.update(req)
264
+ d = apis.CreateUDiskRequestSchema().dumps(d)
265
+
266
+ # build options
267
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
268
+
269
+ resp = self.invoke("CreateUDisk", d, **kwargs)
270
+ return apis.CreateUDiskResponseSchema().loads(resp)
271
+
272
+ def create_udisk_snapshot(
273
+ self, req: typing.Optional[dict] = None, **kwargs
274
+ ) -> dict:
275
+ """CreateUDiskSnapshot - 创建snapshot快照
276
+
277
+ **Request**
278
+
279
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
280
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
281
+ - **Name** (str) - (Required) 快照名称
282
+ - **UDiskId** (str) - (Required) 快照的UDisk的Id
283
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
284
+ - **ChargeType** (str) - Year , Month, Dynamic 默认: Dynamic (已废弃)
285
+ - **Comment** (str) - 快照描述
286
+ - **Quantity** (int) - 购买时长 默认: 1 (已废弃)
287
+
288
+ **Response**
289
+
290
+ - **SnapshotId** (list) - 快照Id
291
+
292
+ """
293
+ # build request
294
+ d = {
295
+ "ProjectId": self.config.project_id,
296
+ "Region": self.config.region,
297
+ }
298
+ req and d.update(req)
299
+ d = apis.CreateUDiskSnapshotRequestSchema().dumps(d)
300
+
301
+ # build options
302
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
303
+
304
+ resp = self.invoke("CreateUDiskSnapshot", d, **kwargs)
305
+ return apis.CreateUDiskSnapshotResponseSchema().loads(resp)
306
+
307
+ def delete_udisk(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
308
+ """DeleteUDisk - 删除UDisk
309
+
310
+ **Request**
311
+
312
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
313
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
314
+ - **UDiskId** (str) - (Required) 要删除的UDisk的Id
315
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
316
+
317
+ **Response**
318
+
319
+
320
+ """
321
+ # build request
322
+ d = {
323
+ "ProjectId": self.config.project_id,
324
+ "Region": self.config.region,
325
+ }
326
+ req and d.update(req)
327
+ d = apis.DeleteUDiskRequestSchema().dumps(d)
328
+
329
+ resp = self.invoke("DeleteUDisk", d, **kwargs)
330
+ return apis.DeleteUDiskResponseSchema().loads(resp)
331
+
332
+ def delete_udisk_snapshot(
333
+ self, req: typing.Optional[dict] = None, **kwargs
334
+ ) -> dict:
335
+ """DeleteUDiskSnapshot - 删除Snapshot
336
+
337
+ **Request**
338
+
339
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
340
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
341
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
342
+ - **SnapshotId** (str) - 快照Id(填写后不能填写UDisk Id)
343
+ - **UDiskId** (str) - UDisk Id,删除该盘所创建出来的所有快照(填写后不能填写SnapshotId)
344
+
345
+ **Response**
346
+
347
+
348
+ """
349
+ # build request
350
+ d = {
351
+ "ProjectId": self.config.project_id,
352
+ "Region": self.config.region,
353
+ }
354
+ req and d.update(req)
355
+ d = apis.DeleteUDiskSnapshotRequestSchema().dumps(d)
356
+
357
+ resp = self.invoke("DeleteUDiskSnapshot", d, **kwargs)
358
+ return apis.DeleteUDiskSnapshotResponseSchema().loads(resp)
359
+
360
+ def describe_recycle_udisk(
361
+ self, req: typing.Optional[dict] = None, **kwargs
362
+ ) -> dict:
363
+ """DescribeRecycleUDisk - 拉取回收站中云硬盘列表
364
+
365
+ **Request**
366
+
367
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
368
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
369
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
370
+ - **Limit** (int) - 返回数据长度, 默认为20
371
+ - **Offset** (int) - 数据偏移量, 默认为0
372
+
373
+ **Response**
374
+
375
+ - **DataSet** (list) - 见 **RecycleUDiskSet** 模型定义
376
+ - **TotalCount** (int) - 磁盘数量
377
+
378
+ **Response Model**
379
+
380
+ **RecycleUDiskSet**
381
+ - **CountdownTime** (int) - 销毁倒计时
382
+ - **CreateTime** (int) - 创建时间
383
+ - **ExpiredTime** (int) - 过期时间
384
+ - **Name** (str) - 磁盘名称
385
+ - **Size** (int) - 磁盘容量
386
+ - **Tag** (str) - 业务组
387
+ - **UDiskId** (str) - 磁盘id
388
+ - **Zone** (str) - 可用区
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.DescribeRecycleUDiskRequestSchema().dumps(d)
399
+
400
+ resp = self.invoke("DescribeRecycleUDisk", d, **kwargs)
401
+ return apis.DescribeRecycleUDiskResponseSchema().loads(resp)
402
+
403
+ def describe_udisk(
404
+ self, req: typing.Optional[dict] = None, **kwargs
405
+ ) -> dict:
406
+ """DescribeUDisk - 获取UDisk实例
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
+ - **DiskType** (str) - ProtocolVersion字段为1时,需结合IsBoot确定具体磁盘类型:普通数据盘:DiskType:"CLOUD_NORMAL",IsBoot:"False";普通系统盘:DiskType:"CLOUD_NORMAL",IsBoot:"True";SSD数据盘:DiskType:"CLOUD_SSD",IsBoot:"False";SSD系统盘:DiskType:"CLOUD_SSD",IsBoot:"True";RSSD数据盘:DiskType:"CLOUD_RSSD",IsBoot:"False";RSSD系统盘:DiskType:"CLOUD_RSSD",IsBoot:"True";高效数据盘:DiskType:"CLOUD_EFFICIENCY",IsBoot:"False";高效系统盘:DiskType:"CLOUD_EFFICIENCY",IsBoot:"True";为空拉取所有。ProtocolVersion字段为0或没有该字段时,可设为以下几个值:普通数据盘:DataDisk;普通系统盘:SystemDisk;SSD数据盘:SSDDataDisk;SSD系统盘:SSDSystemDisk;RSSD数据盘:RSSDDataDisk;RSSD系统盘:RSSDSystemDisk:高效数据盘:EfficiencyDataDisk;高效系统盘:EfficiencySystemDisk;为空拉取所有。
413
+ - **HostId** (str) - 根据传入的HostId,返回与该主机关联的云盘信息。
414
+ - **HostIdForAttachment** (str) - 根据传入的HostIdForAttachment,筛选出能被挂载在该主机上的云盘。目前主要针对RSSD云盘。
415
+ - **HostProduct** (str) - 宿主产品类型,可筛选挂载在该类型宿主上的云盘。可选值:uhost, uphost。为空拉取所有。(当HostIdForAttachment字段不为空时,该字段可以不填,若HostIdForAttachment与该字段宿主类型冲突,则以HostIdForAttachment字段为准。)
416
+ - **IgnoreBackupMode** (str) - 是否忽略快照服务信息。Yes:忽略,No:不忽略,默认值(No)。(如不关心快照服务信息,建议选填“Yes”,可降低请求延时)
417
+ - **IgnoreUBillInfo** (str) - 是否忽略计费信息。Yes:忽略,No:不忽略,默认值(No)。(如不关心账单信息,建议选填“Yes”,可降低请求延时)
418
+ - **IsBoot** (str) - ProtocolVersion字段为1且DiskType不为空时,必须设置,设置规则请参照DiskType;ProtocolVersion字段为1且DiskType为空时,该字段无效。ProtocolVersion字段为0或没有该字段时,该字段无效。
419
+ - **Limit** (int) - 返回数据长度, 默认为20
420
+ - **Offset** (int) - 数据偏移量, 默认为0
421
+ - **ProtocolVersion** (int) - 请求协议版本,建议升级为1,为1时DiskType与UHost磁盘类型定义一致;默认为0
422
+ - **Status** (str) - 云盘状态。All(所有状态),Available(可用),Attaching(挂载中),InUse(已挂载), Detaching(卸载中), Initializating(分配中),Failed(创建失败),Cloning(克隆中),Restoring(恢复中),RestoreFailed(恢复失败)。默认值:All
423
+ - **Tag** (str) - 业务组名称
424
+ - **UDiskBasicInfo** (str) - 是否只返回云盘基础信息(只包含云盘及关联主机的资源信息)。Yes:是,No:否,默认值(No)。(如仅需要基础信息,建议选填“Yes”,可降低请求延时)
425
+ - **UDiskId** (str) - UDisk Id(留空返回全部)
426
+ - **UHostIdForAttachment** (str) - 根据传入的UHostIdForAttachment,筛选出能被挂载在该主机上的云盘【本字段即将废弃,建议使用HostIdForAttachment】
427
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
428
+
429
+ **Response**
430
+
431
+ - **DataSet** (list) - 见 **UDiskDataSet** 模型定义
432
+ - **TotalCount** (int) - 根据过滤条件得到的总数
433
+
434
+ **Response Model**
435
+
436
+ **UDiskDataSet**
437
+ - **ArkSwitchEnable** (int) - 是否支持开启方舟,1支持 ,0不支持
438
+ - **BackupMode** (str) - 该盘的备份方式。快照服务:"SnapshotService";数据方舟:"UDataArk";无备份方式:""
439
+ - **ChargeType** (str) - Year,Month,Dynamic,Trial,Postpay
440
+ - **CloneEnable** (int) - 是否支持克隆,1支持 ,0不支持
441
+ - **CmkId** (str) - 该盘的cmk id
442
+ - **CmkIdAlias** (str) - cmk id 别名
443
+ - **CmkIdStatus** (str) - 该盘cmk的状态, Enabled(正常),Disabled(失效),Deleted(删除),NoCmkId(非加密盘)
444
+ - **CreateTime** (int) - 创建时间
445
+ - **DataKey** (str) - 该盘的密文密钥
446
+ - **DeviceName** (str) - 挂载的设备名称
447
+ - **DiskType** (str) - 请求中的ProtocolVersion字段为1时,需结合IsBoot确定具体磁盘类型:普通数据盘:DiskType:"CLOUD_NORMAL",IsBoot:"False"; 普通系统盘:DiskType:"CLOUD_NORMAL",IsBoot:"True";SSD数据盘:DiskType:"CLOUD_SSD",IsBoot:"False";SSD系统盘:DiskType:"CLOUD_SSD",IsBoot:"True";RSSD数据盘:DiskType:"CLOUD_RSSD",IsBoot:"False";RSSD系统盘:DiskType:"CLOUD_RSSD",IsBoot:"True";高效数据盘:DiskType:"CLOUD_EFFICIENCY",IsBoot:"False";高效系统盘:DiskType:"CLOUD_EFFICIENCY",IsBoot:"True"。请求中的ProtocolVersion字段为0或没有该字段时,云硬盘类型参照如下:普通数据盘:DataDisk;普通系统盘:SystemDisk;SSD数据盘:SSDDataDisk;SSD系统盘:SSDSystemDisk;RSSD数据盘:RSSDDataDisk;RSSD系统盘:RSSDSystemDisk;高效数据盘:EfficiencyDataDisk;高效系统盘:EfficiencySystemDisk。
448
+ - **ExpiredTime** (int) - 过期时间
449
+ - **HostIP** (str) - 挂载的Host的IP
450
+ - **HostId** (str) - 挂载的Host的Id
451
+ - **HostName** (str) - 挂载的Host的Name
452
+ - **IsBoot** (str) - 是否是系统盘,是:"True", 否:"False"
453
+ - **IsExpire** (str) - 资源是否过期,过期:"Yes", 未过期:"No"
454
+ - **Name** (str) - 实例名称
455
+ - **RdmaClusterId** (str) - RDMA集群id,仅RSSD返回该值;其他类型云盘返回""。当云盘的此值与快杰云主机的RdmaClusterId相同时,RSSD可以挂载到这台云主机。
456
+ - **Size** (int) - 容量单位GB
457
+ - **SnapEnable** (int) - 是否支持快照,1支持 ,0不支持
458
+ - **SnapshotCount** (int) - 该盘快照个数
459
+ - **SnapshotLimit** (int) - 该盘快照上限
460
+ - **Status** (str) - 状态:Available(可用),Attaching(挂载中), InUse(已挂载), Detaching(卸载中), Initializating(分配中), Failed(创建失败),Cloning(克隆中),Restoring(恢复中),RestoreFailed(恢复失败)
461
+ - **Tag** (str) - 业务组名称
462
+ - **UDataArkMode** (str) - 是否开启数据方舟,开启:"Yes", 不支持:"No"
463
+ - **UDiskId** (str) - UDisk实例Id
464
+ - **UHostIP** (str) - 挂载的UHost的IP。【即将废弃,建议使用HostIP】
465
+ - **UHostId** (str) - 挂载的UHost的Id。【即将废弃,建议使用HostId】
466
+ - **UHostName** (str) - 挂载的UHost的Name。【即将废弃,建议使用HostName】
467
+ - **UKmsMode** (str) - 是否是加密盘,是:"Yes", 否:"No"
468
+ - **Version** (str) - 是否支持数据方舟,支持:"2.0", 不支持:"1.0"
469
+ - **Zone** (str) - 可用区
470
+
471
+
472
+ """
473
+ # build request
474
+ d = {
475
+ "ProjectId": self.config.project_id,
476
+ "Region": self.config.region,
477
+ }
478
+ req and d.update(req)
479
+ d = apis.DescribeUDiskRequestSchema().dumps(d)
480
+
481
+ resp = self.invoke("DescribeUDisk", d, **kwargs)
482
+ return apis.DescribeUDiskResponseSchema().loads(resp)
483
+
484
+ def describe_udisk_price(
485
+ self, req: typing.Optional[dict] = None, **kwargs
486
+ ) -> dict:
487
+ """DescribeUDiskPrice - 获取UDisk实例价格信息
488
+
489
+ **Request**
490
+
491
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
492
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
493
+ - **Size** (int) - (Required) 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];普通系统盘:范围[1~8000];SSD系统盘:范围[1~4000];RSSD数据盘:范围[1~32000];RSSD系统盘:范围[1~4000];高效数据盘:范围[1~32000];高效系统盘:范围[1~500]。
494
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
495
+ - **BackupMode** (str) - 快照服务备份策略。默认采用基础版套餐开通,“Base”:基础版,“ Ultimate”:旗舰版,“ Custom”:自定义备份链
496
+ - **ChargeType** (str) - Year , Month, Dynamic,Postpay,Trial 默认: Month
497
+ - **Day** (int) - BackupMode为Custom时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30
498
+ - **DiskType** (str) - UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),SystemDisk(普通系统盘),SSDSystemDisk(SSD系统盘),RSSDSystemDisk(RSSD系统盘),EfficiencySystemDisk(高效系统盘),默认值(DataDisk)
499
+ - **Hour** (int) - BackupMode为Custom时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96
500
+ - **IsTotalPrice** (str) - 是否将快照服务(数据方舟),云硬盘放入一张订单, 是:"Yes",否:"No",默认是"No"
501
+ - **Journal** (int) - BackupMode为Custom时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48
502
+ - **MachineType** (str) - 云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考 `云主机机型说明 <https://docs.ucloud.cn/api/uhost-api/uhost_type>`_ 。
503
+ - **Quantity** (int) - 购买UDisk的时长,默认值为1
504
+ - **SnapshotService** (str) - 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No
505
+ - **UDataArkMode** (str) - 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No
506
+
507
+ **Response**
508
+
509
+ - **DataSet** (list) - 见 **UDiskPriceDataSet** 模型定义
510
+
511
+ **Response Model**
512
+
513
+ **UDiskPriceDataSet**
514
+ - **ChargeName** (str) - "UDataArk","SnapshotService","UDisk","Total"
515
+ - **ChargeType** (str) - Year, Month, Dynamic,Trial
516
+ - **ListPrice** (int) - 原价(对应计费OriginalPrice)
517
+ - **OriginalPrice** (int) - 用户折后价(对应计费CustomPrice)
518
+ - **Price** (int) - 实际价格 (单位: 分)
519
+
520
+
521
+ """
522
+ # build request
523
+ d = {
524
+ "ProjectId": self.config.project_id,
525
+ "Region": self.config.region,
526
+ }
527
+ req and d.update(req)
528
+ d = apis.DescribeUDiskPriceRequestSchema().dumps(d)
529
+
530
+ resp = self.invoke("DescribeUDiskPrice", d, **kwargs)
531
+ return apis.DescribeUDiskPriceResponseSchema().loads(resp)
532
+
533
+ def describe_udisk_snapshot(
534
+ self, req: typing.Optional[dict] = None, **kwargs
535
+ ) -> dict:
536
+ """DescribeUDiskSnapshot - 获取UDisk快照
537
+
538
+ **Request**
539
+
540
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
541
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
542
+ - **Limit** (int) - 返回数据长度, 默认为20
543
+ - **Offset** (int) - 数据偏移量, 默认为0
544
+ - **SnapshotId** (str) - 快照id,SnapshotId , UDiskId 同时传SnapshotId优先
545
+ - **UDiskId** (str) - UDiskId,返回该盘所做快照.(必须同时传Zone)
546
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
547
+
548
+ **Response**
549
+
550
+ - **DataSet** (list) - 见 **UDiskSnapshotSet** 模型定义
551
+ - **TotalCount** (int) - 根据过滤条件得到的总数
552
+
553
+ **Response Model**
554
+
555
+ **UDiskSnapshotSet**
556
+ - **CmkId** (str) - 【已废弃】该快照的cmk id
557
+ - **CmkIdAlias** (str) - 【已废弃】cmk id 别名
558
+ - **CmkIdStatus** (str) - 【已废弃】该快照cmk的状态, Enabled(正常),Disabled(失效),Deleted(删除),NoCmkId(非加密盘)
559
+ - **Comment** (str) - 快照描述
560
+ - **CreateTime** (int) - 创建时间
561
+ - **DataKey** (str) - 【已废弃】该快照的密文密钥
562
+ - **DiskType** (int) - 磁盘类型,0:普通数据盘;1:普通系统盘;2:SSD数据盘;3:SSD系统盘;4:RSSD数据盘;5:RSSD系统盘。
563
+ - **ExpiredTime** (int) - 【已废弃】过期时间
564
+ - **IsUDiskAvailable** (bool) - 对应磁盘是否处于可用状态
565
+ - **Name** (str) - 快照名称
566
+ - **Size** (int) - 容量单位GB
567
+ - **SnapshotId** (str) - 快照Id
568
+ - **Status** (str) - 快照状态,Normal:正常,Failed:失败,Creating:制作中
569
+ - **UDiskId** (str) - 快照的源UDisk的Id
570
+ - **UDiskName** (str) - 快照的源UDisk的Name
571
+ - **UHostId** (str) - 对应磁盘制作快照时所挂载的主机
572
+ - **UKmsMode** (str) - 【已废弃】是否是加密盘快照,是:"Yes", 否:"No"
573
+ - **Version** (str) - 快照版本
574
+ - **Zone** (str) - 可用区
575
+
576
+
577
+ """
578
+ # build request
579
+ d = {
580
+ "ProjectId": self.config.project_id,
581
+ "Region": self.config.region,
582
+ }
583
+ req and d.update(req)
584
+ d = apis.DescribeUDiskSnapshotRequestSchema().dumps(d)
585
+
586
+ resp = self.invoke("DescribeUDiskSnapshot", d, **kwargs)
587
+ return apis.DescribeUDiskSnapshotResponseSchema().loads(resp)
588
+
589
+ def describe_udisk_upgrade_price(
590
+ self, req: typing.Optional[dict] = None, **kwargs
591
+ ) -> dict:
592
+ """DescribeUDiskUpgradePrice - 获取UDisk升级价格信息
593
+
594
+ **Request**
595
+
596
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
597
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
598
+ - **Size** (int) - (Required) 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];普通系统盘:范围[1~8000];SSD系统盘:范围[1~4000];RSSD数据盘:范围[1~32000];RSSD系统盘:范围[1~4000];高效数据盘:范围[1~32000];高效系统盘:范围[1~500]。
599
+ - **SourceId** (str) - (Required) 升级目标UDisk ID
600
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
601
+ - **BackupMode** (str) - 快照服务备份策略。默认采用基础版套餐开通,“Base”:基础版,“ Ultimate”:旗舰版,“ Custom”:自定义备份链
602
+ - **Day** (int) - BackupMode为Custom时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30
603
+ - **DiskType** (str) - 【已废弃】UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),SystemDisk(普通系统盘),SSDSystemDisk(SSD系统盘),RSSDSystemDisk(RSSD系统盘),EfficiencySystemDisk(高效系统盘),默认值(DataDisk)
604
+ - **Hour** (int) - BackupMode为Custom时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96
605
+ - **Journal** (int) - BackupMode为Custom时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48
606
+ - **MachineType** (str) - 【已废弃】云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考 `云主机机型说明 <https://docs.ucloud.cn/api/uhost-api/uhost_type>`_ 。
607
+ - **SnapshotService** (str) - 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No。仅支持查询开启快照服务的价格。
608
+ - **UDataArkMode** (str) - 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No
609
+
610
+ **Response**
611
+
612
+ - **OriginalPrice** (int) - 用户折后价 (对应计费CustomPrice)
613
+ - **Price** (int) - 价格
614
+
615
+ """
616
+ # build request
617
+ d = {
618
+ "ProjectId": self.config.project_id,
619
+ "Region": self.config.region,
620
+ }
621
+ req and d.update(req)
622
+ d = apis.DescribeUDiskUpgradePriceRequestSchema().dumps(d)
623
+
624
+ resp = self.invoke("DescribeUDiskUpgradePrice", d, **kwargs)
625
+ return apis.DescribeUDiskUpgradePriceResponseSchema().loads(resp)
626
+
627
+ def detach_delete_udisk(
628
+ self, req: typing.Optional[dict] = None, **kwargs
629
+ ) -> dict:
630
+ """DetachDeleteUDisk - 卸载删除某个已经挂载在指定UHost实例上的UDisk
631
+
632
+ **Request**
633
+
634
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
635
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
636
+ - **UDiskId** (str) - (Required) 需要卸载的UDisk实例ID
637
+ - **DeleteSnapshotService** (str) - 是否删除快照服务。Yes:删除,No:不删除,默认值:Yes。
638
+ - **HostId** (str) - Host实例ID
639
+ - **UHostId** (str) - UHost实例ID。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】
640
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
641
+
642
+ **Response**
643
+
644
+ - **HostId** (str) - 卸载的Host实例ID
645
+ - **UDiskId** (str) - 卸载删除的UDisk实例ID
646
+ - **UHostId** (str) - 卸载的UHost实例ID。【即将废弃,建议使用HostId】
647
+
648
+ """
649
+ # build request
650
+ d = {
651
+ "ProjectId": self.config.project_id,
652
+ "Region": self.config.region,
653
+ }
654
+ req and d.update(req)
655
+ d = apis.DetachDeleteUDiskRequestSchema().dumps(d)
656
+
657
+ resp = self.invoke("DetachDeleteUDisk", d, **kwargs)
658
+ return apis.DetachDeleteUDiskResponseSchema().loads(resp)
659
+
660
+ def detach_udisk(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
661
+ """DetachUDisk - 卸载某个已经挂载在指定UHost实例上的UDisk
662
+
663
+ **Request**
664
+
665
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
666
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
667
+ - **UDiskId** (str) - (Required) 需要卸载的UDisk实例ID
668
+ - **HostId** (str) - Host实例ID
669
+ - **UHostId** (str) - UHost实例ID。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】
670
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
671
+
672
+ **Response**
673
+
674
+ - **HostId** (str) - 卸载的Host实例ID
675
+ - **UDiskId** (str) - 卸载的UDisk实例ID
676
+ - **UHostId** (str) - 卸载的UHost实例ID。【即将废弃,建议使用HostId】
677
+
678
+ """
679
+ # build request
680
+ d = {
681
+ "ProjectId": self.config.project_id,
682
+ "Region": self.config.region,
683
+ }
684
+ req and d.update(req)
685
+ d = apis.DetachUDiskRequestSchema().dumps(d)
686
+
687
+ resp = self.invoke("DetachUDisk", d, **kwargs)
688
+ return apis.DetachUDiskResponseSchema().loads(resp)
689
+
690
+ def recover_udisk(
691
+ self, req: typing.Optional[dict] = None, **kwargs
692
+ ) -> dict:
693
+ """RecoverUDisk - 从回收站中恢复云硬盘
694
+
695
+ **Request**
696
+
697
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
698
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
699
+ - **UDiskId** (str) - (Required) 云硬盘资源ID
700
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
701
+ - **ChargeType** (str) - Year , Month, Dynamic 默认: Dynamic
702
+ - **Quantity** (int) - 购买时长 默认: 1
703
+
704
+ **Response**
705
+
706
+
707
+ """
708
+ # build request
709
+ d = {
710
+ "ProjectId": self.config.project_id,
711
+ "Region": self.config.region,
712
+ }
713
+ req and d.update(req)
714
+ d = apis.RecoverUDiskRequestSchema().dumps(d)
715
+
716
+ resp = self.invoke("RecoverUDisk", d, **kwargs)
717
+ return apis.RecoverUDiskResponseSchema().loads(resp)
718
+
719
+ def rename_udisk(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
720
+ """RenameUDisk - 重命名UDisk
721
+
722
+ **Request**
723
+
724
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
725
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
726
+ - **UDiskId** (str) - (Required) 重命名的UDisk的Id
727
+ - **UDiskName** (str) - (Required) 重命名UDisk的name
728
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
729
+
730
+ **Response**
731
+
732
+
733
+ """
734
+ # build request
735
+ d = {
736
+ "ProjectId": self.config.project_id,
737
+ "Region": self.config.region,
738
+ }
739
+ req and d.update(req)
740
+ d = apis.RenameUDiskRequestSchema().dumps(d)
741
+
742
+ resp = self.invoke("RenameUDisk", d, **kwargs)
743
+ return apis.RenameUDiskResponseSchema().loads(resp)
744
+
745
+ def resize_udisk(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
746
+ """ResizeUDisk - 调整UDisk容量
747
+
748
+ **Request**
749
+
750
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
751
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
752
+ - **Size** (int) - (Required) 调整后大小, 单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000]。
753
+ - **UDiskId** (str) - (Required) UDisk Id
754
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
755
+ - **CouponId** (str) - 使用的代金券id
756
+ - **MachineType** (str) - 云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考 `云主机机型说明 <https://docs.ucloud.cn/api/uhost-api/uhost_type>`_ 。
757
+
758
+ **Response**
759
+
760
+
761
+ """
762
+ # build request
763
+ d = {
764
+ "ProjectId": self.config.project_id,
765
+ "Region": self.config.region,
766
+ }
767
+ req and d.update(req)
768
+ d = apis.ResizeUDiskRequestSchema().dumps(d)
769
+
770
+ resp = self.invoke("ResizeUDisk", d, **kwargs)
771
+ return apis.ResizeUDiskResponseSchema().loads(resp)
772
+
773
+ def restore_udisk(
774
+ self, req: typing.Optional[dict] = None, **kwargs
775
+ ) -> dict:
776
+ """RestoreUDisk - 从备份恢复数据至UDisk
777
+
778
+ **Request**
779
+
780
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
781
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
782
+ - **UDiskId** (str) - (Required) 需要恢复的盘ID
783
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
784
+ - **SnapshotId** (str) - 从指定的快照恢复
785
+ - **SnapshotTime** (int) - 指定从方舟恢复的备份时间点
786
+
787
+ **Response**
788
+
789
+
790
+ """
791
+ # build request
792
+ d = {
793
+ "ProjectId": self.config.project_id,
794
+ "Region": self.config.region,
795
+ }
796
+ req and d.update(req)
797
+ d = apis.RestoreUDiskRequestSchema().dumps(d)
798
+
799
+ # build options
800
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
801
+
802
+ resp = self.invoke("RestoreUDisk", d, **kwargs)
803
+ return apis.RestoreUDiskResponseSchema().loads(resp)
804
+
805
+ def set_udisk_udataark_mode(
806
+ self, req: typing.Optional[dict] = None, **kwargs
807
+ ) -> dict:
808
+ """SetUDiskUDataArkMode - 设置UDisk数据方舟的状态
809
+
810
+ **Request**
811
+
812
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
813
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
814
+ - **UDiskId** (str) - (Required) 需要设置数据方舟的UDisk的Id
815
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
816
+ - **CouponId** (str) - 使用的代金券id
817
+ - **UDataArkMode** (str) - 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No
818
+
819
+ **Response**
820
+
821
+
822
+ """
823
+ # build request
824
+ d = {
825
+ "ProjectId": self.config.project_id,
826
+ "Region": self.config.region,
827
+ }
828
+ req and d.update(req)
829
+ d = apis.SetUDiskUDataArkModeRequestSchema().dumps(d)
830
+
831
+ resp = self.invoke("SetUDiskUDataArkMode", d, **kwargs)
832
+ return apis.SetUDiskUDataArkModeResponseSchema().loads(resp)