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.
- ucloud/__init__.py +0 -0
- ucloud/client.py +469 -0
- ucloud/core/__init__.py +0 -0
- ucloud/core/auth/__init__.py +3 -0
- ucloud/core/auth/_cfg.py +72 -0
- ucloud/core/client/__init__.py +8 -0
- ucloud/core/client/_cfg.py +96 -0
- ucloud/core/client/_client.py +176 -0
- ucloud/core/exc/__init__.py +9 -0
- ucloud/core/exc/_exc.py +94 -0
- ucloud/core/transport/__init__.py +4 -0
- ucloud/core/transport/_requests.py +135 -0
- ucloud/core/transport/http.py +120 -0
- ucloud/core/transport/utils.py +40 -0
- ucloud/core/typesystem/__init__.py +0 -0
- ucloud/core/typesystem/abstract.py +60 -0
- ucloud/core/typesystem/encoder.py +33 -0
- ucloud/core/typesystem/fields.py +149 -0
- ucloud/core/typesystem/schema.py +97 -0
- ucloud/core/utils/__init__.py +0 -0
- ucloud/core/utils/compat.py +15 -0
- ucloud/core/utils/deco.py +31 -0
- ucloud/core/utils/log.py +29 -0
- ucloud/core/utils/middleware.py +63 -0
- ucloud/helpers/__init__.py +0 -0
- ucloud/helpers/utils.py +90 -0
- ucloud/helpers/wait.py +108 -0
- ucloud/services/__init__.py +0 -0
- ucloud/services/cube/__init__.py +0 -0
- ucloud/services/cube/client.py +618 -0
- ucloud/services/cube/schemas/__init__.py +0 -0
- ucloud/services/cube/schemas/apis.py +548 -0
- ucloud/services/cube/schemas/models.py +58 -0
- ucloud/services/iam/__init__.py +0 -0
- ucloud/services/iam/client.py +1078 -0
- ucloud/services/iam/schemas/__init__.py +0 -0
- ucloud/services/iam/schemas/apis.py +973 -0
- ucloud/services/iam/schemas/models.py +127 -0
- ucloud/services/ipsecvpn/__init__.py +0 -0
- ucloud/services/ipsecvpn/client.py +522 -0
- ucloud/services/ipsecvpn/schemas/__init__.py +0 -0
- ucloud/services/ipsecvpn/schemas/apis.py +455 -0
- ucloud/services/ipsecvpn/schemas/models.py +134 -0
- ucloud/services/ipv6gw/__init__.py +0 -0
- ucloud/services/ipv6gw/client.py +44 -0
- ucloud/services/ipv6gw/schemas/__init__.py +0 -0
- ucloud/services/ipv6gw/schemas/apis.py +34 -0
- ucloud/services/ipv6gw/schemas/models.py +3 -0
- ucloud/services/isms/__init__.py +0 -0
- ucloud/services/isms/client.py +330 -0
- ucloud/services/isms/schemas/__init__.py +0 -0
- ucloud/services/isms/schemas/apis.py +272 -0
- ucloud/services/isms/schemas/models.py +50 -0
- ucloud/services/pathx/__init__.py +0 -0
- ucloud/services/pathx/client.py +1656 -0
- ucloud/services/pathx/schemas/__init__.py +0 -0
- ucloud/services/pathx/schemas/apis.py +1289 -0
- ucloud/services/pathx/schemas/models.py +420 -0
- ucloud/services/stepflow/__init__.py +0 -0
- ucloud/services/stepflow/client.py +98 -0
- ucloud/services/stepflow/schemas/__init__.py +0 -0
- ucloud/services/stepflow/schemas/apis.py +67 -0
- ucloud/services/stepflow/schemas/models.py +37 -0
- ucloud/services/sts/__init__.py +0 -0
- ucloud/services/sts/client.py +46 -0
- ucloud/services/sts/schemas/__init__.py +0 -0
- ucloud/services/sts/schemas/apis.py +35 -0
- ucloud/services/sts/schemas/models.py +16 -0
- ucloud/services/tidb/__init__.py +0 -0
- ucloud/services/tidb/client.py +120 -0
- ucloud/services/tidb/schemas/__init__.py +0 -0
- ucloud/services/tidb/schemas/apis.py +103 -0
- ucloud/services/tidb/schemas/models.py +11 -0
- ucloud/services/uaaa/__init__.py +0 -0
- ucloud/services/uaaa/client.py +311 -0
- ucloud/services/uaaa/schemas/__init__.py +0 -0
- ucloud/services/uaaa/schemas/apis.py +252 -0
- ucloud/services/uaaa/schemas/models.py +47 -0
- ucloud/services/uaccount/__init__.py +0 -0
- ucloud/services/uaccount/client.py +547 -0
- ucloud/services/uaccount/schemas/__init__.py +0 -0
- ucloud/services/uaccount/schemas/apis.py +442 -0
- ucloud/services/uaccount/schemas/models.py +128 -0
- ucloud/services/uads/__init__.py +0 -0
- ucloud/services/uads/client.py +1148 -0
- ucloud/services/uads/schemas/__init__.py +0 -0
- ucloud/services/uads/schemas/apis.py +983 -0
- ucloud/services/uads/schemas/models.py +199 -0
- ucloud/services/ubill/__init__.py +0 -0
- ucloud/services/ubill/client.py +248 -0
- ucloud/services/ubill/schemas/__init__.py +0 -0
- ucloud/services/ubill/schemas/apis.py +183 -0
- ucloud/services/ubill/schemas/models.py +107 -0
- ucloud/services/ucdn/__init__.py +0 -0
- ucloud/services/ucdn/client.py +1964 -0
- ucloud/services/ucdn/schemas/__init__.py +0 -0
- ucloud/services/ucdn/schemas/apis.py +1395 -0
- ucloud/services/ucdn/schemas/models.py +576 -0
- ucloud/services/ucloudstack/__init__.py +0 -0
- ucloud/services/ucloudstack/client.py +3352 -0
- ucloud/services/ucloudstack/schemas/__init__.py +0 -0
- ucloud/services/ucloudstack/schemas/apis.py +2887 -0
- ucloud/services/ucloudstack/schemas/models.py +560 -0
- ucloud/services/ucompshare/__init__.py +0 -0
- ucloud/services/ucompshare/client.py +820 -0
- ucloud/services/ucompshare/schemas/__init__.py +0 -0
- ucloud/services/ucompshare/schemas/apis.py +623 -0
- ucloud/services/ucompshare/schemas/models.py +241 -0
- ucloud/services/udb/__init__.py +0 -0
- ucloud/services/udb/client.py +2463 -0
- ucloud/services/udb/schemas/__init__.py +0 -0
- ucloud/services/udb/schemas/apis.py +2053 -0
- ucloud/services/udb/schemas/models.py +319 -0
- ucloud/services/udbproxy/__init__.py +0 -0
- ucloud/services/udbproxy/client.py +67 -0
- ucloud/services/udbproxy/schemas/__init__.py +0 -0
- ucloud/services/udbproxy/schemas/apis.py +38 -0
- ucloud/services/udbproxy/schemas/models.py +31 -0
- ucloud/services/uddb/__init__.py +0 -0
- ucloud/services/uddb/client.py +456 -0
- ucloud/services/uddb/schemas/__init__.py +0 -0
- ucloud/services/uddb/schemas/apis.py +520 -0
- ucloud/services/uddb/schemas/models.py +96 -0
- ucloud/services/udi/__init__.py +0 -0
- ucloud/services/udi/client.py +250 -0
- ucloud/services/udi/schemas/__init__.py +0 -0
- ucloud/services/udi/schemas/apis.py +205 -0
- ucloud/services/udi/schemas/models.py +58 -0
- ucloud/services/udisk/__init__.py +0 -0
- ucloud/services/udisk/client.py +832 -0
- ucloud/services/udisk/schemas/__init__.py +0 -0
- ucloud/services/udisk/schemas/apis.py +741 -0
- ucloud/services/udisk/schemas/models.py +100 -0
- ucloud/services/udns/__init__.py +0 -0
- ucloud/services/udns/client.py +380 -0
- ucloud/services/udns/schemas/__init__.py +0 -0
- ucloud/services/udns/schemas/apis.py +293 -0
- ucloud/services/udns/schemas/models.py +58 -0
- ucloud/services/udpn/__init__.py +0 -0
- ucloud/services/udpn/client.py +240 -0
- ucloud/services/udpn/schemas/__init__.py +0 -0
- ucloud/services/udpn/schemas/apis.py +203 -0
- ucloud/services/udpn/schemas/models.py +29 -0
- ucloud/services/udts/__init__.py +0 -0
- ucloud/services/udts/client.py +410 -0
- ucloud/services/udts/schemas/__init__.py +0 -0
- ucloud/services/udts/schemas/apis.py +403 -0
- ucloud/services/udts/schemas/models.py +93 -0
- ucloud/services/uec/__init__.py +0 -0
- ucloud/services/uec/client.py +1510 -0
- ucloud/services/uec/schemas/__init__.py +0 -0
- ucloud/services/uec/schemas/apis.py +1195 -0
- ucloud/services/uec/schemas/models.py +316 -0
- ucloud/services/ufile/__init__.py +0 -0
- ucloud/services/ufile/client.py +698 -0
- ucloud/services/ufile/schemas/__init__.py +0 -0
- ucloud/services/ufile/schemas/apis.py +542 -0
- ucloud/services/ufile/schemas/models.py +139 -0
- ucloud/services/ufs/__init__.py +0 -0
- ucloud/services/ufs/client.py +328 -0
- ucloud/services/ufs/schemas/__init__.py +0 -0
- ucloud/services/ufs/schemas/apis.py +265 -0
- ucloud/services/ufs/schemas/models.py +52 -0
- ucloud/services/ugn/__init__.py +0 -0
- ucloud/services/ugn/client.py +857 -0
- ucloud/services/ugn/schemas/__init__.py +0 -0
- ucloud/services/ugn/schemas/apis.py +678 -0
- ucloud/services/ugn/schemas/models.py +191 -0
- ucloud/services/uhost/__init__.py +0 -0
- ucloud/services/uhost/client.py +1647 -0
- ucloud/services/uhost/schemas/__init__.py +0 -0
- ucloud/services/uhost/schemas/apis.py +1483 -0
- ucloud/services/uhost/schemas/models.py +427 -0
- ucloud/services/uhub/__init__.py +0 -0
- ucloud/services/uhub/client.py +229 -0
- ucloud/services/uhub/schemas/__init__.py +0 -0
- ucloud/services/uhub/schemas/apis.py +194 -0
- ucloud/services/uhub/schemas/models.py +39 -0
- ucloud/services/uk8s/__init__.py +0 -0
- ucloud/services/uk8s/client.py +729 -0
- ucloud/services/uk8s/schemas/__init__.py +0 -0
- ucloud/services/uk8s/schemas/apis.py +639 -0
- ucloud/services/uk8s/schemas/models.py +179 -0
- ucloud/services/ulb/__init__.py +0 -0
- ucloud/services/ulb/client.py +2285 -0
- ucloud/services/ulb/schemas/__init__.py +0 -0
- ucloud/services/ulb/schemas/apis.py +1678 -0
- ucloud/services/ulb/schemas/models.py +591 -0
- ucloud/services/ulighthost/__init__.py +0 -0
- ucloud/services/ulighthost/client.py +576 -0
- ucloud/services/ulighthost/schemas/__init__.py +0 -0
- ucloud/services/ulighthost/schemas/apis.py +445 -0
- ucloud/services/ulighthost/schemas/models.py +133 -0
- ucloud/services/umem/__init__.py +0 -0
- ucloud/services/umem/client.py +1829 -0
- ucloud/services/umem/schemas/__init__.py +0 -0
- ucloud/services/umem/schemas/apis.py +1477 -0
- ucloud/services/umem/schemas/models.py +327 -0
- ucloud/services/umongodb/__init__.py +0 -0
- ucloud/services/umongodb/client.py +752 -0
- ucloud/services/umongodb/schemas/__init__.py +0 -0
- ucloud/services/umongodb/schemas/apis.py +567 -0
- ucloud/services/umongodb/schemas/models.py +220 -0
- ucloud/services/unet/__init__.py +0 -0
- ucloud/services/unet/client.py +1278 -0
- ucloud/services/unet/schemas/__init__.py +0 -0
- ucloud/services/unet/schemas/apis.py +1006 -0
- ucloud/services/unet/schemas/models.py +275 -0
- ucloud/services/unvs/__init__.py +0 -0
- ucloud/services/unvs/client.py +87 -0
- ucloud/services/unvs/schemas/__init__.py +0 -0
- ucloud/services/unvs/schemas/apis.py +66 -0
- ucloud/services/unvs/schemas/models.py +19 -0
- ucloud/services/upfs/__init__.py +0 -0
- ucloud/services/upfs/client.py +252 -0
- ucloud/services/upfs/schemas/__init__.py +0 -0
- ucloud/services/upfs/schemas/apis.py +204 -0
- ucloud/services/upfs/schemas/models.py +36 -0
- ucloud/services/upgsql/__init__.py +0 -0
- ucloud/services/upgsql/client.py +1007 -0
- ucloud/services/upgsql/schemas/__init__.py +0 -0
- ucloud/services/upgsql/schemas/apis.py +827 -0
- ucloud/services/upgsql/schemas/models.py +158 -0
- ucloud/services/uphone/__init__.py +0 -0
- ucloud/services/uphone/client.py +2122 -0
- ucloud/services/uphone/schemas/__init__.py +0 -0
- ucloud/services/uphone/schemas/apis.py +1799 -0
- ucloud/services/uphone/schemas/models.py +357 -0
- ucloud/services/uphost/__init__.py +0 -0
- ucloud/services/uphost/client.py +847 -0
- ucloud/services/uphost/schemas/__init__.py +0 -0
- ucloud/services/uphost/schemas/apis.py +689 -0
- ucloud/services/uphost/schemas/models.py +175 -0
- ucloud/services/urocketmq/__init__.py +0 -0
- ucloud/services/urocketmq/client.py +117 -0
- ucloud/services/urocketmq/schemas/__init__.py +0 -0
- ucloud/services/urocketmq/schemas/apis.py +92 -0
- ucloud/services/urocketmq/schemas/models.py +14 -0
- ucloud/services/uslk/__init__.py +0 -0
- ucloud/services/uslk/client.py +249 -0
- ucloud/services/uslk/schemas/__init__.py +0 -0
- ucloud/services/uslk/schemas/apis.py +191 -0
- ucloud/services/uslk/schemas/models.py +74 -0
- ucloud/services/usms/__init__.py +0 -0
- ucloud/services/usms/client.py +759 -0
- ucloud/services/usms/schemas/__init__.py +0 -0
- ucloud/services/usms/schemas/apis.py +653 -0
- ucloud/services/usms/schemas/models.py +215 -0
- ucloud/services/utsdb/__init__.py +0 -0
- ucloud/services/utsdb/client.py +604 -0
- ucloud/services/utsdb/schemas/__init__.py +0 -0
- ucloud/services/utsdb/schemas/apis.py +515 -0
- ucloud/services/utsdb/schemas/models.py +61 -0
- ucloud/services/uvms/__init__.py +0 -0
- ucloud/services/uvms/client.py +119 -0
- ucloud/services/uvms/schemas/__init__.py +0 -0
- ucloud/services/uvms/schemas/apis.py +88 -0
- ucloud/services/uvms/schemas/models.py +40 -0
- ucloud/services/vpc/__init__.py +0 -0
- ucloud/services/vpc/client.py +3233 -0
- ucloud/services/vpc/schemas/__init__.py +0 -0
- ucloud/services/vpc/schemas/apis.py +2529 -0
- ucloud/services/vpc/schemas/models.py +651 -0
- ucloud/testing/__init__.py +0 -0
- ucloud/testing/driver/__init__.py +5 -0
- ucloud/testing/driver/_scenario.py +93 -0
- ucloud/testing/driver/_specification.py +57 -0
- ucloud/testing/driver/_step.py +166 -0
- ucloud/testing/env.py +28 -0
- ucloud/testing/exc.py +18 -0
- ucloud/testing/funcs.py +68 -0
- ucloud/testing/mock.py +28 -0
- ucloud/testing/op.py +177 -0
- ucloud/testing/utest.py +195 -0
- ucloud/version.py +1 -0
- ucloud_sdk_python3-0.11.81.dist-info/LICENSE +202 -0
- ucloud_sdk_python3-0.11.81.dist-info/METADATA +71 -0
- ucloud_sdk_python3-0.11.81.dist-info/RECORD +280 -0
- ucloud_sdk_python3-0.11.81.dist-info/WHEEL +5 -0
- ucloud_sdk_python3-0.11.81.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,576 @@
|
|
|
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.ulighthost.schemas import apis
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ULightHostClient(Client):
|
|
11
|
+
def __init__(
|
|
12
|
+
self, config: dict, transport=None, middleware=None, logger=None
|
|
13
|
+
):
|
|
14
|
+
super(ULightHostClient, self).__init__(
|
|
15
|
+
config, transport, middleware, logger
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
def check_ul_host_resource_capacity(
|
|
19
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
20
|
+
) -> dict:
|
|
21
|
+
"""CheckULHostResourceCapacity - 检查轻量应用云主机资源余量
|
|
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
|
+
- **BundleId** (str) - (Required) 套餐ID。如:"ulh.c1m1s40b30t800"
|
|
28
|
+
- **ImageId** (str) - (Required) 镜像ID。 请通过 `DescribeImage <https://docs.ucloud.cn/api/ulighthost-api/describe_image.html>`_ 获取
|
|
29
|
+
- **ChargeType** (str) - 计费模式。枚举值: \\ > Year,按年付费; \\ > Month,按月付费;\\ > ThirtyDay,30天期付费,跨境电商相关套餐使用此计费方式;默认:Month
|
|
30
|
+
- **CouponId** (str) - 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看
|
|
31
|
+
- **Name** (str) - 轻量应用主机名称。默认:套餐ID。请遵照 `字段规范 <https://docs.ucloud.cn/api/uhost-api/specification>`_ 设定实例名称。
|
|
32
|
+
- **Quantity** (int) - 购买时长。默认:1。不支持购买到月末
|
|
33
|
+
- **SecurityGroupId** (str) - 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 `DescribeFirewall <https://docs.ucloud.cn/api/ulighthost-api/api/unet-api/describe_firewall.html>`_ 。
|
|
34
|
+
- **SubnetId** (str) - 子网 ID。默认为当前地域的默认子网。
|
|
35
|
+
- **VPCId** (str) - VPC ID。默认为当前地域的默认VPC。
|
|
36
|
+
|
|
37
|
+
**Response**
|
|
38
|
+
|
|
39
|
+
- **Message** (str) - 错误信息
|
|
40
|
+
- **ResourceEnough** (bool) - 资源是否充足
|
|
41
|
+
|
|
42
|
+
"""
|
|
43
|
+
# build request
|
|
44
|
+
d = {
|
|
45
|
+
"ProjectId": self.config.project_id,
|
|
46
|
+
"Region": self.config.region,
|
|
47
|
+
}
|
|
48
|
+
req and d.update(req)
|
|
49
|
+
d = apis.CheckULHostResourceCapacityRequestSchema().dumps(d)
|
|
50
|
+
|
|
51
|
+
resp = self.invoke("CheckULHostResourceCapacity", d, **kwargs)
|
|
52
|
+
return apis.CheckULHostResourceCapacityResponseSchema().loads(resp)
|
|
53
|
+
|
|
54
|
+
def create_ul_host_instance(
|
|
55
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
56
|
+
) -> dict:
|
|
57
|
+
"""CreateULHostInstance - 创建轻量应用云主机
|
|
58
|
+
|
|
59
|
+
**Request**
|
|
60
|
+
|
|
61
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
62
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
63
|
+
- **BundleId** (str) - (Required) 套餐ID。如:"ulh.c1m1s40b30t800"
|
|
64
|
+
- **ImageId** (str) - (Required) 镜像ID。 请通过 `DescribeImage <https://docs.ucloud.cn/api/ulighthost-api/describe_image.html>`_ 获取
|
|
65
|
+
- **Password** (str) - (Required) ULHost密码。请遵照 `字段规范 <https://docs.ucloud.cn/api/uhost-api/specification>`_ 设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64
|
|
66
|
+
- **ChargeType** (str) - 计费模式。枚举值: \\ > Year,按年付费; \\ > Month,按月付费;\\ > ThirtyDay,30天期付费,跨境电商相关套餐使用此计费方式;默认:Month
|
|
67
|
+
- **CouponId** (str) - 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看
|
|
68
|
+
- **Name** (str) - 轻量应用主机名称。默认:套餐ID。请遵照 `字段规范 <https://docs.ucloud.cn/api/uhost-api/specification>`_ 设定实例名称。
|
|
69
|
+
- **Quantity** (int) - 购买时长。默认:1。不支持购买到月末
|
|
70
|
+
- **SecurityGroupId** (str) - 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 `DescribeFirewall <https://docs.ucloud.cn/api/ulighthost-api/api/unet-api/describe_firewall.html>`_ 。
|
|
71
|
+
- **SubnetId** (str) - 子网 ID。默认为当前地域的默认子网。
|
|
72
|
+
- **VPCId** (str) - VPC ID。默认为当前地域的默认VPC。
|
|
73
|
+
|
|
74
|
+
**Response**
|
|
75
|
+
|
|
76
|
+
- **Message** (str) - 错误信息
|
|
77
|
+
- **ULHostId** (str) - 实例ID
|
|
78
|
+
|
|
79
|
+
"""
|
|
80
|
+
# build request
|
|
81
|
+
d = {
|
|
82
|
+
"ProjectId": self.config.project_id,
|
|
83
|
+
"Region": self.config.region,
|
|
84
|
+
}
|
|
85
|
+
req and d.update(req)
|
|
86
|
+
d = apis.CreateULHostInstanceRequestSchema().dumps(d)
|
|
87
|
+
|
|
88
|
+
# build options
|
|
89
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
90
|
+
|
|
91
|
+
resp = self.invoke("CreateULHostInstance", d, **kwargs)
|
|
92
|
+
return apis.CreateULHostInstanceResponseSchema().loads(resp)
|
|
93
|
+
|
|
94
|
+
def describe_ul_host_bundles(
|
|
95
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
96
|
+
) -> dict:
|
|
97
|
+
"""DescribeULHostBundles - 获取轻量应用云主机套餐列表
|
|
98
|
+
|
|
99
|
+
**Request**
|
|
100
|
+
|
|
101
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
102
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
103
|
+
|
|
104
|
+
**Response**
|
|
105
|
+
|
|
106
|
+
- **Bundles** (list) - 见 **Bundle** 模型定义
|
|
107
|
+
- **Message** (str) - 错误信息
|
|
108
|
+
|
|
109
|
+
**Response Model**
|
|
110
|
+
|
|
111
|
+
**Bundle**
|
|
112
|
+
- **Bandwidth** (int) - 外网带宽。单位:Mbps。
|
|
113
|
+
- **BundleId** (str) - 套餐ID。
|
|
114
|
+
- **CPU** (int) - CPU核数。
|
|
115
|
+
- **Memory** (int) - 内存大小。单位:MB。
|
|
116
|
+
- **SysDiskSpace** (int) - 系统盘大小。单位:GB。
|
|
117
|
+
- **TrafficPacket** (int) - 流量包大小。单位:GB。
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
"""
|
|
121
|
+
# build request
|
|
122
|
+
d = {
|
|
123
|
+
"ProjectId": self.config.project_id,
|
|
124
|
+
"Region": self.config.region,
|
|
125
|
+
}
|
|
126
|
+
req and d.update(req)
|
|
127
|
+
d = apis.DescribeULHostBundlesRequestSchema().dumps(d)
|
|
128
|
+
|
|
129
|
+
resp = self.invoke("DescribeULHostBundles", d, **kwargs)
|
|
130
|
+
return apis.DescribeULHostBundlesResponseSchema().loads(resp)
|
|
131
|
+
|
|
132
|
+
def describe_ul_host_image(
|
|
133
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
134
|
+
) -> dict:
|
|
135
|
+
"""DescribeULHostImage - 获取指定数据中心镜像列表
|
|
136
|
+
|
|
137
|
+
**Request**
|
|
138
|
+
|
|
139
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
140
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
141
|
+
- **ImageId** (str) - 镜像Id
|
|
142
|
+
- **ImageIds** (list) - 镜像Id列表
|
|
143
|
+
- **ImageType** (str) - 镜像类型。标准镜像:Base,应用镜像:App, 自定义镜像:Custom,默认返回所有类型
|
|
144
|
+
- **Limit** (int) - 返回数据长度,默认为20
|
|
145
|
+
- **Offset** (int) - 列表起始位置偏移量,默认为0
|
|
146
|
+
- **OsType** (str) - 操作系统类型:Linux, Windows 默认返回所有类型
|
|
147
|
+
- **Scene** (str) - 使用场景,当ImageType为"App"时生效。- Normal 常规专区- CrossBorder 跨境专区默认返回所有
|
|
148
|
+
- **Tag** (str) - 业务组Id。默认:Default
|
|
149
|
+
- **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
150
|
+
|
|
151
|
+
**Response**
|
|
152
|
+
|
|
153
|
+
- **ImageSet** (list) - 见 **ULHostImageSet** 模型定义
|
|
154
|
+
- **TotalCount** (int) - 满足条件的镜像总数
|
|
155
|
+
|
|
156
|
+
**Response Model**
|
|
157
|
+
|
|
158
|
+
**ULHostImageSet**
|
|
159
|
+
- **CreateTime** (int) - 创建时间,格式为Unix时间戳
|
|
160
|
+
- **DisplayName** (str) - 用于控制台显示的名称
|
|
161
|
+
- **Features** (list) - 特殊状态标识,目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra(网络增强2.0), NetEnhanced_Extreme(网络增强3.0), HotPlug(热升级), GPU(GPU镜像),CloudInit, IPv6(支持IPv6网络),RssdAttachable(支持RSSD云盘),Vgpu_AMD(支持AMD的vgpu),Vgpu_NVIDIA(支持NVIDIA的vgpu),Aarch64_Type(支持arm64架构)
|
|
162
|
+
- **ImageDescription** (str) - 镜像描述
|
|
163
|
+
- **ImageId** (str) - 镜像ID
|
|
164
|
+
- **ImageLogoLink** (str) - 应用镜像图标url
|
|
165
|
+
- **ImageName** (str) - 镜像名称
|
|
166
|
+
- **ImageSize** (int) - 镜像大小
|
|
167
|
+
- **ImageType** (str) - 镜像类型 标准镜像:Base, 行业镜像:Business,自定义镜像:Custom
|
|
168
|
+
- **IntegratedSoftware** (str) - 集成软件名称(仅行业镜像将返回这个值)
|
|
169
|
+
- **MaintainEol** (str) - 系统EOL的时间,格式:YYYY/MM/DD
|
|
170
|
+
- **MinimalCPU** (str) - 默认值为空'''。当CentOS 7.3/7.4/7.5等镜像会标记为“Broadwell”
|
|
171
|
+
- **OsName** (str) - 操作系统名称
|
|
172
|
+
- **OsType** (str) - 操作系统类型:Linux,Windows
|
|
173
|
+
- **SceneCategories** (list) - 场景分类,目前包含Featured(精选),PreInstalledDrivers(预装驱动),AIPainting(AI绘画),AIModels(AI模型),HPC(高性能计算)
|
|
174
|
+
- **State** (str) - 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable,复制中:Copying
|
|
175
|
+
- **Tag** (str) - 业务组
|
|
176
|
+
- **Zone** (str) - 可用区,参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
"""
|
|
180
|
+
# build request
|
|
181
|
+
d = {
|
|
182
|
+
"ProjectId": self.config.project_id,
|
|
183
|
+
"Region": self.config.region,
|
|
184
|
+
}
|
|
185
|
+
req and d.update(req)
|
|
186
|
+
d = apis.DescribeULHostImageRequestSchema().dumps(d)
|
|
187
|
+
|
|
188
|
+
resp = self.invoke("DescribeULHostImage", d, **kwargs)
|
|
189
|
+
return apis.DescribeULHostImageResponseSchema().loads(resp)
|
|
190
|
+
|
|
191
|
+
def describe_ul_host_instance(
|
|
192
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
193
|
+
) -> dict:
|
|
194
|
+
"""DescribeULHostInstance - 获取轻量应用云主机列表
|
|
195
|
+
|
|
196
|
+
**Request**
|
|
197
|
+
|
|
198
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
199
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
200
|
+
- **Limit** (int) - 返回数据长度,默认为20,最大100
|
|
201
|
+
- **Offset** (int) - 列表起始位置偏移量,默认为0
|
|
202
|
+
- **ULHostIds** (list) - 【数组】轻量应用云主机ID。
|
|
203
|
+
|
|
204
|
+
**Response**
|
|
205
|
+
|
|
206
|
+
- **Message** (str) - 错误信息
|
|
207
|
+
- **ULHostInstanceSets** (list) - 见 **ULHostInstanceSet** 模型定义
|
|
208
|
+
|
|
209
|
+
**Response Model**
|
|
210
|
+
|
|
211
|
+
**ExclusiveUTPInfo**
|
|
212
|
+
- **AvailableSize** (int) - 当前周期剩余流量
|
|
213
|
+
- **CreateTime** (int) - 创建时间
|
|
214
|
+
- **ExcessSize** (int) - 当前周期超出限额的流量
|
|
215
|
+
- **LastResetTime** (int) - 上次重置时间
|
|
216
|
+
- **NextResetTime** (int) - 下次重置时间
|
|
217
|
+
- **TotalSize** (int) - 当前周期总流量
|
|
218
|
+
- **UsedSize** (int) - 当前周期已使用流量
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
**ULHostDiskSet**
|
|
222
|
+
- **DiskId** (str) - 磁盘Id
|
|
223
|
+
- **DiskType** (str) - 磁盘类型。如:"CLOUD_RSSD"、"CLOUD_SSD"
|
|
224
|
+
- **Drive** (str) - 磁盘盘符。系统盘:"vda"
|
|
225
|
+
- **IsBoot** (str) - 是否为系统盘。是:"True";否:"False"
|
|
226
|
+
- **Size** (int) - 磁盘大小。单位:GB
|
|
227
|
+
- **Type** (str) - 磁盘类型。系统盘:"Boot";数据盘:"Data"
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
**UHostIPSet**
|
|
231
|
+
- **Bandwidth** (int) - IP对应的带宽, 单位: Mb (内网IP不显示带宽信息)
|
|
232
|
+
- **Default** (str) - 内网 Private 类型下,表示是否为默认网卡。true: 是默认网卡;其他值:不是。
|
|
233
|
+
- **IP** (str) - IP地址
|
|
234
|
+
- **IPId** (str) - 外网IP资源ID 。(内网IP无对应的资源ID)
|
|
235
|
+
- **IPMode** (str) - IPv4/IPv6;
|
|
236
|
+
- **Mac** (str) - 内网 Private 类型下,当前网卡的Mac。
|
|
237
|
+
- **NetworkInterfaceId** (str) - 弹性网卡为默认网卡时,返回对应的 ID 值
|
|
238
|
+
- **SubnetId** (str) - IP地址对应的子网 ID。(北京一不支持,字段返回为空)
|
|
239
|
+
- **Type** (str) - 国际: Internation,BGP: Bgp,内网: Private
|
|
240
|
+
- **VPCId** (str) - IP地址对应的VPC ID。(北京一不支持,字段返回为空)
|
|
241
|
+
- **Weight** (int) - 当前EIP的权重。权重最大的为当前的出口IP。
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
**ULHostInstanceSet**
|
|
245
|
+
- **Apps** (list) - 【数组】镜像包含的应用列表。
|
|
246
|
+
- **AutoRenew** (str) - 是否自动续费。枚举值:Yes/No
|
|
247
|
+
- **CPU** (int) - CPU核数。
|
|
248
|
+
- **ChargeType** (str) - 计费模式。枚举值:Month/Year
|
|
249
|
+
- **CreateTime** (int) - 创建时间。Unix时间戳
|
|
250
|
+
- **DiskSet** (list) - 见 **ULHostDiskSet** 模型定义
|
|
251
|
+
- **EIPExclusiveUTPInfo** (dict) - 见 **ExclusiveUTPInfo** 模型定义
|
|
252
|
+
- **ExpireTime** (int) - 过期时间。Unix时间戳
|
|
253
|
+
- **IPSet** (list) - 见 **UHostIPSet** 模型定义
|
|
254
|
+
- **ImageId** (str) - 镜像Id。
|
|
255
|
+
- **ImageName** (str) - 镜像名称。
|
|
256
|
+
- **IsExpire** (str) - 是否过期。枚举值:Yes/No
|
|
257
|
+
- **Memory** (int) - 内存。单位:MB
|
|
258
|
+
- **Name** (str) - 实例名称。默认套餐Id
|
|
259
|
+
- **Remark** (str) - 备注。
|
|
260
|
+
- **State** (str) - 实例状态。枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\> 运行中: Running; \\> 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ > 未知(空字符串,获取状态超时或出错):""
|
|
261
|
+
- **Tag** (str) - 业务组。
|
|
262
|
+
- **ULHostId** (str) - 实例Id。
|
|
263
|
+
- **Zone** (str) - 可用区。
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
"""
|
|
267
|
+
# build request
|
|
268
|
+
d = {
|
|
269
|
+
"ProjectId": self.config.project_id,
|
|
270
|
+
"Region": self.config.region,
|
|
271
|
+
}
|
|
272
|
+
req and d.update(req)
|
|
273
|
+
d = apis.DescribeULHostInstanceRequestSchema().dumps(d)
|
|
274
|
+
|
|
275
|
+
resp = self.invoke("DescribeULHostInstance", d, **kwargs)
|
|
276
|
+
return apis.DescribeULHostInstanceResponseSchema().loads(resp)
|
|
277
|
+
|
|
278
|
+
def get_ul_host_instance_price(
|
|
279
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
280
|
+
) -> dict:
|
|
281
|
+
"""GetULHostInstancePrice - 获取轻量应用云主机套餐价格
|
|
282
|
+
|
|
283
|
+
**Request**
|
|
284
|
+
|
|
285
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
286
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
287
|
+
- **BundleId** (str) - (Required) 套餐ID
|
|
288
|
+
- **ChargeType** (str) - 获取指定计费模式的价格。枚举值:\\ > Year,按年付费; \\ > Month。未指定时,返回所有计费模式价格
|
|
289
|
+
- **Count** (int) - 购买台数,范围[1,5]。默认:1
|
|
290
|
+
- **Quantity** (int) - 购买时长。默认: 1。不支持购买到月末
|
|
291
|
+
|
|
292
|
+
**Response**
|
|
293
|
+
|
|
294
|
+
- **Message** (str) - 错误信息
|
|
295
|
+
- **PriceSet** (list) - 见 **ULHostPriceSet** 模型定义
|
|
296
|
+
|
|
297
|
+
**Response Model**
|
|
298
|
+
|
|
299
|
+
**ULHostPriceSet**
|
|
300
|
+
- **ChargeType** (str) - 计费模式
|
|
301
|
+
- **OriginalPrice** (float) - 原价
|
|
302
|
+
- **Price** (float) - 价格
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
"""
|
|
306
|
+
# build request
|
|
307
|
+
d = {
|
|
308
|
+
"ProjectId": self.config.project_id,
|
|
309
|
+
"Region": self.config.region,
|
|
310
|
+
}
|
|
311
|
+
req and d.update(req)
|
|
312
|
+
d = apis.GetULHostInstancePriceRequestSchema().dumps(d)
|
|
313
|
+
|
|
314
|
+
resp = self.invoke("GetULHostInstancePrice", d, **kwargs)
|
|
315
|
+
return apis.GetULHostInstancePriceResponseSchema().loads(resp)
|
|
316
|
+
|
|
317
|
+
def get_ul_host_renew_price(
|
|
318
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
319
|
+
) -> dict:
|
|
320
|
+
"""GetULHostRenewPrice - 获取主机续费价格
|
|
321
|
+
|
|
322
|
+
**Request**
|
|
323
|
+
|
|
324
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
325
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
326
|
+
- **ULHostId** (str) - (Required) ULHost实例ID
|
|
327
|
+
- **ChargeType** (str) - 计费类型。支持:Year/Month;默认:Month
|
|
328
|
+
|
|
329
|
+
**Response**
|
|
330
|
+
|
|
331
|
+
- **PriceSet** (list) - 见 **ULHostPriceSet** 模型定义
|
|
332
|
+
|
|
333
|
+
**Response Model**
|
|
334
|
+
|
|
335
|
+
**ULHostPriceSet**
|
|
336
|
+
- **ChargeType** (str) - 计费模式
|
|
337
|
+
- **OriginalPrice** (float) - 原价
|
|
338
|
+
- **Price** (float) - 价格
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
"""
|
|
342
|
+
# build request
|
|
343
|
+
d = {
|
|
344
|
+
"ProjectId": self.config.project_id,
|
|
345
|
+
"Region": self.config.region,
|
|
346
|
+
}
|
|
347
|
+
req and d.update(req)
|
|
348
|
+
d = apis.GetULHostRenewPriceRequestSchema().dumps(d)
|
|
349
|
+
|
|
350
|
+
resp = self.invoke("GetULHostRenewPrice", d, **kwargs)
|
|
351
|
+
return apis.GetULHostRenewPriceResponseSchema().loads(resp)
|
|
352
|
+
|
|
353
|
+
def modify_ul_host_attribute(
|
|
354
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
355
|
+
) -> dict:
|
|
356
|
+
"""ModifyULHostAttribute - 修改指定ULHost实例属性信息,包含名称和备注
|
|
357
|
+
|
|
358
|
+
**Request**
|
|
359
|
+
|
|
360
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
361
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
362
|
+
- **ULHostId** (str) - (Required) ULHost实例Id
|
|
363
|
+
- **Name** (str) - 名称。和Remark至少选择一个进行修改
|
|
364
|
+
- **Remark** (str) - 备注。和Name至少选择一个进行修改
|
|
365
|
+
|
|
366
|
+
**Response**
|
|
367
|
+
|
|
368
|
+
- **Message** (str) - 错误信息
|
|
369
|
+
- **ULHostId** (str) - ULHost实例Id
|
|
370
|
+
|
|
371
|
+
"""
|
|
372
|
+
# build request
|
|
373
|
+
d = {
|
|
374
|
+
"ProjectId": self.config.project_id,
|
|
375
|
+
"Region": self.config.region,
|
|
376
|
+
}
|
|
377
|
+
req and d.update(req)
|
|
378
|
+
d = apis.ModifyULHostAttributeRequestSchema().dumps(d)
|
|
379
|
+
|
|
380
|
+
resp = self.invoke("ModifyULHostAttribute", d, **kwargs)
|
|
381
|
+
return apis.ModifyULHostAttributeResponseSchema().loads(resp)
|
|
382
|
+
|
|
383
|
+
def poweroff_ul_host_instance(
|
|
384
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
385
|
+
) -> dict:
|
|
386
|
+
"""PoweroffULHostInstance - 直接关闭UHost实例电源,无需等待实例正常关闭。
|
|
387
|
+
|
|
388
|
+
**Request**
|
|
389
|
+
|
|
390
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
391
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
392
|
+
- **ULHostId** (str) - (Required) ULHost实例ID
|
|
393
|
+
|
|
394
|
+
**Response**
|
|
395
|
+
|
|
396
|
+
- **ULHostId** (str) - ULHost实例ID
|
|
397
|
+
|
|
398
|
+
"""
|
|
399
|
+
# build request
|
|
400
|
+
d = {
|
|
401
|
+
"ProjectId": self.config.project_id,
|
|
402
|
+
"Region": self.config.region,
|
|
403
|
+
}
|
|
404
|
+
req and d.update(req)
|
|
405
|
+
d = apis.PoweroffULHostInstanceRequestSchema().dumps(d)
|
|
406
|
+
|
|
407
|
+
resp = self.invoke("PoweroffULHostInstance", d, **kwargs)
|
|
408
|
+
return apis.PoweroffULHostInstanceResponseSchema().loads(resp)
|
|
409
|
+
|
|
410
|
+
def reboot_ul_host_instance(
|
|
411
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
412
|
+
) -> dict:
|
|
413
|
+
"""RebootULHostInstance - 重新启动UHost实例。
|
|
414
|
+
|
|
415
|
+
**Request**
|
|
416
|
+
|
|
417
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
418
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
419
|
+
- **ULHostId** (str) - (Required) ULHost实例ID
|
|
420
|
+
|
|
421
|
+
**Response**
|
|
422
|
+
|
|
423
|
+
- **ULHostId** (str) - ULHost实例ID
|
|
424
|
+
|
|
425
|
+
"""
|
|
426
|
+
# build request
|
|
427
|
+
d = {
|
|
428
|
+
"ProjectId": self.config.project_id,
|
|
429
|
+
"Region": self.config.region,
|
|
430
|
+
}
|
|
431
|
+
req and d.update(req)
|
|
432
|
+
d = apis.RebootULHostInstanceRequestSchema().dumps(d)
|
|
433
|
+
|
|
434
|
+
resp = self.invoke("RebootULHostInstance", d, **kwargs)
|
|
435
|
+
return apis.RebootULHostInstanceResponseSchema().loads(resp)
|
|
436
|
+
|
|
437
|
+
def reinstall_ul_host_instance(
|
|
438
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
439
|
+
) -> dict:
|
|
440
|
+
"""ReinstallULHostInstance - 重装轻量应用云主机
|
|
441
|
+
|
|
442
|
+
**Request**
|
|
443
|
+
|
|
444
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
445
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
446
|
+
- **ImageId** (str) - (Required) 镜像Id。暂不支持使用自定义镜像重装
|
|
447
|
+
- **Password** (str) - (Required) 登陆密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64 UGFzc3dvcmQx
|
|
448
|
+
- **ULHostId** (str) - (Required) 实例Id
|
|
449
|
+
|
|
450
|
+
**Response**
|
|
451
|
+
|
|
452
|
+
- **Message** (str) - 错误信息
|
|
453
|
+
- **ULHostId** (str) - 实例Id
|
|
454
|
+
|
|
455
|
+
"""
|
|
456
|
+
# build request
|
|
457
|
+
d = {
|
|
458
|
+
"ProjectId": self.config.project_id,
|
|
459
|
+
"Region": self.config.region,
|
|
460
|
+
}
|
|
461
|
+
req and d.update(req)
|
|
462
|
+
d = apis.ReinstallULHostInstanceRequestSchema().dumps(d)
|
|
463
|
+
|
|
464
|
+
resp = self.invoke("ReinstallULHostInstance", d, **kwargs)
|
|
465
|
+
return apis.ReinstallULHostInstanceResponseSchema().loads(resp)
|
|
466
|
+
|
|
467
|
+
def reset_ul_host_instance_password(
|
|
468
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
469
|
+
) -> dict:
|
|
470
|
+
"""ResetULHostInstancePassword - 重置轻量应用云主机管理员密码。
|
|
471
|
+
|
|
472
|
+
**Request**
|
|
473
|
+
|
|
474
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
475
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
476
|
+
- **Password** (str) - (Required) ULHost新密码(密码格式使用BASE64编码)
|
|
477
|
+
- **ULHostId** (str) - (Required) ULHost实例ID
|
|
478
|
+
|
|
479
|
+
**Response**
|
|
480
|
+
|
|
481
|
+
- **ULHostId** (str) - ULHost实例ID
|
|
482
|
+
|
|
483
|
+
"""
|
|
484
|
+
# build request
|
|
485
|
+
d = {
|
|
486
|
+
"ProjectId": self.config.project_id,
|
|
487
|
+
"Region": self.config.region,
|
|
488
|
+
}
|
|
489
|
+
req and d.update(req)
|
|
490
|
+
d = apis.ResetULHostInstancePasswordRequestSchema().dumps(d)
|
|
491
|
+
|
|
492
|
+
resp = self.invoke("ResetULHostInstancePassword", d, **kwargs)
|
|
493
|
+
return apis.ResetULHostInstancePasswordResponseSchema().loads(resp)
|
|
494
|
+
|
|
495
|
+
def start_ul_host_instance(
|
|
496
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
497
|
+
) -> dict:
|
|
498
|
+
"""StartULHostInstance - 启动处于关闭状态的UHost实例。
|
|
499
|
+
|
|
500
|
+
**Request**
|
|
501
|
+
|
|
502
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
503
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
504
|
+
- **ULHostId** (str) - (Required) ULHost实例ID
|
|
505
|
+
|
|
506
|
+
**Response**
|
|
507
|
+
|
|
508
|
+
- **ULHostId** (str) - ULHost实例ID
|
|
509
|
+
|
|
510
|
+
"""
|
|
511
|
+
# build request
|
|
512
|
+
d = {
|
|
513
|
+
"ProjectId": self.config.project_id,
|
|
514
|
+
"Region": self.config.region,
|
|
515
|
+
}
|
|
516
|
+
req and d.update(req)
|
|
517
|
+
d = apis.StartULHostInstanceRequestSchema().dumps(d)
|
|
518
|
+
|
|
519
|
+
resp = self.invoke("StartULHostInstance", d, **kwargs)
|
|
520
|
+
return apis.StartULHostInstanceResponseSchema().loads(resp)
|
|
521
|
+
|
|
522
|
+
def stop_ul_host_instance(
|
|
523
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
524
|
+
) -> dict:
|
|
525
|
+
"""StopULHostInstance - 指停止处于运行状态的ULHost实例
|
|
526
|
+
|
|
527
|
+
**Request**
|
|
528
|
+
|
|
529
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
530
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
531
|
+
- **ULHostId** (str) - (Required) ULHost实例ID。
|
|
532
|
+
|
|
533
|
+
**Response**
|
|
534
|
+
|
|
535
|
+
- **ULHostId** (str) - ULHost实例ID
|
|
536
|
+
|
|
537
|
+
"""
|
|
538
|
+
# build request
|
|
539
|
+
d = {
|
|
540
|
+
"ProjectId": self.config.project_id,
|
|
541
|
+
"Region": self.config.region,
|
|
542
|
+
}
|
|
543
|
+
req and d.update(req)
|
|
544
|
+
d = apis.StopULHostInstanceRequestSchema().dumps(d)
|
|
545
|
+
|
|
546
|
+
resp = self.invoke("StopULHostInstance", d, **kwargs)
|
|
547
|
+
return apis.StopULHostInstanceResponseSchema().loads(resp)
|
|
548
|
+
|
|
549
|
+
def terminate_ul_host_instance(
|
|
550
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
551
|
+
) -> dict:
|
|
552
|
+
"""TerminateULHostInstance - 删除指定数据中心的ULHost实例。
|
|
553
|
+
|
|
554
|
+
**Request**
|
|
555
|
+
|
|
556
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
557
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
558
|
+
- **ULHostId** (str) - (Required) ULHost资源Id
|
|
559
|
+
- **ReleaseUDisk** (bool) - 删除主机时是否同时删除挂载的数据盘。默认为false。
|
|
560
|
+
|
|
561
|
+
**Response**
|
|
562
|
+
|
|
563
|
+
- **InRecycle** (str) - 用于判断主机删除时是否进入回收站。放入回收站:"Yes", 彻底删除:“No”。
|
|
564
|
+
- **ULHostId** (str) - ULHost 实例 Id
|
|
565
|
+
|
|
566
|
+
"""
|
|
567
|
+
# build request
|
|
568
|
+
d = {
|
|
569
|
+
"ProjectId": self.config.project_id,
|
|
570
|
+
"Region": self.config.region,
|
|
571
|
+
}
|
|
572
|
+
req and d.update(req)
|
|
573
|
+
d = apis.TerminateULHostInstanceRequestSchema().dumps(d)
|
|
574
|
+
|
|
575
|
+
resp = self.invoke("TerminateULHostInstance", d, **kwargs)
|
|
576
|
+
return apis.TerminateULHostInstanceResponseSchema().loads(resp)
|
|
File without changes
|