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,618 @@
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.cube.schemas import apis
8
+
9
+
10
+ class CubeClient(Client):
11
+ def __init__(
12
+ self, config: dict, transport=None, middleware=None, logger=None
13
+ ):
14
+ super(CubeClient, self).__init__(config, transport, middleware, logger)
15
+
16
+ def create_cube_deployment(
17
+ self, req: typing.Optional[dict] = None, **kwargs
18
+ ) -> dict:
19
+ """CreateCubeDeployment - 创建容器实例Deployment
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
+ - **Deployment** (str) - (Required) Deployment yaml,使用base64编码
26
+ - **SubnetId** (str) - (Required) Deployment所属子网
27
+ - **VPCId** (str) - (Required) Deployment所属VPC
28
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
29
+ - **ChargeType** (str) - 计费模式
30
+ - **CpuPlatform** (str) - CPU平台
31
+ - **Name** (str) - Deployment名称
32
+ - **Quantity** (str) - 数量,默认为1
33
+ - **Tag** (str) - 标签
34
+
35
+ **Response**
36
+
37
+ - **Deployment** (str) - Deployment yaml,使用base64编码
38
+ - **DeploymentId** (str) - Deployment ID
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.CreateCubeDeploymentRequestSchema().dumps(d)
48
+
49
+ # build options
50
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
51
+
52
+ resp = self.invoke("CreateCubeDeployment", d, **kwargs)
53
+ return apis.CreateCubeDeploymentResponseSchema().loads(resp)
54
+
55
+ def create_cube_pod(
56
+ self, req: typing.Optional[dict] = None, **kwargs
57
+ ) -> dict:
58
+ """CreateCubePod - 创建一个容器实例
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
+ - **Pod** (str) - (Required) Pod yaml,使用base64编码
65
+ - **SubnetId** (str) - (Required) 容器实例所属的子网ID
66
+ - **VPCId** (str) - (Required) 容器实例所属的VPC ID
67
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
68
+
69
+ **Response**
70
+
71
+ - **CubeId** (str) - 容器实例ID
72
+ - **Pod** (str) - Pod yaml,使用base64编码
73
+
74
+ """
75
+ # build request
76
+ d = {
77
+ "ProjectId": self.config.project_id,
78
+ "Region": self.config.region,
79
+ }
80
+ req and d.update(req)
81
+ d = apis.CreateCubePodRequestSchema().dumps(d)
82
+
83
+ # build options
84
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
85
+
86
+ resp = self.invoke("CreateCubePod", d, **kwargs)
87
+ return apis.CreateCubePodResponseSchema().loads(resp)
88
+
89
+ def delete_cube_deployment(
90
+ self, req: typing.Optional[dict] = None, **kwargs
91
+ ) -> dict:
92
+ """DeleteCubeDeployment - 删除容器实例Deployment
93
+
94
+ **Request**
95
+
96
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
97
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
98
+ - **DeploymentId** (str) - (Required)
99
+
100
+ **Response**
101
+
102
+
103
+ """
104
+ # build request
105
+ d = {
106
+ "ProjectId": self.config.project_id,
107
+ "Region": self.config.region,
108
+ }
109
+ req and d.update(req)
110
+ d = apis.DeleteCubeDeploymentRequestSchema().dumps(d)
111
+
112
+ resp = self.invoke("DeleteCubeDeployment", d, **kwargs)
113
+ return apis.DeleteCubeDeploymentResponseSchema().loads(resp)
114
+
115
+ def delete_cube_pod(
116
+ self, req: typing.Optional[dict] = None, **kwargs
117
+ ) -> dict:
118
+ """DeleteCubePod - 删除容器实例
119
+
120
+ **Request**
121
+
122
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
123
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
124
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
125
+ - **CubeId** (str) - 要删除的容器实例ID,若填写了Uid则可忽略
126
+ - **ReleaseEIP** (str) - 要释放的EIP,如果容器实例绑定了EIP则可以填写,会将EIP一并释放。否则EIP会被保留。
127
+ - **Uid** (str) - 要删除的容器实例UID,若填写了CubeId则可忽略
128
+
129
+ **Response**
130
+
131
+
132
+ """
133
+ # build request
134
+ d = {
135
+ "ProjectId": self.config.project_id,
136
+ "Region": self.config.region,
137
+ }
138
+ req and d.update(req)
139
+ d = apis.DeleteCubePodRequestSchema().dumps(d)
140
+
141
+ resp = self.invoke("DeleteCubePod", d, **kwargs)
142
+ return apis.DeleteCubePodResponseSchema().loads(resp)
143
+
144
+ def get_cube_deployment(
145
+ self, req: typing.Optional[dict] = None, **kwargs
146
+ ) -> dict:
147
+ """GetCubeDeployment - 获取容器实例Deployment详细信息
148
+
149
+ **Request**
150
+
151
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
152
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
153
+ - **DeploymentId** (str) - (Required) Deployment ID
154
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
155
+
156
+ **Response**
157
+
158
+ - **Deployment** (str) - Deployment yaml,使用base64编码
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.GetCubeDeploymentRequestSchema().dumps(d)
168
+
169
+ resp = self.invoke("GetCubeDeployment", d, **kwargs)
170
+ return apis.GetCubeDeploymentResponseSchema().loads(resp)
171
+
172
+ def get_cube_exec_token(
173
+ self, req: typing.Optional[dict] = None, **kwargs
174
+ ) -> dict:
175
+ """GetCubeExecToken - 获取容器实例执行token
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
+ - **ContainerName** (str) - (Required) 要执行的容器名称
182
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
183
+ - **CubeId** (str) - 容器实例ID,若填写了Uid则可忽略
184
+ - **Uid** (str) - 容器实例UID,若填写了CubeId则可忽略
185
+
186
+ **Response**
187
+
188
+ - **TerminalUrl** (str) - 终端url
189
+ - **Token** (str) - 执行Token
190
+
191
+ """
192
+ # build request
193
+ d = {
194
+ "ProjectId": self.config.project_id,
195
+ "Region": self.config.region,
196
+ }
197
+ req and d.update(req)
198
+ d = apis.GetCubeExecTokenRequestSchema().dumps(d)
199
+
200
+ resp = self.invoke("GetCubeExecToken", d, **kwargs)
201
+ return apis.GetCubeExecTokenResponseSchema().loads(resp)
202
+
203
+ def get_cube_extend_info(
204
+ self, req: typing.Optional[dict] = None, **kwargs
205
+ ) -> dict:
206
+ """GetCubeExtendInfo - 获取容器实例附加信息
207
+
208
+ **Request**
209
+
210
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
211
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
212
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
213
+ - **CubeIds** (str) - 容器实例ID,用逗号分割
214
+
215
+ **Response**
216
+
217
+ - **ExtendInfo** (list) - 见 **CubeExtendInfo** 模型定义
218
+
219
+ **Response Model**
220
+
221
+ **CubeExtendInfo**
222
+ - **CubeId** (str) - Cube的Id
223
+ - **Eip** (list) - 见 **EIPSet** 模型定义
224
+ - **Expiration** (int) - 资源有效期
225
+ - **Name** (str) - Cube的名称
226
+ - **Tag** (str) - 业务组名称
227
+
228
+
229
+ **EIPSet**
230
+ - **Bandwidth** (int) - EIP带宽值
231
+ - **BandwidthType** (int) - 带宽类型0标准普通带宽,1表示共享带宽
232
+ - **CreateTime** (int) - EIP创建时间
233
+ - **EIPAddr** (list) - 见 **EIPAddr** 模型定义
234
+ - **EIPId** (str) - EIPId
235
+ - **PayMode** (str) - 付费模式,带宽付费或者流量付费
236
+ - **Resource** (str) - EIP绑定对象的资源Id
237
+ - **Status** (str) - EIP状态,表示使用中或者空闲
238
+ - **Weight** (int) - EIP权重
239
+
240
+
241
+ **EIPAddr**
242
+ - **IP** (str) - IP地址
243
+ - **OperatorName** (str) - 线路名称BGP或者internalation
244
+
245
+
246
+ """
247
+ # build request
248
+ d = {
249
+ "ProjectId": self.config.project_id,
250
+ "Region": self.config.region,
251
+ }
252
+ req and d.update(req)
253
+ d = apis.GetCubeExtendInfoRequestSchema().dumps(d)
254
+
255
+ resp = self.invoke("GetCubeExtendInfo", d, **kwargs)
256
+ return apis.GetCubeExtendInfoResponseSchema().loads(resp)
257
+
258
+ def get_cube_metrics(
259
+ self, req: typing.Optional[dict] = None, **kwargs
260
+ ) -> dict:
261
+ """GetCubeMetrics - 获取容器实例指标
262
+
263
+ **Request**
264
+
265
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
266
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
267
+ - **BeginTime** (str) - (Required) 开始时间
268
+ - **ContainerName** (str) - (Required) 容器名称
269
+ - **EndTime** (str) - (Required) 结束时间
270
+ - **MetricName** (str) - (Required) 指标名称
271
+ - **ResourceId** (str) - (Required) 资源ID
272
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
273
+
274
+ **Response**
275
+
276
+ - **DataSets** (list) - 见 **MetricDataSet** 模型定义
277
+
278
+ **Response Model**
279
+
280
+ **MetricDataSet**
281
+ - **MetricName** (str) -
282
+ - **Values** (list) - 见 **ValueSet** 模型定义
283
+
284
+
285
+ **ValueSet**
286
+ - **Timestamp** (int) -
287
+ - **Value** (float) -
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.GetCubeMetricsRequestSchema().dumps(d)
298
+
299
+ resp = self.invoke("GetCubeMetrics", d, **kwargs)
300
+ return apis.GetCubeMetricsResponseSchema().loads(resp)
301
+
302
+ def get_cube_pod(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
303
+ """GetCubePod -
304
+
305
+ **Request**
306
+
307
+ - **ProjectId** (str) - (Config)
308
+ - **Region** (str) - (Config)
309
+ - **CubeId** (str) -
310
+ - **Uid** (str) -
311
+ - **Zone** (str) -
312
+
313
+ **Response**
314
+
315
+ - **Pod** (str) -
316
+
317
+ """
318
+ # build request
319
+ d = {
320
+ "ProjectId": self.config.project_id,
321
+ "Region": self.config.region,
322
+ }
323
+ req and d.update(req)
324
+ d = apis.GetCubePodRequestSchema().dumps(d)
325
+
326
+ # build options
327
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
328
+
329
+ resp = self.invoke("GetCubePod", d, **kwargs)
330
+ return apis.GetCubePodResponseSchema().loads(resp)
331
+
332
+ def get_cube_price(
333
+ self, req: typing.Optional[dict] = None, **kwargs
334
+ ) -> dict:
335
+ """GetCubePrice -
336
+
337
+ **Request**
338
+
339
+ - **ProjectId** (str) - (Config)
340
+ - **Region** (str) - (Config)
341
+ - **ChargeType** (str) - (Required)
342
+ - **Count** (str) - (Required)
343
+ - **Cpu** (str) - (Required)
344
+ - **Mem** (str) - (Required)
345
+ - **Quantity** (int) - (Required)
346
+ - **Zone** (str) - (Required)
347
+
348
+ **Response**
349
+
350
+ - **OriginalPrice** (int) -
351
+ - **Price** (int) -
352
+
353
+ """
354
+ # build request
355
+ d = {
356
+ "ProjectId": self.config.project_id,
357
+ "Region": self.config.region,
358
+ }
359
+ req and d.update(req)
360
+ d = apis.GetCubePriceRequestSchema().dumps(d)
361
+
362
+ # build options
363
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
364
+
365
+ resp = self.invoke("GetCubePrice", d, **kwargs)
366
+ return apis.GetCubePriceResponseSchema().loads(resp)
367
+
368
+ def get_cube_token(
369
+ self, req: typing.Optional[dict] = None, **kwargs
370
+ ) -> dict:
371
+ """GetCubeToken - 获取容器实例Token
372
+
373
+ **Request**
374
+
375
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
376
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
377
+ - **ContainerName** (str) - (Required) 容器名称
378
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
379
+ - **CubeId** (str) - 容器实例ID,若填写了Uid则可忽略
380
+ - **Uid** (str) - 容器实例UID,若填写了CubeId则可忽略
381
+
382
+ **Response**
383
+
384
+ - **Token** (str) - 容器实例Token
385
+
386
+ """
387
+ # build request
388
+ d = {
389
+ "ProjectId": self.config.project_id,
390
+ "Region": self.config.region,
391
+ }
392
+ req and d.update(req)
393
+ d = apis.GetCubeTokenRequestSchema().dumps(d)
394
+
395
+ resp = self.invoke("GetCubeToken", d, **kwargs)
396
+ return apis.GetCubeTokenResponseSchema().loads(resp)
397
+
398
+ def list_cube_deployment(
399
+ self, req: typing.Optional[dict] = None, **kwargs
400
+ ) -> dict:
401
+ """ListCubeDeployment -
402
+
403
+ **Request**
404
+
405
+ - **ProjectId** (str) - (Config)
406
+ - **Region** (str) - (Config)
407
+ - **Limit** (int) - (Required)
408
+ - **Offset** (int) - (Required)
409
+ - **Zone** (str) -
410
+
411
+ **Response**
412
+
413
+ - **Deployments** (list) -
414
+ - **TotalCount** (int) -
415
+
416
+ """
417
+ # build request
418
+ d = {
419
+ "ProjectId": self.config.project_id,
420
+ "Region": self.config.region,
421
+ }
422
+ req and d.update(req)
423
+ d = apis.ListCubeDeploymentRequestSchema().dumps(d)
424
+
425
+ # build options
426
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
427
+
428
+ resp = self.invoke("ListCubeDeployment", d, **kwargs)
429
+ return apis.ListCubeDeploymentResponseSchema().loads(resp)
430
+
431
+ def list_cube_pod(
432
+ self, req: typing.Optional[dict] = None, **kwargs
433
+ ) -> dict:
434
+ """ListCubePod - 获取容器实例详细列表
435
+
436
+ **Request**
437
+
438
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
439
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
440
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
441
+ - **DeploymentId** (str) - 容器实例所属Deployment
442
+ - **Group** (str) - 容器实例组
443
+ - **Limit** (int) - 返回数据长度,默认为20,最大100
444
+ - **Offset** (int) - 列表起始位置偏移量,默认为0
445
+ - **SubnetId** (str) - 容器实例所属子网
446
+ - **VPCId** (str) - 容器实例所属VPC
447
+
448
+ **Response**
449
+
450
+ - **Pods** (list) - 容器实例yaml列表,以base64编码
451
+ - **TotalCount** (int) - 容器实例总数
452
+
453
+ """
454
+ # build request
455
+ d = {
456
+ "ProjectId": self.config.project_id,
457
+ "Region": self.config.region,
458
+ }
459
+ req and d.update(req)
460
+ d = apis.ListCubePodRequestSchema().dumps(d)
461
+
462
+ resp = self.invoke("ListCubePod", d, **kwargs)
463
+ return apis.ListCubePodResponseSchema().loads(resp)
464
+
465
+ def modify_cube_extend_info(
466
+ self, req: typing.Optional[dict] = None, **kwargs
467
+ ) -> dict:
468
+ """ModifyCubeExtendInfo -
469
+
470
+ **Request**
471
+
472
+ - **ProjectId** (str) - (Config)
473
+ - **Region** (str) - (Config)
474
+ - **CubeId** (str) - (Required)
475
+ - **Name** (str) -
476
+ - **Zone** (str) -
477
+
478
+ **Response**
479
+
480
+
481
+ """
482
+ # build request
483
+ d = {
484
+ "ProjectId": self.config.project_id,
485
+ "Region": self.config.region,
486
+ }
487
+ req and d.update(req)
488
+ d = apis.ModifyCubeExtendInfoRequestSchema().dumps(d)
489
+
490
+ # build options
491
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
492
+
493
+ resp = self.invoke("ModifyCubeExtendInfo", d, **kwargs)
494
+ return apis.ModifyCubeExtendInfoResponseSchema().loads(resp)
495
+
496
+ def modify_cube_tag(
497
+ self, req: typing.Optional[dict] = None, **kwargs
498
+ ) -> dict:
499
+ """ModifyCubeTag -
500
+
501
+ **Request**
502
+
503
+ - **ProjectId** (str) - (Config)
504
+ - **Region** (str) - (Config)
505
+ - **CubeId** (str) - (Required)
506
+ - **Tag** (str) - (Required)
507
+ - **Zone** (str) -
508
+
509
+ **Response**
510
+
511
+ - **CubeId** (str) -
512
+
513
+ """
514
+ # build request
515
+ d = {
516
+ "ProjectId": self.config.project_id,
517
+ "Region": self.config.region,
518
+ }
519
+ req and d.update(req)
520
+ d = apis.ModifyCubeTagRequestSchema().dumps(d)
521
+
522
+ # build options
523
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
524
+
525
+ resp = self.invoke("ModifyCubeTag", d, **kwargs)
526
+ return apis.ModifyCubeTagResponseSchema().loads(resp)
527
+
528
+ def reboot_cube_pod(
529
+ self, req: typing.Optional[dict] = None, **kwargs
530
+ ) -> dict:
531
+ """RebootCubePod -
532
+
533
+ **Request**
534
+
535
+ - **ProjectId** (str) - (Config)
536
+ - **Region** (str) - (Config)
537
+ - **CubeId** (str) - (Required)
538
+ - **Zone** (str) -
539
+
540
+ **Response**
541
+
542
+
543
+ """
544
+ # build request
545
+ d = {
546
+ "ProjectId": self.config.project_id,
547
+ "Region": self.config.region,
548
+ }
549
+ req and d.update(req)
550
+ d = apis.RebootCubePodRequestSchema().dumps(d)
551
+
552
+ # build options
553
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
554
+
555
+ resp = self.invoke("RebootCubePod", d, **kwargs)
556
+ return apis.RebootCubePodResponseSchema().loads(resp)
557
+
558
+ def renew_cube_pod(
559
+ self, req: typing.Optional[dict] = None, **kwargs
560
+ ) -> dict:
561
+ """RenewCubePod - 更新容器实例
562
+
563
+ **Request**
564
+
565
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
566
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
567
+ - **Pod** (str) - (Required) Pod yaml,以base64编码
568
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
569
+ - **CubeId** (str) - 要更新的容器实例ID
570
+
571
+ **Response**
572
+
573
+ - **Pod** (str) - Pod yaml,以base64编码
574
+
575
+ """
576
+ # build request
577
+ d = {
578
+ "ProjectId": self.config.project_id,
579
+ "Region": self.config.region,
580
+ }
581
+ req and d.update(req)
582
+ d = apis.RenewCubePodRequestSchema().dumps(d)
583
+
584
+ resp = self.invoke("RenewCubePod", d, **kwargs)
585
+ return apis.RenewCubePodResponseSchema().loads(resp)
586
+
587
+ def update_cube_deployment(
588
+ self, req: typing.Optional[dict] = None, **kwargs
589
+ ) -> dict:
590
+ """UpdateCubeDeployment -
591
+
592
+ **Request**
593
+
594
+ - **ProjectId** (str) - (Config)
595
+ - **Region** (str) - (Config)
596
+ - **Deployment** (str) - (Required)
597
+ - **DeploymentId** (str) - (Required)
598
+ - **Name** (str) -
599
+ - **Zone** (str) -
600
+
601
+ **Response**
602
+
603
+ - **Deployment** (str) -
604
+
605
+ """
606
+ # build request
607
+ d = {
608
+ "ProjectId": self.config.project_id,
609
+ "Region": self.config.region,
610
+ }
611
+ req and d.update(req)
612
+ d = apis.UpdateCubeDeploymentRequestSchema().dumps(d)
613
+
614
+ # build options
615
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
616
+
617
+ resp = self.invoke("UpdateCubeDeployment", d, **kwargs)
618
+ return apis.UpdateCubeDeploymentResponseSchema().loads(resp)
File without changes