From c6614e5a03b08924a6ac204189730250ab022e9b Mon Sep 17 00:00:00 2001 From: ucloud-bot Date: Thu, 23 Apr 2026 05:51:03 +0000 Subject: [PATCH] sdk: rolling update for 0.3.15 --- VERSION | 2 +- .../Apis/CreateUClickhouseClusterRequest.php | 529 ++++++++++++++ .../Apis/CreateUClickhouseClusterResponse.php | 45 ++ .../DescribeUClickhouseClusterRequest.php | 91 +++ .../DescribeUClickhouseClusterResponse.php | 49 ++ .../Apis/DestroyUClickhouseClusterRequest.php | 91 +++ .../DestroyUClickhouseClusterResponse.php | 26 + .../Apis/ExpandUClickhouseClusterRequest.php | 132 ++++ .../Apis/ExpandUClickhouseClusterResponse.php | 26 + ...tUClickhouseClusterCreateOptionRequest.php | 70 ++ ...UClickhouseClusterCreateOptionResponse.php | 52 ++ .../Apis/ListUClickhouseClusterRequest.php | 70 ++ .../Apis/ListUClickhouseClusterResponse.php | 46 ++ .../Apis/ResizeUClickhouseClusterRequest.php | 151 ++++ .../Apis/ResizeUClickhouseClusterResponse.php | 26 + ...estartUClickhouseClusterServiceRequest.php | 91 +++ ...startUClickhouseClusterServiceResponse.php | 26 + src/UClickhouse/Models/ClickhouseCluster.php | 664 ++++++++++++++++++ src/UClickhouse/Models/ClickhouseDataDisk.php | 124 ++++ .../Models/ClickhouseMachineType.php | 96 +++ .../Models/ClickhouseMachineTypeOption.php | 156 ++++ src/UClickhouse/Models/ClickhouseNode.php | 344 +++++++++ src/UClickhouse/Models/ClickhouseVersion.php | 64 ++ .../CreateUClickhouseClusterResponseData.php | 44 ++ ...DescribeUClickhouseClusterResponseData.php | 128 ++++ ...teUClickhouseClusterOptionResponseData.php | 140 ++++ .../ListUClickhouseClusterResponseData.php | 64 ++ src/UClickhouse/Models/Payment.php | 144 ++++ src/UClickhouse/Models/ZookeeperNode.php | 324 +++++++++ .../CreateUClickhouseClusterParamLabels.php | 64 ++ src/UClickhouse/UClickhouseClient.php | 468 ++++++++++++ src/UES/Apis/CreateUESInstanceRequest.php | 599 ++++++++++++++++ src/UES/Apis/CreateUESInstanceResponse.php | 44 ++ src/UES/Apis/DeleteUESInstanceRequest.php | 112 +++ src/UES/Apis/DeleteUESInstanceResponse.php | 26 + src/UES/Apis/DescribeUESInstanceV2Request.php | 112 +++ .../Apis/DescribeUESInstanceV2Response.php | 47 ++ src/UES/Apis/ExpandUESInstanceRequest.php | 154 ++++ src/UES/Apis/ExpandUESInstanceResponse.php | 26 + src/UES/Apis/GetUESAppVersionRequest.php | 91 +++ src/UES/Apis/GetUESAppVersionResponse.php | 77 ++ .../Apis/GetUESDiskSizeLimitationRequest.php | 91 +++ .../Apis/GetUESDiskSizeLimitationResponse.php | 57 ++ src/UES/Apis/GetUESNodeConfRequest.php | 91 +++ src/UES/Apis/GetUESNodeConfResponse.php | 77 ++ src/UES/Apis/ListUESInstanceRequest.php | 130 ++++ src/UES/Apis/ListUESInstanceResponse.php | 77 ++ src/UES/Apis/ResizeUESInstanceRequest.php | 193 +++++ src/UES/Apis/ResizeUESInstanceResponse.php | 26 + src/UES/Apis/RestartUESInstanceRequest.php | 112 +++ src/UES/Apis/RestartUESInstanceResponse.php | 26 + src/UES/Models/AppVersion.php | 84 +++ src/UES/Models/ClusterInfo.php | 464 ++++++++++++ src/UES/Models/ClusterNodeV2Info.php | 96 +++ src/UES/Models/ClusterV2Info.php | 224 ++++++ src/UES/Models/DiskSizeLimitation.php | 84 +++ src/UES/Models/NodeConf.php | 144 ++++ src/UES/Models/NodeV2Info.php | 224 ++++++ src/UES/UESClient.php | 438 ++++++++++++ .../Apis/AddUHadoopInstanceNodeRequest.php | 273 +++++++ .../Apis/AddUHadoopInstanceNodeResponse.php | 26 + .../Apis/CreateUHadoopInstanceRequest.php | 478 +++++++++++++ .../Apis/CreateUHadoopInstanceResponse.php | 44 ++ .../Apis/DeleteUHadoopInstanceRequest.php | 132 ++++ .../Apis/DeleteUHadoopInstanceResponse.php | 26 + .../Apis/DescribeUHadoopInstanceRequest.php | 131 ++++ .../Apis/DescribeUHadoopInstanceResponse.php | 57 ++ .../Apis/GetUHadoopNodeTypeRequest.php | 151 ++++ .../Apis/GetUHadoopNodeTypeResponse.php | 98 +++ .../Apis/ListUHadoopFrameworkAppRequest.php | 132 ++++ .../Apis/ListUHadoopFrameworkAppResponse.php | 57 ++ .../Apis/ListUHadoopInstanceRequest.php | 130 ++++ .../Apis/ListUHadoopInstanceResponse.php | 77 ++ .../Apis/RestartUHadoopServiceRequest.php | 233 ++++++ .../Apis/RestartUHadoopServiceResponse.php | 44 ++ .../Apis/UpgradeUHadoopNodeDiskRequest.php | 194 +++++ .../Apis/UpgradeUHadoopNodeDiskResponse.php | 26 + .../Apis/UpgradeUHadoopNodeRequest.php | 174 +++++ .../Apis/UpgradeUHadoopNodeResponse.php | 26 + src/UHadoop/Models/AppConfigSet.php | 84 +++ src/UHadoop/Models/ClusterInfo.php | 484 +++++++++++++ src/UHadoop/Models/DiskSet.php | 204 ++++++ src/UHadoop/Models/InstanceType.php | 256 +++++++ src/UHadoop/Models/ListClusterInfo.php | 244 +++++++ src/UHadoop/UHadoopClient.php | 453 ++++++++++++ 85 files changed, 12506 insertions(+), 1 deletion(-) create mode 100644 src/UClickhouse/Apis/CreateUClickhouseClusterRequest.php create mode 100644 src/UClickhouse/Apis/CreateUClickhouseClusterResponse.php create mode 100644 src/UClickhouse/Apis/DescribeUClickhouseClusterRequest.php create mode 100644 src/UClickhouse/Apis/DescribeUClickhouseClusterResponse.php create mode 100644 src/UClickhouse/Apis/DestroyUClickhouseClusterRequest.php create mode 100644 src/UClickhouse/Apis/DestroyUClickhouseClusterResponse.php create mode 100644 src/UClickhouse/Apis/ExpandUClickhouseClusterRequest.php create mode 100644 src/UClickhouse/Apis/ExpandUClickhouseClusterResponse.php create mode 100644 src/UClickhouse/Apis/GetUClickhouseClusterCreateOptionRequest.php create mode 100644 src/UClickhouse/Apis/GetUClickhouseClusterCreateOptionResponse.php create mode 100644 src/UClickhouse/Apis/ListUClickhouseClusterRequest.php create mode 100644 src/UClickhouse/Apis/ListUClickhouseClusterResponse.php create mode 100644 src/UClickhouse/Apis/ResizeUClickhouseClusterRequest.php create mode 100644 src/UClickhouse/Apis/ResizeUClickhouseClusterResponse.php create mode 100644 src/UClickhouse/Apis/RestartUClickhouseClusterServiceRequest.php create mode 100644 src/UClickhouse/Apis/RestartUClickhouseClusterServiceResponse.php create mode 100644 src/UClickhouse/Models/ClickhouseCluster.php create mode 100644 src/UClickhouse/Models/ClickhouseDataDisk.php create mode 100644 src/UClickhouse/Models/ClickhouseMachineType.php create mode 100644 src/UClickhouse/Models/ClickhouseMachineTypeOption.php create mode 100644 src/UClickhouse/Models/ClickhouseNode.php create mode 100644 src/UClickhouse/Models/ClickhouseVersion.php create mode 100644 src/UClickhouse/Models/CreateUClickhouseClusterResponseData.php create mode 100644 src/UClickhouse/Models/DescribeUClickhouseClusterResponseData.php create mode 100644 src/UClickhouse/Models/GetCreateUClickhouseClusterOptionResponseData.php create mode 100644 src/UClickhouse/Models/ListUClickhouseClusterResponseData.php create mode 100644 src/UClickhouse/Models/Payment.php create mode 100644 src/UClickhouse/Models/ZookeeperNode.php create mode 100644 src/UClickhouse/Params/CreateUClickhouseClusterParamLabels.php create mode 100644 src/UClickhouse/UClickhouseClient.php create mode 100644 src/UES/Apis/CreateUESInstanceRequest.php create mode 100644 src/UES/Apis/CreateUESInstanceResponse.php create mode 100644 src/UES/Apis/DeleteUESInstanceRequest.php create mode 100644 src/UES/Apis/DeleteUESInstanceResponse.php create mode 100644 src/UES/Apis/DescribeUESInstanceV2Request.php create mode 100644 src/UES/Apis/DescribeUESInstanceV2Response.php create mode 100644 src/UES/Apis/ExpandUESInstanceRequest.php create mode 100644 src/UES/Apis/ExpandUESInstanceResponse.php create mode 100644 src/UES/Apis/GetUESAppVersionRequest.php create mode 100644 src/UES/Apis/GetUESAppVersionResponse.php create mode 100644 src/UES/Apis/GetUESDiskSizeLimitationRequest.php create mode 100644 src/UES/Apis/GetUESDiskSizeLimitationResponse.php create mode 100644 src/UES/Apis/GetUESNodeConfRequest.php create mode 100644 src/UES/Apis/GetUESNodeConfResponse.php create mode 100644 src/UES/Apis/ListUESInstanceRequest.php create mode 100644 src/UES/Apis/ListUESInstanceResponse.php create mode 100644 src/UES/Apis/ResizeUESInstanceRequest.php create mode 100644 src/UES/Apis/ResizeUESInstanceResponse.php create mode 100644 src/UES/Apis/RestartUESInstanceRequest.php create mode 100644 src/UES/Apis/RestartUESInstanceResponse.php create mode 100644 src/UES/Models/AppVersion.php create mode 100644 src/UES/Models/ClusterInfo.php create mode 100644 src/UES/Models/ClusterNodeV2Info.php create mode 100644 src/UES/Models/ClusterV2Info.php create mode 100644 src/UES/Models/DiskSizeLimitation.php create mode 100644 src/UES/Models/NodeConf.php create mode 100644 src/UES/Models/NodeV2Info.php create mode 100644 src/UES/UESClient.php create mode 100644 src/UHadoop/Apis/AddUHadoopInstanceNodeRequest.php create mode 100644 src/UHadoop/Apis/AddUHadoopInstanceNodeResponse.php create mode 100644 src/UHadoop/Apis/CreateUHadoopInstanceRequest.php create mode 100644 src/UHadoop/Apis/CreateUHadoopInstanceResponse.php create mode 100644 src/UHadoop/Apis/DeleteUHadoopInstanceRequest.php create mode 100644 src/UHadoop/Apis/DeleteUHadoopInstanceResponse.php create mode 100644 src/UHadoop/Apis/DescribeUHadoopInstanceRequest.php create mode 100644 src/UHadoop/Apis/DescribeUHadoopInstanceResponse.php create mode 100644 src/UHadoop/Apis/GetUHadoopNodeTypeRequest.php create mode 100644 src/UHadoop/Apis/GetUHadoopNodeTypeResponse.php create mode 100644 src/UHadoop/Apis/ListUHadoopFrameworkAppRequest.php create mode 100644 src/UHadoop/Apis/ListUHadoopFrameworkAppResponse.php create mode 100644 src/UHadoop/Apis/ListUHadoopInstanceRequest.php create mode 100644 src/UHadoop/Apis/ListUHadoopInstanceResponse.php create mode 100644 src/UHadoop/Apis/RestartUHadoopServiceRequest.php create mode 100644 src/UHadoop/Apis/RestartUHadoopServiceResponse.php create mode 100644 src/UHadoop/Apis/UpgradeUHadoopNodeDiskRequest.php create mode 100644 src/UHadoop/Apis/UpgradeUHadoopNodeDiskResponse.php create mode 100644 src/UHadoop/Apis/UpgradeUHadoopNodeRequest.php create mode 100644 src/UHadoop/Apis/UpgradeUHadoopNodeResponse.php create mode 100644 src/UHadoop/Models/AppConfigSet.php create mode 100644 src/UHadoop/Models/ClusterInfo.php create mode 100644 src/UHadoop/Models/DiskSet.php create mode 100644 src/UHadoop/Models/InstanceType.php create mode 100644 src/UHadoop/Models/ListClusterInfo.php create mode 100644 src/UHadoop/UHadoopClient.php 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()); + } +} diff --git a/src/UES/Apis/CreateUESInstanceRequest.php b/src/UES/Apis/CreateUESInstanceRequest.php new file mode 100644 index 0000000..8fe0f6b --- /dev/null +++ b/src/UES/Apis/CreateUESInstanceRequest.php @@ -0,0 +1,599 @@ + "CreateUESInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceName"); + $this->markRequired("NodeConf"); + $this->markRequired("VPCId"); + $this->markRequired("SubnetId"); + $this->markRequired("KibanaNodeConf"); + $this->markRequired("KibanaNodeDiskConf"); + $this->markRequired("AppVersion"); + $this->markRequired("NodeDiskConf"); + } + + + + /** + * 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); + } + + /** + * InstanceName: 实例名称 + * + * @return string|null + */ + public function getInstanceName() + { + return $this->get("InstanceName"); + } + + /** + * InstanceName: 实例名称 + * + * @param string $instanceName + */ + public function setInstanceName($instanceName) + { + $this->set("InstanceName", $instanceName); + } + + /** + * NodeConf: 节点配置标识, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf + * + * @return string|null + */ + public function getNodeConf() + { + return $this->get("NodeConf"); + } + + /** + * NodeConf: 节点配置标识, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf + * + * @param string $nodeConf + */ + public function setNodeConf($nodeConf) + { + $this->set("NodeConf", $nodeConf); + } + + /** + * 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); + } + + /** + * KibanaNodeConf: Kibana节点配置, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf + * + * @return string|null + */ + public function getKibanaNodeConf() + { + return $this->get("KibanaNodeConf"); + } + + /** + * KibanaNodeConf: Kibana节点配置, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf + * + * @param string $kibanaNodeConf + */ + public function setKibanaNodeConf($kibanaNodeConf) + { + $this->set("KibanaNodeConf", $kibanaNodeConf); + } + + /** + * KibanaNodeDiskConf: Kibana节点磁盘类型 + * + * @return string|null + */ + public function getKibanaNodeDiskConf() + { + return $this->get("KibanaNodeDiskConf"); + } + + /** + * KibanaNodeDiskConf: Kibana节点磁盘类型 + * + * @param string $kibanaNodeDiskConf + */ + public function setKibanaNodeDiskConf($kibanaNodeDiskConf) + { + $this->set("KibanaNodeDiskConf", $kibanaNodeDiskConf); + } + + /** + * AppVersion: 应用服务版本号,支持的类型通过GetUESAppVersion AppVersionList[].AppVersion + * + * @return string|null + */ + public function getAppVersion() + { + return $this->get("AppVersion"); + } + + /** + * AppVersion: 应用服务版本号,支持的类型通过GetUESAppVersion AppVersionList[].AppVersion + * + * @param string $appVersion + */ + public function setAppVersion($appVersion) + { + $this->set("AppVersion", $appVersion); + } + + /** + * NodeDiskConf: 磁盘类型 + * + * @return string|null + */ + public function getNodeDiskConf() + { + return $this->get("NodeDiskConf"); + } + + /** + * NodeDiskConf: 磁盘类型 + * + * @param string $nodeDiskConf + */ + public function setNodeDiskConf($nodeDiskConf) + { + $this->set("NodeDiskConf", $nodeDiskConf); + } + + /** + * NodeSize: 节点个数,默认数目为3 + * + * @return integer|null + */ + public function getNodeSize() + { + return $this->get("NodeSize"); + } + + /** + * NodeSize: 节点个数,默认数目为3 + * + * @param int $nodeSize + */ + public function setNodeSize($nodeSize) + { + $this->set("NodeSize", $nodeSize); + } + + /** + * NodeDiskSize: 节点磁盘大小,默认为100G + * + * @return integer|null + */ + public function getNodeDiskSize() + { + return $this->get("NodeDiskSize"); + } + + /** + * NodeDiskSize: 节点磁盘大小,默认为100G + * + * @param int $nodeDiskSize + */ + public function setNodeDiskSize($nodeDiskSize) + { + $this->set("NodeDiskSize", $nodeDiskSize); + } + + /** + * ServiceUserName: elasticsearch 服务用户名称,默认为elastic;OpenSearch 服务用户名称,固定为admin + * + * @return string|null + */ + public function getServiceUserName() + { + return $this->get("ServiceUserName"); + } + + /** + * ServiceUserName: elasticsearch 服务用户名称,默认为elastic;OpenSearch 服务用户名称,固定为admin + * + * @param string $serviceUserName + */ + public function setServiceUserName($serviceUserName) + { + $this->set("ServiceUserName", $serviceUserName); + } + + /** + * ServicePasswd: 服务用户密码,默认为changeme + * + * @return string|null + */ + public function getServicePasswd() + { + return $this->get("ServicePasswd"); + } + + /** + * ServicePasswd: 服务用户密码,默认为changeme + * + * @param string $servicePasswd + */ + public function setServicePasswd($servicePasswd) + { + $this->set("ServicePasswd", $servicePasswd); + } + + /** + * AppName: 应用名称,支持的类型通过GetUESAppVersion AppVersionList[].AppName, 默认为elasticsearch + * + * @return string|null + */ + public function getAppName() + { + return $this->get("AppName"); + } + + /** + * AppName: 应用名称,支持的类型通过GetUESAppVersion AppVersionList[].AppName, 默认为elasticsearch + * + * @param string $appName + */ + public function setAppName($appName) + { + $this->set("AppName", $appName); + } + + /** + * Remark: 备注,默认为空 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注,默认为空 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * ChargeType: 计费类型,默认为Month + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型,默认为Month + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 计费长度,默认为1 + * + * @return integer|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 计费长度,默认为1 + * + * @param int $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * MasterConf: 主节点类型标示,支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf, 默认为空 + * + * @return string|null + */ + public function getMasterConf() + { + return $this->get("MasterConf"); + } + + /** + * MasterConf: 主节点类型标示,支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf, 默认为空 + * + * @param string $masterConf + */ + public function setMasterConf($masterConf) + { + $this->set("MasterConf", $masterConf); + } + + /** + * BusinessId: 业务组ID标识 + * + * @return string|null + */ + public function getBusinessId() + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 业务组ID标识 + * + * @param string $businessId + */ + public function setBusinessId($businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * CoordinatingNodeConf: Coordinating节点机型配置,, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf, 默认为空 + * + * @return string|null + */ + public function getCoordinatingNodeConf() + { + return $this->get("CoordinatingNodeConf"); + } + + /** + * CoordinatingNodeConf: Coordinating节点机型配置,, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf, 默认为空 + * + * @param string $coordinatingNodeConf + */ + public function setCoordinatingNodeConf($coordinatingNodeConf) + { + $this->set("CoordinatingNodeConf", $coordinatingNodeConf); + } + + /** + * CoordinatingNodeSize: Coordinating节点数量 + * + * @return integer|null + */ + public function getCoordinatingNodeSize() + { + return $this->get("CoordinatingNodeSize"); + } + + /** + * CoordinatingNodeSize: Coordinating节点数量 + * + * @param int $coordinatingNodeSize + */ + public function setCoordinatingNodeSize($coordinatingNodeSize) + { + $this->set("CoordinatingNodeSize", $coordinatingNodeSize); + } + + /** + * CoordinatingNodeDiskConf: Coordinating节点磁盘类型 + * + * @return string|null + */ + public function getCoordinatingNodeDiskConf() + { + return $this->get("CoordinatingNodeDiskConf"); + } + + /** + * CoordinatingNodeDiskConf: Coordinating节点磁盘类型 + * + * @param string $coordinatingNodeDiskConf + */ + public function setCoordinatingNodeDiskConf($coordinatingNodeDiskConf) + { + $this->set("CoordinatingNodeDiskConf", $coordinatingNodeDiskConf); + } + + /** + * IsSecGroup: 是否开启安全组,默认为false + * + * @return boolean|null + */ + public function getIsSecGroup() + { + return $this->get("IsSecGroup"); + } + + /** + * IsSecGroup: 是否开启安全组,默认为false + * + * @param boolean $isSecGroup + */ + public function setIsSecGroup($isSecGroup) + { + $this->set("IsSecGroup", $isSecGroup); + } + + /** + * SecGroupIds: 安全组ID,开启安全组必填,至多可以同时绑定5个安全组 + * + * @return string[]|null + */ + public function getSecGroupIds() + { + return $this->get("SecGroupIds"); + } + + /** + * SecGroupIds: 安全组ID,开启安全组必填,至多可以同时绑定5个安全组 + * + * @param string[] $secGroupIds + */ + public function setSecGroupIds(array $secGroupIds) + { + $this->set("SecGroupIds", $secGroupIds); + } + + /** + * IsMultiZone: 是否为多可用区,默认为false + * + * @return boolean|null + */ + public function getIsMultiZone() + { + return $this->get("IsMultiZone"); + } + + /** + * IsMultiZone: 是否为多可用区,默认为false + * + * @param boolean $isMultiZone + */ + public function setIsMultiZone($isMultiZone) + { + $this->set("IsMultiZone", $isMultiZone); + } + + /** + * MultiZones: 多可用区名称,默认空数组 [] + * + * @return string[]|null + */ + public function getMultiZones() + { + return $this->get("MultiZones"); + } + + /** + * MultiZones: 多可用区名称,默认空数组 [] + * + * @param string[] $multiZones + */ + public function setMultiZones(array $multiZones) + { + $this->set("MultiZones", $multiZones); + } +} diff --git a/src/UES/Apis/CreateUESInstanceResponse.php b/src/UES/Apis/CreateUESInstanceResponse.php new file mode 100644 index 0000000..0fb625f --- /dev/null +++ b/src/UES/Apis/CreateUESInstanceResponse.php @@ -0,0 +1,44 @@ +get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/UES/Apis/DeleteUESInstanceRequest.php b/src/UES/Apis/DeleteUESInstanceRequest.php new file mode 100644 index 0000000..f61f14a --- /dev/null +++ b/src/UES/Apis/DeleteUESInstanceRequest.php @@ -0,0 +1,112 @@ + "DeleteUESInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + } + + + + /** + * 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); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/UES/Apis/DeleteUESInstanceResponse.php b/src/UES/Apis/DeleteUESInstanceResponse.php new file mode 100644 index 0000000..d38cb14 --- /dev/null +++ b/src/UES/Apis/DeleteUESInstanceResponse.php @@ -0,0 +1,26 @@ + "DescribeUESInstanceV2"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + } + + + + /** + * 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); + } + + /** + * InstanceId: 集群实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 集群实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/UES/Apis/DescribeUESInstanceV2Response.php b/src/UES/Apis/DescribeUESInstanceV2Response.php new file mode 100644 index 0000000..f255f8e --- /dev/null +++ b/src/UES/Apis/DescribeUESInstanceV2Response.php @@ -0,0 +1,47 @@ +get("Result")); + } + + /** + * Result: 返回结果 + * + * @param ClusterNodeV2Info $result + */ + public function setResult(array $result) + { + $this->set("Result", $result->getAll()); + } +} diff --git a/src/UES/Apis/ExpandUESInstanceRequest.php b/src/UES/Apis/ExpandUESInstanceRequest.php new file mode 100644 index 0000000..7f90c13 --- /dev/null +++ b/src/UES/Apis/ExpandUESInstanceRequest.php @@ -0,0 +1,154 @@ + "ExpandUESInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + $this->markRequired("NodeCount"); + $this->markRequired("NodeRole"); + } + + + + /** + * 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); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * NodeCount: 扩容后对应类型节点的数目 + * + * @return integer|null + */ + public function getNodeCount() + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 扩容后对应类型节点的数目 + * + * @param int $nodeCount + */ + public function setNodeCount($nodeCount) + { + $this->set("NodeCount", $nodeCount); + } + + /** + * NodeRole: 节点类型(compute、coordinating) + * + * @return string|null + */ + public function getNodeRole() + { + return $this->get("NodeRole"); + } + + /** + * NodeRole: 节点类型(compute、coordinating) + * + * @param string $nodeRole + */ + public function setNodeRole($nodeRole) + { + $this->set("NodeRole", $nodeRole); + } +} diff --git a/src/UES/Apis/ExpandUESInstanceResponse.php b/src/UES/Apis/ExpandUESInstanceResponse.php new file mode 100644 index 0000000..81db56c --- /dev/null +++ b/src/UES/Apis/ExpandUESInstanceResponse.php @@ -0,0 +1,26 @@ + "GetUESAppVersion"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UES/Apis/GetUESAppVersionResponse.php b/src/UES/Apis/GetUESAppVersionResponse.php new file mode 100644 index 0000000..62a2c3d --- /dev/null +++ b/src/UES/Apis/GetUESAppVersionResponse.php @@ -0,0 +1,77 @@ +get("TotalCount"); + } + + /** + * TotalCount: 服务应用版本个数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * AppVersionList: 服务应用版本列表 + * + * @return AppVersion[]|null + */ + public function getAppVersionList() + { + $items = $this->get("AppVersionList"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AppVersion($item)); + } + return $result; + } + + /** + * AppVersionList: 服务应用版本列表 + * + * @param AppVersion[] $appVersionList + */ + public function setAppVersionList(array $appVersionList) + { + $result = []; + foreach ($appVersionList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UES/Apis/GetUESDiskSizeLimitationRequest.php b/src/UES/Apis/GetUESDiskSizeLimitationRequest.php new file mode 100644 index 0000000..9d9e6fc --- /dev/null +++ b/src/UES/Apis/GetUESDiskSizeLimitationRequest.php @@ -0,0 +1,91 @@ + "GetUESDiskSizeLimitation"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UES/Apis/GetUESDiskSizeLimitationResponse.php b/src/UES/Apis/GetUESDiskSizeLimitationResponse.php new file mode 100644 index 0000000..853f141 --- /dev/null +++ b/src/UES/Apis/GetUESDiskSizeLimitationResponse.php @@ -0,0 +1,57 @@ +get("DiskSizeLimitationSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new DiskSizeLimitation($item)); + } + return $result; + } + + /** + * DiskSizeLimitationSet: 各磁盘类型容量限制列表 + * + * @param DiskSizeLimitation[] $diskSizeLimitationSet + */ + public function setDiskSizeLimitationSet(array $diskSizeLimitationSet) + { + $result = []; + foreach ($diskSizeLimitationSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UES/Apis/GetUESNodeConfRequest.php b/src/UES/Apis/GetUESNodeConfRequest.php new file mode 100644 index 0000000..997d5ef --- /dev/null +++ b/src/UES/Apis/GetUESNodeConfRequest.php @@ -0,0 +1,91 @@ + "GetUESNodeConf"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UES/Apis/GetUESNodeConfResponse.php b/src/UES/Apis/GetUESNodeConfResponse.php new file mode 100644 index 0000000..ac51c7e --- /dev/null +++ b/src/UES/Apis/GetUESNodeConfResponse.php @@ -0,0 +1,77 @@ +get("TotalCount"); + } + + /** + * TotalCount: 所有节点配置信息的个数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * NodeConfList: 服务节点配置信息列表 + * + * @return NodeConf[]|null + */ + public function getNodeConfList() + { + $items = $this->get("NodeConfList"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodeConf($item)); + } + return $result; + } + + /** + * NodeConfList: 服务节点配置信息列表 + * + * @param NodeConf[] $nodeConfList + */ + public function setNodeConfList(array $nodeConfList) + { + $result = []; + foreach ($nodeConfList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UES/Apis/ListUESInstanceRequest.php b/src/UES/Apis/ListUESInstanceRequest.php new file mode 100644 index 0000000..599024c --- /dev/null +++ b/src/UES/Apis/ListUESInstanceRequest.php @@ -0,0 +1,130 @@ + "ListUESInstance"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度, 默认为30 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度, 默认为30 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UES/Apis/ListUESInstanceResponse.php b/src/UES/Apis/ListUESInstanceResponse.php new file mode 100644 index 0000000..a263dbc --- /dev/null +++ b/src/UES/Apis/ListUESInstanceResponse.php @@ -0,0 +1,77 @@ +get("ClusterSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClusterInfo($item)); + } + return $result; + } + + /** + * ClusterSet: 实例信息列表 + * + * @param ClusterInfo[] $clusterSet + */ + public function setClusterSet(array $clusterSet) + { + $result = []; + foreach ($clusterSet as $i => $item) { + array_push($result, $item->getAll()); + } + 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/UES/Apis/ResizeUESInstanceRequest.php b/src/UES/Apis/ResizeUESInstanceRequest.php new file mode 100644 index 0000000..950f9e5 --- /dev/null +++ b/src/UES/Apis/ResizeUESInstanceRequest.php @@ -0,0 +1,193 @@ + "ResizeUESInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + $this->markRequired("NodeRole"); + } + + + + /** + * 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); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * NodeRole: 节点类型(compute、master、coordinating、kibana、dashboard) + * + * @return string|null + */ + public function getNodeRole() + { + return $this->get("NodeRole"); + } + + /** + * NodeRole: 节点类型(compute、master、coordinating、kibana、dashboard) + * + * @param string $nodeRole + */ + public function setNodeRole($nodeRole) + { + $this->set("NodeRole", $nodeRole); + } + + /** + * NodeConf: 改配节点类型,NodeDiskSize为0,基于NodeRole 进行改配 + * + * @return string|null + */ + public function getNodeConf() + { + return $this->get("NodeConf"); + } + + /** + * NodeConf: 改配节点类型,NodeDiskSize为0,基于NodeRole 进行改配 + * + * @param string $nodeConf + */ + public function setNodeConf($nodeConf) + { + $this->set("NodeConf", $nodeConf); + } + + /** + * NodeDiskSize: 改配节点磁盘大小,NodeConf 为空字符串,基于NodeRole 进行改配 + * + * @return integer|null + */ + public function getNodeDiskSize() + { + return $this->get("NodeDiskSize"); + } + + /** + * NodeDiskSize: 改配节点磁盘大小,NodeConf 为空字符串,基于NodeRole 进行改配 + * + * @param int $nodeDiskSize + */ + public function setNodeDiskSize($nodeDiskSize) + { + $this->set("NodeDiskSize", $nodeDiskSize); + } + + /** + * ForceResizing: 进行改配操作是否强制检查集群健康状态,默认为false + * + * @return boolean|null + */ + public function getForceResizing() + { + return $this->get("ForceResizing"); + } + + /** + * ForceResizing: 进行改配操作是否强制检查集群健康状态,默认为false + * + * @param boolean $forceResizing + */ + public function setForceResizing($forceResizing) + { + $this->set("ForceResizing", $forceResizing); + } +} diff --git a/src/UES/Apis/ResizeUESInstanceResponse.php b/src/UES/Apis/ResizeUESInstanceResponse.php new file mode 100644 index 0000000..4abc05e --- /dev/null +++ b/src/UES/Apis/ResizeUESInstanceResponse.php @@ -0,0 +1,26 @@ + "RestartUESInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + } + + + + /** + * 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); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/UES/Apis/RestartUESInstanceResponse.php b/src/UES/Apis/RestartUESInstanceResponse.php new file mode 100644 index 0000000..7bae79e --- /dev/null +++ b/src/UES/Apis/RestartUESInstanceResponse.php @@ -0,0 +1,26 @@ +get("AppName"); + } + + /** + * AppName: 应用名称,默认值为elasticsearch + * + * @param string $appName + */ + public function setAppName($appName) + { + $this->set("AppName", $appName); + } + + /** + * AppVersion: 应用版本号 + * + * @return string|null + */ + public function getAppVersion() + { + return $this->get("AppVersion"); + } + + /** + * AppVersion: 应用版本号 + * + * @param string $appVersion + */ + public function setAppVersion($appVersion) + { + $this->set("AppVersion", $appVersion); + } + + /** + * IsMultiZone: 是否支持多区部署,默认为false + * + * @return boolean|null + */ + public function getIsMultiZone() + { + return $this->get("IsMultiZone"); + } + + /** + * IsMultiZone: 是否支持多区部署,默认为false + * + * @param boolean $isMultiZone + */ + public function setIsMultiZone($isMultiZone) + { + $this->set("IsMultiZone", $isMultiZone); + } +} diff --git a/src/UES/Models/ClusterInfo.php b/src/UES/Models/ClusterInfo.php new file mode 100644 index 0000000..ea205a8 --- /dev/null +++ b/src/UES/Models/ClusterInfo.php @@ -0,0 +1,464 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * BusinessId: 项目组ID标识 + * + * @return string|null + */ + public function getBusinessId() + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 项目组ID标识 + * + * @param string $businessId + */ + public function setBusinessId($businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * ChargeType: 计费类型,默认为Month + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型,默认为Month + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 失效时间 + * + * @return integer|null + */ + public function getExpireTime() + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 失效时间 + * + * @param int $expireTime + */ + public function setExpireTime($expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * NodeCount: 节点个数,默认为集群大小 + * + * @return integer|null + */ + public function getNodeCount() + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 节点个数,默认为集群大小 + * + * @param int $nodeCount + */ + public function setNodeCount($nodeCount) + { + $this->set("NodeCount", $nodeCount); + } + + /** + * RunTime: 实例运行时长 + * + * @return integer|null + */ + public function getRunTime() + { + return $this->get("RunTime"); + } + + /** + * RunTime: 实例运行时长 + * + * @param int $runTime + */ + public function setRunTime($runTime) + { + $this->set("RunTime", $runTime); + } + + /** + * AppVersion: 应用服务版本号 + * + * @return string|null + */ + public function getAppVersion() + { + return $this->get("AppVersion"); + } + + /** + * AppVersion: 应用服务版本号 + * + * @param string $appVersion + */ + public function setAppVersion($appVersion) + { + $this->set("AppVersion", $appVersion); + } + + /** + * State: 实例状态 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 实例状态 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * InstanceId: 实例资源ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例资源ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * InstanceName: 实例名称 + * + * @return string|null + */ + public function getInstanceName() + { + return $this->get("InstanceName"); + } + + /** + * InstanceName: 实例名称 + * + * @param string $instanceName + */ + public function setInstanceName($instanceName) + { + $this->set("InstanceName", $instanceName); + } + + /** + * AppName: 应用名称 + * + * @return string|null + */ + public function getAppName() + { + return $this->get("AppName"); + } + + /** + * AppName: 应用名称 + * + * @param string $appName + */ + public function setAppName($appName) + { + $this->set("AppName", $appName); + } + + /** + * UESInstanceId: 服务集群ID标识(弃用) + * + * @return string|null + */ + public function getUESInstanceId() + { + return $this->get("UESInstanceId"); + } + + /** + * UESInstanceId: 服务集群ID标识(弃用) + * + * @param string $uesInstanceId + */ + public function setUESInstanceId($uesInstanceId) + { + $this->set("UESInstanceId", $uesInstanceId); + } + + /** + * UESInstanceName: 服务集群名称(弃用) + * + * @return string|null + */ + public function getUESInstanceName() + { + return $this->get("UESInstanceName"); + } + + /** + * UESInstanceName: 服务集群名称(弃用) + * + * @param string $uesInstanceName + */ + public function setUESInstanceName($uesInstanceName) + { + $this->set("UESInstanceName", $uesInstanceName); + } + + /** + * ServiceVersion: 服务版本号(弃用) + * + * @return string|null + */ + public function getServiceVersion() + { + return $this->get("ServiceVersion"); + } + + /** + * ServiceVersion: 服务版本号(弃用) + * + * @param string $serviceVersion + */ + public function setServiceVersion($serviceVersion) + { + $this->set("ServiceVersion", $serviceVersion); + } + + /** + * 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); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * 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); + } + + /** + * Vip: VIP地址信息 + * + * @return string|null + */ + public function getVip() + { + return $this->get("Vip"); + } + + /** + * Vip: VIP地址信息 + * + * @param string $vip + */ + public function setVip($vip) + { + $this->set("Vip", $vip); + } + + /** + * IsSecGroup: 是否开启安全组 + * + * @return boolean|null + */ + public function getIsSecGroup() + { + return $this->get("IsSecGroup"); + } + + /** + * IsSecGroup: 是否开启安全组 + * + * @param boolean $isSecGroup + */ + public function setIsSecGroup($isSecGroup) + { + $this->set("IsSecGroup", $isSecGroup); + } + + /** + * MultiZones: 多可用区 + * + * @return string[]|null + */ + public function getMultiZones() + { + return $this->get("MultiZones"); + } + + /** + * MultiZones: 多可用区 + * + * @param string[] $multiZones + */ + public function setMultiZones(array $multiZones) + { + $this->set("MultiZones", $multiZones); + } + + /** + * Resizable: 是否支持改配 + * + * @return boolean|null + */ + public function getResizable() + { + return $this->get("Resizable"); + } + + /** + * Resizable: 是否支持改配 + * + * @param boolean $resizable + */ + public function setResizable($resizable) + { + $this->set("Resizable", $resizable); + } +} diff --git a/src/UES/Models/ClusterNodeV2Info.php b/src/UES/Models/ClusterNodeV2Info.php new file mode 100644 index 0000000..1109944 --- /dev/null +++ b/src/UES/Models/ClusterNodeV2Info.php @@ -0,0 +1,96 @@ +get("RequestId"); + } + + /** + * RequestId: + * + * @param string $requestId + */ + public function setRequestId($requestId) + { + $this->set("RequestId", $requestId); + } + + /** + * ClusterInfo: + * + * @return ClusterV2Info|null + */ + public function getClusterInfo() + { + return new ClusterV2Info($this->get("ClusterInfo")); + } + + /** + * ClusterInfo: + * + * @param ClusterV2Info $clusterInfo + */ + public function setClusterInfo(array $clusterInfo) + { + $this->set("ClusterInfo", $clusterInfo->getAll()); + } + + /** + * NodeInfoList: + * + * @return NodeV2Info[]|null + */ + public function getNodeInfoList() + { + $items = $this->get("NodeInfoList"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodeV2Info($item)); + } + return $result; + } + + /** + * NodeInfoList: + * + * @param NodeV2Info[] $nodeInfoList + */ + public function setNodeInfoList(array $nodeInfoList) + { + $result = []; + foreach ($nodeInfoList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UES/Models/ClusterV2Info.php b/src/UES/Models/ClusterV2Info.php new file mode 100644 index 0000000..001745d --- /dev/null +++ b/src/UES/Models/ClusterV2Info.php @@ -0,0 +1,224 @@ +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); + } + + /** + * UESInstanceId: 服务集群ID标识 + * + * @return string|null + */ + public function getUESInstanceId() + { + return $this->get("UESInstanceId"); + } + + /** + * UESInstanceId: 服务集群ID标识 + * + * @param string $uesInstanceId + */ + public function setUESInstanceId($uesInstanceId) + { + $this->set("UESInstanceId", $uesInstanceId); + } + + /** + * UESInstanceName: 服务集群名称 + * + * @return string|null + */ + public function getUESInstanceName() + { + return $this->get("UESInstanceName"); + } + + /** + * UESInstanceName: 服务集群名称 + * + * @param string $uesInstanceName + */ + public function setUESInstanceName($uesInstanceName) + { + $this->set("UESInstanceName", $uesInstanceName); + } + + /** + * ServiceVersion: 服务版本号 + * + * @return string|null + */ + public function getServiceVersion() + { + return $this->get("ServiceVersion"); + } + + /** + * ServiceVersion: 服务版本号 + * + * @param string $serviceVersion + */ + public function setServiceVersion($serviceVersion) + { + $this->set("ServiceVersion", $serviceVersion); + } + + /** + * 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); + } + + /** + * State: 服务集群状态 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 服务集群状态 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * BusinessId: 项目组ID标识 + * + * @return string|null + */ + public function getBusinessId() + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 项目组ID标识 + * + * @param string $businessId + */ + public function setBusinessId($businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * 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); + } + + /** + * Vip: Vip + * + * @return string|null + */ + public function getVip() + { + return $this->get("Vip"); + } + + /** + * Vip: Vip + * + * @param string $vip + */ + public function setVip($vip) + { + $this->set("Vip", $vip); + } +} diff --git a/src/UES/Models/DiskSizeLimitation.php b/src/UES/Models/DiskSizeLimitation.php new file mode 100644 index 0000000..da72562 --- /dev/null +++ b/src/UES/Models/DiskSizeLimitation.php @@ -0,0 +1,84 @@ +get("DiskType"); + } + + /** + * DiskType: 数据盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * MaxSize: 最大值,单位GB + * + * @return integer|null + */ + public function getMaxSize() + { + return $this->get("MaxSize"); + } + + /** + * MaxSize: 最大值,单位GB + * + * @param int $maxSize + */ + public function setMaxSize($maxSize) + { + $this->set("MaxSize", $maxSize); + } + + /** + * MinSize: 最小值,单位GB + * + * @return integer|null + */ + public function getMinSize() + { + return $this->get("MinSize"); + } + + /** + * MinSize: 最小值,单位GB + * + * @param int $minSize + */ + public function setMinSize($minSize) + { + $this->set("MinSize", $minSize); + } +} diff --git a/src/UES/Models/NodeConf.php b/src/UES/Models/NodeConf.php new file mode 100644 index 0000000..4ec0ceb --- /dev/null +++ b/src/UES/Models/NodeConf.php @@ -0,0 +1,144 @@ +get("Memory"); + } + + /** + * Memory: 内存,单位为GB + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * 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); + } + + /** + * NodeConf: 节点配置标识 + * + * @return string|null + */ + public function getNodeConf() + { + return $this->get("NodeConf"); + } + + /** + * NodeConf: 节点配置标识 + * + * @param string $nodeConf + */ + public function setNodeConf($nodeConf) + { + $this->set("NodeConf", $nodeConf); + } + + /** + * DiskType: 磁盘类型[RSSD|SSD] + * + * @return string|null + */ + public function getDiskType() + { + return $this->get("DiskType"); + } + + /** + * DiskType: 磁盘类型[RSSD|SSD] + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * DiskSize: 磁盘大小,单位为GB + * + * @return integer|null + */ + public function getDiskSize() + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 磁盘大小,单位为GB + * + * @param int $diskSize + */ + public function setDiskSize($diskSize) + { + $this->set("DiskSize", $diskSize); + } + + /** + * IsSecGroup: 是否支持安全组[true|false] + * + * @return boolean|null + */ + public function getIsSecGroup() + { + return $this->get("IsSecGroup"); + } + + /** + * IsSecGroup: 是否支持安全组[true|false] + * + * @param boolean $isSecGroup + */ + public function setIsSecGroup($isSecGroup) + { + $this->set("IsSecGroup", $isSecGroup); + } +} diff --git a/src/UES/Models/NodeV2Info.php b/src/UES/Models/NodeV2Info.php new file mode 100644 index 0000000..0abe5e9 --- /dev/null +++ b/src/UES/Models/NodeV2Info.php @@ -0,0 +1,224 @@ +get("NodeId"); + } + + /** + * NodeId: 节点ID + * + * @param string $nodeId + */ + public function setNodeId($nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * NodeName: 节点名称 + * + * @return string|null + */ + public function getNodeName() + { + return $this->get("NodeName"); + } + + /** + * NodeName: 节点名称 + * + * @param string $nodeName + */ + public function setNodeName($nodeName) + { + $this->set("NodeName", $nodeName); + } + + /** + * NodeRole: 节点类型 + * + * @return string|null + */ + public function getNodeRole() + { + return $this->get("NodeRole"); + } + + /** + * NodeRole: 节点类型 + * + * @param string $nodeRole + */ + public function setNodeRole($nodeRole) + { + $this->set("NodeRole", $nodeRole); + } + + /** + * NodeIP: 节点IP + * + * @return string|null + */ + public function getNodeIP() + { + return $this->get("NodeIP"); + } + + /** + * NodeIP: 节点IP + * + * @param string $nodeIP + */ + public function setNodeIP($nodeIP) + { + $this->set("NodeIP", $nodeIP); + } + + /** + * NodeConf: 节点配置标识 + * + * @return string|null + */ + public function getNodeConf() + { + return $this->get("NodeConf"); + } + + /** + * NodeConf: 节点配置标识 + * + * @param string $nodeConf + */ + public function setNodeConf($nodeConf) + { + $this->set("NodeConf", $nodeConf); + } + + /** + * NodeState: 节点状态 + * + * @return string|null + */ + public function getNodeState() + { + return $this->get("NodeState"); + } + + /** + * NodeState: 节点状态 + * + * @param string $nodeState + */ + public function setNodeState($nodeState) + { + $this->set("NodeState", $nodeState); + } + + /** + * DiskType: 节点磁盘类型 + * + * @return string|null + */ + public function getDiskType() + { + return $this->get("DiskType"); + } + + /** + * DiskType: 节点磁盘类型 + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * DiskSize: 节点磁盘大小 + * + * @return integer|null + */ + public function getDiskSize() + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 节点磁盘大小 + * + * @param int $diskSize + */ + public function setDiskSize($diskSize) + { + $this->set("DiskSize", $diskSize); + } + + /** + * Memory: 节点内存大小 + * + * @return integer|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 节点内存大小 + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * 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); + } +} diff --git a/src/UES/UESClient.php b/src/UES/UESClient.php new file mode 100644 index 0000000..bfe2cc9 --- /dev/null +++ b/src/UES/UESClient.php @@ -0,0 +1,438 @@ + (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) + * "InstanceName" => (string) 实例名称 + * "NodeConf" => (string) 节点配置标识, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf + * "VPCId" => (string) VPCID标识 + * "SubnetId" => (string) 子网ID标识 + * "KibanaNodeConf" => (string) Kibana节点配置, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf + * "KibanaNodeDiskConf" => (string) Kibana节点磁盘类型 + * "AppVersion" => (string) 应用服务版本号,支持的类型通过GetUESAppVersion AppVersionList[].AppVersion + * "NodeDiskConf" => (string) 磁盘类型 + * "NodeSize" => (integer) 节点个数,默认数目为3 + * "NodeDiskSize" => (integer) 节点磁盘大小,默认为100G + * "ServiceUserName" => (string) elasticsearch 服务用户名称,默认为elastic;OpenSearch 服务用户名称,固定为admin + * "ServicePasswd" => (string) 服务用户密码,默认为changeme + * "AppName" => (string) 应用名称,支持的类型通过GetUESAppVersion AppVersionList[].AppName, 默认为elasticsearch + * "Remark" => (string) 备注,默认为空 + * "ChargeType" => (string) 计费类型,默认为Month + * "Quantity" => (integer) 计费长度,默认为1 + * "MasterConf" => (string) 主节点类型标示,支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf, 默认为空 + * "BusinessId" => (string) 业务组ID标识 + * "CoordinatingNodeConf" => (string) Coordinating节点机型配置,, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf, 默认为空 + * "CoordinatingNodeSize" => (integer) Coordinating节点数量 + * "CoordinatingNodeDiskConf" => (string) Coordinating节点磁盘类型 + * "IsSecGroup" => (boolean) 是否开启安全组,默认为false + * "SecGroupIds" => (array) 安全组ID,开启安全组必填,至多可以同时绑定5个安全组 + * "IsMultiZone" => (boolean) 是否为多可用区,默认为false + * "MultiZones" => (array) 多可用区名称,默认空数组 [] + * ] + * + * Outputs: + * + * $outputs = [ + * "InstanceId" => (string) 实例ID + * ] + * + * @return CreateUESInstanceResponse + * @throws UCloudException + */ + public function createUESInstance(CreateUESInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUESInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUESInstance - 删除实例 + * + * See also: https://docs.ucloud.cn/api/ues-api/delete_ues_instance + * + * 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) + * "InstanceId" => (string) 实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteUESInstanceResponse + * @throws UCloudException + */ + public function deleteUESInstance(DeleteUESInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUESInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUESInstanceV2 - 查询指定实例详细信息 + * + * See also: https://docs.ucloud.cn/api/ues-api/describe_ues_instance_v2 + * + * 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) + * "InstanceId" => (string) 集群实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * "Result" => (object) 返回结果[ + * "RequestId" => (string) + * "ClusterInfo" => (object) [ + * "Region" => (string) 地域 + * "Zone" => (string) 可用区 + * "UESInstanceId" => (string) 服务集群ID标识 + * "UESInstanceName" => (string) 服务集群名称 + * "ServiceVersion" => (string) 服务版本号 + * "VPCId" => (string) VPCID标识 + * "State" => (string) 服务集群状态 + * "BusinessId" => (string) 项目组ID标识 + * "SubnetId" => (string) 子网ID标识 + * "Vip" => (string) Vip + * ] + * "NodeInfoList" => (array) [ + * [ + * "NodeId" => (string) 节点ID + * "NodeName" => (string) 节点名称 + * "NodeRole" => (string) 节点类型 + * "NodeIP" => (string) 节点IP + * "NodeConf" => (string) 节点配置标识 + * "NodeState" => (string) 节点状态 + * "DiskType" => (string) 节点磁盘类型 + * "DiskSize" => (integer) 节点磁盘大小 + * "Memory" => (integer) 节点内存大小 + * "CPU" => (integer) 节点cpu数量 + * ] + * ] + * ] + * ] + * + * @return DescribeUESInstanceV2Response + * @throws UCloudException + */ + public function describeUESInstanceV2(DescribeUESInstanceV2Request $request = null) + { + $resp = $this->invoke($request); + return new DescribeUESInstanceV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * ExpandUESInstance - 扩容实例节点 + * + * See also: https://docs.ucloud.cn/api/ues-api/expand_ues_instance + * + * 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) + * "InstanceId" => (string) 实例ID + * "NodeCount" => (integer) 扩容后对应类型节点的数目 + * "NodeRole" => (string) 节点类型(compute、coordinating) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ExpandUESInstanceResponse + * @throws UCloudException + */ + public function expandUESInstance(ExpandUESInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new ExpandUESInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUESAppVersion - 获取服务应用版本列表 + * + * See also: https://docs.ucloud.cn/api/ues-api/get_ues_app_version + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 服务应用版本个数 + * "AppVersionList" => (array) 服务应用版本列表[ + * [ + * "AppName" => (string) 应用名称,默认值为elasticsearch + * "AppVersion" => (string) 应用版本号 + * "IsMultiZone" => (boolean) 是否支持多区部署,默认为false + * ] + * ] + * ] + * + * @return GetUESAppVersionResponse + * @throws UCloudException + */ + public function getUESAppVersion(GetUESAppVersionRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUESAppVersionResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUESDiskSizeLimitation - 获取磁盘容量限制 + * + * See also: https://docs.ucloud.cn/api/ues-api/get_ues_disk_size_limitation + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * ] + * + * Outputs: + * + * $outputs = [ + * "DiskSizeLimitationSet" => (array) 各磁盘类型容量限制列表[ + * [ + * "DiskType" => (string) 数据盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 + * "MaxSize" => (integer) 最大值,单位GB + * "MinSize" => (integer) 最小值,单位GB + * ] + * ] + * ] + * + * @return GetUESDiskSizeLimitationResponse + * @throws UCloudException + */ + public function getUESDiskSizeLimitation(GetUESDiskSizeLimitationRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUESDiskSizeLimitationResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUESNodeConf - 获取节点配置列表 + * + * See also: https://docs.ucloud.cn/api/ues-api/get_ues_node_conf + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 所有节点配置信息的个数 + * "NodeConfList" => (array) 服务节点配置信息列表[ + * [ + * "Memory" => (integer) 内存,单位为GB + * "CPU" => (integer) CPU数量 + * "NodeConf" => (string) 节点配置标识 + * "DiskType" => (string) 磁盘类型[RSSD|SSD] + * "DiskSize" => (integer) 磁盘大小,单位为GB + * "IsSecGroup" => (boolean) 是否支持安全组[true|false] + * ] + * ] + * ] + * + * @return GetUESNodeConfResponse + * @throws UCloudException + */ + public function getUESNodeConf(GetUESNodeConfRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUESNodeConfResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUESInstance - 获取实例列表 + * + * See also: https://docs.ucloud.cn/api/ues-api/list_ues_instance + * + * 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) + * "Offset" => (integer) 数据偏移量, 默认为0 + * "Limit" => (integer) 返回数据长度, 默认为30 + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterSet" => (array) 实例信息列表[ + * [ + * "Zone" => (string) 可用区 + * "BusinessId" => (string) 项目组ID标识 + * "ChargeType" => (string) 计费类型,默认为Month + * "CreateTime" => (integer) 创建时间 + * "ExpireTime" => (integer) 失效时间 + * "NodeCount" => (integer) 节点个数,默认为集群大小 + * "RunTime" => (integer) 实例运行时长 + * "AppVersion" => (string) 应用服务版本号 + * "State" => (string) 实例状态 + * "InstanceId" => (string) 实例资源ID + * "InstanceName" => (string) 实例名称 + * "AppName" => (string) 应用名称 + * "UESInstanceId" => (string) 服务集群ID标识(弃用) + * "UESInstanceName" => (string) 服务集群名称(弃用) + * "ServiceVersion" => (string) 服务版本号(弃用) + * "SubnetId" => (string) 子网ID标识 + * "Tag" => (string) 业务组 + * "VPCId" => (string) VPCID标识 + * "Vip" => (string) VIP地址信息 + * "IsSecGroup" => (boolean) 是否开启安全组 + * "MultiZones" => (array) 多可用区 + * "Resizable" => (boolean) 是否支持改配 + * ] + * ] + * "TotalCount" => (integer) 实例个数 + * ] + * + * @return ListUESInstanceResponse + * @throws UCloudException + */ + public function listUESInstance(ListUESInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUESInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeUESInstance - 改配实例节点配置 + * + * See also: https://docs.ucloud.cn/api/ues-api/resize_ues_instance + * + * 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) + * "InstanceId" => (string) 实例ID + * "NodeRole" => (string) 节点类型(compute、master、coordinating、kibana、dashboard) + * "NodeConf" => (string) 改配节点类型,NodeDiskSize为0,基于NodeRole 进行改配 + * "NodeDiskSize" => (integer) 改配节点磁盘大小,NodeConf 为空字符串,基于NodeRole 进行改配 + * "ForceResizing" => (boolean) 进行改配操作是否强制检查集群健康状态,默认为false + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ResizeUESInstanceResponse + * @throws UCloudException + */ + public function resizeUESInstance(ResizeUESInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new ResizeUESInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartUESInstance - 重启实例 + * + * See also: https://docs.ucloud.cn/api/ues-api/restart_ues_instance + * + * 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) + * "InstanceId" => (string) 实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return RestartUESInstanceResponse + * @throws UCloudException + */ + public function restartUESInstance(RestartUESInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new RestartUESInstanceResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UHadoop/Apis/AddUHadoopInstanceNodeRequest.php b/src/UHadoop/Apis/AddUHadoopInstanceNodeRequest.php new file mode 100644 index 0000000..ac189f5 --- /dev/null +++ b/src/UHadoop/Apis/AddUHadoopInstanceNodeRequest.php @@ -0,0 +1,273 @@ + "AddUHadoopInstanceNode"]); + $this->markRequired("Region"); + $this->markRequired("NodeRole"); + $this->markRequired("NodeType"); + $this->markRequired("InstanceId"); + } + + + + /** + * 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); + } + + /** + * NodeRole: 节点的角色,值为task|core|client之一 + * + * @return string|null + */ + public function getNodeRole() + { + return $this->get("NodeRole"); + } + + /** + * NodeRole: 节点的角色,值为task|core|client之一 + * + * @param string $nodeRole + */ + public function setNodeRole($nodeRole) + { + $this->set("NodeRole", $nodeRole); + } + + /** + * NodeType: 机型,如:o.hadoop2m.medium,可从GetUHadoopNodeType接口获取 + * + * @return string|null + */ + public function getNodeType() + { + return $this->get("NodeType"); + } + + /** + * NodeType: 机型,如:o.hadoop2m.medium,可从GetUHadoopNodeType接口获取 + * + * @param string $nodeType + */ + public function setNodeType($nodeType) + { + $this->set("NodeType", $nodeType); + } + + /** + * InstanceId: 集群ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 集群ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * DataDiskNum: 数据盘数量,非裸金属机型时必填 + * + * @return string|null + */ + public function getDataDiskNum() + { + return $this->get("DataDiskNum"); + } + + /** + * DataDiskNum: 数据盘数量,非裸金属机型时必填 + * + * @param string $dataDiskNum + */ + public function setDataDiskNum($dataDiskNum) + { + $this->set("DataDiskNum", $dataDiskNum); + } + + /** + * Password: 密码,NodeRole为client时必填 + * + * @return string|null + */ + public function getPassword() + { + return $this->get("Password"); + } + + /** + * Password: 密码,NodeRole为client时必填 + * + * @param string $password + */ + public function setPassword($password) + { + $this->set("Password", $password); + } + + /** + * BootDiskSize: 系统盘容量,非裸金属机型必填 + * + * @return string|null + */ + public function getBootDiskSize() + { + return $this->get("BootDiskSize"); + } + + /** + * BootDiskSize: 系统盘容量,非裸金属机型必填 + * + * @param string $bootDiskSize + */ + public function setBootDiskSize($bootDiskSize) + { + $this->set("BootDiskSize", $bootDiskSize); + } + + /** + * BootDiskType: 系统盘类型,非裸金属机型必填,例如:CLOUD_RSSD + * + * @return string|null + */ + public function getBootDiskType() + { + return $this->get("BootDiskType"); + } + + /** + * BootDiskType: 系统盘类型,非裸金属机型必填,例如:CLOUD_RSSD + * + * @param string $bootDiskType + */ + public function setBootDiskType($bootDiskType) + { + $this->set("BootDiskType", $bootDiskType); + } + + /** + * DataDiskSize: 数据盘容量,非裸金属机型必填 + * + * @return string|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 数据盘容量,非裸金属机型必填 + * + * @param string $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * DataDiskType: 数据盘类型,非裸金属机型必填,例如:CLOUD_RSSD + * + * @return string|null + */ + public function getDataDiskType() + { + return $this->get("DataDiskType"); + } + + /** + * DataDiskType: 数据盘类型,非裸金属机型必填,例如:CLOUD_RSSD + * + * @param string $dataDiskType + */ + public function setDataDiskType($dataDiskType) + { + $this->set("DataDiskType", $dataDiskType); + } + + /** + * NodeCount: 节点数量,默认为1 + * + * @return integer|null + */ + public function getNodeCount() + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 节点数量,默认为1 + * + * @param int $nodeCount + */ + public function setNodeCount($nodeCount) + { + $this->set("NodeCount", $nodeCount); + } +} diff --git a/src/UHadoop/Apis/AddUHadoopInstanceNodeResponse.php b/src/UHadoop/Apis/AddUHadoopInstanceNodeResponse.php new file mode 100644 index 0000000..4a3920e --- /dev/null +++ b/src/UHadoop/Apis/AddUHadoopInstanceNodeResponse.php @@ -0,0 +1,26 @@ + "CreateUHadoopInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Password"); + $this->markRequired("FrameworkVersion"); + $this->markRequired("InstanceGroupConfigs"); + $this->markRequired("VPCId"); + $this->markRequired("SubnetId"); + $this->markRequired("AppConfig"); + $this->markRequired("Framework"); + } + + + + /** + * 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); + } + + /** + * Password: 集群机器的登录密码 + * + * @return string|null + */ + public function getPassword() + { + return $this->get("Password"); + } + + /** + * Password: 集群机器的登录密码 + * + * @param string $password + */ + public function setPassword($password) + { + $this->set("Password", $password); + } + + /** + * FrameworkVersion: 版本,例如:3.2.1-udh3.0,通过ListUHadoopFrameworkApp接口获取 + * + * @return string|null + */ + public function getFrameworkVersion() + { + return $this->get("FrameworkVersion"); + } + + /** + * FrameworkVersion: 版本,例如:3.2.1-udh3.0,通过ListUHadoopFrameworkApp接口获取 + * + * @param string $frameworkVersion + */ + public function setFrameworkVersion($frameworkVersion) + { + $this->set("FrameworkVersion", $frameworkVersion); + } + + /** + * InstanceGroupConfigs: 节点配置,里面包括NodeType(机型),NodeRole(节点类别,值为其中之一:master|core|task),Count(数量),DataDiskType(数据盘类别),DataDiskSize(数据盘大小),DataDiskNum(数据盘数量),BootDiskType(系统盘类型),BootDiskSize(系统盘大小),通过GetUHadoopNodeType接口获取,示例为:InstanceGroupConfigs.0.NodeType=o.hadoop2m.xlargeInstanceGroupConfigs.0.NodeRole=masterInstanceGroupConfigs.0.Count=2InstanceGroupConfigs.0.DataDiskType=CLOUD_RSSDInstanceGroupConfigs.0.DataDiskSize=100InstanceGroupConfigs.0.DataDiskNum=1InstanceGroupConfigs.0.BootDiskType=CLOUD_RSSDInstanceGroupConfigs.0.BootDiskSize=50InstanceGroupConfigs.1.NodeType=o.hadoop2m.xlargeInstanceGroupConfigs.1.NodeRole=coreInstanceGroupConfigs.1.Count=3InstanceGroupConfigs.1.DataDiskType=CLOUD_RSSDInstanceGroupConfigs.1.DataDiskSize=200InstanceGroupConfigs.1.DataDiskNum=1InstanceGroupConfigs.1.BootDiskType=CLOUD_RSSDInstanceGroupConfigs.1.BootDiskSize=50 + * + * @return string[]|null + */ + public function getInstanceGroupConfigs() + { + return $this->get("InstanceGroupConfigs"); + } + + /** + * InstanceGroupConfigs: 节点配置,里面包括NodeType(机型),NodeRole(节点类别,值为其中之一:master|core|task),Count(数量),DataDiskType(数据盘类别),DataDiskSize(数据盘大小),DataDiskNum(数据盘数量),BootDiskType(系统盘类型),BootDiskSize(系统盘大小),通过GetUHadoopNodeType接口获取,示例为:InstanceGroupConfigs.0.NodeType=o.hadoop2m.xlargeInstanceGroupConfigs.0.NodeRole=masterInstanceGroupConfigs.0.Count=2InstanceGroupConfigs.0.DataDiskType=CLOUD_RSSDInstanceGroupConfigs.0.DataDiskSize=100InstanceGroupConfigs.0.DataDiskNum=1InstanceGroupConfigs.0.BootDiskType=CLOUD_RSSDInstanceGroupConfigs.0.BootDiskSize=50InstanceGroupConfigs.1.NodeType=o.hadoop2m.xlargeInstanceGroupConfigs.1.NodeRole=coreInstanceGroupConfigs.1.Count=3InstanceGroupConfigs.1.DataDiskType=CLOUD_RSSDInstanceGroupConfigs.1.DataDiskSize=200InstanceGroupConfigs.1.DataDiskNum=1InstanceGroupConfigs.1.BootDiskType=CLOUD_RSSDInstanceGroupConfigs.1.BootDiskSize=50 + * + * @param string[] $instanceGroupConfigs + */ + public function setInstanceGroupConfigs(array $instanceGroupConfigs) + { + $this->set("InstanceGroupConfigs", $instanceGroupConfigs); + } + + /** + * 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); + } + + /** + * AppConfig: 集群需要安装的组件,格式:组件#版本通过ListUHadoopFrameworkApp接口获取,例如:Spark#3.3.0 + * + * @return string[]|null + */ + public function getAppConfig() + { + return $this->get("AppConfig"); + } + + /** + * AppConfig: 集群需要安装的组件,格式:组件#版本通过ListUHadoopFrameworkApp接口获取,例如:Spark#3.3.0 + * + * @param string[] $appConfig + */ + public function setAppConfig(array $appConfig) + { + $this->set("AppConfig", $appConfig); + } + + /** + * Framework: 框架名称,‘Hadoop’ | ‘HDFS’ | ‘MR‘|'‘StarRocks’,Hadoop框架包含存储与计算服务,MR集群包含计算服务 ,HDFS只包含存储服务 + * + * @return string|null + */ + public function getFramework() + { + return $this->get("Framework"); + } + + /** + * Framework: 框架名称,‘Hadoop’ | ‘HDFS’ | ‘MR‘|'‘StarRocks’,Hadoop框架包含存储与计算服务,MR集群包含计算服务 ,HDFS只包含存储服务 + * + * @param string $framework + */ + public function setFramework($framework) + { + $this->set("Framework", $framework); + } + + /** + * ChargeType: 支付类别,默认:Month + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 支付类别,默认:Month + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 数量,默认1 + * + * @return integer|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 数量,默认1 + * + * @param int $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * BusinessId: 工作组ID,默认Default + * + * @return string|null + */ + public function getBusinessId() + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 工作组ID,默认Default + * + * @param string $businessId + */ + public function setBusinessId($businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * StorgeClusterId: Framework为‘MR’时,存储集群ID + * + * @return string|null + */ + public function getStorgeClusterId() + { + return $this->get("StorgeClusterId"); + } + + /** + * StorgeClusterId: Framework为‘MR’时,存储集群ID + * + * @param string $storgeClusterId + */ + public function setStorgeClusterId($storgeClusterId) + { + $this->set("StorgeClusterId", $storgeClusterId); + } + + /** + * StandAloneMetaStore: 目前只支持传‘udb’ + * + * @return string|null + */ + public function getStandAloneMetaStore() + { + return $this->get("StandAloneMetaStore"); + } + + /** + * StandAloneMetaStore: 目前只支持传‘udb’ + * + * @param string $standAloneMetaStore + */ + public function setStandAloneMetaStore($standAloneMetaStore) + { + $this->set("StandAloneMetaStore", $standAloneMetaStore); + } + + /** + * IsSecurityEnabled: 是否开启安全组 + * + * @return string|null + */ + public function getIsSecurityEnabled() + { + return $this->get("IsSecurityEnabled"); + } + + /** + * IsSecurityEnabled: 是否开启安全组 + * + * @param string $isSecurityEnabled + */ + public function setIsSecurityEnabled($isSecurityEnabled) + { + $this->set("IsSecurityEnabled", $isSecurityEnabled); + } + + /** + * SecGroupIds: 安全组ID,字符串数组,IsSecurityEnabled为true时生效 + * + * @return string|null + */ + public function getSecGroupIds() + { + return $this->get("SecGroupIds"); + } + + /** + * SecGroupIds: 安全组ID,字符串数组,IsSecurityEnabled为true时生效 + * + * @param string $secGroupIds + */ + public function setSecGroupIds($secGroupIds) + { + $this->set("SecGroupIds", $secGroupIds); + } + + /** + * US3Bucket: US3 bucket名称,仅支持框架为StarRocks存算分离时传入 + * + * @return string|null + */ + public function getUS3Bucket() + { + return $this->get("US3Bucket"); + } + + /** + * US3Bucket: US3 bucket名称,仅支持框架为StarRocks存算分离时传入 + * + * @param string $us3Bucket + */ + public function setUS3Bucket($us3Bucket) + { + $this->set("US3Bucket", $us3Bucket); + } + + /** + * US3AccessKey: US3 配置公钥,仅支持框架为StarRocks存算分离时传入 + * + * @return string|null + */ + public function getUS3AccessKey() + { + return $this->get("US3AccessKey"); + } + + /** + * US3AccessKey: US3 配置公钥,仅支持框架为StarRocks存算分离时传入 + * + * @param string $us3AccessKey + */ + public function setUS3AccessKey($us3AccessKey) + { + $this->set("US3AccessKey", $us3AccessKey); + } + + /** + * US3SecretKey: US3 配置私钥,仅支持框架为StarRocks存算分离时传入 + * + * @return string|null + */ + public function getUS3SecretKey() + { + return $this->get("US3SecretKey"); + } + + /** + * US3SecretKey: US3 配置私钥,仅支持框架为StarRocks存算分离时传入 + * + * @param string $us3SecretKey + */ + public function setUS3SecretKey($us3SecretKey) + { + $this->set("US3SecretKey", $us3SecretKey); + } + + /** + * US3TokenName: US3 Token名称,仅支持框架为StarRocks存算分离时传入 + * + * @return string|null + */ + public function getUS3TokenName() + { + return $this->get("US3TokenName"); + } + + /** + * US3TokenName: US3 Token名称,仅支持框架为StarRocks存算分离时传入 + * + * @param string $us3TokenName + */ + public function setUS3TokenName($us3TokenName) + { + $this->set("US3TokenName", $us3TokenName); + } + + /** + * InstanceName: 实例名称,默认为实例ID + * + * @return string|null + */ + public function getInstanceName() + { + return $this->get("InstanceName"); + } + + /** + * InstanceName: 实例名称,默认为实例ID + * + * @param string $instanceName + */ + public function setInstanceName($instanceName) + { + $this->set("InstanceName", $instanceName); + } +} diff --git a/src/UHadoop/Apis/CreateUHadoopInstanceResponse.php b/src/UHadoop/Apis/CreateUHadoopInstanceResponse.php new file mode 100644 index 0000000..6d39c61 --- /dev/null +++ b/src/UHadoop/Apis/CreateUHadoopInstanceResponse.php @@ -0,0 +1,44 @@ +get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/UHadoop/Apis/DeleteUHadoopInstanceRequest.php b/src/UHadoop/Apis/DeleteUHadoopInstanceRequest.php new file mode 100644 index 0000000..57cff02 --- /dev/null +++ b/src/UHadoop/Apis/DeleteUHadoopInstanceRequest.php @@ -0,0 +1,132 @@ + "DeleteUHadoopInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + } + + + + /** + * 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); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * ReleaseEIP: 是否释放绑定的EIP。true: 解绑EIP后,并释放;其他值或不填:解绑EIP。 + * + * @return boolean|null + */ + public function getReleaseEIP() + { + return $this->get("ReleaseEIP"); + } + + /** + * ReleaseEIP: 是否释放绑定的EIP。true: 解绑EIP后,并释放;其他值或不填:解绑EIP。 + * + * @param boolean $releaseEIP + */ + public function setReleaseEIP($releaseEIP) + { + $this->set("ReleaseEIP", $releaseEIP); + } +} diff --git a/src/UHadoop/Apis/DeleteUHadoopInstanceResponse.php b/src/UHadoop/Apis/DeleteUHadoopInstanceResponse.php new file mode 100644 index 0000000..4b849cd --- /dev/null +++ b/src/UHadoop/Apis/DeleteUHadoopInstanceResponse.php @@ -0,0 +1,26 @@ + "DescribeUHadoopInstance"]); + $this->markRequired("Region"); + $this->markRequired("InstanceId"); + } + + + + /** + * 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); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * 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); + } +} diff --git a/src/UHadoop/Apis/DescribeUHadoopInstanceResponse.php b/src/UHadoop/Apis/DescribeUHadoopInstanceResponse.php new file mode 100644 index 0000000..a9e9758 --- /dev/null +++ b/src/UHadoop/Apis/DescribeUHadoopInstanceResponse.php @@ -0,0 +1,57 @@ +get("ClusterSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClusterInfo($item)); + } + return $result; + } + + /** + * ClusterSet: 集群信息 + * + * @param ClusterInfo[] $clusterSet + */ + public function setClusterSet(array $clusterSet) + { + $result = []; + foreach ($clusterSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHadoop/Apis/GetUHadoopNodeTypeRequest.php b/src/UHadoop/Apis/GetUHadoopNodeTypeRequest.php new file mode 100644 index 0000000..3e09963 --- /dev/null +++ b/src/UHadoop/Apis/GetUHadoopNodeTypeRequest.php @@ -0,0 +1,151 @@ + "GetUHadoopNodeType"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * 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); + } + + /** + * FrameworkVersion: 框架版本,例如3.2.1-udh3.0,通过ListUHadoopFrameworkApp接口获取 + * + * @return string|null + */ + public function getFrameworkVersion() + { + return $this->get("FrameworkVersion"); + } + + /** + * FrameworkVersion: 框架版本,例如3.2.1-udh3.0,通过ListUHadoopFrameworkApp接口获取 + * + * @param string $frameworkVersion + */ + public function setFrameworkVersion($frameworkVersion) + { + $this->set("FrameworkVersion", $frameworkVersion); + } + + /** + * NodeRole: 角色,master|core|task + * + * @return string|null + */ + public function getNodeRole() + { + return $this->get("NodeRole"); + } + + /** + * NodeRole: 角色,master|core|task + * + * @param string $nodeRole + */ + public function setNodeRole($nodeRole) + { + $this->set("NodeRole", $nodeRole); + } + + /** + * NodeType: 机型名称 + * + * @return string|null + */ + public function getNodeType() + { + return $this->get("NodeType"); + } + + /** + * NodeType: 机型名称 + * + * @param string $nodeType + */ + public function setNodeType($nodeType) + { + $this->set("NodeType", $nodeType); + } + + /** + * Framework: 框架,例如Hadoop|MR|HDFS|StarRocks,Hadoop框架包含存储与计算服务,MR集群包含计算服务,HDFS只包含存储服务,StarRocks为StarRocks集群 + * + * @return string|null + */ + public function getFramework() + { + return $this->get("Framework"); + } + + /** + * Framework: 框架,例如Hadoop|MR|HDFS|StarRocks,Hadoop框架包含存储与计算服务,MR集群包含计算服务,HDFS只包含存储服务,StarRocks为StarRocks集群 + * + * @param string $framework + */ + public function setFramework($framework) + { + $this->set("Framework", $framework); + } +} diff --git a/src/UHadoop/Apis/GetUHadoopNodeTypeResponse.php b/src/UHadoop/Apis/GetUHadoopNodeTypeResponse.php new file mode 100644 index 0000000..dfdbd98 --- /dev/null +++ b/src/UHadoop/Apis/GetUHadoopNodeTypeResponse.php @@ -0,0 +1,98 @@ +get("InstanceTypeSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new InstanceType($item)); + } + return $result; + } + + /** + * InstanceTypeSet: 类型信息 + * + * @param InstanceType[] $instanceTypeSet + */ + public function setInstanceTypeSet(array $instanceTypeSet) + { + $result = []; + foreach ($instanceTypeSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * MetaDataUDBUsable: 当前可用区是否支持元数据库使用UDB + * + * @return boolean|null + */ + public function getMetaDataUDBUsable() + { + return $this->get("MetaDataUDBUsable"); + } + + /** + * MetaDataUDBUsable: 当前可用区是否支持元数据库使用UDB + * + * @param boolean $metaDataUDBUsable + */ + public function setMetaDataUDBUsable($metaDataUDBUsable) + { + $this->set("MetaDataUDBUsable", $metaDataUDBUsable); + } + + /** + * HostTypeSupportNodeType: 机型可支持的节点类型 + * + * @return string|null + */ + public function getHostTypeSupportNodeType() + { + return $this->get("HostTypeSupportNodeType"); + } + + /** + * HostTypeSupportNodeType: 机型可支持的节点类型 + * + * @param string $hostTypeSupportNodeType + */ + public function setHostTypeSupportNodeType($hostTypeSupportNodeType) + { + $this->set("HostTypeSupportNodeType", $hostTypeSupportNodeType); + } +} diff --git a/src/UHadoop/Apis/ListUHadoopFrameworkAppRequest.php b/src/UHadoop/Apis/ListUHadoopFrameworkAppRequest.php new file mode 100644 index 0000000..b8347a4 --- /dev/null +++ b/src/UHadoop/Apis/ListUHadoopFrameworkAppRequest.php @@ -0,0 +1,132 @@ + "ListUHadoopFrameworkApp"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Framework"); + } + + + + /** + * 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); + } + + /** + * Framework: 框架,值为'Hadoop'|'HDFS'|'MR'|'StarRocks'之一,框架,例如Hadoop|MR|HDFS|StarRocks Hadoop框架包含存储与计算服务 MR集群包含计算服务 HDFS只包含存储服务,StarRocks为StarRocks集群 + * + * @return string|null + */ + public function getFramework() + { + return $this->get("Framework"); + } + + /** + * Framework: 框架,值为'Hadoop'|'HDFS'|'MR'|'StarRocks'之一,框架,例如Hadoop|MR|HDFS|StarRocks Hadoop框架包含存储与计算服务 MR集群包含计算服务 HDFS只包含存储服务,StarRocks为StarRocks集群 + * + * @param string $framework + */ + public function setFramework($framework) + { + $this->set("Framework", $framework); + } + + /** + * InstanceId: 实例ID,可选。传的话,过滤出适合此集群的app信息。 + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID,可选。传的话,过滤出适合此集群的app信息。 + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/UHadoop/Apis/ListUHadoopFrameworkAppResponse.php b/src/UHadoop/Apis/ListUHadoopFrameworkAppResponse.php new file mode 100644 index 0000000..2166c99 --- /dev/null +++ b/src/UHadoop/Apis/ListUHadoopFrameworkAppResponse.php @@ -0,0 +1,57 @@ +get("AppConfigSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AppConfigSet($item)); + } + return $result; + } + + /** + * AppConfigSet: 应用配置详情 + * + * @param AppConfigSet[] $appConfigSet + */ + public function setAppConfigSet(array $appConfigSet) + { + $result = []; + foreach ($appConfigSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHadoop/Apis/ListUHadoopInstanceRequest.php b/src/UHadoop/Apis/ListUHadoopInstanceRequest.php new file mode 100644 index 0000000..f19463e --- /dev/null +++ b/src/UHadoop/Apis/ListUHadoopInstanceRequest.php @@ -0,0 +1,130 @@ + "ListUHadoopInstance"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Limit: 获取列表的长度限制,默认值为60 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 获取列表的长度限制,默认值为60 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 获取列表的偏移,默认值为0 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 获取列表的偏移,默认值为0 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/UHadoop/Apis/ListUHadoopInstanceResponse.php b/src/UHadoop/Apis/ListUHadoopInstanceResponse.php new file mode 100644 index 0000000..f460070 --- /dev/null +++ b/src/UHadoop/Apis/ListUHadoopInstanceResponse.php @@ -0,0 +1,77 @@ +get("ClusterSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ListClusterInfo($item)); + } + return $result; + } + + /** + * ClusterSet: 集群信息集合 + * + * @param ListClusterInfo[] $clusterSet + */ + public function setClusterSet(array $clusterSet) + { + $result = []; + foreach ($clusterSet as $i => $item) { + array_push($result, $item->getAll()); + } + 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/UHadoop/Apis/RestartUHadoopServiceRequest.php b/src/UHadoop/Apis/RestartUHadoopServiceRequest.php new file mode 100644 index 0000000..6019149 --- /dev/null +++ b/src/UHadoop/Apis/RestartUHadoopServiceRequest.php @@ -0,0 +1,233 @@ + "RestartUHadoopService"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ServiceName"); + $this->markRequired("InstanceId"); + } + + + + /** + * 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); + } + + /** + * ServiceName: 要操作的服务名。可通过ListUHadoopFrameworkApp接口获取 + * + * @return string|null + */ + public function getServiceName() + { + return $this->get("ServiceName"); + } + + /** + * ServiceName: 要操作的服务名。可通过ListUHadoopFrameworkApp接口获取 + * + * @param string $serviceName + */ + public function setServiceName($serviceName) + { + $this->set("ServiceName", $serviceName); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * ApplicationVersion: 应用版本,ApplicationVersion传参时,表示这次操作是整个应用所有服务。 + * + * @return string|null + */ + public function getApplicationVersion() + { + return $this->get("ApplicationVersion"); + } + + /** + * ApplicationVersion: 应用版本,ApplicationVersion传参时,表示这次操作是整个应用所有服务。 + * + * @param string $applicationVersion + */ + public function setApplicationVersion($applicationVersion) + { + $this->set("ApplicationVersion", $applicationVersion); + } + + /** + * OnlyStart: 只启动。值为false|true之一,默认false,当OnlyStart和OnlyStop同时置为true,则重启。 + * + * @return boolean|null + */ + public function getOnlyStart() + { + return $this->get("OnlyStart"); + } + + /** + * OnlyStart: 只启动。值为false|true之一,默认false,当OnlyStart和OnlyStop同时置为true,则重启。 + * + * @param boolean $onlyStart + */ + public function setOnlyStart($onlyStart) + { + $this->set("OnlyStart", $onlyStart); + } + + /** + * OnlyStop: 只停止。值为false|true之一,默认false。当OnlyStart和OnlyStop同时置为true,则重启。 + * + * @return boolean|null + */ + public function getOnlyStop() + { + return $this->get("OnlyStop"); + } + + /** + * OnlyStop: 只停止。值为false|true之一,默认false。当OnlyStart和OnlyStop同时置为true,则重启。 + * + * @param boolean $onlyStop + */ + public function setOnlyStop($onlyStop) + { + $this->set("OnlyStop", $onlyStop); + } + + /** + * NodeId: 要操作的NodeId数组。如果传入,则用于过滤操作哪些Node。 + * + * @return string[]|null + */ + public function getNodeId() + { + return $this->get("NodeId"); + } + + /** + * NodeId: 要操作的NodeId数组。如果传入,则用于过滤操作哪些Node。 + * + * @param string[] $nodeId + */ + public function setNodeId(array $nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * NodeRole: 要操作的NodeRole数组。如果传入,则用于过滤操作哪些Node。值为以下之一master|core|task + * + * @return string[]|null + */ + public function getNodeRole() + { + return $this->get("NodeRole"); + } + + /** + * NodeRole: 要操作的NodeRole数组。如果传入,则用于过滤操作哪些Node。值为以下之一master|core|task + * + * @param string[] $nodeRole + */ + public function setNodeRole(array $nodeRole) + { + $this->set("NodeRole", $nodeRole); + } +} diff --git a/src/UHadoop/Apis/RestartUHadoopServiceResponse.php b/src/UHadoop/Apis/RestartUHadoopServiceResponse.php new file mode 100644 index 0000000..6448ddb --- /dev/null +++ b/src/UHadoop/Apis/RestartUHadoopServiceResponse.php @@ -0,0 +1,44 @@ +get("State"); + } + + /** + * State: 当前执行状态,running(操作运行中)|success(操作成功)|failed(操作失败)|killed(操作被终止)。 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } +} diff --git a/src/UHadoop/Apis/UpgradeUHadoopNodeDiskRequest.php b/src/UHadoop/Apis/UpgradeUHadoopNodeDiskRequest.php new file mode 100644 index 0000000..4e83ed0 --- /dev/null +++ b/src/UHadoop/Apis/UpgradeUHadoopNodeDiskRequest.php @@ -0,0 +1,194 @@ + "UpgradeUHadoopNodeDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("NodeRole"); + $this->markRequired("DataDiskSize"); + $this->markRequired("InstanceId"); + } + + + + /** + * 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); + } + + /** + * NodeRole: 节点角色,值为master|core|task之一 + * + * @return string|null + */ + public function getNodeRole() + { + return $this->get("NodeRole"); + } + + /** + * NodeRole: 节点角色,值为master|core|task之一 + * + * @param string $nodeRole + */ + public function setNodeRole($nodeRole) + { + $this->set("NodeRole", $nodeRole); + } + + /** + * DataDiskSize: 新的数据盘磁盘大小 + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 新的数据盘磁盘大小 + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * NodeNames: 节点名称集合,当NodeRole不为master时必填 + * + * @return string[]|null + */ + public function getNodeNames() + { + return $this->get("NodeNames"); + } + + /** + * NodeNames: 节点名称集合,当NodeRole不为master时必填 + * + * @param string[] $nodeNames + */ + public function setNodeNames(array $nodeNames) + { + $this->set("NodeNames", $nodeNames); + } + + /** + * BootDiskSize: 系统盘磁盘大小,仅支持云盘裸金属机型(系统盘和数据盘数值同时增加、只会处理系统盘参数) + * + * @return integer|null + */ + public function getBootDiskSize() + { + return $this->get("BootDiskSize"); + } + + /** + * BootDiskSize: 系统盘磁盘大小,仅支持云盘裸金属机型(系统盘和数据盘数值同时增加、只会处理系统盘参数) + * + * @param int $bootDiskSize + */ + public function setBootDiskSize($bootDiskSize) + { + $this->set("BootDiskSize", $bootDiskSize); + } +} diff --git a/src/UHadoop/Apis/UpgradeUHadoopNodeDiskResponse.php b/src/UHadoop/Apis/UpgradeUHadoopNodeDiskResponse.php new file mode 100644 index 0000000..a018124 --- /dev/null +++ b/src/UHadoop/Apis/UpgradeUHadoopNodeDiskResponse.php @@ -0,0 +1,26 @@ + "UpgradeUHadoopNode"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("NodeRole"); + $this->markRequired("NodeType"); + $this->markRequired("InstanceId"); + } + + + + /** + * 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); + } + + /** + * NodeRole: 节点角色,支持"master"|"core"|"task" + * + * @return string|null + */ + public function getNodeRole() + { + return $this->get("NodeRole"); + } + + /** + * NodeRole: 节点角色,支持"master"|"core"|"task" + * + * @param string $nodeRole + */ + public function setNodeRole($nodeRole) + { + $this->set("NodeRole", $nodeRole); + } + + /** + * NodeType: 节点新机型,通过GetUHadoopNodeType接口获取 + * + * @return string|null + */ + public function getNodeType() + { + return $this->get("NodeType"); + } + + /** + * NodeType: 节点新机型,通过GetUHadoopNodeType接口获取 + * + * @param string $nodeType + */ + public function setNodeType($nodeType) + { + $this->set("NodeType", $nodeType); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * NodeNames: 节点名称,当NodeRole不为master时必填 + * + * @return string[]|null + */ + public function getNodeNames() + { + return $this->get("NodeNames"); + } + + /** + * NodeNames: 节点名称,当NodeRole不为master时必填 + * + * @param string[] $nodeNames + */ + public function setNodeNames(array $nodeNames) + { + $this->set("NodeNames", $nodeNames); + } +} diff --git a/src/UHadoop/Apis/UpgradeUHadoopNodeResponse.php b/src/UHadoop/Apis/UpgradeUHadoopNodeResponse.php new file mode 100644 index 0000000..7d1f0ac --- /dev/null +++ b/src/UHadoop/Apis/UpgradeUHadoopNodeResponse.php @@ -0,0 +1,26 @@ +get("AppName"); + } + + /** + * AppName: 需要安装的应用如:Hive,HBase, Spark,Hue,Pig等其他组件 + * + * @param string $appName + */ + public function setAppName($appName) + { + $this->set("AppName", $appName); + } + + /** + * AppVersion: 应用的版本号(0.13.1,0.98.6 等等) + * + * @return string|null + */ + public function getAppVersion() + { + return $this->get("AppVersion"); + } + + /** + * AppVersion: 应用的版本号(0.13.1,0.98.6 等等) + * + * @param string $appVersion + */ + public function setAppVersion($appVersion) + { + $this->set("AppVersion", $appVersion); + } + + /** + * AppStatus: 应用的状态(运行中)'Running'|(已停止)'Stopped'|(启动中)'Starting'|(停止中)'Stopping'|(启动失败)'StartFailed'|(停止失败)'StopFailed'|(安装中)'Installing'|(安装失败)'InstallFailed'|(未安装)'NotInstalled', + * + * @return string|null + */ + public function getAppStatus() + { + return $this->get("AppStatus"); + } + + /** + * AppStatus: 应用的状态(运行中)'Running'|(已停止)'Stopped'|(启动中)'Starting'|(停止中)'Stopping'|(启动失败)'StartFailed'|(停止失败)'StopFailed'|(安装中)'Installing'|(安装失败)'InstallFailed'|(未安装)'NotInstalled', + * + * @param string $appStatus + */ + public function setAppStatus($appStatus) + { + $this->set("AppStatus", $appStatus); + } +} diff --git a/src/UHadoop/Models/ClusterInfo.php b/src/UHadoop/Models/ClusterInfo.php new file mode 100644 index 0000000..afbeca5 --- /dev/null +++ b/src/UHadoop/Models/ClusterInfo.php @@ -0,0 +1,484 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * Tag: 集群Tag + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 集群Tag + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * InstanceName: 实例名称 + * + * @return string|null + */ + public function getInstanceName() + { + return $this->get("InstanceName"); + } + + /** + * InstanceName: 实例名称 + * + * @param string $instanceName + */ + public function setInstanceName($instanceName) + { + $this->set("InstanceName", $instanceName); + } + + /** + * Framework: 框架,值为'Hadoop'|'HDFS'|'MR'|'StarRocks'之一,框架,例如Hadoop|MR|HDFS|StarRocks Hadoop框架包含存储与计算服务 MR集群包含计算服务 HDFS只包含存储服务,StarRocks为StarRocks集群 + * + * @return string|null + */ + public function getFramework() + { + return $this->get("Framework"); + } + + /** + * Framework: 框架,值为'Hadoop'|'HDFS'|'MR'|'StarRocks'之一,框架,例如Hadoop|MR|HDFS|StarRocks Hadoop框架包含存储与计算服务 MR集群包含计算服务 HDFS只包含存储服务,StarRocks为StarRocks集群 + * + * @param string $framework + */ + public function setFramework($framework) + { + $this->set("Framework", $framework); + } + + /** + * 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); + } + + /** + * BusinessId: 业务组ID + * + * @return string|null + */ + public function getBusinessId() + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 业务组ID + * + * @param string $businessId + */ + public function setBusinessId($businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * ReleaseVersion: Uhadoop版本,值为 uhadoop 3.0|uhadoop 2.2|uhadoop 3.1 + * + * @return string|null + */ + public function getReleaseVersion() + { + return $this->get("ReleaseVersion"); + } + + /** + * ReleaseVersion: Uhadoop版本,值为 uhadoop 3.0|uhadoop 2.2|uhadoop 3.1 + * + * @param string $releaseVersion + */ + public function setReleaseVersion($releaseVersion) + { + $this->set("ReleaseVersion", $releaseVersion); + } + + /** + * HadoopVersion: Hadoop版本,值为 hadoop3.2.1-udh3.0|hadoop3.3.4-udh3.1|hadoop2.8.5-udh2.2 + * + * @return string|null + */ + public function getHadoopVersion() + { + return $this->get("HadoopVersion"); + } + + /** + * HadoopVersion: Hadoop版本,值为 hadoop3.2.1-udh3.0|hadoop3.3.4-udh3.1|hadoop2.8.5-udh2.2 + * + * @param string $hadoopVersion + */ + public function setHadoopVersion($hadoopVersion) + { + $this->set("HadoopVersion", $hadoopVersion); + } + + /** + * CreateTime: 创建时间 + * + * @return string|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param string $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ChargeType: 付费类型 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费类型 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * ExpireTime: 到期时间 + * + * @return string|null + */ + public function getExpireTime() + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 到期时间 + * + * @param string $expireTime + */ + public function setExpireTime($expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * State: 状态,值为以下其中之一,Running(运行中)|Creating(创建中)|CreateFailed(创建失败)|Deploying(部署中)|Updating(变更中) + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 状态,值为以下其中之一,Running(运行中)|Creating(创建中)|CreateFailed(创建失败)|Deploying(部署中)|Updating(变更中) + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * MasterCount: Master节点数量 + * + * @return string|null + */ + public function getMasterCount() + { + return $this->get("MasterCount"); + } + + /** + * MasterCount: Master节点数量 + * + * @param string $masterCount + */ + public function setMasterCount($masterCount) + { + $this->set("MasterCount", $masterCount); + } + + /** + * CoreCount: core节点数量 + * + * @return string|null + */ + public function getCoreCount() + { + return $this->get("CoreCount"); + } + + /** + * CoreCount: core节点数量 + * + * @param string $coreCount + */ + public function setCoreCount($coreCount) + { + $this->set("CoreCount", $coreCount); + } + + /** + * TaskCount: Task节点数量 + * + * @return string|null + */ + public function getTaskCount() + { + return $this->get("TaskCount"); + } + + /** + * TaskCount: Task节点数量 + * + * @param string $taskCount + */ + public function setTaskCount($taskCount) + { + $this->set("TaskCount", $taskCount); + } + + /** + * RunningTime: 运行时间 + * + * @return string|null + */ + public function getRunningTime() + { + return $this->get("RunningTime"); + } + + /** + * RunningTime: 运行时间 + * + * @param string $runningTime + */ + public function setRunningTime($runningTime) + { + $this->set("RunningTime", $runningTime); + } + + /** + * AppConfigSet: 组件集合 + * + * @return string|null + */ + public function getAppConfigSet() + { + return $this->get("AppConfigSet"); + } + + /** + * AppConfigSet: 组件集合 + * + * @param string $appConfigSet + */ + public function setAppConfigSet($appConfigSet) + { + $this->set("AppConfigSet", $appConfigSet); + } + + /** + * AppConfigCount: 组件数量 + * + * @return string|null + */ + public function getAppConfigCount() + { + return $this->get("AppConfigCount"); + } + + /** + * AppConfigCount: 组件数量 + * + * @param string $appConfigCount + */ + public function setAppConfigCount($appConfigCount) + { + $this->set("AppConfigCount", $appConfigCount); + } + + /** + * IsOpenSecGroup: 是否开启安全组 + * + * @return string|null + */ + public function getIsOpenSecGroup() + { + return $this->get("IsOpenSecGroup"); + } + + /** + * IsOpenSecGroup: 是否开启安全组 + * + * @param string $isOpenSecGroup + */ + public function setIsOpenSecGroup($isOpenSecGroup) + { + $this->set("IsOpenSecGroup", $isOpenSecGroup); + } + + /** + * NodeSet: 节点集合 + * + * @return string|null + */ + public function getNodeSet() + { + return $this->get("NodeSet"); + } + + /** + * NodeSet: 节点集合 + * + * @param string $nodeSet + */ + public function setNodeSet($nodeSet) + { + $this->set("NodeSet", $nodeSet); + } + + /** + * NodeCount: 节点数量 + * + * @return string|null + */ + public function getNodeCount() + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 节点数量 + * + * @param string $nodeCount + */ + public function setNodeCount($nodeCount) + { + $this->set("NodeCount", $nodeCount); + } +} diff --git a/src/UHadoop/Models/DiskSet.php b/src/UHadoop/Models/DiskSet.php new file mode 100644 index 0000000..c894063 --- /dev/null +++ b/src/UHadoop/Models/DiskSet.php @@ -0,0 +1,204 @@ +get("Size"); + } + + /** + * Size: 总磁盘大小 + * + * @param int $size + */ + public function setSize($size) + { + $this->set("Size", $size); + } + + /** + * Type: 磁盘角色,分Data数据盘和Boot系统盘 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 磁盘角色,分Data数据盘和Boot系统盘 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * DiskType: 可支持的磁盘类型 + * + * @return string[]|null + */ + public function getDiskType() + { + return $this->get("DiskType"); + } + + /** + * DiskType: 可支持的磁盘类型 + * + * @param string[] $diskType + */ + public function setDiskType(array $diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * SingleDiskSize: 单块盘大小 + * + * @return integer|null + */ + public function getSingleDiskSize() + { + return $this->get("SingleDiskSize"); + } + + /** + * SingleDiskSize: 单块盘大小 + * + * @param int $singleDiskSize + */ + public function setSingleDiskSize($singleDiskSize) + { + $this->set("SingleDiskSize", $singleDiskSize); + } + + /** + * DiskNum: 磁盘数量 + * + * @return integer|null + */ + public function getDiskNum() + { + return $this->get("DiskNum"); + } + + /** + * DiskNum: 磁盘数量 + * + * @param int $diskNum + */ + public function setDiskNum($diskNum) + { + $this->set("DiskNum", $diskNum); + } + + /** + * DiskMaxNum: 最大磁盘数量 + * + * @return string|null + */ + public function getDiskMaxNum() + { + return $this->get("DiskMaxNum"); + } + + /** + * DiskMaxNum: 最大磁盘数量 + * + * @param string $diskMaxNum + */ + public function setDiskMaxNum($diskMaxNum) + { + $this->set("DiskMaxNum", $diskMaxNum); + } + + /** + * DiskMaxSize: 最大单块盘容量,单位GB + * + * @return string|null + */ + public function getDiskMaxSize() + { + return $this->get("DiskMaxSize"); + } + + /** + * DiskMaxSize: 最大单块盘容量,单位GB + * + * @param string $diskMaxSize + */ + public function setDiskMaxSize($diskMaxSize) + { + $this->set("DiskMaxSize", $diskMaxSize); + } + + /** + * DiskMinNum: 最小磁盘数量 + * + * @return string|null + */ + public function getDiskMinNum() + { + return $this->get("DiskMinNum"); + } + + /** + * DiskMinNum: 最小磁盘数量 + * + * @param string $diskMinNum + */ + public function setDiskMinNum($diskMinNum) + { + $this->set("DiskMinNum", $diskMinNum); + } + + /** + * DiskMinSize: 最小单块盘容量,单位GB + * + * @return string|null + */ + public function getDiskMinSize() + { + return $this->get("DiskMinSize"); + } + + /** + * DiskMinSize: 最小单块盘容量,单位GB + * + * @param string $diskMinSize + */ + public function setDiskMinSize($diskMinSize) + { + $this->set("DiskMinSize", $diskMinSize); + } +} diff --git a/src/UHadoop/Models/InstanceType.php b/src/UHadoop/Models/InstanceType.php new file mode 100644 index 0000000..58dc412 --- /dev/null +++ b/src/UHadoop/Models/InstanceType.php @@ -0,0 +1,256 @@ +get("NodeType"); + } + + /** + * NodeType: 机型名称 + * + * @param string $nodeType + */ + public function setNodeType($nodeType) + { + $this->set("NodeType", $nodeType); + } + + /** + * HostType: 机型种类,可选Outstanding(快杰机型)|General(普通机型)|BareMetal(裸金属机型)|GPU(GPU机型)四种类型 + * + * @return string|null + */ + public function getHostType() + { + return $this->get("HostType"); + } + + /** + * HostType: 机型种类,可选Outstanding(快杰机型)|General(普通机型)|BareMetal(裸金属机型)|GPU(GPU机型)四种类型 + * + * @param string $hostType + */ + public function setHostType($hostType) + { + $this->set("HostType", $hostType); + } + + /** + * SuitableRole: 可用的节点类型,值为core|task|master之一 + * + * @return string[]|null + */ + public function getSuitableRole() + { + return $this->get("SuitableRole"); + } + + /** + * SuitableRole: 可用的节点类型,值为core|task|master之一 + * + * @param string[] $suitableRole + */ + public function setSuitableRole(array $suitableRole) + { + $this->set("SuitableRole", $suitableRole); + } + + /** + * CPU: cpu大小 + * + * @return string|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: cpu大小 + * + * @param string $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * CPUToMemoryRatio: cpu内存比 + * + * @return string|null + */ + public function getCPUToMemoryRatio() + { + return $this->get("CPUToMemoryRatio"); + } + + /** + * CPUToMemoryRatio: cpu内存比 + * + * @param string $cpuToMemoryRatio + */ + public function setCPUToMemoryRatio($cpuToMemoryRatio) + { + $this->set("CPUToMemoryRatio", $cpuToMemoryRatio); + } + + /** + * Memory: 内存大小 + * + * @return string|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小 + * + * @param string $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * DiskSet: 磁盘信息 + * + * @return DiskSet[]|null + */ + public function getDiskSet() + { + $items = $this->get("DiskSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new DiskSet($item)); + } + return $result; + } + + /** + * DiskSet: 磁盘信息 + * + * @param DiskSet[] $diskSet + */ + public function setDiskSet(array $diskSet) + { + $result = []; + foreach ($diskSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * IsUsable: 是否可用,该机型是否支持创建 + * + * @return string|null + */ + public function getIsUsable() + { + return $this->get("IsUsable"); + } + + /** + * IsUsable: 是否可用,该机型是否支持创建 + * + * @param string $isUsable + */ + public function setIsUsable($isUsable) + { + $this->set("IsUsable", $isUsable); + } + + /** + * IsOpenSecgroup: 是否支持开启安全组 + * + * @return string|null + */ + public function getIsOpenSecgroup() + { + return $this->get("IsOpenSecgroup"); + } + + /** + * IsOpenSecgroup: 是否支持开启安全组 + * + * @param string $isOpenSecgroup + */ + public function setIsOpenSecgroup($isOpenSecgroup) + { + $this->set("IsOpenSecgroup", $isOpenSecgroup); + } + + /** + * 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); + } + + /** + * GpuCount: GPU数量 + * + * @return integer|null + */ + public function getGpuCount() + { + return $this->get("GpuCount"); + } + + /** + * GpuCount: GPU数量 + * + * @param int $gpuCount + */ + public function setGpuCount($gpuCount) + { + $this->set("GpuCount", $gpuCount); + } +} diff --git a/src/UHadoop/Models/ListClusterInfo.php b/src/UHadoop/Models/ListClusterInfo.php new file mode 100644 index 0000000..c79aa64 --- /dev/null +++ b/src/UHadoop/Models/ListClusterInfo.php @@ -0,0 +1,244 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * InstanceName: 实例名称 + * + * @return string|null + */ + public function getInstanceName() + { + return $this->get("InstanceName"); + } + + /** + * InstanceName: 实例名称 + * + * @param string $instanceName + */ + public function setInstanceName($instanceName) + { + $this->set("InstanceName", $instanceName); + } + + /** + * Framework: 框架,值为'Hadoop'|'HDFS'|'MR'|'StarRocks'之一,Hadoop框架包含存储与计算服务,MR集群包含计算服务,HDFS只包含存储服务,StarRocks为StarRocks集群 + * + * @return string|null + */ + public function getFramework() + { + return $this->get("Framework"); + } + + /** + * Framework: 框架,值为'Hadoop'|'HDFS'|'MR'|'StarRocks'之一,Hadoop框架包含存储与计算服务,MR集群包含计算服务,HDFS只包含存储服务,StarRocks为StarRocks集群 + * + * @param string $framework + */ + public function setFramework($framework) + { + $this->set("Framework", $framework); + } + + /** + * 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); + } + + /** + * BusinessId: 业务组ID + * + * @return string|null + */ + public function getBusinessId() + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 业务组ID + * + * @param string $businessId + */ + public function setBusinessId($businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * ReleaseVersion: Uhadoop版本,值为 uhadoop 3.0|uhadoop 2.2|uhadoop 3.1 + * + * @return string|null + */ + public function getReleaseVersion() + { + return $this->get("ReleaseVersion"); + } + + /** + * ReleaseVersion: Uhadoop版本,值为 uhadoop 3.0|uhadoop 2.2|uhadoop 3.1 + * + * @param string $releaseVersion + */ + public function setReleaseVersion($releaseVersion) + { + $this->set("ReleaseVersion", $releaseVersion); + } + + /** + * HadoopVersion: Hadoop版本,值为 hadoop3.2.1-udh3.0|hadoop3.3.4-udh3.1 |hadoop2.8.5-udh2.2 + * + * @return string|null + */ + public function getHadoopVersion() + { + return $this->get("HadoopVersion"); + } + + /** + * HadoopVersion: Hadoop版本,值为 hadoop3.2.1-udh3.0|hadoop3.3.4-udh3.1 |hadoop2.8.5-udh2.2 + * + * @param string $hadoopVersion + */ + public function setHadoopVersion($hadoopVersion) + { + $this->set("HadoopVersion", $hadoopVersion); + } + + /** + * CreateTime: 创建时间 + * + * @return string|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param string $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * State: 状态,值为以下其中之一,Running(运行中)|Creating(创建中)|CreateFailed(创建失败)|Deploying(部署中)|Updating(变更中) + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 状态,值为以下其中之一,Running(运行中)|Creating(创建中)|CreateFailed(创建失败)|Deploying(部署中)|Updating(变更中) + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } +} diff --git a/src/UHadoop/UHadoopClient.php b/src/UHadoop/UHadoopClient.php new file mode 100644 index 0000000..b5d53ba --- /dev/null +++ b/src/UHadoop/UHadoopClient.php @@ -0,0 +1,453 @@ + (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NodeRole" => (string) 节点的角色,值为task|core|client之一 + * "NodeType" => (string) 机型,如:o.hadoop2m.medium,可从GetUHadoopNodeType接口获取 + * "InstanceId" => (string) 集群ID + * "DataDiskNum" => (string) 数据盘数量,非裸金属机型时必填 + * "Password" => (string) 密码,NodeRole为client时必填 + * "BootDiskSize" => (string) 系统盘容量,非裸金属机型必填 + * "BootDiskType" => (string) 系统盘类型,非裸金属机型必填,例如:CLOUD_RSSD + * "DataDiskSize" => (string) 数据盘容量,非裸金属机型必填 + * "DataDiskType" => (string) 数据盘类型,非裸金属机型必填,例如:CLOUD_RSSD + * "NodeCount" => (integer) 节点数量,默认为1 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return AddUHadoopInstanceNodeResponse + * @throws UCloudException + */ + public function addUHadoopInstanceNode(AddUHadoopInstanceNodeRequest $request = null) + { + $resp = $this->invoke($request); + return new AddUHadoopInstanceNodeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUHadoopInstance - 新建一个uhadoop集群 + * + * See also: https://docs.ucloud.cn/api/uhadoop-api/create_uhadoop_instance + * + * 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) + * "Password" => (string) 集群机器的登录密码 + * "FrameworkVersion" => (string) 版本,例如:3.2.1-udh3.0,通过ListUHadoopFrameworkApp接口获取 + * "InstanceGroupConfigs" => (array) 节点配置,里面包括NodeType(机型),NodeRole(节点类别,值为其中之一:master|core|task),Count(数量),DataDiskType(数据盘类别),DataDiskSize(数据盘大小),DataDiskNum(数据盘数量),BootDiskType(系统盘类型),BootDiskSize(系统盘大小),通过GetUHadoopNodeType接口获取,示例为:InstanceGroupConfigs.0.NodeType=o.hadoop2m.xlargeInstanceGroupConfigs.0.NodeRole=masterInstanceGroupConfigs.0.Count=2InstanceGroupConfigs.0.DataDiskType=CLOUD_RSSDInstanceGroupConfigs.0.DataDiskSize=100InstanceGroupConfigs.0.DataDiskNum=1InstanceGroupConfigs.0.BootDiskType=CLOUD_RSSDInstanceGroupConfigs.0.BootDiskSize=50InstanceGroupConfigs.1.NodeType=o.hadoop2m.xlargeInstanceGroupConfigs.1.NodeRole=coreInstanceGroupConfigs.1.Count=3InstanceGroupConfigs.1.DataDiskType=CLOUD_RSSDInstanceGroupConfigs.1.DataDiskSize=200InstanceGroupConfigs.1.DataDiskNum=1InstanceGroupConfigs.1.BootDiskType=CLOUD_RSSDInstanceGroupConfigs.1.BootDiskSize=50 + * "VPCId" => (string) VPCId + * "SubnetId" => (string) 子网ID + * "AppConfig" => (array) 集群需要安装的组件,格式:组件#版本通过ListUHadoopFrameworkApp接口获取,例如:Spark#3.3.0 + * "Framework" => (string) 框架名称,‘Hadoop’ | ‘HDFS’ | ‘MR‘|'‘StarRocks’,Hadoop框架包含存储与计算服务,MR集群包含计算服务 ,HDFS只包含存储服务 + * "ChargeType" => (string) 支付类别,默认:Month + * "Quantity" => (integer) 数量,默认1 + * "BusinessId" => (string) 工作组ID,默认Default + * "StorgeClusterId" => (string) Framework为‘MR’时,存储集群ID + * "StandAloneMetaStore" => (string) 目前只支持传‘udb’ + * "IsSecurityEnabled" => (string) 是否开启安全组 + * "SecGroupIds" => (string) 安全组ID,字符串数组,IsSecurityEnabled为true时生效 + * "US3Bucket" => (string) US3 bucket名称,仅支持框架为StarRocks存算分离时传入 + * "US3AccessKey" => (string) US3 配置公钥,仅支持框架为StarRocks存算分离时传入 + * "US3SecretKey" => (string) US3 配置私钥,仅支持框架为StarRocks存算分离时传入 + * "US3TokenName" => (string) US3 Token名称,仅支持框架为StarRocks存算分离时传入 + * "InstanceName" => (string) 实例名称,默认为实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * "InstanceId" => (string) 实例ID + * ] + * + * @return CreateUHadoopInstanceResponse + * @throws UCloudException + */ + public function createUHadoopInstance(CreateUHadoopInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUHadoopInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUHadoopInstance - 删除掉一个uhadoop集群 + * + * See also: https://docs.ucloud.cn/api/uhadoop-api/delete_uhadoop_instance + * + * 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) + * "InstanceId" => (string) 实例ID + * "ReleaseEIP" => (boolean) 是否释放绑定的EIP。true: 解绑EIP后,并释放;其他值或不填:解绑EIP。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteUHadoopInstanceResponse + * @throws UCloudException + */ + public function deleteUHadoopInstance(DeleteUHadoopInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUHadoopInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUHadoopInstance - 描述集群 + * + * See also: https://docs.ucloud.cn/api/uhadoop-api/describe_uhadoop_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "InstanceId" => (string) 实例ID + * "VPCId" => (string) VPCID + * "SubnetId" => (string) 子网ID + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterSet" => (array) 集群信息[ + * [ + * "Zone" => (string) 可用区 + * "Tag" => (string) 集群Tag + * "InstanceId" => (string) 实例ID + * "InstanceName" => (string) 实例名称 + * "Framework" => (string) 框架,值为'Hadoop'|'HDFS'|'MR'|'StarRocks'之一,框架,例如Hadoop|MR|HDFS|StarRocks Hadoop框架包含存储与计算服务 MR集群包含计算服务 HDFS只包含存储服务,StarRocks为StarRocks集群 + * "VPCId" => (string) VPC ID + * "SubnetId" => (string) 子网ID + * "BusinessId" => (string) 业务组ID + * "ReleaseVersion" => (string) Uhadoop版本,值为 uhadoop 3.0|uhadoop 2.2|uhadoop 3.1 + * "HadoopVersion" => (string) Hadoop版本,值为 hadoop3.2.1-udh3.0|hadoop3.3.4-udh3.1|hadoop2.8.5-udh2.2 + * "CreateTime" => (string) 创建时间 + * "ChargeType" => (string) 付费类型 + * "ExpireTime" => (string) 到期时间 + * "State" => (string) 状态,值为以下其中之一,Running(运行中)|Creating(创建中)|CreateFailed(创建失败)|Deploying(部署中)|Updating(变更中) + * "MasterCount" => (string) Master节点数量 + * "CoreCount" => (string) core节点数量 + * "TaskCount" => (string) Task节点数量 + * "RunningTime" => (string) 运行时间 + * "AppConfigSet" => (string) 组件集合 + * "AppConfigCount" => (string) 组件数量 + * "IsOpenSecGroup" => (string) 是否开启安全组 + * "NodeSet" => (string) 节点集合 + * "NodeCount" => (string) 节点数量 + * ] + * ] + * ] + * + * @return DescribeUHadoopInstanceResponse + * @throws UCloudException + */ + public function describeUHadoopInstance(DescribeUHadoopInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUHadoopInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUHadoopNodeType - 获取节点类型信息 + * + * See also: https://docs.ucloud.cn/api/uhadoop-api/get_uhadoop_node_type + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "FrameworkVersion" => (string) 框架版本,例如3.2.1-udh3.0,通过ListUHadoopFrameworkApp接口获取 + * "NodeRole" => (string) 角色,master|core|task + * "NodeType" => (string) 机型名称 + * "Framework" => (string) 框架,例如Hadoop|MR|HDFS|StarRocks,Hadoop框架包含存储与计算服务,MR集群包含计算服务,HDFS只包含存储服务,StarRocks为StarRocks集群 + * ] + * + * Outputs: + * + * $outputs = [ + * "InstanceTypeSet" => (array) 类型信息[ + * [ + * "NodeType" => (string) 机型名称 + * "HostType" => (string) 机型种类,可选Outstanding(快杰机型)|General(普通机型)|BareMetal(裸金属机型)|GPU(GPU机型)四种类型 + * "SuitableRole" => (array) 可用的节点类型,值为core|task|master之一 + * "CPU" => (string) cpu大小 + * "CPUToMemoryRatio" => (string) cpu内存比 + * "Memory" => (string) 内存大小 + * "DiskSet" => (array) 磁盘信息[ + * [ + * "Size" => (integer) 总磁盘大小 + * "Type" => (string) 磁盘角色,分Data数据盘和Boot系统盘 + * "DiskType" => (array) 可支持的磁盘类型 + * "SingleDiskSize" => (integer) 单块盘大小 + * "DiskNum" => (integer) 磁盘数量 + * "DiskMaxNum" => (string) 最大磁盘数量 + * "DiskMaxSize" => (string) 最大单块盘容量,单位GB + * "DiskMinNum" => (string) 最小磁盘数量 + * "DiskMinSize" => (string) 最小单块盘容量,单位GB + * ] + * ] + * "IsUsable" => (string) 是否可用,该机型是否支持创建 + * "IsOpenSecgroup" => (string) 是否支持开启安全组 + * "GpuType" => (string) GPU型号 + * "GpuCount" => (integer) GPU数量 + * ] + * ] + * "MetaDataUDBUsable" => (boolean) 当前可用区是否支持元数据库使用UDB + * "HostTypeSupportNodeType" => (string) 机型可支持的节点类型 + * ] + * + * @return GetUHadoopNodeTypeResponse + * @throws UCloudException + */ + public function getUHadoopNodeType(GetUHadoopNodeTypeRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUHadoopNodeTypeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUHadoopFrameworkApp - 列举可选app + * + * See also: https://docs.ucloud.cn/api/uhadoop-api/list_uhadoop_framework_app + * + * 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) + * "Framework" => (string) 框架,值为'Hadoop'|'HDFS'|'MR'|'StarRocks'之一,框架,例如Hadoop|MR|HDFS|StarRocks Hadoop框架包含存储与计算服务 MR集群包含计算服务 HDFS只包含存储服务,StarRocks为StarRocks集群 + * "InstanceId" => (string) 实例ID,可选。传的话,过滤出适合此集群的app信息。 + * ] + * + * Outputs: + * + * $outputs = [ + * "AppConfigSet" => (array) 应用配置详情[ + * [ + * "AppName" => (string) 需要安装的应用如:Hive,HBase, Spark,Hue,Pig等其他组件 + * "AppVersion" => (string) 应用的版本号(0.13.1,0.98.6 等等) + * "AppStatus" => (string) 应用的状态(运行中)'Running'|(已停止)'Stopped'|(启动中)'Starting'|(停止中)'Stopping'|(启动失败)'StartFailed'|(停止失败)'StopFailed'|(安装中)'Installing'|(安装失败)'InstallFailed'|(未安装)'NotInstalled', + * ] + * ] + * ] + * + * @return ListUHadoopFrameworkAppResponse + * @throws UCloudException + */ + public function listUHadoopFrameworkApp(ListUHadoopFrameworkAppRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUHadoopFrameworkAppResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUHadoopInstance - 列出用户所有的uhadoop集群 + * + * See also: https://docs.ucloud.cn/api/uhadoop-api/list_uhadoop_instance + * + * 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) + * "Limit" => (integer) 获取列表的长度限制,默认值为60 + * "Offset" => (integer) 获取列表的偏移,默认值为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterSet" => (array) 集群信息集合[ + * [ + * "Zone" => (string) 可用区 + * "InstanceId" => (string) 实例ID + * "InstanceName" => (string) 实例名称 + * "Framework" => (string) 框架,值为'Hadoop'|'HDFS'|'MR'|'StarRocks'之一,Hadoop框架包含存储与计算服务,MR集群包含计算服务,HDFS只包含存储服务,StarRocks为StarRocks集群 + * "VPCId" => (string) VPC ID + * "SubnetId" => (string) 子网ID + * "BusinessId" => (string) 业务组ID + * "ReleaseVersion" => (string) Uhadoop版本,值为 uhadoop 3.0|uhadoop 2.2|uhadoop 3.1 + * "HadoopVersion" => (string) Hadoop版本,值为 hadoop3.2.1-udh3.0|hadoop3.3.4-udh3.1 |hadoop2.8.5-udh2.2 + * "CreateTime" => (string) 创建时间 + * "State" => (string) 状态,值为以下其中之一,Running(运行中)|Creating(创建中)|CreateFailed(创建失败)|Deploying(部署中)|Updating(变更中) + * ] + * ] + * "TotalCount" => (integer) 总数 + * ] + * + * @return ListUHadoopInstanceResponse + * @throws UCloudException + */ + public function listUHadoopInstance(ListUHadoopInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUHadoopInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartUHadoopService - 重启集群服务(包含start|stop|restart) + * + * See also: https://docs.ucloud.cn/api/uhadoop-api/restart_uhadoop_service + * + * 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) + * "ServiceName" => (string) 要操作的服务名。可通过ListUHadoopFrameworkApp接口获取 + * "InstanceId" => (string) 实例ID + * "ApplicationVersion" => (string) 应用版本,ApplicationVersion传参时,表示这次操作是整个应用所有服务。 + * "OnlyStart" => (boolean) 只启动。值为false|true之一,默认false,当OnlyStart和OnlyStop同时置为true,则重启。 + * "OnlyStop" => (boolean) 只停止。值为false|true之一,默认false。当OnlyStart和OnlyStop同时置为true,则重启。 + * "NodeId" => (array) 要操作的NodeId数组。如果传入,则用于过滤操作哪些Node。 + * "NodeRole" => (array) 要操作的NodeRole数组。如果传入,则用于过滤操作哪些Node。值为以下之一master|core|task + * ] + * + * Outputs: + * + * $outputs = [ + * "State" => (string) 当前执行状态,running(操作运行中)|success(操作成功)|failed(操作失败)|killed(操作被终止)。 + * ] + * + * @return RestartUHadoopServiceResponse + * @throws UCloudException + */ + public function restartUHadoopService(RestartUHadoopServiceRequest $request = null) + { + $resp = $this->invoke($request); + return new RestartUHadoopServiceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpgradeUHadoopNode - 升级uhadoop节点 + * + * See also: https://docs.ucloud.cn/api/uhadoop-api/upgrade_uhadoop_node + * + * 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) + * "NodeRole" => (string) 节点角色,支持"master"|"core"|"task" + * "NodeType" => (string) 节点新机型,通过GetUHadoopNodeType接口获取 + * "InstanceId" => (string) 实例ID + * "NodeNames" => (array) 节点名称,当NodeRole不为master时必填 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpgradeUHadoopNodeResponse + * @throws UCloudException + */ + public function upgradeUHadoopNode(UpgradeUHadoopNodeRequest $request = null) + { + $resp = $this->invoke($request); + return new UpgradeUHadoopNodeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpgradeUHadoopNodeDisk - 扩容集群节点磁盘 + * + * See also: https://docs.ucloud.cn/api/uhadoop-api/upgrade_uhadoop_node_disk + * + * 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) + * "NodeRole" => (string) 节点角色,值为master|core|task之一 + * "DataDiskSize" => (integer) 新的数据盘磁盘大小 + * "InstanceId" => (string) 实例ID + * "NodeNames" => (array) 节点名称集合,当NodeRole不为master时必填 + * "BootDiskSize" => (integer) 系统盘磁盘大小,仅支持云盘裸金属机型(系统盘和数据盘数值同时增加、只会处理系统盘参数) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpgradeUHadoopNodeDiskResponse + * @throws UCloudException + */ + public function upgradeUHadoopNodeDisk(UpgradeUHadoopNodeDiskRequest $request = null) + { + $resp = $this->invoke($request); + return new UpgradeUHadoopNodeDiskResponse($resp->toArray(), $resp->getRequestId()); + } +}