@@ -53,6 +53,51 @@ def add_uk8s_existing_uhost(
5353 resp = self .invoke ("AddUK8SExistingUHost" , d , ** kwargs )
5454 return apis .AddUK8SExistingUHostResponseSchema ().loads (resp )
5555
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+ - **BootDiskType** (str) - 磁盘类型
68+ - **CPU** (int) - GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关)
69+ - **ChargeType** (str) - 计费模式
70+ - **DataDiskSize** (int) - 数据磁盘大小
71+ - **DataDiskType** (str) - 磁盘类型
72+ - **GPU** (int) - GPU卡核心数
73+ - **GpuType** (str) - GPU类型
74+ - **ImageId** (str) - 镜像ID
75+ - **MachineType** (str) - 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考 `云主机机型说明 <https://docs.ucloud.cn/api/uhost-api/uhost_type>`_ 。
76+ - **Mem** (int) - 内存大小。单位:MB
77+ - **MinimalCpuPlatform** (str) - 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto"
78+ - **Tag** (str) - 业务组
79+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
80+
81+ **Response**
82+
83+ - **Message** (str) - 返回错误消息,当 RetCode 非 0 时提供详细的描述信息。
84+ - **NodeGroupId** (str) - 节点池ID
85+
86+ """
87+ # build request
88+ d = {
89+ "ProjectId" : self .config .project_id ,
90+ "Region" : self .config .region ,
91+ }
92+ req and d .update (req )
93+ d = apis .AddUK8SNodeGroupRequestSchema ().dumps (d )
94+
95+ # build options
96+ kwargs ["max_retries" ] = 0 # ignore retry when api is not idempotent
97+
98+ resp = self .invoke ("AddUK8SNodeGroup" , d , ** kwargs )
99+ return apis .AddUK8SNodeGroupResponseSchema ().loads (resp )
100+
56101 def add_uk8s_phost_node (
57102 self , req : typing .Optional [dict ] = None , ** kwargs
58103 ) -> dict :
@@ -320,6 +365,21 @@ def describe_uk8s_cluster(
320365
321366 **Response Model**
322367
368+ **UhostInfo**
369+ - **CPU** (int) - Cpu数量
370+ - **CreateTime** (int) - 创建时间
371+ - **DiskSet** (list) - 见 **DiskSet** 模型定义
372+ - **ExpireTime** (int) - 到期时间
373+ - **IPSet** (list) - 见 **IPSet** 模型定义
374+ - **Memory** (int) - 内存
375+ - **Name** (str) - 主机名称
376+ - **NodeId** (str) - 主机ID
377+ - **NodeType** (str) - 节点类型:uhost表示云主机;uphost表示物理云主机
378+ - **OsName** (str) - 镜像信息
379+ - **State** (str) - 主机状态
380+ - **Zone** (str) - 所在机房
381+
382+
323383 **DiskSet**
324384 - **BackupType** (str) - 备份方案,枚举类型:BASIC_SNAPSHOT,普通快照;DATAARK,方舟。无快照则不返回该字段。
325385 - **DiskId** (str) - 磁盘长ID
@@ -341,21 +401,6 @@ def describe_uk8s_cluster(
341401 - **Type** (str) - 国际: Internation,BGP: Bgp,内网: Private
342402
343403
344- **UhostInfo**
345- - **CPU** (int) - Cpu数量
346- - **CreateTime** (int) - 创建时间
347- - **DiskSet** (list) - 见 **DiskSet** 模型定义
348- - **ExpireTime** (int) - 到期时间
349- - **IPSet** (list) - 见 **IPSet** 模型定义
350- - **Memory** (int) - 内存
351- - **Name** (str) - 主机名称
352- - **NodeId** (str) - 主机ID
353- - **NodeType** (str) - 节点类型:uhost表示云主机;uphost表示物理云主机
354- - **OsName** (str) - 镜像信息
355- - **State** (str) - 主机状态
356- - **Zone** (str) - 所在机房
357-
358-
359404 """
360405 # build request
361406 d = {
@@ -590,3 +635,79 @@ def list_uk8s_cluster_v2(
590635
591636 resp = self .invoke ("ListUK8SClusterV2" , d , ** kwargs )
592637 return apis .ListUK8SClusterV2ResponseSchema ().loads (resp )
638+
639+ def list_uk8s_node_group (
640+ self , req : typing .Optional [dict ] = None , ** kwargs
641+ ) -> dict :
642+ """ListUK8SNodeGroup - 列出UK8S节点池
643+
644+ **Request**
645+
646+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
647+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
648+ - **ClusterId** (str) - (Required) 集群ID
649+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
650+
651+ **Response**
652+
653+ - **NodeGroupList** (list) - 见 **NodeGroupSet** 模型定义
654+
655+ **Response Model**
656+
657+ **NodeGroupSet**
658+ - **BootDiskType** (str) - 系统盘类型
659+ - **CPU** (int) - 虚拟CPU核数
660+ - **ChargeType** (str) - 付费方式
661+ - **DataDiskSize** (int) - 数据盘大小
662+ - **DataDiskType** (str) - 数据盘类型
663+ - **GPU** (int) - GPU卡核心数
664+ - **GpuType** (str) - GPU类型
665+ - **ImageId** (str) - 镜像ID
666+ - **MachineType** (str) - 机型
667+ - **Mem** (int) - 内存大小
668+ - **MinimalCpuPlatform** (str) - cpu平台
669+ - **NodeGroupId** (str) - 节点池ID
670+ - **NodeGroupName** (str) - 节点池名字
671+ - **NodeList** (list) - 节点id列表
672+ - **Tag** (str) - 业务组
673+
674+
675+ """
676+ # build request
677+ d = {
678+ "ProjectId" : self .config .project_id ,
679+ "Region" : self .config .region ,
680+ }
681+ req and d .update (req )
682+ d = apis .ListUK8SNodeGroupRequestSchema ().dumps (d )
683+
684+ resp = self .invoke ("ListUK8SNodeGroup" , d , ** kwargs )
685+ return apis .ListUK8SNodeGroupResponseSchema ().loads (resp )
686+
687+ def remove_uk8s_node_group (
688+ self , req : typing .Optional [dict ] = None , ** kwargs
689+ ) -> dict :
690+ """RemoveUK8SNodeGroup - 删除UK8S节点池
691+
692+ **Request**
693+
694+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
695+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
696+ - **ClusterId** (str) - (Required) 集群id
697+ - **NodeGroupId** (str) - (Required) 节点池Id
698+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
699+
700+ **Response**
701+
702+
703+ """
704+ # build request
705+ d = {
706+ "ProjectId" : self .config .project_id ,
707+ "Region" : self .config .region ,
708+ }
709+ req and d .update (req )
710+ d = apis .RemoveUK8SNodeGroupRequestSchema ().dumps (d )
711+
712+ resp = self .invoke ("RemoveUK8SNodeGroup" , d , ** kwargs )
713+ return apis .RemoveUK8SNodeGroupResponseSchema ().loads (resp )
0 commit comments