diff --git a/VERSION b/VERSION index 0b69c00..9e29e10 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.14 +0.3.15 diff --git a/src/UClickhouse/Apis/CreateUClickhouseClusterRequest.php b/src/UClickhouse/Apis/CreateUClickhouseClusterRequest.php new file mode 100644 index 0000000..bc3f6e0 --- /dev/null +++ b/src/UClickhouse/Apis/CreateUClickhouseClusterRequest.php @@ -0,0 +1,529 @@ + "CreateUClickhouseCluster"]); + $this->markRequired("Region"); + $this->markRequired("ClickhouseMachineTypeId"); + $this->markRequired("DataDiskType"); + $this->markRequired("ClickhouseVersion"); + $this->markRequired("VPCId"); + $this->markRequired("SubnetId"); + $this->markRequired("AdminPassword"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClickhouseMachineTypeId: 集群机型,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @return string|null + */ + public function getClickhouseMachineTypeId() + { + return $this->get("ClickhouseMachineTypeId"); + } + + /** + * ClickhouseMachineTypeId: 集群机型,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @param string $clickhouseMachineTypeId + */ + public function setClickhouseMachineTypeId($clickhouseMachineTypeId) + { + $this->set("ClickhouseMachineTypeId", $clickhouseMachineTypeId); + } + + /** + * DataDiskType: 数据盘类型,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @return string|null + */ + public function getDataDiskType() + { + return $this->get("DataDiskType"); + } + + /** + * DataDiskType: 数据盘类型,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @param string $dataDiskType + */ + public function setDataDiskType($dataDiskType) + { + $this->set("DataDiskType", $dataDiskType); + } + + /** + * ClickhouseVersion: Clickhouse版本,可通过GetUClickhouseClusterCreateOption接口获取具体版本 + * + * @return string|null + */ + public function getClickhouseVersion() + { + return $this->get("ClickhouseVersion"); + } + + /** + * ClickhouseVersion: Clickhouse版本,可通过GetUClickhouseClusterCreateOption接口获取具体版本 + * + * @param string $clickhouseVersion + */ + public function setClickhouseVersion($clickhouseVersion) + { + $this->set("ClickhouseVersion", $clickhouseVersion); + } + + /** + * VPCId: VPC ID + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC ID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * AdminPassword: 集群管理员密码,密码规则:1.密码长度限8-32个字符2.不能包含[A-Z],[a-z],[0-9]和[@#%^*+=_;:,?!&()-]之外的字符3.需要同时包含两项或以上(大写字母/小写字母/数字/特殊符号) + * + * @return string|null + */ + public function getAdminPassword() + { + return $this->get("AdminPassword"); + } + + /** + * AdminPassword: 集群管理员密码,密码规则:1.密码长度限8-32个字符2.不能包含[A-Z],[a-z],[0-9]和[@#%^*+=_;:,?!&()-]之外的字符3.需要同时包含两项或以上(大写字母/小写字母/数字/特殊符号) + * + * @param string $adminPassword + */ + public function setAdminPassword($adminPassword) + { + $this->set("AdminPassword", $adminPassword); + } + + /** + * ShardCount: 分片数量,若传递,则至少1个分片,默认值为1 + * + * @return integer|null + */ + public function getShardCount() + { + return $this->get("ShardCount"); + } + + /** + * ShardCount: 分片数量,若传递,则至少1个分片,默认值为1 + * + * @param int $shardCount + */ + public function setShardCount($shardCount) + { + $this->set("ShardCount", $shardCount); + } + + /** + * ReplicateCount: 副本数量,取值为1或2,1为单副本(非高可用),2为双副本(高可用),默认值为高可用(即为2) + * + * @return integer|null + */ + public function getReplicateCount() + { + return $this->get("ReplicateCount"); + } + + /** + * ReplicateCount: 副本数量,取值为1或2,1为单副本(非高可用),2为双副本(高可用),默认值为高可用(即为2) + * + * @param int $replicateCount + */ + public function setReplicateCount($replicateCount) + { + $this->set("ReplicateCount", $replicateCount); + } + + /** + * DataDiskSize: 数据盘大小,最小100,步长为50,默认值为100,单位GB + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 数据盘大小,最小100,步长为50,默认值为100,单位GB + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * ChargeType: 付费类型,枚举值:Year(年付),Month(月付),Dynamic(时付),默认值为Month,月付 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费类型,枚举值:Year(年付),Month(月付),Dynamic(时付),默认值为Month,月付 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长,默认值为1。月付时,此参数传0,代表购买至月末 + * + * @return integer|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,默认值为1。月付时,此参数传0,代表购买至月末 + * + * @param int $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * BackupId: 备份任务ID,从备份恢复时,该字段必传,此值为备份任务ID,可以从原集群备份任务列表(ListUClickhouseBackups)获取 + * + * @return string|null + */ + public function getBackupId() + { + return $this->get("BackupId"); + } + + /** + * BackupId: 备份任务ID,从备份恢复时,该字段必传,此值为备份任务ID,可以从原集群备份任务列表(ListUClickhouseBackups)获取 + * + * @param string $backupId + */ + public function setBackupId($backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * ClusterName: 实例名称名称规则:1.长度为1-50位的字符2.不能包含_,中文,[A-Z],[a-z],[0-9]之外的非法字符,集群名称默认为clickhouse + * + * @return string|null + */ + public function getClusterName() + { + return $this->get("ClusterName"); + } + + /** + * ClusterName: 实例名称名称规则:1.长度为1-50位的字符2.不能包含_,中文,[A-Z],[a-z],[0-9]之外的非法字符,集群名称默认为clickhouse + * + * @param string $clusterName + */ + public function setClusterName($clusterName) + { + $this->set("ClusterName", $clusterName); + } + + /** + * IsZookeeperHA: 是否Zookeeper高可用,true为zookeeper高可用,false为非高可用,默认为true,高可用 + * + * @return boolean|null + */ + public function getIsZookeeperHA() + { + return $this->get("IsZookeeperHA"); + } + + /** + * IsZookeeperHA: 是否Zookeeper高可用,true为zookeeper高可用,false为非高可用,默认为true,高可用 + * + * @param boolean $isZookeeperHA + */ + public function setIsZookeeperHA($isZookeeperHA) + { + $this->set("IsZookeeperHA", $isZookeeperHA); + } + + /** + * IsSecGroup: 是否开启安全组,true为开启,false为不开启,默认为false,不开启安全组 + * + * @return string|null + */ + public function getIsSecGroup() + { + return $this->get("IsSecGroup"); + } + + /** + * IsSecGroup: 是否开启安全组,true为开启,false为不开启,默认为false,不开启安全组 + * + * @param string $isSecGroup + */ + public function setIsSecGroup($isSecGroup) + { + $this->set("IsSecGroup", $isSecGroup); + } + + /** + * IsMultiZone: 是否多可用区,默认为false + * + * @return string|null + */ + public function getIsMultiZone() + { + return $this->get("IsMultiZone"); + } + + /** + * IsMultiZone: 是否多可用区,默认为false + * + * @param string $isMultiZone + */ + public function setIsMultiZone($isMultiZone) + { + $this->set("IsMultiZone", $isMultiZone); + } + + /** + * ZookeeperMachineTypeId: Zookeeper机型ID,IsZookeeperHA为true时,必传,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @return string|null + */ + public function getZookeeperMachineTypeId() + { + return $this->get("ZookeeperMachineTypeId"); + } + + /** + * ZookeeperMachineTypeId: Zookeeper机型ID,IsZookeeperHA为true时,必传,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @param string $zookeeperMachineTypeId + */ + public function setZookeeperMachineTypeId($zookeeperMachineTypeId) + { + $this->set("ZookeeperMachineTypeId", $zookeeperMachineTypeId); + } + + /** + * ZookeeperDataDiskType: Zookeeper数据盘类型,IsZookeeperHA为true时,必传,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @return string|null + */ + public function getZookeeperDataDiskType() + { + return $this->get("ZookeeperDataDiskType"); + } + + /** + * ZookeeperDataDiskType: Zookeeper数据盘类型,IsZookeeperHA为true时,必传,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @param string $zookeeperDataDiskType + */ + public function setZookeeperDataDiskType($zookeeperDataDiskType) + { + $this->set("ZookeeperDataDiskType", $zookeeperDataDiskType); + } + + /** + * ZookeeperDataDiskSize: Zookeeper数据盘大小,IsZookeeperHA为true时,必传,最小100,步长为50 + * + * @return string|null + */ + public function getZookeeperDataDiskSize() + { + return $this->get("ZookeeperDataDiskSize"); + } + + /** + * ZookeeperDataDiskSize: Zookeeper数据盘大小,IsZookeeperHA为true时,必传,最小100,步长为50 + * + * @param string $zookeeperDataDiskSize + */ + public function setZookeeperDataDiskSize($zookeeperDataDiskSize) + { + $this->set("ZookeeperDataDiskSize", $zookeeperDataDiskSize); + } + + /** + * SecGroupIds: 安全组ID,IsSecGroup为true时,必传 + * + * @return string|null + */ + public function getSecGroupIds() + { + return $this->get("SecGroupIds"); + } + + /** + * SecGroupIds: 安全组ID,IsSecGroup为true时,必传 + * + * @param string $secGroupIds + */ + public function setSecGroupIds($secGroupIds) + { + $this->set("SecGroupIds", $secGroupIds); + } + + /** + * MultiZones: 【数组】可用区名称,IsMultiZone为true时,必传,可通过ListUClickhouseAvailableZone获取支持的可用区 + * + * @return string[]|null + */ + public function getMultiZones() + { + return $this->get("MultiZones"); + } + + /** + * MultiZones: 【数组】可用区名称,IsMultiZone为true时,必传,可通过ListUClickhouseAvailableZone获取支持的可用区 + * + * @param string[] $multiZones + */ + public function setMultiZones(array $multiZones) + { + $this->set("MultiZones", $multiZones); + } + + /** + * Labels: + * + * @return CreateUClickhouseClusterParamLabels[]|null + */ + public function getLabels() + { + $items = $this->get("Labels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUClickhouseClusterParamLabels($item)); + } + return $result; + } + + /** + * Labels: + * + * @param CreateUClickhouseClusterParamLabels[] $labels + */ + public function setLabels(array $labels) + { + $result = []; + foreach ($labels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UClickhouse/Apis/CreateUClickhouseClusterResponse.php b/src/UClickhouse/Apis/CreateUClickhouseClusterResponse.php new file mode 100644 index 0000000..df22e52 --- /dev/null +++ b/src/UClickhouse/Apis/CreateUClickhouseClusterResponse.php @@ -0,0 +1,45 @@ +get("Data")); + } + + /** + * Data: 返回数据 + * + * @param CreateUClickhouseClusterResponseData $data + */ + public function setData(array $data) + { + $this->set("Data", $data->getAll()); + } +} diff --git a/src/UClickhouse/Apis/DescribeUClickhouseClusterRequest.php b/src/UClickhouse/Apis/DescribeUClickhouseClusterRequest.php new file mode 100644 index 0000000..58932bb --- /dev/null +++ b/src/UClickhouse/Apis/DescribeUClickhouseClusterRequest.php @@ -0,0 +1,91 @@ + "DescribeUClickhouseCluster"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UClickhouse/Apis/DescribeUClickhouseClusterResponse.php b/src/UClickhouse/Apis/DescribeUClickhouseClusterResponse.php new file mode 100644 index 0000000..eccfe6d --- /dev/null +++ b/src/UClickhouse/Apis/DescribeUClickhouseClusterResponse.php @@ -0,0 +1,49 @@ +get("Data")); + } + + /** + * Data: 返回数据 + * + * @param DescribeUClickhouseClusterResponseData $data + */ + public function setData(array $data) + { + $this->set("Data", $data->getAll()); + } +} diff --git a/src/UClickhouse/Apis/DestroyUClickhouseClusterRequest.php b/src/UClickhouse/Apis/DestroyUClickhouseClusterRequest.php new file mode 100644 index 0000000..c30b54d --- /dev/null +++ b/src/UClickhouse/Apis/DestroyUClickhouseClusterRequest.php @@ -0,0 +1,91 @@ + "DestroyUClickhouseCluster"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UClickhouse/Apis/DestroyUClickhouseClusterResponse.php b/src/UClickhouse/Apis/DestroyUClickhouseClusterResponse.php new file mode 100644 index 0000000..3d13349 --- /dev/null +++ b/src/UClickhouse/Apis/DestroyUClickhouseClusterResponse.php @@ -0,0 +1,26 @@ + "ExpandUClickhouseCluster"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + $this->markRequired("TotalNodeCount"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * TotalNodeCount: 扩容后集群的节点数量,集群为高可用时,需要传入偶数个节点 + * + * @return integer|null + */ + public function getTotalNodeCount() + { + return $this->get("TotalNodeCount"); + } + + /** + * TotalNodeCount: 扩容后集群的节点数量,集群为高可用时,需要传入偶数个节点 + * + * @param int $totalNodeCount + */ + public function setTotalNodeCount($totalNodeCount) + { + $this->set("TotalNodeCount", $totalNodeCount); + } + + /** + * SyncNodeId: 水平扩容时,选择某一个原节点的ID,用于同步表结构/用户信息。不传递时,表示不同步表结构/用户信息,仅水平扩容节点数量 + * + * @return string|null + */ + public function getSyncNodeId() + { + return $this->get("SyncNodeId"); + } + + /** + * SyncNodeId: 水平扩容时,选择某一个原节点的ID,用于同步表结构/用户信息。不传递时,表示不同步表结构/用户信息,仅水平扩容节点数量 + * + * @param string $syncNodeId + */ + public function setSyncNodeId($syncNodeId) + { + $this->set("SyncNodeId", $syncNodeId); + } +} diff --git a/src/UClickhouse/Apis/ExpandUClickhouseClusterResponse.php b/src/UClickhouse/Apis/ExpandUClickhouseClusterResponse.php new file mode 100644 index 0000000..a1fb293 --- /dev/null +++ b/src/UClickhouse/Apis/ExpandUClickhouseClusterResponse.php @@ -0,0 +1,26 @@ + "GetUClickhouseClusterCreateOption"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UClickhouse/Apis/GetUClickhouseClusterCreateOptionResponse.php b/src/UClickhouse/Apis/GetUClickhouseClusterCreateOptionResponse.php new file mode 100644 index 0000000..77930e4 --- /dev/null +++ b/src/UClickhouse/Apis/GetUClickhouseClusterCreateOptionResponse.php @@ -0,0 +1,52 @@ +get("Data")); + } + + /** + * Data: 数据 + * + * @param GetCreateUClickhouseClusterOptionResponseData $data + */ + public function setData(array $data) + { + $this->set("Data", $data->getAll()); + } +} diff --git a/src/UClickhouse/Apis/ListUClickhouseClusterRequest.php b/src/UClickhouse/Apis/ListUClickhouseClusterRequest.php new file mode 100644 index 0000000..36b5b22 --- /dev/null +++ b/src/UClickhouse/Apis/ListUClickhouseClusterRequest.php @@ -0,0 +1,70 @@ + "ListUClickhouseCluster"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UClickhouse/Apis/ListUClickhouseClusterResponse.php b/src/UClickhouse/Apis/ListUClickhouseClusterResponse.php new file mode 100644 index 0000000..db85f88 --- /dev/null +++ b/src/UClickhouse/Apis/ListUClickhouseClusterResponse.php @@ -0,0 +1,46 @@ +get("Data")); + } + + /** + * Data: 返回数据 + * + * @param ListUClickhouseClusterResponseData $data + */ + public function setData(array $data) + { + $this->set("Data", $data->getAll()); + } +} diff --git a/src/UClickhouse/Apis/ResizeUClickhouseClusterRequest.php b/src/UClickhouse/Apis/ResizeUClickhouseClusterRequest.php new file mode 100644 index 0000000..5e22fa9 --- /dev/null +++ b/src/UClickhouse/Apis/ResizeUClickhouseClusterRequest.php @@ -0,0 +1,151 @@ + "ResizeUClickhouseCluster"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * TargetMachineTypeId: 目标机型ID,可通过GetUClickhouseClusterCreateOption接口获取具体值,与TargetDataDiskSize不能同时为空 + * + * @return string|null + */ + public function getTargetMachineTypeId() + { + return $this->get("TargetMachineTypeId"); + } + + /** + * TargetMachineTypeId: 目标机型ID,可通过GetUClickhouseClusterCreateOption接口获取具体值,与TargetDataDiskSize不能同时为空 + * + * @param string $targetMachineTypeId + */ + public function setTargetMachineTypeId($targetMachineTypeId) + { + $this->set("TargetMachineTypeId", $targetMachineTypeId); + } + + /** + * TargetDataDiskSize: 目标磁盘大小,单位GB,只能扩容,与TargetMachineTypeId不能同时为空 + * + * @return integer|null + */ + public function getTargetDataDiskSize() + { + return $this->get("TargetDataDiskSize"); + } + + /** + * TargetDataDiskSize: 目标磁盘大小,单位GB,只能扩容,与TargetMachineTypeId不能同时为空 + * + * @param int $targetDataDiskSize + */ + public function setTargetDataDiskSize($targetDataDiskSize) + { + $this->set("TargetDataDiskSize", $targetDataDiskSize); + } + + /** + * IsZooKeeperNode: 是否为zookeeper节点,为true时表示升级zookeeper节点规格,为false时表示升级clickhouse节点规格,默认为false + * + * @return boolean|null + */ + public function getIsZooKeeperNode() + { + return $this->get("IsZooKeeperNode"); + } + + /** + * IsZooKeeperNode: 是否为zookeeper节点,为true时表示升级zookeeper节点规格,为false时表示升级clickhouse节点规格,默认为false + * + * @param boolean $isZooKeeperNode + */ + public function setIsZooKeeperNode($isZooKeeperNode) + { + $this->set("IsZooKeeperNode", $isZooKeeperNode); + } +} diff --git a/src/UClickhouse/Apis/ResizeUClickhouseClusterResponse.php b/src/UClickhouse/Apis/ResizeUClickhouseClusterResponse.php new file mode 100644 index 0000000..d821f44 --- /dev/null +++ b/src/UClickhouse/Apis/ResizeUClickhouseClusterResponse.php @@ -0,0 +1,26 @@ + "RestartUClickhouseClusterService"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UClickhouse/Apis/RestartUClickhouseClusterServiceResponse.php b/src/UClickhouse/Apis/RestartUClickhouseClusterServiceResponse.php new file mode 100644 index 0000000..8136ebc --- /dev/null +++ b/src/UClickhouse/Apis/RestartUClickhouseClusterServiceResponse.php @@ -0,0 +1,26 @@ +get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * TopOrganizationId: 公司ID + * + * @return integer|null + */ + public function getTopOrganizationId() + { + return $this->get("TopOrganizationId"); + } + + /** + * TopOrganizationId: 公司ID + * + * @param int $topOrganizationId + */ + public function setTopOrganizationId($topOrganizationId) + { + $this->set("TopOrganizationId", $topOrganizationId); + } + + /** + * OrganizationId: 项目ID + * + * @return integer|null + */ + public function getOrganizationId() + { + return $this->get("OrganizationId"); + } + + /** + * OrganizationId: 项目ID + * + * @param int $organizationId + */ + public function setOrganizationId($organizationId) + { + $this->set("OrganizationId", $organizationId); + } + + /** + * ClusterName: 集群名称 + * + * @return string|null + */ + public function getClusterName() + { + return $this->get("ClusterName"); + } + + /** + * ClusterName: 集群名称 + * + * @param string $clusterName + */ + public function setClusterName($clusterName) + { + $this->set("ClusterName", $clusterName); + } + + /** + * VPCId: VPCID + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * ClickhouseVersion: 集群版本 + * + * @return string|null + */ + public function getClickhouseVersion() + { + return $this->get("ClickhouseVersion"); + } + + /** + * ClickhouseVersion: 集群版本 + * + * @param string $clickhouseVersion + */ + public function setClickhouseVersion($clickhouseVersion) + { + $this->set("ClickhouseVersion", $clickhouseVersion); + } + + /** + * ZookeeperVersion: Zookeeper版本 + * + * @return string|null + */ + public function getZookeeperVersion() + { + return $this->get("ZookeeperVersion"); + } + + /** + * ZookeeperVersion: Zookeeper版本 + * + * @param string $zookeeperVersion + */ + public function setZookeeperVersion($zookeeperVersion) + { + $this->set("ZookeeperVersion", $zookeeperVersion); + } + + /** + * MachineType: 机型 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机型 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * Status: 集群状态:CREATING(创建中)、RUNNING(运行中)、RESIZING(变配中)、RESTARTING(重启中)、UPGRADING(升级中)、DESTROYING(销毁中)、DESTROYED(已删除)、CREATE_FAILED(创建失败)、RESTART_FAILED(重启失败)、DESTROY_FAILED(删除失败)、RESIZE_FAILED(变配失败)、BACKUP_RESTORING(备份恢复中)、BACKUP_RESTORE_FAILED(备份恢复失败)、EXPANDING(扩容中)、EXPAND_FAILED(扩容失败) + * + * @return string|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 集群状态:CREATING(创建中)、RUNNING(运行中)、RESIZING(变配中)、RESTARTING(重启中)、UPGRADING(升级中)、DESTROYING(销毁中)、DESTROYED(已删除)、CREATE_FAILED(创建失败)、RESTART_FAILED(重启失败)、DESTROY_FAILED(删除失败)、RESIZE_FAILED(变配失败)、BACKUP_RESTORING(备份恢复中)、BACKUP_RESTORE_FAILED(备份恢复失败)、EXPANDING(扩容中)、EXPAND_FAILED(扩容失败) + * + * @param string $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * ShardCount: 分片数 + * + * @return integer|null + */ + public function getShardCount() + { + return $this->get("ShardCount"); + } + + /** + * ShardCount: 分片数 + * + * @param int $shardCount + */ + public function setShardCount($shardCount) + { + $this->set("ShardCount", $shardCount); + } + + /** + * ReplicateCount: 副本数 + * + * @return integer|null + */ + public function getReplicateCount() + { + return $this->get("ReplicateCount"); + } + + /** + * ReplicateCount: 副本数 + * + * @param int $replicateCount + */ + public function setReplicateCount($replicateCount) + { + $this->set("ReplicateCount", $replicateCount); + } + + /** + * CreateTimestamp: 集群创建时间 + * + * @return integer|null + */ + public function getCreateTimestamp() + { + return $this->get("CreateTimestamp"); + } + + /** + * CreateTimestamp: 集群创建时间 + * + * @param int $createTimestamp + */ + public function setCreateTimestamp($createTimestamp) + { + $this->set("CreateTimestamp", $createTimestamp); + } + + /** + * ClickhouseMachineTypeId: Clickhouse机型ID + * + * @return string|null + */ + public function getClickhouseMachineTypeId() + { + return $this->get("ClickhouseMachineTypeId"); + } + + /** + * ClickhouseMachineTypeId: Clickhouse机型ID + * + * @param string $clickhouseMachineTypeId + */ + public function setClickhouseMachineTypeId($clickhouseMachineTypeId) + { + $this->set("ClickhouseMachineTypeId", $clickhouseMachineTypeId); + } + + /** + * ClickhouseMachineTypeName: Clickhouse机型名称 + * + * @return string|null + */ + public function getClickhouseMachineTypeName() + { + return $this->get("ClickhouseMachineTypeName"); + } + + /** + * ClickhouseMachineTypeName: Clickhouse机型名称 + * + * @param string $clickhouseMachineTypeName + */ + public function setClickhouseMachineTypeName($clickhouseMachineTypeName) + { + $this->set("ClickhouseMachineTypeName", $clickhouseMachineTypeName); + } + + /** + * RegionId: 地域ID + * + * @return integer|null + */ + public function getRegionId() + { + return $this->get("RegionId"); + } + + /** + * RegionId: 地域ID + * + * @param int $regionId + */ + public function setRegionId($regionId) + { + $this->set("RegionId", $regionId); + } + + /** + * ZookeeperMachineTypeId: Zookeeper机型ID + * + * @return string|null + */ + public function getZookeeperMachineTypeId() + { + return $this->get("ZookeeperMachineTypeId"); + } + + /** + * ZookeeperMachineTypeId: Zookeeper机型ID + * + * @param string $zookeeperMachineTypeId + */ + public function setZookeeperMachineTypeId($zookeeperMachineTypeId) + { + $this->set("ZookeeperMachineTypeId", $zookeeperMachineTypeId); + } + + /** + * ZookeeperMachineTypeName: Zookeeper机型名称 + * + * @return string|null + */ + public function getZookeeperMachineTypeName() + { + return $this->get("ZookeeperMachineTypeName"); + } + + /** + * ZookeeperMachineTypeName: Zookeeper机型名称 + * + * @param string $zookeeperMachineTypeName + */ + public function setZookeeperMachineTypeName($zookeeperMachineTypeName) + { + $this->set("ZookeeperMachineTypeName", $zookeeperMachineTypeName); + } + + /** + * ClickhouseDataDiskType: Clickhouse数据盘类型 + * + * @return string|null + */ + public function getClickhouseDataDiskType() + { + return $this->get("ClickhouseDataDiskType"); + } + + /** + * ClickhouseDataDiskType: Clickhouse数据盘类型 + * + * @param string $clickhouseDataDiskType + */ + public function setClickhouseDataDiskType($clickhouseDataDiskType) + { + $this->set("ClickhouseDataDiskType", $clickhouseDataDiskType); + } + + /** + * ClickhouseDataDiskSize: Clickhouse数据盘大小 + * + * @return integer|null + */ + public function getClickhouseDataDiskSize() + { + return $this->get("ClickhouseDataDiskSize"); + } + + /** + * ClickhouseDataDiskSize: Clickhouse数据盘大小 + * + * @param int $clickhouseDataDiskSize + */ + public function setClickhouseDataDiskSize($clickhouseDataDiskSize) + { + $this->set("ClickhouseDataDiskSize", $clickhouseDataDiskSize); + } + + /** + * ZookeeperDataDiskType: Zookeeper数据盘类型 + * + * @return string|null + */ + public function getZookeeperDataDiskType() + { + return $this->get("ZookeeperDataDiskType"); + } + + /** + * ZookeeperDataDiskType: Zookeeper数据盘类型 + * + * @param string $zookeeperDataDiskType + */ + public function setZookeeperDataDiskType($zookeeperDataDiskType) + { + $this->set("ZookeeperDataDiskType", $zookeeperDataDiskType); + } + + /** + * ZookeeperDataDiskSize: Zookeeper数据盘大小 + * + * @return integer|null + */ + public function getZookeeperDataDiskSize() + { + return $this->get("ZookeeperDataDiskSize"); + } + + /** + * ZookeeperDataDiskSize: Zookeeper数据盘大小 + * + * @param int $zookeeperDataDiskSize + */ + public function setZookeeperDataDiskSize($zookeeperDataDiskSize) + { + $this->set("ZookeeperDataDiskSize", $zookeeperDataDiskSize); + } + + /** + * ClickhouseNodeCPU: Clickhouse节点CPU + * + * @return integer|null + */ + public function getClickhouseNodeCPU() + { + return $this->get("ClickhouseNodeCPU"); + } + + /** + * ClickhouseNodeCPU: Clickhouse节点CPU + * + * @param int $clickhouseNodeCPU + */ + public function setClickhouseNodeCPU($clickhouseNodeCPU) + { + $this->set("ClickhouseNodeCPU", $clickhouseNodeCPU); + } + + /** + * ClickhouseNodeMemory: Clickhouse内存 + * + * @return integer|null + */ + public function getClickhouseNodeMemory() + { + return $this->get("ClickhouseNodeMemory"); + } + + /** + * ClickhouseNodeMemory: Clickhouse内存 + * + * @param int $clickhouseNodeMemory + */ + public function setClickhouseNodeMemory($clickhouseNodeMemory) + { + $this->set("ClickhouseNodeMemory", $clickhouseNodeMemory); + } + + /** + * ZookeeperNodeCPU: Zookeeper节点CPU + * + * @return integer|null + */ + public function getZookeeperNodeCPU() + { + return $this->get("ZookeeperNodeCPU"); + } + + /** + * ZookeeperNodeCPU: Zookeeper节点CPU + * + * @param int $zookeeperNodeCPU + */ + public function setZookeeperNodeCPU($zookeeperNodeCPU) + { + $this->set("ZookeeperNodeCPU", $zookeeperNodeCPU); + } + + /** + * ZookeeperNodeMemory: Zookeeper节点内存 + * + * @return integer|null + */ + public function getZookeeperNodeMemory() + { + return $this->get("ZookeeperNodeMemory"); + } + + /** + * ZookeeperNodeMemory: Zookeeper节点内存 + * + * @param int $zookeeperNodeMemory + */ + public function setZookeeperNodeMemory($zookeeperNodeMemory) + { + $this->set("ZookeeperNodeMemory", $zookeeperNodeMemory); + } + + /** + * IsZookeeperHA: Zookeeper是否高可用 + * + * @return string|null + */ + public function getIsZookeeperHA() + { + return $this->get("IsZookeeperHA"); + } + + /** + * IsZookeeperHA: Zookeeper是否高可用 + * + * @param string $isZookeeperHA + */ + public function setIsZookeeperHA($isZookeeperHA) + { + $this->set("IsZookeeperHA", $isZookeeperHA); + } + + /** + * IsSecgroup: 实例是否开启安全组 + * + * @return string|null + */ + public function getIsSecgroup() + { + return $this->get("IsSecgroup"); + } + + /** + * IsSecgroup: 实例是否开启安全组 + * + * @param string $isSecgroup + */ + public function setIsSecgroup($isSecgroup) + { + $this->set("IsSecgroup", $isSecgroup); + } + + /** + * IsBackup: 实例是否开启备份 + * + * @return string|null + */ + public function getIsBackup() + { + return $this->get("IsBackup"); + } + + /** + * IsBackup: 实例是否开启备份 + * + * @param string $isBackup + */ + public function setIsBackup($isBackup) + { + $this->set("IsBackup", $isBackup); + } + + /** + * IsTieredStorage: 实例是否开启冷热分层 + * + * @return string|null + */ + public function getIsTieredStorage() + { + return $this->get("IsTieredStorage"); + } + + /** + * IsTieredStorage: 实例是否开启冷热分层 + * + * @param string $isTieredStorage + */ + public function setIsTieredStorage($isTieredStorage) + { + $this->set("IsTieredStorage", $isTieredStorage); + } + + /** + * MultiZones: 实例所在可用区 + * + * @return string[]|null + */ + public function getMultiZones() + { + return $this->get("MultiZones"); + } + + /** + * MultiZones: 实例所在可用区 + * + * @param string[] $multiZones + */ + public function setMultiZones(array $multiZones) + { + $this->set("MultiZones", $multiZones); + } + + /** + * ExpireTimestamp: 实例过期时间 + * + * @return float|null + */ + public function getExpireTimestamp() + { + return $this->get("ExpireTimestamp"); + } + + /** + * ExpireTimestamp: 实例过期时间 + * + * @param float $expireTimestamp + */ + public function setExpireTimestamp($expireTimestamp) + { + $this->set("ExpireTimestamp", $expireTimestamp); + } +} diff --git a/src/UClickhouse/Models/ClickhouseDataDisk.php b/src/UClickhouse/Models/ClickhouseDataDisk.php new file mode 100644 index 0000000..336406f --- /dev/null +++ b/src/UClickhouse/Models/ClickhouseDataDisk.php @@ -0,0 +1,124 @@ +get("DiskType"); + } + + /** + * DiskType: 磁盘类型 + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * MinDiskSize: 最小值,GB + * + * @return integer|null + */ + public function getMinDiskSize() + { + return $this->get("MinDiskSize"); + } + + /** + * MinDiskSize: 最小值,GB + * + * @param int $minDiskSize + */ + public function setMinDiskSize($minDiskSize) + { + $this->set("MinDiskSize", $minDiskSize); + } + + /** + * MaxDiskSize: 最大值,GB + * + * @return integer|null + */ + public function getMaxDiskSize() + { + return $this->get("MaxDiskSize"); + } + + /** + * MaxDiskSize: 最大值,GB + * + * @param int $maxDiskSize + */ + public function setMaxDiskSize($maxDiskSize) + { + $this->set("MaxDiskSize", $maxDiskSize); + } + + /** + * DefaultDataDiskSize: 默认大小,GB + * + * @return integer|null + */ + public function getDefaultDataDiskSize() + { + return $this->get("DefaultDataDiskSize"); + } + + /** + * DefaultDataDiskSize: 默认大小,GB + * + * @param int $defaultDataDiskSize + */ + public function setDefaultDataDiskSize($defaultDataDiskSize) + { + $this->set("DefaultDataDiskSize", $defaultDataDiskSize); + } + + /** + * Step: 步长,GB + * + * @return integer|null + */ + public function getStep() + { + return $this->get("Step"); + } + + /** + * Step: 步长,GB + * + * @param int $step + */ + public function setStep($step) + { + $this->set("Step", $step); + } +} diff --git a/src/UClickhouse/Models/ClickhouseMachineType.php b/src/UClickhouse/Models/ClickhouseMachineType.php new file mode 100644 index 0000000..ef817f0 --- /dev/null +++ b/src/UClickhouse/Models/ClickhouseMachineType.php @@ -0,0 +1,96 @@ +get("ClickhouseMachineTypeName"); + } + + /** + * ClickhouseMachineTypeName: CK机型名称 + * + * @param string $clickhouseMachineTypeName + */ + public function setClickhouseMachineTypeName($clickhouseMachineTypeName) + { + $this->set("ClickhouseMachineTypeName", $clickhouseMachineTypeName); + } + + /** + * ClickhouseMachineTypeOptions: CK机型可选项 + * + * @return ClickhouseMachineTypeOption[]|null + */ + public function getClickhouseMachineTypeOptions() + { + $items = $this->get("ClickhouseMachineTypeOptions"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClickhouseMachineTypeOption($item)); + } + return $result; + } + + /** + * ClickhouseMachineTypeOptions: CK机型可选项 + * + * @param ClickhouseMachineTypeOption[] $clickhouseMachineTypeOptions + */ + public function setClickhouseMachineTypeOptions(array $clickhouseMachineTypeOptions) + { + $result = []; + foreach ($clickhouseMachineTypeOptions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * IsSecgroupMachineType: 机型是否支持安全组 + * + * @return string|null + */ + public function getIsSecgroupMachineType() + { + return $this->get("IsSecgroupMachineType"); + } + + /** + * IsSecgroupMachineType: 机型是否支持安全组 + * + * @param string $isSecgroupMachineType + */ + public function setIsSecgroupMachineType($isSecgroupMachineType) + { + $this->set("IsSecgroupMachineType", $isSecgroupMachineType); + } +} diff --git a/src/UClickhouse/Models/ClickhouseMachineTypeOption.php b/src/UClickhouse/Models/ClickhouseMachineTypeOption.php new file mode 100644 index 0000000..a976902 --- /dev/null +++ b/src/UClickhouse/Models/ClickhouseMachineTypeOption.php @@ -0,0 +1,156 @@ +get("ClickhouseMachineTypeId"); + } + + /** + * ClickhouseMachineTypeId: Clickhouse机型ID + * + * @param string $clickhouseMachineTypeId + */ + public function setClickhouseMachineTypeId($clickhouseMachineTypeId) + { + $this->set("ClickhouseMachineTypeId", $clickhouseMachineTypeId); + } + + /** + * MachineType: 机型 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机型 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * CPU: CPU大小 + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: CPU大小 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存大小,GB + * + * @return integer|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小,GB + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * DataDisks: 数据盘列表 + * + * @return ClickhouseDataDisk[]|null + */ + public function getDataDisks() + { + $items = $this->get("DataDisks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClickhouseDataDisk($item)); + } + return $result; + } + + /** + * DataDisks: 数据盘列表 + * + * @param ClickhouseDataDisk[] $dataDisks + */ + public function setDataDisks(array $dataDisks) + { + $result = []; + foreach ($dataDisks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NodeCounts: 允许创建的节点个数 + * + * @return int[]|null + */ + public function getNodeCounts() + { + return $this->get("NodeCounts"); + } + + /** + * NodeCounts: 允许创建的节点个数 + * + * @param int[] $nodeCounts + */ + public function setNodeCounts(array $nodeCounts) + { + $this->set("NodeCounts", $nodeCounts); + } +} diff --git a/src/UClickhouse/Models/ClickhouseNode.php b/src/UClickhouse/Models/ClickhouseNode.php new file mode 100644 index 0000000..624dc50 --- /dev/null +++ b/src/UClickhouse/Models/ClickhouseNode.php @@ -0,0 +1,344 @@ +get("Zone"); + } + + /** + * Zone: 可用区名称 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * NodeId: 节点ID + * + * @return string|null + */ + public function getNodeId() + { + return $this->get("NodeId"); + } + + /** + * NodeId: 节点ID + * + * @param string $nodeId + */ + public function setNodeId($nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * NodeName: 节点名称 + * + * @return string|null + */ + public function getNodeName() + { + return $this->get("NodeName"); + } + + /** + * NodeName: 节点名称 + * + * @param string $nodeName + */ + public function setNodeName($nodeName) + { + $this->set("NodeName", $nodeName); + } + + /** + * CPU: CPU大小 + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: CPU大小 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存,GB + * + * @return integer|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 内存,GB + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * SysDiskSize: 系统盘大小,GB + * + * @return integer|null + */ + public function getSysDiskSize() + { + return $this->get("SysDiskSize"); + } + + /** + * SysDiskSize: 系统盘大小,GB + * + * @param int $sysDiskSize + */ + public function setSysDiskSize($sysDiskSize) + { + $this->set("SysDiskSize", $sysDiskSize); + } + + /** + * SysDiskType: 系统盘类型 + * + * @return string|null + */ + public function getSysDiskType() + { + return $this->get("SysDiskType"); + } + + /** + * SysDiskType: 系统盘类型 + * + * @param string $sysDiskType + */ + public function setSysDiskType($sysDiskType) + { + $this->set("SysDiskType", $sysDiskType); + } + + /** + * DataDiskSize: 数据盘大小,GB + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 数据盘大小,GB + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * DataDiskType: 数据盘类型 + * + * @return string|null + */ + public function getDataDiskType() + { + return $this->get("DataDiskType"); + } + + /** + * DataDiskType: 数据盘类型 + * + * @param string $dataDiskType + */ + public function setDataDiskType($dataDiskType) + { + $this->set("DataDiskType", $dataDiskType); + } + + /** + * IPv4: ipv4 + * + * @return string|null + */ + public function getIPv4() + { + return $this->get("IPv4"); + } + + /** + * IPv4: ipv4 + * + * @param string $iPv4 + */ + public function setIPv4($iPv4) + { + $this->set("IPv4", $iPv4); + } + + /** + * CreateTimestamp: 创建时间 + * + * @return integer|null + */ + public function getCreateTimestamp() + { + return $this->get("CreateTimestamp"); + } + + /** + * CreateTimestamp: 创建时间 + * + * @param int $createTimestamp + */ + public function setCreateTimestamp($createTimestamp) + { + $this->set("CreateTimestamp", $createTimestamp); + } + + /** + * MachineType: 机型 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机型 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * ShardGroup: 分片组 + * + * @return string|null + */ + public function getShardGroup() + { + return $this->get("ShardGroup"); + } + + /** + * ShardGroup: 分片组 + * + * @param string $shardGroup + */ + public function setShardGroup($shardGroup) + { + $this->set("ShardGroup", $shardGroup); + } + + /** + * ServiceStatus: 服务状态:RUNNING(运行中)、STARTING(启动中)、STOPPED(已停止)、RESTARTING(重启中) + * + * @return string|null + */ + public function getServiceStatus() + { + return $this->get("ServiceStatus"); + } + + /** + * ServiceStatus: 服务状态:RUNNING(运行中)、STARTING(启动中)、STOPPED(已停止)、RESTARTING(重启中) + * + * @param string $serviceStatus + */ + public function setServiceStatus($serviceStatus) + { + $this->set("ServiceStatus", $serviceStatus); + } + + /** + * ResourceId: 资源ID + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UClickhouse/Models/ClickhouseVersion.php b/src/UClickhouse/Models/ClickhouseVersion.php new file mode 100644 index 0000000..a812007 --- /dev/null +++ b/src/UClickhouse/Models/ClickhouseVersion.php @@ -0,0 +1,64 @@ +get("Version"); + } + + /** + * Version: 版本号 + * + * @param string $version + */ + public function setVersion($version) + { + $this->set("Version", $version); + } + + /** + * VersionName: 版本名称 + * + * @return string|null + */ + public function getVersionName() + { + return $this->get("VersionName"); + } + + /** + * VersionName: 版本名称 + * + * @param string $versionName + */ + public function setVersionName($versionName) + { + $this->set("VersionName", $versionName); + } +} diff --git a/src/UClickhouse/Models/CreateUClickhouseClusterResponseData.php b/src/UClickhouse/Models/CreateUClickhouseClusterResponseData.php new file mode 100644 index 0000000..51bcf60 --- /dev/null +++ b/src/UClickhouse/Models/CreateUClickhouseClusterResponseData.php @@ -0,0 +1,44 @@ +get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UClickhouse/Models/DescribeUClickhouseClusterResponseData.php b/src/UClickhouse/Models/DescribeUClickhouseClusterResponseData.php new file mode 100644 index 0000000..189b642 --- /dev/null +++ b/src/UClickhouse/Models/DescribeUClickhouseClusterResponseData.php @@ -0,0 +1,128 @@ +get("ZookeeperNodes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ZookeeperNode($item)); + } + return $result; + } + + /** + * ZookeeperNodes: Zookeeper节点列表,为空时,说明该集群没有zookeeper集群 + * + * @param ZookeeperNode[] $zookeeperNodes + */ + public function setZookeeperNodes(array $zookeeperNodes) + { + $result = []; + foreach ($zookeeperNodes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ClickhouseNodes: Clickhouse节点列表 + * + * @return ClickhouseNode[]|null + */ + public function getClickhouseNodes() + { + $items = $this->get("ClickhouseNodes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClickhouseNode($item)); + } + return $result; + } + + /** + * ClickhouseNodes: Clickhouse节点列表 + * + * @param ClickhouseNode[] $clickhouseNodes + */ + public function setClickhouseNodes(array $clickhouseNodes) + { + $result = []; + foreach ($clickhouseNodes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Payment: 支付信息 + * + * @return Payment|null + */ + public function getPayment() + { + return new Payment($this->get("Payment")); + } + + /** + * Payment: 支付信息 + * + * @param Payment $payment + */ + public function setPayment(array $payment) + { + $this->set("Payment", $payment->getAll()); + } + + /** + * Cluster: 集群信息 + * + * @return ClickhouseCluster|null + */ + public function getCluster() + { + return new ClickhouseCluster($this->get("Cluster")); + } + + /** + * Cluster: 集群信息 + * + * @param ClickhouseCluster $cluster + */ + public function setCluster(array $cluster) + { + $this->set("Cluster", $cluster->getAll()); + } +} diff --git a/src/UClickhouse/Models/GetCreateUClickhouseClusterOptionResponseData.php b/src/UClickhouse/Models/GetCreateUClickhouseClusterOptionResponseData.php new file mode 100644 index 0000000..fd0c4be --- /dev/null +++ b/src/UClickhouse/Models/GetCreateUClickhouseClusterOptionResponseData.php @@ -0,0 +1,140 @@ +get("ClickhouseVersions"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClickhouseVersion($item)); + } + return $result; + } + + /** + * ClickhouseVersions: 支持的CK版本 + * + * @param ClickhouseVersion[] $clickhouseVersions + */ + public function setClickhouseVersions(array $clickhouseVersions) + { + $result = []; + foreach ($clickhouseVersions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ClickhouseMachineTypes: 支持的CK机型 + * + * @return ClickhouseMachineType[]|null + */ + public function getClickhouseMachineTypes() + { + $items = $this->get("ClickhouseMachineTypes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClickhouseMachineType($item)); + } + return $result; + } + + /** + * ClickhouseMachineTypes: 支持的CK机型 + * + * @param ClickhouseMachineType[] $clickhouseMachineTypes + */ + public function setClickhouseMachineTypes(array $clickhouseMachineTypes) + { + $result = []; + foreach ($clickhouseMachineTypes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * MaxNodeCount: 实例可创建的最大节点数量 + * + * @return integer|null + */ + public function getMaxNodeCount() + { + return $this->get("MaxNodeCount"); + } + + /** + * MaxNodeCount: 实例可创建的最大节点数量 + * + * @param int $maxNodeCount + */ + public function setMaxNodeCount($maxNodeCount) + { + $this->set("MaxNodeCount", $maxNodeCount); + } + + /** + * ZookeeperMachineTypes: 支持的Zookeeper机型 + * + * @return ClickhouseMachineType[]|null + */ + public function getZookeeperMachineTypes() + { + $items = $this->get("ZookeeperMachineTypes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClickhouseMachineType($item)); + } + return $result; + } + + /** + * ZookeeperMachineTypes: 支持的Zookeeper机型 + * + * @param ClickhouseMachineType[] $zookeeperMachineTypes + */ + public function setZookeeperMachineTypes(array $zookeeperMachineTypes) + { + $result = []; + foreach ($zookeeperMachineTypes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UClickhouse/Models/ListUClickhouseClusterResponseData.php b/src/UClickhouse/Models/ListUClickhouseClusterResponseData.php new file mode 100644 index 0000000..e89f544 --- /dev/null +++ b/src/UClickhouse/Models/ListUClickhouseClusterResponseData.php @@ -0,0 +1,64 @@ +get("Clusters")); + } + + /** + * Clusters: 集群列表 + * + * @param ClickhouseCluster $clusters + */ + public function setClusters(array $clusters) + { + $this->set("Clusters", $clusters->getAll()); + } + + /** + * 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/UClickhouse/Models/Payment.php b/src/UClickhouse/Models/Payment.php new file mode 100644 index 0000000..9cb7c00 --- /dev/null +++ b/src/UClickhouse/Models/Payment.php @@ -0,0 +1,144 @@ +get("CreateTimestamp"); + } + + /** + * CreateTimestamp: 创建时间 + * + * @param int $createTimestamp + */ + public function setCreateTimestamp($createTimestamp) + { + $this->set("CreateTimestamp", $createTimestamp); + } + + /** + * ExpireTimestamp: 过期时间 + * + * @return integer|null + */ + public function getExpireTimestamp() + { + return $this->get("ExpireTimestamp"); + } + + /** + * ExpireTimestamp: 过期时间 + * + * @param int $expireTimestamp + */ + public function setExpireTimestamp($expireTimestamp) + { + $this->set("ExpireTimestamp", $expireTimestamp); + } + + /** + * ChargeType: 支付类型 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 支付类型 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: 价格 + * + * @return integer|null + */ + public function getPrice() + { + return $this->get("Price"); + } + + /** + * Price: 价格 + * + * @param int $price + */ + public function setPrice($price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 原始价格 + * + * @return integer|null + */ + public function getOriginalPrice() + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 原始价格 + * + * @param int $originalPrice + */ + public function setOriginalPrice($originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } + + /** + * ResourceId: 资源ID + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UClickhouse/Models/ZookeeperNode.php b/src/UClickhouse/Models/ZookeeperNode.php new file mode 100644 index 0000000..f59065e --- /dev/null +++ b/src/UClickhouse/Models/ZookeeperNode.php @@ -0,0 +1,324 @@ +get("Zone"); + } + + /** + * Zone: 可用区名称 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * NodeId: 节点ID + * + * @return string|null + */ + public function getNodeId() + { + return $this->get("NodeId"); + } + + /** + * NodeId: 节点ID + * + * @param string $nodeId + */ + public function setNodeId($nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * NodeName: 节点名称 + * + * @return string|null + */ + public function getNodeName() + { + return $this->get("NodeName"); + } + + /** + * NodeName: 节点名称 + * + * @param string $nodeName + */ + public function setNodeName($nodeName) + { + $this->set("NodeName", $nodeName); + } + + /** + * CPU: CPU + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: CPU + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存 + * + * @return integer|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 内存 + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * SysDiskSize: 系统盘大小 + * + * @return integer|null + */ + public function getSysDiskSize() + { + return $this->get("SysDiskSize"); + } + + /** + * SysDiskSize: 系统盘大小 + * + * @param int $sysDiskSize + */ + public function setSysDiskSize($sysDiskSize) + { + $this->set("SysDiskSize", $sysDiskSize); + } + + /** + * SysDiskType: 系统盘类型 + * + * @return string|null + */ + public function getSysDiskType() + { + return $this->get("SysDiskType"); + } + + /** + * SysDiskType: 系统盘类型 + * + * @param string $sysDiskType + */ + public function setSysDiskType($sysDiskType) + { + $this->set("SysDiskType", $sysDiskType); + } + + /** + * DataDiskSize: 数据盘大小 + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 数据盘大小 + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * DataDiskType: 数据盘类型 + * + * @return string|null + */ + public function getDataDiskType() + { + return $this->get("DataDiskType"); + } + + /** + * DataDiskType: 数据盘类型 + * + * @param string $dataDiskType + */ + public function setDataDiskType($dataDiskType) + { + $this->set("DataDiskType", $dataDiskType); + } + + /** + * CreateTimestamp: 创建时间 + * + * @return integer|null + */ + public function getCreateTimestamp() + { + return $this->get("CreateTimestamp"); + } + + /** + * CreateTimestamp: 创建时间 + * + * @param int $createTimestamp + */ + public function setCreateTimestamp($createTimestamp) + { + $this->set("CreateTimestamp", $createTimestamp); + } + + /** + * MachineType: 机型 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机型 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * ZookeeperMyId: zookeeper的myid + * + * @return string|null + */ + public function getZookeeperMyId() + { + return $this->get("ZookeeperMyId"); + } + + /** + * ZookeeperMyId: zookeeper的myid + * + * @param string $zookeeperMyId + */ + public function setZookeeperMyId($zookeeperMyId) + { + $this->set("ZookeeperMyId", $zookeeperMyId); + } + + /** + * ServiceStatus: 服务状态:RUNNING(运行中)、STARTING(启动中)、STOPPED(已停止)、RESTARTING(重启中) + * + * @return string|null + */ + public function getServiceStatus() + { + return $this->get("ServiceStatus"); + } + + /** + * ServiceStatus: 服务状态:RUNNING(运行中)、STARTING(启动中)、STOPPED(已停止)、RESTARTING(重启中) + * + * @param string $serviceStatus + */ + public function setServiceStatus($serviceStatus) + { + $this->set("ServiceStatus", $serviceStatus); + } + + /** + * ResourceId: 资源ID + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UClickhouse/Params/CreateUClickhouseClusterParamLabels.php b/src/UClickhouse/Params/CreateUClickhouseClusterParamLabels.php new file mode 100644 index 0000000..27c7885 --- /dev/null +++ b/src/UClickhouse/Params/CreateUClickhouseClusterParamLabels.php @@ -0,0 +1,64 @@ +get("Key"); + } + + /** + * Key: 标签的key + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: 标签的value + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 标签的value + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UClickhouse/UClickhouseClient.php b/src/UClickhouse/UClickhouseClient.php new file mode 100644 index 0000000..6372083 --- /dev/null +++ b/src/UClickhouse/UClickhouseClient.php @@ -0,0 +1,468 @@ + (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClickhouseMachineTypeId" => (string) 集群机型,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * "DataDiskType" => (string) 数据盘类型,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * "ClickhouseVersion" => (string) Clickhouse版本,可通过GetUClickhouseClusterCreateOption接口获取具体版本 + * "VPCId" => (string) VPC ID + * "SubnetId" => (string) 子网ID + * "AdminPassword" => (string) 集群管理员密码,密码规则:1.密码长度限8-32个字符2.不能包含[A-Z],[a-z],[0-9]和[@#%^*+=_;:,?!&()-]之外的字符3.需要同时包含两项或以上(大写字母/小写字母/数字/特殊符号) + * "ShardCount" => (integer) 分片数量,若传递,则至少1个分片,默认值为1 + * "ReplicateCount" => (integer) 副本数量,取值为1或2,1为单副本(非高可用),2为双副本(高可用),默认值为高可用(即为2) + * "DataDiskSize" => (integer) 数据盘大小,最小100,步长为50,默认值为100,单位GB + * "ChargeType" => (string) 付费类型,枚举值:Year(年付),Month(月付),Dynamic(时付),默认值为Month,月付 + * "Quantity" => (integer) 购买时长,默认值为1。月付时,此参数传0,代表购买至月末 + * "BackupId" => (string) 备份任务ID,从备份恢复时,该字段必传,此值为备份任务ID,可以从原集群备份任务列表(ListUClickhouseBackups)获取 + * "ClusterName" => (string) 实例名称名称规则:1.长度为1-50位的字符2.不能包含_,中文,[A-Z],[a-z],[0-9]之外的非法字符,集群名称默认为clickhouse + * "IsZookeeperHA" => (boolean) 是否Zookeeper高可用,true为zookeeper高可用,false为非高可用,默认为true,高可用 + * "IsSecGroup" => (string) 是否开启安全组,true为开启,false为不开启,默认为false,不开启安全组 + * "IsMultiZone" => (string) 是否多可用区,默认为false + * "ZookeeperMachineTypeId" => (string) Zookeeper机型ID,IsZookeeperHA为true时,必传,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * "ZookeeperDataDiskType" => (string) Zookeeper数据盘类型,IsZookeeperHA为true时,必传,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * "ZookeeperDataDiskSize" => (string) Zookeeper数据盘大小,IsZookeeperHA为true时,必传,最小100,步长为50 + * "SecGroupIds" => (string) 安全组ID,IsSecGroup为true时,必传 + * "MultiZones" => (array) 【数组】可用区名称,IsMultiZone为true时,必传,可通过ListUClickhouseAvailableZone获取支持的可用区 + * "Labels" => (array) [ + * [ + * "Key" => (string) 标签的key + * "Value" => (string) 标签的value + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (object) 返回数据[ + * "ClusterId" => (string) 集群ID + * ] + * ] + * + * @return CreateUClickhouseClusterResponse + * @throws UCloudException + */ + public function createUClickhouseCluster(CreateUClickhouseClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUClickhouseClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUClickhouseCluster - 获取集群信息 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/describe_u_clickhouse_cluster + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) 集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (object) 返回数据[ + * "ZookeeperNodes" => (array) Zookeeper节点列表,为空时,说明该集群没有zookeeper集群[ + * [ + * "Zone" => (string) 可用区名称 + * "NodeId" => (string) 节点ID + * "ClusterId" => (string) 集群ID + * "NodeName" => (string) 节点名称 + * "CPU" => (integer) CPU + * "Memory" => (integer) 内存 + * "SysDiskSize" => (integer) 系统盘大小 + * "SysDiskType" => (string) 系统盘类型 + * "DataDiskSize" => (integer) 数据盘大小 + * "DataDiskType" => (string) 数据盘类型 + * "CreateTimestamp" => (integer) 创建时间 + * "MachineType" => (string) 机型 + * "ZookeeperMyId" => (string) zookeeper的myid + * "ServiceStatus" => (string) 服务状态:RUNNING(运行中)、STARTING(启动中)、STOPPED(已停止)、RESTARTING(重启中) + * "ResourceId" => (string) 资源ID + * ] + * ] + * "ClickhouseNodes" => (array) Clickhouse节点列表[ + * [ + * "Zone" => (string) 可用区名称 + * "NodeId" => (string) 节点ID + * "ClusterId" => (string) 集群ID + * "NodeName" => (string) 节点名称 + * "CPU" => (integer) CPU大小 + * "Memory" => (integer) 内存,GB + * "SysDiskSize" => (integer) 系统盘大小,GB + * "SysDiskType" => (string) 系统盘类型 + * "DataDiskSize" => (integer) 数据盘大小,GB + * "DataDiskType" => (string) 数据盘类型 + * "IPv4" => (string) ipv4 + * "CreateTimestamp" => (integer) 创建时间 + * "MachineType" => (string) 机型 + * "ShardGroup" => (string) 分片组 + * "ServiceStatus" => (string) 服务状态:RUNNING(运行中)、STARTING(启动中)、STOPPED(已停止)、RESTARTING(重启中) + * "ResourceId" => (string) 资源ID + * ] + * ] + * "Payment" => (object) 支付信息[ + * "CreateTimestamp" => (integer) 创建时间 + * "ExpireTimestamp" => (integer) 过期时间 + * "ChargeType" => (string) 支付类型 + * "Price" => (integer) 价格 + * "OriginalPrice" => (integer) 原始价格 + * "ResourceId" => (string) 资源ID + * ] + * "Cluster" => (object) 集群信息[ + * "ClusterId" => (string) 集群ID + * "TopOrganizationId" => (integer) 公司ID + * "OrganizationId" => (integer) 项目ID + * "ClusterName" => (string) 集群名称 + * "VPCId" => (string) VPCID + * "SubnetId" => (string) 子网ID + * "ClickhouseVersion" => (string) 集群版本 + * "ZookeeperVersion" => (string) Zookeeper版本 + * "MachineType" => (string) 机型 + * "Status" => (string) 集群状态:CREATING(创建中)、RUNNING(运行中)、RESIZING(变配中)、RESTARTING(重启中)、UPGRADING(升级中)、DESTROYING(销毁中)、DESTROYED(已删除)、CREATE_FAILED(创建失败)、RESTART_FAILED(重启失败)、DESTROY_FAILED(删除失败)、RESIZE_FAILED(变配失败)、BACKUP_RESTORING(备份恢复中)、BACKUP_RESTORE_FAILED(备份恢复失败)、EXPANDING(扩容中)、EXPAND_FAILED(扩容失败) + * "ShardCount" => (integer) 分片数 + * "ReplicateCount" => (integer) 副本数 + * "CreateTimestamp" => (integer) 集群创建时间 + * "ClickhouseMachineTypeId" => (string) Clickhouse机型ID + * "ClickhouseMachineTypeName" => (string) Clickhouse机型名称 + * "RegionId" => (integer) 地域ID + * "ZookeeperMachineTypeId" => (string) Zookeeper机型ID + * "ZookeeperMachineTypeName" => (string) Zookeeper机型名称 + * "ClickhouseDataDiskType" => (string) Clickhouse数据盘类型 + * "ClickhouseDataDiskSize" => (integer) Clickhouse数据盘大小 + * "ZookeeperDataDiskType" => (string) Zookeeper数据盘类型 + * "ZookeeperDataDiskSize" => (integer) Zookeeper数据盘大小 + * "ClickhouseNodeCPU" => (integer) Clickhouse节点CPU + * "ClickhouseNodeMemory" => (integer) Clickhouse内存 + * "ZookeeperNodeCPU" => (integer) Zookeeper节点CPU + * "ZookeeperNodeMemory" => (integer) Zookeeper节点内存 + * "IsZookeeperHA" => (string) Zookeeper是否高可用 + * "IsSecgroup" => (string) 实例是否开启安全组 + * "IsBackup" => (string) 实例是否开启备份 + * "IsTieredStorage" => (string) 实例是否开启冷热分层 + * "MultiZones" => (array) 实例所在可用区 + * "ExpireTimestamp" => (number) 实例过期时间 + * ] + * ] + * ] + * + * @return DescribeUClickhouseClusterResponse + * @throws UCloudException + */ + public function describeUClickhouseCluster(DescribeUClickhouseClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUClickhouseClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DestroyUClickhouseCluster - 删除CK集群 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/destroy_u_clickhouse_cluster + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) 集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DestroyUClickhouseClusterResponse + * @throws UCloudException + */ + public function destroyUClickhouseCluster(DestroyUClickhouseClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new DestroyUClickhouseClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ExpandUClickhouseCluster - 集群水平扩容 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/expand_u_clickhouse_cluster + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) 集群ID + * "TotalNodeCount" => (integer) 扩容后集群的节点数量,集群为高可用时,需要传入偶数个节点 + * "SyncNodeId" => (string) 水平扩容时,选择某一个原节点的ID,用于同步表结构/用户信息。不传递时,表示不同步表结构/用户信息,仅水平扩容节点数量 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ExpandUClickhouseClusterResponse + * @throws UCloudException + */ + public function expandUClickhouseCluster(ExpandUClickhouseClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new ExpandUClickhouseClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUClickhouseClusterCreateOption - 获取Clickhouse的创建配置项 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/get_u_clickhouse_cluster_create_option + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目Id + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (object) 数据[ + * "ClickhouseVersions" => (array) 支持的CK版本[ + * [ + * "Version" => (string) 版本号 + * "VersionName" => (string) 版本名称 + * ] + * ] + * "ClickhouseMachineTypes" => (array) 支持的CK机型[ + * [ + * "ClickhouseMachineTypeName" => (string) CK机型名称 + * "ClickhouseMachineTypeOptions" => (array) CK机型可选项[ + * [ + * "ClickhouseMachineTypeId" => (string) Clickhouse机型ID + * "MachineType" => (string) 机型 + * "CPU" => (integer) CPU大小 + * "Memory" => (integer) 内存大小,GB + * "DataDisks" => (array) 数据盘列表[ + * [ + * "DiskType" => (string) 磁盘类型 + * "MinDiskSize" => (integer) 最小值,GB + * "MaxDiskSize" => (integer) 最大值,GB + * "DefaultDataDiskSize" => (integer) 默认大小,GB + * "Step" => (integer) 步长,GB + * ] + * ] + * "NodeCounts" => (array) 允许创建的节点个数 + * ] + * ] + * "IsSecgroupMachineType" => (string) 机型是否支持安全组 + * ] + * ] + * "MaxNodeCount" => (integer) 实例可创建的最大节点数量 + * "ZookeeperMachineTypes" => (array) 支持的Zookeeper机型[ + * [ + * "ClickhouseMachineTypeName" => (string) CK机型名称 + * "ClickhouseMachineTypeOptions" => (array) CK机型可选项[ + * [ + * "ClickhouseMachineTypeId" => (string) Clickhouse机型ID + * "MachineType" => (string) 机型 + * "CPU" => (integer) CPU大小 + * "Memory" => (integer) 内存大小,GB + * "DataDisks" => (array) 数据盘列表[ + * [ + * "DiskType" => (string) 磁盘类型 + * "MinDiskSize" => (integer) 最小值,GB + * "MaxDiskSize" => (integer) 最大值,GB + * "DefaultDataDiskSize" => (integer) 默认大小,GB + * "Step" => (integer) 步长,GB + * ] + * ] + * "NodeCounts" => (array) 允许创建的节点个数 + * ] + * ] + * "IsSecgroupMachineType" => (string) 机型是否支持安全组 + * ] + * ] + * ] + * ] + * + * @return GetUClickhouseClusterCreateOptionResponse + * @throws UCloudException + */ + public function getUClickhouseClusterCreateOption(GetUClickhouseClusterCreateOptionRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUClickhouseClusterCreateOptionResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUClickhouseCluster - 获取UClickhouse集群列表 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/list_u_clickhouse_cluster + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (object) 返回数据[ + * "Clusters" => (object) 集群列表[ + * "ClusterId" => (string) 集群ID + * "TopOrganizationId" => (integer) 公司ID + * "OrganizationId" => (integer) 项目ID + * "ClusterName" => (string) 集群名称 + * "VPCId" => (string) VPCID + * "SubnetId" => (string) 子网ID + * "ClickhouseVersion" => (string) 集群版本 + * "ZookeeperVersion" => (string) Zookeeper版本 + * "MachineType" => (string) 机型 + * "Status" => (string) 集群状态:CREATING(创建中)、RUNNING(运行中)、RESIZING(变配中)、RESTARTING(重启中)、UPGRADING(升级中)、DESTROYING(销毁中)、DESTROYED(已删除)、CREATE_FAILED(创建失败)、RESTART_FAILED(重启失败)、DESTROY_FAILED(删除失败)、RESIZE_FAILED(变配失败)、BACKUP_RESTORING(备份恢复中)、BACKUP_RESTORE_FAILED(备份恢复失败)、EXPANDING(扩容中)、EXPAND_FAILED(扩容失败) + * "ShardCount" => (integer) 分片数 + * "ReplicateCount" => (integer) 副本数 + * "CreateTimestamp" => (integer) 集群创建时间 + * "ClickhouseMachineTypeId" => (string) Clickhouse机型ID + * "ClickhouseMachineTypeName" => (string) Clickhouse机型名称 + * "RegionId" => (integer) 地域ID + * "ZookeeperMachineTypeId" => (string) Zookeeper机型ID + * "ZookeeperMachineTypeName" => (string) Zookeeper机型名称 + * "ClickhouseDataDiskType" => (string) Clickhouse数据盘类型 + * "ClickhouseDataDiskSize" => (integer) Clickhouse数据盘大小 + * "ZookeeperDataDiskType" => (string) Zookeeper数据盘类型 + * "ZookeeperDataDiskSize" => (integer) Zookeeper数据盘大小 + * "ClickhouseNodeCPU" => (integer) Clickhouse节点CPU + * "ClickhouseNodeMemory" => (integer) Clickhouse内存 + * "ZookeeperNodeCPU" => (integer) Zookeeper节点CPU + * "ZookeeperNodeMemory" => (integer) Zookeeper节点内存 + * "IsZookeeperHA" => (string) Zookeeper是否高可用 + * "IsSecgroup" => (string) 实例是否开启安全组 + * "IsBackup" => (string) 实例是否开启备份 + * "IsTieredStorage" => (string) 实例是否开启冷热分层 + * "MultiZones" => (array) 实例所在可用区 + * "ExpireTimestamp" => (number) 实例过期时间 + * ] + * "TotalCount" => (integer) 集群总数 + * ] + * ] + * + * @return ListUClickhouseClusterResponse + * @throws UCloudException + */ + public function listUClickhouseCluster(ListUClickhouseClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUClickhouseClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeUClickhouseCluster - 集群改配 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/resize_u_clickhouse_cluster + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) 集群ID + * "TargetMachineTypeId" => (string) 目标机型ID,可通过GetUClickhouseClusterCreateOption接口获取具体值,与TargetDataDiskSize不能同时为空 + * "TargetDataDiskSize" => (integer) 目标磁盘大小,单位GB,只能扩容,与TargetMachineTypeId不能同时为空 + * "IsZooKeeperNode" => (boolean) 是否为zookeeper节点,为true时表示升级zookeeper节点规格,为false时表示升级clickhouse节点规格,默认为false + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ResizeUClickhouseClusterResponse + * @throws UCloudException + */ + public function resizeUClickhouseCluster(ResizeUClickhouseClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new ResizeUClickhouseClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartUClickhouseClusterService - 重启集群的UClickhouse服务 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/restart_u_clickhouse_cluster_service + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) 集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return RestartUClickhouseClusterServiceResponse + * @throws UCloudException + */ + public function restartUClickhouseClusterService(RestartUClickhouseClusterServiceRequest $request = null) + { + $resp = $this->invoke($request); + return new RestartUClickhouseClusterServiceResponse($resp->toArray(), $resp->getRequestId()); + } +}