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,328 @@
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.ufs.schemas import apis
8
+
9
+
10
+ class UFSClient(Client):
11
+ def __init__(
12
+ self, config: dict, transport=None, middleware=None, logger=None
13
+ ):
14
+ super(UFSClient, self).__init__(config, transport, middleware, logger)
15
+
16
+ def add_ufs_volume_mount_point(
17
+ self, req: typing.Optional[dict] = None, **kwargs
18
+ ) -> dict:
19
+ """AddUFSVolumeMountPoint - 添加文件系统挂载点
20
+
21
+ **Request**
22
+
23
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
24
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
25
+ - **MountPointName** (str) - (Required) 挂载点名称
26
+ - **SubnetId** (str) - (Required) Subnet ID
27
+ - **VolumeId** (str) - (Required) 文件系统ID
28
+ - **VpcId** (str) - (Required) Vpc ID
29
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
30
+
31
+ **Response**
32
+
33
+
34
+ """
35
+ # build request
36
+ d = {
37
+ "ProjectId": self.config.project_id,
38
+ "Region": self.config.region,
39
+ }
40
+ req and d.update(req)
41
+ d = apis.AddUFSVolumeMountPointRequestSchema().dumps(d)
42
+
43
+ # build options
44
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
45
+
46
+ resp = self.invoke("AddUFSVolumeMountPoint", d, **kwargs)
47
+ return apis.AddUFSVolumeMountPointResponseSchema().loads(resp)
48
+
49
+ def create_ufs_volume(
50
+ self, req: typing.Optional[dict] = None, **kwargs
51
+ ) -> dict:
52
+ """CreateUFSVolume - 创建文件系统
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
+ - **ProtocolType** (str) - (Required) 文件系统协议,目前仅支持NFSv4
59
+ - **Size** (int) - (Required) 文件系统大小,单位为GB,必须为100的整数倍,容量型Size最小为500GB,性能型文件系统Size最小为100GB
60
+ - **StorageType** (str) - (Required) 文件系统存储类型,Basic表示容量型,Advanced表示性能型
61
+ - **ChargeType** (str) - 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限); Trial,试用(需开启权限) 默认为Dynamic
62
+ - **CouponId** (str) - 使用的代金券id
63
+ - **Quantity** (int) - 购买时长 默认: 1
64
+ - **Remark** (str) - 备注
65
+ - **Tag** (str) - 文件系统所属业务组
66
+ - **VolumeName** (str) - 文件系统名称
67
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
68
+
69
+ **Response**
70
+
71
+ - **VolumeId** (str) - 文件系统ID
72
+ - **VolumeName** (str) - 文件系统名称
73
+ - **VolumeStatus** (str) - 文件系统挂载点状态
74
+
75
+ """
76
+ # build request
77
+ d = {
78
+ "ProjectId": self.config.project_id,
79
+ "Region": self.config.region,
80
+ }
81
+ req and d.update(req)
82
+ d = apis.CreateUFSVolumeRequestSchema().dumps(d)
83
+
84
+ # build options
85
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
86
+
87
+ resp = self.invoke("CreateUFSVolume", d, **kwargs)
88
+ return apis.CreateUFSVolumeResponseSchema().loads(resp)
89
+
90
+ def describe_ufs_volume_2(
91
+ self, req: typing.Optional[dict] = None, **kwargs
92
+ ) -> dict:
93
+ """DescribeUFSVolume2 - 获取文件系统列表
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
+ - **Limit** (int) - 文件列表长度
100
+ - **Offset** (int) - 文件列表起始
101
+ - **VolumeId** (str) - 文件系统ID
102
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
103
+
104
+ **Response**
105
+
106
+ - **DataSet** (list) - 见 **UFSVolumeInfo2** 模型定义
107
+ - **TotalCount** (int) - 文件系统总数
108
+
109
+ **Response Model**
110
+
111
+ **UFSVolumeInfo2**
112
+ - **CreateTime** (int) - 文件系统创建时间(unix时间戳)
113
+ - **ExpiredTime** (int) - 文件系统过期时间(unix时间戳)
114
+ - **IsExpired** (str) - 是否过期
115
+ - **MaxMountPointNum** (int) - 文件系统允许创建的最大挂载点数目
116
+ - **ProtocolType** (str) - 文件系统协议,枚举值,NFSv3表示NFS V3协议,NFSv4表示NFS V4协议
117
+ - **Remark** (str) - 文件系统备注信息
118
+ - **Size** (int) - 文件系统大小,单位GB
119
+ - **StorageType** (str) - 文件系统存储类型,枚举值,Basic表示容量型,Advanced表示性能型
120
+ - **Tag** (str) - 文件系统所属业务组
121
+ - **TotalMountPointNum** (int) - 当前文件系统已创建的挂载点数目
122
+ - **UsedSize** (int) - 文件系统当前使用容量,单位GB
123
+ - **VolumeId** (str) - 文件系统ID
124
+ - **VolumeName** (str) - 文件系统名称
125
+
126
+
127
+ """
128
+ # build request
129
+ d = {
130
+ "ProjectId": self.config.project_id,
131
+ "Region": self.config.region,
132
+ }
133
+ req and d.update(req)
134
+ d = apis.DescribeUFSVolume2RequestSchema().dumps(d)
135
+
136
+ resp = self.invoke("DescribeUFSVolume2", d, **kwargs)
137
+ return apis.DescribeUFSVolume2ResponseSchema().loads(resp)
138
+
139
+ def describe_ufs_volume_mountpoint(
140
+ self, req: typing.Optional[dict] = None, **kwargs
141
+ ) -> dict:
142
+ """DescribeUFSVolumeMountpoint - 获取文件系统挂载点信息
143
+
144
+ **Request**
145
+
146
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
147
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
148
+ - **VolumeId** (str) - (Required) 文件系统ID
149
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
150
+
151
+ **Response**
152
+
153
+ - **DataSet** (list) - 见 **MountPointInfo** 模型定义
154
+ - **MaxMountPointNum** (int) - 文件系统能创建的最大挂载点数目
155
+ - **TotalMountPointNum** (int) - 目前的挂载点总数
156
+
157
+ **Response Model**
158
+
159
+ **MountPointInfo**
160
+ - **CreateTime** (int) - 文件系统创建时间(unix时间戳)
161
+ - **MountPointIp** (str) - ${挂载点IP}:/
162
+ - **MountPointName** (str) - 挂载点名称
163
+ - **SubnetDescription** (str) - Subnet ID + 网段的形式,方便前端展示
164
+ - **SubnetId** (str) - Subnet ID
165
+ - **VpcId** (str) - Vpc ID
166
+
167
+
168
+ """
169
+ # build request
170
+ d = {
171
+ "ProjectId": self.config.project_id,
172
+ "Region": self.config.region,
173
+ }
174
+ req and d.update(req)
175
+ d = apis.DescribeUFSVolumeMountpointRequestSchema().dumps(d)
176
+
177
+ resp = self.invoke("DescribeUFSVolumeMountpoint", d, **kwargs)
178
+ return apis.DescribeUFSVolumeMountpointResponseSchema().loads(resp)
179
+
180
+ def describe_ufs_volume_price(
181
+ self, req: typing.Optional[dict] = None, **kwargs
182
+ ) -> dict:
183
+ """DescribeUFSVolumePrice - 获取文件系统价格
184
+
185
+ **Request**
186
+
187
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
188
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
189
+ - **Size** (int) - (Required) 文件系统大小,单位为GB,新架构容量型最小容量为500GB,以100GB递增,最大不超过100TB。新架构性能型最小容量为100GB,以100GB递增,最大不超过20TB
190
+ - **StorageType** (str) - (Required) 文件存储类型,枚举值,Basic表示容量型产品,Advanced表示性能型产品
191
+ - **ChargeType** (str) - Year, Month, Dynamic,Trial,默认: Dynamic
192
+ - **Quantity** (int) - 购买UFS的时长, 默认为1
193
+ - **VolumeId** (str) - 文件系统id,第一次创建文件系统时不需要传这个参数
194
+
195
+ **Response**
196
+
197
+ - **DataSet** (list) - 见 **UFSPriceDataSet** 模型定义
198
+
199
+ **Response Model**
200
+
201
+ **UFSPriceDataSet**
202
+ - **ChargeName** (str) - “UFS”
203
+ - **ChargeType** (str) - Year, Month, Dynamic,Trial
204
+ - **Price** (float) - 价格 (单位: 分)
205
+
206
+
207
+ """
208
+ # build request
209
+ d = {
210
+ "ProjectId": self.config.project_id,
211
+ "Region": self.config.region,
212
+ }
213
+ req and d.update(req)
214
+ d = apis.DescribeUFSVolumePriceRequestSchema().dumps(d)
215
+
216
+ resp = self.invoke("DescribeUFSVolumePrice", d, **kwargs)
217
+ return apis.DescribeUFSVolumePriceResponseSchema().loads(resp)
218
+
219
+ def extend_ufs_volume(
220
+ self, req: typing.Optional[dict] = None, **kwargs
221
+ ) -> dict:
222
+ """ExtendUFSVolume - 文件系统扩容
223
+
224
+ **Request**
225
+
226
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
227
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
228
+ - **Size** (int) - (Required) 文件系统大小,单位为GB,最大不超过20T,香港容量型必须为100的整数倍,Size最小为500GB,北京,上海,广州的容量型必须为1024的整数倍,Size最小为1024GB。性能型文件系统Size最小为100GB
229
+ - **VolumeId** (str) - (Required) 文件系统ID
230
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
231
+
232
+ **Response**
233
+
234
+
235
+ """
236
+ # build request
237
+ d = {
238
+ "ProjectId": self.config.project_id,
239
+ "Region": self.config.region,
240
+ }
241
+ req and d.update(req)
242
+ d = apis.ExtendUFSVolumeRequestSchema().dumps(d)
243
+
244
+ resp = self.invoke("ExtendUFSVolume", d, **kwargs)
245
+ return apis.ExtendUFSVolumeResponseSchema().loads(resp)
246
+
247
+ def remove_ufs_volume(
248
+ self, req: typing.Optional[dict] = None, **kwargs
249
+ ) -> dict:
250
+ """RemoveUFSVolume - 删除UFS文件系统
251
+
252
+ **Request**
253
+
254
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
255
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
256
+ - **VolumeId** (str) - (Required) 文件系统ID
257
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
258
+
259
+ **Response**
260
+
261
+
262
+ """
263
+ # build request
264
+ d = {
265
+ "ProjectId": self.config.project_id,
266
+ "Region": self.config.region,
267
+ }
268
+ req and d.update(req)
269
+ d = apis.RemoveUFSVolumeRequestSchema().dumps(d)
270
+
271
+ resp = self.invoke("RemoveUFSVolume", d, **kwargs)
272
+ return apis.RemoveUFSVolumeResponseSchema().loads(resp)
273
+
274
+ def remove_ufs_volume_mount_point(
275
+ self, req: typing.Optional[dict] = None, **kwargs
276
+ ) -> dict:
277
+ """RemoveUFSVolumeMountPoint - 删除文件系统挂载点
278
+
279
+ **Request**
280
+
281
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
282
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
283
+ - **SubnetId** (str) - (Required) Subnet ID
284
+ - **VolumeId** (str) - (Required) 文件系统ID
285
+ - **VpcId** (str) - (Required) Vpc ID
286
+
287
+ **Response**
288
+
289
+
290
+ """
291
+ # build request
292
+ d = {
293
+ "ProjectId": self.config.project_id,
294
+ "Region": self.config.region,
295
+ }
296
+ req and d.update(req)
297
+ d = apis.RemoveUFSVolumeMountPointRequestSchema().dumps(d)
298
+
299
+ resp = self.invoke("RemoveUFSVolumeMountPoint", d, **kwargs)
300
+ return apis.RemoveUFSVolumeMountPointResponseSchema().loads(resp)
301
+
302
+ def update_ufs_volume_info(
303
+ self, req: typing.Optional[dict] = None, **kwargs
304
+ ) -> dict:
305
+ """UpdateUFSVolumeInfo - 更改文件系统相关信息(名称/备注)
306
+
307
+ **Request**
308
+
309
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
310
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
311
+ - **VolumeId** (str) - (Required) 文件系统ID
312
+ - **Remark** (str) - 文件系统备注(文件系统名称/备注至少传入其中一个)
313
+ - **VolumeName** (str) - 文件系统名称(文件系统名称/备注至少传入其中一个)
314
+
315
+ **Response**
316
+
317
+
318
+ """
319
+ # build request
320
+ d = {
321
+ "ProjectId": self.config.project_id,
322
+ "Region": self.config.region,
323
+ }
324
+ req and d.update(req)
325
+ d = apis.UpdateUFSVolumeInfoRequestSchema().dumps(d)
326
+
327
+ resp = self.invoke("UpdateUFSVolumeInfo", d, **kwargs)
328
+ return apis.UpdateUFSVolumeInfoResponseSchema().loads(resp)
File without changes
@@ -0,0 +1,265 @@
1
+ """ Code is generated by ucloud-model, DO NOT EDIT IT. """
2
+
3
+ from ucloud.core.typesystem import schema, fields
4
+ from ucloud.services.ufs.schemas import models
5
+
6
+ """ UFS API Schema
7
+ """
8
+
9
+
10
+ """
11
+ API: AddUFSVolumeMountPoint
12
+
13
+ 添加文件系统挂载点
14
+ """
15
+
16
+
17
+ class AddUFSVolumeMountPointRequestSchema(schema.RequestSchema):
18
+ """AddUFSVolumeMountPoint - 添加文件系统挂载点"""
19
+
20
+ fields = {
21
+ "MountPointName": fields.Str(required=True, dump_to="MountPointName"),
22
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
23
+ "Region": fields.Str(required=True, dump_to="Region"),
24
+ "SubnetId": fields.Str(required=True, dump_to="SubnetId"),
25
+ "VolumeId": fields.Str(required=True, dump_to="VolumeId"),
26
+ "VpcId": fields.Str(required=True, dump_to="VpcId"),
27
+ "Zone": fields.Str(required=False, dump_to="Zone"),
28
+ }
29
+
30
+
31
+ class AddUFSVolumeMountPointResponseSchema(schema.ResponseSchema):
32
+ """AddUFSVolumeMountPoint - 添加文件系统挂载点"""
33
+
34
+ fields = {}
35
+
36
+
37
+ """
38
+ API: CreateUFSVolume
39
+
40
+ 创建文件系统
41
+ """
42
+
43
+
44
+ class CreateUFSVolumeRequestSchema(schema.RequestSchema):
45
+ """CreateUFSVolume - 创建文件系统"""
46
+
47
+ fields = {
48
+ "ChargeType": fields.Str(required=False, dump_to="ChargeType"),
49
+ "CouponId": fields.Str(required=False, dump_to="CouponId"),
50
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
51
+ "ProtocolType": fields.Str(required=True, dump_to="ProtocolType"),
52
+ "Quantity": fields.Int(required=False, dump_to="Quantity"),
53
+ "Region": fields.Str(required=True, dump_to="Region"),
54
+ "Remark": fields.Str(required=False, dump_to="Remark"),
55
+ "Size": fields.Int(required=True, dump_to="Size"),
56
+ "StorageType": fields.Str(required=True, dump_to="StorageType"),
57
+ "Tag": fields.Str(required=False, dump_to="Tag"),
58
+ "VolumeName": fields.Str(required=False, dump_to="VolumeName"),
59
+ "Zone": fields.Str(required=False, dump_to="Zone"),
60
+ }
61
+
62
+
63
+ class CreateUFSVolumeResponseSchema(schema.ResponseSchema):
64
+ """CreateUFSVolume - 创建文件系统"""
65
+
66
+ fields = {
67
+ "VolumeId": fields.Str(required=True, load_from="VolumeId"),
68
+ "VolumeName": fields.Str(required=True, load_from="VolumeName"),
69
+ "VolumeStatus": fields.Str(required=True, load_from="VolumeStatus"),
70
+ }
71
+
72
+
73
+ """
74
+ API: DescribeUFSVolume2
75
+
76
+ 获取文件系统列表
77
+ """
78
+
79
+
80
+ class DescribeUFSVolume2RequestSchema(schema.RequestSchema):
81
+ """DescribeUFSVolume2 - 获取文件系统列表"""
82
+
83
+ fields = {
84
+ "Limit": fields.Int(required=False, dump_to="Limit"),
85
+ "Offset": fields.Int(required=False, dump_to="Offset"),
86
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
87
+ "Region": fields.Str(required=True, dump_to="Region"),
88
+ "VolumeId": fields.Str(required=False, dump_to="VolumeId"),
89
+ "Zone": fields.Str(required=False, dump_to="Zone"),
90
+ }
91
+
92
+
93
+ class DescribeUFSVolume2ResponseSchema(schema.ResponseSchema):
94
+ """DescribeUFSVolume2 - 获取文件系统列表"""
95
+
96
+ fields = {
97
+ "DataSet": fields.List(
98
+ models.UFSVolumeInfo2Schema(), required=True, load_from="DataSet"
99
+ ),
100
+ "TotalCount": fields.Int(required=True, load_from="TotalCount"),
101
+ }
102
+
103
+
104
+ """
105
+ API: DescribeUFSVolumeMountpoint
106
+
107
+ 获取文件系统挂载点信息
108
+ """
109
+
110
+
111
+ class DescribeUFSVolumeMountpointRequestSchema(schema.RequestSchema):
112
+ """DescribeUFSVolumeMountpoint - 获取文件系统挂载点信息"""
113
+
114
+ fields = {
115
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
116
+ "Region": fields.Str(required=True, dump_to="Region"),
117
+ "VolumeId": fields.Str(required=True, dump_to="VolumeId"),
118
+ "Zone": fields.Str(required=False, dump_to="Zone"),
119
+ }
120
+
121
+
122
+ class DescribeUFSVolumeMountpointResponseSchema(schema.ResponseSchema):
123
+ """DescribeUFSVolumeMountpoint - 获取文件系统挂载点信息"""
124
+
125
+ fields = {
126
+ "DataSet": fields.List(
127
+ models.MountPointInfoSchema(), required=True, load_from="DataSet"
128
+ ),
129
+ "MaxMountPointNum": fields.Int(
130
+ required=True, load_from="MaxMountPointNum"
131
+ ),
132
+ "TotalMountPointNum": fields.Int(
133
+ required=True, load_from="TotalMountPointNum"
134
+ ),
135
+ }
136
+
137
+
138
+ """
139
+ API: DescribeUFSVolumePrice
140
+
141
+ 获取文件系统价格
142
+ """
143
+
144
+
145
+ class DescribeUFSVolumePriceRequestSchema(schema.RequestSchema):
146
+ """DescribeUFSVolumePrice - 获取文件系统价格"""
147
+
148
+ fields = {
149
+ "ChargeType": fields.Str(required=False, dump_to="ChargeType"),
150
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
151
+ "Quantity": fields.Int(required=False, dump_to="Quantity"),
152
+ "Region": fields.Str(required=True, dump_to="Region"),
153
+ "Size": fields.Int(required=True, dump_to="Size"),
154
+ "StorageType": fields.Str(required=True, dump_to="StorageType"),
155
+ "VolumeId": fields.Str(required=False, dump_to="VolumeId"),
156
+ }
157
+
158
+
159
+ class DescribeUFSVolumePriceResponseSchema(schema.ResponseSchema):
160
+ """DescribeUFSVolumePrice - 获取文件系统价格"""
161
+
162
+ fields = {
163
+ "DataSet": fields.List(
164
+ models.UFSPriceDataSetSchema(), required=False, load_from="DataSet"
165
+ ),
166
+ }
167
+
168
+
169
+ """
170
+ API: ExtendUFSVolume
171
+
172
+ 文件系统扩容
173
+ """
174
+
175
+
176
+ class ExtendUFSVolumeRequestSchema(schema.RequestSchema):
177
+ """ExtendUFSVolume - 文件系统扩容"""
178
+
179
+ fields = {
180
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
181
+ "Region": fields.Str(required=True, dump_to="Region"),
182
+ "Size": fields.Int(required=True, dump_to="Size"),
183
+ "VolumeId": fields.Str(required=True, dump_to="VolumeId"),
184
+ "Zone": fields.Str(required=False, dump_to="Zone"),
185
+ }
186
+
187
+
188
+ class ExtendUFSVolumeResponseSchema(schema.ResponseSchema):
189
+ """ExtendUFSVolume - 文件系统扩容"""
190
+
191
+ fields = {}
192
+
193
+
194
+ """
195
+ API: RemoveUFSVolume
196
+
197
+ 删除UFS文件系统
198
+ """
199
+
200
+
201
+ class RemoveUFSVolumeRequestSchema(schema.RequestSchema):
202
+ """RemoveUFSVolume - 删除UFS文件系统"""
203
+
204
+ fields = {
205
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
206
+ "Region": fields.Str(required=True, dump_to="Region"),
207
+ "VolumeId": fields.Str(required=True, dump_to="VolumeId"),
208
+ "Zone": fields.Str(required=False, dump_to="Zone"),
209
+ }
210
+
211
+
212
+ class RemoveUFSVolumeResponseSchema(schema.ResponseSchema):
213
+ """RemoveUFSVolume - 删除UFS文件系统"""
214
+
215
+ fields = {}
216
+
217
+
218
+ """
219
+ API: RemoveUFSVolumeMountPoint
220
+
221
+ 删除文件系统挂载点
222
+ """
223
+
224
+
225
+ class RemoveUFSVolumeMountPointRequestSchema(schema.RequestSchema):
226
+ """RemoveUFSVolumeMountPoint - 删除文件系统挂载点"""
227
+
228
+ fields = {
229
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
230
+ "Region": fields.Str(required=True, dump_to="Region"),
231
+ "SubnetId": fields.Str(required=True, dump_to="SubnetId"),
232
+ "VolumeId": fields.Str(required=True, dump_to="VolumeId"),
233
+ "VpcId": fields.Str(required=True, dump_to="VpcId"),
234
+ }
235
+
236
+
237
+ class RemoveUFSVolumeMountPointResponseSchema(schema.ResponseSchema):
238
+ """RemoveUFSVolumeMountPoint - 删除文件系统挂载点"""
239
+
240
+ fields = {}
241
+
242
+
243
+ """
244
+ API: UpdateUFSVolumeInfo
245
+
246
+ 更改文件系统相关信息(名称/备注)
247
+ """
248
+
249
+
250
+ class UpdateUFSVolumeInfoRequestSchema(schema.RequestSchema):
251
+ """UpdateUFSVolumeInfo - 更改文件系统相关信息(名称/备注)"""
252
+
253
+ fields = {
254
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
255
+ "Region": fields.Str(required=True, dump_to="Region"),
256
+ "Remark": fields.Str(required=False, dump_to="Remark"),
257
+ "VolumeId": fields.Str(required=True, dump_to="VolumeId"),
258
+ "VolumeName": fields.Str(required=False, dump_to="VolumeName"),
259
+ }
260
+
261
+
262
+ class UpdateUFSVolumeInfoResponseSchema(schema.ResponseSchema):
263
+ """UpdateUFSVolumeInfo - 更改文件系统相关信息(名称/备注)"""
264
+
265
+ fields = {}
@@ -0,0 +1,52 @@
1
+ """ Code is generated by ucloud-model, DO NOT EDIT IT. """
2
+
3
+ from ucloud.core.typesystem import schema, fields
4
+
5
+
6
+ class UFSVolumeInfo2Schema(schema.ResponseSchema):
7
+ """UFSVolumeInfo2 - 文件系统信息"""
8
+
9
+ fields = {
10
+ "CreateTime": fields.Int(required=False, load_from="CreateTime"),
11
+ "ExpiredTime": fields.Int(required=False, load_from="ExpiredTime"),
12
+ "IsExpired": fields.Str(required=False, load_from="IsExpired"),
13
+ "MaxMountPointNum": fields.Int(
14
+ required=True, load_from="MaxMountPointNum"
15
+ ),
16
+ "ProtocolType": fields.Str(required=True, load_from="ProtocolType"),
17
+ "Remark": fields.Str(required=False, load_from="Remark"),
18
+ "Size": fields.Int(required=False, load_from="Size"),
19
+ "StorageType": fields.Str(required=True, load_from="StorageType"),
20
+ "Tag": fields.Str(required=False, load_from="Tag"),
21
+ "TotalMountPointNum": fields.Int(
22
+ required=True, load_from="TotalMountPointNum"
23
+ ),
24
+ "UsedSize": fields.Int(required=False, load_from="UsedSize"),
25
+ "VolumeId": fields.Str(required=True, load_from="VolumeId"),
26
+ "VolumeName": fields.Str(required=True, load_from="VolumeName"),
27
+ }
28
+
29
+
30
+ class MountPointInfoSchema(schema.ResponseSchema):
31
+ """MountPointInfo - 挂载点信息"""
32
+
33
+ fields = {
34
+ "CreateTime": fields.Int(required=True, load_from="CreateTime"),
35
+ "MountPointIp": fields.Str(required=True, load_from="MountPointIp"),
36
+ "MountPointName": fields.Str(required=True, load_from="MountPointName"),
37
+ "SubnetDescription": fields.Str(
38
+ required=True, load_from="SubnetDescription"
39
+ ),
40
+ "SubnetId": fields.Str(required=True, load_from="SubnetId"),
41
+ "VpcId": fields.Str(required=True, load_from="VpcId"),
42
+ }
43
+
44
+
45
+ class UFSPriceDataSetSchema(schema.ResponseSchema):
46
+ """UFSPriceDataSet - ufs 价格信息"""
47
+
48
+ fields = {
49
+ "ChargeName": fields.Str(required=False, load_from="ChargeName"),
50
+ "ChargeType": fields.Str(required=False, load_from="ChargeType"),
51
+ "Price": fields.Float(required=False, load_from="Price"),
52
+ }
File without changes