From 4c34a81d269b8534d424a2f24de7cea31a066c29 Mon Sep 17 00:00:00 2001 From: ucloud-bot Date: Fri, 28 Aug 2026 10:03:42 +0000 Subject: [PATCH] sdk: rolling update for 0.3.43 --- VERSION | 2 +- src/UK8S/Apis/AddUK8SUHostNodeRequest.php | 107 +++- src/UK8S/Apis/CreateUK8SULSConfigRequest.php | 223 +++++++ src/UK8S/Apis/CreateUK8SULSConfigResponse.php | 26 + src/UK8S/Apis/DeleteUK8SULSConfigRequest.php | 133 +++++ src/UK8S/Apis/DeleteUK8SULSConfigResponse.php | 26 + src/UK8S/Apis/DescribeUK8SClusterResponse.php | 346 ++++++++++- src/UK8S/Apis/DescribeUK8SImageRequest.php | 92 ++- src/UK8S/Apis/DescribeUK8SImageResponse.php | 69 ++- .../Apis/ListUK8SClusterNodeV2Request.php | 20 + src/UK8S/Apis/ListUK8SClusterV2Response.php | 21 + src/UK8S/Apis/ListUK8SNodeGroupResponse.php | 7 + src/UK8S/Apis/ListUK8SULSConfigRequest.php | 132 +++++ src/UK8S/Apis/ListUK8SULSConfigResponse.php | 65 +++ src/UK8S/Apis/UpdateUK8SULSConfigRequest.php | 221 +++++++ src/UK8S/Apis/UpdateUK8SULSConfigResponse.php | 26 + src/UK8S/Models/Autoscaler.php | 164 ++++++ src/UK8S/Models/ClusterSet.php | 120 ++++ src/UK8S/Models/EIP.php | 124 ++++ src/UK8S/Models/EvictionCondition.php | 104 ++++ src/UK8S/Models/IPSet.php | 100 ++++ src/UK8S/Models/ImageInfo.php | 120 ++++ src/UK8S/Models/KubeletConfiguration.php | 224 ++++++++ src/UK8S/Models/LoopbackClientCert.php | 64 +++ src/UK8S/Models/NetworkInterface.php | 44 ++ src/UK8S/Models/NodeGroupSet.php | 380 +++++++++++- src/UK8S/Models/NodeInfoV2.php | 504 +++++++++++++++- src/UK8S/Models/ReservedResource.php | 104 ++++ src/UK8S/Models/SecGroupId.php | 84 +++ src/UK8S/Models/UHostIPSet.php | 40 ++ src/UK8S/Models/ULSExtractRule.php | 224 ++++++++ src/UK8S/Models/ULSFilePaths.php | 64 +++ src/UK8S/Models/ULSInputDetail.php | 96 ++++ src/UK8S/Models/ULSInputMetadata.php | 64 +++ src/UK8S/Models/ULSLabels.php | 84 +++ src/UK8S/Models/ULSLogConfig.php | 164 ++++++ src/UK8S/Models/ULSMatchRule.php | 116 ++++ src/UK8S/Models/ULSPodLabelsMatch.php | 96 ++++ src/UK8S/Models/ULSWorkloadMatch.php | 84 +++ src/UK8S/Models/UhostInfo.php | 152 +++++ ...UK8SUHostNodeParamKubeletConfiguration.php | 44 ++ ...dUK8SUHostNodeParamNetworkInterfaceEIP.php | 4 +- .../AddUK8SUHostNodeParamUserLabels.php | 64 +++ .../CreateUK8SULSConfigParamExtractRule.php | 304 ++++++++++ ...8SULSConfigParamExtractRuleExtractRule.php | 44 ++ .../CreateUK8SULSConfigParamInputDetail.php | 116 ++++ ...UK8SULSConfigParamInputDetailFilePaths.php | 64 +++ ...eUK8SULSConfigParamInputDetailMetadata.php | 64 +++ .../CreateUK8SULSConfigParamMatchRule.php | 116 ++++ ...teUK8SULSConfigParamMatchRulePodLabels.php | 96 ++++ ...ULSConfigParamMatchRulePodLabelsLabels.php | 84 +++ ...teUK8SULSConfigParamMatchRuleWorkloads.php | 84 +++ .../UpdateUK8SULSConfigParamExtractRule.php | 304 ++++++++++ .../UpdateUK8SULSConfigParamInputDetail.php | 116 ++++ ...UK8SULSConfigParamInputDetailFilePaths.php | 64 +++ ...eUK8SULSConfigParamInputDetailMetadata.php | 64 +++ .../UpdateUK8SULSConfigParamMatchRule.php | 116 ++++ ...teUK8SULSConfigParamMatchRulePodLabels.php | 96 ++++ ...ULSConfigParamMatchRulePodLabelsLabels.php | 84 +++ ...teUK8SULSConfigParamMatchRuleWorkloads.php | 84 +++ src/UK8S/UK8SClient.php | 542 +++++++++++++++++- 61 files changed, 7335 insertions(+), 55 deletions(-) create mode 100644 src/UK8S/Apis/CreateUK8SULSConfigRequest.php create mode 100644 src/UK8S/Apis/CreateUK8SULSConfigResponse.php create mode 100644 src/UK8S/Apis/DeleteUK8SULSConfigRequest.php create mode 100644 src/UK8S/Apis/DeleteUK8SULSConfigResponse.php create mode 100644 src/UK8S/Apis/ListUK8SULSConfigRequest.php create mode 100644 src/UK8S/Apis/ListUK8SULSConfigResponse.php create mode 100644 src/UK8S/Apis/UpdateUK8SULSConfigRequest.php create mode 100644 src/UK8S/Apis/UpdateUK8SULSConfigResponse.php create mode 100644 src/UK8S/Models/Autoscaler.php create mode 100644 src/UK8S/Models/EIP.php create mode 100644 src/UK8S/Models/EvictionCondition.php create mode 100644 src/UK8S/Models/KubeletConfiguration.php create mode 100644 src/UK8S/Models/LoopbackClientCert.php create mode 100644 src/UK8S/Models/NetworkInterface.php create mode 100644 src/UK8S/Models/ReservedResource.php create mode 100644 src/UK8S/Models/SecGroupId.php create mode 100644 src/UK8S/Models/ULSExtractRule.php create mode 100644 src/UK8S/Models/ULSFilePaths.php create mode 100644 src/UK8S/Models/ULSInputDetail.php create mode 100644 src/UK8S/Models/ULSInputMetadata.php create mode 100644 src/UK8S/Models/ULSLabels.php create mode 100644 src/UK8S/Models/ULSLogConfig.php create mode 100644 src/UK8S/Models/ULSMatchRule.php create mode 100644 src/UK8S/Models/ULSPodLabelsMatch.php create mode 100644 src/UK8S/Models/ULSWorkloadMatch.php create mode 100644 src/UK8S/Params/AddUK8SUHostNodeParamKubeletConfiguration.php create mode 100644 src/UK8S/Params/AddUK8SUHostNodeParamUserLabels.php create mode 100644 src/UK8S/Params/CreateUK8SULSConfigParamExtractRule.php create mode 100644 src/UK8S/Params/CreateUK8SULSConfigParamExtractRuleExtractRule.php create mode 100644 src/UK8S/Params/CreateUK8SULSConfigParamInputDetail.php create mode 100644 src/UK8S/Params/CreateUK8SULSConfigParamInputDetailFilePaths.php create mode 100644 src/UK8S/Params/CreateUK8SULSConfigParamInputDetailMetadata.php create mode 100644 src/UK8S/Params/CreateUK8SULSConfigParamMatchRule.php create mode 100644 src/UK8S/Params/CreateUK8SULSConfigParamMatchRulePodLabels.php create mode 100644 src/UK8S/Params/CreateUK8SULSConfigParamMatchRulePodLabelsLabels.php create mode 100644 src/UK8S/Params/CreateUK8SULSConfigParamMatchRuleWorkloads.php create mode 100644 src/UK8S/Params/UpdateUK8SULSConfigParamExtractRule.php create mode 100644 src/UK8S/Params/UpdateUK8SULSConfigParamInputDetail.php create mode 100644 src/UK8S/Params/UpdateUK8SULSConfigParamInputDetailFilePaths.php create mode 100644 src/UK8S/Params/UpdateUK8SULSConfigParamInputDetailMetadata.php create mode 100644 src/UK8S/Params/UpdateUK8SULSConfigParamMatchRule.php create mode 100644 src/UK8S/Params/UpdateUK8SULSConfigParamMatchRulePodLabels.php create mode 100644 src/UK8S/Params/UpdateUK8SULSConfigParamMatchRulePodLabelsLabels.php create mode 100644 src/UK8S/Params/UpdateUK8SULSConfigParamMatchRuleWorkloads.php diff --git a/VERSION b/VERSION index 0bdfd66..faa7104 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.42 +0.3.43 diff --git a/src/UK8S/Apis/AddUK8SUHostNodeRequest.php b/src/UK8S/Apis/AddUK8SUHostNodeRequest.php index a7062b3..79c5735 100644 --- a/src/UK8S/Apis/AddUK8SUHostNodeRequest.php +++ b/src/UK8S/Apis/AddUK8SUHostNodeRequest.php @@ -20,6 +20,8 @@ use UCloud\UK8S\Params\AddUK8SUHostNodeParamNetworkInterface; use UCloud\UK8S\Params\AddUK8SUHostNodeParamNetworkInterfaceEIP; use UCloud\UK8S\Params\AddUK8SUHostNodeParamSecGroupId; +use UCloud\UK8S\Params\AddUK8SUHostNodeParamUserLabels; +use UCloud\UK8S\Params\AddUK8SUHostNodeParamKubeletConfiguration; class AddUK8SUHostNodeRequest extends Request { @@ -31,7 +33,6 @@ public function __construct() $this->markRequired("ClusterId"); $this->markRequired("CPU"); $this->markRequired("Count"); - $this->markRequired("Password"); $this->markRequired("Mem"); $this->markRequired("ChargeType"); } @@ -158,26 +159,6 @@ public function setCount($count) $this->set("Count", $count); } - /** - * Password: Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 - * - * @return string|null - */ - public function getPassword() - { - return $this->get("Password"); - } - - /** - * Password: Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 - * - * @param string $password - */ - public function setPassword($password) - { - $this->set("Password", $password); - } - /** * Mem: 内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 * @@ -218,6 +199,26 @@ public function setChargeType($chargeType) $this->set("ChargeType", $chargeType); } + /** + * Password: Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + * + * @return string|null + */ + public function getPassword() + { + return $this->get("Password"); + } + + /** + * Password: Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + * + * @param string $password + */ + public function setPassword($password) + { + $this->set("Password", $password); + } + /** * BootDiskType: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 * @@ -783,22 +784,74 @@ public function setSecGroupId(array $secGroupId) } /** - * UserLabels: UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * UHostFamily: 主机规格族 * * @return string|null */ + public function getUHostFamily() + { + return $this->get("UHostFamily"); + } + + /** + * UHostFamily: 主机规格族 + * + * @param string $uHostFamily + */ + public function setUHostFamily($uHostFamily) + { + $this->set("UHostFamily", $uHostFamily); + } + + /** + * UserLabels: + * + * @return AddUK8SUHostNodeParamUserLabels[]|null + */ public function getUserLabels() { - return $this->get("UserLabels"); + $items = $this->get("UserLabels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AddUK8SUHostNodeParamUserLabels($item)); + } + return $result; + } + + /** + * UserLabels: + * + * @param AddUK8SUHostNodeParamUserLabels[] $userLabels + */ + public function setUserLabels(array $userLabels) + { + $result = []; + foreach ($userLabels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * KubeletConfiguration: + * + * @return AddUK8SUHostNodeParamKubeletConfiguration|null + */ + public function getKubeletConfiguration() + { + return new AddUK8SUHostNodeParamKubeletConfiguration($this->get("KubeletConfiguration")); } /** - * UserLabels: UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * KubeletConfiguration: * - * @param string $userLabels + * @param AddUK8SUHostNodeParamKubeletConfiguration $kubeletConfiguration */ - public function setUserLabels($userLabels) + public function setKubeletConfiguration(array $kubeletConfiguration) { - $this->set("UserLabels", $userLabels); + $this->set("KubeletConfiguration", $kubeletConfiguration->getAll()); } } diff --git a/src/UK8S/Apis/CreateUK8SULSConfigRequest.php b/src/UK8S/Apis/CreateUK8SULSConfigRequest.php new file mode 100644 index 0000000..3170134 --- /dev/null +++ b/src/UK8S/Apis/CreateUK8SULSConfigRequest.php @@ -0,0 +1,223 @@ + "CreateUK8SULSConfig"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("TopicID"); + $this->markRequired("ClusterId"); + $this->markRequired("Name"); + } + + + + /** + * 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); + } + + /** + * TopicID: 日志服务中用于接收日志的目标 Topic ID。 + * + * @return string|null + */ + public function getTopicID() + { + return $this->get("TopicID"); + } + + /** + * TopicID: 日志服务中用于接收日志的目标 Topic ID。 + * + * @param string $topicID + */ + public function setTopicID($topicID) + { + $this->set("TopicID", $topicID); + } + + /** + * 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); + } + + /** + * Name: 要创建的日志的采集规则的名称,不能重复。总长度不能超过 253个字符。字符类型:只能包含小写字母(a-z)、数字(0-9)、破折号(-)和点(.)。开头和结尾字符:必须以小写字母或数字开头,并且也必须以小写字母或数字结尾。不允许以 - 或 . 开头或结尾。连续特殊字符:不能连续出现点(.)或破折号(-)。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 要创建的日志的采集规则的名称,不能重复。总长度不能超过 253个字符。字符类型:只能包含小写字母(a-z)、数字(0-9)、破折号(-)和点(.)。开头和结尾字符:必须以小写字母或数字开头,并且也必须以小写字母或数字结尾。不允许以 - 或 . 开头或结尾。连续特殊字符:不能连续出现点(.)或破折号(-)。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * ExtractRule: + * + * @return CreateUK8SULSConfigParamExtractRule|null + */ + public function getExtractRule() + { + return new CreateUK8SULSConfigParamExtractRule($this->get("ExtractRule")); + } + + /** + * ExtractRule: + * + * @param CreateUK8SULSConfigParamExtractRule $extractRule + */ + public function setExtractRule(array $extractRule) + { + $this->set("ExtractRule", $extractRule->getAll()); + } + + /** + * InputDetail: + * + * @return CreateUK8SULSConfigParamInputDetail|null + */ + public function getInputDetail() + { + return new CreateUK8SULSConfigParamInputDetail($this->get("InputDetail")); + } + + /** + * InputDetail: + * + * @param CreateUK8SULSConfigParamInputDetail $inputDetail + */ + public function setInputDetail(array $inputDetail) + { + $this->set("InputDetail", $inputDetail->getAll()); + } + + /** + * MatchRule: + * + * @return CreateUK8SULSConfigParamMatchRule|null + */ + public function getMatchRule() + { + return new CreateUK8SULSConfigParamMatchRule($this->get("MatchRule")); + } + + /** + * MatchRule: + * + * @param CreateUK8SULSConfigParamMatchRule $matchRule + */ + public function setMatchRule(array $matchRule) + { + $this->set("MatchRule", $matchRule->getAll()); + } +} diff --git a/src/UK8S/Apis/CreateUK8SULSConfigResponse.php b/src/UK8S/Apis/CreateUK8SULSConfigResponse.php new file mode 100644 index 0000000..df7dae7 --- /dev/null +++ b/src/UK8S/Apis/CreateUK8SULSConfigResponse.php @@ -0,0 +1,26 @@ + "DeleteUK8SULSConfig"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterId"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域。参见地域和可用区列表。 + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。参见地域和可用区列表。 + * + * @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接口。 + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。请参考GetProjectList接口。 + * + * @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); + } + + /** + * Name: 要删除的日志的采集规则的名称。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 要删除的日志的采集规则的名称。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } +} diff --git a/src/UK8S/Apis/DeleteUK8SULSConfigResponse.php b/src/UK8S/Apis/DeleteUK8SULSConfigResponse.php new file mode 100644 index 0000000..9c920c5 --- /dev/null +++ b/src/UK8S/Apis/DeleteUK8SULSConfigResponse.php @@ -0,0 +1,26 @@ +set("MasterResourceStatus", $masterResourceStatus); } + + /** + * CNIMode: CNI模式,可选值VPC/Calico + * + * @return string|null + */ + public function getCNIMode() + { + return $this->get("CNIMode"); + } + + /** + * CNIMode: CNI模式,可选值VPC/Calico + * + * @param string $cniMode + */ + public function setCNIMode($cniMode) + { + $this->set("CNIMode", $cniMode); + } + + /** + * MonitorType: 集群的监控类型:no无监控;cloudwatch统一监控平台;prometheus内置监控 + * + * @return string|null + */ + public function getMonitorType() + { + return $this->get("MonitorType"); + } + + /** + * MonitorType: 集群的监控类型:no无监控;cloudwatch统一监控平台;prometheus内置监控 + * + * @param string $monitorType + */ + public function setMonitorType($monitorType) + { + $this->set("MonitorType", $monitorType); + } + + /** + * Autoscaler: 集群的节点伸缩(CA)配置 + * + * @return Autoscaler|null + */ + public function getAutoscaler() + { + return new Autoscaler($this->get("Autoscaler")); + } + + /** + * Autoscaler: 集群的节点伸缩(CA)配置 + * + * @param Autoscaler $autoscaler + */ + public function setAutoscaler(array $autoscaler) + { + $this->set("Autoscaler", $autoscaler->getAll()); + } + + /** + * EnableUserAuth: 是否开启了授权管理功能 + * + * @return boolean|null + */ + public function getEnableUserAuth() + { + return $this->get("EnableUserAuth"); + } + + /** + * EnableUserAuth: 是否开启了授权管理功能 + * + * @param boolean $enableUserAuth + */ + public function setEnableUserAuth($enableUserAuth) + { + $this->set("EnableUserAuth", $enableUserAuth); + } + + /** + * DedicatedPodSubnet: Pod是否使用独立子网 + * + * @return boolean|null + */ + public function getDedicatedPodSubnet() + { + return $this->get("DedicatedPodSubnet"); + } + + /** + * DedicatedPodSubnet: Pod是否使用独立子网 + * + * @param boolean $dedicatedPodSubnet + */ + public function setDedicatedPodSubnet($dedicatedPodSubnet) + { + $this->set("DedicatedPodSubnet", $dedicatedPodSubnet); + } + + /** + * PodSubnetIds: Pod使用的独立子网列表 + * + * @return string[]|null + */ + public function getPodSubnetIds() + { + return $this->get("PodSubnetIds"); + } + + /** + * PodSubnetIds: Pod使用的独立子网列表 + * + * @param string[] $podSubnetIds + */ + public function setPodSubnetIds(array $podSubnetIds) + { + $this->set("PodSubnetIds", $podSubnetIds); + } + + /** + * DeleteProtection: 删除保护开关。0表示不开启,1表示开启。默认不开启 + * + * @return integer|null + */ + public function getDeleteProtection() + { + return $this->get("DeleteProtection"); + } + + /** + * DeleteProtection: 删除保护开关。0表示不开启,1表示开启。默认不开启 + * + * @param int $deleteProtection + */ + public function setDeleteProtection($deleteProtection) + { + $this->set("DeleteProtection", $deleteProtection); + } + + /** + * PodSubnetSecGroups: Pod独立子网内的ip使用的安全组 + * + * @return string[]|null + */ + public function getPodSubnetSecGroups() + { + return $this->get("PodSubnetSecGroups"); + } + + /** + * PodSubnetSecGroups: Pod独立子网内的ip使用的安全组 + * + * @param string[] $podSubnetSecGroups + */ + public function setPodSubnetSecGroups(array $podSubnetSecGroups) + { + $this->set("PodSubnetSecGroups", $podSubnetSecGroups); + } + + /** + * NodeCIDR: 节点网段 + * + * @return string|null + */ + public function getNodeCIDR() + { + return $this->get("NodeCIDR"); + } + + /** + * NodeCIDR: 节点网段 + * + * @param string $nodeCIDR + */ + public function setNodeCIDR($nodeCIDR) + { + $this->set("NodeCIDR", $nodeCIDR); + } + + /** + * ExternalUlb: 外部 API Server 负载均衡实例 ID + * + * @return string|null + */ + public function getExternalUlb() + { + return $this->get("ExternalUlb"); + } + + /** + * ExternalUlb: 外部 API Server 负载均衡实例 ID + * + * @param string $externalUlb + */ + public function setExternalUlb($externalUlb) + { + $this->set("ExternalUlb", $externalUlb); + } + + /** + * InternalUlb: 内部 API Server 负载均衡实例 ID + * + * @return string|null + */ + public function getInternalUlb() + { + return $this->get("InternalUlb"); + } + + /** + * InternalUlb: 内部 API Server 负载均衡实例 ID + * + * @param string $internalUlb + */ + public function setInternalUlb($internalUlb) + { + $this->set("InternalUlb", $internalUlb); + } + + /** + * UpdateTime: 更新时间 + * + * @return integer|null + */ + public function getUpdateTime() + { + return $this->get("UpdateTime"); + } + + /** + * UpdateTime: 更新时间 + * + * @param int $updateTime + */ + public function setUpdateTime($updateTime) + { + $this->set("UpdateTime", $updateTime); + } + + /** + * LbClass: 负载均衡类型 + * + * @return string|null + */ + public function getLbClass() + { + return $this->get("LbClass"); + } + + /** + * LbClass: 负载均衡类型 + * + * @param string $lbClass + */ + public function setLbClass($lbClass) + { + $this->set("LbClass", $lbClass); + } + + /** + * 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); + } + + /** + * ClusterType: 集群版本 + * + * @return string|null + */ + public function getClusterType() + { + return $this->get("ClusterType"); + } + + /** + * ClusterType: 集群版本 + * + * @param string $clusterType + */ + public function setClusterType($clusterType) + { + $this->set("ClusterType", $clusterType); + } + + /** + * LoopbackClientCert: API Server 回环客户端证书 + * + * @return LoopbackClientCert|null + */ + public function getLoopbackClientCert() + { + return new LoopbackClientCert($this->get("LoopbackClientCert")); + } + + /** + * LoopbackClientCert: API Server 回环客户端证书 + * + * @param LoopbackClientCert $loopbackClientCert + */ + public function setLoopbackClientCert(array $loopbackClientCert) + { + $this->set("LoopbackClientCert", $loopbackClientCert->getAll()); + } } diff --git a/src/UK8S/Apis/DescribeUK8SImageRequest.php b/src/UK8S/Apis/DescribeUK8SImageRequest.php index 9f5a73b..b8daa80 100644 --- a/src/UK8S/Apis/DescribeUK8SImageRequest.php +++ b/src/UK8S/Apis/DescribeUK8SImageRequest.php @@ -29,7 +29,7 @@ public function __construct() /** - * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @return string|null */ @@ -39,7 +39,7 @@ public function getRegion() } /** - * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @param string $region */ @@ -49,7 +49,7 @@ public function setRegion($region) } /** - * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @return string|null */ @@ -59,7 +59,7 @@ public function getZone() } /** - * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @param string $zone */ @@ -69,7 +69,7 @@ public function setZone($zone) } /** - * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * * @return string|null */ @@ -79,7 +79,7 @@ public function getProjectId() } /** - * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * * @param string $projectId */ @@ -87,4 +87,84 @@ public function setProjectId($projectId) { $this->set("ProjectId", $projectId); } + + /** + * ProductType: 产品类型,可选值uhost、uphost,不填则返回所有 + * + * @return string|null + */ + public function getProductType() + { + return $this->get("ProductType"); + } + + /** + * ProductType: 产品类型,可选值uhost、uphost,不填则返回所有 + * + * @param string $productType + */ + public function setProductType($productType) + { + $this->set("ProductType", $productType); + } + + /** + * MachineType: 适用机型,如O、G、OPRO等,默认为O + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 适用机型,如O、G、OPRO等,默认为O + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * GPUType: 适用GPU类型,如1080Ti、4090、V100、A800等,MachineType为G时必须提供 + * + * @return string|null + */ + public function getGPUType() + { + return $this->get("GPUType"); + } + + /** + * GPUType: 适用GPU类型,如1080Ti、4090、V100、A800等,MachineType为G时必须提供 + * + * @param string $gpuType + */ + public function setGPUType($gpuType) + { + $this->set("GPUType", $gpuType); + } + + /** + * K8sVersion: k8s集群版本,如1.28.15 + * + * @return string|null + */ + public function getK8sVersion() + { + return $this->get("K8sVersion"); + } + + /** + * K8sVersion: k8s集群版本,如1.28.15 + * + * @param string $k8sVersion + */ + public function setK8sVersion($k8sVersion) + { + $this->set("K8sVersion", $k8sVersion); + } } diff --git a/src/UK8S/Apis/DescribeUK8SImageResponse.php b/src/UK8S/Apis/DescribeUK8SImageResponse.php index 13ae8dd..c0895ae 100644 --- a/src/UK8S/Apis/DescribeUK8SImageResponse.php +++ b/src/UK8S/Apis/DescribeUK8SImageResponse.php @@ -18,7 +18,6 @@ use UCloud\Core\Response\Response; use UCloud\UK8S\Models\ImageInfo; -use UCloud\UK8S\Models\ImageInfo; class DescribeUK8SImageResponse extends Response { @@ -57,7 +56,7 @@ public function setImageSet(array $imageSet) } /** - * PHostImageSet: 物理机可用镜像集合, 详见ImageInfo 数组 + * PHostImageSet: 裸金属可用镜像集合, 详见ImageInfo 数组 * * @return ImageInfo[]|null */ @@ -75,7 +74,7 @@ public function getPHostImageSet() } /** - * PHostImageSet: 物理机可用镜像集合, 详见ImageInfo 数组 + * PHostImageSet: 裸金属可用镜像集合, 详见ImageInfo 数组 * * @param ImageInfo[] $pHostImageSet */ @@ -87,4 +86,68 @@ public function setPHostImageSet(array $pHostImageSet) } return $result; } + + /** + * CustomImageSet: 虚拟机自制可用镜像集合, 详见ImageInfo 数组 + * + * @return ImageInfo[]|null + */ + public function getCustomImageSet() + { + $items = $this->get("CustomImageSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ImageInfo($item)); + } + return $result; + } + + /** + * CustomImageSet: 虚拟机自制可用镜像集合, 详见ImageInfo 数组 + * + * @param ImageInfo[] $customImageSet + */ + public function setCustomImageSet(array $customImageSet) + { + $result = []; + foreach ($customImageSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * CustomPHostImageSet: 裸金属自制可用镜像集合, 详见ImageInfo 数组 + * + * @return ImageInfo[]|null + */ + public function getCustomPHostImageSet() + { + $items = $this->get("CustomPHostImageSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ImageInfo($item)); + } + return $result; + } + + /** + * CustomPHostImageSet: 裸金属自制可用镜像集合, 详见ImageInfo 数组 + * + * @param ImageInfo[] $customPHostImageSet + */ + public function setCustomPHostImageSet(array $customPHostImageSet) + { + $result = []; + foreach ($customPHostImageSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } } diff --git a/src/UK8S/Apis/ListUK8SClusterNodeV2Request.php b/src/UK8S/Apis/ListUK8SClusterNodeV2Request.php index fb5cfd7..997efec 100644 --- a/src/UK8S/Apis/ListUK8SClusterNodeV2Request.php +++ b/src/UK8S/Apis/ListUK8SClusterNodeV2Request.php @@ -88,4 +88,24 @@ public function setClusterId($clusterId) { $this->set("ClusterId", $clusterId); } + + /** + * NodeIds: 可传一个或多个节点id 不传或为空则返回所有节点 + * + * @return string|null + */ + public function getNodeIds() + { + return $this->get("NodeIds"); + } + + /** + * NodeIds: 可传一个或多个节点id 不传或为空则返回所有节点 + * + * @param string $nodeIds + */ + public function setNodeIds($nodeIds) + { + $this->set("NodeIds", $nodeIds); + } } diff --git a/src/UK8S/Apis/ListUK8SClusterV2Response.php b/src/UK8S/Apis/ListUK8SClusterV2Response.php index a13a2b3..b222b93 100644 --- a/src/UK8S/Apis/ListUK8SClusterV2Response.php +++ b/src/UK8S/Apis/ListUK8SClusterV2Response.php @@ -18,6 +18,7 @@ use UCloud\Core\Response\Response; use UCloud\UK8S\Models\ClusterSet; +use UCloud\UK8S\Models\LoopbackClientCert; class ListUK8SClusterV2Response extends Response { @@ -74,4 +75,24 @@ public function setClusterSet(array $clusterSet) } return $result; } + + /** + * TotalCount: 总数 + * + * @return integer|null + */ + public function getTotalCount() + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 总数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } } diff --git a/src/UK8S/Apis/ListUK8SNodeGroupResponse.php b/src/UK8S/Apis/ListUK8SNodeGroupResponse.php index 1b05d59..00d7c19 100644 --- a/src/UK8S/Apis/ListUK8SNodeGroupResponse.php +++ b/src/UK8S/Apis/ListUK8SNodeGroupResponse.php @@ -18,6 +18,13 @@ use UCloud\Core\Response\Response; use UCloud\UK8S\Models\NodeGroupSet; +use UCloud\UK8S\Models\SecGroupId; +use UCloud\UK8S\Models\NetworkInterface; +use UCloud\UK8S\Models\EIP; +use UCloud\UK8S\Models\KubeletConfiguration; +use UCloud\UK8S\Models\EvictionCondition; +use UCloud\UK8S\Models\ReservedResource; +use UCloud\UK8S\Models\DiskSet; class ListUK8SNodeGroupResponse extends Response { diff --git a/src/UK8S/Apis/ListUK8SULSConfigRequest.php b/src/UK8S/Apis/ListUK8SULSConfigRequest.php new file mode 100644 index 0000000..28d40b5 --- /dev/null +++ b/src/UK8S/Apis/ListUK8SULSConfigRequest.php @@ -0,0 +1,132 @@ + "ListUK8SULSConfig"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("TopicID"); + } + + + + /** + * 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); + } + + /** + * TopicID: 日志服务中用于接收日志的目标 TopicId。 + * + * @return string|null + */ + public function getTopicID() + { + return $this->get("TopicID"); + } + + /** + * TopicID: 日志服务中用于接收日志的目标 TopicId。 + * + * @param string $topicID + */ + public function setTopicID($topicID) + { + $this->set("TopicID", $topicID); + } + + /** + * ClusterId: 集群 Id,如果不填,返回该账号该地域所有集群的 ULSConfig + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群 Id,如果不填,返回该账号该地域所有集群的 ULSConfig + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UK8S/Apis/ListUK8SULSConfigResponse.php b/src/UK8S/Apis/ListUK8SULSConfigResponse.php new file mode 100644 index 0000000..d3db0e6 --- /dev/null +++ b/src/UK8S/Apis/ListUK8SULSConfigResponse.php @@ -0,0 +1,65 @@ +get("LogConfig"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULSLogConfig($item)); + } + return $result; + } + + /** + * LogConfig: 日志服务配置,见 ClusterLogConfig + * + * @param ULSLogConfig[] $logConfig + */ + public function setLogConfig(array $logConfig) + { + $result = []; + foreach ($logConfig as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Apis/UpdateUK8SULSConfigRequest.php b/src/UK8S/Apis/UpdateUK8SULSConfigRequest.php new file mode 100644 index 0000000..0306ab7 --- /dev/null +++ b/src/UK8S/Apis/UpdateUK8SULSConfigRequest.php @@ -0,0 +1,221 @@ + "UpdateUK8SULSConfig"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $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: 可用区。参见地域和可用区列表: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); + } + + /** + * Name: 要修改的日志采集规则名称。名称长度不能超过253个字符,只能包含小写字母、数字、破折号和点,并且必须以字母或数字开头和结尾。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 要修改的日志采集规则名称。名称长度不能超过253个字符,只能包含小写字母、数字、破折号和点,并且必须以字母或数字开头和结尾。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * 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); + } + + /** + * TopicID: 日志服务中用于接收日志的目标Topic ID。不填写时保持原Topic ID不变。 + * + * @return string|null + */ + public function getTopicID() + { + return $this->get("TopicID"); + } + + /** + * TopicID: 日志服务中用于接收日志的目标Topic ID。不填写时保持原Topic ID不变。 + * + * @param string $topicID + */ + public function setTopicID($topicID) + { + $this->set("TopicID", $topicID); + } + + /** + * ExtractRule: + * + * @return UpdateUK8SULSConfigParamExtractRule|null + */ + public function getExtractRule() + { + return new UpdateUK8SULSConfigParamExtractRule($this->get("ExtractRule")); + } + + /** + * ExtractRule: + * + * @param UpdateUK8SULSConfigParamExtractRule $extractRule + */ + public function setExtractRule(array $extractRule) + { + $this->set("ExtractRule", $extractRule->getAll()); + } + + /** + * InputDetail: + * + * @return UpdateUK8SULSConfigParamInputDetail|null + */ + public function getInputDetail() + { + return new UpdateUK8SULSConfigParamInputDetail($this->get("InputDetail")); + } + + /** + * InputDetail: + * + * @param UpdateUK8SULSConfigParamInputDetail $inputDetail + */ + public function setInputDetail(array $inputDetail) + { + $this->set("InputDetail", $inputDetail->getAll()); + } + + /** + * MatchRule: + * + * @return UpdateUK8SULSConfigParamMatchRule|null + */ + public function getMatchRule() + { + return new UpdateUK8SULSConfigParamMatchRule($this->get("MatchRule")); + } + + /** + * MatchRule: + * + * @param UpdateUK8SULSConfigParamMatchRule $matchRule + */ + public function setMatchRule(array $matchRule) + { + $this->set("MatchRule", $matchRule->getAll()); + } +} diff --git a/src/UK8S/Apis/UpdateUK8SULSConfigResponse.php b/src/UK8S/Apis/UpdateUK8SULSConfigResponse.php new file mode 100644 index 0000000..05cac7f --- /dev/null +++ b/src/UK8S/Apis/UpdateUK8SULSConfigResponse.php @@ -0,0 +1,26 @@ +get("ScaleDownUnneededTime"); + } + + /** + * ScaleDownUnneededTime: 缩容触发延时 + * + * @param string $scaleDownUnneededTime + */ + public function setScaleDownUnneededTime($scaleDownUnneededTime) + { + $this->set("ScaleDownUnneededTime", $scaleDownUnneededTime); + } + + /** + * ScaleDownUtilizationThreshold: CPU缩容阈值 + * + * @return string|null + */ + public function getScaleDownUtilizationThreshold() + { + return $this->get("ScaleDownUtilizationThreshold"); + } + + /** + * ScaleDownUtilizationThreshold: CPU缩容阈值 + * + * @param string $scaleDownUtilizationThreshold + */ + public function setScaleDownUtilizationThreshold($scaleDownUtilizationThreshold) + { + $this->set("ScaleDownUtilizationThreshold", $scaleDownUtilizationThreshold); + } + + /** + * ScaleDownDelayAfterAdd: 静默时间 + * + * @return string|null + */ + public function getScaleDownDelayAfterAdd() + { + return $this->get("ScaleDownDelayAfterAdd"); + } + + /** + * ScaleDownDelayAfterAdd: 静默时间 + * + * @param string $scaleDownDelayAfterAdd + */ + public function setScaleDownDelayAfterAdd($scaleDownDelayAfterAdd) + { + $this->set("ScaleDownDelayAfterAdd", $scaleDownDelayAfterAdd); + } + + /** + * Enabled: 打开/关闭 + * + * @return integer|null + */ + public function getEnabled() + { + return $this->get("Enabled"); + } + + /** + * Enabled: 打开/关闭 + * + * @param int $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * Version: 伸缩器版本 + * + * @return string|null + */ + public function getVersion() + { + return $this->get("Version"); + } + + /** + * Version: 伸缩器版本 + * + * @param string $version + */ + public function setVersion($version) + { + $this->set("Version", $version); + } + + /** + * UpdateTime: + * + * @return integer|null + */ + public function getUpdateTime() + { + return $this->get("UpdateTime"); + } + + /** + * UpdateTime: + * + * @param int $updateTime + */ + public function setUpdateTime($updateTime) + { + $this->set("UpdateTime", $updateTime); + } + + /** + * ScaleDownGpuUtilizationThreshold: GPU缩容阈值 + * + * @return string|null + */ + public function getScaleDownGpuUtilizationThreshold() + { + return $this->get("ScaleDownGpuUtilizationThreshold"); + } + + /** + * ScaleDownGpuUtilizationThreshold: GPU缩容阈值 + * + * @param string $scaleDownGpuUtilizationThreshold + */ + public function setScaleDownGpuUtilizationThreshold($scaleDownGpuUtilizationThreshold) + { + $this->set("ScaleDownGpuUtilizationThreshold", $scaleDownGpuUtilizationThreshold); + } +} diff --git a/src/UK8S/Models/ClusterSet.php b/src/UK8S/Models/ClusterSet.php index 6ab897d..86d7896 100644 --- a/src/UK8S/Models/ClusterSet.php +++ b/src/UK8S/Models/ClusterSet.php @@ -142,6 +142,26 @@ public function setServiceCIDR($serviceCIDR) $this->set("ServiceCIDR", $serviceCIDR); } + /** + * CNIMode: CNI网络模式 + * + * @return string|null + */ + public function getCNIMode() + { + return $this->get("CNIMode"); + } + + /** + * CNIMode: CNI网络模式 + * + * @param string $cniMode + */ + public function setCNIMode($cniMode) + { + $this->set("CNIMode", $cniMode); + } + /** * MasterCount: Master 节点数量 * @@ -202,6 +222,106 @@ public function setK8sVersion($k8sVersion) $this->set("K8sVersion", $k8sVersion); } + /** + * DeleteProtection: 删除保护开关。0表示不开启,1表示开启。默认不开启 + * + * @return integer|null + */ + public function getDeleteProtection() + { + return $this->get("DeleteProtection"); + } + + /** + * DeleteProtection: 删除保护开关。0表示不开启,1表示开启。默认不开启 + * + * @param int $deleteProtection + */ + public function setDeleteProtection($deleteProtection) + { + $this->set("DeleteProtection", $deleteProtection); + } + + /** + * RuntimeName: 容器运行时名称 + * + * @return string|null + */ + public function getRuntimeName() + { + return $this->get("RuntimeName"); + } + + /** + * RuntimeName: 容器运行时名称 + * + * @param string $runtimeName + */ + public function setRuntimeName($runtimeName) + { + $this->set("RuntimeName", $runtimeName); + } + + /** + * RuntimeVersion: 容器运行时版本号,docker 或 containerd 版本 + * + * @return string|null + */ + public function getRuntimeVersion() + { + return $this->get("RuntimeVersion"); + } + + /** + * RuntimeVersion: 容器运行时版本号,docker 或 containerd 版本 + * + * @param string $runtimeVersion + */ + public function setRuntimeVersion($runtimeVersion) + { + $this->set("RuntimeVersion", $runtimeVersion); + } + + /** + * ClusterType: 计费/管理形态,区分"专有版"和"托管版"两种售卖形态 + * + * @return string|null + */ + public function getClusterType() + { + return $this->get("ClusterType"); + } + + /** + * ClusterType: 计费/管理形态,区分"专有版"和"托管版"两种售卖形态 + * + * @param string $clusterType + */ + public function setClusterType($clusterType) + { + $this->set("ClusterType", $clusterType); + } + + /** + * LoopbackClientCert: API Server 内部回环客户端证书 + * + * @return LoopbackClientCert|null + */ + public function getLoopbackClientCert() + { + return new LoopbackClientCert($this->get("LoopbackClientCert")); + } + + /** + * LoopbackClientCert: API Server 内部回环客户端证书 + * + * @param LoopbackClientCert $loopbackClientCert + */ + public function setLoopbackClientCert(array $loopbackClientCert) + { + $this->set("LoopbackClientCert", $loopbackClientCert->getAll()); + } + /** * ClusterLogInfo: 创建集群时判断如果为NORESOURCE则为没资源,否则为空 * diff --git a/src/UK8S/Models/EIP.php b/src/UK8S/Models/EIP.php new file mode 100644 index 0000000..0d34085 --- /dev/null +++ b/src/UK8S/Models/EIP.php @@ -0,0 +1,124 @@ +get("Bandwidth"); + } + + /** + * Bandwidth: 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + * + * @param int $bandwidth + */ + public function setBandwidth($bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * + * @return string|null + */ + public function getPayMode() + { + return $this->get("PayMode"); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * + * @param string $payMode + */ + public function setPayMode($payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @return string|null + */ + public function getShareBandwidthId() + { + return $this->get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId($shareBandwidthId) + { + $this->set("ShareBandwidthId", $shareBandwidthId); + } + + /** + * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International,BGP: Bgp。 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * + * @return string|null + */ + public function getOperatorName() + { + return $this->get("OperatorName"); + } + + /** + * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International,BGP: Bgp。 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * + * @param string $operatorName + */ + public function setOperatorName($operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * CouponId: 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UK8S/Models/EvictionCondition.php b/src/UK8S/Models/EvictionCondition.php new file mode 100644 index 0000000..d9cbff6 --- /dev/null +++ b/src/UK8S/Models/EvictionCondition.php @@ -0,0 +1,104 @@ +get("MemoryAvailable"); + } + + /** + * MemoryAvailable: 内存相关驱逐条件或宽限时间。 + * + * @param string $memoryAvailable + */ + public function setMemoryAvailable($memoryAvailable) + { + $this->set("MemoryAvailable", $memoryAvailable); + } + + /** + * ImagefsAvailable: 镜像文件系统存储相关驱逐条件或宽限时间。 + * + * @return string|null + */ + public function getImagefsAvailable() + { + return $this->get("ImagefsAvailable"); + } + + /** + * ImagefsAvailable: 镜像文件系统存储相关驱逐条件或宽限时间。 + * + * @param string $imagefsAvailable + */ + public function setImagefsAvailable($imagefsAvailable) + { + $this->set("ImagefsAvailable", $imagefsAvailable); + } + + /** + * NodefsAvailable: 节点存储余量相关驱逐条件或宽限时间。 + * + * @return string|null + */ + public function getNodefsAvailable() + { + return $this->get("NodefsAvailable"); + } + + /** + * NodefsAvailable: 节点存储余量相关驱逐条件或宽限时间。 + * + * @param string $nodefsAvailable + */ + public function setNodefsAvailable($nodefsAvailable) + { + $this->set("NodefsAvailable", $nodefsAvailable); + } + + /** + * NodefsInodesFree: 节点剩余inodes驱逐条件或宽限时间。 + * + * @return string|null + */ + public function getNodefsInodesFree() + { + return $this->get("NodefsInodesFree"); + } + + /** + * NodefsInodesFree: 节点剩余inodes驱逐条件或宽限时间。 + * + * @param string $nodefsInodesFree + */ + public function setNodefsInodesFree($nodefsInodesFree) + { + $this->set("NodefsInodesFree", $nodefsInodesFree); + } +} diff --git a/src/UK8S/Models/IPSet.php b/src/UK8S/Models/IPSet.php index 7efdc60..28d1dc8 100644 --- a/src/UK8S/Models/IPSet.php +++ b/src/UK8S/Models/IPSet.php @@ -121,4 +121,104 @@ public function setDefault($default) { $this->set("Default", $default); } + + /** + * IPMode: IP 地址分配模式 + * + * @return string|null + */ + public function getIPMode() + { + return $this->get("IPMode"); + } + + /** + * IPMode: IP 地址分配模式 + * + * @param string $ipMode + */ + public function setIPMode($ipMode) + { + $this->set("IPMode", $ipMode); + } + + /** + * VPCId: IP 所属的 VPC Id + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: IP 所属的 VPC Id + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: IP 所在的 子网 Id + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: IP 所在的 子网 Id + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Mac: 网卡的 MAC 地址 + * + * @return string|null + */ + public function getMac() + { + return $this->get("Mac"); + } + + /** + * Mac: 网卡的 MAC 地址 + * + * @param string $mac + */ + public function setMac($mac) + { + $this->set("Mac", $mac); + } + + /** + * NetworkInterfaceId: 虚拟网卡 Id + * + * @return string|null + */ + public function getNetworkInterfaceId() + { + return $this->get("NetworkInterfaceId"); + } + + /** + * NetworkInterfaceId: 虚拟网卡 Id + * + * @param string $networkInterfaceId + */ + public function setNetworkInterfaceId($networkInterfaceId) + { + $this->set("NetworkInterfaceId", $networkInterfaceId); + } } diff --git a/src/UK8S/Models/ImageInfo.php b/src/UK8S/Models/ImageInfo.php index 45f11f9..005c908 100644 --- a/src/UK8S/Models/ImageInfo.php +++ b/src/UK8S/Models/ImageInfo.php @@ -101,4 +101,124 @@ public function setNotSupportGPU($notSupportGPU) { $this->set("NotSupportGPU", $notSupportGPU); } + + /** + * OsType: OS 类型 + * + * @return string|null + */ + public function getOsType() + { + return $this->get("OsType"); + } + + /** + * OsType: OS 类型 + * + * @param string $osType + */ + public function setOsType($osType) + { + $this->set("OsType", $osType); + } + + /** + * OsName: OS 名称 + * + * @return string|null + */ + public function getOsName() + { + return $this->get("OsName"); + } + + /** + * OsName: OS 名称 + * + * @param string $osName + */ + public function setOsName($osName) + { + $this->set("OsName", $osName); + } + + /** + * Features: 镜像支持的特性 + * + * @return string[]|null + */ + public function getFeatures() + { + return $this->get("Features"); + } + + /** + * Features: 镜像支持的特性 + * + * @param string[] $features + */ + public function setFeatures(array $features) + { + $this->set("Features", $features); + } + + /** + * ImageSize: 镜像大小 + * + * @return integer|null + */ + public function getImageSize() + { + return $this->get("ImageSize"); + } + + /** + * ImageSize: 镜像大小 + * + * @param int $imageSize + */ + public function setImageSize($imageSize) + { + $this->set("ImageSize", $imageSize); + } + + /** + * IntegratedSoftware: 集成软件名称, 如NV驱动版本、cuda版本 + * + * @return string|null + */ + public function getIntegratedSoftware() + { + return $this->get("IntegratedSoftware"); + } + + /** + * IntegratedSoftware: 集成软件名称, 如NV驱动版本、cuda版本 + * + * @param string $integratedSoftware + */ + public function setIntegratedSoftware($integratedSoftware) + { + $this->set("IntegratedSoftware", $integratedSoftware); + } + + /** + * SupportedGPUTypes: 支持的GPU机型 + * + * @return string[]|null + */ + public function getSupportedGPUTypes() + { + return $this->get("SupportedGPUTypes"); + } + + /** + * SupportedGPUTypes: 支持的GPU机型 + * + * @param string[] $supportedGPUTypes + */ + public function setSupportedGPUTypes(array $supportedGPUTypes) + { + $this->set("SupportedGPUTypes", $supportedGPUTypes); + } } diff --git a/src/UK8S/Models/KubeletConfiguration.php b/src/UK8S/Models/KubeletConfiguration.php new file mode 100644 index 0000000..3a0ee86 --- /dev/null +++ b/src/UK8S/Models/KubeletConfiguration.php @@ -0,0 +1,224 @@ +get("ContainerLogMaxFiles"); + } + + /** + * ContainerLogMaxFiles: 最大日志文件数量 + * + * @param int $containerLogMaxFiles + */ + public function setContainerLogMaxFiles($containerLogMaxFiles) + { + $this->set("ContainerLogMaxFiles", $containerLogMaxFiles); + } + + /** + * ContainerLogMaxSize: 最大日志文件大小 + * + * @return string|null + */ + public function getContainerLogMaxSize() + { + return $this->get("ContainerLogMaxSize"); + } + + /** + * ContainerLogMaxSize: 最大日志文件大小 + * + * @param string $containerLogMaxSize + */ + public function setContainerLogMaxSize($containerLogMaxSize) + { + $this->set("ContainerLogMaxSize", $containerLogMaxSize); + } + + /** + * EvictionHard: 硬性驱逐条件,EvictionCondition类型 + * + * @return EvictionCondition|null + */ + public function getEvictionHard() + { + return new EvictionCondition($this->get("EvictionHard")); + } + + /** + * EvictionHard: 硬性驱逐条件,EvictionCondition类型 + * + * @param EvictionCondition $evictionHard + */ + public function setEvictionHard(array $evictionHard) + { + $this->set("EvictionHard", $evictionHard->getAll()); + } + + /** + * EvictionSoft: 软性驱逐条件,EvictionCondition类型 + * + * @return EvictionCondition|null + */ + public function getEvictionSoft() + { + return new EvictionCondition($this->get("EvictionSoft")); + } + + /** + * EvictionSoft: 软性驱逐条件,EvictionCondition类型 + * + * @param EvictionCondition $evictionSoft + */ + public function setEvictionSoft(array $evictionSoft) + { + $this->set("EvictionSoft", $evictionSoft->getAll()); + } + + /** + * EvictionSoftGracePeriod: 软性驱逐宽限时间,EvictionCondition类型 + * + * @return EvictionCondition|null + */ + public function getEvictionSoftGracePeriod() + { + return new EvictionCondition($this->get("EvictionSoftGracePeriod")); + } + + /** + * EvictionSoftGracePeriod: 软性驱逐宽限时间,EvictionCondition类型 + * + * @param EvictionCondition $evictionSoftGracePeriod + */ + public function setEvictionSoftGracePeriod(array $evictionSoftGracePeriod) + { + $this->set("EvictionSoftGracePeriod", $evictionSoftGracePeriod->getAll()); + } + + /** + * ImageGCHighThresholdPercent: 镜像垃圾收集阈值 + * + * @return integer|null + */ + public function getImageGCHighThresholdPercent() + { + return $this->get("ImageGCHighThresholdPercent"); + } + + /** + * ImageGCHighThresholdPercent: 镜像垃圾收集阈值 + * + * @param int $imageGCHighThresholdPercent + */ + public function setImageGCHighThresholdPercent($imageGCHighThresholdPercent) + { + $this->set("ImageGCHighThresholdPercent", $imageGCHighThresholdPercent); + } + + /** + * ImageGCLowThresholdPercent: 停止镜像垃圾收集阈值 + * + * @return integer|null + */ + public function getImageGCLowThresholdPercent() + { + return $this->get("ImageGCLowThresholdPercent"); + } + + /** + * ImageGCLowThresholdPercent: 停止镜像垃圾收集阈值 + * + * @param int $imageGCLowThresholdPercent + */ + public function setImageGCLowThresholdPercent($imageGCLowThresholdPercent) + { + $this->set("ImageGCLowThresholdPercent", $imageGCLowThresholdPercent); + } + + /** + * KubeReserved: kubelet预留资源,ReservedResource类型 + * + * @return ReservedResource|null + */ + public function getKubeReserved() + { + return new ReservedResource($this->get("KubeReserved")); + } + + /** + * KubeReserved: kubelet预留资源,ReservedResource类型 + * + * @param ReservedResource $kubeReserved + */ + public function setKubeReserved(array $kubeReserved) + { + $this->set("KubeReserved", $kubeReserved->getAll()); + } + + /** + * SystemReserved: 系统预留资源,ReservedResource类型 + * + * @return ReservedResource|null + */ + public function getSystemReserved() + { + return new ReservedResource($this->get("SystemReserved")); + } + + /** + * SystemReserved: 系统预留资源,ReservedResource类型 + * + * @param ReservedResource $systemReserved + */ + public function setSystemReserved(array $systemReserved) + { + $this->set("SystemReserved", $systemReserved->getAll()); + } + + /** + * MaxPods: 最大Pod数量 + * + * @return integer|null + */ + public function getMaxPods() + { + return $this->get("MaxPods"); + } + + /** + * MaxPods: 最大Pod数量 + * + * @param int $maxPods + */ + public function setMaxPods($maxPods) + { + $this->set("MaxPods", $maxPods); + } +} diff --git a/src/UK8S/Models/LoopbackClientCert.php b/src/UK8S/Models/LoopbackClientCert.php new file mode 100644 index 0000000..e048264 --- /dev/null +++ b/src/UK8S/Models/LoopbackClientCert.php @@ -0,0 +1,64 @@ +get("ExpireTime"); + } + + /** + * ExpireTime: 证书到期时间 + * + * @param int $expireTime + */ + public function setExpireTime($expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * Warn: 证书是否进入过期告警状态 + * + * @return boolean|null + */ + public function getWarn() + { + return $this->get("Warn"); + } + + /** + * Warn: 证书是否进入过期告警状态 + * + * @param boolean $warn + */ + public function setWarn($warn) + { + $this->set("Warn", $warn); + } +} diff --git a/src/UK8S/Models/NetworkInterface.php b/src/UK8S/Models/NetworkInterface.php new file mode 100644 index 0000000..21dbd4d --- /dev/null +++ b/src/UK8S/Models/NetworkInterface.php @@ -0,0 +1,44 @@ +get("EIP")); + } + + /** + * EIP: EIP + * + * @param EIP $eip + */ + public function setEIP(array $eip) + { + $this->set("EIP", $eip->getAll()); + } +} diff --git a/src/UK8S/Models/NodeGroupSet.php b/src/UK8S/Models/NodeGroupSet.php index 6d49962..cfe7092 100644 --- a/src/UK8S/Models/NodeGroupSet.php +++ b/src/UK8S/Models/NodeGroupSet.php @@ -82,6 +82,26 @@ public function setNodeGroupName($nodeGroupName) $this->set("NodeGroupName", $nodeGroupName); } + /** + * NodeNamePrefix: 自定义Uhost主机名前缀。完整的自定义Uhost主机名为{NodeNamePrefix}-{NodeIP}。 + * + * @return string|null + */ + public function getNodeNamePrefix() + { + return $this->get("NodeNamePrefix"); + } + + /** + * NodeNamePrefix: 自定义Uhost主机名前缀。完整的自定义Uhost主机名为{NodeNamePrefix}-{NodeIP}。 + * + * @param string $nodeNamePrefix + */ + public function setNodeNamePrefix($nodeNamePrefix) + { + $this->set("NodeNamePrefix", $nodeNamePrefix); + } + /** * ImageId: 镜像ID * @@ -142,6 +162,26 @@ public function setMinimalCpuPlatform($minimalCpuPlatform) $this->set("MinimalCpuPlatform", $minimalCpuPlatform); } + /** + * UHostFamily: 主机规格族 + * + * @return string|null + */ + public function getUHostFamily() + { + return $this->get("UHostFamily"); + } + + /** + * UHostFamily: 主机规格族 + * + * @param string $uHostFamily + */ + public function setUHostFamily($uHostFamily) + { + $this->set("UHostFamily", $uHostFamily); + } + /** * CPU: 虚拟CPU核数 * @@ -405,7 +445,7 @@ public function setIsolationGroupId($isolationGroupId) /** * MaxPods: int默认110,生产环境建议小于等于110。 * - * @return string|null + * @return integer|null */ public function getMaxPods() { @@ -415,7 +455,7 @@ public function getMaxPods() /** * MaxPods: int默认110,生产环境建议小于等于110。 * - * @param string $maxPods + * @param int $maxPods */ public function setMaxPods($maxPods) { @@ -501,4 +541,340 @@ public function setLabels($labels) { $this->set("Labels", $labels); } + + /** + * SecGroupId: Node所属的安全组id(最多5个) + * + * @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: Node所属的安全组id(最多5个) + * + * @param SecGroupId[] $secGroupId + */ + public function setSecGroupId(array $secGroupId) + { + $result = []; + foreach ($secGroupId as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * + * @return string|null + */ + public function getSecurityMode() + { + return $this->get("SecurityMode"); + } + + /** + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * + * @param string $securityMode + */ + public function setSecurityMode($securityMode) + { + $this->set("SecurityMode", $securityMode); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @return string|null + */ + public function getSecurityGroupId() + { + return $this->get("SecurityGroupId"); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @param string $securityGroupId + */ + public function setSecurityGroupId($securityGroupId) + { + $this->set("SecurityGroupId", $securityGroupId); + } + + /** + * NetworkInterface: Node节点网卡配置 + * + * @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: Node节点网卡配置 + * + * @param NetworkInterface[] $networkInterface + */ + public function setNetworkInterface(array $networkInterface) + { + $result = []; + foreach ($networkInterface as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * KubeletConfiguration: KubeletConfiguration + * + * @return KubeletConfiguration|null + */ + public function getKubeletConfiguration() + { + return new KubeletConfiguration($this->get("KubeletConfiguration")); + } + + /** + * KubeletConfiguration: KubeletConfiguration + * + * @param KubeletConfiguration $kubeletConfiguration + */ + public function setKubeletConfiguration(array $kubeletConfiguration) + { + $this->set("KubeletConfiguration", $kubeletConfiguration->getAll()); + } + + /** + * ImageName: 镜像名称 + * + * @return string|null + */ + public function getImageName() + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称 + * + * @param string $imageName + */ + public function setImageName($imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * ImageType: 镜像类型 + * + * @return string|null + */ + public function getImageType() + { + return $this->get("ImageType"); + } + + /** + * ImageType: 镜像类型 + * + * @param string $imageType + */ + public function setImageType($imageType) + { + $this->set("ImageType", $imageType); + } + + /** + * OsType: 操作系统类型 + * + * @return string|null + */ + public function getOsType() + { + return $this->get("OsType"); + } + + /** + * OsType: 操作系统类型 + * + * @param string $osType + */ + public function setOsType($osType) + { + $this->set("OsType", $osType); + } + + /** + * OsName: 操作系统名称 + * + * @return string|null + */ + public function getOsName() + { + return $this->get("OsName"); + } + + /** + * OsName: 操作系统名称 + * + * @param string $osName + */ + public function setOsName($osName) + { + $this->set("OsName", $osName); + } + + /** + * NetCapability: 网络配置 + * + * @return string|null + */ + public function getNetCapability() + { + return $this->get("NetCapability"); + } + + /** + * NetCapability: 网络配置 + * + * @param string $netCapability + */ + public function setNetCapability($netCapability) + { + $this->set("NetCapability", $netCapability); + } + + /** + * UNIFeature: 是否启用 UNI 网络特性 + * + * @return boolean|null + */ + public function getUNIFeature() + { + return $this->get("UNIFeature"); + } + + /** + * UNIFeature: 是否启用 UNI 网络特性 + * + * @param boolean $uniFeature + */ + public function setUNIFeature($uniFeature) + { + $this->set("UNIFeature", $uniFeature); + } + + /** + * Disks: 磁盘列表 + * + * @return DiskSet[]|null + */ + public function getDisks() + { + $items = $this->get("Disks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new DiskSet($item)); + } + return $result; + } + + /** + * Disks: 磁盘列表 + * + * @param DiskSet[] $disks + */ + public function setDisks(array $disks) + { + $result = []; + foreach ($disks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * RelatedAsg: 节点池关联的弹性伸缩组ID + * + * @return string[]|null + */ + public function getRelatedAsg() + { + return $this->get("RelatedAsg"); + } + + /** + * RelatedAsg: 节点池关联的弹性伸缩组ID + * + * @param string[] $relatedAsg + */ + public function setRelatedAsg(array $relatedAsg) + { + $this->set("RelatedAsg", $relatedAsg); + } + + /** + * CreateTime: 节点池创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 节点池创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * UpdateTime: 节点池更新时间 + * + * @return integer|null + */ + public function getUpdateTime() + { + return $this->get("UpdateTime"); + } + + /** + * UpdateTime: 节点池更新时间 + * + * @param int $updateTime + */ + public function setUpdateTime($updateTime) + { + $this->set("UpdateTime", $updateTime); + } } diff --git a/src/UK8S/Models/NodeInfoV2.php b/src/UK8S/Models/NodeInfoV2.php index 1c8886c..d158af3 100644 --- a/src/UK8S/Models/NodeInfoV2.php +++ b/src/UK8S/Models/NodeInfoV2.php @@ -182,6 +182,46 @@ public function setMachineType($machineType) $this->set("MachineType", $machineType); } + /** + * CPUPlatform: CPU平台 + * + * @return string|null + */ + public function getCPUPlatform() + { + return $this->get("CPUPlatform"); + } + + /** + * CPUPlatform: CPU平台 + * + * @param string $cpuPlatform + */ + public function setCPUPlatform($cpuPlatform) + { + $this->set("CPUPlatform", $cpuPlatform); + } + + /** + * UHostFamily: 主机规格族 + * + * @return string|null + */ + public function getUHostFamily() + { + return $this->get("UHostFamily"); + } + + /** + * UHostFamily: 主机规格族 + * + * @param string $uHostFamily + */ + public function setUHostFamily($uHostFamily) + { + $this->set("UHostFamily", $uHostFamily); + } + /** * OsType: Node节点的操作系统类别,如Linux或Windows。 * @@ -223,7 +263,7 @@ public function setOsName($osName) } /** - * CPU: Node节点CPU核数,单位: 个。 + * CPU: Node节点CPU核数,单位: 核。 * * @return integer|null */ @@ -233,7 +273,7 @@ public function getCPU() } /** - * CPU: Node节点CPU核数,单位: 个。 + * CPU: Node节点CPU核数,单位: 核。 * * @param int $cpu */ @@ -414,6 +454,286 @@ public function setNodeLogInfo($nodeLogInfo) $this->set("NodeLogInfo", $nodeLogInfo); } + /** + * Labels: 节点标签 + * + * @return string[]|null + */ + public function getLabels() + { + return $this->get("Labels"); + } + + /** + * Labels: 节点标签 + * + * @param string[] $labels + */ + public function setLabels(array $labels) + { + $this->set("Labels", $labels); + } + + /** + * KubeletVersion: Kubelet版本 + * + * @return string|null + */ + public function getKubeletVersion() + { + return $this->get("KubeletVersion"); + } + + /** + * KubeletVersion: Kubelet版本 + * + * @param string $kubeletVersion + */ + public function setKubeletVersion($kubeletVersion) + { + $this->set("KubeletVersion", $kubeletVersion); + } + + /** + * MaxPod: pod最大可用 + * + * @return integer|null + */ + public function getMaxPod() + { + return $this->get("MaxPod"); + } + + /** + * MaxPod: pod最大可用 + * + * @param int $maxPod + */ + public function setMaxPod($maxPod) + { + $this->set("MaxPod", $maxPod); + } + + /** + * MaxMemory: 内存最大可用 + * + * @return integer|null + */ + public function getMaxMemory() + { + return $this->get("MaxMemory"); + } + + /** + * MaxMemory: 内存最大可用 + * + * @param int $maxMemory + */ + public function setMaxMemory($maxMemory) + { + $this->set("MaxMemory", $maxMemory); + } + + /** + * MaxCPU: CPU最大可用 + * + * @return integer|null + */ + public function getMaxCPU() + { + return $this->get("MaxCPU"); + } + + /** + * MaxCPU: CPU最大可用 + * + * @param int $maxCPU + */ + public function setMaxCPU($maxCPU) + { + $this->set("MaxCPU", $maxCPU); + } + + /** + * RequestPod: 已申请的pod + * + * @return integer|null + */ + public function getRequestPod() + { + return $this->get("RequestPod"); + } + + /** + * RequestPod: 已申请的pod + * + * @param int $requestPod + */ + public function setRequestPod($requestPod) + { + $this->set("RequestPod", $requestPod); + } + + /** + * RequestMemory: 已申请的Memory + * + * @return integer|null + */ + public function getRequestMemory() + { + return $this->get("RequestMemory"); + } + + /** + * RequestMemory: 已申请的Memory + * + * @param int $requestMemory + */ + public function setRequestMemory($requestMemory) + { + $this->set("RequestMemory", $requestMemory); + } + + /** + * RequestCPU: 已申请的CPU + * + * @return integer|null + */ + public function getRequestCPU() + { + return $this->get("RequestCPU"); + } + + /** + * RequestCPU: 已申请的CPU + * + * @param int $requestCPU + */ + public function setRequestCPU($requestCPU) + { + $this->set("RequestCPU", $requestCPU); + } + + /** + * RuntimeVersion: Runtime 版本 + * + * @return string|null + */ + public function getRuntimeVersion() + { + return $this->get("RuntimeVersion"); + } + + /** + * RuntimeVersion: Runtime 版本 + * + * @param string $runtimeVersion + */ + public function setRuntimeVersion($runtimeVersion) + { + $this->set("RuntimeVersion", $runtimeVersion); + } + + /** + * RuntimeName: Runtime 名字 + * + * @return string|null + */ + public function getRuntimeName() + { + return $this->get("RuntimeName"); + } + + /** + * RuntimeName: Runtime 名字 + * + * @param string $runtimeName + */ + public function setRuntimeName($runtimeName) + { + $this->set("RuntimeName", $runtimeName); + } + + /** + * UsedCPU: 已使用的CPU + * + * @return integer|null + */ + public function getUsedCPU() + { + return $this->get("UsedCPU"); + } + + /** + * UsedCPU: 已使用的CPU + * + * @param int $usedCPU + */ + public function setUsedCPU($usedCPU) + { + $this->set("UsedCPU", $usedCPU); + } + + /** + * UsedMemory: 已使用的Memory + * + * @return integer|null + */ + public function getUsedMemory() + { + return $this->get("UsedMemory"); + } + + /** + * UsedMemory: 已使用的Memory + * + * @param int $usedMemory + */ + public function setUsedMemory($usedMemory) + { + $this->set("UsedMemory", $usedMemory); + } + + /** + * BootDiskSize: 系统盘大小 + * + * @return integer|null + */ + public function getBootDiskSize() + { + return $this->get("BootDiskSize"); + } + + /** + * BootDiskSize: 系统盘大小 + * + * @param int $bootDiskSize + */ + public function setBootDiskSize($bootDiskSize) + { + $this->set("BootDiskSize", $bootDiskSize); + } + + /** + * DataDiskSize: 数据盘大小,如果有多块数据盘会汇总展示,不包括PVC + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 数据盘大小,如果有多块数据盘会汇总展示,不包括PVC + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + /** * GPU: 节点的GPU颗数。 * @@ -433,4 +753,184 @@ public function setGPU($gpu) { $this->set("GPU", $gpu); } + + /** + * 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); + } + + /** + * IDCId: 边缘机房id + * + * @return string|null + */ + public function getIDCId() + { + return $this->get("IDCId"); + } + + /** + * IDCId: 边缘机房id + * + * @param string $idcId + */ + public function setIDCId($idcId) + { + $this->set("IDCId", $idcId); + } + + /** + * IDCName: 边缘机房 + * + * @return string|null + */ + public function getIDCName() + { + return $this->get("IDCName"); + } + + /** + * IDCName: 边缘机房 + * + * @param string $idcName + */ + public function setIDCName($idcName) + { + $this->set("IDCName", $idcName); + } + + /** + * Remark: 节点主机备注信息 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 节点主机备注信息 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * GPUType: 节点GPU型号(如果为GPU机型) + * + * @return string|null + */ + public function getGPUType() + { + return $this->get("GPUType"); + } + + /** + * GPUType: 节点GPU型号(如果为GPU机型) + * + * @param string $gpuType + */ + public function setGPUType($gpuType) + { + $this->set("GPUType", $gpuType); + } + + /** + * ImageAccelable: 是否启用了容器镜像加速 + * + * @return boolean|null + */ + public function getImageAccelable() + { + return $this->get("ImageAccelable"); + } + + /** + * ImageAccelable: 是否启用了容器镜像加速 + * + * @param boolean $imageAccelable + */ + public function setImageAccelable($imageAccelable) + { + $this->set("ImageAccelable", $imageAccelable); + } + + /** + * Tag: 节点所属业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 节点所属业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * PodCIDR: Pod CIDR + * + * @return string|null + */ + public function getPodCIDR() + { + return $this->get("PodCIDR"); + } + + /** + * PodCIDR: Pod CIDR + * + * @param string $podCIDR + */ + public function setPodCIDR($podCIDR) + { + $this->set("PodCIDR", $podCIDR); + } + + /** + * NodeGroupName: 节点所属节点池名称 + * + * @return string|null + */ + public function getNodeGroupName() + { + return $this->get("NodeGroupName"); + } + + /** + * NodeGroupName: 节点所属节点池名称 + * + * @param string $nodeGroupName + */ + public function setNodeGroupName($nodeGroupName) + { + $this->set("NodeGroupName", $nodeGroupName); + } } diff --git a/src/UK8S/Models/ReservedResource.php b/src/UK8S/Models/ReservedResource.php new file mode 100644 index 0000000..a8c2503 --- /dev/null +++ b/src/UK8S/Models/ReservedResource.php @@ -0,0 +1,104 @@ +get("CPU"); + } + + /** + * CPU: CPU + * + * @param string $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存 + * + * @return string|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 内存 + * + * @param string $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * EphemeralStorage: 存储 + * + * @return string|null + */ + public function getEphemeralStorage() + { + return $this->get("EphemeralStorage"); + } + + /** + * EphemeralStorage: 存储 + * + * @param string $ephemeralStorage + */ + public function setEphemeralStorage($ephemeralStorage) + { + $this->set("EphemeralStorage", $ephemeralStorage); + } + + /** + * Pid: Pid + * + * @return string|null + */ + public function getPid() + { + return $this->get("Pid"); + } + + /** + * Pid: Pid + * + * @param string $pid + */ + public function setPid($pid) + { + $this->set("Pid", $pid); + } +} diff --git a/src/UK8S/Models/SecGroupId.php b/src/UK8S/Models/SecGroupId.php new file mode 100644 index 0000000..3bd3230 --- /dev/null +++ b/src/UK8S/Models/SecGroupId.php @@ -0,0 +1,84 @@ +get("Id"); + } + + /** + * Id: 安全组名称 + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Name: 安全组id + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 安全组id + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Priority: 安全组优先级 + * + * @return string|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 安全组优先级 + * + * @param string $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } +} diff --git a/src/UK8S/Models/UHostIPSet.php b/src/UK8S/Models/UHostIPSet.php index 4605774..288d605 100644 --- a/src/UK8S/Models/UHostIPSet.php +++ b/src/UK8S/Models/UHostIPSet.php @@ -161,4 +161,44 @@ public function setMac($mac) { $this->set("Mac", $mac); } + + /** + * IPMode: IP 协议类型 + * + * @return string|null + */ + public function getIPMode() + { + return $this->get("IPMode"); + } + + /** + * IPMode: IP 协议类型 + * + * @param string $ipMode + */ + public function setIPMode($ipMode) + { + $this->set("IPMode", $ipMode); + } + + /** + * NetworkInterfaceId: 网络接口资源 ID + * + * @return string|null + */ + public function getNetworkInterfaceId() + { + return $this->get("NetworkInterfaceId"); + } + + /** + * NetworkInterfaceId: 网络接口资源 ID + * + * @param string $networkInterfaceId + */ + public function setNetworkInterfaceId($networkInterfaceId) + { + $this->set("NetworkInterfaceId", $networkInterfaceId); + } } diff --git a/src/UK8S/Models/ULSExtractRule.php b/src/UK8S/Models/ULSExtractRule.php new file mode 100644 index 0000000..3088cd1 --- /dev/null +++ b/src/UK8S/Models/ULSExtractRule.php @@ -0,0 +1,224 @@ +get("CollectPolicy"); + } + + /** + * CollectPolicy: 采集策略。可选值: full (全量采集存量日志), increment (从当前时间点增量采集)。默认为 full。 + * + * @param string $collectPolicy + */ + public function setCollectPolicy($collectPolicy) + { + $this->set("CollectPolicy", $collectPolicy); + } + + /** + * Encode: 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。 + * + * @return string|null + */ + public function getEncode() + { + return $this->get("Encode"); + } + + /** + * Encode: 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。 + * + * @param string $encode + */ + public function setEncode($encode) + { + $this->set("Encode", $encode); + } + + /** + * LogType: 日志解析类型,决定了如何结构化日志。 + * + * @return string|null + */ + public function getLogType() + { + return $this->get("LogType"); + } + + /** + * LogType: 日志解析类型,决定了如何结构化日志。 + * + * @param string $logType + */ + public function setLogType($logType) + { + $this->set("LogType", $logType); + } + + /** + * Delimiter: 当 LogType 为delimiter_log 时可选,可选字段 ' ',' ','|',';',',' + * + * @return string|null + */ + public function getDelimiter() + { + return $this->get("Delimiter"); + } + + /** + * Delimiter: 当 LogType 为delimiter_log 时可选,可选字段 ' ',' ','|',';',',' + * + * @param string $delimiter + */ + public function setDelimiter($delimiter) + { + $this->set("Delimiter", $delimiter); + } + + /** + * BeginningRegex: 行首正则表达式。当 logType 为多行模式 (如 multiline_log 或 multiline_fullregex_log) 时,用于标识一条新日志的开始。 + * + * @return string|null + */ + public function getBeginningRegex() + { + return $this->get("BeginningRegex"); + } + + /** + * BeginningRegex: 行首正则表达式。当 logType 为多行模式 (如 multiline_log 或 multiline_fullregex_log) 时,用于标识一条新日志的开始。 + * + * @param string $beginningRegex + */ + public function setBeginningRegex($beginningRegex) + { + $this->set("BeginningRegex", $beginningRegex); + } + + /** + * LogRegex: 日志提取正则表达式。当 logType 为正则模式 (如 fullregex_log 或 multiline_fullregex_log) 时,用于从日志中提取字段。 + * + * @return string|null + */ + public function getLogRegex() + { + return $this->get("LogRegex"); + } + + /** + * LogRegex: 日志提取正则表达式。当 logType 为正则模式 (如 fullregex_log 或 multiline_fullregex_log) 时,用于从日志中提取字段。 + * + * @param string $logRegex + */ + public function setLogRegex($logRegex) + { + $this->set("LogRegex", $logRegex); + } + + /** + * TimeKey: 指定时间字段。 + * + * @return string|null + */ + public function getTimeKey() + { + return $this->get("TimeKey"); + } + + /** + * TimeKey: 指定时间字段。 + * + * @param string $timeKey + */ + public function setTimeKey($timeKey) + { + $this->set("TimeKey", $timeKey); + } + + /** + * TimeFormat: timeKey 对应的时间格式。如: %Y-%m-%d %H:%M:%S + * + * @return string|null + */ + public function getTimeFormat() + { + return $this->get("TimeFormat"); + } + + /** + * TimeFormat: timeKey 对应的时间格式。如: %Y-%m-%d %H:%M:%S + * + * @param string $timeFormat + */ + public function setTimeFormat($timeFormat) + { + $this->set("TimeFormat", $timeFormat); + } + + /** + * UnMatchUpload: 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 + * + * @return string|null + */ + public function getUnMatchUpload() + { + return $this->get("UnMatchUpload"); + } + + /** + * UnMatchUpload: 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 + * + * @param string $unMatchUpload + */ + public function setUnMatchUpload($unMatchUpload) + { + $this->set("UnMatchUpload", $unMatchUpload); + } + + /** + * UnMatchKey: 如果 unMatchUpload 为 true,无法解析的日志原文将被存放在此字段指定的 Key 下。默认为 LogParseFailure。 + * + * @return string|null + */ + public function getUnMatchKey() + { + return $this->get("UnMatchKey"); + } + + /** + * UnMatchKey: 如果 unMatchUpload 为 true,无法解析的日志原文将被存放在此字段指定的 Key 下。默认为 LogParseFailure。 + * + * @param string $unMatchKey + */ + public function setUnMatchKey($unMatchKey) + { + $this->set("UnMatchKey", $unMatchKey); + } +} diff --git a/src/UK8S/Models/ULSFilePaths.php b/src/UK8S/Models/ULSFilePaths.php new file mode 100644 index 0000000..e536ad8 --- /dev/null +++ b/src/UK8S/Models/ULSFilePaths.php @@ -0,0 +1,64 @@ +get("Path"); + } + + /** + * Path: 定义采集路径 + * + * @param string $path + */ + public function setPath($path) + { + $this->set("Path", $path); + } + + /** + * File: 采集文件 + * + * @return string|null + */ + public function getFile() + { + return $this->get("File"); + } + + /** + * File: 采集文件 + * + * @param string $file + */ + public function setFile($file) + { + $this->set("File", $file); + } +} diff --git a/src/UK8S/Models/ULSInputDetail.php b/src/UK8S/Models/ULSInputDetail.php new file mode 100644 index 0000000..8f30e57 --- /dev/null +++ b/src/UK8S/Models/ULSInputDetail.php @@ -0,0 +1,96 @@ +get("FilePaths"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULSFilePaths($item)); + } + return $result; + } + + /** + * FilePaths: 采集路径,数组。 + * + * @param ULSFilePaths[] $filePaths + */ + public function setFilePaths(array $filePaths) + { + $result = []; + foreach ($filePaths as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Type: 日志输入类型。当前主要支持 container_file,表示采集容器标准输出或文件。 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 日志输入类型。当前主要支持 container_file,表示采集容器标准输出或文件。 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * InputMetadata: 定义哪些容器相关的元数据需要附加到日志中。 + * + * @return ULSInputMetadata|null + */ + public function getInputMetadata() + { + return new ULSInputMetadata($this->get("InputMetadata")); + } + + /** + * InputMetadata: 定义哪些容器相关的元数据需要附加到日志中。 + * + * @param ULSInputMetadata $inputMetadata + */ + public function setInputMetadata(array $inputMetadata) + { + $this->set("InputMetadata", $inputMetadata->getAll()); + } +} diff --git a/src/UK8S/Models/ULSInputMetadata.php b/src/UK8S/Models/ULSInputMetadata.php new file mode 100644 index 0000000..93c1697 --- /dev/null +++ b/src/UK8S/Models/ULSInputMetadata.php @@ -0,0 +1,64 @@ +get("Container"); + } + + /** + * Container: 指定具体要采集元数据的容器名。如果留空,则不采集容器的元数据,可选字段:container_name,namespace,pod_name,pod_ip,pod_uid,container_id,image_name。Pod Label 元数据通过指定 InputDetail.Metadata.Labels 字段。 + * + * @param string $container + */ + public function setContainer($container) + { + $this->set("Container", $container); + } + + /** + * Labels: 定义要采集哪些 Pod 的标签 (Labels)。可选值:*:采集所有标签。app,version:仅采集 app 和 version 这两个标签。""(空字符串):不采集任何标签。 + * + * @return string|null + */ + public function getLabels() + { + return $this->get("Labels"); + } + + /** + * Labels: 定义要采集哪些 Pod 的标签 (Labels)。可选值:*:采集所有标签。app,version:仅采集 app 和 version 这两个标签。""(空字符串):不采集任何标签。 + * + * @param string $labels + */ + public function setLabels($labels) + { + $this->set("Labels", $labels); + } +} diff --git a/src/UK8S/Models/ULSLabels.php b/src/UK8S/Models/ULSLabels.php new file mode 100644 index 0000000..76206b3 --- /dev/null +++ b/src/UK8S/Models/ULSLabels.php @@ -0,0 +1,84 @@ +get("Key"); + } + + /** + * Key: 要匹配的标签的 Key。 + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * ValueOperator: 标签值的匹配操作符。可选值: in, notin。 + * + * @return string|null + */ + public function getValueOperator() + { + return $this->get("ValueOperator"); + } + + /** + * ValueOperator: 标签值的匹配操作符。可选值: in, notin。 + * + * @param string $valueOperator + */ + public function setValueOperator($valueOperator) + { + $this->set("ValueOperator", $valueOperator); + } + + /** + * Value: 要匹配的标签的值。 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 要匹配的标签的值。 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UK8S/Models/ULSLogConfig.php b/src/UK8S/Models/ULSLogConfig.php new file mode 100644 index 0000000..a88b7df --- /dev/null +++ b/src/UK8S/Models/ULSLogConfig.php @@ -0,0 +1,164 @@ +get("ClusterId"); + } + + /** + * ClusterId: uk8s集群id + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * MachineGroup: 机器组 + * + * @return string|null + */ + public function getMachineGroup() + { + return $this->get("MachineGroup"); + } + + /** + * MachineGroup: 机器组 + * + * @param string $machineGroup + */ + public function setMachineGroup($machineGroup) + { + $this->set("MachineGroup", $machineGroup); + } + + /** + * ExtractRule: 定义日志的提取、解析和格式化规则。见 ULSExtractRule + * + * @return ULSExtractRule|null + */ + public function getExtractRule() + { + return new ULSExtractRule($this->get("ExtractRule")); + } + + /** + * ExtractRule: 定义日志的提取、解析和格式化规则。见 ULSExtractRule + * + * @param ULSExtractRule $extractRule + */ + public function setExtractRule(array $extractRule) + { + $this->set("ExtractRule", $extractRule->getAll()); + } + + /** + * InputDetail: 定义日志的输入来源(例如容器文件)。见 ULSInputDetail + * + * @return ULSInputDetail|null + */ + public function getInputDetail() + { + return new ULSInputDetail($this->get("InputDetail")); + } + + /** + * InputDetail: 定义日志的输入来源(例如容器文件)。见 ULSInputDetail + * + * @param ULSInputDetail $inputDetail + */ + public function setInputDetail(array $inputDetail) + { + $this->set("InputDetail", $inputDetail->getAll()); + } + + /** + * MatchRule: 定义此采集规则要匹配的目标 Pod 或工作负载。见 ULSMatchRule + * + * @return ULSMatchRule|null + */ + public function getMatchRule() + { + return new ULSMatchRule($this->get("MatchRule")); + } + + /** + * MatchRule: 定义此采集规则要匹配的目标 Pod 或工作负载。见 ULSMatchRule + * + * @param ULSMatchRule $matchRule + */ + public function setMatchRule(array $matchRule) + { + $this->set("MatchRule", $matchRule->getAll()); + } + + /** + * TopicID: 日志服务中用于接收日志的目标 Topic ID。 + * + * @return string|null + */ + public function getTopicID() + { + return $this->get("TopicID"); + } + + /** + * TopicID: 日志服务中用于接收日志的目标 Topic ID。 + * + * @param string $topicID + */ + public function setTopicID($topicID) + { + $this->set("TopicID", $topicID); + } + + /** + * Name: 采集配置规则名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 采集配置规则名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } +} diff --git a/src/UK8S/Models/ULSMatchRule.php b/src/UK8S/Models/ULSMatchRule.php new file mode 100644 index 0000000..e2b7463 --- /dev/null +++ b/src/UK8S/Models/ULSMatchRule.php @@ -0,0 +1,116 @@ +get("ContainerOperator"); + } + + /** + * ContainerOperator: 容器名称匹配操作符。支持:in(包含),notin(不包含) + * + * @param string $containerOperator + */ + public function setContainerOperator($containerOperator) + { + $this->set("ContainerOperator", $containerOperator); + } + + /** + * Container: 要匹配的容器名称,*表示所有容器,用逗号分隔 + * + * @return string|null + */ + public function getContainer() + { + return $this->get("Container"); + } + + /** + * Container: 要匹配的容器名称,*表示所有容器,用逗号分隔 + * + * @param string $container + */ + public function setContainer($container) + { + $this->set("Container", $container); + } + + /** + * Workloads: 按工作负载进行匹配。 + * + * @return ULSWorkloadMatch[]|null + */ + public function getWorkloads() + { + $items = $this->get("Workloads"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULSWorkloadMatch($item)); + } + return $result; + } + + /** + * Workloads: 按工作负载进行匹配。 + * + * @param ULSWorkloadMatch[] $workloads + */ + public function setWorkloads(array $workloads) + { + $result = []; + foreach ($workloads as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * PodLabels: 按 Pod 的标签进行匹配,提供更灵活的选择。 + * + * @return ULSPodLabelsMatch|null + */ + public function getPodLabels() + { + return new ULSPodLabelsMatch($this->get("PodLabels")); + } + + /** + * PodLabels: 按 Pod 的标签进行匹配,提供更灵活的选择。 + * + * @param ULSPodLabelsMatch $podLabels + */ + public function setPodLabels(array $podLabels) + { + $this->set("PodLabels", $podLabels->getAll()); + } +} diff --git a/src/UK8S/Models/ULSPodLabelsMatch.php b/src/UK8S/Models/ULSPodLabelsMatch.php new file mode 100644 index 0000000..2767ce8 --- /dev/null +++ b/src/UK8S/Models/ULSPodLabelsMatch.php @@ -0,0 +1,96 @@ +get("NamespaceOperator"); + } + + /** + * NamespaceOperator: 命名空间名称的匹配操作符。可选值: in, notin。 + * + * @param string $namespaceOperator + */ + public function setNamespaceOperator($namespaceOperator) + { + $this->set("NamespaceOperator", $namespaceOperator); + } + + /** + * Namespace: 要匹配的命名空间。namespaceOperator 存在时必需。 + * + * @return string|null + */ + public function getNamespace() + { + return $this->get("Namespace"); + } + + /** + * Namespace: 要匹配的命名空间。namespaceOperator 存在时必需。 + * + * @param string $namespace + */ + public function setNamespace($namespace) + { + $this->set("Namespace", $namespace); + } + + /** + * Labels: 一个标签选择器数组,用于定义匹配的标签条件。 + * + * @return ULSLabels[]|null + */ + public function getLabels() + { + $items = $this->get("Labels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULSLabels($item)); + } + return $result; + } + + /** + * Labels: 一个标签选择器数组,用于定义匹配的标签条件。 + * + * @param ULSLabels[] $labels + */ + public function setLabels(array $labels) + { + $result = []; + foreach ($labels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Models/ULSWorkloadMatch.php b/src/UK8S/Models/ULSWorkloadMatch.php new file mode 100644 index 0000000..cc11dda --- /dev/null +++ b/src/UK8S/Models/ULSWorkloadMatch.php @@ -0,0 +1,84 @@ +get("Namespace"); + } + + /** + * Namespace: 工作负载所在的命名空间。 + * + * @param string $namespace + */ + public function setNamespace($namespace) + { + $this->set("Namespace", $namespace); + } + + /** + * Type: 工作负载的类型,例如 deployment, statefulset, daemonset,cronjob,job。 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 工作负载的类型,例如 deployment, statefulset, daemonset,cronjob,job。 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Name: 工作负载的名称。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 工作负载的名称。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } +} diff --git a/src/UK8S/Models/UhostInfo.php b/src/UK8S/Models/UhostInfo.php index c3655e1..b9e1c35 100644 --- a/src/UK8S/Models/UhostInfo.php +++ b/src/UK8S/Models/UhostInfo.php @@ -285,4 +285,156 @@ public function setNodeType($nodeType) { $this->set("NodeType", $nodeType); } + + /** + * 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); + } + + /** + * BasicImageName: 基础镜像名称 + * + * @return string|null + */ + public function getBasicImageName() + { + return $this->get("BasicImageName"); + } + + /** + * BasicImageName: 基础镜像名称 + * + * @param string $basicImageName + */ + public function setBasicImageName($basicImageName) + { + $this->set("BasicImageName", $basicImageName); + } + + /** + * OsType: 操作系统类型 + * + * @return string|null + */ + public function getOsType() + { + return $this->get("OsType"); + } + + /** + * OsType: 操作系统类型 + * + * @param string $osType + */ + public function setOsType($osType) + { + $this->set("OsType", $osType); + } + + /** + * TotalDiskSpace: 节点总磁盘空间 + * + * @return integer|null + */ + public function getTotalDiskSpace() + { + return $this->get("TotalDiskSpace"); + } + + /** + * TotalDiskSpace: 节点总磁盘空间 + * + * @param int $totalDiskSpace + */ + public function setTotalDiskSpace($totalDiskSpace) + { + $this->set("TotalDiskSpace", $totalDiskSpace); + } + + /** + * MachineType: 主机机型类别 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 主机机型类别 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * 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; + } } diff --git a/src/UK8S/Params/AddUK8SUHostNodeParamKubeletConfiguration.php b/src/UK8S/Params/AddUK8SUHostNodeParamKubeletConfiguration.php new file mode 100644 index 0000000..a2104a2 --- /dev/null +++ b/src/UK8S/Params/AddUK8SUHostNodeParamKubeletConfiguration.php @@ -0,0 +1,44 @@ +get("ContainerLogMaxFiles"); + } + + /** + * ContainerLogMaxFiles: 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup + * + * @param string $containerLogMaxFiles + */ + public function setContainerLogMaxFiles($containerLogMaxFiles) + { + $this->set("ContainerLogMaxFiles", $containerLogMaxFiles); + } +} diff --git a/src/UK8S/Params/AddUK8SUHostNodeParamNetworkInterfaceEIP.php b/src/UK8S/Params/AddUK8SUHostNodeParamNetworkInterfaceEIP.php index 7f50a60..5dfa0aa 100644 --- a/src/UK8S/Params/AddUK8SUHostNodeParamNetworkInterfaceEIP.php +++ b/src/UK8S/Params/AddUK8SUHostNodeParamNetworkInterfaceEIP.php @@ -83,7 +83,7 @@ public function setShareBandwidthId($shareBandwidthId) } /** - * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International,BGP: Bgp。各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International * * @return string|null */ @@ -93,7 +93,7 @@ public function getOperatorName() } /** - * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International,BGP: Bgp。各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International * * @param string $operatorName */ diff --git a/src/UK8S/Params/AddUK8SUHostNodeParamUserLabels.php b/src/UK8S/Params/AddUK8SUHostNodeParamUserLabels.php new file mode 100644 index 0000000..c1e525a --- /dev/null +++ b/src/UK8S/Params/AddUK8SUHostNodeParamUserLabels.php @@ -0,0 +1,64 @@ +get("Key"); + } + + /** + * Key: UK8S用户资源标签的键值 + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: UK8S用户资源标签的值 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: UK8S用户资源标签的值 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UK8S/Params/CreateUK8SULSConfigParamExtractRule.php b/src/UK8S/Params/CreateUK8SULSConfigParamExtractRule.php new file mode 100644 index 0000000..334dfee --- /dev/null +++ b/src/UK8S/Params/CreateUK8SULSConfigParamExtractRule.php @@ -0,0 +1,304 @@ +get("LogType"); + } + + /** + * LogType: 日志解析类型,决定了如何结构化日志。可选值: multi_line_delimiter:多行分隔符,delimiter:分隔符,full_regex:完全正则,multi_line_full_regex:多行完全正则,minimal_list:单行全文日志,multi_line:多行全文日志 + * + * @param string $logType + */ + public function setLogType($logType) + { + $this->set("LogType", $logType); + } + + /** + * CollectPolicy: 采集策略。可选值: full (全量采集存量日志), increment (从当前时间点增量采集)。默认为 full。 + * + * @return string|null + */ + public function getCollectPolicy() + { + return $this->get("CollectPolicy"); + } + + /** + * CollectPolicy: 采集策略。可选值: full (全量采集存量日志), increment (从当前时间点增量采集)。默认为 full。 + * + * @param string $collectPolicy + */ + public function setCollectPolicy($collectPolicy) + { + $this->set("CollectPolicy", $collectPolicy); + } + + /** + * Encode: 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。 + * + * @return string|null + */ + public function getEncode() + { + return $this->get("Encode"); + } + + /** + * Encode: 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。 + * + * @param string $encode + */ + public function setEncode($encode) + { + $this->set("Encode", $encode); + } + + /** + * Keys: 当LogType 为分隔符、正则、多行正则时可用 + * + * @return string[]|null + */ + public function getKeys() + { + return $this->get("Keys"); + } + + /** + * Keys: 当LogType 为分隔符、正则、多行正则时可用 + * + * @param string[] $keys + */ + public function setKeys(array $keys) + { + $this->set("Keys", $keys); + } + + /** + * Delimiter: 当 LogType 为delimiter 时可选,接收 "space"、"tab"、"|"、";"、","。 + * + * @return string|null + */ + public function getDelimiter() + { + return $this->get("Delimiter"); + } + + /** + * Delimiter: 当 LogType 为delimiter 时可选,接收 "space"、"tab"、"|"、";"、","。 + * + * @param string $delimiter + */ + public function setDelimiter($delimiter) + { + $this->set("Delimiter", $delimiter); + } + + /** + * BeginningRegex: 行首正则表达式。当 logType 为多行模式 (如 multi_line 或 multi_line_full_regex) 时,用于标识一条新日志的开始。 + * + * @return string|null + */ + public function getBeginningRegex() + { + return $this->get("BeginningRegex"); + } + + /** + * BeginningRegex: 行首正则表达式。当 logType 为多行模式 (如 multi_line 或 multi_line_full_regex) 时,用于标识一条新日志的开始。 + * + * @param string $beginningRegex + */ + public function setBeginningRegex($beginningRegex) + { + $this->set("BeginningRegex", $beginningRegex); + } + + /** + * LogRegex: 日志提取正则表达式。当 logType 为正则模式 (如 full_regex,multi_line_full_regex) 时,用于从日志中提取字段。 + * + * @return string|null + */ + public function getLogRegex() + { + return $this->get("LogRegex"); + } + + /** + * LogRegex: 日志提取正则表达式。当 logType 为正则模式 (如 full_regex,multi_line_full_regex) 时,用于从日志中提取字段。 + * + * @param string $logRegex + */ + public function setLogRegex($logRegex) + { + $this->set("LogRegex", $logRegex); + } + + /** + * ExtractRule: + * + * @return CreateUK8SULSConfigParamExtractRuleExtractRule|null + */ + public function getExtractRule() + { + return new CreateUK8SULSConfigParamExtractRuleExtractRule($this->get("ExtractRule")); + } + + /** + * ExtractRule: + * + * @param CreateUK8SULSConfigParamExtractRuleExtractRule $extractRule + */ + public function setExtractRule(array $extractRule) + { + $this->set("ExtractRule", $extractRule->getAll()); + } + + /** + * TimeKey: 当日志为 json 或正则提取时,指定包含日志时间的字段名 (Key)。 + * + * @return string|null + */ + public function getTimeKey() + { + return $this->get("TimeKey"); + } + + /** + * TimeKey: 当日志为 json 或正则提取时,指定包含日志时间的字段名 (Key)。 + * + * @param string $timeKey + */ + public function setTimeKey($timeKey) + { + $this->set("TimeKey", $timeKey); + } + + /** + * TimeFormat: timeKey 对应的时间格式。 + * + * @return string|null + */ + public function getTimeFormat() + { + return $this->get("TimeFormat"); + } + + /** + * TimeFormat: timeKey 对应的时间格式。 + * + * @param string $timeFormat + */ + public function setTimeFormat($timeFormat) + { + $this->set("TimeFormat", $timeFormat); + } + + /** + * UnMatchUpload: 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 + * + * @return string|null + */ + public function getUnMatchUpload() + { + return $this->get("UnMatchUpload"); + } + + /** + * UnMatchUpload: 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 + * + * @param string $unMatchUpload + */ + public function setUnMatchUpload($unMatchUpload) + { + $this->set("UnMatchUpload", $unMatchUpload); + } + + /** + * UnMatchKey: 没有设置默认值;UnMatchUpload="true" 时强制要求填写 + * + * @return string|null + */ + public function getUnMatchKey() + { + return $this->get("UnMatchKey"); + } + + /** + * UnMatchKey: 没有设置默认值;UnMatchUpload="true" 时强制要求填写 + * + * @param string $unMatchKey + */ + public function setUnMatchKey($unMatchKey) + { + $this->set("UnMatchKey", $unMatchKey); + } + + /** + * DelimiterBase64: Base64 编码的分隔符,优先级高于 Delimiter + * + * @return string|null + */ + public function getDelimiterBase64() + { + return $this->get("DelimiterBase64"); + } + + /** + * DelimiterBase64: Base64 编码的分隔符,优先级高于 Delimiter + * + * @param string $delimiterBase64 + */ + public function setDelimiterBase64($delimiterBase64) + { + $this->set("DelimiterBase64", $delimiterBase64); + } + + /** + * BeginningRegexBase64: Base64 编码的行首正则,优先级高于 BeginningRegex + * + * @return string|null + */ + public function getBeginningRegexBase64() + { + return $this->get("BeginningRegexBase64"); + } + + /** + * BeginningRegexBase64: Base64 编码的行首正则,优先级高于 BeginningRegex + * + * @param string $beginningRegexBase64 + */ + public function setBeginningRegexBase64($beginningRegexBase64) + { + $this->set("BeginningRegexBase64", $beginningRegexBase64); + } +} diff --git a/src/UK8S/Params/CreateUK8SULSConfigParamExtractRuleExtractRule.php b/src/UK8S/Params/CreateUK8SULSConfigParamExtractRuleExtractRule.php new file mode 100644 index 0000000..dbc8f71 --- /dev/null +++ b/src/UK8S/Params/CreateUK8SULSConfigParamExtractRuleExtractRule.php @@ -0,0 +1,44 @@ +get("LogRegexBase64"); + } + + /** + * LogRegexBase64: Base64 编码的日志提取正则表达式。 + * + * @param string $logRegexBase64 + */ + public function setLogRegexBase64($logRegexBase64) + { + $this->set("LogRegexBase64", $logRegexBase64); + } +} diff --git a/src/UK8S/Params/CreateUK8SULSConfigParamInputDetail.php b/src/UK8S/Params/CreateUK8SULSConfigParamInputDetail.php new file mode 100644 index 0000000..744cbcf --- /dev/null +++ b/src/UK8S/Params/CreateUK8SULSConfigParamInputDetail.php @@ -0,0 +1,116 @@ +get("Type"); + } + + /** + * Type: 日志输入类型。支持 container_file 和 container_stdout + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Metadata: + * + * @return CreateUK8SULSConfigParamInputDetailMetadata|null + */ + public function getMetadata() + { + return new CreateUK8SULSConfigParamInputDetailMetadata($this->get("Metadata")); + } + + /** + * Metadata: + * + * @param CreateUK8SULSConfigParamInputDetailMetadata $metadata + */ + public function setMetadata(array $metadata) + { + $this->set("Metadata", $metadata->getAll()); + } + + /** + * FilePaths: + * + * @return CreateUK8SULSConfigParamInputDetailFilePaths[]|null + */ + public function getFilePaths() + { + $items = $this->get("FilePaths"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUK8SULSConfigParamInputDetailFilePaths($item)); + } + return $result; + } + + /** + * FilePaths: + * + * @param CreateUK8SULSConfigParamInputDetailFilePaths[] $filePaths + */ + public function setFilePaths(array $filePaths) + { + $result = []; + foreach ($filePaths as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Stream: all、stdout、stderr,默认 all (用于 InputDetail.Type = container_stdout) + * + * @return string|null + */ + public function getStream() + { + return $this->get("Stream"); + } + + /** + * Stream: all、stdout、stderr,默认 all (用于 InputDetail.Type = container_stdout) + * + * @param string $stream + */ + public function setStream($stream) + { + $this->set("Stream", $stream); + } +} diff --git a/src/UK8S/Params/CreateUK8SULSConfigParamInputDetailFilePaths.php b/src/UK8S/Params/CreateUK8SULSConfigParamInputDetailFilePaths.php new file mode 100644 index 0000000..6922630 --- /dev/null +++ b/src/UK8S/Params/CreateUK8SULSConfigParamInputDetailFilePaths.php @@ -0,0 +1,64 @@ +get("Path"); + } + + /** + * Path: 定义采集路径 + * + * @param string $path + */ + public function setPath($path) + { + $this->set("Path", $path); + } + + /** + * File: 定义采集路径的文件名 + * + * @return string|null + */ + public function getFile() + { + return $this->get("File"); + } + + /** + * File: 定义采集路径的文件名 + * + * @param string $file + */ + public function setFile($file) + { + $this->set("File", $file); + } +} diff --git a/src/UK8S/Params/CreateUK8SULSConfigParamInputDetailMetadata.php b/src/UK8S/Params/CreateUK8SULSConfigParamInputDetailMetadata.php new file mode 100644 index 0000000..533c09c --- /dev/null +++ b/src/UK8S/Params/CreateUK8SULSConfigParamInputDetailMetadata.php @@ -0,0 +1,64 @@ +get("Container"); + } + + /** + * Container: 指定具体要采集元数据的容器名。如果留空,则不采集容器的元数据,可选字段:container_name,namespace,pod_name,pod_ip,pod_uid,container_id,image_name。Pod Label 元数据通过指定 InputDetail.Metadata.Labels字段。 + * + * @param string $container + */ + public function setContainer($container) + { + $this->set("Container", $container); + } + + /** + * Labels: 定义要采集哪些 Pod 的标签 (Labels)。可选值: * (采集所有标签), "app,version" (仅采集 app 和 version), "" (不采集任何标签)。 + * + * @return string|null + */ + public function getLabels() + { + return $this->get("Labels"); + } + + /** + * Labels: 定义要采集哪些 Pod 的标签 (Labels)。可选值: * (采集所有标签), "app,version" (仅采集 app 和 version), "" (不采集任何标签)。 + * + * @param string $labels + */ + public function setLabels($labels) + { + $this->set("Labels", $labels); + } +} diff --git a/src/UK8S/Params/CreateUK8SULSConfigParamMatchRule.php b/src/UK8S/Params/CreateUK8SULSConfigParamMatchRule.php new file mode 100644 index 0000000..768a3b9 --- /dev/null +++ b/src/UK8S/Params/CreateUK8SULSConfigParamMatchRule.php @@ -0,0 +1,116 @@ +get("ContainerOperator"); + } + + /** + * ContainerOperator: 容器名称匹配操作符。支持:in(包含),notin(不包含) + * + * @param string $containerOperator + */ + public function setContainerOperator($containerOperator) + { + $this->set("ContainerOperator", $containerOperator); + } + + /** + * Container: 要匹配的容器名称,*表示所有容器,用逗号分隔 + * + * @return string|null + */ + public function getContainer() + { + return $this->get("Container"); + } + + /** + * Container: 要匹配的容器名称,*表示所有容器,用逗号分隔 + * + * @param string $container + */ + public function setContainer($container) + { + $this->set("Container", $container); + } + + /** + * Workloads: + * + * @return CreateUK8SULSConfigParamMatchRuleWorkloads[]|null + */ + public function getWorkloads() + { + $items = $this->get("Workloads"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUK8SULSConfigParamMatchRuleWorkloads($item)); + } + return $result; + } + + /** + * Workloads: + * + * @param CreateUK8SULSConfigParamMatchRuleWorkloads[] $workloads + */ + public function setWorkloads(array $workloads) + { + $result = []; + foreach ($workloads as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * PodLabels: + * + * @return CreateUK8SULSConfigParamMatchRulePodLabels|null + */ + public function getPodLabels() + { + return new CreateUK8SULSConfigParamMatchRulePodLabels($this->get("PodLabels")); + } + + /** + * PodLabels: + * + * @param CreateUK8SULSConfigParamMatchRulePodLabels $podLabels + */ + public function setPodLabels(array $podLabels) + { + $this->set("PodLabels", $podLabels->getAll()); + } +} diff --git a/src/UK8S/Params/CreateUK8SULSConfigParamMatchRulePodLabels.php b/src/UK8S/Params/CreateUK8SULSConfigParamMatchRulePodLabels.php new file mode 100644 index 0000000..ff8a9c4 --- /dev/null +++ b/src/UK8S/Params/CreateUK8SULSConfigParamMatchRulePodLabels.php @@ -0,0 +1,96 @@ +get("NamespaceOperator"); + } + + /** + * NamespaceOperator: 指定/排除命名空间, 可选值: in/notin + * + * @param string $namespaceOperator + */ + public function setNamespaceOperator($namespaceOperator) + { + $this->set("NamespaceOperator", $namespaceOperator); + } + + /** + * Namespace: 命名空间名称 + * + * @return string|null + */ + public function getNamespace() + { + return $this->get("Namespace"); + } + + /** + * Namespace: 命名空间名称 + * + * @param string $namespace + */ + public function setNamespace($namespace) + { + $this->set("Namespace", $namespace); + } + + /** + * Labels: + * + * @return CreateUK8SULSConfigParamMatchRulePodLabelsLabels[]|null + */ + public function getLabels() + { + $items = $this->get("Labels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUK8SULSConfigParamMatchRulePodLabelsLabels($item)); + } + return $result; + } + + /** + * Labels: + * + * @param CreateUK8SULSConfigParamMatchRulePodLabelsLabels[] $labels + */ + public function setLabels(array $labels) + { + $result = []; + foreach ($labels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Params/CreateUK8SULSConfigParamMatchRulePodLabelsLabels.php b/src/UK8S/Params/CreateUK8SULSConfigParamMatchRulePodLabelsLabels.php new file mode 100644 index 0000000..97710d7 --- /dev/null +++ b/src/UK8S/Params/CreateUK8SULSConfigParamMatchRulePodLabelsLabels.php @@ -0,0 +1,84 @@ +get("Key"); + } + + /** + * Key: 按 Pod 标签匹配时,要匹配的标签的 Key。 + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * ValueOperator: 按 Pod 标签匹配时,标签值的匹配操作符。可选值: in, notin。 + * + * @return string|null + */ + public function getValueOperator() + { + return $this->get("ValueOperator"); + } + + /** + * ValueOperator: 按 Pod 标签匹配时,标签值的匹配操作符。可选值: in, notin。 + * + * @param string $valueOperator + */ + public function setValueOperator($valueOperator) + { + $this->set("ValueOperator", $valueOperator); + } + + /** + * Value: 按 Pod 标签匹配时,要匹配的标签的值。 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 按 Pod 标签匹配时,要匹配的标签的值。 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UK8S/Params/CreateUK8SULSConfigParamMatchRuleWorkloads.php b/src/UK8S/Params/CreateUK8SULSConfigParamMatchRuleWorkloads.php new file mode 100644 index 0000000..040b91c --- /dev/null +++ b/src/UK8S/Params/CreateUK8SULSConfigParamMatchRuleWorkloads.php @@ -0,0 +1,84 @@ +get("Namespace"); + } + + /** + * Namespace: 按工作负载匹配时,工作负载所在的命名空间。 + * + * @param string $namespace + */ + public function setNamespace($namespace) + { + $this->set("Namespace", $namespace); + } + + /** + * Type: 按工作负载匹配时,工作负载的类型,例如 deployment, statefulset, daemonset,job, cronjob。 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 按工作负载匹配时,工作负载的类型,例如 deployment, statefulset, daemonset,job, cronjob。 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Name: 按工作负载匹配时,工作负载的名称。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 按工作负载匹配时,工作负载的名称。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } +} diff --git a/src/UK8S/Params/UpdateUK8SULSConfigParamExtractRule.php b/src/UK8S/Params/UpdateUK8SULSConfigParamExtractRule.php new file mode 100644 index 0000000..3a76e0b --- /dev/null +++ b/src/UK8S/Params/UpdateUK8SULSConfigParamExtractRule.php @@ -0,0 +1,304 @@ +get("CollectPolicy"); + } + + /** + * CollectPolicy: 采集策略。可选值:full(全量采集存量日志)、increment(从当前时间点增量采集)。默认为full。 + * + * @param string $collectPolicy + */ + public function setCollectPolicy($collectPolicy) + { + $this->set("CollectPolicy", $collectPolicy); + } + + /** + * Encode: 日志原文的编码格式。可选值:utf-8、gbk。默认为utf-8。 + * + * @return string|null + */ + public function getEncode() + { + return $this->get("Encode"); + } + + /** + * Encode: 日志原文的编码格式。可选值:utf-8、gbk。默认为utf-8。 + * + * @param string $encode + */ + public function setEncode($encode) + { + $this->set("Encode", $encode); + } + + /** + * LogType: 日志解析类型。可选值:json、delimiter、full_regex、multi_line_full_regex、multi_line_delimiter、minimal_list、multi_line。 + * + * @return string|null + */ + public function getLogType() + { + return $this->get("LogType"); + } + + /** + * LogType: 日志解析类型。可选值:json、delimiter、full_regex、multi_line_full_regex、multi_line_delimiter、minimal_list、multi_line。 + * + * @param string $logType + */ + public function setLogType($logType) + { + $this->set("LogType", $logType); + } + + /** + * BeginningRegex: 行首正则表达式。multi_line、multi_line_full_regex或multi_line_delimiter模式下,BeginningRegex和BeginningRegexBase64必须至少填写一个。 + * + * @return string|null + */ + public function getBeginningRegex() + { + return $this->get("BeginningRegex"); + } + + /** + * BeginningRegex: 行首正则表达式。multi_line、multi_line_full_regex或multi_line_delimiter模式下,BeginningRegex和BeginningRegexBase64必须至少填写一个。 + * + * @param string $beginningRegex + */ + public function setBeginningRegex($beginningRegex) + { + $this->set("BeginningRegex", $beginningRegex); + } + + /** + * BeginningRegexBase64: Base64编码的行首正则表达式。填写时优先于BeginningRegex。 + * + * @return string|null + */ + public function getBeginningRegexBase64() + { + return $this->get("BeginningRegexBase64"); + } + + /** + * BeginningRegexBase64: Base64编码的行首正则表达式。填写时优先于BeginningRegex。 + * + * @param string $beginningRegexBase64 + */ + public function setBeginningRegexBase64($beginningRegexBase64) + { + $this->set("BeginningRegexBase64", $beginningRegexBase64); + } + + /** + * LogRegex: 日志提取正则表达式。full_regex或multi_line_full_regex模式下,LogRegex和LogRegexBase64必须至少填写一个。 + * + * @return string|null + */ + public function getLogRegex() + { + return $this->get("LogRegex"); + } + + /** + * LogRegex: 日志提取正则表达式。full_regex或multi_line_full_regex模式下,LogRegex和LogRegexBase64必须至少填写一个。 + * + * @param string $logRegex + */ + public function setLogRegex($logRegex) + { + $this->set("LogRegex", $logRegex); + } + + /** + * LogRegexBase64: Base64编码的日志提取正则表达式。填写时优先于LogRegex。 + * + * @return string|null + */ + public function getLogRegexBase64() + { + return $this->get("LogRegexBase64"); + } + + /** + * LogRegexBase64: Base64编码的日志提取正则表达式。填写时优先于LogRegex。 + * + * @param string $logRegexBase64 + */ + public function setLogRegexBase64($logRegexBase64) + { + $this->set("LogRegexBase64", $logRegexBase64); + } + + /** + * Delimiter: 分隔符。delimiter或multi_line_delimiter模式下可用。可选值:space、tab、|、;、,。 + * + * @return string|null + */ + public function getDelimiter() + { + return $this->get("Delimiter"); + } + + /** + * Delimiter: 分隔符。delimiter或multi_line_delimiter模式下可用。可选值:space、tab、|、;、,。 + * + * @param string $delimiter + */ + public function setDelimiter($delimiter) + { + $this->set("Delimiter", $delimiter); + } + + /** + * DelimiterBase64: Base64编码的分隔符。填写时优先于Delimiter。 + * + * @return string|null + */ + public function getDelimiterBase64() + { + return $this->get("DelimiterBase64"); + } + + /** + * DelimiterBase64: Base64编码的分隔符。填写时优先于Delimiter。 + * + * @param string $delimiterBase64 + */ + public function setDelimiterBase64($delimiterBase64) + { + $this->set("DelimiterBase64", $delimiterBase64); + } + + /** + * TimeKey: 包含日志时间的字段名。 + * + * @return string|null + */ + public function getTimeKey() + { + return $this->get("TimeKey"); + } + + /** + * TimeKey: 包含日志时间的字段名。 + * + * @param string $timeKey + */ + public function setTimeKey($timeKey) + { + $this->set("TimeKey", $timeKey); + } + + /** + * TimeFormat: TimeKey对应的时间格式。json、full_regex或multi_line_full_regex模式下,填写TimeKey时必须同时填写TimeFormat。 + * + * @return string|null + */ + public function getTimeFormat() + { + return $this->get("TimeFormat"); + } + + /** + * TimeFormat: TimeKey对应的时间格式。json、full_regex或multi_line_full_regex模式下,填写TimeKey时必须同时填写TimeFormat。 + * + * @param string $timeFormat + */ + public function setTimeFormat($timeFormat) + { + $this->set("TimeFormat", $timeFormat); + } + + /** + * UnMatchUpload: 是否上传解析失败的日志。字符串true表示上传,false表示丢弃。默认为false。 + * + * @return string|null + */ + public function getUnMatchUpload() + { + return $this->get("UnMatchUpload"); + } + + /** + * UnMatchUpload: 是否上传解析失败的日志。字符串true表示上传,false表示丢弃。默认为false。 + * + * @param string $unMatchUpload + */ + public function setUnMatchUpload($unMatchUpload) + { + $this->set("UnMatchUpload", $unMatchUpload); + } + + /** + * UnMatchKey: 存放无法解析的日志原文的Key。UnMatchUpload为true时必须填写。 + * + * @return string|null + */ + public function getUnMatchKey() + { + return $this->get("UnMatchKey"); + } + + /** + * UnMatchKey: 存放无法解析的日志原文的Key。UnMatchUpload为true时必须填写。 + * + * @param string $unMatchKey + */ + public function setUnMatchKey($unMatchKey) + { + $this->set("UnMatchKey", $unMatchKey); + } + + /** + * Keys: 提取后的字段名。仅适用于delimiter、full_regex、multi_line_full_regex和multi_line_delimiter。 + * + * @return string[]|null + */ + public function getKeys() + { + return $this->get("Keys"); + } + + /** + * Keys: 提取后的字段名。仅适用于delimiter、full_regex、multi_line_full_regex和multi_line_delimiter。 + * + * @param string[] $keys + */ + public function setKeys(array $keys) + { + $this->set("Keys", $keys); + } +} diff --git a/src/UK8S/Params/UpdateUK8SULSConfigParamInputDetail.php b/src/UK8S/Params/UpdateUK8SULSConfigParamInputDetail.php new file mode 100644 index 0000000..6a79813 --- /dev/null +++ b/src/UK8S/Params/UpdateUK8SULSConfigParamInputDetail.php @@ -0,0 +1,116 @@ +get("Type"); + } + + /** + * Type: 日志输入类型。可选值:container_file、container_stdout。 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Stream: 容器标准输出流类型。仅适用于container_stdout,可选值:all、stdout、stderr,默认为all。 + * + * @return string|null + */ + public function getStream() + { + return $this->get("Stream"); + } + + /** + * Stream: 容器标准输出流类型。仅适用于container_stdout,可选值:all、stdout、stderr,默认为all。 + * + * @param string $stream + */ + public function setStream($stream) + { + $this->set("Stream", $stream); + } + + /** + * Metadata: + * + * @return UpdateUK8SULSConfigParamInputDetailMetadata|null + */ + public function getMetadata() + { + return new UpdateUK8SULSConfigParamInputDetailMetadata($this->get("Metadata")); + } + + /** + * Metadata: + * + * @param UpdateUK8SULSConfigParamInputDetailMetadata $metadata + */ + public function setMetadata(array $metadata) + { + $this->set("Metadata", $metadata->getAll()); + } + + /** + * FilePaths: + * + * @return UpdateUK8SULSConfigParamInputDetailFilePaths[]|null + */ + public function getFilePaths() + { + $items = $this->get("FilePaths"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UpdateUK8SULSConfigParamInputDetailFilePaths($item)); + } + return $result; + } + + /** + * FilePaths: + * + * @param UpdateUK8SULSConfigParamInputDetailFilePaths[] $filePaths + */ + public function setFilePaths(array $filePaths) + { + $result = []; + foreach ($filePaths as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Params/UpdateUK8SULSConfigParamInputDetailFilePaths.php b/src/UK8S/Params/UpdateUK8SULSConfigParamInputDetailFilePaths.php new file mode 100644 index 0000000..2ba6b01 --- /dev/null +++ b/src/UK8S/Params/UpdateUK8SULSConfigParamInputDetailFilePaths.php @@ -0,0 +1,64 @@ +get("Path"); + } + + /** + * Path: 日志采集路径。仅适用于container_file。 + * + * @param string $path + */ + public function setPath($path) + { + $this->set("Path", $path); + } + + /** + * File: 要采集的文件名。仅适用于container_file。 + * + * @return string|null + */ + public function getFile() + { + return $this->get("File"); + } + + /** + * File: 要采集的文件名。仅适用于container_file。 + * + * @param string $file + */ + public function setFile($file) + { + $this->set("File", $file); + } +} diff --git a/src/UK8S/Params/UpdateUK8SULSConfigParamInputDetailMetadata.php b/src/UK8S/Params/UpdateUK8SULSConfigParamInputDetailMetadata.php new file mode 100644 index 0000000..b808538 --- /dev/null +++ b/src/UK8S/Params/UpdateUK8SULSConfigParamInputDetailMetadata.php @@ -0,0 +1,64 @@ +get("Container"); + } + + /** + * Container: 要附加到日志中的容器元数据字段,多个字段使用逗号分隔。可选字段:container_name、namespace、pod_name、pod_ip、pod_uid、container_id、image_name。留空表示不采集容器元数据。 + * + * @param string $container + */ + public function setContainer($container) + { + $this->set("Container", $container); + } + + /** + * Labels: 要采集的Pod标签。*表示采集所有标签,app,version表示仅采集指定标签,空字符串表示不采集标签。 + * + * @return string|null + */ + public function getLabels() + { + return $this->get("Labels"); + } + + /** + * Labels: 要采集的Pod标签。*表示采集所有标签,app,version表示仅采集指定标签,空字符串表示不采集标签。 + * + * @param string $labels + */ + public function setLabels($labels) + { + $this->set("Labels", $labels); + } +} diff --git a/src/UK8S/Params/UpdateUK8SULSConfigParamMatchRule.php b/src/UK8S/Params/UpdateUK8SULSConfigParamMatchRule.php new file mode 100644 index 0000000..c9d202c --- /dev/null +++ b/src/UK8S/Params/UpdateUK8SULSConfigParamMatchRule.php @@ -0,0 +1,116 @@ +get("Container"); + } + + /** + * Container: 要匹配的容器名称,*表示所有容器,多个名称使用逗号分隔。 + * + * @param string $container + */ + public function setContainer($container) + { + $this->set("Container", $container); + } + + /** + * ContainerOperator: 容器名称匹配操作符。可选值:in、notin。填写该参数时必须同时填写MatchRule.Container。 + * + * @return string|null + */ + public function getContainerOperator() + { + return $this->get("ContainerOperator"); + } + + /** + * ContainerOperator: 容器名称匹配操作符。可选值:in、notin。填写该参数时必须同时填写MatchRule.Container。 + * + * @param string $containerOperator + */ + public function setContainerOperator($containerOperator) + { + $this->set("ContainerOperator", $containerOperator); + } + + /** + * Workloads: + * + * @return UpdateUK8SULSConfigParamMatchRuleWorkloads[]|null + */ + public function getWorkloads() + { + $items = $this->get("Workloads"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UpdateUK8SULSConfigParamMatchRuleWorkloads($item)); + } + return $result; + } + + /** + * Workloads: + * + * @param UpdateUK8SULSConfigParamMatchRuleWorkloads[] $workloads + */ + public function setWorkloads(array $workloads) + { + $result = []; + foreach ($workloads as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * PodLabels: + * + * @return UpdateUK8SULSConfigParamMatchRulePodLabels|null + */ + public function getPodLabels() + { + return new UpdateUK8SULSConfigParamMatchRulePodLabels($this->get("PodLabels")); + } + + /** + * PodLabels: + * + * @param UpdateUK8SULSConfigParamMatchRulePodLabels $podLabels + */ + public function setPodLabels(array $podLabels) + { + $this->set("PodLabels", $podLabels->getAll()); + } +} diff --git a/src/UK8S/Params/UpdateUK8SULSConfigParamMatchRulePodLabels.php b/src/UK8S/Params/UpdateUK8SULSConfigParamMatchRulePodLabels.php new file mode 100644 index 0000000..de72dbc --- /dev/null +++ b/src/UK8S/Params/UpdateUK8SULSConfigParamMatchRulePodLabels.php @@ -0,0 +1,96 @@ +get("NamespaceOperator"); + } + + /** + * NamespaceOperator: 按Pod标签匹配时,命名空间名称的匹配操作符。可选值:in、notin。填写该参数时必须同时填写MatchRule.PodLabels.Namespace。PodLabels和Workloads不能同时设置。 + * + * @param string $namespaceOperator + */ + public function setNamespaceOperator($namespaceOperator) + { + $this->set("NamespaceOperator", $namespaceOperator); + } + + /** + * Namespace: 按Pod标签匹配时要匹配的命名空间。 + * + * @return string|null + */ + public function getNamespace() + { + return $this->get("Namespace"); + } + + /** + * Namespace: 按Pod标签匹配时要匹配的命名空间。 + * + * @param string $namespace + */ + public function setNamespace($namespace) + { + $this->set("Namespace", $namespace); + } + + /** + * Labels: + * + * @return UpdateUK8SULSConfigParamMatchRulePodLabelsLabels[]|null + */ + public function getLabels() + { + $items = $this->get("Labels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UpdateUK8SULSConfigParamMatchRulePodLabelsLabels($item)); + } + return $result; + } + + /** + * Labels: + * + * @param UpdateUK8SULSConfigParamMatchRulePodLabelsLabels[] $labels + */ + public function setLabels(array $labels) + { + $result = []; + foreach ($labels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Params/UpdateUK8SULSConfigParamMatchRulePodLabelsLabels.php b/src/UK8S/Params/UpdateUK8SULSConfigParamMatchRulePodLabelsLabels.php new file mode 100644 index 0000000..f1cc572 --- /dev/null +++ b/src/UK8S/Params/UpdateUK8SULSConfigParamMatchRulePodLabelsLabels.php @@ -0,0 +1,84 @@ +get("Key"); + } + + /** + * Key: 按Pod标签匹配时,要匹配的标签Key。 + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * ValueOperator: 标签值匹配操作符。可选值:in、notin。 + * + * @return string|null + */ + public function getValueOperator() + { + return $this->get("ValueOperator"); + } + + /** + * ValueOperator: 标签值匹配操作符。可选值:in、notin。 + * + * @param string $valueOperator + */ + public function setValueOperator($valueOperator) + { + $this->set("ValueOperator", $valueOperator); + } + + /** + * Value: 要匹配的标签值。 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 要匹配的标签值。 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UK8S/Params/UpdateUK8SULSConfigParamMatchRuleWorkloads.php b/src/UK8S/Params/UpdateUK8SULSConfigParamMatchRuleWorkloads.php new file mode 100644 index 0000000..70ddad1 --- /dev/null +++ b/src/UK8S/Params/UpdateUK8SULSConfigParamMatchRuleWorkloads.php @@ -0,0 +1,84 @@ +get("Namespace"); + } + + /** + * Namespace: 按工作负载匹配时,工作负载所在的命名空间。Workloads和PodLabels不能同时设置。 + * + * @param string $namespace + */ + public function setNamespace($namespace) + { + $this->set("Namespace", $namespace); + } + + /** + * Type: 工作负载类型。可选值:deployment、statefulset、daemonset、job、cronjob。 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 工作负载类型。可选值:deployment、statefulset、daemonset、job、cronjob。 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Name: 工作负载名称。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 工作负载名称。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } +} diff --git a/src/UK8S/UK8SClient.php b/src/UK8S/UK8SClient.php index 0600483..53394e1 100644 --- a/src/UK8S/UK8SClient.php +++ b/src/UK8S/UK8SClient.php @@ -28,10 +28,14 @@ use UCloud\UK8S\Apis\AddUK8SUHostNodeResponse; use UCloud\UK8S\Apis\CreateUK8SClusterV2Request; use UCloud\UK8S\Apis\CreateUK8SClusterV2Response; +use UCloud\UK8S\Apis\CreateUK8SULSConfigRequest; +use UCloud\UK8S\Apis\CreateUK8SULSConfigResponse; use UCloud\UK8S\Apis\DelUK8SClusterRequest; use UCloud\UK8S\Apis\DelUK8SClusterResponse; use UCloud\UK8S\Apis\DelUK8SClusterNodeV2Request; use UCloud\UK8S\Apis\DelUK8SClusterNodeV2Response; +use UCloud\UK8S\Apis\DeleteUK8SULSConfigRequest; +use UCloud\UK8S\Apis\DeleteUK8SULSConfigResponse; use UCloud\UK8S\Apis\DescribeUK8SClusterRequest; use UCloud\UK8S\Apis\DescribeUK8SClusterResponse; use UCloud\UK8S\Apis\DescribeUK8SImageRequest; @@ -48,8 +52,12 @@ use UCloud\UK8S\Apis\ListUK8SClusterV2Response; use UCloud\UK8S\Apis\ListUK8SNodeGroupRequest; use UCloud\UK8S\Apis\ListUK8SNodeGroupResponse; +use UCloud\UK8S\Apis\ListUK8SULSConfigRequest; +use UCloud\UK8S\Apis\ListUK8SULSConfigResponse; use UCloud\UK8S\Apis\RemoveUK8SNodeGroupRequest; use UCloud\UK8S\Apis\RemoveUK8SNodeGroupResponse; +use UCloud\UK8S\Apis\UpdateUK8SULSConfigRequest; +use UCloud\UK8S\Apis\UpdateUK8SULSConfigResponse; /** * This client is used to call actions of **UK8S** service @@ -193,9 +201,9 @@ public function addUK8SPHostNode(AddUK8SPHostNodeRequest $request = null) * "ClusterId" => (string) UK8S集群ID。 可从UK8S控制台获取。 * "CPU" => (integer) 虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 * "Count" => (integer) 创建Node节点数量,取值范围是[1,50]。 - * "Password" => (string) Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 * "Mem" => (integer) 内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ 默认为月付 + * "Password" => (string) Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 * "BootDiskType" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 * "BootDiskSize" => (integer) 系统盘大小,单位GB。默认40。范围:[40, 500]。注意SSD本地盘无法调整。 * "DataDiskType" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 @@ -226,7 +234,7 @@ public function addUK8SPHostNode(AddUK8SPHostNodeRequest $request = null) * "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 + * "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接口查询,或登录用户中心查看。 * ] * ] @@ -239,7 +247,16 @@ public function addUK8SPHostNode(AddUK8SPHostNodeRequest $request = null) * "Name" => (string) 安全组名称。 * ] * ] - * "UserLabels" => (string) UK8S用户标签,key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * "UHostFamily" => (string) 主机规格族 + * "UserLabels" => (array) [ + * [ + * "Key" => (string) UK8S用户资源标签的键值 + * "Value" => (string) UK8S用户资源标签的值 + * ] + * ] + * "KubeletConfiguration" => (object) [ + * "ContainerLogMaxFiles" => (string) 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup + * ] * ] * * Outputs: @@ -369,6 +386,90 @@ public function createUK8SClusterV2(CreateUK8SClusterV2Request $request = null) return new CreateUK8SClusterV2Response($resp->toArray(), $resp->getRequestId()); } + /** + * CreateUK8SULSConfig - 创建 LogConfig 自定义资源,用于声明式地定义日志采集规则 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/create_uk8s_uls_config + * + * 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) + * "TopicID" => (string) 日志服务中用于接收日志的目标 Topic ID。 + * "ClusterId" => (string) UK8S 集群ID。 + * "Name" => (string) 要创建的日志的采集规则的名称,不能重复。总长度不能超过 253个字符。字符类型:只能包含小写字母(a-z)、数字(0-9)、破折号(-)和点(.)。开头和结尾字符:必须以小写字母或数字开头,并且也必须以小写字母或数字结尾。不允许以 - 或 . 开头或结尾。连续特殊字符:不能连续出现点(.)或破折号(-)。 + * "ExtractRule" => (object) [ + * "LogType" => (string) 日志解析类型,决定了如何结构化日志。可选值: multi_line_delimiter:多行分隔符,delimiter:分隔符,full_regex:完全正则,multi_line_full_regex:多行完全正则,minimal_list:单行全文日志,multi_line:多行全文日志 + * "CollectPolicy" => (string) 采集策略。可选值: full (全量采集存量日志), increment (从当前时间点增量采集)。默认为 full。 + * "Encode" => (string) 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。 + * "Keys" => (array) 当LogType 为分隔符、正则、多行正则时可用 + * "Delimiter" => (string) 当 LogType 为delimiter 时可选,接收 "space"、"tab"、"|"、";"、","。 + * "BeginningRegex" => (string) 行首正则表达式。当 logType 为多行模式 (如 multi_line 或 multi_line_full_regex) 时,用于标识一条新日志的开始。 + * "LogRegex" => (string) 日志提取正则表达式。当 logType 为正则模式 (如 full_regex,multi_line_full_regex) 时,用于从日志中提取字段。 + * "ExtractRule" => (object) [ + * "LogRegexBase64" => (string) Base64 编码的日志提取正则表达式。 + * ] + * "TimeKey" => (string) 当日志为 json 或正则提取时,指定包含日志时间的字段名 (Key)。 + * "TimeFormat" => (string) timeKey 对应的时间格式。 + * "UnMatchUpload" => (string) 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 + * "UnMatchKey" => (string) 没有设置默认值;UnMatchUpload="true" 时强制要求填写 + * "DelimiterBase64" => (string) Base64 编码的分隔符,优先级高于 Delimiter + * "BeginningRegexBase64" => (string) Base64 编码的行首正则,优先级高于 BeginningRegex + * ] + * "InputDetail" => (object) [ + * "Type" => (string) 日志输入类型。支持 container_file 和 container_stdout + * "Metadata" => (object) [ + * "Container" => (string) 指定具体要采集元数据的容器名。如果留空,则不采集容器的元数据,可选字段:container_name,namespace,pod_name,pod_ip,pod_uid,container_id,image_name。Pod Label 元数据通过指定 InputDetail.Metadata.Labels字段。 + * "Labels" => (string) 定义要采集哪些 Pod 的标签 (Labels)。可选值: * (采集所有标签), "app,version" (仅采集 app 和 version), "" (不采集任何标签)。 + * ] + * "FilePaths" => (array) [ + * [ + * "Path" => (string) 定义采集路径 + * "File" => (string) 定义采集路径的文件名 + * ] + * ] + * "Stream" => (string) all、stdout、stderr,默认 all (用于 InputDetail.Type = container_stdout) + * ] + * "MatchRule" => (object) [ + * "ContainerOperator" => (string) 容器名称匹配操作符。支持:in(包含),notin(不包含) + * "Container" => (string) 要匹配的容器名称,*表示所有容器,用逗号分隔 + * "Workloads" => (array) [ + * [ + * "Namespace" => (string) 按工作负载匹配时,工作负载所在的命名空间。 + * "Type" => (string) 按工作负载匹配时,工作负载的类型,例如 deployment, statefulset, daemonset,job, cronjob。 + * "Name" => (string) 按工作负载匹配时,工作负载的名称。 + * ] + * ] + * "PodLabels" => (object) [ + * "NamespaceOperator" => (string) 指定/排除命名空间, 可选值: in/notin + * "Namespace" => (string) 命名空间名称 + * "Labels" => (array) [ + * [ + * "Key" => (string) 按 Pod 标签匹配时,要匹配的标签的 Key。 + * "ValueOperator" => (string) 按 Pod 标签匹配时,标签值的匹配操作符。可选值: in, notin。 + * "Value" => (string) 按 Pod 标签匹配时,要匹配的标签的值。 + * ] + * ] + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return CreateUK8SULSConfigResponse + * @throws UCloudException + */ + public function createUK8SULSConfig(CreateUK8SULSConfigRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUK8SULSConfigResponse($resp->toArray(), $resp->getRequestId()); + } + /** * DelUK8SCluster - 删除UK8S集群 * @@ -426,6 +527,35 @@ public function delUK8SClusterNodeV2(DelUK8SClusterNodeV2Request $request = null return new DelUK8SClusterNodeV2Response($resp->toArray(), $resp->getRequestId()); } + /** + * DeleteUK8SULSConfig - 删除指定UK8S集群的日志采集规则。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/delete_uk8s_uls_config + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。参见地域和可用区列表。 + * "Zone" => (string) 可用区。参见可用区列表。 + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。请参考GetProjectList接口。 + * "ClusterId" => (string) 要操作的 UK8S 集群的 ID。 + * "Name" => (string) 要删除的日志的采集规则的名称。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteUK8SULSConfigResponse + * @throws UCloudException + */ + public function deleteUK8SULSConfig(DeleteUK8SULSConfigRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUK8SULSConfigResponse($resp->toArray(), $resp->getRequestId()); + } + /** * DescribeUK8SCluster - 获取集群信息 * @@ -462,6 +592,11 @@ public function delUK8SClusterNodeV2(DelUK8SClusterNodeV2Request $request = null * "IP" => (string) IP地址 * "Bandwidth" => (integer) IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) * "Default" => (string) 是否默认的弹性网卡的信息。true: 是默认弹性网卡;其他值:不是。 + * "IPMode" => (string) IP 地址分配模式 + * "VPCId" => (string) IP 所属的 VPC Id + * "SubnetId" => (string) IP 所在的 子网 Id + * "Mac" => (string) 网卡的 MAC 地址 + * "NetworkInterfaceId" => (string) 虚拟网卡 Id * ] * ] * "DiskSet" => (array) 节点磁盘信息[ @@ -484,6 +619,19 @@ public function delUK8SClusterNodeV2(DelUK8SClusterNodeV2Request $request = null * "ExpireTime" => (integer) 到期时间 * "State" => (string) 主机状态 * "NodeType" => (string) 节点类型:uhost表示云主机;uphost表示物理云主机 + * "GPU" => (integer) GPU 数量 + * "GpuType" => (string) GPU 型号 + * "BasicImageName" => (string) 基础镜像名称 + * "OsType" => (string) 操作系统类型 + * "TotalDiskSpace" => (integer) 节点总磁盘空间 + * "MachineType" => (string) 主机机型类别 + * "SecGroupId" => (array) 节点关联的安全组列表[ + * [ + * "Id" => (string) 安全组名称 + * "Name" => (string) 安全组id + * "Priority" => (string) 安全组优先级 + * ] + * ] * ] * ] * "NodeList" => (array) Node节点配置信息,具体参考UhostInfo[ @@ -499,6 +647,11 @@ public function delUK8SClusterNodeV2(DelUK8SClusterNodeV2Request $request = null * "IP" => (string) IP地址 * "Bandwidth" => (integer) IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) * "Default" => (string) 是否默认的弹性网卡的信息。true: 是默认弹性网卡;其他值:不是。 + * "IPMode" => (string) IP 地址分配模式 + * "VPCId" => (string) IP 所属的 VPC Id + * "SubnetId" => (string) IP 所在的 子网 Id + * "Mac" => (string) 网卡的 MAC 地址 + * "NetworkInterfaceId" => (string) 虚拟网卡 Id * ] * ] * "DiskSet" => (array) 节点磁盘信息[ @@ -521,6 +674,19 @@ public function delUK8SClusterNodeV2(DelUK8SClusterNodeV2Request $request = null * "ExpireTime" => (integer) 到期时间 * "State" => (string) 主机状态 * "NodeType" => (string) 节点类型:uhost表示云主机;uphost表示物理云主机 + * "GPU" => (integer) GPU 数量 + * "GpuType" => (string) GPU 型号 + * "BasicImageName" => (string) 基础镜像名称 + * "OsType" => (string) 操作系统类型 + * "TotalDiskSpace" => (integer) 节点总磁盘空间 + * "MachineType" => (string) 主机机型类别 + * "SecGroupId" => (array) 节点关联的安全组列表[ + * [ + * "Id" => (string) 安全组名称 + * "Name" => (string) 安全组id + * "Priority" => (string) 安全组优先级 + * ] + * ] * ] * ] * "CreateTime" => (integer) 创建时间 @@ -537,6 +703,34 @@ public function delUK8SClusterNodeV2(DelUK8SClusterNodeV2Request $request = null * "EtcdKey" => (string) 集群etcd服务密钥 * "CACert" => (string) 集群CA根证书 * "MasterResourceStatus" => (string) Master配置预警:Normal正常;Warning 需要升级;Error 需要紧急升级; + * "CNIMode" => (string) CNI模式,可选值VPC/Calico + * "MonitorType" => (string) 集群的监控类型:no无监控;cloudwatch统一监控平台;prometheus内置监控 + * "Autoscaler" => (object) 集群的节点伸缩(CA)配置[ + * "ScaleDownUnneededTime" => (string) 缩容触发延时 + * "ScaleDownUtilizationThreshold" => (string) CPU缩容阈值 + * "ScaleDownDelayAfterAdd" => (string) 静默时间 + * "Enabled" => (integer) 打开/关闭 + * "Version" => (string) 伸缩器版本 + * "UpdateTime" => (integer) + * "ScaleDownGpuUtilizationThreshold" => (string) GPU缩容阈值 + * ] + * "EnableUserAuth" => (boolean) 是否开启了授权管理功能 + * "DedicatedPodSubnet" => (boolean) Pod是否使用独立子网 + * "PodSubnetIds" => (array) Pod使用的独立子网列表 + * "DeleteProtection" => (integer) 删除保护开关。0表示不开启,1表示开启。默认不开启 + * "PodSubnetSecGroups" => (array) Pod独立子网内的ip使用的安全组 + * "NodeCIDR" => (string) 节点网段 + * "ExternalUlb" => (string) 外部 API Server 负载均衡实例 ID + * "InternalUlb" => (string) 内部 API Server 负载均衡实例 ID + * "UpdateTime" => (integer) 更新时间 + * "LbClass" => (string) 负载均衡类型 + * "RuntimeName" => (string) 容器运行时名称 + * "RuntimeVersion" => (string) 容器运行时版本 + * "ClusterType" => (string) 集群版本 + * "LoopbackClientCert" => (object) API Server 回环客户端证书[ + * "ExpireTime" => (integer) 证书到期时间 + * "Warn" => (boolean) 证书是否进入过期告警状态 + * ] * ] * * @return DescribeUK8SClusterResponse @@ -556,9 +750,13 @@ public function describeUK8SCluster(DescribeUK8SClusterRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "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) + * "ProductType" => (string) 产品类型,可选值uhost、uphost,不填则返回所有 + * "MachineType" => (string) 适用机型,如O、G、OPRO等,默认为O + * "GPUType" => (string) 适用GPU类型,如1080Ti、4090、V100、A800等,MachineType为G时必须提供 + * "K8sVersion" => (string) k8s集群版本,如1.28.15 * ] * * Outputs: @@ -570,14 +768,54 @@ public function describeUK8SCluster(DescribeUK8SClusterRequest $request = null) * "ImageId" => (string) 镜像 Id * "ImageName" => (string) 镜像名称 * "NotSupportGPU" => (boolean) 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。 + * "OsType" => (string) OS 类型 + * "OsName" => (string) OS 名称 + * "Features" => (array) 镜像支持的特性 + * "ImageSize" => (integer) 镜像大小 + * "IntegratedSoftware" => (string) 集成软件名称, 如NV驱动版本、cuda版本 + * "SupportedGPUTypes" => (array) 支持的GPU机型 + * ] + * ] + * "PHostImageSet" => (array) 裸金属可用镜像集合, 详见ImageInfo 数组[ + * [ + * "ZoneId" => (integer) 可用区 Id + * "ImageId" => (string) 镜像 Id + * "ImageName" => (string) 镜像名称 + * "NotSupportGPU" => (boolean) 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。 + * "OsType" => (string) OS 类型 + * "OsName" => (string) OS 名称 + * "Features" => (array) 镜像支持的特性 + * "ImageSize" => (integer) 镜像大小 + * "IntegratedSoftware" => (string) 集成软件名称, 如NV驱动版本、cuda版本 + * "SupportedGPUTypes" => (array) 支持的GPU机型 * ] * ] - * "PHostImageSet" => (array) 物理机可用镜像集合, 详见ImageInfo 数组[ + * "CustomImageSet" => (array) 虚拟机自制可用镜像集合, 详见ImageInfo 数组[ * [ * "ZoneId" => (integer) 可用区 Id * "ImageId" => (string) 镜像 Id * "ImageName" => (string) 镜像名称 * "NotSupportGPU" => (boolean) 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。 + * "OsType" => (string) OS 类型 + * "OsName" => (string) OS 名称 + * "Features" => (array) 镜像支持的特性 + * "ImageSize" => (integer) 镜像大小 + * "IntegratedSoftware" => (string) 集成软件名称, 如NV驱动版本、cuda版本 + * "SupportedGPUTypes" => (array) 支持的GPU机型 + * ] + * ] + * "CustomPHostImageSet" => (array) 裸金属自制可用镜像集合, 详见ImageInfo 数组[ + * [ + * "ZoneId" => (integer) 可用区 Id + * "ImageId" => (string) 镜像 Id + * "ImageName" => (string) 镜像名称 + * "NotSupportGPU" => (boolean) 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。 + * "OsType" => (string) OS 类型 + * "OsName" => (string) OS 名称 + * "Features" => (array) 镜像支持的特性 + * "ImageSize" => (integer) 镜像大小 + * "IntegratedSoftware" => (string) 集成软件名称, 如NV驱动版本、cuda版本 + * "SupportedGPUTypes" => (array) 支持的GPU机型 * ] * ] * ] @@ -730,6 +968,7 @@ public function getUK8SVersions(GetUK8SVersionsRequest $request = null) * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "ClusterId" => (string) UK8S集群ID + * "NodeIds" => (string) 可传一个或多个节点id 不传或为空则返回所有节点 * ] * * Outputs: @@ -745,9 +984,11 @@ public function getUK8SVersions(GetUK8SVersionsRequest $request = null) * "InstanceName" => (string) 资源名称,初始值等于NodeId,用户可在UHost或UPHost处修改。 * "InstanceId" => (string) 资源ID,如uhost-xxxx,或uphost-xxxxx。 * "MachineType" => (string) 机型类别,分别对应Uhost的MachineType或PHost的PHostType。 + * "CPUPlatform" => (string) CPU平台 + * "UHostFamily" => (string) 主机规格族 * "OsType" => (string) Node节点的操作系统类别,如Linux或Windows。 * "OsName" => (string) Node节点的镜像名称。 - * "CPU" => (integer) Node节点CPU核数,单位: 个。 + * "CPU" => (integer) Node节点CPU核数,单位: 核。 * "Memory" => (integer) 内存大小,单位: MB。 * "IPSet" => (array) 节点IP信息,详细信息见 UHostIPSet。[ * [ @@ -758,6 +999,8 @@ public function getUK8SVersions(GetUK8SVersionsRequest $request = null) * "VPCId" => (string) IP地址对应的VPC ID * "SubnetId" => (string) IP地址对应的子网 ID * "Mac" => (string) Mac地址 + * "IPMode" => (string) IP 协议类型 + * "NetworkInterfaceId" => (string) 网络接口资源 ID * ] * ] * "CreateTime" => (integer) 节点创建时间 @@ -768,7 +1011,30 @@ public function getUK8SVersions(GetUK8SVersionsRequest $request = null) * "Mode" => (string) KubeProxy模式,枚举值为[ipvs,iptables] * ] * "NodeLogInfo" => (string) 加节点时判断是否没有资源,如果返回NORESOURCE则代表没有资源了 + * "Labels" => (array) 节点标签 + * "KubeletVersion" => (string) Kubelet版本 + * "MaxPod" => (integer) pod最大可用 + * "MaxMemory" => (integer) 内存最大可用 + * "MaxCPU" => (integer) CPU最大可用 + * "RequestPod" => (integer) 已申请的pod + * "RequestMemory" => (integer) 已申请的Memory + * "RequestCPU" => (integer) 已申请的CPU + * "RuntimeVersion" => (string) Runtime 版本 + * "RuntimeName" => (string) Runtime 名字 + * "UsedCPU" => (integer) 已使用的CPU + * "UsedMemory" => (integer) 已使用的Memory + * "BootDiskSize" => (integer) 系统盘大小 + * "DataDiskSize" => (integer) 数据盘大小,如果有多块数据盘会汇总展示,不包括PVC * "GPU" => (integer) 节点的GPU颗数。 + * "NodeGroupId" => (string) 节点池id + * "IDCId" => (string) 边缘机房id + * "IDCName" => (string) 边缘机房 + * "Remark" => (string) 节点主机备注信息 + * "GPUType" => (string) 节点GPU型号(如果为GPU机型) + * "ImageAccelable" => (boolean) 是否启用了容器镜像加速 + * "Tag" => (string) 节点所属业务组 + * "PodCIDR" => (string) Pod CIDR + * "NodeGroupName" => (string) 节点所属节点池名称 * ] * ] * "TotalCount" => (integer) 满足条件的节点数量,包括Master。 @@ -810,9 +1076,18 @@ public function listUK8SClusterNodeV2(ListUK8SClusterNodeV2Request $request = nu * "SubnetId" => (string) 所属子网 * "PodCIDR" => (string) Pod网段 * "ServiceCIDR" => (string) 服务网段 + * "CNIMode" => (string) CNI网络模式 * "MasterCount" => (integer) Master 节点数量 * "ApiServer" => (string) 集群apiserver地址 * "K8sVersion" => (string) 集群版本 + * "DeleteProtection" => (integer) 删除保护开关。0表示不开启,1表示开启。默认不开启 + * "RuntimeName" => (string) 容器运行时名称 + * "RuntimeVersion" => (string) 容器运行时版本号,docker 或 containerd 版本 + * "ClusterType" => (string) 计费/管理形态,区分"专有版"和"托管版"两种售卖形态 + * "LoopbackClientCert" => (object) API Server 内部回环客户端证书[ + * "ExpireTime" => (integer) 证书到期时间 + * "Warn" => (boolean) 证书是否进入过期告警状态 + * ] * "ClusterLogInfo" => (string) 创建集群时判断如果为NORESOURCE则为没资源,否则为空 * "CreateTime" => (integer) 创建时间 * "NodeCount" => (integer) Node节点数量 @@ -820,6 +1095,7 @@ public function listUK8SClusterNodeV2(ListUK8SClusterNodeV2Request $request = nu * "Status" => (string) 集群状态,枚举值:初始化:"INITIALIZING";启动中:"STARTING";创建失败:"CREATEFAILED";正常运行:"RUNNING";添加节点:"ADDNODE";删除节点:"DELNODE";删除中:"DELETING";删除失败:"DELETEFAILED";错误:"ERROR";升级插件:"UPDATE_PLUGIN";更新插件信息:"UPDATE_PLUGIN_INFO";异常:"ABNORMAL";升级集群中:"UPGRADING";容器运行时切换:"CONVERTING" * ] * ] + * "TotalCount" => (integer) 总数 * ] * * @return ListUK8SClusterV2Response @@ -852,9 +1128,11 @@ public function listUK8SClusterV2(ListUK8SClusterV2Request $request = null) * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "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类型 @@ -868,11 +1146,91 @@ public function listUK8SClusterV2(ListUK8SClusterV2Request $request = null) * "NodeList" => (array) 节点id列表 * "SubnetId" => (string) 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 * "IsolationGroupId" => (string) 硬件隔离组id。可通过DescribeIsolationGroup获取。 - * "MaxPods" => (string) int默认110,生产环境建议小于等于110。 + * "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) 安全组名称 + * "Name" => (string) 安全组id + * "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) 磁盘列表[ + * [ + * "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 + * ] + * ] + * "RelatedAsg" => (array) 节点池关联的弹性伸缩组ID + * "CreateTime" => (integer) 节点池创建时间 + * "UpdateTime" => (integer) 节点池更新时间 * ] * ] * ] @@ -886,6 +1244,90 @@ public function listUK8SNodeGroup(ListUK8SNodeGroupRequest $request = null) return new ListUK8SNodeGroupResponse($resp->toArray(), $resp->getRequestId()); } + /** + * ListUK8SULSConfig - 查询 UK8S 的 ULSConfig + * + * See also: https://docs.ucloud.cn/api/uk8s-api/list_uk8s_uls_config + * + * 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) + * "TopicID" => (string) 日志服务中用于接收日志的目标 TopicId。 + * "ClusterId" => (string) 集群 Id,如果不填,返回该账号该地域所有集群的 ULSConfig + * ] + * + * Outputs: + * + * $outputs = [ + * "LogConfig" => (array) 日志服务配置,见 ClusterLogConfig[ + * [ + * "ClusterId" => (string) uk8s集群id + * "MachineGroup" => (string) 机器组 + * "ExtractRule" => (object) 定义日志的提取、解析和格式化规则。见 ULSExtractRule[ + * "CollectPolicy" => (string) 采集策略。可选值: full (全量采集存量日志), increment (从当前时间点增量采集)。默认为 full。 + * "Encode" => (string) 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。 + * "LogType" => (string) 日志解析类型,决定了如何结构化日志。 + * "Delimiter" => (string) 当 LogType 为delimiter_log 时可选,可选字段 ' ',' ','|',';',',' + * "BeginningRegex" => (string) 行首正则表达式。当 logType 为多行模式 (如 multiline_log 或 multiline_fullregex_log) 时,用于标识一条新日志的开始。 + * "LogRegex" => (string) 日志提取正则表达式。当 logType 为正则模式 (如 fullregex_log 或 multiline_fullregex_log) 时,用于从日志中提取字段。 + * "TimeKey" => (string) 指定时间字段。 + * "TimeFormat" => (string) timeKey 对应的时间格式。如: %Y-%m-%d %H:%M:%S + * "UnMatchUpload" => (string) 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 + * "UnMatchKey" => (string) 如果 unMatchUpload 为 true,无法解析的日志原文将被存放在此字段指定的 Key 下。默认为 LogParseFailure。 + * ] + * "InputDetail" => (object) 定义日志的输入来源(例如容器文件)。见 ULSInputDetail[ + * "FilePaths" => (array) 采集路径,数组。[ + * [ + * "Path" => (string) 定义采集路径 + * "File" => (string) 采集文件 + * ] + * ] + * "Type" => (string) 日志输入类型。当前主要支持 container_file,表示采集容器标准输出或文件。 + * "InputMetadata" => (object) 定义哪些容器相关的元数据需要附加到日志中。[ + * "Container" => (string) 指定具体要采集元数据的容器名。如果留空,则不采集容器的元数据,可选字段:container_name,namespace,pod_name,pod_ip,pod_uid,container_id,image_name。Pod Label 元数据通过指定 InputDetail.Metadata.Labels 字段。 + * "Labels" => (string) 定义要采集哪些 Pod 的标签 (Labels)。可选值:*:采集所有标签。app,version:仅采集 app 和 version 这两个标签。""(空字符串):不采集任何标签。 + * ] + * ] + * "MatchRule" => (object) 定义此采集规则要匹配的目标 Pod 或工作负载。见 ULSMatchRule[ + * "ContainerOperator" => (string) 容器名称匹配操作符。支持:in(包含),notin(不包含) + * "Container" => (string) 要匹配的容器名称,*表示所有容器,用逗号分隔 + * "Workloads" => (array) 按工作负载进行匹配。[ + * [ + * "Namespace" => (string) 工作负载所在的命名空间。 + * "Type" => (string) 工作负载的类型,例如 deployment, statefulset, daemonset,cronjob,job。 + * "Name" => (string) 工作负载的名称。 + * ] + * ] + * "PodLabels" => (object) 按 Pod 的标签进行匹配,提供更灵活的选择。[ + * "NamespaceOperator" => (string) 命名空间名称的匹配操作符。可选值: in, notin。 + * "Namespace" => (string) 要匹配的命名空间。namespaceOperator 存在时必需。 + * "Labels" => (array) 一个标签选择器数组,用于定义匹配的标签条件。[ + * [ + * "Key" => (string) 要匹配的标签的 Key。 + * "ValueOperator" => (string) 标签值的匹配操作符。可选值: in, notin。 + * "Value" => (string) 要匹配的标签的值。 + * ] + * ] + * ] + * ] + * "TopicID" => (string) 日志服务中用于接收日志的目标 Topic ID。 + * "Name" => (string) 采集配置规则名称 + * ] + * ] + * ] + * + * @return ListUK8SULSConfigResponse + * @throws UCloudException + */ + public function listUK8SULSConfig(ListUK8SULSConfigRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUK8SULSConfigResponse($resp->toArray(), $resp->getRequestId()); + } + /** * RemoveUK8SNodeGroup - 删除UK8S节点池 * @@ -913,4 +1355,86 @@ public function removeUK8SNodeGroup(RemoveUK8SNodeGroupRequest $request = null) $resp = $this->invoke($request); return new RemoveUK8SNodeGroupResponse($resp->toArray(), $resp->getRequestId()); } + + /** + * UpdateUK8SULSConfig - 更新指定UK8S集群的日志采集规则。 + * + * See also: https://docs.ucloud.cn/api/uk8s-api/update_uk8s_uls_config + * + * 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 + * "Name" => (string) 要修改的日志采集规则名称。名称长度不能超过253个字符,只能包含小写字母、数字、破折号和点,并且必须以字母或数字开头和结尾。 + * "ClusterId" => (string) UK8S集群ID。 + * "TopicID" => (string) 日志服务中用于接收日志的目标Topic ID。不填写时保持原Topic ID不变。 + * "ExtractRule" => (object) [ + * "CollectPolicy" => (string) 采集策略。可选值:full(全量采集存量日志)、increment(从当前时间点增量采集)。默认为full。 + * "Encode" => (string) 日志原文的编码格式。可选值:utf-8、gbk。默认为utf-8。 + * "LogType" => (string) 日志解析类型。可选值:json、delimiter、full_regex、multi_line_full_regex、multi_line_delimiter、minimal_list、multi_line。 + * "BeginningRegex" => (string) 行首正则表达式。multi_line、multi_line_full_regex或multi_line_delimiter模式下,BeginningRegex和BeginningRegexBase64必须至少填写一个。 + * "BeginningRegexBase64" => (string) Base64编码的行首正则表达式。填写时优先于BeginningRegex。 + * "LogRegex" => (string) 日志提取正则表达式。full_regex或multi_line_full_regex模式下,LogRegex和LogRegexBase64必须至少填写一个。 + * "LogRegexBase64" => (string) Base64编码的日志提取正则表达式。填写时优先于LogRegex。 + * "Delimiter" => (string) 分隔符。delimiter或multi_line_delimiter模式下可用。可选值:space、tab、|、;、,。 + * "DelimiterBase64" => (string) Base64编码的分隔符。填写时优先于Delimiter。 + * "TimeKey" => (string) 包含日志时间的字段名。 + * "TimeFormat" => (string) TimeKey对应的时间格式。json、full_regex或multi_line_full_regex模式下,填写TimeKey时必须同时填写TimeFormat。 + * "UnMatchUpload" => (string) 是否上传解析失败的日志。字符串true表示上传,false表示丢弃。默认为false。 + * "UnMatchKey" => (string) 存放无法解析的日志原文的Key。UnMatchUpload为true时必须填写。 + * "Keys" => (array) 提取后的字段名。仅适用于delimiter、full_regex、multi_line_full_regex和multi_line_delimiter。 + * ] + * "InputDetail" => (object) [ + * "Type" => (string) 日志输入类型。可选值:container_file、container_stdout。 + * "Stream" => (string) 容器标准输出流类型。仅适用于container_stdout,可选值:all、stdout、stderr,默认为all。 + * "Metadata" => (object) [ + * "Container" => (string) 要附加到日志中的容器元数据字段,多个字段使用逗号分隔。可选字段:container_name、namespace、pod_name、pod_ip、pod_uid、container_id、image_name。留空表示不采集容器元数据。 + * "Labels" => (string) 要采集的Pod标签。*表示采集所有标签,app,version表示仅采集指定标签,空字符串表示不采集标签。 + * ] + * "FilePaths" => (array) [ + * [ + * "Path" => (string) 日志采集路径。仅适用于container_file。 + * "File" => (string) 要采集的文件名。仅适用于container_file。 + * ] + * ] + * ] + * "MatchRule" => (object) [ + * "Container" => (string) 要匹配的容器名称,*表示所有容器,多个名称使用逗号分隔。 + * "ContainerOperator" => (string) 容器名称匹配操作符。可选值:in、notin。填写该参数时必须同时填写MatchRule.Container。 + * "Workloads" => (array) [ + * [ + * "Namespace" => (string) 按工作负载匹配时,工作负载所在的命名空间。Workloads和PodLabels不能同时设置。 + * "Type" => (string) 工作负载类型。可选值:deployment、statefulset、daemonset、job、cronjob。 + * "Name" => (string) 工作负载名称。 + * ] + * ] + * "PodLabels" => (object) [ + * "NamespaceOperator" => (string) 按Pod标签匹配时,命名空间名称的匹配操作符。可选值:in、notin。填写该参数时必须同时填写MatchRule.PodLabels.Namespace。PodLabels和Workloads不能同时设置。 + * "Namespace" => (string) 按Pod标签匹配时要匹配的命名空间。 + * "Labels" => (array) [ + * [ + * "Key" => (string) 按Pod标签匹配时,要匹配的标签Key。 + * "ValueOperator" => (string) 标签值匹配操作符。可选值:in、notin。 + * "Value" => (string) 要匹配的标签值。 + * ] + * ] + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateUK8SULSConfigResponse + * @throws UCloudException + */ + public function updateUK8SULSConfig(UpdateUK8SULSConfigRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateUK8SULSConfigResponse($resp->toArray(), $resp->getRequestId()); + } }