diff --git a/VERSION b/VERSION index dfdc3688..0c4b4549 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.21 +0.3.22 diff --git a/src/UK8S/Apis/AddUK8SExistingUHostRequest.php b/src/UK8S/Apis/AddUK8SExistingUHostRequest.php index a9313f13..8b8c409d 100644 --- a/src/UK8S/Apis/AddUK8SExistingUHostRequest.php +++ b/src/UK8S/Apis/AddUK8SExistingUHostRequest.php @@ -1,6 +1,6 @@ set("ChargeType", $chargeType); } + + /** + * BootDiskSize: 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 + * + * @return integer|null + */ + public function getBootDiskSize() + { + return $this->get("BootDiskSize"); + } + + /** + * BootDiskSize: 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 + * + * @param int $bootDiskSize + */ + public function setBootDiskSize($bootDiskSize) + { + $this->set("BootDiskSize", $bootDiskSize); + } + + /** + * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } } diff --git a/src/UK8S/Apis/AddUK8SNodeGroupResponse.php b/src/UK8S/Apis/AddUK8SNodeGroupResponse.php index 2047c4fd..4514c684 100644 --- a/src/UK8S/Apis/AddUK8SNodeGroupResponse.php +++ b/src/UK8S/Apis/AddUK8SNodeGroupResponse.php @@ -1,6 +1,6 @@ set("BootDiskType", $bootDiskType); } + /** + * BootDiskSize: 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 + * + * @return integer|null + */ + public function getBootDiskSize() + { + return $this->get("BootDiskSize"); + } + + /** + * BootDiskSize: 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 + * + * @param int $bootDiskSize + */ + public function setBootDiskSize($bootDiskSize) + { + $this->set("BootDiskSize", $bootDiskSize); + } + /** * DataDiskType: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 * @@ -315,26 +338,6 @@ public function setMachineType($machineType) $this->set("MachineType", $machineType); } - /** - * MinmalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" - * - * @return string|null - */ - public function getMinmalCpuPlatform() - { - return $this->get("MinmalCpuPlatform"); - } - - /** - * MinmalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" - * - * @param string $minmalCpuPlatform - */ - public function setMinmalCpuPlatform($minmalCpuPlatform) - { - $this->set("MinmalCpuPlatform", $minmalCpuPlatform); - } - /** * GpuType: GPU类型,枚举值["K80", "P40", "V100",],MachineType为G时必填 * @@ -534,4 +537,268 @@ public function setInitScript($initScript) { $this->set("InitScript", $initScript); } + + /** + * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + * + * @return string|null + */ + public function getMinimalCpuPlatform() + { + return $this->get("MinimalCpuPlatform"); + } + + /** + * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + * + * @param string $minimalCpuPlatform + */ + public function setMinimalCpuPlatform($minimalCpuPlatform) + { + $this->set("MinimalCpuPlatform", $minimalCpuPlatform); + } + + /** + * Taints: Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * + * @return string|null + */ + public function getTaints() + { + return $this->get("Taints"); + } + + /** + * Taints: Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * + * @param string $taints + */ + public function setTaints($taints) + { + $this->set("Taints", $taints); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * NodeGroupId: 节点池id + * + * @return string|null + */ + public function getNodeGroupId() + { + return $this->get("NodeGroupId"); + } + + /** + * NodeGroupId: 节点池id + * + * @param string $nodeGroupId + */ + public function setNodeGroupId($nodeGroupId) + { + $this->set("NodeGroupId", $nodeGroupId); + } + + /** + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * + * @return string|null + */ + public function getSecurityMode() + { + return $this->get("SecurityMode"); + } + + /** + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * + * @param string $securityMode + */ + public function setSecurityMode($securityMode) + { + $this->set("SecurityMode", $securityMode); + } + + /** + * NamePrefix: 自定义主机名前缀。完整的自定义主机名为{NamePrefix}-{NodeIP}。 + * + * @return string|null + */ + public function getNamePrefix() + { + return $this->get("NamePrefix"); + } + + /** + * NamePrefix: 自定义主机名前缀。完整的自定义主机名为{NamePrefix}-{NodeIP}。 + * + * @param string $namePrefix + */ + public function setNamePrefix($namePrefix) + { + $this->set("NamePrefix", $namePrefix); + } + + /** + * NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0;Extreme,开启网络增强3.0; Infiniband, 开启网络增强4.0(详情参考主机官网文档) + * + * @return string|null + */ + public function getNetCapability() + { + return $this->get("NetCapability"); + } + + /** + * NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0;Extreme,开启网络增强3.0; Infiniband, 开启网络增强4.0(详情参考主机官网文档) + * + * @param string $netCapability + */ + public function setNetCapability($netCapability) + { + $this->set("NetCapability", $netCapability); + } + + /** + * UNIFeature: 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。 + * + * @return boolean|null + */ + public function getUNIFeature() + { + return $this->get("UNIFeature"); + } + + /** + * UNIFeature: 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。 + * + * @param boolean $uniFeature + */ + public function setUNIFeature($uniFeature) + { + $this->set("UNIFeature", $uniFeature); + } + + /** + * NetworkInterface: + * + * @return AddUK8SUHostNodeParamNetworkInterface[]|null + */ + public function getNetworkInterface() + { + $items = $this->get("NetworkInterface"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AddUK8SUHostNodeParamNetworkInterface($item)); + } + return $result; + } + + /** + * NetworkInterface: + * + * @param AddUK8SUHostNodeParamNetworkInterface[] $networkInterface + */ + public function setNetworkInterface(array $networkInterface) + { + $result = []; + foreach ($networkInterface as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @return string|null + */ + public function getSecurityGroupId() + { + return $this->get("SecurityGroupId"); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @param string $securityGroupId + */ + public function setSecurityGroupId($securityGroupId) + { + $this->set("SecurityGroupId", $securityGroupId); + } + + /** + * SecGroupId: + * + * @return AddUK8SUHostNodeParamSecGroupId[]|null + */ + public function getSecGroupId() + { + $items = $this->get("SecGroupId"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AddUK8SUHostNodeParamSecGroupId($item)); + } + return $result; + } + + /** + * SecGroupId: + * + * @param AddUK8SUHostNodeParamSecGroupId[] $secGroupId + */ + public function setSecGroupId(array $secGroupId) + { + $result = []; + foreach ($secGroupId as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * UserLabels: UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @return string|null + */ + public function getUserLabels() + { + return $this->get("UserLabels"); + } + + /** + * UserLabels: UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @param string $userLabels + */ + public function setUserLabels($userLabels) + { + $this->set("UserLabels", $userLabels); + } } diff --git a/src/UK8S/Apis/AddUK8SUHostNodeResponse.php b/src/UK8S/Apis/AddUK8SUHostNodeResponse.php index 6c61260c..388620bc 100644 --- a/src/UK8S/Apis/AddUK8SUHostNodeResponse.php +++ b/src/UK8S/Apis/AddUK8SUHostNodeResponse.php @@ -1,6 +1,6 @@ get("MasterDataDiskType"); + return $this->get("MasterBootDiskSize"); } /** - * MasterDataDiskType: Master节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * MasterBootDiskSize: Master节点系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。 * - * @param string $masterDataDiskType + * @param int $masterBootDiskSize */ - public function setMasterDataDiskType($masterDataDiskType) + public function setMasterBootDiskSize($masterBootDiskSize) { - $this->set("MasterDataDiskType", $masterDataDiskType); + $this->set("MasterBootDiskSize", $masterBootDiskSize); } /** - * MasterMinmalCpuPlatform: Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * MasterDataDiskType: Master节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 * * @return string|null */ - public function getMasterMinmalCpuPlatform() + public function getMasterDataDiskType() { - return $this->get("MasterMinmalCpuPlatform"); + return $this->get("MasterDataDiskType"); } /** - * MasterMinmalCpuPlatform: Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * MasterDataDiskType: Master节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 * - * @param string $masterMinmalCpuPlatform + * @param string $masterDataDiskType */ - public function setMasterMinmalCpuPlatform($masterMinmalCpuPlatform) + public function setMasterDataDiskType($masterDataDiskType) { - $this->set("MasterMinmalCpuPlatform", $masterMinmalCpuPlatform); + $this->set("MasterDataDiskType", $masterDataDiskType); } /** @@ -563,4 +567,144 @@ public function setInitScript($initScript) { $this->set("InitScript", $initScript); } + + /** + * MasterMinimalCpuPlatform: Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * + * @return string|null + */ + public function getMasterMinimalCpuPlatform() + { + return $this->get("MasterMinimalCpuPlatform"); + } + + /** + * MasterMinimalCpuPlatform: Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * + * @param string $masterMinimalCpuPlatform + */ + public function setMasterMinimalCpuPlatform($masterMinimalCpuPlatform) + { + $this->set("MasterMinimalCpuPlatform", $masterMinimalCpuPlatform); + } + + /** + * ClusterDomain: 创建集群的时候定义clusterdomain + * + * @return string|null + */ + public function getClusterDomain() + { + return $this->get("ClusterDomain"); + } + + /** + * ClusterDomain: 创建集群的时候定义clusterdomain + * + * @param string $clusterDomain + */ + public function setClusterDomain($clusterDomain) + { + $this->set("ClusterDomain", $clusterDomain); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * MasterImageId: Master节点的镜像 ID,不填则使用ImageId参数。支持用户自定义镜像。 + * + * @return string|null + */ + public function getMasterImageId() + { + return $this->get("MasterImageId"); + } + + /** + * MasterImageId: Master节点的镜像 ID,不填则使用ImageId参数。支持用户自定义镜像。 + * + * @param string $masterImageId + */ + public function setMasterImageId($masterImageId) + { + $this->set("MasterImageId", $masterImageId); + } + + /** + * LbClass: master lb 类型默认ulb,可选ulb nlb + * + * @return string|null + */ + public function getLbClass() + { + return $this->get("LbClass"); + } + + /** + * LbClass: master lb 类型默认ulb,可选ulb nlb + * + * @param string $lbClass + */ + public function setLbClass($lbClass) + { + $this->set("LbClass", $lbClass); + } + + /** + * ForwardSrcIPMethod: LbClass为nlb的时候支持的源ip转发模式,目前只支持Toa,为空则不开源ip功能 枚举:"",Toa + * + * @return string|null + */ + public function getForwardSrcIPMethod() + { + return $this->get("ForwardSrcIPMethod"); + } + + /** + * ForwardSrcIPMethod: LbClass为nlb的时候支持的源ip转发模式,目前只支持Toa,为空则不开源ip功能 枚举:"",Toa + * + * @param string $forwardSrcIPMethod + */ + public function setForwardSrcIPMethod($forwardSrcIPMethod) + { + $this->set("ForwardSrcIPMethod", $forwardSrcIPMethod); + } + + /** + * UserLabels: UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @return string|null + */ + public function getUserLabels() + { + return $this->get("UserLabels"); + } + + /** + * UserLabels: UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @param string $userLabels + */ + public function setUserLabels($userLabels) + { + $this->set("UserLabels", $userLabels); + } } diff --git a/src/UK8S/Apis/CreateUK8SClusterV2Response.php b/src/UK8S/Apis/CreateUK8SClusterV2Response.php index 29ffa253..ae310526 100644 --- a/src/UK8S/Apis/CreateUK8SClusterV2Response.php +++ b/src/UK8S/Apis/CreateUK8SClusterV2Response.php @@ -1,6 +1,6 @@ "GetClusterConfig"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * ProjectId: 所在项目 + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 所在项目 + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Region: 所在区域 + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 所在区域 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UK8S/Apis/GetClusterConfigResponse.php b/src/UK8S/Apis/GetClusterConfigResponse.php new file mode 100644 index 00000000..873fbe76 --- /dev/null +++ b/src/UK8S/Apis/GetClusterConfigResponse.php @@ -0,0 +1,84 @@ +get("KubeConfig"); + } + + /** + * KubeConfig: 配置信息 + * + * @param string $kubeConfig + */ + public function setKubeConfig($kubeConfig) + { + $this->set("KubeConfig", $kubeConfig); + } + + /** + * ExternalKubeConfig: 开启公网apiserver的情况下,有数据返回。 + * + * @return string|null + */ + public function getExternalKubeConfig() + { + return $this->get("ExternalKubeConfig"); + } + + /** + * ExternalKubeConfig: 开启公网apiserver的情况下,有数据返回。 + * + * @param string $externalKubeConfig + */ + public function setExternalKubeConfig($externalKubeConfig) + { + $this->set("ExternalKubeConfig", $externalKubeConfig); + } + + /** + * Updatable: 用于标示 kubeconfig 是否可以进行替换更新 + * + * @return boolean|null + */ + public function getUpdatable() + { + return $this->get("Updatable"); + } + + /** + * Updatable: 用于标示 kubeconfig 是否可以进行替换更新 + * + * @param boolean $updatable + */ + public function setUpdatable($updatable) + { + $this->set("Updatable", $updatable); + } +} diff --git a/src/UK8S/Apis/GetUK8SVersionsRequest.php b/src/UK8S/Apis/GetUK8SVersionsRequest.php new file mode 100644 index 00000000..5dc35c98 --- /dev/null +++ b/src/UK8S/Apis/GetUK8SVersionsRequest.php @@ -0,0 +1,92 @@ + "GetUK8SVersions"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("Kind"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Kind: 集群类型,可选值为[Dedicated] + * + * @return string|null + */ + public function getKind() + { + return $this->get("Kind"); + } + + /** + * Kind: 集群类型,可选值为[Dedicated] + * + * @param string $kind + */ + public function setKind($kind) + { + $this->set("Kind", $kind); + } +} diff --git a/src/UK8S/Apis/GetUK8SVersionsResponse.php b/src/UK8S/Apis/GetUK8SVersionsResponse.php new file mode 100644 index 00000000..6b89006e --- /dev/null +++ b/src/UK8S/Apis/GetUK8SVersionsResponse.php @@ -0,0 +1,57 @@ +get("Data"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UK8SVersionData($item)); + } + return $result; + } + + /** + * Data: UK8S 版本信息列表。 + * + * @param UK8SVersionData[] $data + */ + public function setData(array $data) + { + $result = []; + foreach ($data as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Apis/ListUK8SClusterNodeV2Request.php b/src/UK8S/Apis/ListUK8SClusterNodeV2Request.php index e7c57e3d..fb5cfd70 100644 --- a/src/UK8S/Apis/ListUK8SClusterNodeV2Request.php +++ b/src/UK8S/Apis/ListUK8SClusterNodeV2Request.php @@ -1,6 +1,6 @@ get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + /** * NodeGroupId: 节点池ID * @@ -222,6 +242,26 @@ public function setBootDiskType($bootDiskType) $this->set("BootDiskType", $bootDiskType); } + /** + * BootDiskSize: 系统盘大小 + * + * @return integer|null + */ + public function getBootDiskSize() + { + return $this->get("BootDiskSize"); + } + + /** + * BootDiskSize: 系统盘大小 + * + * @param int $bootDiskSize + */ + public function setBootDiskSize($bootDiskSize) + { + $this->set("BootDiskSize", $bootDiskSize); + } + /** * DataDiskSize: 数据盘大小 * @@ -321,4 +361,144 @@ public function setNodeList(array $nodeList) { $this->set("NodeList", $nodeList); } + + /** + * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * IsolationGroupId: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @return string|null + */ + public function getIsolationGroupId() + { + return $this->get("IsolationGroupId"); + } + + /** + * IsolationGroupId: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @param string $isolationGroupId + */ + public function setIsolationGroupId($isolationGroupId) + { + $this->set("IsolationGroupId", $isolationGroupId); + } + + /** + * MaxPods: int默认110,生产环境建议小于等于110。 + * + * @return string|null + */ + public function getMaxPods() + { + return $this->get("MaxPods"); + } + + /** + * MaxPods: int默认110,生产环境建议小于等于110。 + * + * @param string $maxPods + */ + public function setMaxPods($maxPods) + { + $this->set("MaxPods", $maxPods); + } + + /** + * UserData: 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * + * @return string|null + */ + public function getUserData() + { + return $this->get("UserData"); + } + + /** + * UserData: 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * + * @param string $userData + */ + public function setUserData($userData) + { + $this->set("UserData", $userData); + } + + /** + * InitScript: 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * + * @return string|null + */ + public function getInitScript() + { + return $this->get("InitScript"); + } + + /** + * InitScript: 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * + * @param string $initScript + */ + public function setInitScript($initScript) + { + $this->set("InitScript", $initScript); + } + + /** + * Taints: Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * + * @return string|null + */ + public function getTaints() + { + return $this->get("Taints"); + } + + /** + * Taints: Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * + * @param string $taints + */ + public function setTaints($taints) + { + $this->set("Taints", $taints); + } + + /** + * Labels: Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @return string|null + */ + public function getLabels() + { + return $this->get("Labels"); + } + + /** + * Labels: Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @param string $labels + */ + public function setLabels($labels) + { + $this->set("Labels", $labels); + } } diff --git a/src/UK8S/Models/NodeInfoV2.php b/src/UK8S/Models/NodeInfoV2.php index b084e40e..1c8886c1 100644 --- a/src/UK8S/Models/NodeInfoV2.php +++ b/src/UK8S/Models/NodeInfoV2.php @@ -1,6 +1,6 @@ get("K8sVersion"); + } + + /** + * K8sVersion: K8S 版本 + * + * @param string $k8sVersion + */ + public function setK8sVersion($k8sVersion) + { + $this->set("K8sVersion", $k8sVersion); + } + + /** + * ContainerdVersion: Containerd 版本 + * + * @return string|null + */ + public function getContainerdVersion() + { + return $this->get("ContainerdVersion"); + } + + /** + * ContainerdVersion: Containerd 版本 + * + * @param string $containerdVersion + */ + public function setContainerdVersion($containerdVersion) + { + $this->set("ContainerdVersion", $containerdVersion); + } +} diff --git a/src/UK8S/Models/UhostInfo.php b/src/UK8S/Models/UhostInfo.php index 57b3f2f8..c3655e11 100644 --- a/src/UK8S/Models/UhostInfo.php +++ b/src/UK8S/Models/UhostInfo.php @@ -1,6 +1,6 @@ get("EIP")); + } + + /** + * EIP: + * + * @param AddUK8SUHostNodeParamNetworkInterfaceEIP $eip + */ + public function setEIP(array $eip) + { + $this->set("EIP", $eip->getAll()); + } +} diff --git a/src/UK8S/Params/AddUK8SUHostNodeParamNetworkInterfaceEIP.php b/src/UK8S/Params/AddUK8SUHostNodeParamNetworkInterfaceEIP.php new file mode 100644 index 00000000..7f50a605 --- /dev/null +++ b/src/UK8S/Params/AddUK8SUHostNodeParamNetworkInterfaceEIP.php @@ -0,0 +1,124 @@ +get("Bandwidth"); + } + + /** + * Bandwidth: 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + * + * @param int $bandwidth + */ + public function setBandwidth($bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * + * @return string|null + */ + public function getPayMode() + { + return $this->get("PayMode"); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * + * @param string $payMode + */ + public function setPayMode($payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @return string|null + */ + public function getShareBandwidthId() + { + return $this->get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId($shareBandwidthId) + { + $this->set("ShareBandwidthId", $shareBandwidthId); + } + + /** + * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * + * @return string|null + */ + public function getOperatorName() + { + return $this->get("OperatorName"); + } + + /** + * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * + * @param string $operatorName + */ + public function setOperatorName($operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * CouponId: 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UK8S/Params/AddUK8SUHostNodeParamSecGroupId.php b/src/UK8S/Params/AddUK8SUHostNodeParamSecGroupId.php new file mode 100644 index 00000000..ce299337 --- /dev/null +++ b/src/UK8S/Params/AddUK8SUHostNodeParamSecGroupId.php @@ -0,0 +1,84 @@ +get("Id"); + } + + /** + * Id: 安全组 ID。至多可以同时绑定5个安全组。 + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @return string|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @param string $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } + + /** + * Name: 安全组名称。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 安全组名称。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } +} diff --git a/src/UK8S/Params/CreateUK8SClusterV2ParamKubeProxy.php b/src/UK8S/Params/CreateUK8SClusterV2ParamKubeProxy.php index 3fa6a636..232d0d47 100644 --- a/src/UK8S/Params/CreateUK8SClusterV2ParamKubeProxy.php +++ b/src/UK8S/Params/CreateUK8SClusterV2ParamKubeProxy.php @@ -1,6 +1,6 @@ set("Zone", $zone); } + + /** + * SecGroupId: + * + * @return CreateUK8SClusterV2ParamMasterSecGroupId[]|null + */ + public function getSecGroupId() + { + $items = $this->get("SecGroupId"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUK8SClusterV2ParamMasterSecGroupId($item)); + } + return $result; + } + + /** + * SecGroupId: + * + * @param CreateUK8SClusterV2ParamMasterSecGroupId[] $secGroupId + */ + public function setSecGroupId(array $secGroupId) + { + $result = []; + foreach ($secGroupId as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } } diff --git a/src/UK8S/Params/CreateUK8SClusterV2ParamMasterSecGroupId.php b/src/UK8S/Params/CreateUK8SClusterV2ParamMasterSecGroupId.php new file mode 100644 index 00000000..f7787137 --- /dev/null +++ b/src/UK8S/Params/CreateUK8SClusterV2ParamMasterSecGroupId.php @@ -0,0 +1,84 @@ +get("Id"); + } + + /** + * Id: 安全组 ID。至多可以同时绑定5个安全组。 + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @return string|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @param string $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } + + /** + * Name: 安全组名称。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 安全组名称。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } +} diff --git a/src/UK8S/Params/CreateUK8SClusterV2ParamNodes.php b/src/UK8S/Params/CreateUK8SClusterV2ParamNodes.php index 92ef6025..7eea8ab4 100644 --- a/src/UK8S/Params/CreateUK8SClusterV2ParamNodes.php +++ b/src/UK8S/Params/CreateUK8SClusterV2ParamNodes.php @@ -1,6 +1,6 @@ get("DataDiskType"); + return $this->get("BootDiskSIze"); } /** - * DataDiskType: 一组Node节点的数据盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * BootDiskSIze: Node节点的系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。 * - * @param string $dataDiskType + * @param int $bootDiskSIze */ - public function setDataDiskType($dataDiskType) + public function setBootDiskSIze($bootDiskSIze) { - $this->set("DataDiskType", $dataDiskType); + $this->set("BootDiskSIze", $bootDiskSIze); } /** - * MinmalCpuPlatform: Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * DataDiskType: 一组Node节点的数据盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 * * @return string|null */ - public function getMinmalCpuPlatform() + public function getDataDiskType() { - return $this->get("MinmalCpuPlatform"); + return $this->get("DataDiskType"); } /** - * MinmalCpuPlatform: Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * DataDiskType: 一组Node节点的数据盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 * - * @param string $minmalCpuPlatform + * @param string $dataDiskType */ - public function setMinmalCpuPlatform($minmalCpuPlatform) + public function setDataDiskType($dataDiskType) { - $this->set("MinmalCpuPlatform", $minmalCpuPlatform); + $this->set("DataDiskType", $dataDiskType); } /** @@ -301,4 +301,208 @@ public function setDataDiskSize($dataDiskSize) { $this->set("DataDiskSize", $dataDiskSize); } + + /** + * MinimalCpuPlatform: Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * + * @return string|null + */ + public function getMinimalCpuPlatform() + { + return $this->get("MinimalCpuPlatform"); + } + + /** + * MinimalCpuPlatform: Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * + * @param string $minimalCpuPlatform + */ + public function setMinimalCpuPlatform($minimalCpuPlatform) + { + $this->set("MinimalCpuPlatform", $minimalCpuPlatform); + } + + /** + * Taints: Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * + * @return string|null + */ + public function getTaints() + { + return $this->get("Taints"); + } + + /** + * Taints: Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * + * @param string $taints + */ + public function setTaints($taints) + { + $this->set("Taints", $taints); + } + + /** + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * + * @return string|null + */ + public function getSecurityMode() + { + return $this->get("SecurityMode"); + } + + /** + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * + * @param string $securityMode + */ + public function setSecurityMode($securityMode) + { + $this->set("SecurityMode", $securityMode); + } + + /** + * NamePrefix: 一组Node的自定义主机名前缀。 完整的自定义主机名为{NamePrefix}-{NodeIP}。 + * + * @return string|null + */ + public function getNamePrefix() + { + return $this->get("NamePrefix"); + } + + /** + * NamePrefix: 一组Node的自定义主机名前缀。 完整的自定义主机名为{NamePrefix}-{NodeIP}。 + * + * @param string $namePrefix + */ + public function setNamePrefix($namePrefix) + { + $this->set("NamePrefix", $namePrefix); + } + + /** + * ImageId: Node节点的镜像 ID,不填则使用ImageId参数。支持用户自定义镜像。 + * + * @return string|null + */ + public function getImageId() + { + return $this->get("ImageId"); + } + + /** + * ImageId: Node节点的镜像 ID,不填则使用ImageId参数。支持用户自定义镜像。 + * + * @param string $imageId + */ + public function setImageId($imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * UNIFeature: 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。 + * + * @return string|null + */ + public function getUNIFeature() + { + return $this->get("UNIFeature"); + } + + /** + * UNIFeature: 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。 + * + * @param string $uniFeature + */ + public function setUNIFeature($uniFeature) + { + $this->set("UNIFeature", $uniFeature); + } + + /** + * NetworkInterface: + * + * @return CreateUK8SClusterV2ParamNodesNetworkInterface[]|null + */ + public function getNetworkInterface() + { + $items = $this->get("NetworkInterface"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUK8SClusterV2ParamNodesNetworkInterface($item)); + } + return $result; + } + + /** + * NetworkInterface: + * + * @param CreateUK8SClusterV2ParamNodesNetworkInterface[] $networkInterface + */ + public function setNetworkInterface(array $networkInterface) + { + $result = []; + foreach ($networkInterface as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @return string|null + */ + public function getSecurityGroupId() + { + return $this->get("SecurityGroupId"); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @param string $securityGroupId + */ + public function setSecurityGroupId($securityGroupId) + { + $this->set("SecurityGroupId", $securityGroupId); + } + + /** + * SecGroupId: + * + * @return CreateUK8SClusterV2ParamNodesSecGroupId[]|null + */ + public function getSecGroupId() + { + $items = $this->get("SecGroupId"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUK8SClusterV2ParamNodesSecGroupId($item)); + } + return $result; + } + + /** + * SecGroupId: + * + * @param CreateUK8SClusterV2ParamNodesSecGroupId[] $secGroupId + */ + public function setSecGroupId(array $secGroupId) + { + $result = []; + foreach ($secGroupId as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } } diff --git a/src/UK8S/Params/CreateUK8SClusterV2ParamNodesNetworkInterface.php b/src/UK8S/Params/CreateUK8SClusterV2ParamNodesNetworkInterface.php new file mode 100644 index 00000000..881b96a0 --- /dev/null +++ b/src/UK8S/Params/CreateUK8SClusterV2ParamNodesNetworkInterface.php @@ -0,0 +1,44 @@ +get("EIP")); + } + + /** + * EIP: + * + * @param CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP $eip + */ + public function setEIP(array $eip) + { + $this->set("EIP", $eip->getAll()); + } +} diff --git a/src/UK8S/Params/CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP.php b/src/UK8S/Params/CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP.php new file mode 100644 index 00000000..fdd2189f --- /dev/null +++ b/src/UK8S/Params/CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP.php @@ -0,0 +1,124 @@ +get("Bandwidth"); + } + + /** + * Bandwidth: 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + * + * @param int $bandwidth + */ + public function setBandwidth($bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * + * @return string|null + */ + public function getPayMode() + { + return $this->get("PayMode"); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * + * @param string $payMode + */ + public function setPayMode($payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @return string|null + */ + public function getShareBandwidthId() + { + return $this->get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId($shareBandwidthId) + { + $this->set("ShareBandwidthId", $shareBandwidthId); + } + + /** + * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * + * @return string|null + */ + public function getOperatorName() + { + return $this->get("OperatorName"); + } + + /** + * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * + * @param string $operatorName + */ + public function setOperatorName($operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * CouponId: 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UK8S/Params/CreateUK8SClusterV2ParamNodesSecGroupId.php b/src/UK8S/Params/CreateUK8SClusterV2ParamNodesSecGroupId.php new file mode 100644 index 00000000..6a693277 --- /dev/null +++ b/src/UK8S/Params/CreateUK8SClusterV2ParamNodesSecGroupId.php @@ -0,0 +1,84 @@ +get("Id"); + } + + /** + * Id: 安全组 ID。至多可以同时绑定5个安全组。 + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @return string|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @param string $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } + + /** + * Name: 安全组名称。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 安全组名称。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } +} diff --git a/src/UK8S/UK8SClient.php b/src/UK8S/UK8SClient.php index 21b02f5d..0600483d 100644 --- a/src/UK8S/UK8SClient.php +++ b/src/UK8S/UK8SClient.php @@ -1,6 +1,6 @@ (string) 磁盘类型 * "Tag" => (string) 业务组 * "ChargeType" => (string) 计费模式 + * "BootDiskSize" => (integer) 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 + * "SubnetId" => (string) 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 * ] * * Outputs: @@ -191,11 +197,11 @@ public function addUK8SPHostNode(AddUK8SPHostNodeRequest $request = null) * "Mem" => (integer) 内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ 默认为月付 * "BootDiskType" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "BootDiskSize" => (integer) 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 * "DataDiskType" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 * "DataDiskSize" => (integer) 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] * "Quantity" => (integer) 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 * "MachineType" => (string) 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 - * "MinmalCpuPlatform" => (string) 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" * "GpuType" => (string) GPU类型,枚举值["K80", "P40", "V100",],MachineType为G时必填 * "GPU" => (integer) GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) * "Labels" => (string) Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game @@ -206,6 +212,34 @@ public function addUK8SPHostNode(AddUK8SPHostNodeRequest $request = null) * "DisableSchedule" => (boolean) 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 * "UserData" => (string) 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 * "InitScript" => (string) 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * "MinimalCpuPlatform" => (string) 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + * "Taints" => (string) Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * "Tag" => (string) 业务组 + * "NodeGroupId" => (string) 节点池id + * "SecurityMode" => (string) 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * "NamePrefix" => (string) 自定义主机名前缀。完整的自定义主机名为{NamePrefix}-{NodeIP}。 + * "NetCapability" => (string) 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0;Extreme,开启网络增强3.0; Infiniband, 开启网络增强4.0(详情参考主机官网文档) + * "UNIFeature" => (boolean) 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。 + * "NetworkInterface" => (array) [ + * [ + * "EIP" => (object) [ + * "Bandwidth" => (integer) 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + * "PayMode" => (string) 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * "ShareBandwidthId" => (string) 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * "OperatorName" => (string) 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * "CouponId" => (string) 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * ] + * ] + * ] + * "SecurityGroupId" => (string) 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * "SecGroupId" => (array) [ + * [ + * "Id" => (string) 安全组 ID。至多可以同时绑定5个安全组。 + * "Priority" => (string) 安全组优先级。取值范围[1, 5] + * "Name" => (string) 安全组名称。 + * ] + * ] + * "UserLabels" => (string) UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game * ] * * Outputs: @@ -231,8 +265,8 @@ public function addUK8SUHostNode(AddUK8SUHostNodeRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "VPCId" => (string) 集群Node及Pod所属VPC * "SubnetId" => (string) 集群Node及Pod所属子网 * "ServiceCIDR" => (string) Service 网段,用于分配ClusterIP,如172.17.0.0/16。该网段不能与集群所属VPC网段重叠。 @@ -240,7 +274,14 @@ public function addUK8SUHostNode(AddUK8SUHostNodeRequest $request = null) * "Password" => (string) 集群节点密码,包括Master和Node。密码需包含最少一个大写字母,请使用base64进行编码,举例如下:# echo -n Password1 | base64 * "Master" => (array) [ * [ - * "Zone" => (string) Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 [可用区列表](../summary/regionlist.html) + * "Zone" => (string) Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "SecGroupId" => (array) [ + * [ + * "Id" => (string) 安全组 ID。至多可以同时绑定5个安全组。 + * "Priority" => (string) 安全组优先级。取值范围[1, 5] + * "Name" => (string) 安全组名称。 + * ] + * ] * ] * ] * "MasterMachineType" => (string) Master节点的云主机机型(V2.0),如["N", "C", "O", "OS"],具体请参照云主机机型。 @@ -248,7 +289,7 @@ public function addUK8SUHostNode(AddUK8SUHostNodeRequest $request = null) * "MasterMem" => (integer) Master节点的内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。 * "Nodes" => (array) [ * [ - * "Zone" => (string) 一组Nodes节点所属可用区,可创建多组Nodes节点,如一组是CPU Nodes节点,另一组是GPU Nodes节点。参见 [可用区列表](../summary/regionlist.html) + * "Zone" => (string) 一组Nodes节点所属可用区,可创建多组Nodes节点,如一组是CPU Nodes节点,另一组是GPU Nodes节点。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "MachineType" => (string) 一组Nodes节点云主机机型,如["N", "C", "O", "OS"],具体请参照云主机机型。 * "CPU" => (integer) 一组Node节点的虚拟CPU核数。单位:核,范围:[2, 64],可选范围参考控制台。 * "Mem" => (integer) 一组Node节点的内存大小。单位:MB,范围 :[4096, 262144],取值为1024的倍数,可选范围参考控制台。 @@ -257,16 +298,41 @@ public function addUK8SUHostNode(AddUK8SUHostNodeRequest $request = null) * "MaxPods" => (integer) Node节点上可运行最大节点数,默认为110。 * "Labels" => (string) Node节点标签,形式为key=value,多组Labels用”,“隔开,最多支持五组。 * "BootDiskType" => (string) 一组Node节点的系统盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "BootDiskSIze" => (integer) Node节点的系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。 * "DataDiskType" => (string) 一组Node节点的数据盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 - * "MinmalCpuPlatform" => (string) Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 * "GpuType" => (string) 一组Node节点的GPU类型,枚举值["K80", "P40", "V100"],最新值参考Console。 * "GPU" => (integer) 一组Node节点的GPU卡核心数,仅GPU机型支持此字段。 * "DataDiskSize" => (integer) 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + * "MinimalCpuPlatform" => (string) Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * "Taints" => (string) Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * "SecurityMode" => (string) 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * "NamePrefix" => (string) 一组Node的自定义主机名前缀。 完整的自定义主机名为{NamePrefix}-{NodeIP}。 + * "ImageId" => (string) Node节点的镜像 ID,不填则使用ImageId参数。支持用户自定义镜像。 + * "UNIFeature" => (string) 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。 + * "NetworkInterface" => (array) [ + * [ + * "EIP" => (object) [ + * "Bandwidth" => (integer) 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + * "PayMode" => (string) 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * "ShareBandwidthId" => (string) 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * "OperatorName" => (string) 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * "CouponId" => (string) 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * ] + * ] + * ] + * "SecurityGroupId" => (string) 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * "SecGroupId" => (array) [ + * [ + * "Id" => (string) 安全组 ID。至多可以同时绑定5个安全组。 + * "Priority" => (string) 安全组优先级。取值范围[1, 5] + * "Name" => (string) 安全组名称。 + * ] + * ] * ] * ] * "MasterBootDiskType" => (string) Master节点系统盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "MasterBootDiskSize" => (integer) Master节点系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。 * "MasterDataDiskType" => (string) Master节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 - * "MasterMinmalCpuPlatform" => (string) Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 * "MasterDataDiskSize" => (integer) Master节点的数据盘大小,单位GB,默认为0。范围 :[20, 1000] * "ChargeType" => (string) 集群所有节点的付费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限),默认按月。 * "K8sVersion" => (string) k8s集群的版本,版本信息请参考UK8S集群创建页,不指定的话默认为当前支持的最高版本。 @@ -279,6 +345,13 @@ public function addUK8SUHostNode(AddUK8SUHostNodeRequest $request = null) * "ImageId" => (string) Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。 * "UserData" => (string) 用户自定义数据。注意:1、总数据量大小不超多16K;2、使用base64编码。 * "InitScript" => (string) 用户自定义脚本,与UserData不同,自定义脚本将在集群安装完毕后执行。注意:1、总数据量大小不超多16K;2、使用base64编码。 + * "MasterMinimalCpuPlatform" => (string) Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * "ClusterDomain" => (string) 创建集群的时候定义clusterdomain + * "Tag" => (string) 业务组 + * "MasterImageId" => (string) Master节点的镜像 ID,不填则使用ImageId参数。支持用户自定义镜像。 + * "LbClass" => (string) master lb 类型默认ulb,可选ulb nlb + * "ForwardSrcIPMethod" => (string) LbClass为nlb的时候支持的源ip转发模式,目前只支持Toa,为空则不开源ip功能 枚举:"",Toa + * "UserLabels" => (string) UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game * ] * * Outputs: @@ -583,6 +656,69 @@ public function describeUK8SNode(DescribeUK8SNodeRequest $request = null) return new DescribeUK8SNodeResponse($resp->toArray(), $resp->getRequestId()); } + /** + * GetClusterConfig - 获取集群配置文件,管理集群的凭证 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/get_cluster_config + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 所在项目 + * "Region" => (string) 所在区域 + * "ClusterId" => (string) 集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * "KubeConfig" => (string) 配置信息 + * "ExternalKubeConfig" => (string) 开启公网apiserver的情况下,有数据返回。 + * "Updatable" => (boolean) 用于标示 kubeconfig 是否可以进行替换更新 + * ] + * + * @return GetClusterConfigResponse + * @throws UCloudException + */ + public function getClusterConfig(GetClusterConfigRequest $request = null) + { + $resp = $this->invoke($request); + return new GetClusterConfigResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUK8SVersions - 获取支持创建的UK8S集群版本、Containerd版本 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/get_uk8s_versions + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Kind" => (string) 集群类型,可选值为[Dedicated] + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (array) UK8S 版本信息列表。[ + * [ + * "K8sVersion" => (string) K8S 版本 + * "ContainerdVersion" => (string) Containerd 版本 + * ] + * ] + * ] + * + * @return GetUK8SVersionsResponse + * @throws UCloudException + */ + public function getUK8SVersions(GetUK8SVersionsRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUK8SVersionsResponse($resp->toArray(), $resp->getRequestId()); + } + /** * ListUK8SClusterNodeV2 - 获取UK8S集群节点信息 * @@ -713,6 +849,7 @@ public function listUK8SClusterV2(ListUK8SClusterV2Request $request = null) * $outputs = [ * "NodeGroupList" => (array) 节点池列表[ * [ + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "NodeGroupId" => (string) 节点池ID * "NodeGroupName" => (string) 节点池名字 * "ImageId" => (string) 镜像ID @@ -723,11 +860,19 @@ public function listUK8SClusterV2(ListUK8SClusterV2Request $request = null) * "GpuType" => (string) GPU类型 * "GPU" => (integer) GPU卡核心数 * "BootDiskType" => (string) 系统盘类型 + * "BootDiskSize" => (integer) 系统盘大小 * "DataDiskSize" => (integer) 数据盘大小 * "DataDiskType" => (string) 数据盘类型 * "Tag" => (string) 业务组 * "ChargeType" => (string) 付费方式 * "NodeList" => (array) 节点id列表 + * "SubnetId" => (string) 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * "IsolationGroupId" => (string) 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * "MaxPods" => (string) int默认110,生产环境建议小于等于110。 + * "UserData" => (string) 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * "InitScript" => (string) 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * "Taints" => (string) Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * "Labels" => (string) Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game * ] * ] * ]