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,252 @@
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.upfs.schemas import apis
8
+
9
+
10
+ class UPFSClient(Client):
11
+ def __init__(
12
+ self, config: dict, transport=None, middleware=None, logger=None
13
+ ):
14
+ super(UPFSClient, self).__init__(config, transport, middleware, logger)
15
+
16
+ def create_upfs_volume(
17
+ self, req: typing.Optional[dict] = None, **kwargs
18
+ ) -> dict:
19
+ """CreateUPFSVolume - 创建UPFS文件系统
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
+ - **ProtocolType** (str) - (Required) 文件系统协议,目前仅支持POSIX
26
+ - **Size** (int) - (Required) 文件系统大小,单位为GB,必须为100的整数倍,Size最小为500GB
27
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
28
+ - **ChargeType** (str) - 计费模式,枚举值为: Year,按年付费; Month,按月付费
29
+ - **CouponId** (str) - 使用的代金券id
30
+ - **Quantity** (int) - 购买时长 默认: 1
31
+ - **Remark** (str) - 备注
32
+ - **Tag** (str) - 文件系统所属业务组
33
+ - **VolumeName** (str) - 文件系统名称
34
+
35
+ **Response**
36
+
37
+ - **VolumeId** (str) - UPFS文件系统ID
38
+ - **VolumeName** (str) - UPFS文件系统名称
39
+
40
+ """
41
+ # build request
42
+ d = {
43
+ "ProjectId": self.config.project_id,
44
+ "Region": self.config.region,
45
+ }
46
+ req and d.update(req)
47
+ d = apis.CreateUPFSVolumeRequestSchema().dumps(d)
48
+
49
+ # build options
50
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
51
+
52
+ resp = self.invoke("CreateUPFSVolume", d, **kwargs)
53
+ return apis.CreateUPFSVolumeResponseSchema().loads(resp)
54
+
55
+ def describe_upfs_volume(
56
+ self, req: typing.Optional[dict] = None, **kwargs
57
+ ) -> dict:
58
+ """DescribeUPFSVolume - 获取UPFS文件系统列表
59
+
60
+ **Request**
61
+
62
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
63
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
64
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
65
+ - **Limit** (int) - 文件列表长度
66
+ - **Offset** (int) - 文件列表起始
67
+ - **VolumeId** (str) - 文件系统ID
68
+
69
+ **Response**
70
+
71
+ - **DataSet** (list) - 见 **UPFSVolumeInfo** 模型定义
72
+ - **TotalCount** (int) - UPFS文件系统总数
73
+
74
+ **Response Model**
75
+
76
+ **UPFSVolumeInfo**
77
+ - **ChargeType** (str) - 计费类型
78
+ - **CreateTime** (int) - 文件系统创建时间(unix时间戳)
79
+ - **ExpiredTime** (int) - 文件系统过期时间(unix时间戳)
80
+ - **IsExpired** (str) - 是否过期
81
+ - **MountAddress** (str) - 文件系统挂载地址
82
+ - **MountStatus** (int) - 文件系统挂载状态
83
+ - **ProtocolType** (str) - 文件系统协议类型
84
+ - **Remark** (str) - 文件系统备注信息
85
+ - **Size** (int) - 文件系统大小,单位GB
86
+ - **Tag** (str) - 文件系统所属业务组
87
+ - **VolumeId** (str) - 文件系统ID
88
+ - **VolumeName** (str) - 文件系统名称
89
+ - **Zone** (str) - 可用区名字
90
+
91
+
92
+ """
93
+ # build request
94
+ d = {
95
+ "ProjectId": self.config.project_id,
96
+ "Region": self.config.region,
97
+ }
98
+ req and d.update(req)
99
+ d = apis.DescribeUPFSVolumeRequestSchema().dumps(d)
100
+
101
+ resp = self.invoke("DescribeUPFSVolume", d, **kwargs)
102
+ return apis.DescribeUPFSVolumeResponseSchema().loads(resp)
103
+
104
+ def describe_upfs_volume_price(
105
+ self, req: typing.Optional[dict] = None, **kwargs
106
+ ) -> dict:
107
+ """DescribeUPFSVolumePrice - 获取UPFS文件系统价格
108
+
109
+ **Request**
110
+
111
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
112
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
113
+ - **Size** (int) - (Required) 文件系统大小,单位为GB,新架构容量型最小容量为500GB,以100GB递增,最大不超过100TB。
114
+ - **ChargeType** (str) - Year, Month默认: Month
115
+ - **Quantity** (int) - 购买UPFS的时长, 默认为1
116
+ - **VolumeId** (str) - UPFS文件系统id,第一次创建文件系统时不需要传这个参数
117
+
118
+ **Response**
119
+
120
+ - **DataSet** (list) - 见 **UPFSPriceDataSet** 模型定义
121
+
122
+ **Response Model**
123
+
124
+ **UPFSPriceDataSet**
125
+ - **ChargeName** (str) - “upfs”
126
+ - **ChargeType** (str) - Year, Month
127
+ - **OriginalPrice** (float) - 原价格 (单位: 分)
128
+ - **Price** (float) - 价格 (单位: 分)
129
+
130
+
131
+ """
132
+ # build request
133
+ d = {
134
+ "ProjectId": self.config.project_id,
135
+ "Region": self.config.region,
136
+ }
137
+ req and d.update(req)
138
+ d = apis.DescribeUPFSVolumePriceRequestSchema().dumps(d)
139
+
140
+ resp = self.invoke("DescribeUPFSVolumePrice", d, **kwargs)
141
+ return apis.DescribeUPFSVolumePriceResponseSchema().loads(resp)
142
+
143
+ def describe_upfs_volume_upgrade_price(
144
+ self, req: typing.Optional[dict] = None, **kwargs
145
+ ) -> dict:
146
+ """DescribeUPFSVolumeUpgradePrice - UPFS文件系统扩容价格
147
+
148
+ **Request**
149
+
150
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
151
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
152
+ - **Size** (str) - (Required) 文件系统大小
153
+ - **VolumeId** (str) - (Required) 文件系统ID
154
+
155
+ **Response**
156
+
157
+ - **OriginalPrice** (float) - 原价格(单位:分)
158
+ - **Price** (float) - 价格(单位:分)
159
+
160
+ """
161
+ # build request
162
+ d = {
163
+ "ProjectId": self.config.project_id,
164
+ "Region": self.config.region,
165
+ }
166
+ req and d.update(req)
167
+ d = apis.DescribeUPFSVolumeUpgradePriceRequestSchema().dumps(d)
168
+
169
+ resp = self.invoke("DescribeUPFSVolumeUpgradePrice", d, **kwargs)
170
+ return apis.DescribeUPFSVolumeUpgradePriceResponseSchema().loads(resp)
171
+
172
+ def extend_upfs_volume(
173
+ self, req: typing.Optional[dict] = None, **kwargs
174
+ ) -> dict:
175
+ """ExtendUPFSVolume - UPFS文件系统扩容
176
+
177
+ **Request**
178
+
179
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
180
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
181
+ - **Size** (int) - (Required) 文件系统大小,单位为GB,最小为6000GB,最大为10PB,必须为1000的整数倍
182
+ - **VolumeId** (str) - (Required) 文件系统ID
183
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
184
+
185
+ **Response**
186
+
187
+
188
+ """
189
+ # build request
190
+ d = {
191
+ "ProjectId": self.config.project_id,
192
+ "Region": self.config.region,
193
+ }
194
+ req and d.update(req)
195
+ d = apis.ExtendUPFSVolumeRequestSchema().dumps(d)
196
+
197
+ resp = self.invoke("ExtendUPFSVolume", d, **kwargs)
198
+ return apis.ExtendUPFSVolumeResponseSchema().loads(resp)
199
+
200
+ def remove_upfs_volume(
201
+ self, req: typing.Optional[dict] = None, **kwargs
202
+ ) -> dict:
203
+ """RemoveUPFSVolume - 删除UPFS文件系统
204
+
205
+ **Request**
206
+
207
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
208
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
209
+ - **VolumeId** (str) - (Required) 文件系统ID
210
+
211
+ **Response**
212
+
213
+
214
+ """
215
+ # build request
216
+ d = {
217
+ "ProjectId": self.config.project_id,
218
+ "Region": self.config.region,
219
+ }
220
+ req and d.update(req)
221
+ d = apis.RemoveUPFSVolumeRequestSchema().dumps(d)
222
+
223
+ resp = self.invoke("RemoveUPFSVolume", d, **kwargs)
224
+ return apis.RemoveUPFSVolumeResponseSchema().loads(resp)
225
+
226
+ def update_upfs_volume_info(
227
+ self, req: typing.Optional[dict] = None, **kwargs
228
+ ) -> dict:
229
+ """UpdateUPFSVolumeInfo - 更改UPFS文件系统相关信息(名称/备注)
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
+ - **VolumeId** (str) - (Required) UPFS文件系统ID
236
+ - **Remark** (str) - UPFS文件系统备注(文件系统名称/备注至少传入其中一个)
237
+ - **VolumeName** (str) - UPFS文件系统名称(文件系统名称/备注至少传入其中一个)
238
+
239
+ **Response**
240
+
241
+
242
+ """
243
+ # build request
244
+ d = {
245
+ "ProjectId": self.config.project_id,
246
+ "Region": self.config.region,
247
+ }
248
+ req and d.update(req)
249
+ d = apis.UpdateUPFSVolumeInfoRequestSchema().dumps(d)
250
+
251
+ resp = self.invoke("UpdateUPFSVolumeInfo", d, **kwargs)
252
+ return apis.UpdateUPFSVolumeInfoResponseSchema().loads(resp)
File without changes
@@ -0,0 +1,204 @@
1
+ """ Code is generated by ucloud-model, DO NOT EDIT IT. """
2
+
3
+ from ucloud.core.typesystem import schema, fields
4
+ from ucloud.services.upfs.schemas import models
5
+
6
+ """ UPFS API Schema
7
+ """
8
+
9
+
10
+ """
11
+ API: CreateUPFSVolume
12
+
13
+ 创建UPFS文件系统
14
+ """
15
+
16
+
17
+ class CreateUPFSVolumeRequestSchema(schema.RequestSchema):
18
+ """CreateUPFSVolume - 创建UPFS文件系统"""
19
+
20
+ fields = {
21
+ "ChargeType": fields.Str(required=False, dump_to="ChargeType"),
22
+ "CouponId": fields.Str(required=False, dump_to="CouponId"),
23
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
24
+ "ProtocolType": fields.Str(required=True, dump_to="ProtocolType"),
25
+ "Quantity": fields.Int(required=False, dump_to="Quantity"),
26
+ "Region": fields.Str(required=True, dump_to="Region"),
27
+ "Remark": fields.Str(required=False, dump_to="Remark"),
28
+ "Size": fields.Int(required=True, dump_to="Size"),
29
+ "Tag": fields.Str(required=False, dump_to="Tag"),
30
+ "VolumeName": fields.Str(required=False, dump_to="VolumeName"),
31
+ "Zone": fields.Str(required=True, dump_to="Zone"),
32
+ }
33
+
34
+
35
+ class CreateUPFSVolumeResponseSchema(schema.ResponseSchema):
36
+ """CreateUPFSVolume - 创建UPFS文件系统"""
37
+
38
+ fields = {
39
+ "VolumeId": fields.Str(required=True, load_from="VolumeId"),
40
+ "VolumeName": fields.Str(required=True, load_from="VolumeName"),
41
+ }
42
+
43
+
44
+ """
45
+ API: DescribeUPFSVolume
46
+
47
+ 获取UPFS文件系统列表
48
+ """
49
+
50
+
51
+ class DescribeUPFSVolumeRequestSchema(schema.RequestSchema):
52
+ """DescribeUPFSVolume - 获取UPFS文件系统列表"""
53
+
54
+ fields = {
55
+ "Limit": fields.Int(required=False, dump_to="Limit"),
56
+ "Offset": fields.Int(required=False, dump_to="Offset"),
57
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
58
+ "Region": fields.Str(required=True, dump_to="Region"),
59
+ "VolumeId": fields.Str(required=False, dump_to="VolumeId"),
60
+ "Zone": fields.Str(required=True, dump_to="Zone"),
61
+ }
62
+
63
+
64
+ class DescribeUPFSVolumeResponseSchema(schema.ResponseSchema):
65
+ """DescribeUPFSVolume - 获取UPFS文件系统列表"""
66
+
67
+ fields = {
68
+ "DataSet": fields.List(
69
+ models.UPFSVolumeInfoSchema(), required=True, load_from="DataSet"
70
+ ),
71
+ "TotalCount": fields.Int(required=True, load_from="TotalCount"),
72
+ }
73
+
74
+
75
+ """
76
+ API: DescribeUPFSVolumePrice
77
+
78
+ 获取UPFS文件系统价格
79
+ """
80
+
81
+
82
+ class DescribeUPFSVolumePriceRequestSchema(schema.RequestSchema):
83
+ """DescribeUPFSVolumePrice - 获取UPFS文件系统价格"""
84
+
85
+ fields = {
86
+ "ChargeType": fields.Str(required=False, dump_to="ChargeType"),
87
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
88
+ "Quantity": fields.Int(required=False, dump_to="Quantity"),
89
+ "Region": fields.Str(required=True, dump_to="Region"),
90
+ "Size": fields.Int(required=True, dump_to="Size"),
91
+ "VolumeId": fields.Str(required=False, dump_to="VolumeId"),
92
+ }
93
+
94
+
95
+ class DescribeUPFSVolumePriceResponseSchema(schema.ResponseSchema):
96
+ """DescribeUPFSVolumePrice - 获取UPFS文件系统价格"""
97
+
98
+ fields = {
99
+ "DataSet": fields.List(
100
+ models.UPFSPriceDataSetSchema(), required=False, load_from="DataSet"
101
+ ),
102
+ }
103
+
104
+
105
+ """
106
+ API: DescribeUPFSVolumeUpgradePrice
107
+
108
+ UPFS文件系统扩容价格
109
+ """
110
+
111
+
112
+ class DescribeUPFSVolumeUpgradePriceRequestSchema(schema.RequestSchema):
113
+ """DescribeUPFSVolumeUpgradePrice - UPFS文件系统扩容价格"""
114
+
115
+ fields = {
116
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
117
+ "Region": fields.Str(required=True, dump_to="Region"),
118
+ "Size": fields.Str(required=True, dump_to="Size"),
119
+ "VolumeId": fields.Str(required=True, dump_to="VolumeId"),
120
+ }
121
+
122
+
123
+ class DescribeUPFSVolumeUpgradePriceResponseSchema(schema.ResponseSchema):
124
+ """DescribeUPFSVolumeUpgradePrice - UPFS文件系统扩容价格"""
125
+
126
+ fields = {
127
+ "OriginalPrice": fields.Float(
128
+ required=False, load_from="OriginalPrice"
129
+ ),
130
+ "Price": fields.Float(required=True, load_from="Price"),
131
+ }
132
+
133
+
134
+ """
135
+ API: ExtendUPFSVolume
136
+
137
+ UPFS文件系统扩容
138
+ """
139
+
140
+
141
+ class ExtendUPFSVolumeRequestSchema(schema.RequestSchema):
142
+ """ExtendUPFSVolume - UPFS文件系统扩容"""
143
+
144
+ fields = {
145
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
146
+ "Region": fields.Str(required=True, dump_to="Region"),
147
+ "Size": fields.Int(required=True, dump_to="Size"),
148
+ "VolumeId": fields.Str(required=True, dump_to="VolumeId"),
149
+ "Zone": fields.Str(required=True, dump_to="Zone"),
150
+ }
151
+
152
+
153
+ class ExtendUPFSVolumeResponseSchema(schema.ResponseSchema):
154
+ """ExtendUPFSVolume - UPFS文件系统扩容"""
155
+
156
+ fields = {}
157
+
158
+
159
+ """
160
+ API: RemoveUPFSVolume
161
+
162
+ 删除UPFS文件系统
163
+ """
164
+
165
+
166
+ class RemoveUPFSVolumeRequestSchema(schema.RequestSchema):
167
+ """RemoveUPFSVolume - 删除UPFS文件系统"""
168
+
169
+ fields = {
170
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
171
+ "Region": fields.Str(required=True, dump_to="Region"),
172
+ "VolumeId": fields.Str(required=True, dump_to="VolumeId"),
173
+ }
174
+
175
+
176
+ class RemoveUPFSVolumeResponseSchema(schema.ResponseSchema):
177
+ """RemoveUPFSVolume - 删除UPFS文件系统"""
178
+
179
+ fields = {}
180
+
181
+
182
+ """
183
+ API: UpdateUPFSVolumeInfo
184
+
185
+ 更改UPFS文件系统相关信息(名称/备注)
186
+ """
187
+
188
+
189
+ class UpdateUPFSVolumeInfoRequestSchema(schema.RequestSchema):
190
+ """UpdateUPFSVolumeInfo - 更改UPFS文件系统相关信息(名称/备注)"""
191
+
192
+ fields = {
193
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
194
+ "Region": fields.Str(required=True, dump_to="Region"),
195
+ "Remark": fields.Str(required=False, dump_to="Remark"),
196
+ "VolumeId": fields.Str(required=True, dump_to="VolumeId"),
197
+ "VolumeName": fields.Str(required=False, dump_to="VolumeName"),
198
+ }
199
+
200
+
201
+ class UpdateUPFSVolumeInfoResponseSchema(schema.ResponseSchema):
202
+ """UpdateUPFSVolumeInfo - 更改UPFS文件系统相关信息(名称/备注)"""
203
+
204
+ fields = {}
@@ -0,0 +1,36 @@
1
+ """ Code is generated by ucloud-model, DO NOT EDIT IT. """
2
+
3
+ from ucloud.core.typesystem import schema, fields
4
+
5
+
6
+ class UPFSVolumeInfoSchema(schema.ResponseSchema):
7
+ """UPFSVolumeInfo - UPFS文件系统信息"""
8
+
9
+ fields = {
10
+ "ChargeType": fields.Str(required=False, load_from="ChargeType"),
11
+ "CreateTime": fields.Int(required=False, load_from="CreateTime"),
12
+ "ExpiredTime": fields.Int(required=False, load_from="ExpiredTime"),
13
+ "IsExpired": fields.Str(required=False, load_from="IsExpired"),
14
+ "MountAddress": fields.Str(required=False, load_from="MountAddress"),
15
+ "MountStatus": fields.Int(required=False, load_from="MountStatus"),
16
+ "ProtocolType": fields.Str(required=False, load_from="ProtocolType"),
17
+ "Remark": fields.Str(required=False, load_from="Remark"),
18
+ "Size": fields.Int(required=False, load_from="Size"),
19
+ "Tag": fields.Str(required=False, load_from="Tag"),
20
+ "VolumeId": fields.Str(required=False, load_from="VolumeId"),
21
+ "VolumeName": fields.Str(required=False, load_from="VolumeName"),
22
+ "Zone": fields.Str(required=False, load_from="Zone"),
23
+ }
24
+
25
+
26
+ class UPFSPriceDataSetSchema(schema.ResponseSchema):
27
+ """UPFSPriceDataSet - upfs 价格信息"""
28
+
29
+ fields = {
30
+ "ChargeName": fields.Str(required=False, load_from="ChargeName"),
31
+ "ChargeType": fields.Str(required=False, load_from="ChargeType"),
32
+ "OriginalPrice": fields.Float(
33
+ required=False, load_from="OriginalPrice"
34
+ ),
35
+ "Price": fields.Float(required=False, load_from="Price"),
36
+ }
File without changes