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,820 @@
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.ucompshare.schemas import apis
8
+
9
+
10
+ class UCompShareClient(Client):
11
+ def __init__(
12
+ self, config: dict, transport=None, middleware=None, logger=None
13
+ ):
14
+ super(UCompShareClient, self).__init__(
15
+ config, transport, middleware, logger
16
+ )
17
+
18
+ def create_comp_share_instance(
19
+ self, req: typing.Optional[dict] = None, **kwargs
20
+ ) -> dict:
21
+ """CreateCompShareInstance - 创建轻量级算力平台主机资源
22
+
23
+ **Request**
24
+
25
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
26
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
27
+ - **CPU** (int) - (Required) 虚拟CPU核数。可选参数:1-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。
28
+ - **CompShareImageId** (str) - (Required) 镜像ID
29
+ - **GPU** (int) - (Required) GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关)
30
+ - **GpuType** (str) - (Required) GPU类型,枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S",2080","2080TiS","2080TiPro","3090","A100"],MachineType为G时必填
31
+ - **MachineType** (str) - (Required) 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OM", "OPRO", "OMAX", "O.BM", "O.EPC"]。参考 `云主机机型说明 <https://docs.ucloud.cn/api/uhost-api/uhost_type>`_ 。
32
+ - **Memory** (int) - (Required) 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192
33
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
34
+ - **ChargeType** (str) - 计费模式。枚举值为: \\ > Month,按月付费;\\ > Day,按天付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ > Spot计费为抢占式实例(内测阶段) \\ 默认为月付
35
+ - **Disks** (list) - 见 **CreateCompShareInstanceParamDisks** 模型定义
36
+ - **LoginMode** (str) - 主机登陆模式。密码(默认选项): Password
37
+ - **MinimalCpuPlatform** (str) - 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake", "Intel/CascadelakeR", "Intel/IceLake", "Amd/Epyc2", "Amd/Auto","Ampere/Auto","Ampere/Altra"],默认值是"Intel/Auto"。
38
+ - **Name** (str) - 实例名称
39
+ - **Password** (str) - UHost密码。请遵照 `字段规范 <https://docs.ucloud.cn/api/uhost-api/specification>`_ 设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。
40
+ - **Quantity** (int) - 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。
41
+ - **SecurityGroupId** (str) - 防火墙Id
42
+
43
+ **Response**
44
+
45
+ - **UHostIds** (list) - UHost实例Id集合
46
+
47
+ **Request Model**
48
+
49
+ **CreateCompShareInstanceParamDisks**
50
+ - **IsBoot** (bool) - 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。
51
+ - **Size** (int) - 磁盘大小,单位GB。请参考 `磁盘类型 <https://docs.ucloud.cn/api/uhost-api/disk_type>`_ 。
52
+ - **Type** (str) - 磁盘类型。请参考 `磁盘类型 <https://docs.ucloud.cn/api/uhost-api/disk_type>`_ 。
53
+
54
+
55
+ """
56
+ # build request
57
+ d = {
58
+ "ProjectId": self.config.project_id,
59
+ "Region": self.config.region,
60
+ }
61
+ req and d.update(req)
62
+ d = apis.CreateCompShareInstanceRequestSchema().dumps(d)
63
+
64
+ # build options
65
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
66
+
67
+ resp = self.invoke("CreateCompShareInstance", d, **kwargs)
68
+ return apis.CreateCompShareInstanceResponseSchema().loads(resp)
69
+
70
+ def create_ul_host_instance(
71
+ self, req: typing.Optional[dict] = None, **kwargs
72
+ ) -> dict:
73
+ """CreateULHostInstance - 创建轻量应用云主机
74
+
75
+ **Request**
76
+
77
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
78
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
79
+ - **BundleId** (str) - (Required) 套餐ID。如:"ulh.c1m1s40b30t800"
80
+ - **ImageId** (str) - (Required) 镜像ID。 请通过 `DescribeImage <https://docs.ucloud.cn/api/ucompshare-api/describe_image.html>`_ 获取
81
+ - **Password** (str) - (Required) ULHost密码。请遵照 `字段规范 <https://docs.ucloud.cn/api/uhost-api/specification>`_ 设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64
82
+ - **ChargeType** (str) - 计费模式。枚举值: \\ > Year,按年付费; \\ > Month,按月付费;默认:Month
83
+ - **CouponId** (str) - 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看
84
+ - **Name** (str) - 轻量应用主机名称。默认:套餐ID。请遵照 `字段规范 <https://docs.ucloud.cn/api/uhost-api/specification>`_ 设定实例名称。
85
+ - **Quantity** (int) - 购买时长。默认:1。不支持购买到月末
86
+ - **SecurityGroupId** (str) - 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 `DescribeFirewall <https://docs.ucloud.cn/api/ucompshare-api/api/unet-api/describe_firewall.html>`_ 。
87
+ - **SubnetId** (str) - 子网 ID。默认为当前地域的默认子网。
88
+ - **VPCId** (str) - VPC ID。默认为当前地域的默认VPC。
89
+
90
+ **Response**
91
+
92
+ - **Message** (str) - 错误信息
93
+ - **ULHostId** (str) - 实例ID
94
+
95
+ """
96
+ # build request
97
+ d = {
98
+ "ProjectId": self.config.project_id,
99
+ "Region": self.config.region,
100
+ }
101
+ req and d.update(req)
102
+ d = apis.CreateULHostInstanceRequestSchema().dumps(d)
103
+
104
+ # build options
105
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
106
+
107
+ resp = self.invoke("CreateULHostInstance", d, **kwargs)
108
+ return apis.CreateULHostInstanceResponseSchema().loads(resp)
109
+
110
+ def describe_comp_share_instance(
111
+ self, req: typing.Optional[dict] = None, **kwargs
112
+ ) -> dict:
113
+ """DescribeCompShareInstance - 获取用户所有地域下主机资源信息列表
114
+
115
+ **Request**
116
+
117
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
118
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
119
+ - **Limit** (int) - 返回数据长度,默认为20,最大100
120
+ - **Offset** (int) - 列表起始位置偏移量,默认为0
121
+ - **UHostIds** (list) - 【数组】UHost主机的资源ID,例如UHostIds.0代表希望获取信息 的主机1,UHostIds.1代表主机2。 如果不传入,则返回当前Region 所有符合条件的UHost实例。
122
+ - **WithoutGpu** (bool) - 无卡GPU
123
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
124
+
125
+ **Response**
126
+
127
+ - **TotalCount** (int) - UHostInstance总数
128
+ - **UHostSet** (list) - 见 **CompShareInstanceSet** 模型定义
129
+
130
+ **Response Model**
131
+
132
+ **CompShareInstanceSet**
133
+ - **AutoRenew** (str) - 是否自动续费,自动续费:“Yes”,不自动续费:“No”
134
+ - **CPU** (int) - 虚拟CPU核数,单位: 个
135
+ - **ChargeType** (str) - 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按时付费;Postpay,按需付费
136
+ - **CompShareImageBillId** (str) - 用于镜像计费的Id
137
+ - **CompShareImageId** (str) - 镜像Id
138
+ - **CompShareImageName** (str) - 镜像名称
139
+ - **CompShareImageOwnerAlias** (str) - 镜像来源
140
+ - **CompShareImagePrice** (float) - 镜像价格
141
+ - **CompShareImageStatus** (str) - 镜像状态
142
+ - **CompShareImageType** (str) - 镜像类型- System 系统镜像- App 应用镜像- Custom 自制镜像- Community 社区镜像
143
+ - **CpuArch** (str) - CPU架构。"x86_64"/"i386"等
144
+ - **CpuPlatform** (str) - CPU平台。如"Intel/Auto"、"Amd/Auto"等等
145
+ - **CreateTime** (int) - 创建时间
146
+ - **DiskSet** (list) - 见 **UHostDiskSet** 模型定义
147
+ - **ExpireTime** (int) - 过期时间
148
+ - **GPU** (int) - GPU个数
149
+ - **GpuType** (str) - GPU类型。如: "4090"
150
+ - **GraphicsMemory** (dict) - 见 **GraphicsMemory** 模型定义
151
+ - **IPSet** (list) - 见 **UHostIPSet** 模型定义
152
+ - **InstancePrice** (float) - 主机价格
153
+ - **InstanceType** (str) - 实例类型。"UHost": 普通主机;"Container": 容器主机
154
+ - **IsExpire** (str) - 是否过期。Yes:已过期;No:未过期
155
+ - **MachineType** (str) - 机型信息
156
+ - **Memory** (int) - 内存大小,单位:MB
157
+ - **Name** (str) - 实例名称
158
+ - **OsName** (str) - 虚机镜像的名称
159
+ - **OsType** (str) - 虚机镜像操作系统类型。"Linux"\"Windows"
160
+ - **Password** (str) - 主机密码。由Base64编码
161
+ - **Remark** (str) - 实例备注
162
+ - **Softwares** (list) - 见 **SoftwareAddr** 模型定义
163
+ - **SshLoginCommand** (str) - SSH登录命令
164
+ - **State** (str) - 实例状态,枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\> 运行中: Running; \\> 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ >升级改配中: Resizing; \\ > 未知(空字符串,获取状态超时或出错):
165
+ - **SupportWithoutGpuStart** (bool) - 此实例是否支持无卡开机
166
+ - **Tag** (str) - 实例业务组
167
+ - **TotalDiskSpace** (int) - 总的数据盘存储空间
168
+ - **UHostId** (str) - 实例Id
169
+ - **WithoutGpuSpec** (dict) - 见 **WithoutGpuSpec** 模型定义
170
+ - **Zone** (str) - 可用区
171
+
172
+
173
+ **UHostDiskSet**
174
+ - **DiskId** (str) - 磁盘ID
175
+ - **DiskType** (str) - 磁盘类型。请参考 `磁盘类型 <https://docs.ucloud.cn/api/uhost-api/disk_type>`_ 。
176
+ - **Drive** (str) - 磁盘盘符
177
+ - **Encrypted** (str) - "true": 加密盘 "false":非加密盘
178
+ - **IsBoot** (str) - 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。
179
+ - **Name** (str) - UDisk名字(仅当磁盘是UDisk时返回)
180
+ - **Size** (int) - 磁盘大小,单位: GB
181
+ - **Type** (str) - 【建议不再使用】磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk
182
+
183
+
184
+ **GraphicsMemory**
185
+ - **Rate** (int) - 交互展示参数,可忽略
186
+ - **Value** (int) - 值,单位是GB
187
+
188
+
189
+ **UHostIPSet**
190
+ - **Bandwidth** (int) - IP对应的带宽, 单位: Mb (内网IP不显示带宽信息)
191
+ - **Default** (str) - 内网 Private 类型下,表示是否为默认网卡。true: 是默认网卡;其他值:不是。
192
+ - **IP** (str) - IP地址
193
+ - **IPId** (str) - 外网IP资源ID 。(内网IP无对应的资源ID)
194
+ - **IPMode** (str) - IPv4/IPv6;
195
+ - **Mac** (str) - 内网 Private 类型下,当前网卡的Mac。
196
+ - **NetworkInterfaceId** (str) - 弹性网卡为默认网卡时,返回对应的 ID 值
197
+ - **SubnetId** (str) - IP地址对应的子网 ID。(北京一不支持,字段返回为空)
198
+ - **Type** (str) - 国际: Internation,BGP: Bgp,内网: Private
199
+ - **VPCId** (str) - IP地址对应的VPC ID。(北京一不支持,字段返回为空)
200
+ - **Weight** (int) - 当前EIP的权重。权重最大的为当前的出口IP。
201
+
202
+
203
+ **SoftwareAddr**
204
+ - **Name** (str) - 软件名称
205
+ - **URL** (str) - 软件地址
206
+
207
+
208
+ **WithoutGpuSpec**
209
+ - **Cpu** (int) - cpu
210
+ - **Gpu** (int) - gpu
211
+ - **Memory** (int) - 内存
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.DescribeCompShareInstanceRequestSchema().dumps(d)
222
+
223
+ resp = self.invoke("DescribeCompShareInstance", d, **kwargs)
224
+ return apis.DescribeCompShareInstanceResponseSchema().loads(resp)
225
+
226
+ def describe_ul_host_bundles(
227
+ self, req: typing.Optional[dict] = None, **kwargs
228
+ ) -> dict:
229
+ """DescribeULHostBundles - 获取轻量应用云主机套餐列表
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
+
236
+ **Response**
237
+
238
+ - **Bundles** (list) - 见 **Bundle** 模型定义
239
+ - **Message** (str) - 错误信息
240
+
241
+ **Response Model**
242
+
243
+ **Bundle**
244
+ - **Bandwidth** (int) - 外网带宽。单位:Mbps。
245
+ - **BundleId** (str) - 套餐ID。
246
+ - **CPU** (int) - CPU核数。
247
+ - **Memory** (int) - 内存大小。单位:MB。
248
+ - **SysDiskSpace** (int) - 系统盘大小。单位:GB。
249
+ - **TrafficPacket** (int) - 流量包大小。单位:GB。
250
+
251
+
252
+ """
253
+ # build request
254
+ d = {
255
+ "ProjectId": self.config.project_id,
256
+ "Region": self.config.region,
257
+ }
258
+ req and d.update(req)
259
+ d = apis.DescribeULHostBundlesRequestSchema().dumps(d)
260
+
261
+ resp = self.invoke("DescribeULHostBundles", d, **kwargs)
262
+ return apis.DescribeULHostBundlesResponseSchema().loads(resp)
263
+
264
+ def describe_ul_host_instance(
265
+ self, req: typing.Optional[dict] = None, **kwargs
266
+ ) -> dict:
267
+ """DescribeULHostInstance - 获取轻量应用云主机列表
268
+
269
+ **Request**
270
+
271
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
272
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
273
+ - **Limit** (int) - 返回数据长度,默认为20,最大100
274
+ - **Offset** (int) - 列表起始位置偏移量,默认为0
275
+ - **ULHostIds** (list) - 【数组】轻量应用云主机ID。
276
+
277
+ **Response**
278
+
279
+ - **Message** (str) - 错误信息
280
+ - **ULHostInstanceSets** (list) - 见 **ULHostInstanceSet** 模型定义
281
+
282
+ **Response Model**
283
+
284
+ **ULHostInstanceSet**
285
+ - **Apps** (list) - 【数组】镜像包含的应用列表。
286
+ - **AutoRenew** (str) - 是否自动续费。枚举值:Yes/No
287
+ - **CPU** (int) - CPU核数。
288
+ - **ChargeType** (str) - 计费模式。枚举值:Month/Year
289
+ - **CreateTime** (int) - 创建时间。Unix时间戳
290
+ - **DiskSet** (list) - 见 **ULHostDiskSet** 模型定义
291
+ - **EIPExclusiveUTPInfo** (dict) - 见 **ExclusiveUTPInfo** 模型定义
292
+ - **ExpireTime** (int) - 过期时间。Unix时间戳
293
+ - **IPSet** (list) - 见 **UHostIPSet** 模型定义
294
+ - **ImageId** (str) - 镜像Id。
295
+ - **ImageName** (str) - 镜像名称。
296
+ - **IsExpire** (str) - 是否过期。枚举值:Yes/No
297
+ - **Memory** (int) - 内存。单位:MB
298
+ - **Name** (str) - 实例名称。默认套餐Id
299
+ - **Remark** (str) - 备注。
300
+ - **State** (str) - 实例状态。枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\> 运行中: Running; \\> 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ > 未知(空字符串,获取状态超时或出错):""
301
+ - **Tag** (str) - 业务组。
302
+ - **ULHostId** (str) - 实例Id。
303
+ - **Zone** (str) - 可用区。
304
+
305
+
306
+ **ULHostDiskSet**
307
+ - **DiskId** (str) - 磁盘Id
308
+ - **DiskType** (str) - 磁盘类型。如:"CLOUD_RSSD"、"CLOUD_SSD"
309
+ - **Drive** (str) - 磁盘盘符。系统盘:"vda"
310
+ - **IsBoot** (str) - 是否为系统盘。是:"True";否:"False"
311
+ - **Size** (int) - 磁盘大小。单位:GB
312
+ - **Type** (str) - 磁盘类型。系统盘:"Boot";数据盘:"Data"
313
+
314
+
315
+ **ExclusiveUTPInfo**
316
+ - **AvailableSize** (int) - 当前周期剩余流量
317
+ - **CreateTime** (int) - 创建时间
318
+ - **ExcessSize** (int) - 当前周期超出限额的流量
319
+ - **LastResetTime** (int) - 上次重置时间
320
+ - **NextResetTime** (int) - 下次重置时间
321
+ - **TotalSize** (int) - 当前周期总流量
322
+ - **UsedSize** (int) - 当前周期已使用流量
323
+
324
+
325
+ **UHostIPSet**
326
+ - **Bandwidth** (int) - IP对应的带宽, 单位: Mb (内网IP不显示带宽信息)
327
+ - **Default** (str) - 内网 Private 类型下,表示是否为默认网卡。true: 是默认网卡;其他值:不是。
328
+ - **IP** (str) - IP地址
329
+ - **IPId** (str) - 外网IP资源ID 。(内网IP无对应的资源ID)
330
+ - **IPMode** (str) - IPv4/IPv6;
331
+ - **Mac** (str) - 内网 Private 类型下,当前网卡的Mac。
332
+ - **NetworkInterfaceId** (str) - 弹性网卡为默认网卡时,返回对应的 ID 值
333
+ - **SubnetId** (str) - IP地址对应的子网 ID。(北京一不支持,字段返回为空)
334
+ - **Type** (str) - 国际: Internation,BGP: Bgp,内网: Private
335
+ - **VPCId** (str) - IP地址对应的VPC ID。(北京一不支持,字段返回为空)
336
+ - **Weight** (int) - 当前EIP的权重。权重最大的为当前的出口IP。
337
+
338
+
339
+ """
340
+ # build request
341
+ d = {
342
+ "ProjectId": self.config.project_id,
343
+ "Region": self.config.region,
344
+ }
345
+ req and d.update(req)
346
+ d = apis.DescribeULHostInstanceRequestSchema().dumps(d)
347
+
348
+ resp = self.invoke("DescribeULHostInstance", d, **kwargs)
349
+ return apis.DescribeULHostInstanceResponseSchema().loads(resp)
350
+
351
+ def get_ul_host_instance_price(
352
+ self, req: typing.Optional[dict] = None, **kwargs
353
+ ) -> dict:
354
+ """GetULHostInstancePrice - 获取轻量应用云主机套餐价格
355
+
356
+ **Request**
357
+
358
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
359
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
360
+ - **BundleId** (str) - (Required) 套餐ID
361
+ - **ChargeType** (str) - 获取指定计费模式的价格。枚举值:\\ > Year,按年付费; \\ > Month。未指定时,返回所有计费模式价格
362
+ - **Count** (int) - 购买台数,范围[1,5]。默认:1
363
+ - **Quantity** (int) - 购买时长。默认: 1。不支持购买到月末
364
+
365
+ **Response**
366
+
367
+ - **Message** (str) - 错误信息
368
+ - **PriceSet** (list) - 见 **ULHostPriceSet** 模型定义
369
+
370
+ **Response Model**
371
+
372
+ **ULHostPriceSet**
373
+ - **ChargeType** (str) - 计费模式
374
+ - **OriginalPrice** (float) - 原价
375
+ - **Price** (float) - 价格
376
+
377
+
378
+ """
379
+ # build request
380
+ d = {
381
+ "ProjectId": self.config.project_id,
382
+ "Region": self.config.region,
383
+ }
384
+ req and d.update(req)
385
+ d = apis.GetULHostInstancePriceRequestSchema().dumps(d)
386
+
387
+ resp = self.invoke("GetULHostInstancePrice", d, **kwargs)
388
+ return apis.GetULHostInstancePriceResponseSchema().loads(resp)
389
+
390
+ def get_ul_host_renew_price(
391
+ self, req: typing.Optional[dict] = None, **kwargs
392
+ ) -> dict:
393
+ """GetULHostRenewPrice - 获取主机续费价格
394
+
395
+ **Request**
396
+
397
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
398
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
399
+ - **ULHostId** (str) - (Required) ULHost实例ID
400
+ - **ChargeType** (str) - 计费类型。支持:Year/Month;默认:Month
401
+
402
+ **Response**
403
+
404
+ - **PriceSet** (list) - 见 **ULHostPriceSet** 模型定义
405
+
406
+ **Response Model**
407
+
408
+ **ULHostPriceSet**
409
+ - **ChargeType** (str) - 计费模式
410
+ - **OriginalPrice** (float) - 原价
411
+ - **Price** (float) - 价格
412
+
413
+
414
+ """
415
+ # build request
416
+ d = {
417
+ "ProjectId": self.config.project_id,
418
+ "Region": self.config.region,
419
+ }
420
+ req and d.update(req)
421
+ d = apis.GetULHostRenewPriceRequestSchema().dumps(d)
422
+
423
+ resp = self.invoke("GetULHostRenewPrice", d, **kwargs)
424
+ return apis.GetULHostRenewPriceResponseSchema().loads(resp)
425
+
426
+ def modify_ul_host_attribute(
427
+ self, req: typing.Optional[dict] = None, **kwargs
428
+ ) -> dict:
429
+ """ModifyULHostAttribute - 修改指定ULHost实例属性信息,包含名称和备注
430
+
431
+ **Request**
432
+
433
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
434
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
435
+ - **ULHostId** (str) - (Required) ULHost实例Id
436
+ - **Name** (str) - 名称。和Remark至少选择一个进行修改
437
+ - **Remark** (str) - 备注。和Name至少选择一个进行修改
438
+
439
+ **Response**
440
+
441
+ - **Message** (str) - 错误信息
442
+ - **ULHostId** (str) - ULHost实例Id
443
+
444
+ """
445
+ # build request
446
+ d = {
447
+ "ProjectId": self.config.project_id,
448
+ "Region": self.config.region,
449
+ }
450
+ req and d.update(req)
451
+ d = apis.ModifyULHostAttributeRequestSchema().dumps(d)
452
+
453
+ resp = self.invoke("ModifyULHostAttribute", d, **kwargs)
454
+ return apis.ModifyULHostAttributeResponseSchema().loads(resp)
455
+
456
+ def poweroff_ul_host_instance(
457
+ self, req: typing.Optional[dict] = None, **kwargs
458
+ ) -> dict:
459
+ """PoweroffULHostInstance - 直接关闭UHost实例电源,无需等待实例正常关闭。
460
+
461
+ **Request**
462
+
463
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
464
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
465
+ - **ULHostId** (str) - (Required) ULHost实例ID
466
+
467
+ **Response**
468
+
469
+ - **ULHostId** (str) - ULHost实例ID
470
+
471
+ """
472
+ # build request
473
+ d = {
474
+ "ProjectId": self.config.project_id,
475
+ "Region": self.config.region,
476
+ }
477
+ req and d.update(req)
478
+ d = apis.PoweroffULHostInstanceRequestSchema().dumps(d)
479
+
480
+ resp = self.invoke("PoweroffULHostInstance", d, **kwargs)
481
+ return apis.PoweroffULHostInstanceResponseSchema().loads(resp)
482
+
483
+ def reboot_comp_share_instance(
484
+ self, req: typing.Optional[dict] = None, **kwargs
485
+ ) -> dict:
486
+ """RebootCompShareInstance - 重启轻量算力平台实例
487
+
488
+ **Request**
489
+
490
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
491
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
492
+ - **UHostId** (str) - (Required) 实例Id
493
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
494
+
495
+ **Response**
496
+
497
+ - **UHostId** (str) - 实例Id
498
+
499
+ """
500
+ # build request
501
+ d = {
502
+ "ProjectId": self.config.project_id,
503
+ "Region": self.config.region,
504
+ }
505
+ req and d.update(req)
506
+ d = apis.RebootCompShareInstanceRequestSchema().dumps(d)
507
+
508
+ resp = self.invoke("RebootCompShareInstance", d, **kwargs)
509
+ return apis.RebootCompShareInstanceResponseSchema().loads(resp)
510
+
511
+ def reboot_ul_host_instance(
512
+ self, req: typing.Optional[dict] = None, **kwargs
513
+ ) -> dict:
514
+ """RebootULHostInstance - 重新启动UHost实例。
515
+
516
+ **Request**
517
+
518
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
519
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
520
+ - **ULHostId** (str) - (Required) ULHost实例ID
521
+
522
+ **Response**
523
+
524
+ - **ULHostId** (str) - ULHost实例ID
525
+
526
+ """
527
+ # build request
528
+ d = {
529
+ "ProjectId": self.config.project_id,
530
+ "Region": self.config.region,
531
+ }
532
+ req and d.update(req)
533
+ d = apis.RebootULHostInstanceRequestSchema().dumps(d)
534
+
535
+ resp = self.invoke("RebootULHostInstance", d, **kwargs)
536
+ return apis.RebootULHostInstanceResponseSchema().loads(resp)
537
+
538
+ def reinstall_comp_share_instance(
539
+ self, req: typing.Optional[dict] = None, **kwargs
540
+ ) -> dict:
541
+ """ReinstallCompShareInstance - 重装算力平台实例
542
+
543
+ **Request**
544
+
545
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
546
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
547
+ - **CompShareImageId** (str) - (Required) 镜像Id
548
+ - **UHostId** (str) - (Required) 实例Id
549
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
550
+ - **Password** (str) - 实例的新密码
551
+
552
+ **Response**
553
+
554
+ - **UHostId** (str) - 实例Id
555
+
556
+ """
557
+ # build request
558
+ d = {
559
+ "ProjectId": self.config.project_id,
560
+ "Region": self.config.region,
561
+ }
562
+ req and d.update(req)
563
+ d = apis.ReinstallCompShareInstanceRequestSchema().dumps(d)
564
+
565
+ resp = self.invoke("ReinstallCompShareInstance", d, **kwargs)
566
+ return apis.ReinstallCompShareInstanceResponseSchema().loads(resp)
567
+
568
+ def reinstall_ul_host_instance(
569
+ self, req: typing.Optional[dict] = None, **kwargs
570
+ ) -> dict:
571
+ """ReinstallULHostInstance - 重装轻量应用云主机
572
+
573
+ **Request**
574
+
575
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
576
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
577
+ - **ImageId** (str) - (Required) 镜像Id。暂不支持使用自定义镜像重装
578
+ - **Password** (str) - (Required) 登陆密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64UGFzc3dvcmQx
579
+ - **ULHostId** (str) - (Required) 实例Id
580
+
581
+ **Response**
582
+
583
+ - **Message** (str) - 错误信息
584
+ - **ULHostId** (str) - 实例Id
585
+
586
+ """
587
+ # build request
588
+ d = {
589
+ "ProjectId": self.config.project_id,
590
+ "Region": self.config.region,
591
+ }
592
+ req and d.update(req)
593
+ d = apis.ReinstallULHostInstanceRequestSchema().dumps(d)
594
+
595
+ resp = self.invoke("ReinstallULHostInstance", d, **kwargs)
596
+ return apis.ReinstallULHostInstanceResponseSchema().loads(resp)
597
+
598
+ def reset_comp_share_instance_password(
599
+ self, req: typing.Optional[dict] = None, **kwargs
600
+ ) -> dict:
601
+ """ResetCompShareInstancePassword - 重置算力平台实例密码
602
+
603
+ **Request**
604
+
605
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
606
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
607
+ - **Password** (str) - (Required) 新密码。需经Base64编码
608
+ - **UHostId** (str) - (Required) 实例Id
609
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
610
+
611
+ **Response**
612
+
613
+ - **UHostId** (str) - 实例Id
614
+
615
+ """
616
+ # build request
617
+ d = {
618
+ "ProjectId": self.config.project_id,
619
+ "Region": self.config.region,
620
+ }
621
+ req and d.update(req)
622
+ d = apis.ResetCompShareInstancePasswordRequestSchema().dumps(d)
623
+
624
+ resp = self.invoke("ResetCompShareInstancePassword", d, **kwargs)
625
+ return apis.ResetCompShareInstancePasswordResponseSchema().loads(resp)
626
+
627
+ def reset_ul_host_instance_password(
628
+ self, req: typing.Optional[dict] = None, **kwargs
629
+ ) -> dict:
630
+ """ResetULHostInstancePassword - 重置轻量应用云主机管理员密码。
631
+
632
+ **Request**
633
+
634
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
635
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
636
+ - **Password** (str) - (Required) ULHost新密码(密码格式使用BASE64编码)
637
+ - **ULHostId** (str) - (Required) ULHost实例ID
638
+
639
+ **Response**
640
+
641
+ - **ULHostId** (str) - ULHost实例ID
642
+
643
+ """
644
+ # build request
645
+ d = {
646
+ "ProjectId": self.config.project_id,
647
+ "Region": self.config.region,
648
+ }
649
+ req and d.update(req)
650
+ d = apis.ResetULHostInstancePasswordRequestSchema().dumps(d)
651
+
652
+ resp = self.invoke("ResetULHostInstancePassword", d, **kwargs)
653
+ return apis.ResetULHostInstancePasswordResponseSchema().loads(resp)
654
+
655
+ def start_comp_share_instance(
656
+ self, req: typing.Optional[dict] = None, **kwargs
657
+ ) -> dict:
658
+ """StartCompShareInstance - 启动算力平台实例
659
+
660
+ **Request**
661
+
662
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
663
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
664
+ - **UHostId** (str) - (Required) 实例Id
665
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
666
+
667
+ **Response**
668
+
669
+ - **UHostId** (str) - 实例Id
670
+
671
+ """
672
+ # build request
673
+ d = {
674
+ "ProjectId": self.config.project_id,
675
+ "Region": self.config.region,
676
+ }
677
+ req and d.update(req)
678
+ d = apis.StartCompShareInstanceRequestSchema().dumps(d)
679
+
680
+ resp = self.invoke("StartCompShareInstance", d, **kwargs)
681
+ return apis.StartCompShareInstanceResponseSchema().loads(resp)
682
+
683
+ def start_ul_host_instance(
684
+ self, req: typing.Optional[dict] = None, **kwargs
685
+ ) -> dict:
686
+ """StartULHostInstance - 启动处于关闭状态的UHost实例。
687
+
688
+ **Request**
689
+
690
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
691
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
692
+ - **ULHostId** (str) - (Required) ULHost实例ID
693
+
694
+ **Response**
695
+
696
+ - **ULHostId** (str) - ULHost实例ID
697
+
698
+ """
699
+ # build request
700
+ d = {
701
+ "ProjectId": self.config.project_id,
702
+ "Region": self.config.region,
703
+ }
704
+ req and d.update(req)
705
+ d = apis.StartULHostInstanceRequestSchema().dumps(d)
706
+
707
+ resp = self.invoke("StartULHostInstance", d, **kwargs)
708
+ return apis.StartULHostInstanceResponseSchema().loads(resp)
709
+
710
+ def stop_comp_share_instance(
711
+ self, req: typing.Optional[dict] = None, **kwargs
712
+ ) -> dict:
713
+ """StopCompShareInstance - 关闭算力平台实例
714
+
715
+ **Request**
716
+
717
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
718
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
719
+ - **UHostId** (str) - (Required) 实例Id
720
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
721
+
722
+ **Response**
723
+
724
+ - **UHostId** (str) - 实例Id
725
+
726
+ """
727
+ # build request
728
+ d = {
729
+ "ProjectId": self.config.project_id,
730
+ "Region": self.config.region,
731
+ }
732
+ req and d.update(req)
733
+ d = apis.StopCompShareInstanceRequestSchema().dumps(d)
734
+
735
+ resp = self.invoke("StopCompShareInstance", d, **kwargs)
736
+ return apis.StopCompShareInstanceResponseSchema().loads(resp)
737
+
738
+ def stop_ul_host_instance(
739
+ self, req: typing.Optional[dict] = None, **kwargs
740
+ ) -> dict:
741
+ """StopULHostInstance - 指停止处于运行状态的ULHost实例
742
+
743
+ **Request**
744
+
745
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
746
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
747
+ - **ULHostId** (str) - (Required) ULHost实例ID。
748
+
749
+ **Response**
750
+
751
+ - **ULHostId** (str) - ULHost实例ID
752
+
753
+ """
754
+ # build request
755
+ d = {
756
+ "ProjectId": self.config.project_id,
757
+ "Region": self.config.region,
758
+ }
759
+ req and d.update(req)
760
+ d = apis.StopULHostInstanceRequestSchema().dumps(d)
761
+
762
+ resp = self.invoke("StopULHostInstance", d, **kwargs)
763
+ return apis.StopULHostInstanceResponseSchema().loads(resp)
764
+
765
+ def terminate_comp_share_instance(
766
+ self, req: typing.Optional[dict] = None, **kwargs
767
+ ) -> dict:
768
+ """TerminateCompShareInstance - 删除轻量算力共享平台虚机实例
769
+
770
+ **Request**
771
+
772
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
773
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
774
+ - **UHostId** (str) - (Required) 虚机资源id
775
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
776
+
777
+ **Response**
778
+
779
+ - **UHostId** (str) - 虚机资源id
780
+
781
+ """
782
+ # build request
783
+ d = {
784
+ "ProjectId": self.config.project_id,
785
+ "Region": self.config.region,
786
+ }
787
+ req and d.update(req)
788
+ d = apis.TerminateCompShareInstanceRequestSchema().dumps(d)
789
+
790
+ resp = self.invoke("TerminateCompShareInstance", d, **kwargs)
791
+ return apis.TerminateCompShareInstanceResponseSchema().loads(resp)
792
+
793
+ def terminate_ul_host_instance(
794
+ self, req: typing.Optional[dict] = None, **kwargs
795
+ ) -> dict:
796
+ """TerminateULHostInstance - 删除指定数据中心的ULHost实例。
797
+
798
+ **Request**
799
+
800
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
801
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
802
+ - **ULHostId** (str) - (Required) ULHost资源Id
803
+ - **ReleaseUDisk** (bool) - 删除主机时是否同时删除挂载的数据盘。默认为false。
804
+
805
+ **Response**
806
+
807
+ - **InRecycle** (str) - 用于判断主机删除时是否进入回收站。放入回收站:"Yes", 彻底删除:“No”。
808
+ - **ULHostId** (str) - ULHost 实例 Id
809
+
810
+ """
811
+ # build request
812
+ d = {
813
+ "ProjectId": self.config.project_id,
814
+ "Region": self.config.region,
815
+ }
816
+ req and d.update(req)
817
+ d = apis.TerminateULHostInstanceRequestSchema().dumps(d)
818
+
819
+ resp = self.invoke("TerminateULHostInstance", d, **kwargs)
820
+ return apis.TerminateULHostInstanceResponseSchema().loads(resp)