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,1510 @@
|
|
|
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.uec.schemas import apis
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class UECClient(Client):
|
|
11
|
+
def __init__(
|
|
12
|
+
self, config: dict, transport=None, middleware=None, logger=None
|
|
13
|
+
):
|
|
14
|
+
super(UECClient, self).__init__(config, transport, middleware, logger)
|
|
15
|
+
|
|
16
|
+
def bind_u_ec_firewall(
|
|
17
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
18
|
+
) -> dict:
|
|
19
|
+
"""BindUEcFirewall - 绑定防火墙,应用防火墙规则
|
|
20
|
+
|
|
21
|
+
**Request**
|
|
22
|
+
|
|
23
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
24
|
+
- **FirewallId** (str) - (Required) 防火墙Id
|
|
25
|
+
- **ResourceId** (str) - (Required) 虚拟机资源Id或容器组资源id
|
|
26
|
+
|
|
27
|
+
**Response**
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
"""
|
|
31
|
+
# build request
|
|
32
|
+
d = {
|
|
33
|
+
"ProjectId": self.config.project_id,
|
|
34
|
+
}
|
|
35
|
+
req and d.update(req)
|
|
36
|
+
d = apis.BindUEcFirewallRequestSchema().dumps(d)
|
|
37
|
+
|
|
38
|
+
resp = self.invoke("BindUEcFirewall", d, **kwargs)
|
|
39
|
+
return apis.BindUEcFirewallResponseSchema().loads(resp)
|
|
40
|
+
|
|
41
|
+
def create_u_ec_custom_image(
|
|
42
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
43
|
+
) -> dict:
|
|
44
|
+
"""CreateUEcCustomImage - 从指定虚拟机,生成自定义镜像。
|
|
45
|
+
|
|
46
|
+
**Request**
|
|
47
|
+
|
|
48
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
49
|
+
- **ImageName** (str) - (Required) 镜像名称
|
|
50
|
+
- **NodeId** (str) - (Required) 虚拟机实例ID
|
|
51
|
+
- **ImageDescription** (str) - 镜像描述
|
|
52
|
+
|
|
53
|
+
**Response**
|
|
54
|
+
|
|
55
|
+
- **ImageId** (str) - 镜像ID
|
|
56
|
+
|
|
57
|
+
"""
|
|
58
|
+
# build request
|
|
59
|
+
d = {
|
|
60
|
+
"ProjectId": self.config.project_id,
|
|
61
|
+
}
|
|
62
|
+
req and d.update(req)
|
|
63
|
+
d = apis.CreateUEcCustomImageRequestSchema().dumps(d)
|
|
64
|
+
|
|
65
|
+
# build options
|
|
66
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
67
|
+
|
|
68
|
+
resp = self.invoke("CreateUEcCustomImage", d, **kwargs)
|
|
69
|
+
return apis.CreateUEcCustomImageResponseSchema().loads(resp)
|
|
70
|
+
|
|
71
|
+
def create_u_ec_firewall(
|
|
72
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
73
|
+
) -> dict:
|
|
74
|
+
"""CreateUEcFirewall - 创建外网防火墙
|
|
75
|
+
|
|
76
|
+
**Request**
|
|
77
|
+
|
|
78
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
79
|
+
- **Name** (str) - (Required) 防火墙名称
|
|
80
|
+
- **Remark** (str) - 描述
|
|
81
|
+
- **Rule** (list) - 见 **CreateUEcFirewallParamRule** 模型定义
|
|
82
|
+
|
|
83
|
+
**Response**
|
|
84
|
+
|
|
85
|
+
- **FirewallId** (str) - 防火墙Id
|
|
86
|
+
|
|
87
|
+
**Request Model**
|
|
88
|
+
|
|
89
|
+
**CreateUEcFirewallParamRule**
|
|
90
|
+
- **Action** (str) - ACCEPT(接受)和DROP(拒绝)
|
|
91
|
+
- **Port** (str) - 端口,范围用"-"符号分隔,如:1-65535
|
|
92
|
+
- **Priority** (str) - 优先级:HIGH(高),MEDIUM(中),LOW(低)
|
|
93
|
+
- **ProtocolType** (str) - 协议,可选值:TCP,UDP,ICMP
|
|
94
|
+
- **Remark** (str) - 备注
|
|
95
|
+
- **SrcIp** (str) - 源ip
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
"""
|
|
99
|
+
# build request
|
|
100
|
+
d = {
|
|
101
|
+
"ProjectId": self.config.project_id,
|
|
102
|
+
}
|
|
103
|
+
req and d.update(req)
|
|
104
|
+
d = apis.CreateUEcFirewallRequestSchema().dumps(d)
|
|
105
|
+
|
|
106
|
+
# build options
|
|
107
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
108
|
+
|
|
109
|
+
resp = self.invoke("CreateUEcFirewall", d, **kwargs)
|
|
110
|
+
return apis.CreateUEcFirewallResponseSchema().loads(resp)
|
|
111
|
+
|
|
112
|
+
def create_u_ec_holder(
|
|
113
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
114
|
+
) -> dict:
|
|
115
|
+
"""CreateUEcHolder - 创建容器组
|
|
116
|
+
|
|
117
|
+
**Request**
|
|
118
|
+
|
|
119
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
120
|
+
- **CpuCore** (float) - (Required) 容器组Cpu总核数
|
|
121
|
+
- **IdcId** (str) - (Required) 机房id
|
|
122
|
+
- **MemSize** (int) - (Required) 容器组总内存,单位MB
|
|
123
|
+
- **SubnetId** (str) - (Required) 子网ID
|
|
124
|
+
- **Bandwidth** (int) - 外网绑定的带宽(单位M,默认0,只有当ElasticIp为yes时,默认1)
|
|
125
|
+
- **ChargeQuantity** (int) - 月数或者年数(默认值:1,当为按月计费时,0表示计费到月底,默认值为0)
|
|
126
|
+
- **ChargeType** (int) - 付费方式(2按月、3按年。默认2,默认月付)
|
|
127
|
+
- **ElasticIp** (str) - 绑定外网ip(yes-绑定,no-不绑定,默认no)
|
|
128
|
+
- **FirewallId** (str) - 防火墙ID
|
|
129
|
+
- **Image** (list) - 见 **CreateUEcHolderParamImage** 模型定义
|
|
130
|
+
- **Name** (str) - 容器组名称(默认default)
|
|
131
|
+
- **Pack** (list) - 见 **CreateUEcHolderParamPack** 模型定义
|
|
132
|
+
- **ProductType** (str) - 机型(normal-经济型,hf-标准型,默认normal)
|
|
133
|
+
- **RestartStrategy** (int) - 重启策略(0总是,1失败是,2永不,默认0)
|
|
134
|
+
- **Storage** (list) - 见 **CreateUEcHolderParamStorage** 模型定义
|
|
135
|
+
|
|
136
|
+
**Response**
|
|
137
|
+
|
|
138
|
+
- **ResourceId** (str) - 容器组资源id
|
|
139
|
+
|
|
140
|
+
**Request Model**
|
|
141
|
+
|
|
142
|
+
**CreateUEcHolderParamImage**
|
|
143
|
+
- **Message** (str) - 镜像用户名和密码(如镜像名:密码)
|
|
144
|
+
- **StoreAddress** (str) - 镜像仓库地址
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
**CreateUEcHolderParamPack**
|
|
148
|
+
- **Args** (str) - 容器参数(多个用;隔开)
|
|
149
|
+
- **Cmd** (str) - 开启容器的命令
|
|
150
|
+
- **ConfigDict** (str) - 容器配置字典(多个用;隔开,如:/data1:resId1;/data2:resId2)
|
|
151
|
+
- **CpuCore** (float) - 容器Cpu核数
|
|
152
|
+
- **Environment** (str) - 容器环境变量(多个用;隔开,如:key1:value1;key2:value2)
|
|
153
|
+
- **ImageName** (str) - 容器镜像名称
|
|
154
|
+
- **MemSize** (int) - 容器内存,单位MB
|
|
155
|
+
- **Name** (str) - 容器名称
|
|
156
|
+
- **WorkDir** (str) - 容器工作目录
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
**CreateUEcHolderParamStorage**
|
|
160
|
+
- **Path** (str) - 存储卷挂载路径
|
|
161
|
+
- **ResourceId** (str) - 存储卷资源id
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
"""
|
|
165
|
+
# build request
|
|
166
|
+
d = {
|
|
167
|
+
"ProjectId": self.config.project_id,
|
|
168
|
+
}
|
|
169
|
+
req and d.update(req)
|
|
170
|
+
d = apis.CreateUEcHolderRequestSchema().dumps(d)
|
|
171
|
+
|
|
172
|
+
# build options
|
|
173
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
174
|
+
|
|
175
|
+
resp = self.invoke("CreateUEcHolder", d, **kwargs)
|
|
176
|
+
return apis.CreateUEcHolderResponseSchema().loads(resp)
|
|
177
|
+
|
|
178
|
+
def create_u_ec_subnet(
|
|
179
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
180
|
+
) -> dict:
|
|
181
|
+
"""CreateUEcSubnet - 创建子网
|
|
182
|
+
|
|
183
|
+
**Request**
|
|
184
|
+
|
|
185
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
186
|
+
- **CIDR** (str) - (Required) 子网cidr
|
|
187
|
+
- **IdcId** (str) - (Required) 机房ID
|
|
188
|
+
- **Comment** (str) - 备注
|
|
189
|
+
- **SubnetName** (str) - 子网名称
|
|
190
|
+
|
|
191
|
+
**Response**
|
|
192
|
+
|
|
193
|
+
- **SubnetId** (str) - 子网ID
|
|
194
|
+
|
|
195
|
+
"""
|
|
196
|
+
# build request
|
|
197
|
+
d = {
|
|
198
|
+
"ProjectId": self.config.project_id,
|
|
199
|
+
}
|
|
200
|
+
req and d.update(req)
|
|
201
|
+
d = apis.CreateUEcSubnetRequestSchema().dumps(d)
|
|
202
|
+
|
|
203
|
+
# build options
|
|
204
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
205
|
+
|
|
206
|
+
resp = self.invoke("CreateUEcSubnet", d, **kwargs)
|
|
207
|
+
return apis.CreateUEcSubnetResponseSchema().loads(resp)
|
|
208
|
+
|
|
209
|
+
def create_u_ec_v_host(
|
|
210
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
211
|
+
) -> dict:
|
|
212
|
+
"""CreateUEcVHost - 创建虚拟机v2.0
|
|
213
|
+
|
|
214
|
+
**Request**
|
|
215
|
+
|
|
216
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
217
|
+
- **CpuCore** (int) - (Required) cpu核心数
|
|
218
|
+
- **DiskSize** (int) - (Required) 数据盘大小,单位GB
|
|
219
|
+
- **IdcId** (str) - (Required) 机房id
|
|
220
|
+
- **ImageId** (str) - (Required) 镜像ID
|
|
221
|
+
- **MemSize** (int) - (Required) 内存大小,单位GB
|
|
222
|
+
- **NetLimit** (int) - (Required) 节点带宽限制,单位Mbs
|
|
223
|
+
- **AccountName** (str) - 账户名,默认root
|
|
224
|
+
- **ChargeQuantity** (int) - 月数或者年数,0计费到月底, 默认0
|
|
225
|
+
- **ChargeType** (int) - 付费方式,1按时,2按月,3按年,默认2
|
|
226
|
+
- **FirewallId** (str) - 外网防护墙规则组,默认
|
|
227
|
+
- **Gpu** (int) - Gpu卡核心数。仅Gpu机型支持此字段
|
|
228
|
+
- **GpuType** (str) - Gpu类型,枚举值["T4S"],ProductType为G时必填
|
|
229
|
+
- **IsNeedOuterIp** (str) - 是否需要外网ip(no-否)
|
|
230
|
+
- **Isp** (list) - 运营商(1-电信,2-联通,4移动)
|
|
231
|
+
- **NodeCount** (int) - 创建节点数量,默认1
|
|
232
|
+
- **NodeName** (str) - 节点名称
|
|
233
|
+
- **PassWord** (str) - 密码
|
|
234
|
+
- **ProductType** (str) - 产品类型:normal(经济型),hf(标准型),g(Gpu型)
|
|
235
|
+
- **SubnetId** (str) - 子网ID
|
|
236
|
+
- **SysDiskSize** (int) - 系统盘大小,单位GB, 默认20GB
|
|
237
|
+
|
|
238
|
+
**Response**
|
|
239
|
+
|
|
240
|
+
- **NodeList** (list) - 见 **NodeList** 模型定义
|
|
241
|
+
|
|
242
|
+
**Response Model**
|
|
243
|
+
|
|
244
|
+
**NodeList**
|
|
245
|
+
- **NodeId** (str) - 虚拟机资源id
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
"""
|
|
249
|
+
# build request
|
|
250
|
+
d = {
|
|
251
|
+
"ProjectId": self.config.project_id,
|
|
252
|
+
}
|
|
253
|
+
req and d.update(req)
|
|
254
|
+
d = apis.CreateUEcVHostRequestSchema().dumps(d)
|
|
255
|
+
|
|
256
|
+
# build options
|
|
257
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
258
|
+
|
|
259
|
+
resp = self.invoke("CreateUEcVHost", d, **kwargs)
|
|
260
|
+
return apis.CreateUEcVHostResponseSchema().loads(resp)
|
|
261
|
+
|
|
262
|
+
def delete_u_ec_custom_image(
|
|
263
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
264
|
+
) -> dict:
|
|
265
|
+
"""DeleteUEcCustomImage - 删除UEDN客户自定义镜像
|
|
266
|
+
|
|
267
|
+
**Request**
|
|
268
|
+
|
|
269
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
270
|
+
- **ImageId** (str) - (Required) 镜像ID
|
|
271
|
+
- **IdcId** (str) - 机房ID,带机房ID表示只删除指定机房镜像
|
|
272
|
+
|
|
273
|
+
**Response**
|
|
274
|
+
|
|
275
|
+
- **ImageId** (int) - 镜像ID
|
|
276
|
+
|
|
277
|
+
"""
|
|
278
|
+
# build request
|
|
279
|
+
d = {
|
|
280
|
+
"ProjectId": self.config.project_id,
|
|
281
|
+
}
|
|
282
|
+
req and d.update(req)
|
|
283
|
+
d = apis.DeleteUEcCustomImageRequestSchema().dumps(d)
|
|
284
|
+
|
|
285
|
+
resp = self.invoke("DeleteUEcCustomImage", d, **kwargs)
|
|
286
|
+
return apis.DeleteUEcCustomImageResponseSchema().loads(resp)
|
|
287
|
+
|
|
288
|
+
def delete_u_ec_holder(
|
|
289
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
290
|
+
) -> dict:
|
|
291
|
+
"""DeleteUEcHolder - 删除容器组
|
|
292
|
+
|
|
293
|
+
**Request**
|
|
294
|
+
|
|
295
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
296
|
+
- **HolderId** (list) - (Required) 容器组资源id,n为0,1,2...
|
|
297
|
+
|
|
298
|
+
**Response**
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
"""
|
|
302
|
+
# build request
|
|
303
|
+
d = {
|
|
304
|
+
"ProjectId": self.config.project_id,
|
|
305
|
+
}
|
|
306
|
+
req and d.update(req)
|
|
307
|
+
d = apis.DeleteUEcHolderRequestSchema().dumps(d)
|
|
308
|
+
|
|
309
|
+
resp = self.invoke("DeleteUEcHolder", d, **kwargs)
|
|
310
|
+
return apis.DeleteUEcHolderResponseSchema().loads(resp)
|
|
311
|
+
|
|
312
|
+
def delete_u_ec_subnet(
|
|
313
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
314
|
+
) -> dict:
|
|
315
|
+
"""DeleteUEcSubnet - 删除子网
|
|
316
|
+
|
|
317
|
+
**Request**
|
|
318
|
+
|
|
319
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
320
|
+
- **SubnetId** (str) - (Required) 子网ID
|
|
321
|
+
|
|
322
|
+
**Response**
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
"""
|
|
326
|
+
# build request
|
|
327
|
+
d = {
|
|
328
|
+
"ProjectId": self.config.project_id,
|
|
329
|
+
}
|
|
330
|
+
req and d.update(req)
|
|
331
|
+
d = apis.DeleteUEcSubnetRequestSchema().dumps(d)
|
|
332
|
+
|
|
333
|
+
resp = self.invoke("DeleteUEcSubnet", d, **kwargs)
|
|
334
|
+
return apis.DeleteUEcSubnetResponseSchema().loads(resp)
|
|
335
|
+
|
|
336
|
+
def delete_u_ec_v_host(
|
|
337
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
338
|
+
) -> dict:
|
|
339
|
+
"""DeleteUEcVHost - 删除vhost虚拟机 v2.0
|
|
340
|
+
|
|
341
|
+
**Request**
|
|
342
|
+
|
|
343
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
344
|
+
- **NodeId** (list) - (Required) 节点id
|
|
345
|
+
|
|
346
|
+
**Response**
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
"""
|
|
350
|
+
# build request
|
|
351
|
+
d = {
|
|
352
|
+
"ProjectId": self.config.project_id,
|
|
353
|
+
}
|
|
354
|
+
req and d.update(req)
|
|
355
|
+
d = apis.DeleteUEcVHostRequestSchema().dumps(d)
|
|
356
|
+
|
|
357
|
+
resp = self.invoke("DeleteUEcVHost", d, **kwargs)
|
|
358
|
+
return apis.DeleteUEcVHostResponseSchema().loads(resp)
|
|
359
|
+
|
|
360
|
+
def describe_u_ec_firewall(
|
|
361
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
362
|
+
) -> dict:
|
|
363
|
+
"""DescribeUEcFirewall - 获取防火墙信息
|
|
364
|
+
|
|
365
|
+
**Request**
|
|
366
|
+
|
|
367
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
368
|
+
- **FirewallId** (str) - 防火墙ID,默认为返回所有防火墙
|
|
369
|
+
- **Limit** (int) - 返回数据长度,默认为20
|
|
370
|
+
- **Offset** (int) - 列表起始位置偏移量,默认为0
|
|
371
|
+
- **ResourceId** (str) - 绑定防火墙组的虚拟机资源ID
|
|
372
|
+
|
|
373
|
+
**Response**
|
|
374
|
+
|
|
375
|
+
- **FirewallSet** (list) - 见 **FirewallInfo** 模型定义
|
|
376
|
+
- **TotalCount** (int) - 满足条件的节点总数
|
|
377
|
+
|
|
378
|
+
**Response Model**
|
|
379
|
+
|
|
380
|
+
**FirewallInfo**
|
|
381
|
+
- **CreateTime** (int) - 创建时间
|
|
382
|
+
- **FirewallId** (str) - 防火墙Id
|
|
383
|
+
- **Name** (str) - 防火墙名称
|
|
384
|
+
- **Remark** (str) - 描述
|
|
385
|
+
- **ResourceCount** (int) - 防火墙绑定资源数量
|
|
386
|
+
- **Rule** (list) - 见 **RuleInfo** 模型定义
|
|
387
|
+
- **Type** (str) - 防火墙组类型,枚举值为: "user defined", 用户自定义防火墙; "recommend web", 默认Web防火墙; "recommend non web", 默认非Web防火墙
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
**RuleInfo**
|
|
391
|
+
- **Action** (str) - ACCEPT(接受)和DROP(拒绝)
|
|
392
|
+
- **Port** (str) - 端口,范围用"-"符号分隔,如:1-65535
|
|
393
|
+
- **Priority** (str) - 优先级:HIGH(高),MEDIUM(中),LOW(低)
|
|
394
|
+
- **ProtocolType** (str) - 协议,可选值:TCP,UDP,ICMP
|
|
395
|
+
- **Remark** (str) - 备注
|
|
396
|
+
- **SrcIp** (str) - 源ip
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
"""
|
|
400
|
+
# build request
|
|
401
|
+
d = {
|
|
402
|
+
"ProjectId": self.config.project_id,
|
|
403
|
+
}
|
|
404
|
+
req and d.update(req)
|
|
405
|
+
d = apis.DescribeUEcFirewallRequestSchema().dumps(d)
|
|
406
|
+
|
|
407
|
+
resp = self.invoke("DescribeUEcFirewall", d, **kwargs)
|
|
408
|
+
return apis.DescribeUEcFirewallResponseSchema().loads(resp)
|
|
409
|
+
|
|
410
|
+
def describe_u_ec_firewall_resource(
|
|
411
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
412
|
+
) -> dict:
|
|
413
|
+
"""DescribeUEcFirewallResource - 防火墙绑定的资源列表
|
|
414
|
+
|
|
415
|
+
**Request**
|
|
416
|
+
|
|
417
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
418
|
+
- **FirewallId** (str) - (Required) 防火墙Id
|
|
419
|
+
|
|
420
|
+
**Response**
|
|
421
|
+
|
|
422
|
+
- **ResourceSet** (list) - 见 **ResourceInfo** 模型定义
|
|
423
|
+
- **TotalCount** (int) - 资源总数
|
|
424
|
+
|
|
425
|
+
**Response Model**
|
|
426
|
+
|
|
427
|
+
**ResourceInfo**
|
|
428
|
+
- **Name** (str) - 节点名称
|
|
429
|
+
- **PublicIpList** (list) - 节点公网Ip列表
|
|
430
|
+
- **Remark** (str) - 节点备注
|
|
431
|
+
- **ResourceId** (str) - 资源Id
|
|
432
|
+
- **State** (int) - 节点状态,1部署中,2待启动,3启动中,4运行中,5正在停止,6已停止,7正在更新,8正在重启,9正在删除, 10已经删除,11异常
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
"""
|
|
436
|
+
# build request
|
|
437
|
+
d = {
|
|
438
|
+
"ProjectId": self.config.project_id,
|
|
439
|
+
}
|
|
440
|
+
req and d.update(req)
|
|
441
|
+
d = apis.DescribeUEcFirewallResourceRequestSchema().dumps(d)
|
|
442
|
+
|
|
443
|
+
resp = self.invoke("DescribeUEcFirewallResource", d, **kwargs)
|
|
444
|
+
return apis.DescribeUEcFirewallResourceResponseSchema().loads(resp)
|
|
445
|
+
|
|
446
|
+
def describe_u_ec_holder(
|
|
447
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
448
|
+
) -> dict:
|
|
449
|
+
"""DescribeUEcHolder - 获得容器组信息
|
|
450
|
+
|
|
451
|
+
**Request**
|
|
452
|
+
|
|
453
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
454
|
+
- **HolderId** (list) - 容器组资源id
|
|
455
|
+
- **Limit** (int) - 返回数据长度,默认为20,非负整数
|
|
456
|
+
- **Offset** (int) - 列表起始位置偏移量,默认为0。非负整数
|
|
457
|
+
|
|
458
|
+
**Response**
|
|
459
|
+
|
|
460
|
+
- **HolderList** (list) - 见 **HolderList** 模型定义
|
|
461
|
+
- **TotalCount** (int) - 满足条件的容器组总数
|
|
462
|
+
|
|
463
|
+
**Response Model**
|
|
464
|
+
|
|
465
|
+
**HolderList**
|
|
466
|
+
- **City** (str) - 城市名称
|
|
467
|
+
- **CreateTime** (int) - 创建时间
|
|
468
|
+
- **DockerCount** (int) - 容器数量
|
|
469
|
+
- **DockerInfo** (list) - 见 **DockerInfo** 模型定义
|
|
470
|
+
- **ExpireTime** (int) - 过期时间
|
|
471
|
+
- **FirewallId** (str) - 外网防火墙id
|
|
472
|
+
- **HolderName** (str) - 容器组名称
|
|
473
|
+
- **IdcId** (str) - 机房id
|
|
474
|
+
- **ImageList** (list) - 见 **ImageList** 模型定义
|
|
475
|
+
- **InnerIp** (str) - 容器组内网ip
|
|
476
|
+
- **IpList** (list) - 见 **IpList** 模型定义
|
|
477
|
+
- **NetLimit** (int) - 外网绑定的带宽
|
|
478
|
+
- **OcName** (str) - 机房名称
|
|
479
|
+
- **ProductType** (str) - 机器类型(normal经济型,hf标准型)
|
|
480
|
+
- **Province** (str) - 省份名称
|
|
481
|
+
- **ResourceId** (str) - 容器组资源id
|
|
482
|
+
- **RestartStrategy** (int) - 0:总是;1:失败是;2:永不
|
|
483
|
+
- **State** (int) - 容器组运行状态0:初始化;1:拉取镜像;2:启动中;3:运行中;4:错误;5:正在重启;6:正在删除;7:已经删除;8:容器运行错误;9:启动失败;99:异常
|
|
484
|
+
- **StorVolumeCount** (int) - 存储卷数量
|
|
485
|
+
- **StorVolumeInfo** (list) - 见 **StorVolumeInfo** 模型定义
|
|
486
|
+
- **SubnetId** (str) - 容器组子网id
|
|
487
|
+
- **Type** (int) - 线路类型(运营商类型: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通)
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
**DockerInfo**
|
|
491
|
+
- **Args** (str) - 参数
|
|
492
|
+
- **CfgDictList** (list) - 见 **CfgDictList** 模型定义
|
|
493
|
+
- **Command** (str) - 命令
|
|
494
|
+
- **CpuCores** (float) - CPU核数(/核)精度0.1核
|
|
495
|
+
- **EnvList** (list) - 见 **EnvList** 模型定义
|
|
496
|
+
- **ImageName** (str) - 镜像名称
|
|
497
|
+
- **MemSize** (float) - 内存大小(Gi)
|
|
498
|
+
- **Name** (str) - 容器名称
|
|
499
|
+
- **State** (int) - 容器状态,0:初始化;1:拉取镜像;2:拉取镜像失败;3:启动中;4:运行中;5:正在停止;6:已停止;7:已删除;8:镜像拉取成功;9:启动失败;99:异常
|
|
500
|
+
- **WorkDir** (str) - 工作目录
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
**CfgDictList**
|
|
504
|
+
- **MountPath** (str) - 挂载路径
|
|
505
|
+
- **Name** (str) - 名称
|
|
506
|
+
- **ResourceId** (str) - 资源id
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
**EnvList**
|
|
510
|
+
- **Key** (str) - 环境变量key值
|
|
511
|
+
- **Value** (str) - 环境变量Value值
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
**ImageList**
|
|
515
|
+
- **ImageKey** (str) - 镜像密钥
|
|
516
|
+
- **StoreAddr** (str) - 仓库地址
|
|
517
|
+
- **UserName** (str) - 用户名称
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
**IpList**
|
|
521
|
+
- **Ip** (str) - 外网ip
|
|
522
|
+
- **Isp** (str) - 运营商
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
**StorVolumeInfo**
|
|
526
|
+
- **DiskSize** (int) - 容量(单位GB)
|
|
527
|
+
- **MountPoint** (str) - 挂载点
|
|
528
|
+
- **Name** (str) - 名称
|
|
529
|
+
- **ResourceId** (str) - 资源id
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
"""
|
|
533
|
+
# build request
|
|
534
|
+
d = {
|
|
535
|
+
"ProjectId": self.config.project_id,
|
|
536
|
+
}
|
|
537
|
+
req and d.update(req)
|
|
538
|
+
d = apis.DescribeUEcHolderRequestSchema().dumps(d)
|
|
539
|
+
|
|
540
|
+
resp = self.invoke("DescribeUEcHolder", d, **kwargs)
|
|
541
|
+
return apis.DescribeUEcHolderResponseSchema().loads(resp)
|
|
542
|
+
|
|
543
|
+
def describe_u_ec_holder_idc(
|
|
544
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
545
|
+
) -> dict:
|
|
546
|
+
"""DescribeUEcHolderIDC - 获取容器组机房信息
|
|
547
|
+
|
|
548
|
+
**Request**
|
|
549
|
+
|
|
550
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
551
|
+
- **Cpu** (float) - (Required) 容器组Cpu核数
|
|
552
|
+
- **Memory** (int) - (Required) 容器组内存大小(单位MB)
|
|
553
|
+
- **IdcId** (list) - Idc机房id。默认全部机房
|
|
554
|
+
- **ProductType** (str) - 产品类型,normal标准型,hf高性能型
|
|
555
|
+
- **Type** (int) - 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通
|
|
556
|
+
|
|
557
|
+
**Response**
|
|
558
|
+
|
|
559
|
+
- **IdcList** (list) - 见 **IdcInfo** 模型定义
|
|
560
|
+
|
|
561
|
+
**Response Model**
|
|
562
|
+
|
|
563
|
+
**IdcInfo**
|
|
564
|
+
- **City** (str) - 城市
|
|
565
|
+
- **IdcId** (str) - 机房ID
|
|
566
|
+
- **Isp** (str) - 运营商
|
|
567
|
+
- **MaxNodeCnt** (int) - 机房可创建节点最大数量
|
|
568
|
+
- **Name** (str) - 机房名称
|
|
569
|
+
- **Province** (str) - 省份
|
|
570
|
+
- **Type** (int) - 运营商类型:0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
"""
|
|
574
|
+
# build request
|
|
575
|
+
d = {
|
|
576
|
+
"ProjectId": self.config.project_id,
|
|
577
|
+
}
|
|
578
|
+
req and d.update(req)
|
|
579
|
+
d = apis.DescribeUEcHolderIDCRequestSchema().dumps(d)
|
|
580
|
+
|
|
581
|
+
resp = self.invoke("DescribeUEcHolderIDC", d, **kwargs)
|
|
582
|
+
return apis.DescribeUEcHolderIDCResponseSchema().loads(resp)
|
|
583
|
+
|
|
584
|
+
def describe_u_ec_idc(
|
|
585
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
586
|
+
) -> dict:
|
|
587
|
+
"""DescribeUEcIDC - 获取IDC机房列表
|
|
588
|
+
|
|
589
|
+
**Request**
|
|
590
|
+
|
|
591
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
592
|
+
- **Cpu** (int) - (Required) 节点cpu核数
|
|
593
|
+
- **Memory** (int) - (Required) 节点内存大小, 单位GB
|
|
594
|
+
- **Gpu** (int) - Gpu卡核心数
|
|
595
|
+
- **IdcId** (list) - Idc机房id。默认全部机房
|
|
596
|
+
- **ProductType** (str) - 产品类型:normal(经济型),hf(标准型),g(GPU型)
|
|
597
|
+
- **Type** (int) - 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通
|
|
598
|
+
|
|
599
|
+
**Response**
|
|
600
|
+
|
|
601
|
+
- **Action** (str) - 操作名称
|
|
602
|
+
- **IdcList** (list) - 见 **IdcInfo** 模型定义
|
|
603
|
+
- **RetCode** (int) - 返回码
|
|
604
|
+
|
|
605
|
+
**Response Model**
|
|
606
|
+
|
|
607
|
+
**IdcInfo**
|
|
608
|
+
- **City** (str) - 城市
|
|
609
|
+
- **IdcId** (str) - 机房ID
|
|
610
|
+
- **Isp** (str) - 运营商
|
|
611
|
+
- **MaxNodeCnt** (int) - 机房可创建节点最大数量
|
|
612
|
+
- **Name** (str) - 机房名称
|
|
613
|
+
- **Province** (str) - 省份
|
|
614
|
+
- **Type** (int) - 运营商类型:0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
"""
|
|
618
|
+
# build request
|
|
619
|
+
d = {
|
|
620
|
+
"ProjectId": self.config.project_id,
|
|
621
|
+
}
|
|
622
|
+
req and d.update(req)
|
|
623
|
+
d = apis.DescribeUEcIDCRequestSchema().dumps(d)
|
|
624
|
+
|
|
625
|
+
resp = self.invoke("DescribeUEcIDC", d, **kwargs)
|
|
626
|
+
return apis.DescribeUEcIDCResponseSchema().loads(resp)
|
|
627
|
+
|
|
628
|
+
def describe_u_ec_subnet(
|
|
629
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
630
|
+
) -> dict:
|
|
631
|
+
"""DescribeUEcSubnet - 获取子网列表
|
|
632
|
+
|
|
633
|
+
**Request**
|
|
634
|
+
|
|
635
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
636
|
+
- **IdcId** (str) - 机房ID
|
|
637
|
+
- **SubnetId** (str) - 子网ID
|
|
638
|
+
|
|
639
|
+
**Response**
|
|
640
|
+
|
|
641
|
+
- **SubnetList** (list) - 见 **SubnetInfo** 模型定义
|
|
642
|
+
|
|
643
|
+
**Response Model**
|
|
644
|
+
|
|
645
|
+
**SubnetInfo**
|
|
646
|
+
- **AvailableIPCnt** (int) - 可用ip数
|
|
647
|
+
- **CIDR** (str) - 子网cidr
|
|
648
|
+
- **Comment** (str) - 备注
|
|
649
|
+
- **CreateTime** (int) - 创建时间
|
|
650
|
+
- **IdcId** (str) - 机房ID
|
|
651
|
+
- **SubnetId** (str) - 子网ID
|
|
652
|
+
- **SubnetName** (str) - 子网名称
|
|
653
|
+
- **TotalIpCnt** (int) - 总ip数
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
"""
|
|
657
|
+
# build request
|
|
658
|
+
d = {
|
|
659
|
+
"ProjectId": self.config.project_id,
|
|
660
|
+
}
|
|
661
|
+
req and d.update(req)
|
|
662
|
+
d = apis.DescribeUEcSubnetRequestSchema().dumps(d)
|
|
663
|
+
|
|
664
|
+
resp = self.invoke("DescribeUEcSubnet", d, **kwargs)
|
|
665
|
+
return apis.DescribeUEcSubnetResponseSchema().loads(resp)
|
|
666
|
+
|
|
667
|
+
def describe_u_ec_v_host(
|
|
668
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
669
|
+
) -> dict:
|
|
670
|
+
"""DescribeUEcVHost - 获取虚拟机列表 2.0
|
|
671
|
+
|
|
672
|
+
**Request**
|
|
673
|
+
|
|
674
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
675
|
+
- **IdcId** (list) - Idc机房id。默认全部机房
|
|
676
|
+
- **Limit** (int) - 返回数据长度, 默认20,非负整数
|
|
677
|
+
- **NodeId** (list) - 节点id,创建节点时生成的id。默认全部节点
|
|
678
|
+
- **Offset** (int) - 数据偏移量,默认0,非负整数
|
|
679
|
+
|
|
680
|
+
**Response**
|
|
681
|
+
|
|
682
|
+
- **NodeList** (list) - 见 **NodeInfo** 模型定义
|
|
683
|
+
- **TotalCount** (int) - 满足条件的节点总数
|
|
684
|
+
|
|
685
|
+
**Response Model**
|
|
686
|
+
|
|
687
|
+
**NodeInfo**
|
|
688
|
+
- **ChargeType** (int) - 付费类型:1按时, 2按月,3按年
|
|
689
|
+
- **City** (str) - 城市
|
|
690
|
+
- **CoreNum** (int) - Cpu核数
|
|
691
|
+
- **CreateTime** (int) - 创建时间
|
|
692
|
+
- **DiskSize** (int) - 数据盘大小, 单位GB
|
|
693
|
+
- **ExpiredTime** (int) - 过期时间
|
|
694
|
+
- **FirewallId** (str) - 防火墙Id
|
|
695
|
+
- **IdcId** (str) - 机房ID
|
|
696
|
+
- **ImageName** (str) - 镜像名称
|
|
697
|
+
- **InnerIps** (list) - 内网ip列表
|
|
698
|
+
- **MemSize** (int) - 节点内存大小,单位GB
|
|
699
|
+
- **NetLimit** (int) - 节点带宽限制, 单位Mbs
|
|
700
|
+
- **NodeId** (str) - 节点ID
|
|
701
|
+
- **NodeIpList** (list) - 见 **NodeIpList** 模型定义
|
|
702
|
+
- **NodeName** (str) - 节点名称
|
|
703
|
+
- **OcName** (str) - 机房名称
|
|
704
|
+
- **ProductType** (str) - 机器类型(normal-经济型,hf-标准型,g-GPU型)
|
|
705
|
+
- **Province** (str) - 省份
|
|
706
|
+
- **State** (int) - 节点状态,1部署中,2待启动,3启动中,4运行中,5正在停止,6已停止,7正在更新,8正在重启,9正在删除, 10已经删除,11异常
|
|
707
|
+
- **SysDiskSize** (int) - 系统盘大小, 单位GB
|
|
708
|
+
- **Type** (int) - 运营商类型: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
**NodeIpList**
|
|
712
|
+
- **Ip** (str) - 外网ip
|
|
713
|
+
- **Isp** (str) - 运营商
|
|
714
|
+
- **IspName** (str) - 运营商名称
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
"""
|
|
718
|
+
# build request
|
|
719
|
+
d = {
|
|
720
|
+
"ProjectId": self.config.project_id,
|
|
721
|
+
}
|
|
722
|
+
req and d.update(req)
|
|
723
|
+
d = apis.DescribeUEcVHostRequestSchema().dumps(d)
|
|
724
|
+
|
|
725
|
+
resp = self.invoke("DescribeUEcVHost", d, **kwargs)
|
|
726
|
+
return apis.DescribeUEcVHostResponseSchema().loads(resp)
|
|
727
|
+
|
|
728
|
+
def describe_u_ec_v_host_isp(
|
|
729
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
730
|
+
) -> dict:
|
|
731
|
+
"""DescribeUEcVHostISP - 获取虚拟机运营商信息
|
|
732
|
+
|
|
733
|
+
**Request**
|
|
734
|
+
|
|
735
|
+
- **City** (str) - 城市
|
|
736
|
+
- **IspName** (str) - 运营商名称
|
|
737
|
+
- **Province** (str) - 省份
|
|
738
|
+
|
|
739
|
+
**Response**
|
|
740
|
+
|
|
741
|
+
- **NodeIspList** (list) - 见 **NodeIspList** 模型定义
|
|
742
|
+
|
|
743
|
+
**Response Model**
|
|
744
|
+
|
|
745
|
+
**NodeIspList**
|
|
746
|
+
- **City** (str) - 城市
|
|
747
|
+
- **IdcName** (str) - 机房名称
|
|
748
|
+
- **IspName** (str) - 机房运营商名称
|
|
749
|
+
- **LineType** (str) - 线路类型
|
|
750
|
+
- **Province** (str) - 省份
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
"""
|
|
754
|
+
# build request
|
|
755
|
+
d = {}
|
|
756
|
+
req and d.update(req)
|
|
757
|
+
d = apis.DescribeUEcVHostISPRequestSchema().dumps(d)
|
|
758
|
+
|
|
759
|
+
resp = self.invoke("DescribeUEcVHostISP", d, **kwargs)
|
|
760
|
+
return apis.DescribeUEcVHostISPResponseSchema().loads(resp)
|
|
761
|
+
|
|
762
|
+
def get_u_ec_holder_log(
|
|
763
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
764
|
+
) -> dict:
|
|
765
|
+
"""GetUEcHolderLog - 获取单个容器日志
|
|
766
|
+
|
|
767
|
+
**Request**
|
|
768
|
+
|
|
769
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
770
|
+
- **PackName** (str) - (Required) 容器名称
|
|
771
|
+
- **ResourceId** (str) - (Required) 容器组资源id
|
|
772
|
+
|
|
773
|
+
**Response**
|
|
774
|
+
|
|
775
|
+
- **Data** (str) - 返回的日志数据
|
|
776
|
+
|
|
777
|
+
"""
|
|
778
|
+
# build request
|
|
779
|
+
d = {
|
|
780
|
+
"ProjectId": self.config.project_id,
|
|
781
|
+
}
|
|
782
|
+
req and d.update(req)
|
|
783
|
+
d = apis.GetUEcHolderLogRequestSchema().dumps(d)
|
|
784
|
+
|
|
785
|
+
resp = self.invoke("GetUEcHolderLog", d, **kwargs)
|
|
786
|
+
return apis.GetUEcHolderLogResponseSchema().loads(resp)
|
|
787
|
+
|
|
788
|
+
def get_u_ec_holder_metrics(
|
|
789
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
790
|
+
) -> dict:
|
|
791
|
+
"""GetUEcHolderMetrics - 获取容器(CPU利用率,带宽,内存)数据
|
|
792
|
+
|
|
793
|
+
**Request**
|
|
794
|
+
|
|
795
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
796
|
+
- **PackName** (str) - (Required) 容器名称
|
|
797
|
+
- **ResourceId** (str) - (Required) 容器组资源id
|
|
798
|
+
- **Type** (list) - (Required) n为0 CPU利用率, 1内存使用率, 2网卡出带宽, 3网卡入带宽, 4网卡出包数, 5网卡入包数
|
|
799
|
+
- **EndTime** (int) - 结束时间
|
|
800
|
+
- **StartTime** (int) - 开始时间
|
|
801
|
+
|
|
802
|
+
**Response**
|
|
803
|
+
|
|
804
|
+
- **DataSets** (dict) - 见 **MetricisDataSet** 模型定义
|
|
805
|
+
|
|
806
|
+
**Response Model**
|
|
807
|
+
|
|
808
|
+
**MetricisDataSet**
|
|
809
|
+
- **CPUUtilization** (list) - 见 **MonitorInfo** 模型定义
|
|
810
|
+
- **MemUtilization** (list) - 见 **MonitorInfo** 模型定义
|
|
811
|
+
- **NICIn** (list) - 见 **MonitorInfo** 模型定义
|
|
812
|
+
- **NICOut** (list) - 见 **MonitorInfo** 模型定义
|
|
813
|
+
- **NetPacketIn** (list) - 见 **MonitorInfo** 模型定义
|
|
814
|
+
- **NetPacketOut** (list) - 见 **MonitorInfo** 模型定义
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
**MonitorInfo**
|
|
818
|
+
- **TimeStamp** (int) - 时间戳
|
|
819
|
+
- **Value** (int) - 值
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
"""
|
|
823
|
+
# build request
|
|
824
|
+
d = {
|
|
825
|
+
"ProjectId": self.config.project_id,
|
|
826
|
+
}
|
|
827
|
+
req and d.update(req)
|
|
828
|
+
d = apis.GetUEcHolderMetricsRequestSchema().dumps(d)
|
|
829
|
+
|
|
830
|
+
resp = self.invoke("GetUEcHolderMetrics", d, **kwargs)
|
|
831
|
+
return apis.GetUEcHolderMetricsResponseSchema().loads(resp)
|
|
832
|
+
|
|
833
|
+
def get_u_ec_idc_cut_info(
|
|
834
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
835
|
+
) -> dict:
|
|
836
|
+
"""GetUEcIDCCutInfo - 获取机房割接信息
|
|
837
|
+
|
|
838
|
+
**Request**
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
**Response**
|
|
842
|
+
|
|
843
|
+
- **IDCCutInfo** (list) - 见 **IDCCutInfo** 模型定义
|
|
844
|
+
- **TotalCount** (int) - 满足条件的机房总数
|
|
845
|
+
|
|
846
|
+
**Response Model**
|
|
847
|
+
|
|
848
|
+
**IDCCutInfo**
|
|
849
|
+
- **City** (str) - 城市
|
|
850
|
+
- **CutType** (str) - 割接类型(中断、抖动、断电)
|
|
851
|
+
- **EndTime** (int) - 割接结束时间
|
|
852
|
+
- **IDCName** (str) - 机房名称
|
|
853
|
+
- **Province** (str) - 省份
|
|
854
|
+
- **ResourceSet** (list) - 见 **ResourceSet** 模型定义
|
|
855
|
+
- **StartTime** (int) - 割接开始时间
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
**ResourceSet**
|
|
859
|
+
- **NodeId** (str) - 节点id
|
|
860
|
+
- **OuterIps** (list) - 机器外网ip集合
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
"""
|
|
864
|
+
# build request
|
|
865
|
+
d = {}
|
|
866
|
+
req and d.update(req)
|
|
867
|
+
d = apis.GetUEcIDCCutInfoRequestSchema().dumps(d)
|
|
868
|
+
|
|
869
|
+
resp = self.invoke("GetUEcIDCCutInfo", d, **kwargs)
|
|
870
|
+
return apis.GetUEcIDCCutInfoResponseSchema().loads(resp)
|
|
871
|
+
|
|
872
|
+
def get_u_ec_idcv_host_data(
|
|
873
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
874
|
+
) -> dict:
|
|
875
|
+
"""GetUEcIDCVHostData - 获取机房虚拟机监控数据
|
|
876
|
+
|
|
877
|
+
**Request**
|
|
878
|
+
|
|
879
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
880
|
+
- **NodeId** (list) - (Required) 节点资源id;n为0,1,2...
|
|
881
|
+
- **Type** (list) - (Required) 监控数据类型;n为0,1,2,3,4...,9
|
|
882
|
+
- **BeginTime** (int) - 开始时间戳
|
|
883
|
+
- **EndTime** (int) - 结束时间戳
|
|
884
|
+
|
|
885
|
+
**Response**
|
|
886
|
+
|
|
887
|
+
- **DataSets** (dict) - 见 **DataSet** 模型定义
|
|
888
|
+
|
|
889
|
+
**Response Model**
|
|
890
|
+
|
|
891
|
+
**DataSet**
|
|
892
|
+
- **CPUUtilization** (list) - 见 **MonitorInfo** 模型定义
|
|
893
|
+
- **DiskReadOps** (list) - 见 **MonitorInfo** 模型定义
|
|
894
|
+
- **DiskWriteOps** (list) - 见 **MonitorInfo** 模型定义
|
|
895
|
+
- **IORead** (list) - 见 **MonitorInfo** 模型定义
|
|
896
|
+
- **IOWrite** (list) - 见 **MonitorInfo** 模型定义
|
|
897
|
+
- **MemUtilization** (list) - 见 **MonitorInfo** 模型定义
|
|
898
|
+
- **NICIn** (list) - 见 **MonitorInfo** 模型定义
|
|
899
|
+
- **NICOut** (list) - 见 **MonitorInfo** 模型定义
|
|
900
|
+
- **NetPacketIn** (list) - 见 **MonitorInfo** 模型定义
|
|
901
|
+
- **NetPacketOut** (list) - 见 **MonitorInfo** 模型定义
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
**MonitorInfo**
|
|
905
|
+
- **TimeStamp** (int) - 时间戳
|
|
906
|
+
- **Value** (int) - 值
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
"""
|
|
910
|
+
# build request
|
|
911
|
+
d = {
|
|
912
|
+
"ProjectId": self.config.project_id,
|
|
913
|
+
}
|
|
914
|
+
req and d.update(req)
|
|
915
|
+
d = apis.GetUEcIDCVHostDataRequestSchema().dumps(d)
|
|
916
|
+
|
|
917
|
+
resp = self.invoke("GetUEcIDCVHostData", d, **kwargs)
|
|
918
|
+
return apis.GetUEcIDCVHostDataResponseSchema().loads(resp)
|
|
919
|
+
|
|
920
|
+
def get_u_ec_image(
|
|
921
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
922
|
+
) -> dict:
|
|
923
|
+
"""GetUEcImage - uec2.0
|
|
924
|
+
|
|
925
|
+
**Request**
|
|
926
|
+
|
|
927
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
928
|
+
- **ImageType** (str) - 镜像类型:1标准镜像,2行业镜像,3自定义镜像
|
|
929
|
+
- **Limit** (int) - 返回数据长度, 默认20,非负整数
|
|
930
|
+
- **Offset** (int) - 数据偏移量,默认0,非负整数
|
|
931
|
+
|
|
932
|
+
**Response**
|
|
933
|
+
|
|
934
|
+
- **ImageList** (list) - 见 **ImageInfo** 模型定义
|
|
935
|
+
- **TotalCount** (int) - 镜像总数
|
|
936
|
+
|
|
937
|
+
**Response Model**
|
|
938
|
+
|
|
939
|
+
**ImageInfo**
|
|
940
|
+
- **CreateTime** (int) - 镜像创建时间戳
|
|
941
|
+
- **DeployInfoList** (list) - 见 **DeployImageInfo** 模型定义
|
|
942
|
+
- **Gpu** (int) - 是否支持Gpu(1-支持,0-不支持)
|
|
943
|
+
- **ImageDesc** (str) - 镜像描述
|
|
944
|
+
- **ImageId** (str) - 镜像ID
|
|
945
|
+
- **ImageName** (str) - 镜像名称
|
|
946
|
+
- **ImageSize** (int) - 镜像大小,单位GB
|
|
947
|
+
- **ImageType** (int) - 镜像类型:1标准镜像,2行业镜像,3自定义镜像
|
|
948
|
+
- **OcType** (str) - 系统类型:unix, windows
|
|
949
|
+
- **State** (int) - 镜像状态:镜像状态 1可用,2不可用,3制作中
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
**DeployImageInfo**
|
|
953
|
+
- **IdcId** (str) - 机房ID
|
|
954
|
+
- **State** (int) - 镜像状态 1-可用, 2-不可用, 3-获取中, 4-转换中, 5-部署中
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
"""
|
|
958
|
+
# build request
|
|
959
|
+
d = {
|
|
960
|
+
"ProjectId": self.config.project_id,
|
|
961
|
+
}
|
|
962
|
+
req and d.update(req)
|
|
963
|
+
d = apis.GetUEcImageRequestSchema().dumps(d)
|
|
964
|
+
|
|
965
|
+
resp = self.invoke("GetUEcImage", d, **kwargs)
|
|
966
|
+
return apis.GetUEcImageResponseSchema().loads(resp)
|
|
967
|
+
|
|
968
|
+
def get_u_ec_pod_price(
|
|
969
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
970
|
+
) -> dict:
|
|
971
|
+
"""GetUEcPodPrice - 获得容器组价格
|
|
972
|
+
|
|
973
|
+
**Request**
|
|
974
|
+
|
|
975
|
+
- **IdcId** (str) - (Required) 机房id
|
|
976
|
+
- **Bandwidth** (int) - 绑定的带宽,默认0,当绑定外网IP时默认1(单位M)
|
|
977
|
+
- **ChargeQuantity** (int) - 月数或年数(默认值:1,当支付类型为按月时,默认值为0)
|
|
978
|
+
- **ChargeType** (int) - 支付类型(2按月,3按年,默认2)
|
|
979
|
+
- **CpuCore** (float) - 容器组总Cpu核心数
|
|
980
|
+
- **ElasticIp** (str) - 是否绑定外网IP(yes:是,no:否,默认:no)
|
|
981
|
+
- **MemSize** (int) - 容器组总内存大小(单位M)
|
|
982
|
+
- **ProductType** (str) - 产品类型(normal:标准型,hf:高性能型,默认:normal)
|
|
983
|
+
|
|
984
|
+
**Response**
|
|
985
|
+
|
|
986
|
+
- **HolderPrice** (float) - 容器组价格
|
|
987
|
+
- **IpPrice** (float) - IP和带宽价格
|
|
988
|
+
|
|
989
|
+
"""
|
|
990
|
+
# build request
|
|
991
|
+
d = {}
|
|
992
|
+
req and d.update(req)
|
|
993
|
+
d = apis.GetUEcPodPriceRequestSchema().dumps(d)
|
|
994
|
+
|
|
995
|
+
resp = self.invoke("GetUEcPodPrice", d, **kwargs)
|
|
996
|
+
return apis.GetUEcPodPriceResponseSchema().loads(resp)
|
|
997
|
+
|
|
998
|
+
def get_u_ec_upgrade_price(
|
|
999
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1000
|
+
) -> dict:
|
|
1001
|
+
"""GetUEcUpgradePrice - 获取虚拟机调整差价
|
|
1002
|
+
|
|
1003
|
+
**Request**
|
|
1004
|
+
|
|
1005
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1006
|
+
- **NodeId** (str) - (Required) 虚拟机资源ID
|
|
1007
|
+
- **CpuCore** (int) - cpu核心数
|
|
1008
|
+
- **DiskSize** (int) - 数据盘大小,单位GB
|
|
1009
|
+
- **MemSize** (int) - 内存大小,单位GB
|
|
1010
|
+
- **NetLimit** (int) - 节点带宽限制,单位Mbs
|
|
1011
|
+
- **SysDiskSize** (int) - 系统盘大小,单位GB
|
|
1012
|
+
|
|
1013
|
+
**Response**
|
|
1014
|
+
|
|
1015
|
+
- **Price** (int) - 规格调整差价
|
|
1016
|
+
|
|
1017
|
+
"""
|
|
1018
|
+
# build request
|
|
1019
|
+
d = {
|
|
1020
|
+
"ProjectId": self.config.project_id,
|
|
1021
|
+
}
|
|
1022
|
+
req and d.update(req)
|
|
1023
|
+
d = apis.GetUEcUpgradePriceRequestSchema().dumps(d)
|
|
1024
|
+
|
|
1025
|
+
resp = self.invoke("GetUEcUpgradePrice", d, **kwargs)
|
|
1026
|
+
return apis.GetUEcUpgradePriceResponseSchema().loads(resp)
|
|
1027
|
+
|
|
1028
|
+
def get_u_ec_v_host_data(
|
|
1029
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1030
|
+
) -> dict:
|
|
1031
|
+
"""GetUEcVHostData - 获取虚拟机监控数据
|
|
1032
|
+
|
|
1033
|
+
**Request**
|
|
1034
|
+
|
|
1035
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1036
|
+
- **NodeId** (str) - (Required) 节点id
|
|
1037
|
+
- **Type** (list) - (Required) 0CPU使用率, 1内存使用率, 2 网卡出流量, 3网卡入流量, 4网卡出包量, 5网卡入包量, 6磁盘读流量, 7磁盘写流量, 8磁盘读次数, 9磁盘写次数
|
|
1038
|
+
- **BeginTime** (int) - 查询起始时间
|
|
1039
|
+
- **EndTime** (int) - 查询结束时间
|
|
1040
|
+
|
|
1041
|
+
**Response**
|
|
1042
|
+
|
|
1043
|
+
- **Action** (str) - 操作名称
|
|
1044
|
+
- **DataSets** (dict) - 见 **DataSet** 模型定义
|
|
1045
|
+
- **RetCode** (int) - 返回码
|
|
1046
|
+
|
|
1047
|
+
**Response Model**
|
|
1048
|
+
|
|
1049
|
+
**DataSet**
|
|
1050
|
+
- **CPUUtilization** (list) - 见 **MonitorInfo** 模型定义
|
|
1051
|
+
- **DiskReadOps** (list) - 见 **MonitorInfo** 模型定义
|
|
1052
|
+
- **DiskWriteOps** (list) - 见 **MonitorInfo** 模型定义
|
|
1053
|
+
- **IORead** (list) - 见 **MonitorInfo** 模型定义
|
|
1054
|
+
- **IOWrite** (list) - 见 **MonitorInfo** 模型定义
|
|
1055
|
+
- **MemUtilization** (list) - 见 **MonitorInfo** 模型定义
|
|
1056
|
+
- **NICIn** (list) - 见 **MonitorInfo** 模型定义
|
|
1057
|
+
- **NICOut** (list) - 见 **MonitorInfo** 模型定义
|
|
1058
|
+
- **NetPacketIn** (list) - 见 **MonitorInfo** 模型定义
|
|
1059
|
+
- **NetPacketOut** (list) - 见 **MonitorInfo** 模型定义
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
**MonitorInfo**
|
|
1063
|
+
- **TimeStamp** (int) - 时间戳
|
|
1064
|
+
- **Value** (int) - 值
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
"""
|
|
1068
|
+
# build request
|
|
1069
|
+
d = {
|
|
1070
|
+
"ProjectId": self.config.project_id,
|
|
1071
|
+
}
|
|
1072
|
+
req and d.update(req)
|
|
1073
|
+
d = apis.GetUEcVHostDataRequestSchema().dumps(d)
|
|
1074
|
+
|
|
1075
|
+
resp = self.invoke("GetUEcVHostData", d, **kwargs)
|
|
1076
|
+
return apis.GetUEcVHostDataResponseSchema().loads(resp)
|
|
1077
|
+
|
|
1078
|
+
def get_u_ec_v_host_price(
|
|
1079
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1080
|
+
) -> dict:
|
|
1081
|
+
"""GetUEcVHostPrice - 获取虚拟机价格
|
|
1082
|
+
|
|
1083
|
+
**Request**
|
|
1084
|
+
|
|
1085
|
+
- **IdcId** (str) - (Required) 机房Id
|
|
1086
|
+
- **ChargeQuantity** (int) - 月数或者年数,0计费到月底, 默认0
|
|
1087
|
+
- **ChargeType** (int) - 付费方式,1按时,2按月,3按年,默认2
|
|
1088
|
+
- **CpuCore** (int) - CPU核数
|
|
1089
|
+
- **DiskSize** (int) - 数据盘大小,单位GB
|
|
1090
|
+
- **Gpu** (int) - Gpu卡核心数。仅Gpu机型支持此字段
|
|
1091
|
+
- **GpuType** (str) - Gpu类型,枚举值["T4"],ProductType为g时必填
|
|
1092
|
+
- **IpCount** (int) - 外网IP的数量,默认1
|
|
1093
|
+
- **MemSize** (int) - 内存大小,单位GB
|
|
1094
|
+
- **NetLimit** (int) - 网络带宽限速,单位Mbs
|
|
1095
|
+
- **NodeCount** (int) - 节点数量,默认1
|
|
1096
|
+
- **ProductType** (str) - 产品类型:normal(经济型),hf(标准型),g(Gpu型),默认normal
|
|
1097
|
+
- **SysDiskSize** (int) - 系统盘大小,单位GB
|
|
1098
|
+
|
|
1099
|
+
**Response**
|
|
1100
|
+
|
|
1101
|
+
- **IpPrice** (float) - Ip和带宽价格
|
|
1102
|
+
- **NodePrice** (float) - 节点价格
|
|
1103
|
+
|
|
1104
|
+
"""
|
|
1105
|
+
# build request
|
|
1106
|
+
d = {}
|
|
1107
|
+
req and d.update(req)
|
|
1108
|
+
d = apis.GetUEcVHostPriceRequestSchema().dumps(d)
|
|
1109
|
+
|
|
1110
|
+
resp = self.invoke("GetUEcVHostPrice", d, **kwargs)
|
|
1111
|
+
return apis.GetUEcVHostPriceResponseSchema().loads(resp)
|
|
1112
|
+
|
|
1113
|
+
def import_u_ec_custom_image(
|
|
1114
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1115
|
+
) -> dict:
|
|
1116
|
+
"""ImportUEcCustomImage - 导入自定义镜像
|
|
1117
|
+
|
|
1118
|
+
**Request**
|
|
1119
|
+
|
|
1120
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1121
|
+
- **Format** (str) - 镜像格式,可选RAW、qcow2, 不带镜像ID时必填
|
|
1122
|
+
- **IdcId** (list) - 镜像需要导入机房,默认分发到所有机房
|
|
1123
|
+
- **ImageDesc** (str) - 镜像描述
|
|
1124
|
+
- **ImageId** (str) - 镜像Id,不传参表示新导入镜像,传参表示已有镜像分发到指定机房
|
|
1125
|
+
- **ImageName** (str) - 镜像名称,不带镜像ID时必填
|
|
1126
|
+
- **OsType** (str) - 操作系统平台,linux、windows(当前版本暂不支持windows),不带镜像ID时必填
|
|
1127
|
+
- **UFileUrl** (str) - UFile镜像文件下载地址,不带镜像ID时必填
|
|
1128
|
+
|
|
1129
|
+
**Response**
|
|
1130
|
+
|
|
1131
|
+
- **ImageId** (str) - 镜像Id
|
|
1132
|
+
|
|
1133
|
+
"""
|
|
1134
|
+
# build request
|
|
1135
|
+
d = {
|
|
1136
|
+
"ProjectId": self.config.project_id,
|
|
1137
|
+
}
|
|
1138
|
+
req and d.update(req)
|
|
1139
|
+
d = apis.ImportUEcCustomImageRequestSchema().dumps(d)
|
|
1140
|
+
|
|
1141
|
+
# build options
|
|
1142
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
1143
|
+
|
|
1144
|
+
resp = self.invoke("ImportUEcCustomImage", d, **kwargs)
|
|
1145
|
+
return apis.ImportUEcCustomImageResponseSchema().loads(resp)
|
|
1146
|
+
|
|
1147
|
+
def login_u_ec_docker(
|
|
1148
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1149
|
+
) -> dict:
|
|
1150
|
+
"""LoginUEcDocker - 登录容器
|
|
1151
|
+
|
|
1152
|
+
**Request**
|
|
1153
|
+
|
|
1154
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1155
|
+
- **Name** (str) - (Required) 容器名称
|
|
1156
|
+
- **ResourceId** (str) - (Required) 容器组资源id
|
|
1157
|
+
|
|
1158
|
+
**Response**
|
|
1159
|
+
|
|
1160
|
+
- **Link** (str) - 登录地址
|
|
1161
|
+
- **LinkPort** (int) - 登录端口
|
|
1162
|
+
- **SessionId** (str) - 返回的token
|
|
1163
|
+
|
|
1164
|
+
"""
|
|
1165
|
+
# build request
|
|
1166
|
+
d = {
|
|
1167
|
+
"ProjectId": self.config.project_id,
|
|
1168
|
+
}
|
|
1169
|
+
req and d.update(req)
|
|
1170
|
+
d = apis.LoginUEcDockerRequestSchema().dumps(d)
|
|
1171
|
+
|
|
1172
|
+
resp = self.invoke("LoginUEcDocker", d, **kwargs)
|
|
1173
|
+
return apis.LoginUEcDockerResponseSchema().loads(resp)
|
|
1174
|
+
|
|
1175
|
+
def modify_u_ec_bandwidth(
|
|
1176
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1177
|
+
) -> dict:
|
|
1178
|
+
"""ModifyUEcBandwidth - 修改节点带宽限制
|
|
1179
|
+
|
|
1180
|
+
**Request**
|
|
1181
|
+
|
|
1182
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1183
|
+
- **NetLimit** (str) - (Required) 节点带宽限制,单位Mbs
|
|
1184
|
+
- **NodeId** (str) - (Required) 节点Id
|
|
1185
|
+
|
|
1186
|
+
**Response**
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
"""
|
|
1190
|
+
# build request
|
|
1191
|
+
d = {
|
|
1192
|
+
"ProjectId": self.config.project_id,
|
|
1193
|
+
}
|
|
1194
|
+
req and d.update(req)
|
|
1195
|
+
d = apis.ModifyUEcBandwidthRequestSchema().dumps(d)
|
|
1196
|
+
|
|
1197
|
+
resp = self.invoke("ModifyUEcBandwidth", d, **kwargs)
|
|
1198
|
+
return apis.ModifyUEcBandwidthResponseSchema().loads(resp)
|
|
1199
|
+
|
|
1200
|
+
def modify_u_ec_holder_name(
|
|
1201
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1202
|
+
) -> dict:
|
|
1203
|
+
"""ModifyUEcHolderName - 修改容器组名称
|
|
1204
|
+
|
|
1205
|
+
**Request**
|
|
1206
|
+
|
|
1207
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1208
|
+
- **Name** (str) - (Required) 容器组名称
|
|
1209
|
+
- **ResourceId** (str) - (Required) 容器组资源id
|
|
1210
|
+
|
|
1211
|
+
**Response**
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
"""
|
|
1215
|
+
# build request
|
|
1216
|
+
d = {
|
|
1217
|
+
"ProjectId": self.config.project_id,
|
|
1218
|
+
}
|
|
1219
|
+
req and d.update(req)
|
|
1220
|
+
d = apis.ModifyUEcHolderNameRequestSchema().dumps(d)
|
|
1221
|
+
|
|
1222
|
+
resp = self.invoke("ModifyUEcHolderName", d, **kwargs)
|
|
1223
|
+
return apis.ModifyUEcHolderNameResponseSchema().loads(resp)
|
|
1224
|
+
|
|
1225
|
+
def modify_u_ec_image_name(
|
|
1226
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1227
|
+
) -> dict:
|
|
1228
|
+
"""ModifyUEcImageName - 修改镜像名称
|
|
1229
|
+
|
|
1230
|
+
**Request**
|
|
1231
|
+
|
|
1232
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1233
|
+
- **ImageId** (str) - (Required) 镜像ID
|
|
1234
|
+
- **ImageName** (str) - (Required) 镜像名称
|
|
1235
|
+
- **ImageDesc** (str) - 镜像描述
|
|
1236
|
+
|
|
1237
|
+
**Response**
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
"""
|
|
1241
|
+
# build request
|
|
1242
|
+
d = {
|
|
1243
|
+
"ProjectId": self.config.project_id,
|
|
1244
|
+
}
|
|
1245
|
+
req and d.update(req)
|
|
1246
|
+
d = apis.ModifyUEcImageNameRequestSchema().dumps(d)
|
|
1247
|
+
|
|
1248
|
+
resp = self.invoke("ModifyUEcImageName", d, **kwargs)
|
|
1249
|
+
return apis.ModifyUEcImageNameResponseSchema().loads(resp)
|
|
1250
|
+
|
|
1251
|
+
def poweroff_u_ec_v_host(
|
|
1252
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1253
|
+
) -> dict:
|
|
1254
|
+
"""PoweroffUEcVHost - 虚拟机断电
|
|
1255
|
+
|
|
1256
|
+
**Request**
|
|
1257
|
+
|
|
1258
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1259
|
+
- **NodeId** (list) - (Required) 虚拟机资源ID
|
|
1260
|
+
|
|
1261
|
+
**Response**
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
"""
|
|
1265
|
+
# build request
|
|
1266
|
+
d = {
|
|
1267
|
+
"ProjectId": self.config.project_id,
|
|
1268
|
+
}
|
|
1269
|
+
req and d.update(req)
|
|
1270
|
+
d = apis.PoweroffUEcVHostRequestSchema().dumps(d)
|
|
1271
|
+
|
|
1272
|
+
resp = self.invoke("PoweroffUEcVHost", d, **kwargs)
|
|
1273
|
+
return apis.PoweroffUEcVHostResponseSchema().loads(resp)
|
|
1274
|
+
|
|
1275
|
+
def reinstall_u_ec_v_host(
|
|
1276
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1277
|
+
) -> dict:
|
|
1278
|
+
"""ReinstallUEcVHost - 虚拟机重装系统
|
|
1279
|
+
|
|
1280
|
+
**Request**
|
|
1281
|
+
|
|
1282
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1283
|
+
- **ImageId** (str) - (Required) 镜像ID
|
|
1284
|
+
- **NodeId** (str) - (Required) 虚拟机资源ID
|
|
1285
|
+
- **KeepData** (int) - 是否保留数据盘数据, 0-不保留,1-保留,默认为1
|
|
1286
|
+
- **Password** (str) - 节点密码
|
|
1287
|
+
- **SysDiskSize** (int) - 系统盘大小,单位GB
|
|
1288
|
+
|
|
1289
|
+
**Response**
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
"""
|
|
1293
|
+
# build request
|
|
1294
|
+
d = {
|
|
1295
|
+
"ProjectId": self.config.project_id,
|
|
1296
|
+
}
|
|
1297
|
+
req and d.update(req)
|
|
1298
|
+
d = apis.ReinstallUEcVHostRequestSchema().dumps(d)
|
|
1299
|
+
|
|
1300
|
+
resp = self.invoke("ReinstallUEcVHost", d, **kwargs)
|
|
1301
|
+
return apis.ReinstallUEcVHostResponseSchema().loads(resp)
|
|
1302
|
+
|
|
1303
|
+
def restart_u_ec_holder(
|
|
1304
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1305
|
+
) -> dict:
|
|
1306
|
+
"""RestartUEcHolder - 重启容器组
|
|
1307
|
+
|
|
1308
|
+
**Request**
|
|
1309
|
+
|
|
1310
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1311
|
+
- **ResourceId** (list) - (Required) 容器组资源id,n为0,1,2...
|
|
1312
|
+
|
|
1313
|
+
**Response**
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
"""
|
|
1317
|
+
# build request
|
|
1318
|
+
d = {
|
|
1319
|
+
"ProjectId": self.config.project_id,
|
|
1320
|
+
}
|
|
1321
|
+
req and d.update(req)
|
|
1322
|
+
d = apis.RestartUEcHolderRequestSchema().dumps(d)
|
|
1323
|
+
|
|
1324
|
+
resp = self.invoke("RestartUEcHolder", d, **kwargs)
|
|
1325
|
+
return apis.RestartUEcHolderResponseSchema().loads(resp)
|
|
1326
|
+
|
|
1327
|
+
def restart_u_ec_v_host(
|
|
1328
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1329
|
+
) -> dict:
|
|
1330
|
+
"""RestartUEcVHost - 重启虚拟机v2.0
|
|
1331
|
+
|
|
1332
|
+
**Request**
|
|
1333
|
+
|
|
1334
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1335
|
+
- **NodeId** (list) - (Required) 节点id
|
|
1336
|
+
|
|
1337
|
+
**Response**
|
|
1338
|
+
|
|
1339
|
+
|
|
1340
|
+
"""
|
|
1341
|
+
# build request
|
|
1342
|
+
d = {
|
|
1343
|
+
"ProjectId": self.config.project_id,
|
|
1344
|
+
}
|
|
1345
|
+
req and d.update(req)
|
|
1346
|
+
d = apis.RestartUEcVHostRequestSchema().dumps(d)
|
|
1347
|
+
|
|
1348
|
+
resp = self.invoke("RestartUEcVHost", d, **kwargs)
|
|
1349
|
+
return apis.RestartUEcVHostResponseSchema().loads(resp)
|
|
1350
|
+
|
|
1351
|
+
def start_u_ec_v_host(
|
|
1352
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1353
|
+
) -> dict:
|
|
1354
|
+
"""StartUEcVHost - 启动UEC虚拟机
|
|
1355
|
+
|
|
1356
|
+
**Request**
|
|
1357
|
+
|
|
1358
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1359
|
+
- **NodeId** (list) - (Required) 虚拟机资源ID
|
|
1360
|
+
|
|
1361
|
+
**Response**
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
"""
|
|
1365
|
+
# build request
|
|
1366
|
+
d = {
|
|
1367
|
+
"ProjectId": self.config.project_id,
|
|
1368
|
+
}
|
|
1369
|
+
req and d.update(req)
|
|
1370
|
+
d = apis.StartUEcVHostRequestSchema().dumps(d)
|
|
1371
|
+
|
|
1372
|
+
resp = self.invoke("StartUEcVHost", d, **kwargs)
|
|
1373
|
+
return apis.StartUEcVHostResponseSchema().loads(resp)
|
|
1374
|
+
|
|
1375
|
+
def stop_u_ec_v_host(
|
|
1376
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1377
|
+
) -> dict:
|
|
1378
|
+
"""StopUEcVHost - 停止UEC虚拟机
|
|
1379
|
+
|
|
1380
|
+
**Request**
|
|
1381
|
+
|
|
1382
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1383
|
+
- **NodeId** (list) - (Required) 虚拟机资源ID
|
|
1384
|
+
|
|
1385
|
+
**Response**
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
"""
|
|
1389
|
+
# build request
|
|
1390
|
+
d = {
|
|
1391
|
+
"ProjectId": self.config.project_id,
|
|
1392
|
+
}
|
|
1393
|
+
req and d.update(req)
|
|
1394
|
+
d = apis.StopUEcVHostRequestSchema().dumps(d)
|
|
1395
|
+
|
|
1396
|
+
resp = self.invoke("StopUEcVHost", d, **kwargs)
|
|
1397
|
+
return apis.StopUEcVHostResponseSchema().loads(resp)
|
|
1398
|
+
|
|
1399
|
+
def un_bind_u_ec_firewall(
|
|
1400
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1401
|
+
) -> dict:
|
|
1402
|
+
"""UnBindUEcFirewall - 解绑防火墙
|
|
1403
|
+
|
|
1404
|
+
**Request**
|
|
1405
|
+
|
|
1406
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1407
|
+
- **FirewallId** (str) - (Required) 防火墙Id
|
|
1408
|
+
- **ResourceId** (str) - (Required) 节点Id或容器组资源id
|
|
1409
|
+
|
|
1410
|
+
**Response**
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
"""
|
|
1414
|
+
# build request
|
|
1415
|
+
d = {
|
|
1416
|
+
"ProjectId": self.config.project_id,
|
|
1417
|
+
}
|
|
1418
|
+
req and d.update(req)
|
|
1419
|
+
d = apis.UnBindUEcFirewallRequestSchema().dumps(d)
|
|
1420
|
+
|
|
1421
|
+
resp = self.invoke("UnBindUEcFirewall", d, **kwargs)
|
|
1422
|
+
return apis.UnBindUEcFirewallResponseSchema().loads(resp)
|
|
1423
|
+
|
|
1424
|
+
def update_u_ec_firewall(
|
|
1425
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1426
|
+
) -> dict:
|
|
1427
|
+
"""UpdateUEcFirewall - 更新防火墙信息,新增和删除规则
|
|
1428
|
+
|
|
1429
|
+
**Request**
|
|
1430
|
+
|
|
1431
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1432
|
+
- **FirewallId** (str) - (Required) 防火墙Id
|
|
1433
|
+
- **Rule** (list) - 见 **UpdateUEcFirewallParamRule** 模型定义
|
|
1434
|
+
|
|
1435
|
+
**Response**
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
**Request Model**
|
|
1439
|
+
|
|
1440
|
+
**UpdateUEcFirewallParamRule**
|
|
1441
|
+
- **Action** (str) - ACCEPT(接受)和DROP(拒绝)
|
|
1442
|
+
- **Port** (str) - 端口,范围用"-"符号分隔,如:1-65535
|
|
1443
|
+
- **Priority** (str) - 优先级:HIGH(高),MEDIUM(中),LOW(低)
|
|
1444
|
+
- **ProtocolType** (str) - 协议,可选值:TCP,UDP,ICMP
|
|
1445
|
+
- **Remark** (str) - 备注
|
|
1446
|
+
- **SrcIp** (str) - 源ip
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
"""
|
|
1450
|
+
# build request
|
|
1451
|
+
d = {
|
|
1452
|
+
"ProjectId": self.config.project_id,
|
|
1453
|
+
}
|
|
1454
|
+
req and d.update(req)
|
|
1455
|
+
d = apis.UpdateUEcFirewallRequestSchema().dumps(d)
|
|
1456
|
+
|
|
1457
|
+
resp = self.invoke("UpdateUEcFirewall", d, **kwargs)
|
|
1458
|
+
return apis.UpdateUEcFirewallResponseSchema().loads(resp)
|
|
1459
|
+
|
|
1460
|
+
def update_u_ec_firewall_attribute(
|
|
1461
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1462
|
+
) -> dict:
|
|
1463
|
+
"""UpdateUEcFirewallAttribute - 更新防火墙名称及描述
|
|
1464
|
+
|
|
1465
|
+
**Request**
|
|
1466
|
+
|
|
1467
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1468
|
+
- **FirewallId** (str) - (Required) 防火墙Id
|
|
1469
|
+
- **Name** (str) - 防火墙名称
|
|
1470
|
+
- **Remark** (str) - 描述
|
|
1471
|
+
|
|
1472
|
+
**Response**
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
"""
|
|
1476
|
+
# build request
|
|
1477
|
+
d = {
|
|
1478
|
+
"ProjectId": self.config.project_id,
|
|
1479
|
+
}
|
|
1480
|
+
req and d.update(req)
|
|
1481
|
+
d = apis.UpdateUEcFirewallAttributeRequestSchema().dumps(d)
|
|
1482
|
+
|
|
1483
|
+
resp = self.invoke("UpdateUEcFirewallAttribute", d, **kwargs)
|
|
1484
|
+
return apis.UpdateUEcFirewallAttributeResponseSchema().loads(resp)
|
|
1485
|
+
|
|
1486
|
+
def update_u_ec_subnet(
|
|
1487
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1488
|
+
) -> dict:
|
|
1489
|
+
"""UpdateUEcSubnet - 更新子网信息
|
|
1490
|
+
|
|
1491
|
+
**Request**
|
|
1492
|
+
|
|
1493
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1494
|
+
- **SubnetId** (str) - (Required) 子网ID
|
|
1495
|
+
- **Comment** (str) - 备注
|
|
1496
|
+
- **SubnetName** (str) - 子网名称
|
|
1497
|
+
|
|
1498
|
+
**Response**
|
|
1499
|
+
|
|
1500
|
+
|
|
1501
|
+
"""
|
|
1502
|
+
# build request
|
|
1503
|
+
d = {
|
|
1504
|
+
"ProjectId": self.config.project_id,
|
|
1505
|
+
}
|
|
1506
|
+
req and d.update(req)
|
|
1507
|
+
d = apis.UpdateUEcSubnetRequestSchema().dumps(d)
|
|
1508
|
+
|
|
1509
|
+
resp = self.invoke("UpdateUEcSubnet", d, **kwargs)
|
|
1510
|
+
return apis.UpdateUEcSubnetResponseSchema().loads(resp)
|