diff --git a/VERSION b/VERSION index eaf1be72..478f799a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.62 +0.3.63 diff --git a/src/UK8S/Apis/AddUK8SAutoScalingGroupV2Request.php b/src/UK8S/Apis/AddUK8SAutoScalingGroupV2Request.php new file mode 100644 index 00000000..912770e5 --- /dev/null +++ b/src/UK8S/Apis/AddUK8SAutoScalingGroupV2Request.php @@ -0,0 +1,679 @@ + "AddUK8SAutoScalingGroupV2"]); + $this->markRequired("Zone"); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + $this->markRequired("Name"); + $this->markRequired("CPU"); + $this->markRequired("Mem"); + $this->markRequired("MachineType"); + $this->markRequired("Min"); + $this->markRequired("Max"); + $this->markRequired("NodeGroupId"); + } + + + + /** + * Zone: 可用区 + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID + * + * @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); + } + + /** + * Name: 伸缩组名字 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 伸缩组名字 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * CPU: 节点CPU大小 + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: 节点CPU大小 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Mem: 节点Mem大小 + * + * @return integer|null + */ + public function getMem() + { + return $this->get("Mem"); + } + + /** + * Mem: 节点Mem大小 + * + * @param int $mem + */ + public function setMem($mem) + { + $this->set("Mem", $mem); + } + + /** + * MachineType: 云主机机型。该参数仍需传入;实际节点规格取自绑定的节点池。 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 云主机机型。该参数仍需传入;实际节点规格取自绑定的节点池。 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * Min: 最小节点数,范围 0–100,且不得大于 Max。必须显式传入,允许为 0。 + * + * @return integer|null + */ + public function getMin() + { + return $this->get("Min"); + } + + /** + * Min: 最小节点数,范围 0–100,且不得大于 Max。必须显式传入,允许为 0。 + * + * @param int $min + */ + public function setMin($min) + { + $this->set("Min", $min); + } + + /** + * Max: 最大节点数,范围 1–100,且不得小于 Min。 + * + * @return integer|null + */ + public function getMax() + { + return $this->get("Max"); + } + + /** + * Max: 最大节点数,范围 1–100,且不得小于 Min。 + * + * @param int $max + */ + public function setMax($max) + { + $this->set("Max", $max); + } + + /** + * 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); + } + + /** + * Password: Base64 编码的节点登录密码。LoginMode 为 Password(默认)时必填,不会自动生成随机密码;KeyPair 模式下可不填。 + * + * @return string|null + */ + public function getPassword() + { + return $this->get("Password"); + } + + /** + * Password: Base64 编码的节点登录密码。LoginMode 为 Password(默认)时必填,不会自动生成随机密码;KeyPair 模式下可不填。 + * + * @param string $password + */ + public function setPassword($password) + { + $this->set("Password", $password); + } + + /** + * BootDiskType: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @return string|null + */ + public function getBootDiskType() + { + return $this->get("BootDiskType"); + } + + /** + * BootDiskType: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @param string $bootDiskType + */ + public function setBootDiskType($bootDiskType) + { + $this->set("BootDiskType", $bootDiskType); + } + + /** + * DataDiskType: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @return string|null + */ + public function getDataDiskType() + { + return $this->get("DataDiskType"); + } + + /** + * DataDiskType: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @param string $dataDiskType + */ + public function setDataDiskType($dataDiskType) + { + $this->set("DataDiskType", $dataDiskType); + } + + /** + * DataDiskSize: 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * MinmalCpuPlatform: 最低 CPU 平台的兼容字段;同时提供 MinimalCpuPlatform 时以其为准。 + * + * @return string|null + */ + public function getMinmalCpuPlatform() + { + return $this->get("MinmalCpuPlatform"); + } + + /** + * MinmalCpuPlatform: 最低 CPU 平台的兼容字段;同时提供 MinimalCpuPlatform 时以其为准。 + * + * @param string $minmalCpuPlatform + */ + public function setMinmalCpuPlatform($minmalCpuPlatform) + { + $this->set("MinmalCpuPlatform", $minmalCpuPlatform); + } + + /** + * GpuType: GPU 类型;实际节点规格取自绑定的节点池。 + * + * @return string|null + */ + public function getGpuType() + { + return $this->get("GpuType"); + } + + /** + * GpuType: GPU 类型;实际节点规格取自绑定的节点池。 + * + * @param string $gpuType + */ + public function setGpuType($gpuType) + { + $this->set("GpuType", $gpuType); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段 + * + * @return integer|null + */ + public function getGPU() + { + return $this->get("GPU"); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段 + * + * @param int $gpu + */ + public function setGPU($gpu) + { + $this->set("GPU", $gpu); + } + + /** + * Labels: key=value,多组用”,“隔开,最多5组 + * + * @return string|null + */ + public function getLabels() + { + return $this->get("Labels"); + } + + /** + * Labels: key=value,多组用”,“隔开,最多5组 + * + * @param string $labels + */ + public function setLabels($labels) + { + $this->set("Labels", $labels); + } + + /** + * MaxPods: 默认110, 支持16-512 + * + * @return integer|null + */ + public function getMaxPods() + { + return $this->get("MaxPods"); + } + + /** + * MaxPods: 默认110, 支持16-512 + * + * @param int $maxPods + */ + public function setMaxPods($maxPods) + { + $this->set("MaxPods", $maxPods); + } + + /** + * 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); + } + + /** + * ImageId: 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,不支持用户自定义镜像,传入自定义镜像 Id 将报错 + * + * @return string|null + */ + public function getImageId() + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,不支持用户自定义镜像,传入自定义镜像 Id 将报错 + * + * @param string $imageId + */ + public function setImageId($imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * UserData: Base64 编码的 cloud-init 用户数据。 + * + * @return string|null + */ + public function getUserData() + { + return $this->get("UserData"); + } + + /** + * UserData: Base64 编码的 cloud-init 用户数据。 + * + * @param string $userData + */ + public function setUserData($userData) + { + $this->set("UserData", $userData); + } + + /** + * InitScript: Base64 编码的用户脚本,在 UK8S 节点初始化完成后执行。 + * + * @return string|null + */ + public function getInitScript() + { + return $this->get("InitScript"); + } + + /** + * InitScript: Base64 编码的用户脚本,在 UK8S 节点初始化完成后执行。 + * + * @param string $initScript + */ + public function setInitScript($initScript) + { + $this->set("InitScript", $initScript); + } + + /** + * ChargeType: 计费模式:Year、Month、Dynamic、Postpay,默认 Dynamic。此接口不接受 Preemptive。 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式:Year、Month、Dynamic、Postpay,默认 Dynamic。此接口不接受 Preemptive。 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * IsolationGroup: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @return string|null + */ + public function getIsolationGroup() + { + return $this->get("IsolationGroup"); + } + + /** + * IsolationGroup: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @param string $isolationGroup + */ + public function setIsolationGroup($isolationGroup) + { + $this->set("IsolationGroup", $isolationGroup); + } + + /** + * 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); + } + + /** + * Priority: 伸缩组的优先级,取值[1, 100],数值越大优先级越高,在扩容的时候会被更优先考虑。 + * + * @return integer|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 伸缩组的优先级,取值[1, 100],数值越大优先级越高,在扩容的时候会被更优先考虑。 + * + * @param int $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } + + /** + * LoginMode: 节点登录方式:Password 或 KeyPair,默认 Password。 + * + * @return string|null + */ + public function getLoginMode() + { + return $this->get("LoginMode"); + } + + /** + * LoginMode: 节点登录方式:Password 或 KeyPair,默认 Password。 + * + * @param string $loginMode + */ + public function setLoginMode($loginMode) + { + $this->set("LoginMode", $loginMode); + } + + /** + * KeyPairId: 登录密钥对 ID。LoginMode 为 KeyPair 时必填。 + * + * @return string|null + */ + public function getKeyPairId() + { + return $this->get("KeyPairId"); + } + + /** + * KeyPairId: 登录密钥对 ID。LoginMode 为 KeyPair 时必填。 + * + * @param string $keyPairId + */ + public function setKeyPairId($keyPairId) + { + $this->set("KeyPairId", $keyPairId); + } + + /** + * MinimalCpuPlatform: 最低 CPU 平台;优先于兼容字段 MinmalCpuPlatform。 + * + * @return string|null + */ + public function getMinimalCpuPlatform() + { + return $this->get("MinimalCpuPlatform"); + } + + /** + * MinimalCpuPlatform: 最低 CPU 平台;优先于兼容字段 MinmalCpuPlatform。 + * + * @param string $minimalCpuPlatform + */ + public function setMinimalCpuPlatform($minimalCpuPlatform) + { + $this->set("MinimalCpuPlatform", $minimalCpuPlatform); + } +} diff --git a/src/UK8S/Apis/AddUK8SAutoScalingGroupV2Response.php b/src/UK8S/Apis/AddUK8SAutoScalingGroupV2Response.php new file mode 100644 index 00000000..5837d00a --- /dev/null +++ b/src/UK8S/Apis/AddUK8SAutoScalingGroupV2Response.php @@ -0,0 +1,44 @@ +get("AsgId"); + } + + /** + * AsgId: 创建的伸缩组 ID。 + * + * @param string $asgId + */ + public function setAsgId($asgId) + { + $this->set("AsgId", $asgId); + } +} diff --git a/src/UK8S/Apis/DeleteUK8SAutoScalingGroupRequest.php b/src/UK8S/Apis/DeleteUK8SAutoScalingGroupRequest.php new file mode 100644 index 00000000..da973236 --- /dev/null +++ b/src/UK8S/Apis/DeleteUK8SAutoScalingGroupRequest.php @@ -0,0 +1,112 @@ + "DeleteUK8SAutoScalingGroup"]); + $this->markRequired("Region"); + $this->markRequired("Id"); + $this->markRequired("ClusterId"); + } + + + + /** + * 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); + } + + /** + * Id: 伸缩组ID + * + * @return string|null + */ + public function getId() + { + return $this->get("Id"); + } + + /** + * Id: 伸缩组ID + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * 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/DeleteUK8SAutoScalingGroupResponse.php b/src/UK8S/Apis/DeleteUK8SAutoScalingGroupResponse.php new file mode 100644 index 00000000..0f38084a --- /dev/null +++ b/src/UK8S/Apis/DeleteUK8SAutoScalingGroupResponse.php @@ -0,0 +1,26 @@ + "DescribeUK8SAutoscalerGroup"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * 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); + } + + /** + * Zone: 可用区,可选。此接口按集群 ID 查询。 + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区,可选。此接口按集群 ID 查询。 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * 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); + } + + /** + * 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/DescribeUK8SAutoscalerGroupResponse.php b/src/UK8S/Apis/DescribeUK8SAutoscalerGroupResponse.php new file mode 100644 index 00000000..107ba958 --- /dev/null +++ b/src/UK8S/Apis/DescribeUK8SAutoscalerGroupResponse.php @@ -0,0 +1,104 @@ +get("Autoscaler")); + } + + /** + * Autoscaler: 伸缩器 + * + * @param Autoscaler $autoscaler + */ + public function setAutoscaler(array $autoscaler) + { + $this->set("Autoscaler", $autoscaler->getAll()); + } + + /** + * AutoScalingGroup: 伸缩组列表 + * + * @return AutoScalingGroup[]|null + */ + public function getAutoScalingGroup() + { + $items = $this->get("AutoScalingGroup"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AutoScalingGroup($item)); + } + return $result; + } + + /** + * AutoScalingGroup: 伸缩组列表 + * + * @param AutoScalingGroup[] $autoScalingGroup + */ + public function setAutoScalingGroup(array $autoScalingGroup) + { + $result = []; + foreach ($autoScalingGroup as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Update: 0:无需更新1:有更新2:强制更新 + * + * @return integer|null + */ + public function getUpdate() + { + return $this->get("Update"); + } + + /** + * Update: 0:无需更新1:有更新2:强制更新 + * + * @param int $update + */ + public function setUpdate($update) + { + $this->set("Update", $update); + } +} diff --git a/src/UK8S/Apis/EnableUK8SAutoscalerRequest.php b/src/UK8S/Apis/EnableUK8SAutoscalerRequest.php new file mode 100644 index 00000000..75966061 --- /dev/null +++ b/src/UK8S/Apis/EnableUK8SAutoscalerRequest.php @@ -0,0 +1,112 @@ + "EnableUK8SAutoscaler"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + $this->markRequired("Enabled"); + } + + + + /** + * 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); + } + + /** + * 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); + } + + /** + * Enabled: 1开启;0关闭 + * + * @return integer|null + */ + public function getEnabled() + { + return $this->get("Enabled"); + } + + /** + * Enabled: 1开启;0关闭 + * + * @param int $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } +} diff --git a/src/UK8S/Apis/EnableUK8SAutoscalerResponse.php b/src/UK8S/Apis/EnableUK8SAutoscalerResponse.php new file mode 100644 index 00000000..9391a667 --- /dev/null +++ b/src/UK8S/Apis/EnableUK8SAutoscalerResponse.php @@ -0,0 +1,26 @@ + "GetUK8SAvailableInstanceTypes"]); + $this->markRequired("Region"); + } + + + + /** + * 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); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * 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); + } +} diff --git a/src/UK8S/Apis/GetUK8SAvailableInstanceTypesResponse.php b/src/UK8S/Apis/GetUK8SAvailableInstanceTypesResponse.php new file mode 100644 index 00000000..62a5c2b7 --- /dev/null +++ b/src/UK8S/Apis/GetUK8SAvailableInstanceTypesResponse.php @@ -0,0 +1,87 @@ +get("Status"); + } + + /** + * Status: 当前区域是否可售 + * + * @param string $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * AvailableInstanceTypes: UK8S 支持的可用机型列表 + * + * @return UK8SAvailableInstanceType[]|null + */ + public function getAvailableInstanceTypes() + { + $items = $this->get("AvailableInstanceTypes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UK8SAvailableInstanceType($item)); + } + return $result; + } + + /** + * AvailableInstanceTypes: UK8S 支持的可用机型列表 + * + * @param UK8SAvailableInstanceType[] $availableInstanceTypes + */ + public function setAvailableInstanceTypes(array $availableInstanceTypes) + { + $result = []; + foreach ($availableInstanceTypes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Apis/GetUK8SCNINodeInfoRequest.php b/src/UK8S/Apis/GetUK8SCNINodeInfoRequest.php new file mode 100644 index 00000000..5b31c594 --- /dev/null +++ b/src/UK8S/Apis/GetUK8SCNINodeInfoRequest.php @@ -0,0 +1,111 @@ + "GetUK8SCNINodeInfo"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * 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); + } + + /** + * Zone: 可用区,可选。 + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区,可选。 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * 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); + } + + /** + * ClusterId: UK8S 集群 ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: UK8S 集群 ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UK8S/Apis/GetUK8SCNINodeInfoResponse.php b/src/UK8S/Apis/GetUK8SCNINodeInfoResponse.php new file mode 100644 index 00000000..b2926405 --- /dev/null +++ b/src/UK8S/Apis/GetUK8SCNINodeInfoResponse.php @@ -0,0 +1,137 @@ +get("NodeInfoSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodePluginInfo($item)); + } + return $result; + } + + /** + * NodeInfoSet: 节点 CNI 信息列表 + * + * @param NodePluginInfo[] $nodeInfoSet + */ + public function setNodeInfoSet(array $nodeInfoSet) + { + $result = []; + foreach ($nodeInfoSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DataSource: 数据来源:database 表示数据库记录,ipamd_http 表示通过 ipamd 实时查询。 + * + * @return string|null + */ + public function getDataSource() + { + return $this->get("DataSource"); + } + + /** + * DataSource: 数据来源:database 表示数据库记录,ipamd_http 表示通过 ipamd 实时查询。 + * + * @param string $dataSource + */ + public function setDataSource($dataSource) + { + $this->set("DataSource", $dataSource); + } + + /** + * Partial: 是否存在部分节点实时查询失败 + * + * @return boolean|null + */ + public function getPartial() + { + return $this->get("Partial"); + } + + /** + * Partial: 是否存在部分节点实时查询失败 + * + * @param boolean $partial + */ + public function setPartial($partial) + { + $this->set("Partial", $partial); + } + + /** + * HighestVersion: 节点中的最高有效 CNI 版本 + * + * @return string|null + */ + public function getHighestVersion() + { + return $this->get("HighestVersion"); + } + + /** + * HighestVersion: 节点中的最高有效 CNI 版本 + * + * @param string $highestVersion + */ + public function setHighestVersion($highestVersion) + { + $this->set("HighestVersion", $highestVersion); + } + + /** + * AllNodesSynced: 是否所有节点实时查询成功且 CNI 版本一致。数据来源为 database 时返回 false。 + * + * @return boolean|null + */ + public function getAllNodesSynced() + { + return $this->get("AllNodesSynced"); + } + + /** + * AllNodesSynced: 是否所有节点实时查询成功且 CNI 版本一致。数据来源为 database 时返回 false。 + * + * @param boolean $allNodesSynced + */ + public function setAllNodesSynced($allNodesSynced) + { + $this->set("AllNodesSynced", $allNodesSynced); + } +} diff --git a/src/UK8S/Apis/GetUK8SIpamdStatusRequest.php b/src/UK8S/Apis/GetUK8SIpamdStatusRequest.php new file mode 100644 index 00000000..8703724d --- /dev/null +++ b/src/UK8S/Apis/GetUK8SIpamdStatusRequest.php @@ -0,0 +1,111 @@ + "GetUK8SIpamdStatus"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * 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); + } + + /** + * Zone: 可用区,可选。 + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区,可选。 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * 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); + } + + /** + * 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/GetUK8SIpamdStatusResponse.php b/src/UK8S/Apis/GetUK8SIpamdStatusResponse.php new file mode 100644 index 00000000..3e0bd8a8 --- /dev/null +++ b/src/UK8S/Apis/GetUK8SIpamdStatusResponse.php @@ -0,0 +1,164 @@ +get("Installed"); + } + + /** + * Installed: 是否已经安装 + * + * @param boolean $installed + */ + public function setInstalled($installed) + { + $this->set("Installed", $installed); + } + + /** + * Version: 当前ipamd的版本 + * + * @return string|null + */ + public function getVersion() + { + return $this->get("Version"); + } + + /** + * Version: 当前ipamd的版本 + * + * @param string $version + */ + public function setVersion($version) + { + $this->set("Version", $version); + } + + /** + * LastVersion: ipamd可用最新版本 + * + * @return string|null + */ + public function getLastVersion() + { + return $this->get("LastVersion"); + } + + /** + * LastVersion: ipamd可用最新版本 + * + * @param string $lastVersion + */ + public function setLastVersion($lastVersion) + { + $this->set("LastVersion", $lastVersion); + } + + /** + * ReleaseDate: 最新版本的发布日期 + * + * @return integer|null + */ + public function getReleaseDate() + { + return $this->get("ReleaseDate"); + } + + /** + * ReleaseDate: 最新版本的发布日期 + * + * @param int $releaseDate + */ + public function setReleaseDate($releaseDate) + { + $this->set("ReleaseDate", $releaseDate); + } + + /** + * OpenTime: 当前 ipamd 插件的创建时间,Unix 时间戳,单位秒。 + * + * @return integer|null + */ + public function getOpenTime() + { + return $this->get("OpenTime"); + } + + /** + * OpenTime: 当前 ipamd 插件的创建时间,Unix 时间戳,单位秒。 + * + * @param int $openTime + */ + public function setOpenTime($openTime) + { + $this->set("OpenTime", $openTime); + } + + /** + * CNIInitMode: 当前 CNI 初始化模式。 + * + * @return string|null + */ + public function getCNIInitMode() + { + return $this->get("CNIInitMode"); + } + + /** + * CNIInitMode: 当前 CNI 初始化模式。 + * + * @param string $cniInitMode + */ + public function setCNIInitMode($cniInitMode) + { + $this->set("CNIInitMode", $cniInitMode); + } + + /** + * CNIInitVersionReady: 当前已安装的 ipamd 版本是否支持切换 CNI 初始化模式。 + * + * @return boolean|null + */ + public function getCNIInitVersionReady() + { + return $this->get("CNIInitVersionReady"); + } + + /** + * CNIInitVersionReady: 当前已安装的 ipamd 版本是否支持切换 CNI 初始化模式。 + * + * @param boolean $cniInitVersionReady + */ + public function setCNIInitVersionReady($cniInitVersionReady) + { + $this->set("CNIInitVersionReady", $cniInitVersionReady); + } +} diff --git a/src/UK8S/Apis/GetUK8SLoadBalancerControllerRequest.php b/src/UK8S/Apis/GetUK8SLoadBalancerControllerRequest.php new file mode 100644 index 00000000..e21a4ee7 --- /dev/null +++ b/src/UK8S/Apis/GetUK8SLoadBalancerControllerRequest.php @@ -0,0 +1,111 @@ + "GetUK8SLoadBalancerController"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * 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); + } + + /** + * Zone: 可用区,可选。 + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区,可选。 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * 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); + } + + /** + * 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/GetUK8SLoadBalancerControllerResponse.php b/src/UK8S/Apis/GetUK8SLoadBalancerControllerResponse.php new file mode 100644 index 00000000..3cc3dc30 --- /dev/null +++ b/src/UK8S/Apis/GetUK8SLoadBalancerControllerResponse.php @@ -0,0 +1,124 @@ +get("LastVersion"); + } + + /** + * LastVersion: 最新可用版本。 + * + * @param string $lastVersion + */ + public function setLastVersion($lastVersion) + { + $this->set("LastVersion", $lastVersion); + } + + /** + * Version: 当前安装版本。 + * + * @return string|null + */ + public function getVersion() + { + return $this->get("Version"); + } + + /** + * Version: 当前安装版本。 + * + * @param string $version + */ + public function setVersion($version) + { + $this->set("Version", $version); + } + + /** + * Installed: 是否安装 + * + * @return boolean|null + */ + public function getInstalled() + { + return $this->get("Installed"); + } + + /** + * Installed: 是否安装 + * + * @param boolean $installed + */ + public function setInstalled($installed) + { + $this->set("Installed", $installed); + } + + /** + * CreateTime: 安装时间,Unix 时间戳,单位秒。 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 安装时间,Unix 时间戳,单位秒。 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * Status: 运行状态:unknown、running、notReady。 + * + * @return string|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 运行状态:unknown、running、notReady。 + * + * @param string $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } +} diff --git a/src/UK8S/Apis/GetUK8SNodeGroupRequest.php b/src/UK8S/Apis/GetUK8SNodeGroupRequest.php new file mode 100644 index 00000000..7ad76768 --- /dev/null +++ b/src/UK8S/Apis/GetUK8SNodeGroupRequest.php @@ -0,0 +1,112 @@ + "GetUK8SNodeGroup"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + $this->markRequired("NodeGroupId"); + } + + + + /** + * 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); + } + + /** + * 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); + } + + /** + * 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); + } +} diff --git a/src/UK8S/Apis/GetUK8SNodeGroupResponse.php b/src/UK8S/Apis/GetUK8SNodeGroupResponse.php new file mode 100644 index 00000000..26bb35ac --- /dev/null +++ b/src/UK8S/Apis/GetUK8SNodeGroupResponse.php @@ -0,0 +1,52 @@ +get("NodeGroup")); + } + + /** + * NodeGroup: 指定节点池的配置与关联信息 + * + * @param NodeGroupSet $nodeGroup + */ + public function setNodeGroup(array $nodeGroup) + { + $this->set("NodeGroup", $nodeGroup->getAll()); + } +} diff --git a/src/UK8S/Apis/GetUK8SPluginInfoRequest.php b/src/UK8S/Apis/GetUK8SPluginInfoRequest.php new file mode 100644 index 00000000..859afd14 --- /dev/null +++ b/src/UK8S/Apis/GetUK8SPluginInfoRequest.php @@ -0,0 +1,91 @@ + "GetUK8SPluginInfo"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * 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); + } + + /** + * 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/GetUK8SPluginInfoResponse.php b/src/UK8S/Apis/GetUK8SPluginInfoResponse.php new file mode 100644 index 00000000..79710716 --- /dev/null +++ b/src/UK8S/Apis/GetUK8SPluginInfoResponse.php @@ -0,0 +1,214 @@ +get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * CNIInfoSet: CNI插件信息, 参看NodePlugin + * + * @return NodePlugin|null + */ + public function getCNIInfoSet() + { + return new NodePlugin($this->get("CNIInfoSet")); + } + + /** + * CNIInfoSet: CNI插件信息, 参看NodePlugin + * + * @param NodePlugin $cniInfoSet + */ + public function setCNIInfoSet(array $cniInfoSet) + { + $this->set("CNIInfoSet", $cniInfoSet->getAll()); + } + + /** + * ClusterStatus: 集群状态信息 + * + * @return string|null + */ + public function getClusterStatus() + { + return $this->get("ClusterStatus"); + } + + /** + * ClusterStatus: 集群状态信息 + * + * @param string $clusterStatus + */ + public function setClusterStatus($clusterStatus) + { + $this->set("ClusterStatus", $clusterStatus); + } + + /** + * ClusterUpgradeInfo: 集群升级相关信息 + * + * @return ClusterUpgradeInfo|null + */ + public function getClusterUpgradeInfo() + { + return new ClusterUpgradeInfo($this->get("ClusterUpgradeInfo")); + } + + /** + * ClusterUpgradeInfo: 集群升级相关信息 + * + * @param ClusterUpgradeInfo $clusterUpgradeInfo + */ + public function setClusterUpgradeInfo(array $clusterUpgradeInfo) + { + $this->set("ClusterUpgradeInfo", $clusterUpgradeInfo->getAll()); + } + + /** + * RuntimeConvertInfo: 集群容器运行时转换信息。 + * + * @return RuntimeConvertInfo|null + */ + public function getRuntimeConvertInfo() + { + return new RuntimeConvertInfo($this->get("RuntimeConvertInfo")); + } + + /** + * RuntimeConvertInfo: 集群容器运行时转换信息。 + * + * @param RuntimeConvertInfo $runtimeConvertInfo + */ + public function setRuntimeConvertInfo(array $runtimeConvertInfo) + { + $this->set("RuntimeConvertInfo", $runtimeConvertInfo->getAll()); + } + + /** + * VKInfo: vk插件信息 + * + * @return VKNode|null + */ + public function getVKInfo() + { + return new VKNode($this->get("VKInfo")); + } + + /** + * VKInfo: vk插件信息 + * + * @param VKNode $vkInfo + */ + public function setVKInfo(array $vkInfo) + { + $this->set("VKInfo", $vkInfo->getAll()); + } + + /** + * CSIInfo: CSI 插件版本与状态。 + * + * @return CSIInfo|null + */ + public function getCSIInfo() + { + return new CSIInfo($this->get("CSIInfo")); + } + + /** + * CSIInfo: CSI 插件版本与状态。 + * + * @param CSIInfo $csiInfo + */ + public function setCSIInfo(array $csiInfo) + { + $this->set("CSIInfo", $csiInfo->getAll()); + } + + /** + * CloudProviderInfo: CloudProvider 插件版本与状态。 + * + * @return CloudProviderInfo|null + */ + public function getCloudProviderInfo() + { + return new CloudProviderInfo($this->get("CloudProviderInfo")); + } + + /** + * CloudProviderInfo: CloudProvider 插件版本与状态。 + * + * @param CloudProviderInfo $cloudProviderInfo + */ + public function setCloudProviderInfo(array $cloudProviderInfo) + { + $this->set("CloudProviderInfo", $cloudProviderInfo->getAll()); + } + + /** + * MonitorInfo: 监控插件信息。 + * + * @return MonitorInfo|null + */ + public function getMonitorInfo() + { + return new MonitorInfo($this->get("MonitorInfo")); + } + + /** + * MonitorInfo: 监控插件信息。 + * + * @param MonitorInfo $monitorInfo + */ + public function setMonitorInfo(array $monitorInfo) + { + $this->set("MonitorInfo", $monitorInfo->getAll()); + } +} diff --git a/src/UK8S/Apis/ListUK8SNodeGroupResponse.php b/src/UK8S/Apis/ListUK8SNodeGroupResponse.php index 00d7c199..e50e24c8 100644 --- a/src/UK8S/Apis/ListUK8SNodeGroupResponse.php +++ b/src/UK8S/Apis/ListUK8SNodeGroupResponse.php @@ -24,7 +24,7 @@ use UCloud\UK8S\Models\KubeletConfiguration; use UCloud\UK8S\Models\EvictionCondition; use UCloud\UK8S\Models\ReservedResource; -use UCloud\UK8S\Models\DiskSet; +use UCloud\UK8S\Models\NodeGroupDiskConfig; class ListUK8SNodeGroupResponse extends Response { diff --git a/src/UK8S/Apis/UpdateUK8SAutoScalingGroupV2Request.php b/src/UK8S/Apis/UpdateUK8SAutoScalingGroupV2Request.php new file mode 100644 index 00000000..d2f8eef8 --- /dev/null +++ b/src/UK8S/Apis/UpdateUK8SAutoScalingGroupV2Request.php @@ -0,0 +1,215 @@ + "UpdateUK8SAutoScalingGroupV2"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + $this->markRequired("Id"); + $this->markRequired("Name"); + $this->markRequired("Min"); + $this->markRequired("Max"); + } + + + + /** + * Zone: 可用区,可选。此接口按集群和伸缩组 ID 更新配置。 + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区,可选。此接口按集群和伸缩组 ID 更新配置。 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID + * + * @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); + } + + /** + * Id: 伸缩组ID + * + * @return string|null + */ + public function getId() + { + return $this->get("Id"); + } + + /** + * Id: 伸缩组ID + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Name: 伸缩组名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 伸缩组名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Min: 最小节点数,范围 0–100。 + * + * @return integer|null + */ + public function getMin() + { + return $this->get("Min"); + } + + /** + * Min: 最小节点数,范围 0–100。 + * + * @param int $min + */ + public function setMin($min) + { + $this->set("Min", $min); + } + + /** + * Max: 最大节点数,范围 1–100。 + * + * @return integer|null + */ + public function getMax() + { + return $this->get("Max"); + } + + /** + * Max: 最大节点数,范围 1–100。 + * + * @param int $max + */ + public function setMax($max) + { + $this->set("Max", $max); + } + + /** + * Priority: 伸缩组优先级,范围 1–100,值越大越优先。省略或传 0 时保持原优先级。 + * + * @return integer|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 伸缩组优先级,范围 1–100,值越大越优先。省略或传 0 时保持原优先级。 + * + * @param int $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } +} diff --git a/src/UK8S/Apis/UpdateUK8SAutoScalingGroupV2Response.php b/src/UK8S/Apis/UpdateUK8SAutoScalingGroupV2Response.php new file mode 100644 index 00000000..dec83f50 --- /dev/null +++ b/src/UK8S/Apis/UpdateUK8SAutoScalingGroupV2Response.php @@ -0,0 +1,26 @@ + "UpdateUK8SAutoscaler"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + $this->markRequired("ScaleDownUnneededTime"); + $this->markRequired("ScaleDownUtilizationThreshold"); + $this->markRequired("ScaleDownDelayAfterAdd"); + } + + + + /** + * 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); + } + + /** + * 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); + } + + /** + * ScaleDownUnneededTime: 节点持续不需要后触发缩容的等待时间,单位分钟,范围 1–1440。 + * + * @return integer|null + */ + public function getScaleDownUnneededTime() + { + return $this->get("ScaleDownUnneededTime"); + } + + /** + * ScaleDownUnneededTime: 节点持续不需要后触发缩容的等待时间,单位分钟,范围 1–1440。 + * + * @param int $scaleDownUnneededTime + */ + public function setScaleDownUnneededTime($scaleDownUnneededTime) + { + $this->set("ScaleDownUnneededTime", $scaleDownUnneededTime); + } + + /** + * ScaleDownUtilizationThreshold: 节点缩容利用率阈值,单位百分比,范围 0–100。例如 50 表示 50%。 + * + * @return integer|null + */ + public function getScaleDownUtilizationThreshold() + { + return $this->get("ScaleDownUtilizationThreshold"); + } + + /** + * ScaleDownUtilizationThreshold: 节点缩容利用率阈值,单位百分比,范围 0–100。例如 50 表示 50%。 + * + * @param int $scaleDownUtilizationThreshold + */ + public function setScaleDownUtilizationThreshold($scaleDownUtilizationThreshold) + { + $this->set("ScaleDownUtilizationThreshold", $scaleDownUtilizationThreshold); + } + + /** + * ScaleDownDelayAfterAdd: 添加节点后等待缩容的时间,单位分钟,范围 1–1440。 + * + * @return integer|null + */ + public function getScaleDownDelayAfterAdd() + { + return $this->get("ScaleDownDelayAfterAdd"); + } + + /** + * ScaleDownDelayAfterAdd: 添加节点后等待缩容的时间,单位分钟,范围 1–1440。 + * + * @param int $scaleDownDelayAfterAdd + */ + public function setScaleDownDelayAfterAdd($scaleDownDelayAfterAdd) + { + $this->set("ScaleDownDelayAfterAdd", $scaleDownDelayAfterAdd); + } + + /** + * ScaleDownGPUUtilizationThreshold: GPU 缩容利用率阈值,单位百分比,范围 0–100。省略时使用 ScaleDownUtilizationThreshold。 + * + * @return integer|null + */ + public function getScaleDownGPUUtilizationThreshold() + { + return $this->get("ScaleDownGPUUtilizationThreshold"); + } + + /** + * ScaleDownGPUUtilizationThreshold: GPU 缩容利用率阈值,单位百分比,范围 0–100。省略时使用 ScaleDownUtilizationThreshold。 + * + * @param int $scaleDownGPUUtilizationThreshold + */ + public function setScaleDownGPUUtilizationThreshold($scaleDownGPUUtilizationThreshold) + { + $this->set("ScaleDownGPUUtilizationThreshold", $scaleDownGPUUtilizationThreshold); + } +} diff --git a/src/UK8S/Apis/UpdateUK8SAutoscalerResponse.php b/src/UK8S/Apis/UpdateUK8SAutoscalerResponse.php new file mode 100644 index 00000000..1eebe37f --- /dev/null +++ b/src/UK8S/Apis/UpdateUK8SAutoscalerResponse.php @@ -0,0 +1,26 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * Id: 伸缩组ID + * + * @return string|null + */ + public function getId() + { + return $this->get("Id"); + } + + /** + * Id: 伸缩组ID + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Name: 伸缩组名字 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 伸缩组名字 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * CPU: 节点CPU + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: 节点CPU + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Mem: 节点内存 + * + * @return integer|null + */ + public function getMem() + { + return $this->get("Mem"); + } + + /** + * Mem: 节点内存 + * + * @param int $mem + */ + public function setMem($mem) + { + $this->set("Mem", $mem); + } + + /** + * DataDiskType: 节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @return string|null + */ + public function getDataDiskType() + { + return $this->get("DataDiskType"); + } + + /** + * DataDiskType: 节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @param string $dataDiskType + */ + public function setDataDiskType($dataDiskType) + { + $this->set("DataDiskType", $dataDiskType); + } + + /** + * DataDiskSize: 节点数据盘大小 + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 节点数据盘大小 + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * BootDiskType: 节点系统盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @return string|null + */ + public function getBootDiskType() + { + return $this->get("BootDiskType"); + } + + /** + * BootDiskType: 节点系统盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @param string $bootDiskType + */ + 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); + } + + /** + * MachineType: 云主机机型。 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 云主机机型。 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * GPU: GPU 数量。 + * + * @return integer|null + */ + public function getGPU() + { + return $this->get("GPU"); + } + + /** + * GPU: GPU 数量。 + * + * @param int $gpu + */ + public function setGPU($gpu) + { + $this->set("GPU", $gpu); + } + + /** + * GpuType: GPU 类型。 + * + * @return string|null + */ + public function getGpuType() + { + return $this->get("GpuType"); + } + + /** + * GpuType: GPU 类型。 + * + * @param string $gpuType + */ + public function setGpuType($gpuType) + { + $this->set("GpuType", $gpuType); + } + + /** + * Labels: 节点标签 key=value,多组用”,“隔开,最多5组 + * + * @return string|null + */ + public function getLabels() + { + return $this->get("Labels"); + } + + /** + * Labels: 节点标签 key=value,多组用”,“隔开,最多5组 + * + * @param string $labels + */ + public function setLabels($labels) + { + $this->set("Labels", $labels); + } + + /** + * MaxPods: Pods数量 默认110, 支持16-512 + * + * @return integer|null + */ + public function getMaxPods() + { + return $this->get("MaxPods"); + } + + /** + * MaxPods: Pods数量 默认110, 支持16-512 + * + * @param int $maxPods + */ + public function setMaxPods($maxPods) + { + $this->set("MaxPods", $maxPods); + } + + /** + * MinmalCpuPlatform: 最低 CPU 平台的兼容字段,与 MinimalCpuPlatform 相同。 + * + * @return string|null + */ + public function getMinmalCpuPlatform() + { + return $this->get("MinmalCpuPlatform"); + } + + /** + * MinmalCpuPlatform: 最低 CPU 平台的兼容字段,与 MinimalCpuPlatform 相同。 + * + * @param string $minmalCpuPlatform + */ + public function setMinmalCpuPlatform($minmalCpuPlatform) + { + $this->set("MinmalCpuPlatform", $minmalCpuPlatform); + } + + /** + * UHostFamily: 主机规格族 + * + * @return string|null + */ + public function getUHostFamily() + { + return $this->get("UHostFamily"); + } + + /** + * UHostFamily: 主机规格族 + * + * @param string $uHostFamily + */ + public function setUHostFamily($uHostFamily) + { + $this->set("UHostFamily", $uHostFamily); + } + + /** + * Min: 最小node数量 + * + * @return integer|null + */ + public function getMin() + { + return $this->get("Min"); + } + + /** + * Min: 最小node数量 + * + * @param int $min + */ + public function setMin($min) + { + $this->set("Min", $min); + } + + /** + * Max: 最大node数量 + * + * @return integer|null + */ + public function getMax() + { + return $this->get("Max"); + } + + /** + * Max: 最大node数量 + * + * @param int $max + */ + public function setMax($max) + { + $this->set("Max", $max); + } + + /** + * CurrentNodeNum: 当前该伸缩组管理的node数量 + * + * @return integer|null + */ + public function getCurrentNodeNum() + { + return $this->get("CurrentNodeNum"); + } + + /** + * CurrentNodeNum: 当前该伸缩组管理的node数量 + * + * @param int $currentNodeNum + */ + public function setCurrentNodeNum($currentNodeNum) + { + $this->set("CurrentNodeNum", $currentNodeNum); + } + + /** + * CreateTime: 创建时间,Unix 时间戳,单位秒。 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间,Unix 时间戳,单位秒。 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * UpdateTime: 更新时间,Unix 时间戳,单位秒。 + * + * @return integer|null + */ + public function getUpdateTime() + { + return $this->get("UpdateTime"); + } + + /** + * UpdateTime: 更新时间,Unix 时间戳,单位秒。 + * + * @param int $updateTime + */ + public function setUpdateTime($updateTime) + { + $this->set("UpdateTime", $updateTime); + } + + /** + * ChargeType: 伸缩组的计费模式。 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 伸缩组的计费模式。 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * IsolationGroup: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @return string|null + */ + public function getIsolationGroup() + { + return $this->get("IsolationGroup"); + } + + /** + * IsolationGroup: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @param string $isolationGroup + */ + public function setIsolationGroup($isolationGroup) + { + $this->set("IsolationGroup", $isolationGroup); + } + + /** + * Priority: 优先级 + * + * @return integer|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 优先级 + * + * @param int $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } + + /** + * NodeCPU: 节点CPU【兼容】 + * + * @return integer|null + */ + public function getNodeCPU() + { + return $this->get("NodeCPU"); + } + + /** + * NodeCPU: 节点CPU【兼容】 + * + * @param int $nodeCPU + */ + public function setNodeCPU($nodeCPU) + { + $this->set("NodeCPU", $nodeCPU); + } + + /** + * NodeMem: 节点内存【兼容】 + * + * @return integer|null + */ + public function getNodeMem() + { + return $this->get("NodeMem"); + } + + /** + * NodeMem: 节点内存【兼容】 + * + * @param int $nodeMem + */ + public function setNodeMem($nodeMem) + { + $this->set("NodeMem", $nodeMem); + } + + /** + * NodeDataDiskType: 节点数据盘类型【兼容】 + * + * @return string|null + */ + public function getNodeDataDiskType() + { + return $this->get("NodeDataDiskType"); + } + + /** + * NodeDataDiskType: 节点数据盘类型【兼容】 + * + * @param string $nodeDataDiskType + */ + public function setNodeDataDiskType($nodeDataDiskType) + { + $this->set("NodeDataDiskType", $nodeDataDiskType); + } + + /** + * NodeDataDiskSize: 节点数据盘大小【兼容】 + * + * @return integer|null + */ + public function getNodeDataDiskSize() + { + return $this->get("NodeDataDiskSize"); + } + + /** + * NodeDataDiskSize: 节点数据盘大小【兼容】 + * + * @param int $nodeDataDiskSize + */ + public function setNodeDataDiskSize($nodeDataDiskSize) + { + $this->set("NodeDataDiskSize", $nodeDataDiskSize); + } + + /** + * NodeBootDiskType: 旧伸缩组的系统盘类型。 + * + * @return string|null + */ + public function getNodeBootDiskType() + { + return $this->get("NodeBootDiskType"); + } + + /** + * NodeBootDiskType: 旧伸缩组的系统盘类型。 + * + * @param string $nodeBootDiskType + */ + public function setNodeBootDiskType($nodeBootDiskType) + { + $this->set("NodeBootDiskType", $nodeBootDiskType); + } + + /** + * NodeUHostType: 节点云主机机型【兼容】 + * + * @return string|null + */ + public function getNodeUHostType() + { + return $this->get("NodeUHostType"); + } + + /** + * NodeUHostType: 节点云主机机型【兼容】 + * + * @param string $nodeUHostType + */ + public function setNodeUHostType($nodeUHostType) + { + $this->set("NodeUHostType", $nodeUHostType); + } + + /** + * 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); + } + + /** + * SubnetId: 节点子网id【兼容】 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 节点子网id【兼容】 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * LoginMode: 节点登录方式:Password 或 KeyPair。 + * + * @return string|null + */ + public function getLoginMode() + { + return $this->get("LoginMode"); + } + + /** + * LoginMode: 节点登录方式:Password 或 KeyPair。 + * + * @param string $loginMode + */ + public function setLoginMode($loginMode) + { + $this->set("LoginMode", $loginMode); + } + + /** + * KeyPairId: 登录密钥对 ID。 + * + * @return string|null + */ + public function getKeyPairId() + { + return $this->get("KeyPairId"); + } + + /** + * KeyPairId: 登录密钥对 ID。 + * + * @param string $keyPairId + */ + public function setKeyPairId($keyPairId) + { + $this->set("KeyPairId", $keyPairId); + } + + /** + * MinimalCpuPlatform: 最低 CPU 平台。 + * + * @return string|null + */ + public function getMinimalCpuPlatform() + { + return $this->get("MinimalCpuPlatform"); + } + + /** + * MinimalCpuPlatform: 最低 CPU 平台。 + * + * @param string $minimalCpuPlatform + */ + public function setMinimalCpuPlatform($minimalCpuPlatform) + { + $this->set("MinimalCpuPlatform", $minimalCpuPlatform); + } + + /** + * Taints: 节点污点配置。 + * + * @return string|null + */ + public function getTaints() + { + return $this->get("Taints"); + } + + /** + * 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); + } + + /** + * ImageId: 镜像 ID。 + * + * @return string|null + */ + public function getImageId() + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像 ID。 + * + * @param string $imageId + */ + public function setImageId($imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * OsName: 操作系统名称。 + * + * @return string|null + */ + public function getOsName() + { + return $this->get("OsName"); + } + + /** + * OsName: 操作系统名称。 + * + * @param string $osName + */ + public function setOsName($osName) + { + $this->set("OsName", $osName); + } + + /** + * UserData: Base64 编码的 cloud-init 用户数据。 + * + * @return string|null + */ + public function getUserData() + { + return $this->get("UserData"); + } + + /** + * UserData: Base64 编码的 cloud-init 用户数据。 + * + * @param string $userData + */ + public function setUserData($userData) + { + $this->set("UserData", $userData); + } + + /** + * InitScript: Base64 编码的节点初始化后脚本。 + * + * @return string|null + */ + public function getInitScript() + { + return $this->get("InitScript"); + } + + /** + * InitScript: Base64 编码的节点初始化后脚本。 + * + * @param string $initScript + */ + public function setInitScript($initScript) + { + $this->set("InitScript", $initScript); + } + + /** + * SecurityMode: 节点安全模式:Firewall 或 SecGroup。 + * + * @return string|null + */ + public function getSecurityMode() + { + return $this->get("SecurityMode"); + } + + /** + * SecurityMode: 节点安全模式:Firewall 或 SecGroup。 + * + * @param string $securityMode + */ + public function setSecurityMode($securityMode) + { + $this->set("SecurityMode", $securityMode); + } + + /** + * SecGroupId: 安全组配置列表。 + * + * @return SecGroupId[]|null + */ + public function getSecGroupId() + { + $items = $this->get("SecGroupId"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SecGroupId($item)); + } + return $result; + } + + /** + * SecGroupId: 安全组配置列表。 + * + * @param SecGroupId[] $secGroupId + */ + public function setSecGroupId(array $secGroupId) + { + $result = []; + foreach ($secGroupId as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SecurityGroupId: 防火墙 ID。 + * + * @return string|null + */ + public function getSecurityGroupId() + { + return $this->get("SecurityGroupId"); + } + + /** + * SecurityGroupId: 防火墙 ID。 + * + * @param string $securityGroupId + */ + public function setSecurityGroupId($securityGroupId) + { + $this->set("SecurityGroupId", $securityGroupId); + } + + /** + * NetworkInterface: 网卡配置列表。 + * + * @return NetworkInterface[]|null + */ + public function getNetworkInterface() + { + $items = $this->get("NetworkInterface"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NetworkInterface($item)); + } + return $result; + } + + /** + * NetworkInterface: 网卡配置列表。 + * + * @param NetworkInterface[] $networkInterface + */ + public function setNetworkInterface(array $networkInterface) + { + $result = []; + foreach ($networkInterface as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * KubeletConfiguration: Kubelet 自定义配置。 + * + * @return KubeletConfiguration|null + */ + public function getKubeletConfiguration() + { + return new KubeletConfiguration($this->get("KubeletConfiguration")); + } + + /** + * KubeletConfiguration: Kubelet 自定义配置。 + * + * @param KubeletConfiguration $kubeletConfiguration + */ + public function setKubeletConfiguration(array $kubeletConfiguration) + { + $this->set("KubeletConfiguration", $kubeletConfiguration->getAll()); + } + + /** + * Password: Base64 编码的节点登录密码。 + * + * @return string|null + */ + public function getPassword() + { + return $this->get("Password"); + } + + /** + * Password: Base64 编码的节点登录密码。 + * + * @param string $password + */ + public function setPassword($password) + { + $this->set("Password", $password); + } +} diff --git a/src/UK8S/Models/Autoscaler.php b/src/UK8S/Models/Autoscaler.php index 1e31d751..e1ee5659 100644 --- a/src/UK8S/Models/Autoscaler.php +++ b/src/UK8S/Models/Autoscaler.php @@ -23,9 +23,9 @@ class Autoscaler extends Response /** - * ScaleDownUnneededTime: 缩容触发延时 + * ScaleDownUnneededTime: 节点持续不需要后触发缩容的等待时间,单位分钟。 * - * @return string|null + * @return integer|null */ public function getScaleDownUnneededTime() { @@ -33,9 +33,9 @@ public function getScaleDownUnneededTime() } /** - * ScaleDownUnneededTime: 缩容触发延时 + * ScaleDownUnneededTime: 节点持续不需要后触发缩容的等待时间,单位分钟。 * - * @param string $scaleDownUnneededTime + * @param int $scaleDownUnneededTime */ public function setScaleDownUnneededTime($scaleDownUnneededTime) { @@ -43,9 +43,9 @@ public function setScaleDownUnneededTime($scaleDownUnneededTime) } /** - * ScaleDownUtilizationThreshold: CPU缩容阈值 + * ScaleDownUtilizationThreshold: 节点缩容利用率阈值,单位百分比,范围 0–100。 * - * @return string|null + * @return integer|null */ public function getScaleDownUtilizationThreshold() { @@ -53,9 +53,9 @@ public function getScaleDownUtilizationThreshold() } /** - * ScaleDownUtilizationThreshold: CPU缩容阈值 + * ScaleDownUtilizationThreshold: 节点缩容利用率阈值,单位百分比,范围 0–100。 * - * @param string $scaleDownUtilizationThreshold + * @param int $scaleDownUtilizationThreshold */ public function setScaleDownUtilizationThreshold($scaleDownUtilizationThreshold) { @@ -63,9 +63,9 @@ public function setScaleDownUtilizationThreshold($scaleDownUtilizationThreshold) } /** - * ScaleDownDelayAfterAdd: 静默时间 + * ScaleDownDelayAfterAdd: 添加节点后等待缩容的时间,单位分钟。 * - * @return string|null + * @return integer|null */ public function getScaleDownDelayAfterAdd() { @@ -73,9 +73,9 @@ public function getScaleDownDelayAfterAdd() } /** - * ScaleDownDelayAfterAdd: 静默时间 + * ScaleDownDelayAfterAdd: 添加节点后等待缩容的时间,单位分钟。 * - * @param string $scaleDownDelayAfterAdd + * @param int $scaleDownDelayAfterAdd */ public function setScaleDownDelayAfterAdd($scaleDownDelayAfterAdd) { @@ -123,7 +123,7 @@ public function setVersion($version) } /** - * UpdateTime: + * UpdateTime: 配置更新时间,Unix 时间戳,单位秒。 * * @return integer|null */ @@ -133,7 +133,7 @@ public function getUpdateTime() } /** - * UpdateTime: + * UpdateTime: 配置更新时间,Unix 时间戳,单位秒。 * * @param int $updateTime */ @@ -143,9 +143,9 @@ public function setUpdateTime($updateTime) } /** - * ScaleDownGpuUtilizationThreshold: GPU缩容阈值 + * ScaleDownGpuUtilizationThreshold: GPU 缩容利用率阈值,单位百分比,范围 0–100。 * - * @return string|null + * @return integer|null */ public function getScaleDownGpuUtilizationThreshold() { @@ -153,9 +153,9 @@ public function getScaleDownGpuUtilizationThreshold() } /** - * ScaleDownGpuUtilizationThreshold: GPU缩容阈值 + * ScaleDownGpuUtilizationThreshold: GPU 缩容利用率阈值,单位百分比,范围 0–100。 * - * @param string $scaleDownGpuUtilizationThreshold + * @param int $scaleDownGpuUtilizationThreshold */ public function setScaleDownGpuUtilizationThreshold($scaleDownGpuUtilizationThreshold) { diff --git a/src/UK8S/Models/CSIInfo.php b/src/UK8S/Models/CSIInfo.php new file mode 100644 index 00000000..80d21cb2 --- /dev/null +++ b/src/UK8S/Models/CSIInfo.php @@ -0,0 +1,184 @@ +get("Name"); + } + + /** + * Name: 插件名称。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * AvailableVersion: 最新可用插件版本。 + * + * @return string|null + */ + public function getAvailableVersion() + { + return $this->get("AvailableVersion"); + } + + /** + * AvailableVersion: 最新可用插件版本。 + * + * @param string $availableVersion + */ + public function setAvailableVersion($availableVersion) + { + $this->set("AvailableVersion", $availableVersion); + } + + /** + * ReleaseTime: 最新可用版本的发布时间。 + * + * @return string|null + */ + public function getReleaseTime() + { + return $this->get("ReleaseTime"); + } + + /** + * ReleaseTime: 最新可用版本的发布时间。 + * + * @param string $releaseTime + */ + public function setReleaseTime($releaseTime) + { + $this->set("ReleaseTime", $releaseTime); + } + + /** + * ManageEnabled: 是否开启插件托管。 + * + * @return boolean|null + */ + public function getManageEnabled() + { + return $this->get("ManageEnabled"); + } + + /** + * ManageEnabled: 是否开启插件托管。 + * + * @param boolean $manageEnabled + */ + public function setManageEnabled($manageEnabled) + { + $this->set("ManageEnabled", $manageEnabled); + } + + /** + * Version: 当前插件版本。 + * + * @return string|null + */ + public function getVersion() + { + return $this->get("Version"); + } + + /** + * Version: 当前插件版本。 + * + * @param string $version + */ + public function setVersion($version) + { + $this->set("Version", $version); + } + + /** + * Status: 插件状态。 + * + * @return integer|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 插件状态。 + * + * @param int $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * UpdateTime: 更新时间,Unix 时间戳,单位秒。 + * + * @return integer|null + */ + public function getUpdateTime() + { + return $this->get("UpdateTime"); + } + + /** + * UpdateTime: 更新时间,Unix 时间戳,单位秒。 + * + * @param int $updateTime + */ + public function setUpdateTime($updateTime) + { + $this->set("UpdateTime", $updateTime); + } + + /** + * OperationResult: 上次插件操作结果。 + * + * @return integer|null + */ + public function getOperationResult() + { + return $this->get("OperationResult"); + } + + /** + * OperationResult: 上次插件操作结果。 + * + * @param int $operationResult + */ + public function setOperationResult($operationResult) + { + $this->set("OperationResult", $operationResult); + } +} diff --git a/src/UK8S/Models/CloudProviderInfo.php b/src/UK8S/Models/CloudProviderInfo.php new file mode 100644 index 00000000..df70b8cd --- /dev/null +++ b/src/UK8S/Models/CloudProviderInfo.php @@ -0,0 +1,184 @@ +get("Name"); + } + + /** + * Name: 插件名称。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * AvailableVersion: 最新可用插件版本。 + * + * @return string|null + */ + public function getAvailableVersion() + { + return $this->get("AvailableVersion"); + } + + /** + * AvailableVersion: 最新可用插件版本。 + * + * @param string $availableVersion + */ + public function setAvailableVersion($availableVersion) + { + $this->set("AvailableVersion", $availableVersion); + } + + /** + * ReleaseTime: 最新可用版本的发布时间。 + * + * @return string|null + */ + public function getReleaseTime() + { + return $this->get("ReleaseTime"); + } + + /** + * ReleaseTime: 最新可用版本的发布时间。 + * + * @param string $releaseTime + */ + public function setReleaseTime($releaseTime) + { + $this->set("ReleaseTime", $releaseTime); + } + + /** + * ManageEnabled: 是否开启插件托管。 + * + * @return boolean|null + */ + public function getManageEnabled() + { + return $this->get("ManageEnabled"); + } + + /** + * ManageEnabled: 是否开启插件托管。 + * + * @param boolean $manageEnabled + */ + public function setManageEnabled($manageEnabled) + { + $this->set("ManageEnabled", $manageEnabled); + } + + /** + * Version: 当前插件版本。 + * + * @return string|null + */ + public function getVersion() + { + return $this->get("Version"); + } + + /** + * Version: 当前插件版本。 + * + * @param string $version + */ + public function setVersion($version) + { + $this->set("Version", $version); + } + + /** + * Status: 插件状态。 + * + * @return integer|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 插件状态。 + * + * @param int $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * UpdateTime: 更新时间,Unix 时间戳,单位秒。 + * + * @return integer|null + */ + public function getUpdateTime() + { + return $this->get("UpdateTime"); + } + + /** + * UpdateTime: 更新时间,Unix 时间戳,单位秒。 + * + * @param int $updateTime + */ + public function setUpdateTime($updateTime) + { + $this->set("UpdateTime", $updateTime); + } + + /** + * OperationResult: 上次插件操作结果。 + * + * @return integer|null + */ + public function getOperationResult() + { + return $this->get("OperationResult"); + } + + /** + * OperationResult: 上次插件操作结果。 + * + * @param int $operationResult + */ + public function setOperationResult($operationResult) + { + $this->set("OperationResult", $operationResult); + } +} diff --git a/src/UK8S/Models/ClusterUpdateNodeInfo.php b/src/UK8S/Models/ClusterUpdateNodeInfo.php new file mode 100644 index 00000000..0cb3e5ea --- /dev/null +++ b/src/UK8S/Models/ClusterUpdateNodeInfo.php @@ -0,0 +1,164 @@ +get("Node"); + } + + /** + * Node: Node节点名称 + * + * @param string $node + */ + public function setNode($node) + { + $this->set("Node", $node); + } + + /** + * Version: 插件版本 + * + * @return string|null + */ + public function getVersion() + { + return $this->get("Version"); + } + + /** + * Version: 插件版本 + * + * @param string $version + */ + public function setVersion($version) + { + $this->set("Version", $version); + } + + /** + * Status: 插件工作状态,0:未知,1:正常,2:异常, 3: 升级中 + * + * @return integer|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 插件工作状态,0:未知,1:正常,2:异常, 3: 升级中 + * + * @param int $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * UpdateTime: 插件信息更新时间 + * + * @return integer|null + */ + public function getUpdateTime() + { + return $this->get("UpdateTime"); + } + + /** + * UpdateTime: 插件信息更新时间 + * + * @param int $updateTime + */ + public function setUpdateTime($updateTime) + { + $this->set("UpdateTime", $updateTime); + } + + /** + * OperationResult: 上次插件操作结果,0:没有上次操作结果,或当前正在执行升级或查询 1:获取成功 2 获取失败 3 升级成功 4 升级失败 + * + * @return integer|null + */ + public function getOperationResult() + { + return $this->get("OperationResult"); + } + + /** + * OperationResult: 上次插件操作结果,0:没有上次操作结果,或当前正在执行升级或查询 1:获取成功 2 获取失败 3 升级成功 4 升级失败 + * + * @param int $operationResult + */ + public function setOperationResult($operationResult) + { + $this->set("OperationResult", $operationResult); + } + + /** + * IP: Node节点IP + * + * @return string|null + */ + public function getIP() + { + return $this->get("IP"); + } + + /** + * IP: Node节点IP + * + * @param string $ip + */ + public function setIP($ip) + { + $this->set("IP", $ip); + } + + /** + * Role: 节点角色, master 或者 node + * + * @return string|null + */ + public function getRole() + { + return $this->get("Role"); + } + + /** + * Role: 节点角色, master 或者 node + * + * @param string $role + */ + public function setRole($role) + { + $this->set("Role", $role); + } +} diff --git a/src/UK8S/Models/ClusterUpgradeInfo.php b/src/UK8S/Models/ClusterUpgradeInfo.php new file mode 100644 index 00000000..80b13589 --- /dev/null +++ b/src/UK8S/Models/ClusterUpgradeInfo.php @@ -0,0 +1,156 @@ +get("UpdateTime"); + } + + /** + * UpdateTime: 集群信息更新时间戳,单位 s + * + * @param int $updateTime + */ + public function setUpdateTime($updateTime) + { + $this->set("UpdateTime", $updateTime); + } + + /** + * Stage: string,集群升级所处阶段 Unknown、Precheck、MasterUpdating、NodeUpdating、Failed、Success集群从未进行过升级则返回 Unknown集群开始升级过程几个阶段 Precheck->MasterUpdating->NodeUpdating→Success如果升级失败则为 Failed + * + * @return string|null + */ + public function getStage() + { + return $this->get("Stage"); + } + + /** + * Stage: string,集群升级所处阶段 Unknown、Precheck、MasterUpdating、NodeUpdating、Failed、Success集群从未进行过升级则返回 Unknown集群开始升级过程几个阶段 Precheck->MasterUpdating->NodeUpdating→Success如果升级失败则为 Failed + * + * @param string $stage + */ + public function setStage($stage) + { + $this->set("Stage", $stage); + } + + /** + * Version: string, 集群当前版本 + * + * @return string|null + */ + public function getVersion() + { + return $this->get("Version"); + } + + /** + * Version: string, 集群当前版本 + * + * @param string $version + */ + public function setVersion($version) + { + $this->set("Version", $version); + } + + /** + * TargetVersion: string,集群升级目标版本 + * + * @return string|null + */ + public function getTargetVersion() + { + return $this->get("TargetVersion"); + } + + /** + * TargetVersion: string,集群升级目标版本 + * + * @param string $targetVersion + */ + public function setTargetVersion($targetVersion) + { + $this->set("TargetVersion", $targetVersion); + } + + /** + * AvailableVersions: string 数组,可用新版本,例如 ["1.15.12","1.16.15","1.17.4","1.18.9"] + * + * @return string[]|null + */ + public function getAvailableVersions() + { + return $this->get("AvailableVersions"); + } + + /** + * AvailableVersions: string 数组,可用新版本,例如 ["1.15.12","1.16.15","1.17.4","1.18.9"] + * + * @param string[] $availableVersions + */ + public function setAvailableVersions(array $availableVersions) + { + $this->set("AvailableVersions", $availableVersions); + } + + /** + * NodeInfoSet: 各个节点升级信息, 参照 ClusterUpdateNodeInfo + * + * @return ClusterUpdateNodeInfo[]|null + */ + public function getNodeInfoSet() + { + $items = $this->get("NodeInfoSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClusterUpdateNodeInfo($item)); + } + return $result; + } + + /** + * NodeInfoSet: 各个节点升级信息, 参照 ClusterUpdateNodeInfo + * + * @param ClusterUpdateNodeInfo[] $nodeInfoSet + */ + public function setNodeInfoSet(array $nodeInfoSet) + { + $result = []; + foreach ($nodeInfoSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Models/InstanceTypeBootDisk.php b/src/UK8S/Models/InstanceTypeBootDisk.php new file mode 100644 index 00000000..43067026 --- /dev/null +++ b/src/UK8S/Models/InstanceTypeBootDisk.php @@ -0,0 +1,104 @@ +get("Name"); + } + + /** + * Name: 系统盘类型名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * InstantResize: 是否支持即时扩容 + * + * @return boolean|null + */ + public function getInstantResize() + { + return $this->get("InstantResize"); + } + + /** + * InstantResize: 是否支持即时扩容 + * + * @param boolean $instantResize + */ + public function setInstantResize($instantResize) + { + $this->set("InstantResize", $instantResize); + } + + /** + * MaximalSize: 最大磁盘容量 + * + * @return integer|null + */ + public function getMaximalSize() + { + return $this->get("MaximalSize"); + } + + /** + * MaximalSize: 最大磁盘容量 + * + * @param int $maximalSize + */ + public function setMaximalSize($maximalSize) + { + $this->set("MaximalSize", $maximalSize); + } + + /** + * Features: 磁盘特性列表 + * + * @return string[]|null + */ + public function getFeatures() + { + return $this->get("Features"); + } + + /** + * Features: 磁盘特性列表 + * + * @param string[] $features + */ + public function setFeatures(array $features) + { + $this->set("Features", $features); + } +} diff --git a/src/UK8S/Models/InstanceTypeCpuPlatform.php b/src/UK8S/Models/InstanceTypeCpuPlatform.php new file mode 100644 index 00000000..3e8c0e21 --- /dev/null +++ b/src/UK8S/Models/InstanceTypeCpuPlatform.php @@ -0,0 +1,84 @@ +get("Name"); + } + + /** + * Name: CPU 平台名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * CpuModels: CPU 型号列表 + * + * @return string[]|null + */ + public function getCpuModels() + { + return $this->get("CpuModels"); + } + + /** + * CpuModels: CPU 型号列表 + * + * @param string[] $cpuModels + */ + public function setCpuModels(array $cpuModels) + { + $this->set("CpuModels", $cpuModels); + } + + /** + * CpuFrequency: CPU 频率 + * + * @return string|null + */ + public function getCpuFrequency() + { + return $this->get("CpuFrequency"); + } + + /** + * CpuFrequency: CPU 频率 + * + * @param string $cpuFrequency + */ + public function setCpuFrequency($cpuFrequency) + { + $this->set("CpuFrequency", $cpuFrequency); + } +} diff --git a/src/UK8S/Models/InstanceTypeDataDisk.php b/src/UK8S/Models/InstanceTypeDataDisk.php new file mode 100644 index 00000000..a4d499ec --- /dev/null +++ b/src/UK8S/Models/InstanceTypeDataDisk.php @@ -0,0 +1,104 @@ +get("Name"); + } + + /** + * Name: 数据盘类型名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * MinimalSize: 最小磁盘容量 + * + * @return integer|null + */ + public function getMinimalSize() + { + return $this->get("MinimalSize"); + } + + /** + * MinimalSize: 最小磁盘容量 + * + * @param int $minimalSize + */ + public function setMinimalSize($minimalSize) + { + $this->set("MinimalSize", $minimalSize); + } + + /** + * MaximalSize: 最大磁盘容量 + * + * @return integer|null + */ + public function getMaximalSize() + { + return $this->get("MaximalSize"); + } + + /** + * MaximalSize: 最大磁盘容量 + * + * @param int $maximalSize + */ + public function setMaximalSize($maximalSize) + { + $this->set("MaximalSize", $maximalSize); + } + + /** + * Features: 磁盘特性列表 + * + * @return string[]|null + */ + public function getFeatures() + { + return $this->get("Features"); + } + + /** + * Features: 磁盘特性列表 + * + * @param string[] $features + */ + public function setFeatures(array $features) + { + $this->set("Features", $features); + } +} diff --git a/src/UK8S/Models/InstanceTypeDisk.php b/src/UK8S/Models/InstanceTypeDisk.php new file mode 100644 index 00000000..df7a59b2 --- /dev/null +++ b/src/UK8S/Models/InstanceTypeDisk.php @@ -0,0 +1,108 @@ +get("Name"); + } + + /** + * Name: 磁盘配置名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * BootDisk: 支持的系统盘配置 + * + * @return InstanceTypeBootDisk[]|null + */ + public function getBootDisk() + { + $items = $this->get("BootDisk"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new InstanceTypeBootDisk($item)); + } + return $result; + } + + /** + * BootDisk: 支持的系统盘配置 + * + * @param InstanceTypeBootDisk[] $bootDisk + */ + public function setBootDisk(array $bootDisk) + { + $result = []; + foreach ($bootDisk as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DataDisk: 支持的数据盘配置 + * + * @return InstanceTypeDataDisk[]|null + */ + public function getDataDisk() + { + $items = $this->get("DataDisk"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new InstanceTypeDataDisk($item)); + } + return $result; + } + + /** + * DataDisk: 支持的数据盘配置 + * + * @param InstanceTypeDataDisk[] $dataDisk + */ + public function setDataDisk(array $dataDisk) + { + $result = []; + foreach ($dataDisk as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Models/InstanceTypeFeature.php b/src/UK8S/Models/InstanceTypeFeature.php new file mode 100644 index 00000000..d1760fb7 --- /dev/null +++ b/src/UK8S/Models/InstanceTypeFeature.php @@ -0,0 +1,76 @@ +get("Name"); + } + + /** + * Name: 特性名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Modes: 特性模式列表 + * + * @return InstanceTypeFeatureMode[]|null + */ + public function getModes() + { + $items = $this->get("Modes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new InstanceTypeFeatureMode($item)); + } + return $result; + } + + /** + * Modes: 特性模式列表 + * + * @param InstanceTypeFeatureMode[] $modes + */ + public function setModes(array $modes) + { + $result = []; + foreach ($modes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Models/InstanceTypeFeatureMode.php b/src/UK8S/Models/InstanceTypeFeatureMode.php new file mode 100644 index 00000000..0c608080 --- /dev/null +++ b/src/UK8S/Models/InstanceTypeFeatureMode.php @@ -0,0 +1,84 @@ +get("Name"); + } + + /** + * Name: 模式名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * RelatedToImageFeature: 关联的镜像特性 + * + * @return string[]|null + */ + public function getRelatedToImageFeature() + { + return $this->get("RelatedToImageFeature"); + } + + /** + * RelatedToImageFeature: 关联的镜像特性 + * + * @param string[] $relatedToImageFeature + */ + public function setRelatedToImageFeature(array $relatedToImageFeature) + { + $this->set("RelatedToImageFeature", $relatedToImageFeature); + } + + /** + * MinimalCpuPlatform: 最低 CPU 平台列表 + * + * @return string[]|null + */ + public function getMinimalCpuPlatform() + { + return $this->get("MinimalCpuPlatform"); + } + + /** + * MinimalCpuPlatform: 最低 CPU 平台列表 + * + * @param string[] $minimalCpuPlatform + */ + public function setMinimalCpuPlatform(array $minimalCpuPlatform) + { + $this->set("MinimalCpuPlatform", $minimalCpuPlatform); + } +} diff --git a/src/UK8S/Models/InstanceTypeMachineSize.php b/src/UK8S/Models/InstanceTypeMachineSize.php new file mode 100644 index 00000000..2c9d406d --- /dev/null +++ b/src/UK8S/Models/InstanceTypeMachineSize.php @@ -0,0 +1,76 @@ +get("Gpu"); + } + + /** + * Gpu: GPU 数量 + * + * @param int $gpu + */ + public function setGpu($gpu) + { + $this->set("Gpu", $gpu); + } + + /** + * Collection: CPU 与内存规格组合 + * + * @return InstanceTypeMachineSizeCollection[]|null + */ + public function getCollection() + { + $items = $this->get("Collection"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new InstanceTypeMachineSizeCollection($item)); + } + return $result; + } + + /** + * Collection: CPU 与内存规格组合 + * + * @param InstanceTypeMachineSizeCollection[] $collection + */ + public function setCollection(array $collection) + { + $result = []; + foreach ($collection as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Models/InstanceTypeMachineSizeCollection.php b/src/UK8S/Models/InstanceTypeMachineSizeCollection.php new file mode 100644 index 00000000..3bb01adf --- /dev/null +++ b/src/UK8S/Models/InstanceTypeMachineSizeCollection.php @@ -0,0 +1,84 @@ +get("Cpu"); + } + + /** + * Cpu: CPU 核数 + * + * @param int $cpu + */ + public function setCpu($cpu) + { + $this->set("Cpu", $cpu); + } + + /** + * Memory: 可用内存容量列表 + * + * @return int[]|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 可用内存容量列表 + * + * @param int[] $memory + */ + public function setMemory(array $memory) + { + $this->set("Memory", $memory); + } + + /** + * MinimalCpuPlatform: 最低 CPU 平台列表 + * + * @return string[]|null + */ + public function getMinimalCpuPlatform() + { + return $this->get("MinimalCpuPlatform"); + } + + /** + * MinimalCpuPlatform: 最低 CPU 平台列表 + * + * @param string[] $minimalCpuPlatform + */ + public function setMinimalCpuPlatform(array $minimalCpuPlatform) + { + $this->set("MinimalCpuPlatform", $minimalCpuPlatform); + } +} diff --git a/src/UK8S/Models/InstanceTypeUHostFamily.php b/src/UK8S/Models/InstanceTypeUHostFamily.php new file mode 100644 index 00000000..277ae16b --- /dev/null +++ b/src/UK8S/Models/InstanceTypeUHostFamily.php @@ -0,0 +1,96 @@ +get("Name"); + } + + /** + * Name: 规格族名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * CpuFrequency: CPU 频率 + * + * @return string|null + */ + public function getCpuFrequency() + { + return $this->get("CpuFrequency"); + } + + /** + * CpuFrequency: CPU 频率 + * + * @param string $cpuFrequency + */ + public function setCpuFrequency($cpuFrequency) + { + $this->set("CpuFrequency", $cpuFrequency); + } + + /** + * CpuPlatforms: 支持的 CPU 平台 + * + * @return InstanceTypeCpuPlatform[]|null + */ + public function getCpuPlatforms() + { + $items = $this->get("CpuPlatforms"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new InstanceTypeCpuPlatform($item)); + } + return $result; + } + + /** + * CpuPlatforms: 支持的 CPU 平台 + * + * @param InstanceTypeCpuPlatform[] $cpuPlatforms + */ + public function setCpuPlatforms(array $cpuPlatforms) + { + $result = []; + foreach ($cpuPlatforms as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Models/InstanceTypeValueRate.php b/src/UK8S/Models/InstanceTypeValueRate.php new file mode 100644 index 00000000..1ce1d1be --- /dev/null +++ b/src/UK8S/Models/InstanceTypeValueRate.php @@ -0,0 +1,64 @@ +get("Value"); + } + + /** + * Value: 数值 + * + * @param float $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } + + /** + * Rate: 评分 + * + * @return integer|null + */ + public function getRate() + { + return $this->get("Rate"); + } + + /** + * Rate: 评分 + * + * @param int $rate + */ + public function setRate($rate) + { + $this->set("Rate", $rate); + } +} diff --git a/src/UK8S/Models/MonitorInfo.php b/src/UK8S/Models/MonitorInfo.php new file mode 100644 index 00000000..6b699c63 --- /dev/null +++ b/src/UK8S/Models/MonitorInfo.php @@ -0,0 +1,44 @@ +get("AvailableVersion"); + } + + /** + * AvailableVersion: 最新可用监控插件版本。 + * + * @param string $availableVersion + */ + public function setAvailableVersion($availableVersion) + { + $this->set("AvailableVersion", $availableVersion); + } +} diff --git a/src/UK8S/Models/NodeGroupDiskConfig.php b/src/UK8S/Models/NodeGroupDiskConfig.php new file mode 100644 index 00000000..5800f9d1 --- /dev/null +++ b/src/UK8S/Models/NodeGroupDiskConfig.php @@ -0,0 +1,104 @@ +get("IsBoot"); + } + + /** + * IsBoot: 是否为系统盘 + * + * @param boolean $isBoot + */ + public function setIsBoot($isBoot) + { + $this->set("IsBoot", $isBoot); + } + + /** + * Type: 磁盘类型 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 磁盘类型 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Size: 磁盘大小,单位 GB + * + * @return integer|null + */ + public function getSize() + { + return $this->get("Size"); + } + + /** + * Size: 磁盘大小,单位 GB + * + * @param int $size + */ + public function setSize($size) + { + $this->set("Size", $size); + } + + /** + * KmsKeyId: 磁盘加密密钥 ID + * + * @return string|null + */ + public function getKmsKeyId() + { + return $this->get("KmsKeyId"); + } + + /** + * KmsKeyId: 磁盘加密密钥 ID + * + * @param string $kmsKeyId + */ + public function setKmsKeyId($kmsKeyId) + { + $this->set("KmsKeyId", $kmsKeyId); + } +} diff --git a/src/UK8S/Models/NodeGroupSet.php b/src/UK8S/Models/NodeGroupSet.php index cfe7092d..7a3893cb 100644 --- a/src/UK8S/Models/NodeGroupSet.php +++ b/src/UK8S/Models/NodeGroupSet.php @@ -42,6 +42,46 @@ public function setZone($zone) $this->set("Zone", $zone); } + /** + * ImageStatus: 镜像状态:Unknown、Normal、Deleted、NotLatest + * + * @return string|null + */ + public function getImageStatus() + { + return $this->get("ImageStatus"); + } + + /** + * ImageStatus: 镜像状态:Unknown、Normal、Deleted、NotLatest + * + * @param string $imageStatus + */ + public function setImageStatus($imageStatus) + { + $this->set("ImageStatus", $imageStatus); + } + + /** + * DataDiskKmsKeyId: 数据盘加密密钥 ID + * + * @return string|null + */ + public function getDataDiskKmsKeyId() + { + return $this->get("DataDiskKmsKeyId"); + } + + /** + * DataDiskKmsKeyId: 数据盘加密密钥 ID + * + * @param string $dataDiskKmsKeyId + */ + public function setDataDiskKmsKeyId($dataDiskKmsKeyId) + { + $this->set("DataDiskKmsKeyId", $dataDiskKmsKeyId); + } + /** * NodeGroupId: 节点池ID * @@ -789,7 +829,7 @@ public function setUNIFeature($uniFeature) /** * Disks: 磁盘列表 * - * @return DiskSet[]|null + * @return NodeGroupDiskConfig[]|null */ public function getDisks() { @@ -799,7 +839,7 @@ public function getDisks() } $result = []; foreach ($items as $i => $item) { - array_push($result, new DiskSet($item)); + array_push($result, new NodeGroupDiskConfig($item)); } return $result; } @@ -807,7 +847,7 @@ public function getDisks() /** * Disks: 磁盘列表 * - * @param DiskSet[] $disks + * @param NodeGroupDiskConfig[] $disks */ public function setDisks(array $disks) { diff --git a/src/UK8S/Models/NodePlugin.php b/src/UK8S/Models/NodePlugin.php new file mode 100644 index 00000000..e917ba39 --- /dev/null +++ b/src/UK8S/Models/NodePlugin.php @@ -0,0 +1,136 @@ +get("Name"); + } + + /** + * Name: 插件名称, 如 CNI, CSI, Flexv, CloudProvider + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * PluginInfoSet: 各个节点插件信息, 参照NodePluginInfo + * + * @return NodePluginInfo[]|null + */ + public function getPluginInfoSet() + { + $items = $this->get("PluginInfoSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodePluginInfo($item)); + } + return $result; + } + + /** + * PluginInfoSet: 各个节点插件信息, 参照NodePluginInfo + * + * @param NodePluginInfo[] $pluginInfoSet + */ + public function setPluginInfoSet(array $pluginInfoSet) + { + $result = []; + foreach ($pluginInfoSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * AvailableVersion: 最新插件版本 + * + * @return string|null + */ + public function getAvailableVersion() + { + return $this->get("AvailableVersion"); + } + + /** + * AvailableVersion: 最新插件版本 + * + * @param string $availableVersion + */ + public function setAvailableVersion($availableVersion) + { + $this->set("AvailableVersion", $availableVersion); + } + + /** + * ReleaseTime: 最新插件发布时间 + * + * @return string|null + */ + public function getReleaseTime() + { + return $this->get("ReleaseTime"); + } + + /** + * ReleaseTime: 最新插件发布时间 + * + * @param string $releaseTime + */ + public function setReleaseTime($releaseTime) + { + $this->set("ReleaseTime", $releaseTime); + } + + /** + * ManageEnabled: 插件管理是否开启 + * + * @return boolean|null + */ + public function getManageEnabled() + { + return $this->get("ManageEnabled"); + } + + /** + * ManageEnabled: 插件管理是否开启 + * + * @param boolean $manageEnabled + */ + public function setManageEnabled($manageEnabled) + { + $this->set("ManageEnabled", $manageEnabled); + } +} diff --git a/src/UK8S/Models/NodePluginInfo.php b/src/UK8S/Models/NodePluginInfo.php new file mode 100644 index 00000000..2aade76b --- /dev/null +++ b/src/UK8S/Models/NodePluginInfo.php @@ -0,0 +1,144 @@ +get("Node"); + } + + /** + * Node: Node节点名称 + * + * @param string $node + */ + public function setNode($node) + { + $this->set("Node", $node); + } + + /** + * Version: 插件版本 + * + * @return string|null + */ + public function getVersion() + { + return $this->get("Version"); + } + + /** + * Version: 插件版本 + * + * @param string $version + */ + public function setVersion($version) + { + $this->set("Version", $version); + } + + /** + * Status: 插件工作状态,0:未知,1:正常,2:异常, 3: 升级中 + * + * @return integer|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 插件工作状态,0:未知,1:正常,2:异常, 3: 升级中 + * + * @param int $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * UpdateTime: 插件信息更新时间 + * + * @return integer|null + */ + public function getUpdateTime() + { + return $this->get("UpdateTime"); + } + + /** + * UpdateTime: 插件信息更新时间 + * + * @param int $updateTime + */ + public function setUpdateTime($updateTime) + { + $this->set("UpdateTime", $updateTime); + } + + /** + * OperationResult: 上次插件操作结果,0:没有上次操作结果,或当前正在执行升级或查询 1:获取成功 2 获取失败 3 升级成功 4 升级失败 + * + * @return integer|null + */ + public function getOperationResult() + { + return $this->get("OperationResult"); + } + + /** + * OperationResult: 上次插件操作结果,0:没有上次操作结果,或当前正在执行升级或查询 1:获取成功 2 获取失败 3 升级成功 4 升级失败 + * + * @param int $operationResult + */ + public function setOperationResult($operationResult) + { + $this->set("OperationResult", $operationResult); + } + + /** + * IP: Node节点IP + * + * @return string|null + */ + public function getIP() + { + return $this->get("IP"); + } + + /** + * IP: Node节点IP + * + * @param string $ip + */ + public function setIP($ip) + { + $this->set("IP", $ip); + } +} diff --git a/src/UK8S/Models/RuntimeConvertInfo.php b/src/UK8S/Models/RuntimeConvertInfo.php new file mode 100644 index 00000000..f964ce47 --- /dev/null +++ b/src/UK8S/Models/RuntimeConvertInfo.php @@ -0,0 +1,136 @@ +get("NodeInfoSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodePluginInfo($item)); + } + return $result; + } + + /** + * NodeInfoSet: 各节点的运行时转换状态。 + * + * @param NodePluginInfo[] $nodeInfoSet + */ + public function setNodeInfoSet(array $nodeInfoSet) + { + $result = []; + foreach ($nodeInfoSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Stage: 集群从未进行过运行时转换则返回 Unknown集群运行时转换几个阶段 Precheck->Updating→Success如果转换失败则为 Failed + * + * @return string|null + */ + public function getStage() + { + return $this->get("Stage"); + } + + /** + * Stage: 集群从未进行过运行时转换则返回 Unknown集群运行时转换几个阶段 Precheck->Updating→Success如果转换失败则为 Failed + * + * @param string $stage + */ + public function setStage($stage) + { + $this->set("Stage", $stage); + } + + /** + * UpdateTime: 运行时转换信息更新时间,Unix 时间戳,单位秒。 + * + * @return integer|null + */ + public function getUpdateTime() + { + return $this->get("UpdateTime"); + } + + /** + * UpdateTime: 运行时转换信息更新时间,Unix 时间戳,单位秒。 + * + * @param int $updateTime + */ + public function setUpdateTime($updateTime) + { + $this->set("UpdateTime", $updateTime); + } + + /** + * RuntimeName: 容器运行时名称。 + * + * @return string|null + */ + public function getRuntimeName() + { + return $this->get("RuntimeName"); + } + + /** + * RuntimeName: 容器运行时名称。 + * + * @param string $runtimeName + */ + public function setRuntimeName($runtimeName) + { + $this->set("RuntimeName", $runtimeName); + } + + /** + * RuntimeVersion: 容器运行时版本。 + * + * @return string|null + */ + public function getRuntimeVersion() + { + return $this->get("RuntimeVersion"); + } + + /** + * RuntimeVersion: 容器运行时版本。 + * + * @param string $runtimeVersion + */ + public function setRuntimeVersion($runtimeVersion) + { + $this->set("RuntimeVersion", $runtimeVersion); + } +} diff --git a/src/UK8S/Models/SecGroupId.php b/src/UK8S/Models/SecGroupId.php index 3bd3230c..04f750e5 100644 --- a/src/UK8S/Models/SecGroupId.php +++ b/src/UK8S/Models/SecGroupId.php @@ -23,7 +23,7 @@ class SecGroupId extends Response /** - * Id: 安全组名称 + * Id: 安全组 ID * * @return string|null */ @@ -33,7 +33,7 @@ public function getId() } /** - * Id: 安全组名称 + * Id: 安全组 ID * * @param string $id */ @@ -43,7 +43,7 @@ public function setId($id) } /** - * Name: 安全组id + * Name: 安全组名称 * * @return string|null */ @@ -53,7 +53,7 @@ public function getName() } /** - * Name: 安全组id + * Name: 安全组名称 * * @param string $name */ diff --git a/src/UK8S/Models/UK8SAvailableInstanceType.php b/src/UK8S/Models/UK8SAvailableInstanceType.php new file mode 100644 index 00000000..98a018da --- /dev/null +++ b/src/UK8S/Models/UK8SAvailableInstanceType.php @@ -0,0 +1,332 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * Name: 机型名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 机型名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Status: 机型状态 + * + * @return string|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 机型状态 + * + * @param string $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * Description: 机型描述 + * + * @return string|null + */ + public function getDescription() + { + return $this->get("Description"); + } + + /** + * Description: 机型描述 + * + * @param string $description + */ + public function setDescription($description) + { + $this->set("Description", $description); + } + + /** + * UHostFamilies: 主机系列列表 + * + * @return InstanceTypeUHostFamily[]|null + */ + public function getUHostFamilies() + { + $items = $this->get("UHostFamilies"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new InstanceTypeUHostFamily($item)); + } + return $result; + } + + /** + * UHostFamilies: 主机系列列表 + * + * @param InstanceTypeUHostFamily[] $uHostFamilies + */ + public function setUHostFamilies(array $uHostFamilies) + { + $result = []; + foreach ($uHostFamilies as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Disks: 支持的磁盘配置 + * + * @return InstanceTypeDisk[]|null + */ + public function getDisks() + { + $items = $this->get("Disks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new InstanceTypeDisk($item)); + } + return $result; + } + + /** + * Disks: 支持的磁盘配置 + * + * @param InstanceTypeDisk[] $disks + */ + public function setDisks(array $disks) + { + $result = []; + foreach ($disks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * MachineSizes: 支持的机型规格 + * + * @return InstanceTypeMachineSize[]|null + */ + public function getMachineSizes() + { + $items = $this->get("MachineSizes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new InstanceTypeMachineSize($item)); + } + return $result; + } + + /** + * MachineSizes: 支持的机型规格 + * + * @param InstanceTypeMachineSize[] $machineSizes + */ + public function setMachineSizes(array $machineSizes) + { + $result = []; + foreach ($machineSizes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Features: 机型特性列表 + * + * @return InstanceTypeFeature[]|null + */ + public function getFeatures() + { + $items = $this->get("Features"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new InstanceTypeFeature($item)); + } + return $result; + } + + /** + * Features: 机型特性列表 + * + * @param InstanceTypeFeature[] $features + */ + public function setFeatures(array $features) + { + $result = []; + foreach ($features as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * MachineClass: 机型类别 + * + * @return string|null + */ + public function getMachineClass() + { + return $this->get("MachineClass"); + } + + /** + * MachineClass: 机型类别 + * + * @param string $machineClass + */ + public function setMachineClass($machineClass) + { + $this->set("MachineClass", $machineClass); + } + + /** + * InstanceType: 实例类型 + * + * @return string|null + */ + public function getInstanceType() + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: 实例类型 + * + * @param string $instanceType + */ + public function setInstanceType($instanceType) + { + $this->set("InstanceType", $instanceType); + } + + /** + * ParentType: 父机型类型 + * + * @return string|null + */ + public function getParentType() + { + return $this->get("ParentType"); + } + + /** + * ParentType: 父机型类型 + * + * @param string $parentType + */ + public function setParentType($parentType) + { + $this->set("ParentType", $parentType); + } + + /** + * GraphicsMemory: 显存信息 + * + * @return InstanceTypeValueRate|null + */ + public function getGraphicsMemory() + { + return new InstanceTypeValueRate($this->get("GraphicsMemory")); + } + + /** + * GraphicsMemory: 显存信息 + * + * @param InstanceTypeValueRate $graphicsMemory + */ + public function setGraphicsMemory(array $graphicsMemory) + { + $this->set("GraphicsMemory", $graphicsMemory->getAll()); + } + + /** + * Performance: 性能信息 + * + * @return InstanceTypeValueRate|null + */ + public function getPerformance() + { + return new InstanceTypeValueRate($this->get("Performance")); + } + + /** + * Performance: 性能信息 + * + * @param InstanceTypeValueRate $performance + */ + public function setPerformance(array $performance) + { + $this->set("Performance", $performance->getAll()); + } +} diff --git a/src/UK8S/Models/VKNode.php b/src/UK8S/Models/VKNode.php new file mode 100644 index 00000000..7dca1119 --- /dev/null +++ b/src/UK8S/Models/VKNode.php @@ -0,0 +1,136 @@ +get("Name"); + } + + /** + * Name: 插件名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * PluginInfoSet: 各虚拟节点的插件信息。 + * + * @return VKNodeInfo[]|null + */ + public function getPluginInfoSet() + { + $items = $this->get("PluginInfoSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new VKNodeInfo($item)); + } + return $result; + } + + /** + * PluginInfoSet: 各虚拟节点的插件信息。 + * + * @param VKNodeInfo[] $pluginInfoSet + */ + public function setPluginInfoSet(array $pluginInfoSet) + { + $result = []; + foreach ($pluginInfoSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * AvailableVersion: 最新版本 + * + * @return string|null + */ + public function getAvailableVersion() + { + return $this->get("AvailableVersion"); + } + + /** + * AvailableVersion: 最新版本 + * + * @param string $availableVersion + */ + public function setAvailableVersion($availableVersion) + { + $this->set("AvailableVersion", $availableVersion); + } + + /** + * ReleaseTime: 发布时间 + * + * @return string|null + */ + public function getReleaseTime() + { + return $this->get("ReleaseTime"); + } + + /** + * ReleaseTime: 发布时间 + * + * @param string $releaseTime + */ + public function setReleaseTime($releaseTime) + { + $this->set("ReleaseTime", $releaseTime); + } + + /** + * ManageEnabled: 插件管理是否开启 + * + * @return boolean|null + */ + public function getManageEnabled() + { + return $this->get("ManageEnabled"); + } + + /** + * ManageEnabled: 插件管理是否开启 + * + * @param boolean $manageEnabled + */ + public function setManageEnabled($manageEnabled) + { + $this->set("ManageEnabled", $manageEnabled); + } +} diff --git a/src/UK8S/Models/VKNodeInfo.php b/src/UK8S/Models/VKNodeInfo.php new file mode 100644 index 00000000..84e0ed8a --- /dev/null +++ b/src/UK8S/Models/VKNodeInfo.php @@ -0,0 +1,124 @@ +get("Node"); + } + + /** + * Node: 节点 ID。 + * + * @param string $node + */ + public function setNode($node) + { + $this->set("Node", $node); + } + + /** + * Version: 插件版本。 + * + * @return string|null + */ + public function getVersion() + { + return $this->get("Version"); + } + + /** + * Version: 插件版本。 + * + * @param string $version + */ + public function setVersion($version) + { + $this->set("Version", $version); + } + + /** + * Status: 插件状态:0 未知,1 正常,2 异常,3 升级中。 + * + * @return integer|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 插件状态:0 未知,1 正常,2 异常,3 升级中。 + * + * @param int $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * UpdateTime: 更新时间,Unix 时间戳,单位秒。 + * + * @return integer|null + */ + public function getUpdateTime() + { + return $this->get("UpdateTime"); + } + + /** + * UpdateTime: 更新时间,Unix 时间戳,单位秒。 + * + * @param int $updateTime + */ + public function setUpdateTime($updateTime) + { + $this->set("UpdateTime", $updateTime); + } + + /** + * OperationResult: 上次插件操作结果:0 无结果,1 查询成功,2 查询失败,3 升级成功,4 升级失败。 + * + * @return integer|null + */ + public function getOperationResult() + { + return $this->get("OperationResult"); + } + + /** + * OperationResult: 上次插件操作结果:0 无结果,1 查询成功,2 查询失败,3 升级成功,4 升级失败。 + * + * @param int $operationResult + */ + public function setOperationResult($operationResult) + { + $this->set("OperationResult", $operationResult); + } +} diff --git a/src/UK8S/UK8SClient.php b/src/UK8S/UK8SClient.php index faf38dfe..243748dd 100644 --- a/src/UK8S/UK8SClient.php +++ b/src/UK8S/UK8SClient.php @@ -18,6 +18,8 @@ use UCloud\Core\Client; use UCloud\Core\Exception\UCloudException; +use UCloud\UK8S\Apis\AddUK8SAutoScalingGroupV2Request; +use UCloud\UK8S\Apis\AddUK8SAutoScalingGroupV2Response; use UCloud\UK8S\Apis\AddUK8SExistingUHostRequest; use UCloud\UK8S\Apis\AddUK8SExistingUHostResponse; use UCloud\UK8S\Apis\AddUK8SNodeGroupRequest; @@ -34,16 +36,34 @@ use UCloud\UK8S\Apis\DelUK8SClusterResponse; use UCloud\UK8S\Apis\DelUK8SClusterNodeV2Request; use UCloud\UK8S\Apis\DelUK8SClusterNodeV2Response; +use UCloud\UK8S\Apis\DeleteUK8SAutoScalingGroupRequest; +use UCloud\UK8S\Apis\DeleteUK8SAutoScalingGroupResponse; use UCloud\UK8S\Apis\DeleteUK8SULSConfigRequest; use UCloud\UK8S\Apis\DeleteUK8SULSConfigResponse; +use UCloud\UK8S\Apis\DescribeUK8SAutoscalerGroupRequest; +use UCloud\UK8S\Apis\DescribeUK8SAutoscalerGroupResponse; use UCloud\UK8S\Apis\DescribeUK8SClusterRequest; use UCloud\UK8S\Apis\DescribeUK8SClusterResponse; use UCloud\UK8S\Apis\DescribeUK8SImageRequest; use UCloud\UK8S\Apis\DescribeUK8SImageResponse; use UCloud\UK8S\Apis\DescribeUK8SNodeRequest; use UCloud\UK8S\Apis\DescribeUK8SNodeResponse; +use UCloud\UK8S\Apis\EnableUK8SAutoscalerRequest; +use UCloud\UK8S\Apis\EnableUK8SAutoscalerResponse; use UCloud\UK8S\Apis\GetClusterConfigRequest; use UCloud\UK8S\Apis\GetClusterConfigResponse; +use UCloud\UK8S\Apis\GetUK8SAvailableInstanceTypesRequest; +use UCloud\UK8S\Apis\GetUK8SAvailableInstanceTypesResponse; +use UCloud\UK8S\Apis\GetUK8SCNINodeInfoRequest; +use UCloud\UK8S\Apis\GetUK8SCNINodeInfoResponse; +use UCloud\UK8S\Apis\GetUK8SIpamdStatusRequest; +use UCloud\UK8S\Apis\GetUK8SIpamdStatusResponse; +use UCloud\UK8S\Apis\GetUK8SLoadBalancerControllerRequest; +use UCloud\UK8S\Apis\GetUK8SLoadBalancerControllerResponse; +use UCloud\UK8S\Apis\GetUK8SNodeGroupRequest; +use UCloud\UK8S\Apis\GetUK8SNodeGroupResponse; +use UCloud\UK8S\Apis\GetUK8SPluginInfoRequest; +use UCloud\UK8S\Apis\GetUK8SPluginInfoResponse; use UCloud\UK8S\Apis\GetUK8SVersionsRequest; use UCloud\UK8S\Apis\GetUK8SVersionsResponse; use UCloud\UK8S\Apis\ListUK8SClusterNodeV2Request; @@ -58,6 +78,10 @@ use UCloud\UK8S\Apis\ModifyUK8SClusterNameResponse; use UCloud\UK8S\Apis\RemoveUK8SNodeGroupRequest; use UCloud\UK8S\Apis\RemoveUK8SNodeGroupResponse; +use UCloud\UK8S\Apis\UpdateUK8SAutoScalingGroupV2Request; +use UCloud\UK8S\Apis\UpdateUK8SAutoScalingGroupV2Response; +use UCloud\UK8S\Apis\UpdateUK8SAutoscalerRequest; +use UCloud\UK8S\Apis\UpdateUK8SAutoscalerResponse; use UCloud\UK8S\Apis\UpdateUK8SNodeGroupRequest; use UCloud\UK8S\Apis\UpdateUK8SNodeGroupResponse; use UCloud\UK8S\Apis\UpdateUK8SULSConfigRequest; @@ -69,6 +93,63 @@ class UK8SClient extends Client { + /** + * AddUK8SAutoScalingGroupV2 - 创建绑定已有节点池的自动伸缩组。当前请求校验仍要求提供 CPU、Mem、MachineType 和 Zone。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/add_uk8s_auto_scaling_group_v2 + * + * Arguments: + * + * $args = [ + * "Zone" => (string) 可用区 + * "ProjectId" => (string) 项目ID + * "Region" => (string) 地域 + * "ClusterId" => (string) 集群ID + * "Name" => (string) 伸缩组名字 + * "CPU" => (integer) 节点CPU大小 + * "Mem" => (integer) 节点Mem大小 + * "MachineType" => (string) 云主机机型。该参数仍需传入;实际节点规格取自绑定的节点池。 + * "Min" => (integer) 最小节点数,范围 0–100,且不得大于 Max。必须显式传入,允许为 0。 + * "Max" => (integer) 最大节点数,范围 1–100,且不得小于 Min。 + * "NodeGroupId" => (string) 伸缩组绑定的有效节点池 ID。当前实现必须提供,节点配置取自该节点池。 + * "Password" => (string) Base64 编码的节点登录密码。LoginMode 为 Password(默认)时必填,不会自动生成随机密码;KeyPair 模式下可不填。 + * "BootDiskType" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "DataDiskType" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "DataDiskSize" => (integer) 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + * "MinmalCpuPlatform" => (string) 最低 CPU 平台的兼容字段;同时提供 MinimalCpuPlatform 时以其为准。 + * "GpuType" => (string) GPU 类型;实际节点规格取自绑定的节点池。 + * "GPU" => (integer) GPU卡核心数。仅GPU机型支持此字段 + * "Labels" => (string) key=value,多组用”,“隔开,最多5组 + * "MaxPods" => (integer) 默认110, 支持16-512 + * "BootDiskSize" => (integer) 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 + * "ImageId" => (string) 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,不支持用户自定义镜像,传入自定义镜像 Id 将报错 + * "UserData" => (string) Base64 编码的 cloud-init 用户数据。 + * "InitScript" => (string) Base64 编码的用户脚本,在 UK8S 节点初始化完成后执行。 + * "ChargeType" => (string) 计费模式:Year、Month、Dynamic、Postpay,默认 Dynamic。此接口不接受 Preemptive。 + * "IsolationGroup" => (string) 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * "Taints" => (string) Node节点污点,形式为key=value:effect,多组taints用”,“隔开,最多支持五组。 + * "Tag" => (string) 业务组 + * "Priority" => (integer) 伸缩组的优先级,取值[1, 100],数值越大优先级越高,在扩容的时候会被更优先考虑。 + * "LoginMode" => (string) 节点登录方式:Password 或 KeyPair,默认 Password。 + * "KeyPairId" => (string) 登录密钥对 ID。LoginMode 为 KeyPair 时必填。 + * "MinimalCpuPlatform" => (string) 最低 CPU 平台;优先于兼容字段 MinmalCpuPlatform。 + * ] + * + * Outputs: + * + * $outputs = [ + * "AsgId" => (string) 创建的伸缩组 ID。 + * ] + * + * @return AddUK8SAutoScalingGroupV2Response + * @throws UCloudException + */ + public function addUK8SAutoScalingGroupV2(AddUK8SAutoScalingGroupV2Request $request = null) + { + $resp = $this->invoke($request); + return new AddUK8SAutoScalingGroupV2Response($resp->toArray(), $resp->getRequestId()); + } + /** * AddUK8SExistingUHost - 将预先创建好的云主机加入到UK8S集群,需要注意的是,该云主机依然会执行重装系统的操作。 * @@ -613,6 +694,34 @@ public function delUK8SClusterNodeV2(DelUK8SClusterNodeV2Request $request = null return new DelUK8SClusterNodeV2Response($resp->toArray(), $resp->getRequestId()); } + /** + * DeleteUK8SAutoScalingGroup - 删除伸缩组 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/delete_uk8s_auto_scaling_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Id" => (string) 伸缩组ID + * "ClusterId" => (string) 集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteUK8SAutoScalingGroupResponse + * @throws UCloudException + */ + public function deleteUK8SAutoScalingGroup(DeleteUK8SAutoScalingGroupRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUK8SAutoScalingGroupResponse($resp->toArray(), $resp->getRequestId()); + } + /** * DeleteUK8SULSConfig - 删除指定UK8S集群的日志采集规则。 * @@ -642,6 +751,147 @@ public function deleteUK8SULSConfig(DeleteUK8SULSConfigRequest $request = null) return new DeleteUK8SULSConfigResponse($resp->toArray(), $resp->getRequestId()); } + /** + * DescribeUK8SAutoscalerGroup - 获取autoscaler与auto scaling group信息 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/describe_uk8s_autoscaler_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区,可选。此接口按集群 ID 查询。 + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) 集群id + * ] + * + * Outputs: + * + * $outputs = [ + * "Autoscaler" => (object) 伸缩器[ + * "ScaleDownUnneededTime" => (integer) 节点持续不需要后触发缩容的等待时间,单位分钟。 + * "ScaleDownUtilizationThreshold" => (integer) 节点缩容利用率阈值,单位百分比,范围 0–100。 + * "ScaleDownDelayAfterAdd" => (integer) 添加节点后等待缩容的时间,单位分钟。 + * "Enabled" => (integer) 打开/关闭 + * "Version" => (string) 伸缩器版本 + * "UpdateTime" => (integer) 配置更新时间,Unix 时间戳,单位秒。 + * "ScaleDownGpuUtilizationThreshold" => (integer) GPU 缩容利用率阈值,单位百分比,范围 0–100。 + * ] + * "AutoScalingGroup" => (array) 伸缩组列表[ + * [ + * "Zone" => (string) 可用区 + * "Id" => (string) 伸缩组ID + * "Name" => (string) 伸缩组名字 + * "CPU" => (integer) 节点CPU + * "Mem" => (integer) 节点内存 + * "DataDiskType" => (string) 节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "DataDiskSize" => (integer) 节点数据盘大小 + * "BootDiskType" => (string) 节点系统盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "BootDiskSize" => (integer) 节点系统盘大小 + * "MachineType" => (string) 云主机机型。 + * "GPU" => (integer) GPU 数量。 + * "GpuType" => (string) GPU 类型。 + * "Labels" => (string) 节点标签 key=value,多组用”,“隔开,最多5组 + * "MaxPods" => (integer) Pods数量 默认110, 支持16-512 + * "MinmalCpuPlatform" => (string) 最低 CPU 平台的兼容字段,与 MinimalCpuPlatform 相同。 + * "UHostFamily" => (string) 主机规格族 + * "Min" => (integer) 最小node数量 + * "Max" => (integer) 最大node数量 + * "CurrentNodeNum" => (integer) 当前该伸缩组管理的node数量 + * "CreateTime" => (integer) 创建时间,Unix 时间戳,单位秒。 + * "UpdateTime" => (integer) 更新时间,Unix 时间戳,单位秒。 + * "ChargeType" => (string) 伸缩组的计费模式。 + * "IsolationGroup" => (string) 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * "Priority" => (integer) 优先级 + * "NodeCPU" => (integer) 节点CPU【兼容】 + * "NodeMem" => (integer) 节点内存【兼容】 + * "NodeDataDiskType" => (string) 节点数据盘类型【兼容】 + * "NodeDataDiskSize" => (integer) 节点数据盘大小【兼容】 + * "NodeBootDiskType" => (string) 旧伸缩组的系统盘类型。 + * "NodeUHostType" => (string) 节点云主机机型【兼容】 + * "NodeGroupId" => (string) 节点所属节点池id + * "SubnetId" => (string) 节点子网id【兼容】 + * "LoginMode" => (string) 节点登录方式:Password 或 KeyPair。 + * "KeyPairId" => (string) 登录密钥对 ID。 + * "MinimalCpuPlatform" => (string) 最低 CPU 平台。 + * "Taints" => (string) 节点污点配置。 + * "Tag" => (string) 业务组。 + * "ImageId" => (string) 镜像 ID。 + * "OsName" => (string) 操作系统名称。 + * "UserData" => (string) Base64 编码的 cloud-init 用户数据。 + * "InitScript" => (string) Base64 编码的节点初始化后脚本。 + * "SecurityMode" => (string) 节点安全模式:Firewall 或 SecGroup。 + * "SecGroupId" => (array) 安全组配置列表。[ + * [ + * "Id" => (string) 安全组 ID + * "Name" => (string) 安全组名称 + * "Priority" => (string) 安全组优先级 + * ] + * ] + * "SecurityGroupId" => (string) 防火墙 ID。 + * "NetworkInterface" => (array) 网卡配置列表。[ + * [ + * "EIP" => (object) EIP[ + * "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接口查询,或登录用户中心查看。 + * ] + * ] + * ] + * "KubeletConfiguration" => (object) Kubelet 自定义配置。[ + * "ContainerLogMaxFiles" => (integer) 最大日志文件数量 + * "ContainerLogMaxSize" => (string) 最大日志文件大小 + * "EvictionHard" => (object) 硬性驱逐条件,EvictionCondition类型[ + * "MemoryAvailable" => (string) 内存相关驱逐条件或宽限时间。 + * "ImagefsAvailable" => (string) 镜像文件系统存储相关驱逐条件或宽限时间。 + * "NodefsAvailable" => (string) 节点存储余量相关驱逐条件或宽限时间。 + * "NodefsInodesFree" => (string) 节点剩余inodes驱逐条件或宽限时间。 + * ] + * "EvictionSoft" => (object) 软性驱逐条件,EvictionCondition类型[ + * "MemoryAvailable" => (string) 内存相关驱逐条件或宽限时间。 + * "ImagefsAvailable" => (string) 镜像文件系统存储相关驱逐条件或宽限时间。 + * "NodefsAvailable" => (string) 节点存储余量相关驱逐条件或宽限时间。 + * "NodefsInodesFree" => (string) 节点剩余inodes驱逐条件或宽限时间。 + * ] + * "EvictionSoftGracePeriod" => (object) 软性驱逐宽限时间,EvictionCondition类型[ + * "MemoryAvailable" => (string) 内存相关驱逐条件或宽限时间。 + * "ImagefsAvailable" => (string) 镜像文件系统存储相关驱逐条件或宽限时间。 + * "NodefsAvailable" => (string) 节点存储余量相关驱逐条件或宽限时间。 + * "NodefsInodesFree" => (string) 节点剩余inodes驱逐条件或宽限时间。 + * ] + * "ImageGCHighThresholdPercent" => (integer) 镜像垃圾收集阈值 + * "ImageGCLowThresholdPercent" => (integer) 停止镜像垃圾收集阈值 + * "KubeReserved" => (object) kubelet预留资源,ReservedResource类型[ + * "CPU" => (string) CPU + * "Memory" => (string) 内存 + * "EphemeralStorage" => (string) 存储 + * "Pid" => (string) Pid + * ] + * "SystemReserved" => (object) 系统预留资源,ReservedResource类型[ + * "CPU" => (string) CPU + * "Memory" => (string) 内存 + * "EphemeralStorage" => (string) 存储 + * "Pid" => (string) Pid + * ] + * "MaxPods" => (integer) 最大Pod数量 + * ] + * "Password" => (string) Base64 编码的节点登录密码。 + * ] + * ] + * "Update" => (integer) 0:无需更新1:有更新2:强制更新 + * ] + * + * @return DescribeUK8SAutoscalerGroupResponse + * @throws UCloudException + */ + public function describeUK8SAutoscalerGroup(DescribeUK8SAutoscalerGroupRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUK8SAutoscalerGroupResponse($resp->toArray(), $resp->getRequestId()); + } + /** * DescribeUK8SCluster - 获取集群信息 * @@ -713,8 +963,8 @@ public function deleteUK8SULSConfig(DeleteUK8SULSConfigRequest $request = null) * "MachineType" => (string) 主机机型类别 * "SecGroupId" => (array) 节点关联的安全组列表[ * [ - * "Id" => (string) 安全组名称 - * "Name" => (string) 安全组id + * "Id" => (string) 安全组 ID + * "Name" => (string) 安全组名称 * "Priority" => (string) 安全组优先级 * ] * ] @@ -768,8 +1018,8 @@ public function deleteUK8SULSConfig(DeleteUK8SULSConfigRequest $request = null) * "MachineType" => (string) 主机机型类别 * "SecGroupId" => (array) 节点关联的安全组列表[ * [ - * "Id" => (string) 安全组名称 - * "Name" => (string) 安全组id + * "Id" => (string) 安全组 ID + * "Name" => (string) 安全组名称 * "Priority" => (string) 安全组优先级 * ] * ] @@ -792,13 +1042,13 @@ public function deleteUK8SULSConfig(DeleteUK8SULSConfigRequest $request = null) * "CNIMode" => (string) CNI模式,可选值VPC/Calico * "MonitorType" => (string) 集群的监控类型:no无监控;cloudwatch统一监控平台;prometheus内置监控 * "Autoscaler" => (object) 集群的节点伸缩(CA)配置[ - * "ScaleDownUnneededTime" => (string) 缩容触发延时 - * "ScaleDownUtilizationThreshold" => (string) CPU缩容阈值 - * "ScaleDownDelayAfterAdd" => (string) 静默时间 + * "ScaleDownUnneededTime" => (integer) 节点持续不需要后触发缩容的等待时间,单位分钟。 + * "ScaleDownUtilizationThreshold" => (integer) 节点缩容利用率阈值,单位百分比,范围 0–100。 + * "ScaleDownDelayAfterAdd" => (integer) 添加节点后等待缩容的时间,单位分钟。 * "Enabled" => (integer) 打开/关闭 * "Version" => (string) 伸缩器版本 - * "UpdateTime" => (integer) - * "ScaleDownGpuUtilizationThreshold" => (string) GPU缩容阈值 + * "UpdateTime" => (integer) 配置更新时间,Unix 时间戳,单位秒。 + * "ScaleDownGpuUtilizationThreshold" => (integer) GPU 缩容利用率阈值,单位百分比,范围 0–100。 * ] * "EnableUserAuth" => (boolean) 是否开启了授权管理功能 * "DedicatedPodSubnet" => (boolean) Pod是否使用独立子网 @@ -980,6 +1230,34 @@ public function describeUK8SNode(DescribeUK8SNodeRequest $request = null) return new DescribeUK8SNodeResponse($resp->toArray(), $resp->getRequestId()); } + /** + * EnableUK8SAutoscaler - 开启/关闭伸缩器 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/enable_uk8s_autoscaler + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) 集群ID + * "Enabled" => (integer) 1开启;0关闭 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return EnableUK8SAutoscalerResponse + * @throws UCloudException + */ + public function enableUK8SAutoscaler(EnableUK8SAutoscalerRequest $request = null) + { + $resp = $this->invoke($request); + return new EnableUK8SAutoscalerResponse($resp->toArray(), $resp->getRequestId()); + } + /** * GetClusterConfig - 获取集群配置文件,管理集群的凭证 * @@ -1010,6 +1288,470 @@ public function getClusterConfig(GetClusterConfigRequest $request = null) return new GetClusterConfigResponse($resp->toArray(), $resp->getRequestId()); } + /** + * GetUK8SAvailableInstanceTypes - 获取uk8s节点可用机型 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/get_uk8s_available_instance_types + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * ] + * + * Outputs: + * + * $outputs = [ + * "Status" => (string) 当前区域是否可售 + * "AvailableInstanceTypes" => (array) UK8S 支持的可用机型列表[ + * [ + * "Zone" => (string) 可用区 + * "Name" => (string) 机型名称 + * "Status" => (string) 机型状态 + * "Description" => (string) 机型描述 + * "UHostFamilies" => (array) 主机系列列表[ + * [ + * "Name" => (string) 规格族名称 + * "CpuFrequency" => (string) CPU 频率 + * "CpuPlatforms" => (array) 支持的 CPU 平台[ + * [ + * "Name" => (string) CPU 平台名称 + * "CpuModels" => (array) CPU 型号列表 + * "CpuFrequency" => (string) CPU 频率 + * ] + * ] + * ] + * ] + * "Disks" => (array) 支持的磁盘配置[ + * [ + * "Name" => (string) 磁盘配置名称 + * "BootDisk" => (array) 支持的系统盘配置[ + * [ + * "Name" => (string) 系统盘类型名称 + * "InstantResize" => (boolean) 是否支持即时扩容 + * "MaximalSize" => (integer) 最大磁盘容量 + * "Features" => (array) 磁盘特性列表 + * ] + * ] + * "DataDisk" => (array) 支持的数据盘配置[ + * [ + * "Name" => (string) 数据盘类型名称 + * "MinimalSize" => (integer) 最小磁盘容量 + * "MaximalSize" => (integer) 最大磁盘容量 + * "Features" => (array) 磁盘特性列表 + * ] + * ] + * ] + * ] + * "MachineSizes" => (array) 支持的机型规格[ + * [ + * "Gpu" => (integer) GPU 数量 + * "Collection" => (array) CPU 与内存规格组合[ + * [ + * "Cpu" => (integer) CPU 核数 + * "Memory" => (array) 可用内存容量列表 + * "MinimalCpuPlatform" => (array) 最低 CPU 平台列表 + * ] + * ] + * ] + * ] + * "Features" => (array) 机型特性列表[ + * [ + * "Name" => (string) 特性名称 + * "Modes" => (array) 特性模式列表[ + * [ + * "Name" => (string) 模式名称 + * "RelatedToImageFeature" => (array) 关联的镜像特性 + * "MinimalCpuPlatform" => (array) 最低 CPU 平台列表 + * ] + * ] + * ] + * ] + * "MachineClass" => (string) 机型类别 + * "InstanceType" => (string) 实例类型 + * "ParentType" => (string) 父机型类型 + * "GraphicsMemory" => (object) 显存信息[ + * "Value" => (number) 数值 + * "Rate" => (integer) 评分 + * ] + * "Performance" => (object) 性能信息[ + * "Value" => (number) 数值 + * "Rate" => (integer) 评分 + * ] + * ] + * ] + * ] + * + * @return GetUK8SAvailableInstanceTypesResponse + * @throws UCloudException + */ + public function getUK8SAvailableInstanceTypes(GetUK8SAvailableInstanceTypesRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUK8SAvailableInstanceTypesResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUK8SCNINodeInfo - 获取 UK8S 集群各节点的 CNI 版本、状态及版本同步情况。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/get_uk8s_cni_node_info + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区,可选。 + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) UK8S 集群 ID + * ] + * + * Outputs: + * + * $outputs = [ + * "NodeInfoSet" => (array) 节点 CNI 信息列表[ + * [ + * "Node" => (string) Node节点名称 + * "Version" => (string) 插件版本 + * "Status" => (integer) 插件工作状态,0:未知,1:正常,2:异常, 3: 升级中 + * "UpdateTime" => (integer) 插件信息更新时间 + * "OperationResult" => (integer) 上次插件操作结果,0:没有上次操作结果,或当前正在执行升级或查询 1:获取成功 2 获取失败 3 升级成功 4 升级失败 + * "IP" => (string) Node节点IP + * ] + * ] + * "DataSource" => (string) 数据来源:database 表示数据库记录,ipamd_http 表示通过 ipamd 实时查询。 + * "Partial" => (boolean) 是否存在部分节点实时查询失败 + * "HighestVersion" => (string) 节点中的最高有效 CNI 版本 + * "AllNodesSynced" => (boolean) 是否所有节点实时查询成功且 CNI 版本一致。数据来源为 database 时返回 false。 + * ] + * + * @return GetUK8SCNINodeInfoResponse + * @throws UCloudException + */ + public function getUK8SCNINodeInfo(GetUK8SCNINodeInfoRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUK8SCNINodeInfoResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUK8SIpamdStatus - 查询 ipamd 插件的安装状态、版本、CNI 初始化模式及模式切换能力。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/get_uk8s_ipamd_status + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区,可选。 + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) 集群id + * ] + * + * Outputs: + * + * $outputs = [ + * "Installed" => (boolean) 是否已经安装 + * "Version" => (string) 当前ipamd的版本 + * "LastVersion" => (string) ipamd可用最新版本 + * "ReleaseDate" => (integer) 最新版本的发布日期 + * "OpenTime" => (integer) 当前 ipamd 插件的创建时间,Unix 时间戳,单位秒。 + * "CNIInitMode" => (string) 当前 CNI 初始化模式。 + * "CNIInitVersionReady" => (boolean) 当前已安装的 ipamd 版本是否支持切换 CNI 初始化模式。 + * ] + * + * @return GetUK8SIpamdStatusResponse + * @throws UCloudException + */ + public function getUK8SIpamdStatus(GetUK8SIpamdStatusRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUK8SIpamdStatusResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUK8SLoadBalancerController - 获取 uk8s LoadBalancerController 信息 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/get_uk8s_load_balancer_controller + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区,可选。 + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) 集群 id + * ] + * + * Outputs: + * + * $outputs = [ + * "LastVersion" => (string) 最新可用版本。 + * "Version" => (string) 当前安装版本。 + * "Installed" => (boolean) 是否安装 + * "CreateTime" => (integer) 安装时间,Unix 时间戳,单位秒。 + * "Status" => (string) 运行状态:unknown、running、notReady。 + * ] + * + * @return GetUK8SLoadBalancerControllerResponse + * @throws UCloudException + */ + public function getUK8SLoadBalancerController(GetUK8SLoadBalancerControllerRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUK8SLoadBalancerControllerResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUK8SNodeGroup - 列出某个UK8S节点池 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/get_uk8s_node_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) 集群ID + * "NodeGroupId" => (string) 节点池Id + * ] + * + * Outputs: + * + * $outputs = [ + * "NodeGroup" => (object) 指定节点池的配置与关联信息[ + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ImageStatus" => (string) 镜像状态:Unknown、Normal、Deleted、NotLatest + * "DataDiskKmsKeyId" => (string) 数据盘加密密钥 ID + * "NodeGroupId" => (string) 节点池ID + * "NodeGroupName" => (string) 节点池名字 + * "NodeNamePrefix" => (string) 自定义Uhost主机名前缀。完整的自定义Uhost主机名为{NodeNamePrefix}-{NodeIP}。 + * "ImageId" => (string) 镜像ID + * "MachineType" => (string) 机型 + * "MinimalCpuPlatform" => (string) cpu平台 + * "UHostFamily" => (string) 主机规格族 + * "CPU" => (integer) 虚拟CPU核数 + * "Mem" => (integer) 内存大小 + * "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" => (integer) 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 + * "SecGroupId" => (array) Node所属的安全组id(最多5个)[ + * [ + * "Id" => (string) 安全组 ID + * "Name" => (string) 安全组名称 + * "Priority" => (string) 安全组优先级 + * ] + * ] + * "SecurityMode" => (string) 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * "SecurityGroupId" => (string) 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * "NetworkInterface" => (array) Node节点网卡配置[ + * [ + * "EIP" => (object) EIP[ + * "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接口查询,或登录用户中心查看。 + * ] + * ] + * ] + * "KubeletConfiguration" => (object) KubeletConfiguration[ + * "ContainerLogMaxFiles" => (integer) 最大日志文件数量 + * "ContainerLogMaxSize" => (string) 最大日志文件大小 + * "EvictionHard" => (object) 硬性驱逐条件,EvictionCondition类型[ + * "MemoryAvailable" => (string) 内存相关驱逐条件或宽限时间。 + * "ImagefsAvailable" => (string) 镜像文件系统存储相关驱逐条件或宽限时间。 + * "NodefsAvailable" => (string) 节点存储余量相关驱逐条件或宽限时间。 + * "NodefsInodesFree" => (string) 节点剩余inodes驱逐条件或宽限时间。 + * ] + * "EvictionSoft" => (object) 软性驱逐条件,EvictionCondition类型[ + * "MemoryAvailable" => (string) 内存相关驱逐条件或宽限时间。 + * "ImagefsAvailable" => (string) 镜像文件系统存储相关驱逐条件或宽限时间。 + * "NodefsAvailable" => (string) 节点存储余量相关驱逐条件或宽限时间。 + * "NodefsInodesFree" => (string) 节点剩余inodes驱逐条件或宽限时间。 + * ] + * "EvictionSoftGracePeriod" => (object) 软性驱逐宽限时间,EvictionCondition类型[ + * "MemoryAvailable" => (string) 内存相关驱逐条件或宽限时间。 + * "ImagefsAvailable" => (string) 镜像文件系统存储相关驱逐条件或宽限时间。 + * "NodefsAvailable" => (string) 节点存储余量相关驱逐条件或宽限时间。 + * "NodefsInodesFree" => (string) 节点剩余inodes驱逐条件或宽限时间。 + * ] + * "ImageGCHighThresholdPercent" => (integer) 镜像垃圾收集阈值 + * "ImageGCLowThresholdPercent" => (integer) 停止镜像垃圾收集阈值 + * "KubeReserved" => (object) kubelet预留资源,ReservedResource类型[ + * "CPU" => (string) CPU + * "Memory" => (string) 内存 + * "EphemeralStorage" => (string) 存储 + * "Pid" => (string) Pid + * ] + * "SystemReserved" => (object) 系统预留资源,ReservedResource类型[ + * "CPU" => (string) CPU + * "Memory" => (string) 内存 + * "EphemeralStorage" => (string) 存储 + * "Pid" => (string) Pid + * ] + * "MaxPods" => (integer) 最大Pod数量 + * ] + * "ImageName" => (string) 镜像名称 + * "ImageType" => (string) 镜像类型 + * "OsType" => (string) 操作系统类型 + * "OsName" => (string) 操作系统名称 + * "NetCapability" => (string) 网络配置 + * "UNIFeature" => (boolean) 是否启用 UNI 网络特性 + * "Disks" => (array) 磁盘列表[ + * [ + * "IsBoot" => (boolean) 是否为系统盘 + * "Type" => (string) 磁盘类型 + * "Size" => (integer) 磁盘大小,单位 GB + * "KmsKeyId" => (string) 磁盘加密密钥 ID + * ] + * ] + * "RelatedAsg" => (array) 节点池关联的弹性伸缩组ID + * "CreateTime" => (integer) 节点池创建时间 + * "UpdateTime" => (integer) 节点池更新时间 + * ] + * ] + * + * @return GetUK8SNodeGroupResponse + * @throws UCloudException + */ + public function getUK8SNodeGroup(GetUK8SNodeGroupRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUK8SNodeGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUK8SPluginInfo - 查询集群插件信息 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/get_uk8s_plugin_info + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) 集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterId" => (string) 集群ID + * "CNIInfoSet" => (object) CNI插件信息, 参看NodePlugin[ + * "Name" => (string) 插件名称, 如 CNI, CSI, Flexv, CloudProvider + * "PluginInfoSet" => (array) 各个节点插件信息, 参照NodePluginInfo[ + * [ + * "Node" => (string) Node节点名称 + * "Version" => (string) 插件版本 + * "Status" => (integer) 插件工作状态,0:未知,1:正常,2:异常, 3: 升级中 + * "UpdateTime" => (integer) 插件信息更新时间 + * "OperationResult" => (integer) 上次插件操作结果,0:没有上次操作结果,或当前正在执行升级或查询 1:获取成功 2 获取失败 3 升级成功 4 升级失败 + * "IP" => (string) Node节点IP + * ] + * ] + * "AvailableVersion" => (string) 最新插件版本 + * "ReleaseTime" => (string) 最新插件发布时间 + * "ManageEnabled" => (boolean) 插件管理是否开启 + * ] + * "ClusterStatus" => (string) 集群状态信息 + * "ClusterUpgradeInfo" => (object) 集群升级相关信息[ + * "UpdateTime" => (integer) 集群信息更新时间戳,单位 s + * "Stage" => (string) string,集群升级所处阶段 Unknown、Precheck、MasterUpdating、NodeUpdating、Failed、Success集群从未进行过升级则返回 Unknown集群开始升级过程几个阶段 Precheck->MasterUpdating->NodeUpdating→Success如果升级失败则为 Failed + * "Version" => (string) string, 集群当前版本 + * "TargetVersion" => (string) string,集群升级目标版本 + * "AvailableVersions" => (array) string 数组,可用新版本,例如 ["1.15.12","1.16.15","1.17.4","1.18.9"] + * "NodeInfoSet" => (array) 各个节点升级信息, 参照 ClusterUpdateNodeInfo[ + * [ + * "Node" => (string) Node节点名称 + * "Version" => (string) 插件版本 + * "Status" => (integer) 插件工作状态,0:未知,1:正常,2:异常, 3: 升级中 + * "UpdateTime" => (integer) 插件信息更新时间 + * "OperationResult" => (integer) 上次插件操作结果,0:没有上次操作结果,或当前正在执行升级或查询 1:获取成功 2 获取失败 3 升级成功 4 升级失败 + * "IP" => (string) Node节点IP + * "Role" => (string) 节点角色, master 或者 node + * ] + * ] + * ] + * "RuntimeConvertInfo" => (object) 集群容器运行时转换信息。[ + * "NodeInfoSet" => (array) 各节点的运行时转换状态。[ + * [ + * "Node" => (string) Node节点名称 + * "Version" => (string) 插件版本 + * "Status" => (integer) 插件工作状态,0:未知,1:正常,2:异常, 3: 升级中 + * "UpdateTime" => (integer) 插件信息更新时间 + * "OperationResult" => (integer) 上次插件操作结果,0:没有上次操作结果,或当前正在执行升级或查询 1:获取成功 2 获取失败 3 升级成功 4 升级失败 + * "IP" => (string) Node节点IP + * ] + * ] + * "Stage" => (string) 集群从未进行过运行时转换则返回 Unknown集群运行时转换几个阶段 Precheck->Updating→Success如果转换失败则为 Failed + * "UpdateTime" => (integer) 运行时转换信息更新时间,Unix 时间戳,单位秒。 + * "RuntimeName" => (string) 容器运行时名称。 + * "RuntimeVersion" => (string) 容器运行时版本。 + * ] + * "VKInfo" => (object) vk插件信息[ + * "Name" => (string) 插件名称 + * "PluginInfoSet" => (array) 各虚拟节点的插件信息。[ + * [ + * "Node" => (string) 节点 ID。 + * "Version" => (string) 插件版本。 + * "Status" => (integer) 插件状态:0 未知,1 正常,2 异常,3 升级中。 + * "UpdateTime" => (integer) 更新时间,Unix 时间戳,单位秒。 + * "OperationResult" => (integer) 上次插件操作结果:0 无结果,1 查询成功,2 查询失败,3 升级成功,4 升级失败。 + * ] + * ] + * "AvailableVersion" => (string) 最新版本 + * "ReleaseTime" => (string) 发布时间 + * "ManageEnabled" => (boolean) 插件管理是否开启 + * ] + * "CSIInfo" => (object) CSI 插件版本与状态。[ + * "Name" => (string) 插件名称。 + * "AvailableVersion" => (string) 最新可用插件版本。 + * "ReleaseTime" => (string) 最新可用版本的发布时间。 + * "ManageEnabled" => (boolean) 是否开启插件托管。 + * "Version" => (string) 当前插件版本。 + * "Status" => (integer) 插件状态。 + * "UpdateTime" => (integer) 更新时间,Unix 时间戳,单位秒。 + * "OperationResult" => (integer) 上次插件操作结果。 + * ] + * "CloudProviderInfo" => (object) CloudProvider 插件版本与状态。[ + * "Name" => (string) 插件名称。 + * "AvailableVersion" => (string) 最新可用插件版本。 + * "ReleaseTime" => (string) 最新可用版本的发布时间。 + * "ManageEnabled" => (boolean) 是否开启插件托管。 + * "Version" => (string) 当前插件版本。 + * "Status" => (integer) 插件状态。 + * "UpdateTime" => (integer) 更新时间,Unix 时间戳,单位秒。 + * "OperationResult" => (integer) 上次插件操作结果。 + * ] + * "MonitorInfo" => (object) 监控插件信息。[ + * "AvailableVersion" => (string) 最新可用监控插件版本。 + * ] + * ] + * + * @return GetUK8SPluginInfoResponse + * @throws UCloudException + */ + public function getUK8SPluginInfo(GetUK8SPluginInfoRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUK8SPluginInfoResponse($resp->toArray(), $resp->getRequestId()); + } + /** * GetUK8SVersions - 获取支持创建的UK8S集群版本、Containerd版本 * @@ -1212,6 +1954,8 @@ public function listUK8SClusterV2(ListUK8SClusterV2Request $request = null) * "NodeGroupList" => (array) 节点池列表[ * [ * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ImageStatus" => (string) 镜像状态:Unknown、Normal、Deleted、NotLatest + * "DataDiskKmsKeyId" => (string) 数据盘加密密钥 ID * "NodeGroupId" => (string) 节点池ID * "NodeGroupName" => (string) 节点池名字 * "NodeNamePrefix" => (string) 自定义Uhost主机名前缀。完整的自定义Uhost主机名为{NodeNamePrefix}-{NodeIP}。 @@ -1239,8 +1983,8 @@ public function listUK8SClusterV2(ListUK8SClusterV2Request $request = null) * "Labels" => (string) Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game * "SecGroupId" => (array) Node所属的安全组id(最多5个)[ * [ - * "Id" => (string) 安全组名称 - * "Name" => (string) 安全组id + * "Id" => (string) 安全组 ID + * "Name" => (string) 安全组名称 * "Priority" => (string) 安全组优先级 * ] * ] @@ -1302,16 +2046,10 @@ public function listUK8SClusterV2(ListUK8SClusterV2Request $request = null) * "UNIFeature" => (boolean) 是否启用 UNI 网络特性 * "Disks" => (array) 磁盘列表[ * [ - * "Type" => (string) 磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk - * "DiskId" => (string) 磁盘长ID - * "Name" => (string) UDisk名字(仅当磁盘是UDisk时返回) - * "Drive" => (string) 磁盘盘符 - * "Size" => (integer) 磁盘大小,单位: GB - * "BackupType" => (string) 备份方案,枚举类型:BASIC_SNAPSHOT,普通快照;DATAARK,方舟。无快照则不返回该字段。 - * "IOPS" => (integer) 当前主机的IOPS值 - * "Encrypted" => (string) Yes: 加密 No: 非加密 - * "DiskType" => (string) LOCAL_NOMAL| CLOUD_NORMAL| LOCAL_SSD| CLOUD_SSD|EXCLUSIVE_LOCAL_DISK - * "IsBoot" => (string) True| False + * "IsBoot" => (boolean) 是否为系统盘 + * "Type" => (string) 磁盘类型 + * "Size" => (integer) 磁盘大小,单位 GB + * "KmsKeyId" => (string) 磁盘加密密钥 ID * ] * ] * "RelatedAsg" => (array) 节点池关联的弹性伸缩组ID @@ -1475,6 +2213,70 @@ public function removeUK8SNodeGroup(RemoveUK8SNodeGroupRequest $request = null) return new RemoveUK8SNodeGroupResponse($resp->toArray(), $resp->getRequestId()); } + /** + * UpdateUK8SAutoScalingGroupV2 - 更新伸缩组的名称、节点数上下限和优先级。节点规格等配置请通过关联节点池修改。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/update_uk8s_auto_scaling_group_v2 + * + * Arguments: + * + * $args = [ + * "Zone" => (string) 可用区,可选。此接口按集群和伸缩组 ID 更新配置。 + * "ProjectId" => (string) 项目ID + * "Region" => (string) 地域 + * "ClusterId" => (string) 集群ID + * "Id" => (string) 伸缩组ID + * "Name" => (string) 伸缩组名称 + * "Min" => (integer) 最小节点数,范围 0–100。 + * "Max" => (integer) 最大节点数,范围 1–100。 + * "Priority" => (integer) 伸缩组优先级,范围 1–100,值越大越优先。省略或传 0 时保持原优先级。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateUK8SAutoScalingGroupV2Response + * @throws UCloudException + */ + public function updateUK8SAutoScalingGroupV2(UpdateUK8SAutoScalingGroupV2Request $request = null) + { + $resp = $this->invoke($request); + return new UpdateUK8SAutoScalingGroupV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUK8SAutoscaler - 更新集群级缩容阈值和等待时间。调用前必须关闭 cluster-autoscaler;修改后重新开启,使新配置生效。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/update_uk8s_autoscaler + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) 集群ID + * "ScaleDownUnneededTime" => (integer) 节点持续不需要后触发缩容的等待时间,单位分钟,范围 1–1440。 + * "ScaleDownUtilizationThreshold" => (integer) 节点缩容利用率阈值,单位百分比,范围 0–100。例如 50 表示 50%。 + * "ScaleDownDelayAfterAdd" => (integer) 添加节点后等待缩容的时间,单位分钟,范围 1–1440。 + * "ScaleDownGPUUtilizationThreshold" => (integer) GPU 缩容利用率阈值,单位百分比,范围 0–100。省略时使用 ScaleDownUtilizationThreshold。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateUK8SAutoscalerResponse + * @throws UCloudException + */ + public function updateUK8SAutoscaler(UpdateUK8SAutoscalerRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateUK8SAutoscalerResponse($resp->toArray(), $resp->getRequestId()); + } + /** * UpdateUK8SNodeGroup - 修改UK8S节点池 *