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,203 @@
1
+ """ Code is generated by ucloud-model, DO NOT EDIT IT. """
2
+
3
+ from ucloud.core.typesystem import schema, fields
4
+ from ucloud.services.udpn.schemas import models
5
+
6
+ """ UDPN API Schema
7
+ """
8
+
9
+
10
+ """
11
+ API: AllocateUDPN
12
+
13
+ 分配一条 UDPN 专线
14
+ """
15
+
16
+
17
+ class AllocateUDPNRequestSchema(schema.RequestSchema):
18
+ """AllocateUDPN - 分配一条 UDPN 专线"""
19
+
20
+ fields = {
21
+ "Bandwidth": fields.Int(required=True, dump_to="Bandwidth"),
22
+ "ChargeType": fields.Str(required=False, dump_to="ChargeType"),
23
+ "CouponId": fields.Str(required=False, dump_to="CouponId"),
24
+ "PayMode": fields.Str(required=False, dump_to="PayMode"),
25
+ "Peer1": fields.Str(required=True, dump_to="Peer1"),
26
+ "Peer2": fields.Str(required=True, dump_to="Peer2"),
27
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
28
+ "Quantity": fields.Int(required=False, dump_to="Quantity"),
29
+ "Region": fields.Str(required=False, dump_to="Region"),
30
+ }
31
+
32
+
33
+ class AllocateUDPNResponseSchema(schema.ResponseSchema):
34
+ """AllocateUDPN - 分配一条 UDPN 专线"""
35
+
36
+ fields = {
37
+ "Action": fields.Str(required=True, load_from="Action"),
38
+ "RetCode": fields.Int(required=True, load_from="RetCode"),
39
+ "UDPNId": fields.Str(required=True, load_from="UDPNId"),
40
+ }
41
+
42
+
43
+ """
44
+ API: DescribeUDPN
45
+
46
+ 描述 UDPN
47
+ """
48
+
49
+
50
+ class DescribeUDPNRequestSchema(schema.RequestSchema):
51
+ """DescribeUDPN - 描述 UDPN"""
52
+
53
+ fields = {
54
+ "Limit": fields.Int(required=False, dump_to="Limit"),
55
+ "Offset": fields.Int(required=False, dump_to="Offset"),
56
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
57
+ "Region": fields.Str(required=False, dump_to="Region"),
58
+ "UDPNId": fields.Str(required=False, dump_to="UDPNId"),
59
+ }
60
+
61
+
62
+ class DescribeUDPNResponseSchema(schema.ResponseSchema):
63
+ """DescribeUDPN - 描述 UDPN"""
64
+
65
+ fields = {
66
+ "DataSet": fields.List(
67
+ models.UDPNDataSchema(), required=False, load_from="DataSet"
68
+ ),
69
+ "TotalCount": fields.Int(required=True, load_from="TotalCount"),
70
+ }
71
+
72
+
73
+ """
74
+ API: GetUDPNLineList
75
+
76
+ 获取当前支持的专线线路列表
77
+ """
78
+
79
+
80
+ class GetUDPNLineListRequestSchema(schema.RequestSchema):
81
+ """GetUDPNLineList - 获取当前支持的专线线路列表"""
82
+
83
+ fields = {
84
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
85
+ "Region": fields.Str(required=False, dump_to="Region"),
86
+ }
87
+
88
+
89
+ class GetUDPNLineListResponseSchema(schema.ResponseSchema):
90
+ """GetUDPNLineList - 获取当前支持的专线线路列表"""
91
+
92
+ fields = {
93
+ "DataSet": fields.List(
94
+ models.UDPNLineSetSchema(), required=True, load_from="DataSet"
95
+ ),
96
+ "TotalCount": fields.Int(required=True, load_from="TotalCount"),
97
+ }
98
+
99
+
100
+ """
101
+ API: GetUDPNPrice
102
+
103
+ 获取 UDPN 价格
104
+ """
105
+
106
+
107
+ class GetUDPNPriceRequestSchema(schema.RequestSchema):
108
+ """GetUDPNPrice - 获取 UDPN 价格"""
109
+
110
+ fields = {
111
+ "Bandwidth": fields.Int(required=True, dump_to="Bandwidth"),
112
+ "ChargeType": fields.Str(required=False, dump_to="ChargeType"),
113
+ "PayMode": fields.Str(required=False, dump_to="PayMode"),
114
+ "Peer1": fields.Str(required=True, dump_to="Peer1"),
115
+ "Peer2": fields.Str(required=True, dump_to="Peer2"),
116
+ "Quantity": fields.Int(required=False, dump_to="Quantity"),
117
+ "Region": fields.Str(required=False, dump_to="Region"),
118
+ }
119
+
120
+
121
+ class GetUDPNPriceResponseSchema(schema.ResponseSchema):
122
+ """GetUDPNPrice - 获取 UDPN 价格"""
123
+
124
+ fields = {
125
+ "Price": fields.Float(required=True, load_from="Price"),
126
+ "PurchaseValue": fields.Int(required=True, load_from="PurchaseValue"),
127
+ }
128
+
129
+
130
+ """
131
+ API: GetUDPNUpgradePrice
132
+
133
+ 获取专线升级价格
134
+ """
135
+
136
+
137
+ class GetUDPNUpgradePriceRequestSchema(schema.RequestSchema):
138
+ """GetUDPNUpgradePrice - 获取专线升级价格"""
139
+
140
+ fields = {
141
+ "Bandwidth": fields.Int(required=True, dump_to="Bandwidth"),
142
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
143
+ "Region": fields.Str(required=False, dump_to="Region"),
144
+ "UDPNId": fields.Str(required=True, dump_to="UDPNId"),
145
+ }
146
+
147
+
148
+ class GetUDPNUpgradePriceResponseSchema(schema.ResponseSchema):
149
+ """GetUDPNUpgradePrice - 获取专线升级价格"""
150
+
151
+ fields = {
152
+ "Price": fields.Float(required=True, load_from="Price"),
153
+ }
154
+
155
+
156
+ """
157
+ API: ModifyUDPNBandwidth
158
+
159
+ 修改带宽值
160
+ """
161
+
162
+
163
+ class ModifyUDPNBandwidthRequestSchema(schema.RequestSchema):
164
+ """ModifyUDPNBandwidth - 修改带宽值"""
165
+
166
+ fields = {
167
+ "Bandwidth": fields.Int(required=True, dump_to="Bandwidth"),
168
+ "CouponId": fields.Str(required=False, dump_to="CouponId"),
169
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
170
+ "Region": fields.Str(
171
+ required=False, dump_to="Region"
172
+ ), # Deprecated, will be removed at 1.0
173
+ "UDPNId": fields.Str(required=True, dump_to="UDPNId"),
174
+ }
175
+
176
+
177
+ class ModifyUDPNBandwidthResponseSchema(schema.ResponseSchema):
178
+ """ModifyUDPNBandwidth - 修改带宽值"""
179
+
180
+ fields = {}
181
+
182
+
183
+ """
184
+ API: ReleaseUDPN
185
+
186
+ 释放 UDPN
187
+ """
188
+
189
+
190
+ class ReleaseUDPNRequestSchema(schema.RequestSchema):
191
+ """ReleaseUDPN - 释放 UDPN"""
192
+
193
+ fields = {
194
+ "ProjectId": fields.Str(required=False, dump_to="ProjectId"),
195
+ "Region": fields.Str(required=False, dump_to="Region"),
196
+ "UDPNId": fields.Str(required=True, dump_to="UDPNId"),
197
+ }
198
+
199
+
200
+ class ReleaseUDPNResponseSchema(schema.ResponseSchema):
201
+ """ReleaseUDPN - 释放 UDPN"""
202
+
203
+ fields = {}
@@ -0,0 +1,29 @@
1
+ """ Code is generated by ucloud-model, DO NOT EDIT IT. """
2
+
3
+ from ucloud.core.typesystem import schema, fields
4
+
5
+
6
+ class UDPNDataSchema(schema.ResponseSchema):
7
+ """UDPNData - UDPN 详细信息"""
8
+
9
+ fields = {
10
+ "Bandwidth": fields.Int(required=True, load_from="Bandwidth"),
11
+ "ChargeType": fields.Str(required=True, load_from="ChargeType"),
12
+ "CreateTime": fields.Int(required=True, load_from="CreateTime"),
13
+ "ExpireTime": fields.Int(required=True, load_from="ExpireTime"),
14
+ "Peer1": fields.Str(required=True, load_from="Peer1"),
15
+ "Peer2": fields.Str(required=True, load_from="Peer2"),
16
+ "UDPNId": fields.Str(required=True, load_from="UDPNId"),
17
+ }
18
+
19
+
20
+ class UDPNLineSetSchema(schema.ResponseSchema):
21
+ """UDPNLineSet - GetUDPNLineList"""
22
+
23
+ fields = {
24
+ "BandwidthUpperLimit": fields.Int(
25
+ required=True, load_from="BandwidthUpperLimit"
26
+ ),
27
+ "LocalRegion": fields.Str(required=True, load_from="LocalRegion"),
28
+ "RemoteRegion": fields.Str(required=True, load_from="RemoteRegion"),
29
+ }
File without changes
@@ -0,0 +1,410 @@
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.udts.schemas import apis
8
+
9
+
10
+ class UDTSClient(Client):
11
+ def __init__(
12
+ self, config: dict, transport=None, middleware=None, logger=None
13
+ ):
14
+ super(UDTSClient, self).__init__(config, transport, middleware, logger)
15
+
16
+ def check_udts_task(
17
+ self, req: typing.Optional[dict] = None, **kwargs
18
+ ) -> dict:
19
+ """CheckUDTSTask - 对UDTS 任务提供预检查功能
20
+
21
+ **Request**
22
+
23
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
24
+ - **MaxRetryCount** (str) - (Required) 重试次数,最大为 5。 默认为0
25
+ - **Name** (str) - (Required) task 名称,长度不能超过 128
26
+ - **Type** (str) - (Required) 任务类型,值为 transfer 或 integration, transfer 时任务为 数据迁移,integration 时任务为 数据集成。
27
+ - **Query** (str) - 废弃
28
+ - **Source** (list) - 见 **CheckUDTSTaskParamSource** 模型定义
29
+ - **Target** (dict) - 见 **CheckUDTSTaskParamTarget** 模型定义
30
+
31
+ **Response**
32
+
33
+ - **Action** (str) - 操作名称
34
+ - **Data** (dict) - 见 **CheckUDTSTaskResult** 模型定义
35
+ - **Message** (str) - 返回消息
36
+ - **RetCode** (str) - 返回码
37
+
38
+ **Request Model**
39
+
40
+ **CheckUDTSTaskParamSourceMySQLNodeSyncData**
41
+ - **BinlogGTID** (str) - 增量时需要指定的 binlog gtid,可以通过 show master status 获取,或者全量+增量任务会自动设置
42
+ - **BinlogName** (str) - 增量时需要指定的 binlog name,可以通过 show master status 获取,或者全量+增量任务会自动设置
43
+ - **BinlogPos** (int) - 增量时需要指定的 binlog pos,可以通过 show master status 获取,或者全量+增量任务会自动设置
44
+ - **ServerID** (int) - 增量时需要指定的 serverID,不能和现有的 slave 重复,预检查时会检查该值
45
+
46
+
47
+ **CheckUDTSTaskParamSourceMySQLNodeQueryData**
48
+ - **DBName** (str) - 数据集成时需要迁移的 DB 名
49
+ - **NewDBName** (str) - 数据集成时迁移后的 DB 名
50
+
51
+
52
+ **CheckUDTSTaskParamTargetMySQLNode**
53
+ - **DataRegion** (str) - 目标数据库地域,比如 cn-bj2
54
+ - **Host** (str) - 目标数据库地址, 比如 10.9.37.212
55
+ - **Password** (str) - 目标数据库密码
56
+ - **Port** (int) - 目标数据库端口,比如 3306
57
+ - **SubnetId** (str) - 目标数据库子网 ID ,比如 subnet-zl44fktq
58
+ - **User** (str) - 目标数据库用户名,比如 root
59
+ - **VPCId** (str) - 目标数据库 VPC,比如 uvnet-1wz5rqte
60
+
61
+
62
+ **CheckUDTSTaskParamSourceMySQLNode**
63
+ - **DataRegion** (str) - 数据库地域,比如 cn-bj2
64
+ - **Database** (str) - 需要迁移的 DB 名称
65
+ - **Host** (str) - 源数据库地址, 比如 10.9.37.200
66
+ - **Password** (str) - 源 MySQL 密码
67
+ - **Port** (int) - 源 MySQL 端口,如 3306
68
+ - **QueryData** (list) - 见 **CheckUDTSTaskParamSourceMySQLNodeQueryData** 模型定义
69
+ - **SubnetId** (str) - 子网 ID
70
+ - **SyncData** (dict) - 见 **CheckUDTSTaskParamSourceMySQLNodeSyncData** 模型定义
71
+ - **Table** (str) - 需要迁移的 table 名
72
+ - **User** (str) - 源 MySQL 用户名,如 root
73
+ - **VPCId** (str) - VPC
74
+
75
+
76
+ **CheckUDTSTaskParamTarget**
77
+ - **DataType** (str) - 目标数据库类型,比如 mysql
78
+ - **MySQLNode** (dict) - 见 **CheckUDTSTaskParamTargetMySQLNode** 模型定义
79
+ - **NWType** (str) - 目标 db 网络类型,目前进支持 user
80
+
81
+
82
+ **CheckUDTSTaskParamSource**
83
+ - **DataType** (str) - 数据库类型
84
+ - **Mode** (str) - // 任务类型,值可以是 full, incremental, full+incremental, bidirectional
85
+ - **MySQLNode** (dict) - 见 **CheckUDTSTaskParamSourceMySQLNode** 模型定义
86
+ - **NWType** (str) - 源网络类型,可以是 public,user,dedicated_line
87
+
88
+
89
+ **Response Model**
90
+
91
+ **CheckResultItem**
92
+ - **ErrMessage** (str) -
93
+ - **State** (str) - 状态
94
+
95
+
96
+ **CheckResult**
97
+ - **Config** (dict) - 见 **CheckResultItem** 模型定义
98
+ - **Connection** (dict) - 见 **CheckResultItem** 模型定义
99
+ - **Privileges** (dict) - 见 **CheckResultItem** 模型定义
100
+
101
+
102
+ **CheckUDTSTaskResult**
103
+ - **Source** (dict) - 见 **CheckResult** 模型定义
104
+ - **Target** (dict) - 见 **CheckResult** 模型定义
105
+
106
+
107
+ """
108
+ # build request
109
+ d = {
110
+ "ProjectId": self.config.project_id,
111
+ }
112
+ req and d.update(req)
113
+ d = apis.CheckUDTSTaskRequestSchema().dumps(d)
114
+
115
+ resp = self.invoke("CheckUDTSTask", d, **kwargs)
116
+ return apis.CheckUDTSTaskResponseSchema().loads(resp)
117
+
118
+ def create_udts_task(
119
+ self, req: typing.Optional[dict] = None, **kwargs
120
+ ) -> dict:
121
+ """CreateUDTSTask - 创建UDTS任务
122
+
123
+ **Request**
124
+
125
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
126
+ - **Name** (str) - (Required) task 名称,长度不能超过 128
127
+ - **Type** (str) - (Required) 任务类型,transfer(数据传输) 或 integration(数据集成)
128
+ - **IsUnidirection** (str) - 暂时未使用该字段
129
+ - **MaxRetryCount** (str) - 重试次数,最大为 5。 默认为0
130
+ - **Query** (str) - 暂时未使用该字段
131
+ - **Remark** (str) - 备注信息,长度不能大于 255
132
+ - **Source** (list) - 见 **CreateUDTSTaskParamSource** 模型定义
133
+ - **Target** (dict) - 见 **CreateUDTSTaskParamTarget** 模型定义
134
+
135
+ **Response**
136
+
137
+ - **Data** (dict) -
138
+ - **Message** (str) - 返回消息
139
+
140
+ **Request Model**
141
+
142
+ **CreateUDTSTaskParamSourceMySQLNodeQueryDataTableData**
143
+ - **ExcludeTables** (bool) - 暂时未使用该字段
144
+ - **TableNames** (str) - 暂时未使用该字段
145
+
146
+
147
+ **CreateUDTSTaskParamSourceMySQLNodeQueryDataTableMaps**
148
+ - **NewTableName** (str) - 数据集成时迁移后的 Table 名
149
+ - **TableName** (str) - 数据集成时需要迁移的 Table 名
150
+
151
+
152
+ **CreateUDTSTaskParamSourceMySQLNodeSyncData**
153
+ - **BinlogGTID** (str) - 增量时需要指定的 binlog gtid,可以通过 show master status 获取,或者全量+增量任务会自动设置
154
+ - **BinlogName** (str) - 增量时需要指定的 binlog name,可以通过 show master status 获取,或者全量+增量任务会自动设置
155
+ - **BinlogPos** (int) - 增量时需要指定的 binlog pos,可以通过 show master status 获取,或者全量+增量任务会自动设置
156
+ - **ServerID** (int) - 增量时需要指定的 serverID,不能和现有的 slave 重复,预检查时会检查该值
157
+
158
+
159
+ **CreateUDTSTaskParamSourceMySQLNodeQueryData**
160
+ - **DBName** (str) - 数据集成时需要迁移的 DB 名
161
+ - **NewDBName** (str) - 数据集成时迁移后的 DB 名
162
+ - **TableData** (dict) - 见 **CreateUDTSTaskParamSourceMySQLNodeQueryDataTableData** 模型定义
163
+ - **TableMaps** (list) - 见 **CreateUDTSTaskParamSourceMySQLNodeQueryDataTableMaps** 模型定义
164
+
165
+
166
+ **CreateUDTSTaskParamSourceMySQLNode**
167
+ - **DataRegion** (str) - 数据库地域,比如 cn-bj2
168
+ - **Database** (str) - 需要迁移的 DB 名称
169
+ - **DupAction** (str) - 重复数据处理规则,数据集成时该参数才有效,值为 ignore或者replace
170
+ - **Host** (str) - 源数据库地址
171
+ - **KeepExistData** (bool) - 是否保留原有数据,只有数据集成时该参数才有效
172
+ - **Password** (str) - 源数据库密码
173
+ - **Port** (int) - 源数据库端口
174
+ - **QueryData** (list) - 见 **CreateUDTSTaskParamSourceMySQLNodeQueryData** 模型定义
175
+ - **SubnetId** (str) - 源数据库子网 ID,当网络类型为 user 时需要填写
176
+ - **SyncData** (dict) - 见 **CreateUDTSTaskParamSourceMySQLNodeSyncData** 模型定义
177
+ - **Table** (str) - 需要迁移的 table 名
178
+ - **User** (str) - 源数据库用户名
179
+ - **VPCId** (str) - 源数据库 VPC ID,当网络类型为 user 时需要填写
180
+
181
+
182
+ **CreateUDTSTaskParamTargetMySQLNode**
183
+ - **DataRegion** (str) - 目标数据库地域,比如 cn-bj2
184
+ - **Host** (str) - 目标数据库地址, 比如 10.9.37.212
185
+ - **NoBinlog** (bool) - 是否在全量过程中,临时禁用目标 MySQL 产生 binlog,在目标磁盘空间不足,或者需要获取更快的迁移速度时可以使用,该参数会破坏目标 MySQL 的高可用
186
+ - **Password** (str) - 目标数据库密码
187
+ - **Port** (int) - 目标数据库端口,比如 3306
188
+ - **SubnetId** (str) - 目标数据库子网 ID ,比如 subnet-zl44fktq
189
+ - **User** (str) - 目标数据库用户名,比如 root
190
+ - **VPCId** (str) - 目标数据库 VPC,比如 uvnet-1wz5rqte
191
+
192
+
193
+ **CreateUDTSTaskParamSource**
194
+ - **BandwidthLimit** (int) - 源端限速值,单位为 MB/s
195
+ - **DataType** (str) - 数据库类型,比如 mysql
196
+ - **Mode** (str) - 任务类型,值可以是 full, incremental, full+incremental, bidirectional
197
+ - **MySQLNode** (dict) - 见 **CreateUDTSTaskParamSourceMySQLNode** 模型定义
198
+ - **NWType** (str) - 源网络类型,可以是 public,user,dedicated_line
199
+
200
+
201
+ **CreateUDTSTaskParamTarget**
202
+ - **BandwidthLimit** (str) - 目标端限速,单位为 MB/s
203
+ - **DataType** (str) - 目标数据库类型,比如 mysql
204
+ - **Mode** (str) -
205
+ - **MySQLNode** (dict) - 见 **CreateUDTSTaskParamTargetMySQLNode** 模型定义
206
+ - **NWType** (str) - 目标 db 网络类型,目前仅支持 user
207
+
208
+
209
+ """
210
+ # build request
211
+ d = {
212
+ "ProjectId": self.config.project_id,
213
+ }
214
+ req and d.update(req)
215
+ d = apis.CreateUDTSTaskRequestSchema().dumps(d)
216
+
217
+ # build options
218
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
219
+
220
+ resp = self.invoke("CreateUDTSTask", d, **kwargs)
221
+ return apis.CreateUDTSTaskResponseSchema().loads(resp)
222
+
223
+ def get_udts_task_history(
224
+ self, req: typing.Optional[dict] = None, **kwargs
225
+ ) -> dict:
226
+ """GetUDTSTaskHistory - 获取任务历史状态
227
+
228
+ **Request**
229
+
230
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
231
+ - **TaskId** (str) - (Required) 任务短 id
232
+ - **Type** (str) - 任务类型
233
+
234
+ **Response**
235
+
236
+ - **Data** (list) - 见 **TaskHistoryItem** 模型定义
237
+
238
+ **Response Model**
239
+
240
+ **TaskHistoryItem**
241
+ - **AntID** (str) - 任务 ID
242
+ - **AntState** (str) - 任务状态
243
+ - **CreateTime** (int) - 事件时间,值为 timestamp
244
+ - **CreateTimeH** (str) - 事件时间,为可读的日期时间
245
+
246
+
247
+ """
248
+ # build request
249
+ d = {
250
+ "ProjectId": self.config.project_id,
251
+ }
252
+ req and d.update(req)
253
+ d = apis.GetUDTSTaskHistoryRequestSchema().dumps(d)
254
+
255
+ resp = self.invoke("GetUDTSTaskHistory", d, **kwargs)
256
+ return apis.GetUDTSTaskHistoryResponseSchema().loads(resp)
257
+
258
+ def get_udts_task_status(
259
+ self, req: typing.Optional[dict] = None, **kwargs
260
+ ) -> dict:
261
+ """GetUDTSTaskStatus - 查看服务状态
262
+
263
+ **Request**
264
+
265
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
266
+ - **TaskId** (str) - (Required) 任务ID
267
+ - **Type** (str) - 任务类型,值为 transfer 或 integration, transfer 时任务为 数据迁移,integration 时任务为 数据集成。
268
+
269
+ **Response**
270
+
271
+ - **Data** (dict) - 见 **StatusData** 模型定义
272
+ - **Message** (str) - 返回信息
273
+
274
+ **Response Model**
275
+
276
+ **SyncData**
277
+ - **BinlogGTID** (str) - GTID
278
+ - **BinlogName** (str) - Binlog 文件名, 长度不超过128字符
279
+ - **BinlogPos** (int) - Binlog Pos
280
+ - **ServerId** (int) - 分配给UDTS task的server ID, 必须在MySQL集群中唯一
281
+
282
+
283
+ **Progress**
284
+ - **CurCount** (int) - 已迁移条目数
285
+ - **CurDuration** (int) - 已耗时间(单位秒)
286
+ - **Percentage** (float) - 完成进度
287
+ - **TotalCount** (int) - 总条目数
288
+ - **TotalDuration** (int) - 估算总耗时间(单位秒)
289
+
290
+
291
+ **StatusData**
292
+ - **CurRetryCount** (int) - 当前失败重试次数
293
+ - **FailedMessage** (str) - 当Status为Failed时, 显示失败原因
294
+ - **MaxRetryCount** (int) - 用户设置的最大失败重试次数
295
+ - **Progress** (dict) - 见 **Progress** 模型定义
296
+ - **Status** (str) - 任务状态, 状态有 Created:已创建,Checking:检查中,Dumping:转储中,Loading:加载中,Syncing:同步中,Synced:已同步,Done:完成,Failed:失败,Stopping:停止中,Stopped:停止,RetryPending:重试等待中,Starting:启动中,FailedUnrecoverable:异常,StoppedUnrecoverable:异常,Success:成功,Started:已启动
297
+ - **Sync** (dict) - 见 **SyncData** 模型定义
298
+
299
+
300
+ """
301
+ # build request
302
+ d = {
303
+ "ProjectId": self.config.project_id,
304
+ }
305
+ req and d.update(req)
306
+ d = apis.GetUDTSTaskStatusRequestSchema().dumps(d)
307
+
308
+ resp = self.invoke("GetUDTSTaskStatus", d, **kwargs)
309
+ return apis.GetUDTSTaskStatusResponseSchema().loads(resp)
310
+
311
+ def list_udts_task(
312
+ self, req: typing.Optional[dict] = None, **kwargs
313
+ ) -> dict:
314
+ """ListUDTSTask - 获取用户创建的 Task 信息
315
+
316
+ **Request**
317
+
318
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
319
+ - **Limit** (str) - 请求数量,默认为 20
320
+ - **Offset** (str) - 偏移量,默认为 0
321
+ - **Type** (str) - 任务类型
322
+
323
+ **Response**
324
+
325
+ - **Data** (list) - 见 **ListDataItem** 模型定义
326
+ - **Message** (str) - 返回信息
327
+
328
+ **Response Model**
329
+
330
+ **Progress**
331
+ - **CurCount** (int) - 已迁移条目数
332
+ - **CurDuration** (int) - 已耗时间(单位秒)
333
+ - **Percentage** (float) - 完成进度
334
+ - **TotalCount** (int) - 总条目数
335
+ - **TotalDuration** (int) - 估算总耗时间(单位秒)
336
+
337
+
338
+ **ListDataItem**
339
+ - **CreateTime** (int) - 创建时间
340
+ - **CurRetryCount** (int) - 当前失败重试次数
341
+ - **MaxRetryCount** (int) - 最大失败重试次数
342
+ - **Name** (str) - 任务名称
343
+ - **Progress** (dict) - 见 **Progress** 模型定义
344
+ - **Status** (str) - 任务状态
345
+ - **TaskId** (str) - 任务 ID
346
+ - **Type** (str) - 任务类型, full全量, incremental增量,full+incremental全量+增量。
347
+
348
+
349
+ """
350
+ # build request
351
+ d = {
352
+ "ProjectId": self.config.project_id,
353
+ }
354
+ req and d.update(req)
355
+ d = apis.ListUDTSTaskRequestSchema().dumps(d)
356
+
357
+ resp = self.invoke("ListUDTSTask", d, **kwargs)
358
+ return apis.ListUDTSTaskResponseSchema().loads(resp)
359
+
360
+ def start_udts_task(
361
+ self, req: typing.Optional[dict] = None, **kwargs
362
+ ) -> dict:
363
+ """StartUDTSTask - 启动UDTS服务
364
+
365
+ **Request**
366
+
367
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
368
+ - **TaskId** (str) - (Required) 任务ID
369
+ - **Type** (str) - 任务类型
370
+
371
+ **Response**
372
+
373
+ - **Message** (str) - 返回信息
374
+
375
+ """
376
+ # build request
377
+ d = {
378
+ "ProjectId": self.config.project_id,
379
+ }
380
+ req and d.update(req)
381
+ d = apis.StartUDTSTaskRequestSchema().dumps(d)
382
+
383
+ resp = self.invoke("StartUDTSTask", d, **kwargs)
384
+ return apis.StartUDTSTaskResponseSchema().loads(resp)
385
+
386
+ def stop_udts_task(
387
+ self, req: typing.Optional[dict] = None, **kwargs
388
+ ) -> dict:
389
+ """StopUDTSTask - 停止UDTS任务
390
+
391
+ **Request**
392
+
393
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
394
+ - **TaskId** (str) - (Required) 任务 ID
395
+ - **Type** (str) - 任务类型
396
+
397
+ **Response**
398
+
399
+ - **Message** (str) - 返回信息
400
+
401
+ """
402
+ # build request
403
+ d = {
404
+ "ProjectId": self.config.project_id,
405
+ }
406
+ req and d.update(req)
407
+ d = apis.StopUDTSTaskRequestSchema().dumps(d)
408
+
409
+ resp = self.invoke("StopUDTSTask", d, **kwargs)
410
+ return apis.StopUDTSTaskResponseSchema().loads(resp)
File without changes