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,729 @@
|
|
|
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.uk8s.schemas import apis
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class UK8SClient(Client):
|
|
11
|
+
def __init__(
|
|
12
|
+
self, config: dict, transport=None, middleware=None, logger=None
|
|
13
|
+
):
|
|
14
|
+
super(UK8SClient, self).__init__(config, transport, middleware, logger)
|
|
15
|
+
|
|
16
|
+
def add_uk8s_existing_uhost(
|
|
17
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
18
|
+
) -> dict:
|
|
19
|
+
"""AddUK8SExistingUHost - 将预先创建好的云主机加入到UK8S集群,需要注意的是,该云主机依然会执行重装系统的操作。
|
|
20
|
+
|
|
21
|
+
**Request**
|
|
22
|
+
|
|
23
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
|
|
24
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
|
|
25
|
+
- **ClusterId** (str) - (Required) UK8S集群ID。 可从UK8S控制台获取。
|
|
26
|
+
- **Password** (str) - (Required) Node节点密码。请遵照 `字段规范 <https://docs.ucloud.cn/api/uhost-api/specification>`_ 设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64
|
|
27
|
+
- **UHostId** (str) - (Required) 云主机Id,为了保证节点正常运行,该主机配置不得低于2C4G。
|
|
28
|
+
- **DisableSchedule** (bool) - 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用
|
|
29
|
+
- **ImageId** (str) - 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。
|
|
30
|
+
- **InitScript** (str) - 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。
|
|
31
|
+
- **Labels** (str) - Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game
|
|
32
|
+
- **MaxPods** (int) - 默认110,生产环境建议小于等于110。
|
|
33
|
+
- **SubnetId** (str) - 该云主机所属子网Id。
|
|
34
|
+
- **UserData** (str) - 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。
|
|
35
|
+
- **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
|
|
36
|
+
|
|
37
|
+
**Response**
|
|
38
|
+
|
|
39
|
+
- **Message** (str) - 返回错误消息,当 RetCode 非 0 时提供详细的描述信息。
|
|
40
|
+
|
|
41
|
+
"""
|
|
42
|
+
# build request
|
|
43
|
+
d = {
|
|
44
|
+
"ProjectId": self.config.project_id,
|
|
45
|
+
"Region": self.config.region,
|
|
46
|
+
}
|
|
47
|
+
req and d.update(req)
|
|
48
|
+
d = apis.AddUK8SExistingUHostRequestSchema().dumps(d)
|
|
49
|
+
|
|
50
|
+
# build options
|
|
51
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
52
|
+
|
|
53
|
+
resp = self.invoke("AddUK8SExistingUHost", d, **kwargs)
|
|
54
|
+
return apis.AddUK8SExistingUHostResponseSchema().loads(resp)
|
|
55
|
+
|
|
56
|
+
def add_uk8s_node_group(
|
|
57
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
58
|
+
) -> dict:
|
|
59
|
+
"""AddUK8SNodeGroup - 添加UK8S节点池
|
|
60
|
+
|
|
61
|
+
**Request**
|
|
62
|
+
|
|
63
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
64
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
65
|
+
- **ClusterId** (str) - (Required) 集群ID
|
|
66
|
+
- **NodeGroupName** (str) - (Required) 节点池名字
|
|
67
|
+
- **BootDiskSize** (int) - 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。
|
|
68
|
+
- **BootDiskType** (str) - 磁盘类型
|
|
69
|
+
- **CPU** (int) - GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关)
|
|
70
|
+
- **ChargeType** (str) - 计费模式
|
|
71
|
+
- **DataDiskSize** (int) - 数据磁盘大小
|
|
72
|
+
- **DataDiskType** (str) - 磁盘类型
|
|
73
|
+
- **GPU** (int) - GPU卡核心数
|
|
74
|
+
- **GpuType** (str) - GPU类型
|
|
75
|
+
- **ImageId** (str) - 镜像ID
|
|
76
|
+
- **MachineType** (str) - 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考 `云主机机型说明 <https://docs.ucloud.cn/api/uhost-api/uhost_type>`_ 。
|
|
77
|
+
- **Mem** (int) - 内存大小。单位:MB
|
|
78
|
+
- **MinimalCpuPlatform** (str) - 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto"
|
|
79
|
+
- **SubnetId** (str) - 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。
|
|
80
|
+
- **Tag** (str) - 业务组
|
|
81
|
+
- **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
82
|
+
|
|
83
|
+
**Response**
|
|
84
|
+
|
|
85
|
+
- **Message** (str) - 返回错误消息,当 RetCode 非 0 时提供详细的描述信息。
|
|
86
|
+
- **NodeGroupId** (str) - 节点池ID
|
|
87
|
+
|
|
88
|
+
"""
|
|
89
|
+
# build request
|
|
90
|
+
d = {
|
|
91
|
+
"ProjectId": self.config.project_id,
|
|
92
|
+
"Region": self.config.region,
|
|
93
|
+
}
|
|
94
|
+
req and d.update(req)
|
|
95
|
+
d = apis.AddUK8SNodeGroupRequestSchema().dumps(d)
|
|
96
|
+
|
|
97
|
+
# build options
|
|
98
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
99
|
+
|
|
100
|
+
resp = self.invoke("AddUK8SNodeGroup", d, **kwargs)
|
|
101
|
+
return apis.AddUK8SNodeGroupResponseSchema().loads(resp)
|
|
102
|
+
|
|
103
|
+
def add_uk8s_phost_node(
|
|
104
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
105
|
+
) -> dict:
|
|
106
|
+
"""AddUK8SPHostNode - 为UK8S集群添加一台或多台物理云主机类型的节点。
|
|
107
|
+
|
|
108
|
+
**Request**
|
|
109
|
+
|
|
110
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
|
|
111
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
|
|
112
|
+
- **ChargeType** (str) - (Required) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ 默认为月付
|
|
113
|
+
- **ClusterId** (str) - (Required) UK8S集群ID。 可从UK8S控制台获取。
|
|
114
|
+
- **Count** (int) - (Required) 最大创建Node节点数量,取值范围是[1,10]。
|
|
115
|
+
- **Password** (str) - (Required) Node节点密码。请遵照 `字段规范 <https://docs.ucloud.cn/api/uhost-api/specification>`_ 设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64
|
|
116
|
+
- **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
|
|
117
|
+
- **DisableSchedule** (bool) - 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用
|
|
118
|
+
- **ImageId** (str) - 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。
|
|
119
|
+
- **InitScript** (str) - 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行。
|
|
120
|
+
- **Labels** (str) - Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game
|
|
121
|
+
- **MaxPods** (int) - 默认110,生产环境建议小于等于110。
|
|
122
|
+
- **NIC** (str) - 网络环境,可选千兆:1G ,万兆:10G, 默认1G。
|
|
123
|
+
- **Quantity** (int) - 购买时长。默认: 1。月付时,此参数传0,代表了购买至月末。
|
|
124
|
+
- **Raid** (str) - Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid
|
|
125
|
+
- **SubnetId** (str) - 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。
|
|
126
|
+
- **Type** (str) - 物理机类型,默认为:db-2(基础型-SAS-V3)
|
|
127
|
+
|
|
128
|
+
**Response**
|
|
129
|
+
|
|
130
|
+
- **Message** (str) - 返回错误消息,当 RetCode 非 0 时提供详细的描述信息。
|
|
131
|
+
|
|
132
|
+
"""
|
|
133
|
+
# build request
|
|
134
|
+
d = {
|
|
135
|
+
"ProjectId": self.config.project_id,
|
|
136
|
+
"Region": self.config.region,
|
|
137
|
+
}
|
|
138
|
+
req and d.update(req)
|
|
139
|
+
d = apis.AddUK8SPHostNodeRequestSchema().dumps(d)
|
|
140
|
+
|
|
141
|
+
# build options
|
|
142
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
143
|
+
|
|
144
|
+
resp = self.invoke("AddUK8SPHostNode", d, **kwargs)
|
|
145
|
+
return apis.AddUK8SPHostNodeResponseSchema().loads(resp)
|
|
146
|
+
|
|
147
|
+
def add_uk8s_uhost_node(
|
|
148
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
149
|
+
) -> dict:
|
|
150
|
+
"""AddUK8SUHostNode - 为UK8S集群添加一台Node节点,机型类型为云主机
|
|
151
|
+
|
|
152
|
+
**Request**
|
|
153
|
+
|
|
154
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
155
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
156
|
+
- **CPU** (int) - (Required) 虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。
|
|
157
|
+
- **ChargeType** (str) - (Required) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ 默认为月付
|
|
158
|
+
- **ClusterId** (str) - (Required) UK8S集群ID。 可从UK8S控制台获取。
|
|
159
|
+
- **Count** (int) - (Required) 创建Node节点数量,取值范围是[1,50]。
|
|
160
|
+
- **Mem** (int) - (Required) 内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192
|
|
161
|
+
- **Password** (str) - (Required) Node节点密码。请遵照 `字段规范 <https://docs.ucloud.cn/api/uhost-api/specification>`_ 设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64
|
|
162
|
+
- **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
163
|
+
- **BootDiskSize** (int) - 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。
|
|
164
|
+
- **BootDiskType** (str) - 磁盘类型。请参考 `磁盘类型 <https://docs.ucloud.cn/api/uhost-api/disk_type>`_ 。默认为SSD云盘
|
|
165
|
+
- **DataDiskSize** (int) - 数据磁盘大小,单位GB。默认0。范围 :[20, 1000]
|
|
166
|
+
- **DataDiskType** (str) - 磁盘类型。请参考 `磁盘类型 <https://docs.ucloud.cn/api/uhost-api/disk_type>`_ 。默认为SSD云盘
|
|
167
|
+
- **DisableSchedule** (bool) - 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用
|
|
168
|
+
- **GPU** (int) - GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关)
|
|
169
|
+
- **GpuType** (str) - GPU类型,枚举值["K80", "P40", "V100",],MachineType为G时必填
|
|
170
|
+
- **ImageId** (str) - 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。
|
|
171
|
+
- **InitScript** (str) - 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。
|
|
172
|
+
- **IsolationGroup** (str) - 硬件隔离组id。可通过DescribeIsolationGroup获取。
|
|
173
|
+
- **Labels** (str) - Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game
|
|
174
|
+
- **MachineType** (str) - 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考 `云主机机型说明 <https://docs.ucloud.cn/api/uhost-api/uhost_type>`_ 。
|
|
175
|
+
- **MaxPods** (int) - 默认110,生产环境建议小于等于110。
|
|
176
|
+
- **MinimalCpuPlatform** (str) - 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto"
|
|
177
|
+
- **NodeGroupId** (str) - 节点池id
|
|
178
|
+
- **Quantity** (int) - 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。
|
|
179
|
+
- **SubnetId** (str) - 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。
|
|
180
|
+
- **Tag** (str) - 业务组
|
|
181
|
+
- **Taints** (str) - Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。
|
|
182
|
+
- **UserData** (str) - 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。
|
|
183
|
+
|
|
184
|
+
**Response**
|
|
185
|
+
|
|
186
|
+
- **Message** (str) - 返回错误消息,当 RetCode 非 0 时提供详细的描述信息。
|
|
187
|
+
- **NodeIds** (list) - Node实例Id集合
|
|
188
|
+
|
|
189
|
+
"""
|
|
190
|
+
# build request
|
|
191
|
+
d = {
|
|
192
|
+
"ProjectId": self.config.project_id,
|
|
193
|
+
"Region": self.config.region,
|
|
194
|
+
}
|
|
195
|
+
req and d.update(req)
|
|
196
|
+
d = apis.AddUK8SUHostNodeRequestSchema().dumps(d)
|
|
197
|
+
|
|
198
|
+
# build options
|
|
199
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
200
|
+
|
|
201
|
+
resp = self.invoke("AddUK8SUHostNode", d, **kwargs)
|
|
202
|
+
return apis.AddUK8SUHostNodeResponseSchema().loads(resp)
|
|
203
|
+
|
|
204
|
+
def create_uk8s_cluster_v2(
|
|
205
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
206
|
+
) -> dict:
|
|
207
|
+
"""CreateUK8SClusterV2 - 创建UK8S集群
|
|
208
|
+
|
|
209
|
+
**Request**
|
|
210
|
+
|
|
211
|
+
- **ProjectId** (str) - (Config) 项目ID。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
212
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
213
|
+
- **ClusterName** (str) - (Required) 集群名称
|
|
214
|
+
- **MasterCPU** (int) - (Required) Master节点的虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。
|
|
215
|
+
- **MasterMachineType** (str) - (Required) Master节点的云主机机型(V2.0),如["N", "C", "O", "OS"],具体请参照云主机机型。
|
|
216
|
+
- **MasterMem** (int) - (Required) Master节点的内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。
|
|
217
|
+
- **Password** (str) - (Required) 集群节点密码,包括Master和Node。密码需包含最少一个大写字母,请使用base64进行编码,举例如下:# echo -n Password1 | base64
|
|
218
|
+
- **ServiceCIDR** (str) - (Required) Service 网段,用于分配ClusterIP,如172.17.0.0/16。该网段不能与集群所属VPC网段重叠。
|
|
219
|
+
- **SubnetId** (str) - (Required) 集群Node及Pod所属子网
|
|
220
|
+
- **VPCId** (str) - (Required) 集群Node及Pod所属VPC
|
|
221
|
+
- **ChargeType** (str) - 集群所有节点的付费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限),默认按月。
|
|
222
|
+
- **ClusterDomain** (str) - 创建集群的时候定义clusterdomain
|
|
223
|
+
- **ExternalApiServer** (str) - 是否允许外网访问apiserver,开启:Yes 不开启:No。默认为No。
|
|
224
|
+
- **ImageId** (str) - Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。
|
|
225
|
+
- **InitScript** (str) - 用户自定义脚本,与UserData不同,自定义脚本将在集群安装完毕后执行。注意:1、总数据量大小不超多16K;2、使用base64编码。
|
|
226
|
+
- **K8sVersion** (str) - k8s集群的版本,版本信息请参考UK8S集群创建页,不指定的话默认为当前支持的最高版本。
|
|
227
|
+
- **KubeProxy** (dict) - 见 **CreateUK8SClusterV2ParamKubeProxy** 模型定义
|
|
228
|
+
- **Master** (list) - 见 **CreateUK8SClusterV2ParamMaster** 模型定义
|
|
229
|
+
- **MasterBootDiskSize** (int) - Master节点系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。
|
|
230
|
+
- **MasterBootDiskType** (str) - Master节点系统盘类型。请参考 `磁盘类型 <https://docs.ucloud.cn/api/uhost-api/disk_type>`_ 。默认为SSD云盘
|
|
231
|
+
- **MasterDataDiskSize** (int) - Master节点的数据盘大小,单位GB,默认为0。范围 :[20, 1000]
|
|
232
|
+
- **MasterDataDiskType** (str) - Master节点数据盘类型。请参考 `磁盘类型 <https://docs.ucloud.cn/api/uhost-api/disk_type>`_ 。默认为SSD云盘
|
|
233
|
+
- **MasterIsolationGroup** (str) - 【无效,已删除】当前将自动为Master节点创建隔离组,确保Master节点归属于不同物理机。
|
|
234
|
+
- **MasterMinimalCpuPlatform** (str) - Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。
|
|
235
|
+
- **Nodes** (list) - 见 **CreateUK8SClusterV2ParamNodes** 模型定义
|
|
236
|
+
- **Quantity** (int) - 购买时长。默认为1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。
|
|
237
|
+
- **Tag** (str) - 业务组
|
|
238
|
+
- **UserData** (str) - 用户自定义数据。注意:1、总数据量大小不超多16K;2、使用base64编码。
|
|
239
|
+
|
|
240
|
+
**Response**
|
|
241
|
+
|
|
242
|
+
- **ClusterId** (str) - 集群ID
|
|
243
|
+
|
|
244
|
+
**Request Model**
|
|
245
|
+
|
|
246
|
+
**CreateUK8SClusterV2ParamKubeProxy**
|
|
247
|
+
- **Mode** (str) - 集群kube-proxy模式。支持iptables和ipvs,默认为iptables。
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
**CreateUK8SClusterV2ParamMaster**
|
|
251
|
+
- **Zone** (str) - Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
**CreateUK8SClusterV2ParamNodes**
|
|
255
|
+
- **BootDiskSIze** (int) - Node节点的系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。
|
|
256
|
+
- **BootDiskType** (str) - 一组Node节点的系统盘类型,请参考 `磁盘类型 <https://docs.ucloud.cn/api/uhost-api/disk_type>`_ 。默认为SSD云盘
|
|
257
|
+
- **CPU** (int) - 一组Node节点的虚拟CPU核数。单位:核,范围:[2, 64],可选范围参考控制台。
|
|
258
|
+
- **Count** (int) - 一组Node节点的数量,范围:[1,10]。
|
|
259
|
+
- **DataDiskSize** (int) - 数据磁盘大小,单位GB。默认0。范围 :[20, 1000]
|
|
260
|
+
- **DataDiskType** (str) - 一组Node节点的数据盘类型,请参考 `磁盘类型 <https://docs.ucloud.cn/api/uhost-api/disk_type>`_ 。默认为SSD云盘
|
|
261
|
+
- **GPU** (int) - 一组Node节点的GPU卡核心数,仅GPU机型支持此字段。
|
|
262
|
+
- **GpuType** (str) - 一组Node节点的GPU类型,枚举值["K80", "P40", "V100"],最新值参考Console。
|
|
263
|
+
- **IsolationGroup** (str) - 一组Node节点的隔离组Id,归属于同一隔离组的虚拟机节点将落在不同的物理机上,单个隔离组最多只能容纳8个节点。参见DescribeIsolationGroup。
|
|
264
|
+
- **Labels** (str) - Node节点标签,形式为key=value,多组Labels用”,“隔开,最多支持五组。
|
|
265
|
+
- **MachineType** (str) - 一组Nodes节点云主机机型,如["N", "C", "O", "OS"],具体请参照云主机机型。
|
|
266
|
+
- **MaxPods** (int) - Node节点上可运行最大节点数,默认为110。
|
|
267
|
+
- **Mem** (int) - 一组Node节点的内存大小。单位:MB,范围 :[4096, 262144],取值为1024的倍数,可选范围参考控制台。
|
|
268
|
+
- **MinimalCpuPlatform** (str) - Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。
|
|
269
|
+
- **Taints** (str) - Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。
|
|
270
|
+
- **Zone** (str) - 一组Nodes节点所属可用区,可创建多组Nodes节点,如一组是CPU Nodes节点,另一组是GPU Nodes节点。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
"""
|
|
274
|
+
# build request
|
|
275
|
+
d = {
|
|
276
|
+
"ProjectId": self.config.project_id,
|
|
277
|
+
"Region": self.config.region,
|
|
278
|
+
}
|
|
279
|
+
req and d.update(req)
|
|
280
|
+
d = apis.CreateUK8SClusterV2RequestSchema().dumps(d)
|
|
281
|
+
|
|
282
|
+
# build options
|
|
283
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
284
|
+
|
|
285
|
+
resp = self.invoke("CreateUK8SClusterV2", d, **kwargs)
|
|
286
|
+
return apis.CreateUK8SClusterV2ResponseSchema().loads(resp)
|
|
287
|
+
|
|
288
|
+
def del_uk8s_cluster(
|
|
289
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
290
|
+
) -> dict:
|
|
291
|
+
"""DelUK8SCluster - 删除UK8S集群
|
|
292
|
+
|
|
293
|
+
**Request**
|
|
294
|
+
|
|
295
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
|
|
296
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
|
|
297
|
+
- **ClusterId** (str) - (Required) 集群id
|
|
298
|
+
- **ReleaseUDisk** (bool) - 是否删除节点挂载的数据盘。枚举值[true:删除,false: 不删除],默认不删除
|
|
299
|
+
|
|
300
|
+
**Response**
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
"""
|
|
304
|
+
# build request
|
|
305
|
+
d = {
|
|
306
|
+
"ProjectId": self.config.project_id,
|
|
307
|
+
"Region": self.config.region,
|
|
308
|
+
}
|
|
309
|
+
req and d.update(req)
|
|
310
|
+
d = apis.DelUK8SClusterRequestSchema().dumps(d)
|
|
311
|
+
|
|
312
|
+
resp = self.invoke("DelUK8SCluster", d, **kwargs)
|
|
313
|
+
return apis.DelUK8SClusterResponseSchema().loads(resp)
|
|
314
|
+
|
|
315
|
+
def del_uk8s_cluster_node_v2(
|
|
316
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
317
|
+
) -> dict:
|
|
318
|
+
"""DelUK8SClusterNodeV2 - 删除集群中的Node节点,删除前务必先将其中的Pod驱逐。
|
|
319
|
+
|
|
320
|
+
**Request**
|
|
321
|
+
|
|
322
|
+
- **ProjectId** (str) - (Config) 项目ID项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
|
|
323
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
|
|
324
|
+
- **ClusterId** (str) - (Required) UK8S集群ID。 可从UK8S控制台获取。
|
|
325
|
+
- **NodeId** (str) - (Required) Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda。**非云主机或物理云主机资源Id**
|
|
326
|
+
- **ReleaseDataUDisk** (bool) - 删除节点时是否释放数据盘。 枚举值[true:释放,false: 不释放],默认为true。
|
|
327
|
+
|
|
328
|
+
**Response**
|
|
329
|
+
|
|
330
|
+
- **Message** (str) - 返回错误消息,当 RetCode 非 0 时提供详细的描述信息。
|
|
331
|
+
|
|
332
|
+
"""
|
|
333
|
+
# build request
|
|
334
|
+
d = {
|
|
335
|
+
"ProjectId": self.config.project_id,
|
|
336
|
+
"Region": self.config.region,
|
|
337
|
+
}
|
|
338
|
+
req and d.update(req)
|
|
339
|
+
d = apis.DelUK8SClusterNodeV2RequestSchema().dumps(d)
|
|
340
|
+
|
|
341
|
+
resp = self.invoke("DelUK8SClusterNodeV2", d, **kwargs)
|
|
342
|
+
return apis.DelUK8SClusterNodeV2ResponseSchema().loads(resp)
|
|
343
|
+
|
|
344
|
+
def describe_uk8s_cluster(
|
|
345
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
346
|
+
) -> dict:
|
|
347
|
+
"""DescribeUK8SCluster - 获取集群信息
|
|
348
|
+
|
|
349
|
+
**Request**
|
|
350
|
+
|
|
351
|
+
- **ProjectId** (str) - (Config) 项目id
|
|
352
|
+
- **Region** (str) - (Config) 所属区域
|
|
353
|
+
- **ClusterId** (str) - (Required) k8s集群ID
|
|
354
|
+
|
|
355
|
+
**Response**
|
|
356
|
+
|
|
357
|
+
- **ApiServer** (str) - 集群apiserver地址
|
|
358
|
+
- **CACert** (str) - 集群CA根证书
|
|
359
|
+
- **ClusterDomain** (str) - 自定义或者默认的clusterdomain
|
|
360
|
+
- **ClusterId** (str) - 集群ID
|
|
361
|
+
- **ClusterName** (str) - 资源名字
|
|
362
|
+
- **CreateTime** (int) - 创建时间
|
|
363
|
+
- **EtcdCert** (str) - 集群etcd服务证书
|
|
364
|
+
- **EtcdKey** (str) - 集群etcd服务密钥
|
|
365
|
+
- **ExternalApiServer** (str) - 集群外部apiserver地址
|
|
366
|
+
- **KubeProxy** (dict) - 见 **KubeProxy** 模型定义
|
|
367
|
+
- **MasterCount** (int) - Master 节点数量
|
|
368
|
+
- **MasterList** (list) - 见 **UhostInfo** 模型定义
|
|
369
|
+
- **MasterResourceStatus** (str) - Master配置预警:Normal正常;Warning 需要升级;Error 需要紧急升级;
|
|
370
|
+
- **NodeCount** (int) - Node节点数量
|
|
371
|
+
- **NodeList** (list) - 见 **UhostInfo** 模型定义
|
|
372
|
+
- **PodCIDR** (str) - Pod网段
|
|
373
|
+
- **ServiceCIDR** (str) - 服务网段
|
|
374
|
+
- **Status** (str) - 状态
|
|
375
|
+
- **SubnetId** (str) - 所属子网
|
|
376
|
+
- **VPCId** (str) - 所属VPC
|
|
377
|
+
- **Version** (str) - K8S版本
|
|
378
|
+
|
|
379
|
+
**Response Model**
|
|
380
|
+
|
|
381
|
+
**KubeProxy**
|
|
382
|
+
- **Mode** (str) - KubeProxy模式,枚举值为[ipvs,iptables]
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
**UhostInfo**
|
|
386
|
+
- **CPU** (int) - Cpu数量
|
|
387
|
+
- **CreateTime** (int) - 创建时间
|
|
388
|
+
- **DiskSet** (list) - 见 **DiskSet** 模型定义
|
|
389
|
+
- **ExpireTime** (int) - 到期时间
|
|
390
|
+
- **IPSet** (list) - 见 **IPSet** 模型定义
|
|
391
|
+
- **Memory** (int) - 内存
|
|
392
|
+
- **Name** (str) - 主机名称
|
|
393
|
+
- **NodeId** (str) - 主机ID
|
|
394
|
+
- **NodeType** (str) - 节点类型:uhost表示云主机;uphost表示物理云主机
|
|
395
|
+
- **OsName** (str) - 镜像信息
|
|
396
|
+
- **State** (str) - 主机状态
|
|
397
|
+
- **Zone** (str) - 所在机房
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
**DiskSet**
|
|
401
|
+
- **BackupType** (str) - 备份方案,枚举类型:BASIC_SNAPSHOT,普通快照;DATAARK,方舟。无快照则不返回该字段。
|
|
402
|
+
- **DiskId** (str) - 磁盘长ID
|
|
403
|
+
- **DiskType** (str) - LOCAL_NOMAL| CLOUD_NORMAL| LOCAL_SSD| CLOUD_SSD|EXCLUSIVE_LOCAL_DISK
|
|
404
|
+
- **Drive** (str) - 磁盘盘符
|
|
405
|
+
- **Encrypted** (str) - Yes: 加密 No: 非加密
|
|
406
|
+
- **IOPS** (int) - 当前主机的IOPS值
|
|
407
|
+
- **IsBoot** (str) - True| False
|
|
408
|
+
- **Name** (str) - UDisk名字(仅当磁盘是UDisk时返回)
|
|
409
|
+
- **Size** (int) - 磁盘大小,单位: GB
|
|
410
|
+
- **Type** (str) - 磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
**IPSet**
|
|
414
|
+
- **Bandwidth** (int) - IP对应的带宽, 单位: Mb (内网IP不显示带宽信息)
|
|
415
|
+
- **Default** (str) - 是否默认的弹性网卡的信息。true: 是默认弹性网卡;其他值:不是。
|
|
416
|
+
- **IP** (str) - IP地址
|
|
417
|
+
- **IPId** (str) - IP资源ID (内网IP无对应的资源ID)
|
|
418
|
+
- **Type** (str) - 国际: Internation,BGP: Bgp,内网: Private
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
"""
|
|
422
|
+
# build request
|
|
423
|
+
d = {
|
|
424
|
+
"ProjectId": self.config.project_id,
|
|
425
|
+
"Region": self.config.region,
|
|
426
|
+
}
|
|
427
|
+
req and d.update(req)
|
|
428
|
+
d = apis.DescribeUK8SClusterRequestSchema().dumps(d)
|
|
429
|
+
|
|
430
|
+
resp = self.invoke("DescribeUK8SCluster", d, **kwargs)
|
|
431
|
+
return apis.DescribeUK8SClusterResponseSchema().loads(resp)
|
|
432
|
+
|
|
433
|
+
def describe_uk8s_image(
|
|
434
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
435
|
+
) -> dict:
|
|
436
|
+
"""DescribeUK8SImage - 获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像
|
|
437
|
+
|
|
438
|
+
**Request**
|
|
439
|
+
|
|
440
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
|
|
441
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
|
|
442
|
+
- **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
|
|
443
|
+
|
|
444
|
+
**Response**
|
|
445
|
+
|
|
446
|
+
- **ImageSet** (list) - 见 **ImageInfo** 模型定义
|
|
447
|
+
- **Message** (str) - 返回错误消息,当 RetCode 非 0 时提供详细的描述信息。
|
|
448
|
+
- **PHostImageSet** (list) - 见 **ImageInfo** 模型定义
|
|
449
|
+
|
|
450
|
+
**Response Model**
|
|
451
|
+
|
|
452
|
+
**ImageInfo**
|
|
453
|
+
- **ImageId** (str) - 镜像 Id
|
|
454
|
+
- **ImageName** (str) - 镜像名称
|
|
455
|
+
- **NotSupportGPU** (bool) - 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。
|
|
456
|
+
- **ZoneId** (int) - 可用区 Id
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
"""
|
|
460
|
+
# build request
|
|
461
|
+
d = {
|
|
462
|
+
"ProjectId": self.config.project_id,
|
|
463
|
+
"Region": self.config.region,
|
|
464
|
+
}
|
|
465
|
+
req and d.update(req)
|
|
466
|
+
d = apis.DescribeUK8SImageRequestSchema().dumps(d)
|
|
467
|
+
|
|
468
|
+
resp = self.invoke("DescribeUK8SImage", d, **kwargs)
|
|
469
|
+
return apis.DescribeUK8SImageResponseSchema().loads(resp)
|
|
470
|
+
|
|
471
|
+
def describe_uk8s_node(
|
|
472
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
473
|
+
) -> dict:
|
|
474
|
+
"""DescribeUK8SNode - 用于获取 UK8S 节点详情
|
|
475
|
+
|
|
476
|
+
**Request**
|
|
477
|
+
|
|
478
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
479
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
480
|
+
- **ClusterId** (str) - (Required) UK8S 集群 Id
|
|
481
|
+
- **Name** (str) - (Required) K8S 节点IP或者节点ID
|
|
482
|
+
|
|
483
|
+
**Response**
|
|
484
|
+
|
|
485
|
+
- **Action** (str) - 操作名称
|
|
486
|
+
- **AllocatedPodCount** (int) - 已分配到当前节点的 Pod 数量
|
|
487
|
+
- **Annotations** (list) - 字符串数组,每一项是类似 "node.alpha.kubernetes.io/ttl=0" 的注解
|
|
488
|
+
- **CPUCapacity** (str) - 节点 CPU 总量
|
|
489
|
+
- **CPULimits** (str) - 节点上已分配 Pod 的 CPU 限制值
|
|
490
|
+
- **CPULimitsFraction** (str) - 节点上已分配 Pod 的 CPU 限制值占 CPU 总量的比例
|
|
491
|
+
- **CPURequests** (str) - 节点上已分配 Pod 的 CPU 请求量
|
|
492
|
+
- **CPURequestsFraction** (str) - 节点上已分配 Pod 的 CPU 请求量占 CPU 总量的比例
|
|
493
|
+
- **Conditions** (list) - 见 **K8SNodeCondition** 模型定义
|
|
494
|
+
- **ContainerImages** (list) - 节点上镜像名称数组
|
|
495
|
+
- **ContainerRuntimeVersion** (str) - 容器运行时版本,如:"docker://18.9.9"
|
|
496
|
+
- **CreationTimestamp** (int) - 时间戳,单位是 秒
|
|
497
|
+
- **Hostname** (str) - 主机名
|
|
498
|
+
- **InternalIP** (str) - 内部 IP 地址
|
|
499
|
+
- **KernelVersion** (str) - 内核版本,如:"4.19.0-6.el7.ucloud.x86_64"
|
|
500
|
+
- **KubeProxyVersion** (str) - kubeproxy 版本
|
|
501
|
+
- **KubeletVersion** (str) - kubelet 版本
|
|
502
|
+
- **Labels** (list) - 字符串数组,每一项是类似 "kubernetes.io/arch=amd64" 的标签
|
|
503
|
+
- **MemoryCapacity** (str) - 节点内存总量
|
|
504
|
+
- **MemoryLimits** (str) - 节点上已分配 Pod 的内存限制量
|
|
505
|
+
- **MemoryLimitsFraction** (str) - 节点上已分配 Pod 的内存限制量占内存总量的比例,如返回值为 "18",则意味着限制量占总量的 18%
|
|
506
|
+
- **MemoryRequests** (str) - 节点上已分配 Pod 的内存请求量
|
|
507
|
+
- **MemoryRequestsFraction** (str) - 节点上已分配 Pod 的内存请求量占内存总量的比例,如返回值为 "4.5",则意味着请求量占总量的 4.5%
|
|
508
|
+
- **Message** (str) - 操作出错时的提示信息
|
|
509
|
+
- **Name** (str) - 节点名称
|
|
510
|
+
- **OSImage** (str) - 操作系统类型,如:"CentOS Linux 7 (Core)"
|
|
511
|
+
- **PodCapacity** (int) - 节点允许的可分配 Pod 最大数量
|
|
512
|
+
- **ProviderID** (str) - 字符串,如:"UCloud://cn-sh2-02//uk8s-vsc0vgob-n-mpzxc"
|
|
513
|
+
- **RetCode** (int) - 返回码
|
|
514
|
+
- **Taints** (list) - 字符串数组,每一项是类似 "node-role.kubernetes.io/master:NoSchedule" 的污点
|
|
515
|
+
- **Unschedulable** (bool) - 是否禁止调度
|
|
516
|
+
|
|
517
|
+
**Response Model**
|
|
518
|
+
|
|
519
|
+
**K8SNodeCondition**
|
|
520
|
+
- **LastProbeTime** (str) - 最后一次上报状态的时间
|
|
521
|
+
- **LastTransitionTime** (str) - 最后一次状态转变时间
|
|
522
|
+
- **Message** (str) - 状态变化的描述信息
|
|
523
|
+
- **Reason** (str) - 状态变化的原因
|
|
524
|
+
- **Status** (str) - 状态,False、True
|
|
525
|
+
- **Type** (str) - Condition 类型,如 MemoryPressure、DiskPressure、PIDPressure、Ready
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
"""
|
|
529
|
+
# build request
|
|
530
|
+
d = {
|
|
531
|
+
"ProjectId": self.config.project_id,
|
|
532
|
+
"Region": self.config.region,
|
|
533
|
+
}
|
|
534
|
+
req and d.update(req)
|
|
535
|
+
d = apis.DescribeUK8SNodeRequestSchema().dumps(d)
|
|
536
|
+
|
|
537
|
+
resp = self.invoke("DescribeUK8SNode", d, **kwargs)
|
|
538
|
+
return apis.DescribeUK8SNodeResponseSchema().loads(resp)
|
|
539
|
+
|
|
540
|
+
def list_uk8s_cluster_node_v2(
|
|
541
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
542
|
+
) -> dict:
|
|
543
|
+
"""ListUK8SClusterNodeV2 - 获取UK8S集群节点信息
|
|
544
|
+
|
|
545
|
+
**Request**
|
|
546
|
+
|
|
547
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
548
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
549
|
+
- **ClusterId** (str) - (Required) UK8S集群ID
|
|
550
|
+
|
|
551
|
+
**Response**
|
|
552
|
+
|
|
553
|
+
- **NodeSet** (list) - 见 **NodeInfoV2** 模型定义
|
|
554
|
+
- **TotalCount** (int) - 满足条件的节点数量,包括Master。
|
|
555
|
+
|
|
556
|
+
**Response Model**
|
|
557
|
+
|
|
558
|
+
**NodeInfoV2**
|
|
559
|
+
- **AsgId** (str) - 节点所属伸缩组ID,非伸缩组创建出来的节点,伸缩组ID为Default。
|
|
560
|
+
- **CPU** (int) - Node节点CPU核数,单位: 个。
|
|
561
|
+
- **CreateTime** (int) - 节点创建时间
|
|
562
|
+
- **ExpireTime** (int) - 节点计费到期时间
|
|
563
|
+
- **GPU** (int) - 节点的GPU颗数。
|
|
564
|
+
- **IPSet** (list) - 见 **UHostIPSet** 模型定义
|
|
565
|
+
- **InstanceId** (str) - 资源ID,如uhost-xxxx,或uphost-xxxxx。
|
|
566
|
+
- **InstanceName** (str) - 资源名称,初始值等于NodeId,用户可在UHost或UPHost处修改。
|
|
567
|
+
- **InstanceType** (str) - Node节点的资源类型,枚举值为UHost或UPHost。
|
|
568
|
+
- **KubeProxy** (dict) - 见 **KubeProxy** 模型定义
|
|
569
|
+
- **MachineType** (str) - 机型类别,分别对应Uhost的MachineType或PHost的PHostType。
|
|
570
|
+
- **Memory** (int) - 内存大小,单位: MB。
|
|
571
|
+
- **NodeId** (str) - NodeId,Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda
|
|
572
|
+
- **NodeLogInfo** (str) - 加节点时判断是否没有资源,如果返回NORESOURCE则代表没有资源了
|
|
573
|
+
- **NodeRole** (str) - node角色,枚举值为master、node
|
|
574
|
+
- **NodeStatus** (str) - Node的状态:枚举值:初始化:"Initializing";启动中:"Starting";运行:"Running";停止中:"Stopping";停止:"Stopped";待删除:"ToBeDeleted";删除中:"Deleting";异常:"Error";安装失败:"Install Fail";
|
|
575
|
+
- **OsName** (str) - Node节点的镜像名称。
|
|
576
|
+
- **OsType** (str) - Node节点的操作系统类别,如Linux或Windows。
|
|
577
|
+
- **Unschedulable** (bool) - 是否允许Pod调度到该节点,枚举值为true或false。
|
|
578
|
+
- **Zone** (str) - Node所在可用区
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
**UHostIPSet**
|
|
582
|
+
- **Bandwidth** (int) - IP对应的带宽, 单位: Mb (内网IP不显示带宽信息)
|
|
583
|
+
- **IP** (str) - IP地址
|
|
584
|
+
- **IPId** (str) - IP资源ID (内网IP无对应的资源ID)
|
|
585
|
+
- **Mac** (str) - Mac地址
|
|
586
|
+
- **SubnetId** (str) - IP地址对应的子网 ID
|
|
587
|
+
- **Type** (str) - 国际: Internation,BGP: Bgp,内网: Private
|
|
588
|
+
- **VPCId** (str) - IP地址对应的VPC ID
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
**KubeProxy**
|
|
592
|
+
- **Mode** (str) - KubeProxy模式,枚举值为[ipvs,iptables]
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
"""
|
|
596
|
+
# build request
|
|
597
|
+
d = {
|
|
598
|
+
"ProjectId": self.config.project_id,
|
|
599
|
+
"Region": self.config.region,
|
|
600
|
+
}
|
|
601
|
+
req and d.update(req)
|
|
602
|
+
d = apis.ListUK8SClusterNodeV2RequestSchema().dumps(d)
|
|
603
|
+
|
|
604
|
+
resp = self.invoke("ListUK8SClusterNodeV2", d, **kwargs)
|
|
605
|
+
return apis.ListUK8SClusterNodeV2ResponseSchema().loads(resp)
|
|
606
|
+
|
|
607
|
+
def list_uk8s_cluster_v2(
|
|
608
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
609
|
+
) -> dict:
|
|
610
|
+
"""ListUK8SClusterV2 - 获取UK8S集群列表信息
|
|
611
|
+
|
|
612
|
+
**Request**
|
|
613
|
+
|
|
614
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
615
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
616
|
+
- **ClusterId** (str) - UK8S集群ID
|
|
617
|
+
- **Limit** (int) - 返回数据长度,默认为20。
|
|
618
|
+
- **Offset** (int) - 列表起始位置偏移量,默认为0。
|
|
619
|
+
|
|
620
|
+
**Response**
|
|
621
|
+
|
|
622
|
+
- **ClusterCount** (int) - 满足条件的集群数量
|
|
623
|
+
- **ClusterSet** (list) - 见 **ClusterSet** 模型定义
|
|
624
|
+
|
|
625
|
+
**Response Model**
|
|
626
|
+
|
|
627
|
+
**ClusterSet**
|
|
628
|
+
- **ApiServer** (str) - 集群apiserver地址
|
|
629
|
+
- **ClusterId** (str) - 集群ID
|
|
630
|
+
- **ClusterLogInfo** (str) - 创建集群时判断如果为NORESOURCE则为没资源,否则为空
|
|
631
|
+
- **ClusterName** (str) - 资源名字
|
|
632
|
+
- **CreateTime** (int) - 创建时间
|
|
633
|
+
- **ExternalApiServer** (str) - 集群外部apiserver地址
|
|
634
|
+
- **K8sVersion** (str) - 集群版本
|
|
635
|
+
- **MasterCount** (int) - Master 节点数量
|
|
636
|
+
- **NodeCount** (int) - Node节点数量
|
|
637
|
+
- **PodCIDR** (str) - Pod网段
|
|
638
|
+
- **ServiceCIDR** (str) - 服务网段
|
|
639
|
+
- **Status** (str) - 集群状态,枚举值:初始化:"INITIALIZING";启动中:"STARTING";创建失败:"CREATEFAILED";正常运行:"RUNNING";添加节点:"ADDNODE";删除节点:"DELNODE";删除中:"DELETING";删除失败:"DELETEFAILED";错误:"ERROR";升级插件:"UPDATE_PLUGIN";更新插件信息:"UPDATE_PLUGIN_INFO";异常:"ABNORMAL";升级集群中:"UPGRADING";容器运行时切换:"CONVERTING"
|
|
640
|
+
- **SubnetId** (str) - 所属子网
|
|
641
|
+
- **VPCId** (str) - 所属VPC
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
"""
|
|
645
|
+
# build request
|
|
646
|
+
d = {
|
|
647
|
+
"ProjectId": self.config.project_id,
|
|
648
|
+
"Region": self.config.region,
|
|
649
|
+
}
|
|
650
|
+
req and d.update(req)
|
|
651
|
+
d = apis.ListUK8SClusterV2RequestSchema().dumps(d)
|
|
652
|
+
|
|
653
|
+
resp = self.invoke("ListUK8SClusterV2", d, **kwargs)
|
|
654
|
+
return apis.ListUK8SClusterV2ResponseSchema().loads(resp)
|
|
655
|
+
|
|
656
|
+
def list_uk8s_node_group(
|
|
657
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
658
|
+
) -> dict:
|
|
659
|
+
"""ListUK8SNodeGroup - 列出UK8S节点池
|
|
660
|
+
|
|
661
|
+
**Request**
|
|
662
|
+
|
|
663
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
664
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
665
|
+
- **ClusterId** (str) - (Required) 集群ID
|
|
666
|
+
|
|
667
|
+
**Response**
|
|
668
|
+
|
|
669
|
+
- **NodeGroupList** (list) - 见 **NodeGroupSet** 模型定义
|
|
670
|
+
|
|
671
|
+
**Response Model**
|
|
672
|
+
|
|
673
|
+
**NodeGroupSet**
|
|
674
|
+
- **BootDiskSize** (int) - 系统盘大小
|
|
675
|
+
- **BootDiskType** (str) - 系统盘类型
|
|
676
|
+
- **CPU** (int) - 虚拟CPU核数
|
|
677
|
+
- **ChargeType** (str) - 付费方式
|
|
678
|
+
- **DataDiskSize** (int) - 数据盘大小
|
|
679
|
+
- **DataDiskType** (str) - 数据盘类型
|
|
680
|
+
- **GPU** (int) - GPU卡核心数
|
|
681
|
+
- **GpuType** (str) - GPU类型
|
|
682
|
+
- **ImageId** (str) - 镜像ID
|
|
683
|
+
- **MachineType** (str) - 机型
|
|
684
|
+
- **Mem** (int) - 内存大小
|
|
685
|
+
- **MinimalCpuPlatform** (str) - cpu平台
|
|
686
|
+
- **NodeGroupId** (str) - 节点池ID
|
|
687
|
+
- **NodeGroupName** (str) - 节点池名字
|
|
688
|
+
- **NodeList** (list) - 节点id列表
|
|
689
|
+
- **Tag** (str) - 业务组
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
"""
|
|
693
|
+
# build request
|
|
694
|
+
d = {
|
|
695
|
+
"ProjectId": self.config.project_id,
|
|
696
|
+
"Region": self.config.region,
|
|
697
|
+
}
|
|
698
|
+
req and d.update(req)
|
|
699
|
+
d = apis.ListUK8SNodeGroupRequestSchema().dumps(d)
|
|
700
|
+
|
|
701
|
+
resp = self.invoke("ListUK8SNodeGroup", d, **kwargs)
|
|
702
|
+
return apis.ListUK8SNodeGroupResponseSchema().loads(resp)
|
|
703
|
+
|
|
704
|
+
def remove_uk8s_node_group(
|
|
705
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
706
|
+
) -> dict:
|
|
707
|
+
"""RemoveUK8SNodeGroup - 删除UK8S节点池
|
|
708
|
+
|
|
709
|
+
**Request**
|
|
710
|
+
|
|
711
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
712
|
+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
|
|
713
|
+
- **ClusterId** (str) - (Required) 集群id
|
|
714
|
+
- **NodeGroupId** (str) - (Required) 节点池Id
|
|
715
|
+
|
|
716
|
+
**Response**
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
"""
|
|
720
|
+
# build request
|
|
721
|
+
d = {
|
|
722
|
+
"ProjectId": self.config.project_id,
|
|
723
|
+
"Region": self.config.region,
|
|
724
|
+
}
|
|
725
|
+
req and d.update(req)
|
|
726
|
+
d = apis.RemoveUK8SNodeGroupRequestSchema().dumps(d)
|
|
727
|
+
|
|
728
|
+
resp = self.invoke("RemoveUK8SNodeGroup", d, **kwargs)
|
|
729
|
+
return apis.RemoveUK8SNodeGroupResponseSchema().loads(resp)
|