diff --git a/VERSION b/VERSION index 42045aca..f9a4b5f9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.4 +0.3.20 diff --git a/docs/quickstart.md b/docs/quickstart.md index 38c772fe..d34de139 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -67,10 +67,10 @@ SDK 中的每一个 api 调用都有详细的注释文档, - [通用配置](configure.md),了解如何配置 SDK,如日志、重试、服务访问端点(公有云、专有云)等 - [错误处理](error.md),了解如何处理不同类型的 SDK 异常,包括参数错误,RetCode 不为 0 的业务异常等 -- [类型系统](typesystem.md),了解 SDK 如何校验参数,并规范化 API 的返回值。 - [请求中间件](middleware.md),了解如何拦截 SDK 发起的请求,并统一添加额外的逻辑。 - [泛化调用](generic.md),如何调用 SDK 尚未支持的 API(不建议使用此类 API,因为没有兼容性保证) + ## 获取更多示例 ### 基于场景的示例 diff --git a/src/Core/Logger/compatibility/DefaultLoggerPsrLogV3.php b/src/Core/Logger/compatibility/DefaultLoggerPsrLogV3.php index 45808829..39bde469 100644 --- a/src/Core/Logger/compatibility/DefaultLoggerPsrLogV3.php +++ b/src/Core/Logger/compatibility/DefaultLoggerPsrLogV3.php @@ -9,8 +9,7 @@ public function log( $level, string|\Stringable $message, array $context = [] - ): void - { + ): void { $line = $level . " " . $message; if (!empty($context)) { $line = " " . json_encode($context, JSON_PRETTY_PRINT); diff --git a/src/Core/Logger/compatibility/DisabledLoggerPsrLogV3.php b/src/Core/Logger/compatibility/DisabledLoggerPsrLogV3.php index 5c1195b0..d3b7a093 100644 --- a/src/Core/Logger/compatibility/DisabledLoggerPsrLogV3.php +++ b/src/Core/Logger/compatibility/DisabledLoggerPsrLogV3.php @@ -9,8 +9,7 @@ public function log( $level, string|\Stringable $message, array $context = [] - ): void - { + ): void { // Do nothing } } diff --git a/src/UClickhouse/Apis/CreateUClickhouseClusterRequest.php b/src/UClickhouse/Apis/CreateUClickhouseClusterRequest.php new file mode 100644 index 00000000..bc3f6e06 --- /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 00000000..df22e524 --- /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 00000000..58932bb8 --- /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 00000000..eccfe6de --- /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 00000000..c30b54de --- /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 00000000..3d13349a --- /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 00000000..a1fb2936 --- /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 00000000..77930e44 --- /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 00000000..36b5b22a --- /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 00000000..db85f882 --- /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 00000000..5e22fa94 --- /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 00000000..d821f446 --- /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 00000000..8136ebcc --- /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 00000000..336406f1 --- /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 00000000..ef817f0f --- /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 00000000..a9769024 --- /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 00000000..624dc505 --- /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 00000000..a812007d --- /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 00000000..51bcf60a --- /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 00000000..189b642d --- /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 00000000..fd0c4bef --- /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 00000000..e89f5447 --- /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 00000000..9cb7c003 --- /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 00000000..f59065e2 --- /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 00000000..27c78853 --- /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 00000000..6372083b --- /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/UDB/Apis/BackupUDBInstanceBinlogRequest.php b/src/UDB/Apis/BackupUDBInstanceBinlogRequest.php index 1480a582..e83c9db8 100644 --- a/src/UDB/Apis/BackupUDBInstanceBinlogRequest.php +++ b/src/UDB/Apis/BackupUDBInstanceBinlogRequest.php @@ -1,6 +1,6 @@ set("BackupDuration", $backupDuration); } - /** - * UseSSD: 是否使用SSD,默认为true - * - * @return boolean|null - */ - public function getUseSSD() - { - return $this->get("UseSSD"); - } - - /** - * UseSSD: 是否使用SSD,默认为true - * - * @param boolean $useSSD - */ - public function setUseSSD($useSSD) - { - $this->set("UseSSD", $useSSD); - } - - /** - * SSDType: SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 - * - * @return string|null - */ - public function getSSDType() - { - return $this->get("SSDType"); - } - - /** - * SSDType: SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 - * - * @param string $ssdType - */ - public function setSSDType($ssdType) - { - $this->set("SSDType", $ssdType); - } - /** * CPU: cpu核数 * @@ -416,26 +376,6 @@ public function setCPU($cpu) $this->set("CPU", $cpu); } - /** - * InstanceType: UDB数据库机型 - * - * @return string|null - */ - public function getInstanceType() - { - return $this->get("InstanceType"); - } - - /** - * InstanceType: UDB数据库机型 - * - * @param string $instanceType - */ - public function setInstanceType($instanceType) - { - $this->set("InstanceType", $instanceType); - } - /** * SubnetId: 子网ID * diff --git a/src/UDB/Apis/CreateMongoDBReplicaSetResponse.php b/src/UDB/Apis/CreateMongoDBReplicaSetResponse.php index ff3ca74d..cd5602e0 100644 --- a/src/UDB/Apis/CreateMongoDBReplicaSetResponse.php +++ b/src/UDB/Apis/CreateMongoDBReplicaSetResponse.php @@ -1,6 +1,6 @@ set("EnableIpV6", $enableIpV6); } + /** + * Tables: 指定需要恢复的表, 如果指定该字段则回档实例只有指定的表数据,格式为(库名.表名), 指定多个用逗号隔开,eg: [ udb.test, mysql_school.my_student] + * + * @return string|null + */ + public function getTables() + { + return $this->get("Tables"); + } + + /** + * Tables: 指定需要恢复的表, 如果指定该字段则回档实例只有指定的表数据,格式为(库名.表名), 指定多个用逗号隔开,eg: [ udb.test, mysql_school.my_student] + * + * @param string $tables + */ + public function setTables($tables) + { + $this->set("Tables", $tables); + } + + /** + * AdminPassword: 管理员密码 (指定库表回档到新实例时有效) + * + * @return string|null + */ + public function getAdminPassword() + { + return $this->get("AdminPassword"); + } + + /** + * AdminPassword: 管理员密码 (指定库表回档到新实例时有效) + * + * @param string $adminPassword + */ + public function setAdminPassword($adminPassword) + { + $this->set("AdminPassword", $adminPassword); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @return integer|null + */ + public function getSpecificationType() + { + return $this->get("SpecificationType"); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @param int $specificationType + */ + public function setSpecificationType($specificationType) + { + $this->set("SpecificationType", $specificationType); + } + + /** + * MachineType: 规格类型ID,当SpecificationType为1时有效 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 规格类型ID,当SpecificationType为1时有效 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + /** * CouponId: 使用的代金券id * diff --git a/src/UDB/Apis/CreateUDBInstanceByRecoveryResponse.php b/src/UDB/Apis/CreateUDBInstanceByRecoveryResponse.php index ff4676e6..babbb8c0 100644 --- a/src/UDB/Apis/CreateUDBInstanceByRecoveryResponse.php +++ b/src/UDB/Apis/CreateUDBInstanceByRecoveryResponse.php @@ -1,6 +1,6 @@ markRequired("Port"); $this->markRequired("DiskSpace"); $this->markRequired("ParamGroupId"); - $this->markRequired("MemoryLimit"); } /** - * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @return string|null */ @@ -47,7 +47,7 @@ public function getRegion() } /** - * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @param string $region */ @@ -57,7 +57,7 @@ public function setRegion($region) } /** - * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @return string|null */ @@ -67,7 +67,7 @@ public function getZone() } /** - * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @param string $zone */ @@ -77,7 +77,7 @@ public function setZone($zone) } /** - * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * * @return string|null */ @@ -87,7 +87,7 @@ public function getProjectId() } /** - * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * * @param string $projectId */ @@ -137,7 +137,7 @@ public function setAdminPassword($adminPassword) } /** - * DBTypeId: DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6,14:postgresql-10.4 + * DBTypeId: DB类型,mysql/sqlserver按版本细分 mysql-8.0, mysql-5.6, percona-5.6, mysql-5.7, percona-5.7, sqlserver-2017 * * @return string|null */ @@ -147,7 +147,7 @@ public function getDBTypeId() } /** - * DBTypeId: DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6,14:postgresql-10.4 + * DBTypeId: DB类型,mysql/sqlserver按版本细分 mysql-8.0, mysql-5.6, percona-5.6, mysql-5.7, percona-5.7, sqlserver-2017 * * @param string $dbTypeId */ @@ -157,7 +157,7 @@ public function setDBTypeId($dbTypeId) } /** - * Port: 端口号,mysql默认3306,mongodb默认27017,postgresql默认5432 + * Port: 端口号,mysql默认3306,sqlserver默认1433 * * @return integer|null */ @@ -167,7 +167,7 @@ public function getPort() } /** - * Port: 端口号,mysql默认3306,mongodb默认27017,postgresql默认5432 + * Port: 端口号,mysql默认3306,sqlserver默认1433 * * @param int $port */ @@ -217,7 +217,7 @@ public function setParamGroupId($paramGroupId) } /** - * MemoryLimit: 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * MemoryLimit: 内存限制(MB)(待废弃,请通过指定MachineType和SpecificationType创建),目前支持以下几档 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M * * @return integer|null */ @@ -227,7 +227,7 @@ public function getMemoryLimit() } /** - * MemoryLimit: 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * MemoryLimit: 内存限制(MB)(待废弃,请通过指定MachineType和SpecificationType创建),目前支持以下几档 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M * * @param int $memoryLimit */ @@ -377,27 +377,27 @@ public function setBackupId($backupId) } /** - * UseSSD: 是否使用SSD,默认为true。目前主要可用区、海外机房、新机房只提供SSD资源,非SSD资源不再提供。 + * InstanceType: 对于快杰机型,请使用最新的 SpecificationClass 和 StorageClass 字段进行创建。目前仅有少量地域支持 SATA_SSD 存储类型;若创建的是 SATA_SSD 机型,可通过该字段指定。字段说明:SATA_SSD:SATA SSD 机型(仅部分地域支持)NVMe_SSD:快杰机型 * - * @return boolean|null + * @return string|null */ - public function getUseSSD() + public function getInstanceType() { - return $this->get("UseSSD"); + return $this->get("InstanceType"); } /** - * UseSSD: 是否使用SSD,默认为true。目前主要可用区、海外机房、新机房只提供SSD资源,非SSD资源不再提供。 + * InstanceType: 对于快杰机型,请使用最新的 SpecificationClass 和 StorageClass 字段进行创建。目前仅有少量地域支持 SATA_SSD 存储类型;若创建的是 SATA_SSD 机型,可通过该字段指定。字段说明:SATA_SSD:SATA SSD 机型(仅部分地域支持)NVMe_SSD:快杰机型 * - * @param boolean $useSSD + * @param string $instanceType */ - public function setUseSSD($useSSD) + public function setInstanceType($instanceType) { - $this->set("UseSSD", $useSSD); + $this->set("InstanceType", $instanceType); } /** - * SSDType: SSD类型,可选值为"SATA"、“NVMe”,如果UseSSD为true ,则必选 + * SSDType: 已废弃 * * @return string|null */ @@ -407,7 +407,7 @@ public function getSSDType() } /** - * SSDType: SSD类型,可选值为"SATA"、“NVMe”,如果UseSSD为true ,则必选 + * SSDType: 已废弃 * * @param string $ssdType */ @@ -437,27 +437,7 @@ public function setInstanceMode($instanceMode) } /** - * UDBCId: 专区ID信息(如果这个参数存在这说明是在专区中创建DB) - * - * @return string|null - */ - public function getUDBCId() - { - return $this->get("UDBCId"); - } - - /** - * UDBCId: 专区ID信息(如果这个参数存在这说明是在专区中创建DB) - * - * @param string $udbcId - */ - public function setUDBCId($udbcId) - { - $this->set("UDBCId", $udbcId); - } - - /** - * CPU: cpu核数 + * CPU: cpu核数,如果db类型为sqlserver,必传参数 * * @return integer|null */ @@ -467,7 +447,7 @@ public function getCPU() } /** - * CPU: cpu核数 + * CPU: cpu核数,如果db类型为sqlserver,必传参数 * * @param int $cpu */ @@ -477,7 +457,7 @@ public function setCPU($cpu) } /** - * BackupZone: 跨可用区高可用备库所在可用区,参见 [可用区列表](../summary/regionlist.html) + * BackupZone: 跨可用区高可用备库所在可用区,参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @return string|null */ @@ -487,7 +467,7 @@ public function getBackupZone() } /** - * BackupZone: 跨可用区高可用备库所在可用区,参见 [可用区列表](../summary/regionlist.html) + * BackupZone: 跨可用区高可用备库所在可用区,参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @param string $backupZone */ @@ -557,7 +537,7 @@ public function setDisableSemisync($disableSemisync) } /** - * ClusterRole: 当DB类型(DBTypeId)为mongodb时,需要指定mongo的角色,可选值为configsrv (配置节点),shardsrv (数据节点) + * ClusterRole: 已废弃 * * @return string|null */ @@ -567,7 +547,7 @@ public function getClusterRole() } /** - * ClusterRole: 当DB类型(DBTypeId)为mongodb时,需要指定mongo的角色,可选值为configsrv (配置节点),shardsrv (数据节点) + * ClusterRole: 已废弃 * * @param string $clusterRole */ @@ -577,63 +557,235 @@ public function setClusterRole($clusterRole) } /** - * HAArch: 高可用架构:1) haproxy(默认): 当前仅支持mysql。2) sentinel: 基于vip和哨兵节点的架构,当前支持mysql和pg。 + * Tag: 实例所在的业务组名称 * * @return string|null */ - public function getHAArch() + public function getTag() { - return $this->get("HAArch"); + return $this->get("Tag"); } /** - * HAArch: 高可用架构:1) haproxy(默认): 当前仅支持mysql。2) sentinel: 基于vip和哨兵节点的架构,当前支持mysql和pg。 + * Tag: 实例所在的业务组名称 * - * @param string $haArch + * @param string $tag */ - public function setHAArch($haArch) + public function setTag($tag) { - $this->set("HAArch", $haArch); + $this->set("Tag", $tag); } /** - * Tag: 实例所在的业务组名称 + * DBSubVersion: MySQL 小版本号,支持指定小版本进行创建,请通过 DescribeUDBType 接口获取可用版本。 * * @return string|null */ - public function getTag() + public function getDBSubVersion() { - return $this->get("Tag"); + return $this->get("DBSubVersion"); } /** - * Tag: 实例所在的业务组名称 + * DBSubVersion: MySQL 小版本号,支持指定小版本进行创建,请通过 DescribeUDBType 接口获取可用版本。 * - * @param string $tag + * @param string $dbSubVersion */ - public function setTag($tag) + public function setDBSubVersion($dbSubVersion) { - $this->set("Tag", $tag); + $this->set("DBSubVersion", $dbSubVersion); } /** - * EnableIpV6: 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + * CaseSensitivityParam: mysql大小写参数, 0 为大小写敏感, 1 为大小写不敏感, 目前只针对mysql8.0有效 * - * @return boolean|null + * @return integer|null + */ + public function getCaseSensitivityParam() + { + return $this->get("CaseSensitivityParam"); + } + + /** + * CaseSensitivityParam: mysql大小写参数, 0 为大小写敏感, 1 为大小写不敏感, 目前只针对mysql8.0有效 + * + * @param int $caseSensitivityParam + */ + public function setCaseSensitivityParam($caseSensitivityParam) + { + $this->set("CaseSensitivityParam", $caseSensitivityParam); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @return string|null + */ + public function getSpecificationType() + { + return $this->get("SpecificationType"); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @param string $specificationType + */ + public function setSpecificationType($specificationType) + { + $this->set("SpecificationType", $specificationType); + } + + /** + * MachineType: 规格类型 ID,当 SpecificationType = 1 时生效,请通过 ListUDBMachineType 接口获取。 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 规格类型 ID,当 SpecificationType = 1 时生效,请通过 ListUDBMachineType 接口获取。 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * AlarmTemplateId: 告警模版id + * + * @return string|null + */ + public function getAlarmTemplateId() + { + return $this->get("AlarmTemplateId"); + } + + /** + * AlarmTemplateId: 告警模版id + * + * @param string $alarmTemplateId + */ + public function setAlarmTemplateId($alarmTemplateId) + { + $this->set("AlarmTemplateId", $alarmTemplateId); + } + + /** + * BackupURL: 备份文件的US3内网下载地址 + * + * @return string|null + */ + public function getBackupURL() + { + return $this->get("BackupURL"); + } + + /** + * BackupURL: 备份文件的US3内网下载地址 + * + * @param string $backupURL + */ + public function setBackupURL($backupURL) + { + $this->set("BackupURL", $backupURL); + } + + /** + * StorageClass: 存储类型 CLOUD_SSD: SSD云盘, CLOUD_RSSD: RSSD 云盘, CLOUD_SSD_ESSENTIAL: SSD Essential云盘 ,该字段和SpecificationClass组合优先级比InstanceType字段高 + * + * @return string|null + */ + public function getStorageClass() + { + return $this->get("StorageClass"); + } + + /** + * StorageClass: 存储类型 CLOUD_SSD: SSD云盘, CLOUD_RSSD: RSSD 云盘, CLOUD_SSD_ESSENTIAL: SSD Essential云盘 ,该字段和SpecificationClass组合优先级比InstanceType字段高 + * + * @param string $storageClass + */ + public function setStorageClass($storageClass) + { + $this->set("StorageClass", $storageClass); + } + + /** + * SpecificationClass: 规格类型 O: NVMe型, OM: 共享型,N: 通用型 + * + * @return string|null + */ + public function getSpecificationClass() + { + return $this->get("SpecificationClass"); + } + + /** + * SpecificationClass: 规格类型 O: NVMe型, OM: 共享型,N: 通用型 + * + * @param string $specificationClass + */ + public function setSpecificationClass($specificationClass) + { + $this->set("SpecificationClass", $specificationClass); + } + + /** + * SemisyncFlag: 半同步开启开关 1:表示开启半同步,2:表示关闭半同步,0:表示默认值,默认也是开启半同步 + * + * @return integer|null + */ + public function getSemisyncFlag() + { + return $this->get("SemisyncFlag"); + } + + /** + * SemisyncFlag: 半同步开启开关 1:表示开启半同步,2:表示关闭半同步,0:表示默认值,默认也是开启半同步 + * + * @param int $semisyncFlag + */ + public function setSemisyncFlag($semisyncFlag) + { + $this->set("SemisyncFlag", $semisyncFlag); + } + + /** + * Labels: + * + * @return CreateUDBInstanceParamLabels[]|null */ - public function getEnableIpV6() + public function getLabels() { - return $this->get("EnableIpV6"); + $items = $this->get("Labels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUDBInstanceParamLabels($item)); + } + return $result; } /** - * EnableIpV6: 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + * Labels: * - * @param boolean $enableIpV6 + * @param CreateUDBInstanceParamLabels[] $labels */ - public function setEnableIpV6($enableIpV6) + public function setLabels(array $labels) { - $this->set("EnableIpV6", $enableIpV6); + $result = []; + foreach ($labels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; } /** diff --git a/src/UDB/Apis/CreateUDBInstanceResponse.php b/src/UDB/Apis/CreateUDBInstanceResponse.php index 0c772195..ea282337 100644 --- a/src/UDB/Apis/CreateUDBInstanceResponse.php +++ b/src/UDB/Apis/CreateUDBInstanceResponse.php @@ -1,6 +1,6 @@ "CreateUDBMySQLInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $this->markRequired("AdminPassword"); + $this->markRequired("DBTypeId"); + $this->markRequired("Port"); + $this->markRequired("DiskSpace"); + $this->markRequired("ParamGroupId"); + $this->markRequired("MachineType"); + $this->markRequired("StorageClass"); + $this->markRequired("SpecificationClass"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 实例名称,至少6位 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 实例名称,至少6位 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * AdminPassword: 管理员密码 + * + * @return string|null + */ + public function getAdminPassword() + { + return $this->get("AdminPassword"); + } + + /** + * AdminPassword: 管理员密码 + * + * @param string $adminPassword + */ + public function setAdminPassword($adminPassword) + { + $this->set("AdminPassword", $adminPassword); + } + + /** + * DBTypeId: DB类型,mysql按版本细分 mysql-8.4, mysql-8.0, mysql-5.7, percona-5.7, mysql-5.6, percona-5.6、mysql-5.5 + * + * @return string|null + */ + public function getDBTypeId() + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: DB类型,mysql按版本细分 mysql-8.4, mysql-8.0, mysql-5.7, percona-5.7, mysql-5.6, percona-5.6、mysql-5.5 + * + * @param string $dbTypeId + */ + public function setDBTypeId($dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * Port: 端口号,mysql默认3306 + * + * @return integer|null + */ + public function getPort() + { + return $this->get("Port"); + } + + /** + * Port: 端口号,mysql默认3306 + * + * @param int $port + */ + public function setPort($port) + { + $this->set("Port", $port); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 32T + * + * @return integer|null + */ + public function getDiskSpace() + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 32T + * + * @param int $diskSpace + */ + public function setDiskSpace($diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id + * + * @return integer|null + */ + public function getParamGroupId() + { + return $this->get("ParamGroupId"); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id + * + * @param int $paramGroupId + */ + public function setParamGroupId($paramGroupId) + { + $this->set("ParamGroupId", $paramGroupId); + } + + /** + * MachineType: 规格类型 ID,请通过 ListUDBMachineType 接口获取,返回体中的ID字段为MachineType的值。 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 规格类型 ID,请通过 ListUDBMachineType 接口获取,返回体中的ID字段为MachineType的值。 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * StorageClass: 存储类型 CLOUD_RSSD: RSSD 云盘, CLOUD_SSD_ESSENTIAL: SSD Essential云盘 ,该字段和SpecificationClass组合使用,CLOUD_RSSD对应O型,CLOUD_SSD_ESSENTIAL对应OM型(北京2、乌兰察布支持),注:圣保罗、丹佛、哈萨克斯坦地域仅支持O2机型,CLOUD_RSSD对应O2型 + * + * @return string|null + */ + public function getStorageClass() + { + return $this->get("StorageClass"); + } + + /** + * StorageClass: 存储类型 CLOUD_RSSD: RSSD 云盘, CLOUD_SSD_ESSENTIAL: SSD Essential云盘 ,该字段和SpecificationClass组合使用,CLOUD_RSSD对应O型,CLOUD_SSD_ESSENTIAL对应OM型(北京2、乌兰察布支持),注:圣保罗、丹佛、哈萨克斯坦地域仅支持O2机型,CLOUD_RSSD对应O2型 + * + * @param string $storageClass + */ + public function setStorageClass($storageClass) + { + $this->set("StorageClass", $storageClass); + } + + /** + * SpecificationClass: 规格类型 O: NVMe型, O2: O2 ,OM: 共享型 + * + * @return string|null + */ + public function getSpecificationClass() + { + return $this->get("SpecificationClass"); + } + + /** + * SpecificationClass: 规格类型 O: NVMe型, O2: O2 ,OM: 共享型 + * + * @param string $specificationClass + */ + public function setSpecificationClass($specificationClass) + { + $this->set("SpecificationClass", $specificationClass); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Month + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: 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); + } + + /** + * BackupCount: 备份策略,每周备份数量,默认7次 + * + * @return integer|null + */ + public function getBackupCount() + { + return $this->get("BackupCount"); + } + + /** + * BackupCount: 备份策略,每周备份数量,默认7次 + * + * @param int $backupCount + */ + public function setBackupCount($backupCount) + { + $this->set("BackupCount", $backupCount); + } + + /** + * BackupTime: 备份策略,备份开始时间,单位小时计,默认1点 + * + * @return integer|null + */ + public function getBackupTime() + { + return $this->get("BackupTime"); + } + + /** + * BackupTime: 备份策略,备份开始时间,单位小时计,默认1点 + * + * @param int $backupTime + */ + public function setBackupTime($backupTime) + { + $this->set("BackupTime", $backupTime); + } + + /** + * BackupDuration: 备份策略,备份时间间隔,单位小时计,默认24小时 + * + * @return integer|null + */ + public function getBackupDuration() + { + return $this->get("BackupDuration"); + } + + /** + * BackupDuration: 备份策略,备份时间间隔,单位小时计,默认24小时 + * + * @param int $backupDuration + */ + public function setBackupDuration($backupDuration) + { + $this->set("BackupDuration", $backupDuration); + } + + /** + * BackupId: 备份id,如果指定,则表明从备份恢复实例 + * + * @return integer|null + */ + public function getBackupId() + { + return $this->get("BackupId"); + } + + /** + * BackupId: 备份id,如果指定,则表明从备份恢复实例 + * + * @param int $backupId + */ + public function setBackupId($backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * + * @return string|null + */ + public function getInstanceMode() + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * + * @param string $instanceMode + */ + public function setInstanceMode($instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区,参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getBackupZone() + { + return $this->get("BackupZone"); + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区,参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $backupZone + */ + public function setBackupZone($backupZone) + { + $this->set("BackupZone", $backupZone); + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * DisableSemisync: 是否开启异步高可用,默认不填,可置为true + * + * @return boolean|null + */ + public function getDisableSemisync() + { + return $this->get("DisableSemisync"); + } + + /** + * DisableSemisync: 是否开启异步高可用,默认不填,可置为true + * + * @param boolean $disableSemisync + */ + public function setDisableSemisync($disableSemisync) + { + $this->set("DisableSemisync", $disableSemisync); + } + + /** + * Tag: 实例所在的业务组名称 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 实例所在的业务组名称 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * DBSubVersion: MySQL 小版本号,支持指定小版本进行创建,请通过 DescribeUDBType 接口获取可用版本。 + * + * @return string|null + */ + public function getDBSubVersion() + { + return $this->get("DBSubVersion"); + } + + /** + * DBSubVersion: MySQL 小版本号,支持指定小版本进行创建,请通过 DescribeUDBType 接口获取可用版本。 + * + * @param string $dbSubVersion + */ + public function setDBSubVersion($dbSubVersion) + { + $this->set("DBSubVersion", $dbSubVersion); + } + + /** + * CaseSensitivityParam: mysql大小写参数, 0 为大小写敏感, 1 为大小写不敏感, 目前只针对mysql8.0有效 + * + * @return integer|null + */ + public function getCaseSensitivityParam() + { + return $this->get("CaseSensitivityParam"); + } + + /** + * CaseSensitivityParam: mysql大小写参数, 0 为大小写敏感, 1 为大小写不敏感, 目前只针对mysql8.0有效 + * + * @param int $caseSensitivityParam + */ + public function setCaseSensitivityParam($caseSensitivityParam) + { + $this->set("CaseSensitivityParam", $caseSensitivityParam); + } + + /** + * AlarmTemplateId: 告警模版id + * + * @return string|null + */ + public function getAlarmTemplateId() + { + return $this->get("AlarmTemplateId"); + } + + /** + * AlarmTemplateId: 告警模版id + * + * @param string $alarmTemplateId + */ + public function setAlarmTemplateId($alarmTemplateId) + { + $this->set("AlarmTemplateId", $alarmTemplateId); + } + + /** + * BackupURL: 备份文件的US3内网下载地址 + * + * @return string|null + */ + public function getBackupURL() + { + return $this->get("BackupURL"); + } + + /** + * BackupURL: 备份文件的US3内网下载地址 + * + * @param string $backupURL + */ + public function setBackupURL($backupURL) + { + $this->set("BackupURL", $backupURL); + } + + /** + * SemisyncFlag: 半同步开启开关 1:表示开启半同步,2:表示关闭半同步,0:表示默认值,默认也是开启半同步 + * + * @return integer|null + */ + public function getSemisyncFlag() + { + return $this->get("SemisyncFlag"); + } + + /** + * SemisyncFlag: 半同步开启开关 1:表示开启半同步,2:表示关闭半同步,0:表示默认值,默认也是开启半同步 + * + * @param int $semisyncFlag + */ + public function setSemisyncFlag($semisyncFlag) + { + $this->set("SemisyncFlag", $semisyncFlag); + } + + /** + * Labels: + * + * @return CreateUDBMySQLInstanceParamLabels[]|null + */ + public function getLabels() + { + $items = $this->get("Labels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUDBMySQLInstanceParamLabels($item)); + } + return $result; + } + + /** + * Labels: + * + * @param CreateUDBMySQLInstanceParamLabels[] $labels + */ + public function setLabels(array $labels) + { + $result = []; + foreach ($labels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDB/Apis/CreateUDBMySQLInstanceResponse.php b/src/UDB/Apis/CreateUDBMySQLInstanceResponse.php new file mode 100644 index 00000000..ac7211c4 --- /dev/null +++ b/src/UDB/Apis/CreateUDBMySQLInstanceResponse.php @@ -0,0 +1,44 @@ +get("DBId"); + } + + /** + * DBId: BD实例id + * + * @param string $dbId + */ + public function setDBId($dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/CreateUDBParamGroupRequest.php b/src/UDB/Apis/CreateUDBParamGroupRequest.php index 8da8b848..23561d37 100644 --- a/src/UDB/Apis/CreateUDBParamGroupRequest.php +++ b/src/UDB/Apis/CreateUDBParamGroupRequest.php @@ -1,6 +1,6 @@ set("UseSSD", $useSSD); } + /** + * InstanceType: UDB数据库机型: "Normal": "标准机型" , "SATA_SSD": "SSD机型" , "PCIE_SSD": "SSD高性能机型" , "Normal_Volume": "标准大容量机型", "SATA_SSD_Volume": "SSD大容量机型" , "PCIE_SSD_Volume": "SSD高性能大容量机型", "NVMe_SSD": "快杰机型" + * + * @return string|null + */ + public function getInstanceType() + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: UDB数据库机型: "Normal": "标准机型" , "SATA_SSD": "SSD机型" , "PCIE_SSD": "SSD高性能机型" , "Normal_Volume": "标准大容量机型", "SATA_SSD_Volume": "SSD大容量机型" , "PCIE_SSD_Volume": "SSD高性能大容量机型", "NVMe_SSD": "快杰机型" + * + * @param string $instanceType + */ + public function setInstanceType($instanceType) + { + $this->set("InstanceType", $instanceType); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认和主库保持一致 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认和主库保持一致 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长,默认默认和主库保持一致 + * + * @return string|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,默认默认和主库保持一致 + * + * @param string $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + /** * CouponId: 使用的代金券id * diff --git a/src/UDB/Apis/CreateUDBReplicationInstanceResponse.php b/src/UDB/Apis/CreateUDBReplicationInstanceResponse.php index 76841e0a..bac4c95e 100644 --- a/src/UDB/Apis/CreateUDBReplicationInstanceResponse.php +++ b/src/UDB/Apis/CreateUDBReplicationInstanceResponse.php @@ -1,6 +1,6 @@ "CreateUDBSQLServerInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $this->markRequired("AdminPassword"); + $this->markRequired("DBTypeId"); + $this->markRequired("Port"); + $this->markRequired("DiskSpace"); + $this->markRequired("StorageClass"); + $this->markRequired("SpecificationClass"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 实例名称,至少6位 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 实例名称,至少6位 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * AdminPassword: 管理员密码 + * + * @return string|null + */ + public function getAdminPassword() + { + return $this->get("AdminPassword"); + } + + /** + * AdminPassword: 管理员密码 + * + * @param string $adminPassword + */ + public function setAdminPassword($adminPassword) + { + $this->set("AdminPassword", $adminPassword); + } + + /** + * DBTypeId: DB类型,SQL Server按版本细分 sqlserver-2017、sqlserver-2019、sqlserver-2022 + * + * @return string|null + */ + public function getDBTypeId() + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: DB类型,SQL Server按版本细分 sqlserver-2017、sqlserver-2019、sqlserver-2022 + * + * @param string $dbTypeId + */ + public function setDBTypeId($dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * Port: 端口号,sqlserver默认1433 + * + * @return integer|null + */ + public function getPort() + { + return $this->get("Port"); + } + + /** + * Port: 端口号,sqlserver默认1433 + * + * @param int $port + */ + public function setPort($port) + { + $this->set("Port", $port); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 32T + * + * @return integer|null + */ + public function getDiskSpace() + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 32T + * + * @param int $diskSpace + */ + public function setDiskSpace($diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * StorageClass: 存储类型 CLOUD_RSSD: RSSD 云盘,该字段和SpecificationClass组合使用,CLOUD_RSSD对应O型 + * + * @return string|null + */ + public function getStorageClass() + { + return $this->get("StorageClass"); + } + + /** + * StorageClass: 存储类型 CLOUD_RSSD: RSSD 云盘,该字段和SpecificationClass组合使用,CLOUD_RSSD对应O型 + * + * @param string $storageClass + */ + public function setStorageClass($storageClass) + { + $this->set("StorageClass", $storageClass); + } + + /** + * SpecificationClass: 规格类型 O: NVMe型 + * + * @return string|null + */ + public function getSpecificationClass() + { + return $this->get("SpecificationClass"); + } + + /** + * SpecificationClass: 规格类型 O: NVMe型 + * + * @param string $specificationClass + */ + public function setSpecificationClass($specificationClass) + { + $this->set("SpecificationClass", $specificationClass); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": SQL Server普通版实例 "HA": SQL Server集群版实例 默认是"Normal" + * + * @return string|null + */ + public function getInstanceMode() + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": SQL Server普通版实例 "HA": SQL Server集群版实例 默认是"Normal" + * + * @param string $instanceMode + */ + public function setInstanceMode($instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * MachineType: 规格类型 ID,如果创建的是SQL Server集群版,该参数必填,请通过 ListUDBMachineType 接口获取,返回体中的ID字段为MachineType的值。 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 规格类型 ID,如果创建的是SQL Server集群版,该参数必填,请通过 ListUDBMachineType 接口获取,返回体中的ID字段为MachineType的值。 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * CPU: CPU核,如果是创建的SQL Server普通版,该参数必传,目前支持2/4/8/16/32/64 + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: CPU核,如果是创建的SQL Server普通版,该参数必传,目前支持2/4/8/16/32/64 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * MemoryLimit: 内存限制(MB),如果是创建的SQL Server普通版,该参数必传,目前支持以下几档 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * + * @return integer|null + */ + public function getMemoryLimit() + { + return $this->get("MemoryLimit"); + } + + /** + * MemoryLimit: 内存限制(MB),如果是创建的SQL Server普通版,该参数必传,目前支持以下几档 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * + * @param int $memoryLimit + */ + public function setMemoryLimit($memoryLimit) + { + $this->set("MemoryLimit", $memoryLimit); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Month + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: 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); + } + + /** + * BackupCount: 备份策略,每周备份数量,默认7次 + * + * @return integer|null + */ + public function getBackupCount() + { + return $this->get("BackupCount"); + } + + /** + * BackupCount: 备份策略,每周备份数量,默认7次 + * + * @param int $backupCount + */ + public function setBackupCount($backupCount) + { + $this->set("BackupCount", $backupCount); + } + + /** + * BackupTime: 备份策略,备份开始时间,单位小时计,默认1点 + * + * @return integer|null + */ + public function getBackupTime() + { + return $this->get("BackupTime"); + } + + /** + * BackupTime: 备份策略,备份开始时间,单位小时计,默认1点 + * + * @param int $backupTime + */ + public function setBackupTime($backupTime) + { + $this->set("BackupTime", $backupTime); + } + + /** + * BackupDuration: 备份策略,备份时间间隔,单位小时计,默认24小时 + * + * @return integer|null + */ + public function getBackupDuration() + { + return $this->get("BackupDuration"); + } + + /** + * BackupDuration: 备份策略,备份时间间隔,单位小时计,默认24小时 + * + * @param int $backupDuration + */ + public function setBackupDuration($backupDuration) + { + $this->set("BackupDuration", $backupDuration); + } + + /** + * BackupId: 备份id,如果指定,则表明从备份恢复实例 + * + * @return integer|null + */ + public function getBackupId() + { + return $this->get("BackupId"); + } + + /** + * BackupId: 备份id,如果指定,则表明从备份恢复实例 + * + * @param int $backupId + */ + public function setBackupId($backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * SubnetId: 子网ID,如果创建的是SQL Server集群版,该参数必填 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID,如果创建的是SQL Server集群版,该参数必填 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: VPC的ID,如果创建的是SQL Server集群版,该参数必填 + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC的ID,如果创建的是SQL Server集群版,该参数必填 + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Tag: 实例所在的业务组名称 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 实例所在的业务组名称 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * AlarmTemplateId: 告警模版id + * + * @return string|null + */ + public function getAlarmTemplateId() + { + return $this->get("AlarmTemplateId"); + } + + /** + * AlarmTemplateId: 告警模版id + * + * @param string $alarmTemplateId + */ + public function setAlarmTemplateId($alarmTemplateId) + { + $this->set("AlarmTemplateId", $alarmTemplateId); + } + + /** + * BackupURL: 备份文件的US3内网下载地址 + * + * @return string|null + */ + public function getBackupURL() + { + return $this->get("BackupURL"); + } + + /** + * BackupURL: 备份文件的US3内网下载地址 + * + * @param string $backupURL + */ + public function setBackupURL($backupURL) + { + $this->set("BackupURL", $backupURL); + } + + /** + * Labels: + * + * @return CreateUDBSQLServerInstanceParamLabels[]|null + */ + public function getLabels() + { + $items = $this->get("Labels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUDBSQLServerInstanceParamLabels($item)); + } + return $result; + } + + /** + * Labels: + * + * @param CreateUDBSQLServerInstanceParamLabels[] $labels + */ + public function setLabels(array $labels) + { + $result = []; + foreach ($labels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDB/Apis/CreateUDBSQLServerInstanceResponse.php b/src/UDB/Apis/CreateUDBSQLServerInstanceResponse.php new file mode 100644 index 00000000..59d3fcf1 --- /dev/null +++ b/src/UDB/Apis/CreateUDBSQLServerInstanceResponse.php @@ -0,0 +1,44 @@ +get("DBId"); + } + + /** + * DBId: BD实例id + * + * @param string $dbId + */ + public function setDBId($dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/CreateUDBSlaveRequest.php b/src/UDB/Apis/CreateUDBSlaveRequest.php index b12605c2..e8a66ca6 100644 --- a/src/UDB/Apis/CreateUDBSlaveRequest.php +++ b/src/UDB/Apis/CreateUDBSlaveRequest.php @@ -1,6 +1,6 @@ get("UseSSD"); - } - - /** - * UseSSD: 是否使用SSD,默认为true - * - * @param boolean $useSSD - */ - public function setUseSSD($useSSD) - { - $this->set("UseSSD", $useSSD); - } - - /** - * SSDType: SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + * SSDType: 仅对主为SSD型实例有效。 可选值"SATA","NVMe" * * @return string|null */ @@ -181,7 +161,7 @@ public function getSSDType() } /** - * SSDType: SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + * SSDType: 仅对主为SSD型实例有效。 可选值"SATA","NVMe" * * @param string $ssdType */ @@ -211,27 +191,7 @@ public function setIsLock($isLock) } /** - * InstanceMode: UDB实例部署模式,可选值如下:Normal: 普通单点实例HA: 高可用部署实例 - * - * @return string|null - */ - public function getInstanceMode() - { - return $this->get("InstanceMode"); - } - - /** - * InstanceMode: UDB实例部署模式,可选值如下:Normal: 普通单点实例HA: 高可用部署实例 - * - * @param string $instanceMode - */ - public function setInstanceMode($instanceMode) - { - $this->set("InstanceMode", $instanceMode); - } - - /** - * MemoryLimit: 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * MemoryLimit: 内存限制(MB),目前支持以下几档 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M * * @return integer|null */ @@ -241,7 +201,7 @@ public function getMemoryLimit() } /** - * MemoryLimit: 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * MemoryLimit: 内存限制(MB),目前支持以下几档 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M * * @param int $memoryLimit */ @@ -270,26 +230,6 @@ public function setDiskSpace($diskSpace) $this->set("DiskSpace", $diskSpace); } - /** - * InstanceType: UDB实例类型:Normal、SATA_SSD、NVMe_SSD - * - * @return string|null - */ - public function getInstanceType() - { - return $this->get("InstanceType"); - } - - /** - * InstanceType: UDB实例类型:Normal、SATA_SSD、NVMe_SSD - * - * @param string $instanceType - */ - public function setInstanceType($instanceType) - { - $this->set("InstanceType", $instanceType); - } - /** * SubnetId: 子网ID(如果不传用默认子网) * @@ -390,6 +330,86 @@ public function setParamGroupId($paramGroupId) $this->set("ParamGroupId", $paramGroupId); } + /** + * IsCreatePhysically: 使用物理方式创建从库,目前仅限创建快杰从库,默认为false + * + * @return boolean|null + */ + public function getIsCreatePhysically() + { + return $this->get("IsCreatePhysically"); + } + + /** + * IsCreatePhysically: 使用物理方式创建从库,目前仅限创建快杰从库,默认为false + * + * @param boolean $isCreatePhysically + */ + public function setIsCreatePhysically($isCreatePhysically) + { + $this->set("IsCreatePhysically", $isCreatePhysically); + } + + /** + * DelaySeconds: 设置从库的延时复制时长(单位秒) + * + * @return integer|null + */ + public function getDelaySeconds() + { + return $this->get("DelaySeconds"); + } + + /** + * DelaySeconds: 设置从库的延时复制时长(单位秒) + * + * @param int $delaySeconds + */ + public function setDelaySeconds($delaySeconds) + { + $this->set("DelaySeconds", $delaySeconds); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @return integer|null + */ + public function getSpecificationType() + { + return $this->get("SpecificationType"); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @param int $specificationType + */ + public function setSpecificationType($specificationType) + { + $this->set("SpecificationType", $specificationType); + } + + /** + * MachineType: 规格类型ID,当SpecificationType为1时有效 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 规格类型ID,当SpecificationType为1时有效 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + /** * CouponId: 使用的代金券id * diff --git a/src/UDB/Apis/CreateUDBSlaveResponse.php b/src/UDB/Apis/CreateUDBSlaveResponse.php index 71ec5e37..4cefd9c4 100644 --- a/src/UDB/Apis/CreateUDBSlaveResponse.php +++ b/src/UDB/Apis/CreateUDBSlaveResponse.php @@ -1,6 +1,6 @@ set("EndTime", $endTime); } + + /** + * ClassType: 如果未指定GroupId,则可选是否选取特定DB类型的配置(sql, nosql, postgresql, sqlserver) + * + * @return string|null + */ + public function getClassType() + { + return $this->get("ClassType"); + } + + /** + * ClassType: 如果未指定GroupId,则可选是否选取特定DB类型的配置(sql, nosql, postgresql, sqlserver) + * + * @param string $classType + */ + public function setClassType($classType) + { + $this->set("ClassType", $classType); + } } diff --git a/src/UDB/Apis/DescribeUDBBackupResponse.php b/src/UDB/Apis/DescribeUDBBackupResponse.php index 0fada7c4..b689ba38 100644 --- a/src/UDB/Apis/DescribeUDBBackupResponse.php +++ b/src/UDB/Apis/DescribeUDBBackupResponse.php @@ -1,6 +1,6 @@ "DescribeUDBBinlogBackup"]); + $this->markRequired("Region"); + $this->markRequired("Offset"); + $this->markRequired("Limit"); + } + + + + /** + * 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: 分页显示的起始偏移,列表操作则指定 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 分页显示的起始偏移,列表操作则指定 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 分页显示的条目数,列表操作则指定 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 分页显示的条目数,列表操作则指定 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } + + /** + * DBId: DB实例Id,如果指定,则只获取该db的备份信息; 当Type为2时必填 + * + * @return string|null + */ + public function getDBId() + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id,如果指定,则只获取该db的备份信息; 当Type为2时必填 + * + * @param string $dbId + */ + public function setDBId($dbId) + { + $this->set("DBId", $dbId); + } + + /** + * BeginTime: 过滤条件:起始时间(时间戳) + * + * @return integer|null + */ + public function getBeginTime() + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 过滤条件:起始时间(时间戳) + * + * @param int $beginTime + */ + public function setBeginTime($beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 过滤条件:结束时间(时间戳) + * + * @return integer|null + */ + public function getEndTime() + { + return $this->get("EndTime"); + } + + /** + * EndTime: 过滤条件:结束时间(时间戳) + * + * @param int $endTime + */ + public function setEndTime($endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UDB/Apis/DescribeUDBBinlogBackupResponse.php b/src/UDB/Apis/DescribeUDBBinlogBackupResponse.php new file mode 100644 index 00000000..6f11a8fa --- /dev/null +++ b/src/UDB/Apis/DescribeUDBBinlogBackupResponse.php @@ -0,0 +1,77 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BinlogBackupSet($item)); + } + return $result; + } + + /** + * DataSet: Binlog备份信息 参见BinlogBackupSet + * + * @param BinlogBackupSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 备份总数,如果指定dbid,则是该db备份总数 + * + * @return integer|null + */ + public function getTotalCount() + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 备份总数,如果指定dbid,则是该db备份总数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UDB/Apis/DescribeUDBBinlogBackupURLRequest.php b/src/UDB/Apis/DescribeUDBBinlogBackupURLRequest.php index 8401c55f..97d23b8b 100644 --- a/src/UDB/Apis/DescribeUDBBinlogBackupURLRequest.php +++ b/src/UDB/Apis/DescribeUDBBinlogBackupURLRequest.php @@ -1,6 +1,6 @@ markRequired("Region"); $this->markRequired("DBId"); $this->markRequired("BackupId"); + $this->markRequired("BinlogType"); } /** - * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @return string|null */ @@ -41,7 +42,7 @@ public function getRegion() } /** - * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @param string $region */ @@ -51,7 +52,7 @@ public function setRegion($region) } /** - * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @return string|null */ @@ -61,7 +62,7 @@ public function getZone() } /** - * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * * @param string $zone */ @@ -91,7 +92,7 @@ public function setDBId($dbId) } /** - * BackupId: DB实例binlog备份ID,可以从DescribeUDBLogPackage结果当中获得 + * BackupId: DB实例日志备份ID,可以从DescribeUDBLogPackage结果当中获得 * * @return integer|null */ @@ -101,7 +102,7 @@ public function getBackupId() } /** - * BackupId: DB实例binlog备份ID,可以从DescribeUDBLogPackage结果当中获得 + * BackupId: DB实例日志备份ID,可以从DescribeUDBLogPackage结果当中获得 * * @param int $backupId */ @@ -109,4 +110,24 @@ public function setBackupId($backupId) { $this->set("BackupId", $backupId); } + + /** + * BinlogType: binlog备份类型 Manual:手动备份 ,Auto:自动备份 + * + * @return string|null + */ + public function getBinlogType() + { + return $this->get("BinlogType"); + } + + /** + * BinlogType: binlog备份类型 Manual:手动备份 ,Auto:自动备份 + * + * @param string $binlogType + */ + public function setBinlogType($binlogType) + { + $this->set("BinlogType", $binlogType); + } } diff --git a/src/UDB/Apis/DescribeUDBBinlogBackupURLResponse.php b/src/UDB/Apis/DescribeUDBBinlogBackupURLResponse.php index 9de72e3b..d1da4a72 100644 --- a/src/UDB/Apis/DescribeUDBBinlogBackupURLResponse.php +++ b/src/UDB/Apis/DescribeUDBBinlogBackupURLResponse.php @@ -1,6 +1,6 @@ set("BackupId", $backupId); } + + /** + * ValidTime: DB响应中URL的过期时间,该值最小默认4小时,最大7天。不填默认为四小时。(单位/秒) + * + * @return integer|null + */ + public function getValidTime() + { + return $this->get("ValidTime"); + } + + /** + * ValidTime: DB响应中URL的过期时间,该值最小默认4小时,最大7天。不填默认为四小时。(单位/秒) + * + * @param int $validTime + */ + public function setValidTime($validTime) + { + $this->set("ValidTime", $validTime); + } } diff --git a/src/UDB/Apis/DescribeUDBInstanceBackupURLResponse.php b/src/UDB/Apis/DescribeUDBInstanceBackupURLResponse.php index 31fc6a98..d84ca8a8 100644 --- a/src/UDB/Apis/DescribeUDBInstanceBackupURLResponse.php +++ b/src/UDB/Apis/DescribeUDBInstanceBackupURLResponse.php @@ -1,6 +1,6 @@ set("InnerBackupPath", $innerBackupPath); } + + /** + * MD5: 备份文件的md5值 + * + * @return string|null + */ + public function getMD5() + { + return $this->get("MD5"); + } + + /** + * MD5: 备份文件的md5值 + * + * @param string $md5 + */ + public function setMD5($md5) + { + $this->set("MD5", $md5); + } } diff --git a/src/UDB/Apis/DescribeUDBInstanceBinlogBackupStateRequest.php b/src/UDB/Apis/DescribeUDBInstanceBinlogBackupStateRequest.php index fc098adb..76a4e153 100644 --- a/src/UDB/Apis/DescribeUDBInstanceBinlogBackupStateRequest.php +++ b/src/UDB/Apis/DescribeUDBInstanceBinlogBackupStateRequest.php @@ -1,6 +1,6 @@ get("UseSSD"); + return $this->get("SSDType"); } /** - * UseSSD: 是否使用SSD,只能填true或false,默认为false + * SSDType: 该字段已废弃。 * - * @param string $useSSD + * @param string $ssdType */ - public function setUseSSD($useSSD) + public function setSSDType($ssdType) { - $this->set("UseSSD", $useSSD); + $this->set("SSDType", $ssdType); } /** - * SSDType: SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必填 + * InstanceMode: 实例的部署类型。可选值为:Normal: 普通单点实例,Slave: 从库实例,HA: 高可用部署实例,默认是Normal * * @return string|null */ - public function getSSDType() + public function getInstanceMode() { - return $this->get("SSDType"); + return $this->get("InstanceMode"); } /** - * SSDType: SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必填 + * InstanceMode: 实例的部署类型。可选值为:Normal: 普通单点实例,Slave: 从库实例,HA: 高可用部署实例,默认是Normal * - * @param string $ssdType + * @param string $instanceMode */ - public function setSSDType($ssdType) + public function setInstanceMode($instanceMode) { - $this->set("SSDType", $ssdType); + $this->set("InstanceMode", $instanceMode); + } + + /** + * CPU: CPU个数,如果db类型为sqlserver,则为必填参数 + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); } /** - * InstanceMode: 实例的部署类型。可选值为:Normal: 普通单点实例,Slave: 从库实例,HA: 高可用部署实例,默认是Normal + * CPU: CPU个数,如果db类型为sqlserver,则为必填参数 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * InstanceType: 对于快杰机型,请使用最新的 SpecificationClass 和 StorageClass 字段进行创建。目前仅有少量地域支持 SATA_SSD 存储类型;若创建的是 SATA_SSD 机型,可通过该字段指定。字段说明:SATA_SSD:SATA SSD 机型(仅部分地域支持)NVMe_SSD:快杰机型 * * @return string|null */ - public function getInstanceMode() + public function getInstanceType() { - return $this->get("InstanceMode"); + return $this->get("InstanceType"); } /** - * InstanceMode: 实例的部署类型。可选值为:Normal: 普通单点实例,Slave: 从库实例,HA: 高可用部署实例,默认是Normal + * InstanceType: 对于快杰机型,请使用最新的 SpecificationClass 和 StorageClass 字段进行创建。目前仅有少量地域支持 SATA_SSD 存储类型;若创建的是 SATA_SSD 机型,可通过该字段指定。字段说明:SATA_SSD:SATA SSD 机型(仅部分地域支持)NVMe_SSD:快杰机型 * - * @param string $instanceMode + * @param string $instanceType */ - public function setInstanceMode($instanceMode) + public function setInstanceType($instanceType) { - $this->set("InstanceMode", $instanceMode); + $this->set("InstanceType", $instanceType); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @return integer|null + */ + public function getSpecificationType() + { + return $this->get("SpecificationType"); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @param int $specificationType + */ + public function setSpecificationType($specificationType) + { + $this->set("SpecificationType", $specificationType); + } + + /** + * MachineType: 规格类型ID,当SpecificationType为1时有效 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 规格类型ID,当SpecificationType为1时有效 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * StorageClass: 存储类型 CLOUD_SSD: SSD云盘, CLOUD_RSSD: RSSD 云盘, CLOUD_SSD_ESSENTIAL: SSD Essential云盘 ,该字段和SpecificationClass组合优先级比InstanceType字段高 + * + * @return string|null + */ + public function getStorageClass() + { + return $this->get("StorageClass"); + } + + /** + * StorageClass: 存储类型 CLOUD_SSD: SSD云盘, CLOUD_RSSD: RSSD 云盘, CLOUD_SSD_ESSENTIAL: SSD Essential云盘 ,该字段和SpecificationClass组合优先级比InstanceType字段高 + * + * @param string $storageClass + */ + public function setStorageClass($storageClass) + { + $this->set("StorageClass", $storageClass); + } + + /** + * SpecificationClass: 规格类型 O: NVME, OM: 共享型,N: 通用型 + * + * @return string|null + */ + public function getSpecificationClass() + { + return $this->get("SpecificationClass"); + } + + /** + * SpecificationClass: 规格类型 O: NVME, OM: 共享型,N: 通用型 + * + * @param string $specificationClass + */ + public function setSpecificationClass($specificationClass) + { + $this->set("SpecificationClass", $specificationClass); } } diff --git a/src/UDB/Apis/DescribeUDBInstancePriceResponse.php b/src/UDB/Apis/DescribeUDBInstancePriceResponse.php index d31f31f9..d09e5a9e 100644 --- a/src/UDB/Apis/DescribeUDBInstancePriceResponse.php +++ b/src/UDB/Apis/DescribeUDBInstancePriceResponse.php @@ -1,6 +1,6 @@ set("IncludeSlaves", $includeSlaves); } + + /** + * VPCId: 根据VPCId筛选DB + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: 根据VPCId筛选DB + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Tag: 根据 业务组 筛选DB + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 根据 业务组 筛选DB + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } } diff --git a/src/UDB/Apis/DescribeUDBInstanceResponse.php b/src/UDB/Apis/DescribeUDBInstanceResponse.php index a56c92a4..2d3312f9 100644 --- a/src/UDB/Apis/DescribeUDBInstanceResponse.php +++ b/src/UDB/Apis/DescribeUDBInstanceResponse.php @@ -1,6 +1,6 @@ get("UseSSD"); + return $this->get("SSDType"); } /** - * UseSSD: 是否使用SSD,默认为false + * SSDType: "SATA", "NVMe" * - * @param boolean $useSSD + * @param string $ssdType */ - public function setUseSSD($useSSD) + public function setSSDType($ssdType) { - $this->set("UseSSD", $useSSD); + $this->set("SSDType", $ssdType); } /** - * SSDType: SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 + * InstanceType: "SATA_SSD", "NVMe_SSD" * * @return string|null */ - public function getSSDType() + public function getInstanceType() { - return $this->get("SSDType"); + return $this->get("InstanceType"); } /** - * SSDType: SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 + * InstanceType: "SATA_SSD", "NVMe_SSD" * - * @param string $ssdType + * @param string $instanceType */ - public function setSSDType($ssdType) + public function setInstanceType($instanceType) { - $this->set("SSDType", $ssdType); + $this->set("InstanceType", $instanceType); + } + + /** + * OrderStartTime: 获取指定时间开始后面的升级价格, 不填的话 是默认当前时间 + * + * @return integer|null + */ + public function getOrderStartTime() + { + return $this->get("OrderStartTime"); + } + + /** + * OrderStartTime: 获取指定时间开始后面的升级价格, 不填的话 是默认当前时间 + * + * @param int $orderStartTime + */ + public function setOrderStartTime($orderStartTime) + { + $this->set("OrderStartTime", $orderStartTime); + } + + /** + * CPU: CPU核数 快杰SQLServer升降级必传 + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: CPU核数 快杰SQLServer升降级必传 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * MachineType: 规格类型ID,当SpecificationType为1时有效 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 规格类型ID,当SpecificationType为1时有效 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @return integer|null + */ + public function getSpecificationType() + { + return $this->get("SpecificationType"); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @param int $specificationType + */ + public function setSpecificationType($specificationType) + { + $this->set("SpecificationType", $specificationType); } } diff --git a/src/UDB/Apis/DescribeUDBInstanceUpgradePriceResponse.php b/src/UDB/Apis/DescribeUDBInstanceUpgradePriceResponse.php index acadd797..f47e48bf 100644 --- a/src/UDB/Apis/DescribeUDBInstanceUpgradePriceResponse.php +++ b/src/UDB/Apis/DescribeUDBInstanceUpgradePriceResponse.php @@ -1,6 +1,6 @@ "DescribeUDBParamGroup"]); $this->markRequired("Region"); + $this->markRequired("Offset"); + $this->markRequired("Limit"); } diff --git a/src/UDB/Apis/DescribeUDBParamGroupResponse.php b/src/UDB/Apis/DescribeUDBParamGroupResponse.php index a2436fc7..df7abedc 100644 --- a/src/UDB/Apis/DescribeUDBParamGroupResponse.php +++ b/src/UDB/Apis/DescribeUDBParamGroupResponse.php @@ -1,6 +1,6 @@ set("CompatibleWithDBType", $compatibleWithDBType); } + + /** + * DBSubVersion: 返回从备份创建实例时,该小版本号所支持的备份创建小版本。如果没传,则表示不是从备份创建。 + * + * @return string|null + */ + public function getDBSubVersion() + { + return $this->get("DBSubVersion"); + } + + /** + * DBSubVersion: 返回从备份创建实例时,该小版本号所支持的备份创建小版本。如果没传,则表示不是从备份创建。 + * + * @param string $dbSubVersion + */ + public function setDBSubVersion($dbSubVersion) + { + $this->set("DBSubVersion", $dbSubVersion); + } } diff --git a/src/UDB/Apis/DescribeUDBTypeResponse.php b/src/UDB/Apis/DescribeUDBTypeResponse.php index 72e59b28..14940861 100644 --- a/src/UDB/Apis/DescribeUDBTypeResponse.php +++ b/src/UDB/Apis/DescribeUDBTypeResponse.php @@ -1,6 +1,6 @@ "GetUDBInstanceSSLCertURL"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("DBId"); + } + + + + /** + * 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); + } + + /** + * DBId: 实例ID + * + * @return string|null + */ + public function getDBId() + { + return $this->get("DBId"); + } + + /** + * DBId: 实例ID + * + * @param string $dbId + */ + public function setDBId($dbId) + { + $this->set("DBId", $dbId); + } + + /** + * ExpireTime: URL的过期时间,该值最小默认1小时,最大7天。(单位/秒) + * + * @return integer|null + */ + public function getExpireTime() + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: URL的过期时间,该值最小默认1小时,最大7天。(单位/秒) + * + * @param int $expireTime + */ + public function setExpireTime($expireTime) + { + $this->set("ExpireTime", $expireTime); + } +} diff --git a/src/UDB/Apis/GetUDBInstanceSSLCertURLResponse.php b/src/UDB/Apis/GetUDBInstanceSSLCertURLResponse.php new file mode 100644 index 00000000..81d868f5 --- /dev/null +++ b/src/UDB/Apis/GetUDBInstanceSSLCertURLResponse.php @@ -0,0 +1,64 @@ +get("InternetUrl"); + } + + /** + * InternetUrl: 外网链接 + * + * @param string $internetUrl + */ + public function setInternetUrl($internetUrl) + { + $this->set("InternetUrl", $internetUrl); + } + + /** + * InnerUrl: 内网链接 + * + * @return string|null + */ + public function getInnerUrl() + { + return $this->get("InnerUrl"); + } + + /** + * InnerUrl: 内网链接 + * + * @param string $innerUrl + */ + public function setInnerUrl($innerUrl) + { + $this->set("InnerUrl", $innerUrl); + } +} diff --git a/src/UDB/Apis/ListUDBMachineTypeRequest.php b/src/UDB/Apis/ListUDBMachineTypeRequest.php new file mode 100644 index 00000000..6b7a0928 --- /dev/null +++ b/src/UDB/Apis/ListUDBMachineTypeRequest.php @@ -0,0 +1,111 @@ + "ListUDBMachineType"]); + $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); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * + * @return string|null + */ + public function getInstanceMode() + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * + * @param string $instanceMode + */ + public function setInstanceMode($instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } +} diff --git a/src/UDB/Apis/ListUDBMachineTypeResponse.php b/src/UDB/Apis/ListUDBMachineTypeResponse.php new file mode 100644 index 00000000..50ea0ec3 --- /dev/null +++ b/src/UDB/Apis/ListUDBMachineTypeResponse.php @@ -0,0 +1,78 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MachineType($item)); + } + return $result; + } + + /** + * DataSet: 计算规格列表 + * + * @param MachineType[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DefaultMachineType: 默认计算规格 + * + * @return MachineType|null + */ + public function getDefaultMachineType() + { + return new MachineType($this->get("DefaultMachineType")); + } + + /** + * DefaultMachineType: 默认计算规格 + * + * @param MachineType $defaultMachineType + */ + public function setDefaultMachineType(array $defaultMachineType) + { + $this->set("DefaultMachineType", $defaultMachineType->getAll()); + } +} diff --git a/src/UDB/Apis/ListUDBUserTablesRequest.php b/src/UDB/Apis/ListUDBUserTablesRequest.php new file mode 100644 index 00000000..e1453f3a --- /dev/null +++ b/src/UDB/Apis/ListUDBUserTablesRequest.php @@ -0,0 +1,71 @@ + "ListUDBUserTables"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + } + + + + /** + * 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); + } + + /** + * DBId: udb实例的ID + * + * @return string|null + */ + public function getDBId() + { + return $this->get("DBId"); + } + + /** + * DBId: udb实例的ID + * + * @param string $dbId + */ + public function setDBId($dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/ListUDBUserTablesResponse.php b/src/UDB/Apis/ListUDBUserTablesResponse.php new file mode 100644 index 00000000..d8f23666 --- /dev/null +++ b/src/UDB/Apis/ListUDBUserTablesResponse.php @@ -0,0 +1,58 @@ +get("Tables"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDBDatabaseData($item)); + } + return $result; + } + + /** + * Tables: 用户库表的集合 + * + * @param UDBDatabaseData[] $tables + */ + public function setTables(array $tables) + { + $result = []; + foreach ($tables as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDB/Apis/ModifyUDBInstanceNameRequest.php b/src/UDB/Apis/ModifyUDBInstanceNameRequest.php index b15f4488..f2a24ca2 100644 --- a/src/UDB/Apis/ModifyUDBInstanceNameRequest.php +++ b/src/UDB/Apis/ModifyUDBInstanceNameRequest.php @@ -1,6 +1,6 @@ "ModifyUDBInstanceRemarkName"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("DBId"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId() + { + return $this->get("DBId"); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId($dbId) + { + $this->set("DBId", $dbId); + } + + /** + * Name: 实例的新备注 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 实例的新备注 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } +} diff --git a/src/UDB/Apis/ModifyUDBInstanceRemarkNameResponse.php b/src/UDB/Apis/ModifyUDBInstanceRemarkNameResponse.php new file mode 100644 index 00000000..ea23ee51 --- /dev/null +++ b/src/UDB/Apis/ModifyUDBInstanceRemarkNameResponse.php @@ -0,0 +1,26 @@ + "ModifyUDBInstanceSSL"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("DBId"); + $this->markRequired("EnableSSL"); + } + + + + /** + * 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); + } + + /** + * DBId: 实例ID + * + * @return string|null + */ + public function getDBId() + { + return $this->get("DBId"); + } + + /** + * DBId: 实例ID + * + * @param string $dbId + */ + public function setDBId($dbId) + { + $this->set("DBId", $dbId); + } + + /** + * EnableSSL: 是否开启SSL 1->关闭 2->开启 + * + * @return integer|null + */ + public function getEnableSSL() + { + return $this->get("EnableSSL"); + } + + /** + * EnableSSL: 是否开启SSL 1->关闭 2->开启 + * + * @param int $enableSSL + */ + public function setEnableSSL($enableSSL) + { + $this->set("EnableSSL", $enableSSL); + } + + /** + * ValidTime: SSL证书有效时间,1-5年,默认为1年 + * + * @return integer|null + */ + public function getValidTime() + { + return $this->get("ValidTime"); + } + + /** + * ValidTime: SSL证书有效时间,1-5年,默认为1年 + * + * @param int $validTime + */ + public function setValidTime($validTime) + { + $this->set("ValidTime", $validTime); + } +} diff --git a/src/UDB/Apis/ModifyUDBInstanceSSLResponse.php b/src/UDB/Apis/ModifyUDBInstanceSSLResponse.php new file mode 100644 index 00000000..80ac9419 --- /dev/null +++ b/src/UDB/Apis/ModifyUDBInstanceSSLResponse.php @@ -0,0 +1,26 @@ +get("UseSSD"); - } - - /** - * UseSSD: 是否使用SSD,默认为true - * - * @param boolean $useSSD - */ - public function setUseSSD($useSSD) - { - $this->set("UseSSD", $useSSD); - } - - /** - * SSDType: SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + * SSDType: SSD类型,可选值为"SATA"、“NVMe” * * @return string|null */ @@ -182,7 +162,7 @@ public function getSSDType() } /** - * SSDType: SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + * SSDType: SSD类型,可选值为"SATA"、“NVMe” * * @param string $ssdType */ @@ -191,26 +171,6 @@ public function setSSDType($ssdType) $this->set("SSDType", $ssdType); } - /** - * UDBCId: 专区的ID,如果有值表示专区中的DB配置升降级 - * - * @return string|null - */ - public function getUDBCId() - { - return $this->get("UDBCId"); - } - - /** - * UDBCId: 专区的ID,如果有值表示专区中的DB配置升降级 - * - * @param string $udbcId - */ - public function setUDBCId($udbcId) - { - $this->set("UDBCId", $udbcId); - } - /** * InstanceType: UDB数据库机型: "Normal": "标准机型" , "SATA_SSD": "SSD机型" , "PCIE_SSD": "SSD高性能机型" , "Normal_Volume": "标准大容量机型", "SATA_SSD_Volume": "SSD大容量机型" , "PCIE_SSD_Volume": "SSD高性能大容量机型",“NVMe_SSD”:“快杰机型” * @@ -271,6 +231,66 @@ public function setStartAfterUpgrade($startAfterUpgrade) $this->set("StartAfterUpgrade", $startAfterUpgrade); } + /** + * MachineType: 规格类型ID,当SpecificationType为1时有效 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 规格类型ID,当SpecificationType为1时有效 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @return string|null + */ + public function getSpecificationType() + { + return $this->get("SpecificationType"); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @param string $specificationType + */ + public function setSpecificationType($specificationType) + { + $this->set("SpecificationType", $specificationType); + } + + /** + * CPU: 数据库的CPU核数(只对普通版的SQLServer有用) + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: 数据库的CPU核数(只对普通版的SQLServer有用) + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + /** * CouponId: 使用的代金券id * diff --git a/src/UDB/Apis/ResizeUDBInstanceResponse.php b/src/UDB/Apis/ResizeUDBInstanceResponse.php index 90abad52..3b46ed6b 100644 --- a/src/UDB/Apis/ResizeUDBInstanceResponse.php +++ b/src/UDB/Apis/ResizeUDBInstanceResponse.php @@ -1,6 +1,6 @@ "RollbackUDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("SrcDBId"); + $this->markRequired("RecoveryTime"); + $this->markRequired("Tables"); + } + + + + /** + * 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); + } + + /** + * SrcDBId: 源实例的Id + * + * @return string|null + */ + public function getSrcDBId() + { + return $this->get("SrcDBId"); + } + + /** + * SrcDBId: 源实例的Id + * + * @param string $srcDBId + */ + public function setSrcDBId($srcDBId) + { + $this->set("SrcDBId", $srcDBId); + } + + /** + * RecoveryTime: 恢复到某个时间点的时间戳(UTC时间格式,默认单位秒) + * + * @return string|null + */ + public function getRecoveryTime() + { + return $this->get("RecoveryTime"); + } + + /** + * RecoveryTime: 恢复到某个时间点的时间戳(UTC时间格式,默认单位秒) + * + * @param string $recoveryTime + */ + public function setRecoveryTime($recoveryTime) + { + $this->set("RecoveryTime", $recoveryTime); + } + + /** + * Tables: 指定需要恢复的表,格式为(库名.表名), 指定多个用逗号隔开,eg: [ udb.test, mysql_school.my_student] + * + * @return string|null + */ + public function getTables() + { + return $this->get("Tables"); + } + + /** + * Tables: 指定需要恢复的表,格式为(库名.表名), 指定多个用逗号隔开,eg: [ udb.test, mysql_school.my_student] + * + * @param string $tables + */ + public function setTables($tables) + { + $this->set("Tables", $tables); + } +} diff --git a/src/UDB/Apis/RollbackUDBInstanceResponse.php b/src/UDB/Apis/RollbackUDBInstanceResponse.php new file mode 100644 index 00000000..750e82e5 --- /dev/null +++ b/src/UDB/Apis/RollbackUDBInstanceResponse.php @@ -0,0 +1,44 @@ +get("DBId"); + } + + /** + * DBId: 源实例的Id + * + * @param string $dbId + */ + public function setDBId($dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/SetUDBRWSplittingRequest.php b/src/UDB/Apis/SetUDBRWSplittingRequest.php index efa313b2..5314b08c 100644 --- a/src/UDB/Apis/SetUDBRWSplittingRequest.php +++ b/src/UDB/Apis/SetUDBRWSplittingRequest.php @@ -1,6 +1,6 @@ set("BackupMethod", $backupMethod); } + + /** + * UserTokenID: 自动备份转存到用户自己的bucket 的tokenid, 需要用户自己自己设置权限 + * + * @return string|null + */ + public function getUserTokenID() + { + return $this->get("UserTokenID"); + } + + /** + * UserTokenID: 自动备份转存到用户自己的bucket 的tokenid, 需要用户自己自己设置权限 + * + * @param string $userTokenID + */ + public function setUserTokenID($userTokenID) + { + $this->set("UserTokenID", $userTokenID); + } + + /** + * UserBucket: 自动备份转存到用户自己的bucket名称,要包含到对应的token id里 + * + * @return string|null + */ + public function getUserBucket() + { + return $this->get("UserBucket"); + } + + /** + * UserBucket: 自动备份转存到用户自己的bucket名称,要包含到对应的token id里 + * + * @param string $userBucket + */ + public function setUserBucket($userBucket) + { + $this->set("UserBucket", $userBucket); + } + + /** + * EnableBinlogBackup: 是否开启binlog备份, 默认为未开启 + * + * @return boolean|null + */ + public function getEnableBinlogBackup() + { + return $this->get("EnableBinlogBackup"); + } + + /** + * EnableBinlogBackup: 是否开启binlog备份, 默认为未开启 + * + * @param boolean $enableBinlogBackup + */ + public function setEnableBinlogBackup($enableBinlogBackup) + { + $this->set("EnableBinlogBackup", $enableBinlogBackup); + } + + /** + * BinlogRemoteSaveDays: 远端binlog保存时长(天) + * + * @return integer|null + */ + public function getBinlogRemoteSaveDays() + { + return $this->get("BinlogRemoteSaveDays"); + } + + /** + * BinlogRemoteSaveDays: 远端binlog保存时长(天) + * + * @param int $binlogRemoteSaveDays + */ + public function setBinlogRemoteSaveDays($binlogRemoteSaveDays) + { + $this->set("BinlogRemoteSaveDays", $binlogRemoteSaveDays); + } } diff --git a/src/UDB/Apis/UpdateUDBInstanceBackupStrategyResponse.php b/src/UDB/Apis/UpdateUDBInstanceBackupStrategyResponse.php index 3d1a98d8..965096b6 100644 --- a/src/UDB/Apis/UpdateUDBInstanceBackupStrategyResponse.php +++ b/src/UDB/Apis/UpdateUDBInstanceBackupStrategyResponse.php @@ -1,6 +1,6 @@ "UpgradeUDBVersion"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("DBId"); + $this->markRequired("DBSubVersion"); + $this->markRequired("SwitchType"); + } + + + + /** + * 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); + } + + /** + * DBId: db实例资源id + * + * @return string|null + */ + public function getDBId() + { + return $this->get("DBId"); + } + + /** + * DBId: db实例资源id + * + * @param string $dbId + */ + public function setDBId($dbId) + { + $this->set("DBId", $dbId); + } + + /** + * DBSubVersion: db需要升级的小版本 + * + * @return string|null + */ + public function getDBSubVersion() + { + return $this->get("DBSubVersion"); + } + + /** + * DBSubVersion: db需要升级的小版本 + * + * @param string $dbSubVersion + */ + public function setDBSubVersion($dbSubVersion) + { + $this->set("DBSubVersion", $dbSubVersion); + } + + /** + * SwitchType: 切换类型,可选值为"immediately"和"customize",分别代表立即切换和自定义切换时间,自定义切换时间需要填写SwitchStartTime和SwitchEndTime + * + * @return string|null + */ + public function getSwitchType() + { + return $this->get("SwitchType"); + } + + /** + * SwitchType: 切换类型,可选值为"immediately"和"customize",分别代表立即切换和自定义切换时间,自定义切换时间需要填写SwitchStartTime和SwitchEndTime + * + * @param string $switchType + */ + public function setSwitchType($switchType) + { + $this->set("SwitchType", $switchType); + } + + /** + * SwitchStartTime: 该值为一个unix时间戳,代表开始切换实例的时间 + * + * @return integer|null + */ + public function getSwitchStartTime() + { + return $this->get("SwitchStartTime"); + } + + /** + * SwitchStartTime: 该值为一个unix时间戳,代表开始切换实例的时间 + * + * @param int $switchStartTime + */ + public function setSwitchStartTime($switchStartTime) + { + $this->set("SwitchStartTime", $switchStartTime); + } + + /** + * SwitchEndTime: 该值为一个unix时间戳,代表开始预期切换实例结束的时间 + * + * @return integer|null + */ + public function getSwitchEndTime() + { + return $this->get("SwitchEndTime"); + } + + /** + * SwitchEndTime: 该值为一个unix时间戳,代表开始预期切换实例结束的时间 + * + * @param int $switchEndTime + */ + public function setSwitchEndTime($switchEndTime) + { + $this->set("SwitchEndTime", $switchEndTime); + } +} diff --git a/src/UDB/Apis/UpgradeUDBVersionResponse.php b/src/UDB/Apis/UpgradeUDBVersionResponse.php new file mode 100644 index 00000000..d0d0eafc --- /dev/null +++ b/src/UDB/Apis/UpgradeUDBVersionResponse.php @@ -0,0 +1,26 @@ +get("BackupId"); + } + + /** + * BackupId: 备份id + * + * @param int $backupId + */ + public function setBackupId($backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * BackupName: 备份名称 + * + * @return string|null + */ + public function getBackupName() + { + return $this->get("BackupName"); + } + + /** + * BackupName: 备份名称 + * + * @param string $backupName + */ + public function setBackupName($backupName) + { + $this->set("BackupName", $backupName); + } + + /** + * BackupTime: 备份时间 + * + * @return integer|null + */ + public function getBackupTime() + { + return $this->get("BackupTime"); + } + + /** + * BackupTime: 备份时间 + * + * @param int $backupTime + */ + public function setBackupTime($backupTime) + { + $this->set("BackupTime", $backupTime); + } + + /** + * BackupSize: 备份文件大小 + * + * @return integer|null + */ + public function getBackupSize() + { + return $this->get("BackupSize"); + } + + /** + * BackupSize: 备份文件大小 + * + * @param int $backupSize + */ + public function setBackupSize($backupSize) + { + $this->set("BackupSize", $backupSize); + } + + /** + * State: 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * BinlogType: binlog备份类型 Manual:手动备份 ,Auto:自动备份 + * + * @return string|null + */ + public function getBinlogType() + { + return $this->get("BinlogType"); + } + + /** + * BinlogType: binlog备份类型 Manual:手动备份 ,Auto:自动备份 + * + * @param string $binlogType + */ + public function setBinlogType($binlogType) + { + $this->set("BinlogType", $binlogType); + } + + /** + * DBId: dbid + * + * @return string|null + */ + public function getDBId() + { + return $this->get("DBId"); + } + + /** + * DBId: dbid + * + * @param string $dbId + */ + public function setDBId($dbId) + { + $this->set("DBId", $dbId); + } + + /** + * ServerId: 节点标识ID + * + * @return string|null + */ + public function getServerId() + { + return $this->get("ServerId"); + } + + /** + * ServerId: 节点标识ID + * + * @param string $serverId + */ + public function setServerId($serverId) + { + $this->set("ServerId", $serverId); + } + + /** + * LogStartTime: 日志开始时间 + * + * @return integer|null + */ + public function getLogStartTime() + { + return $this->get("LogStartTime"); + } + + /** + * LogStartTime: 日志开始时间 + * + * @param int $logStartTime + */ + public function setLogStartTime($logStartTime) + { + $this->set("LogStartTime", $logStartTime); + } + + /** + * LogEndTime: 日志结束时间 + * + * @return integer|null + */ + public function getLogEndTime() + { + return $this->get("LogEndTime"); + } + + /** + * LogEndTime: 日志结束时间 + * + * @param int $logEndTime + */ + public function setLogEndTime($logEndTime) + { + $this->set("LogEndTime", $logEndTime); + } +} diff --git a/src/UDB/Models/ConnNumMap.php b/src/UDB/Models/ConnNumMap.php index 0a9f909f..b0ce3a06 100644 --- a/src/UDB/Models/ConnNumMap.php +++ b/src/UDB/Models/ConnNumMap.php @@ -1,6 +1,6 @@ get("Zone"); + } + + /** + * Zone: 所在可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + /** * BackupId: 备份id * @@ -122,6 +142,26 @@ public function setBackupType($backupType) $this->set("BackupType", $backupType); } + /** + * BinlogType: binlog备份类型 Manual //手动备份 Auto //自动备份 + * + * @return string|null + */ + public function getBinlogType() + { + return $this->get("BinlogType"); + } + + /** + * BinlogType: binlog备份类型 Manual //手动备份 Auto //自动备份 + * + * @param string $binlogType + */ + public function setBinlogType($binlogType) + { + $this->set("BinlogType", $binlogType); + } + /** * State: 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 * @@ -182,26 +222,6 @@ public function setDBName($dbName) $this->set("DBName", $dbName); } - /** - * Zone: 所在可用区 - * - * @return string|null - */ - public function getZone() - { - return $this->get("Zone"); - } - - /** - * Zone: 所在可用区 - * - * @param string $zone - */ - public function setZone($zone) - { - $this->set("Zone", $zone); - } - /** * BackupZone: 跨可用区高可用备库所在可用区 * diff --git a/src/UDB/Models/MachineType.php b/src/UDB/Models/MachineType.php new file mode 100644 index 00000000..3b179b33 --- /dev/null +++ b/src/UDB/Models/MachineType.php @@ -0,0 +1,144 @@ +get("ID"); + } + + /** + * ID: 计算规格id, 目前支持CPU和内存比1:2、1:4、1:8三类配比规格;规格的格式为:"机型.配比.CPU核数规格";机型支持o和n两种机型,分别代表快杰NVMe和SSD云盘机型;配比映射关系如下:2m代表CPU内存配比1比2,4m代表CPU内存配比1比4,8m代表CPU内存配比1比8,CPU核数规格射关系如下:small代表1C,medium代表2C,xlarge代表4C,2xlarge代表8C,4xlarge代表16C,8xlarge代表32C,16xlarge代表64C,例如 "o.mysql4m.medium"表示创建快杰NVMe机型2C8G的实例,"o.mysql8m.4xlarge"表示创建快杰NVMe机型16C128G的实例 + * + * @param string $id + */ + public function setID($id) + { + $this->set("ID", $id); + } + + /** + * Description: 计算规格描述,格式为"nCmG",表示n核mG内存实例 + * + * @return string|null + */ + public function getDescription() + { + return $this->get("Description"); + } + + /** + * Description: 计算规格描述,格式为"nCmG",表示n核mG内存实例 + * + * @param string $description + */ + public function setDescription($description) + { + $this->set("Description", $description); + } + + /** + * 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); + } + + /** + * Os: 内部云主机机型,可选"o/n" + * + * @return string|null + */ + public function getOs() + { + return $this->get("Os"); + } + + /** + * Os: 内部云主机机型,可选"o/n" + * + * @param string $os + */ + public function setOs($os) + { + $this->set("Os", $os); + } + + /** + * Group: 内存/cpu配比 + * + * @return string|null + */ + public function getGroup() + { + return $this->get("Group"); + } + + /** + * Group: 内存/cpu配比 + * + * @param string $group + */ + public function setGroup($group) + { + $this->set("Group", $group); + } +} diff --git a/src/UDB/Models/TableData.php b/src/UDB/Models/TableData.php new file mode 100644 index 00000000..573052dd --- /dev/null +++ b/src/UDB/Models/TableData.php @@ -0,0 +1,84 @@ +get("TableName"); + } + + /** + * TableName: 表名称 + * + * @param string $tableName + */ + public function setTableName($tableName) + { + $this->set("TableName", $tableName); + } + + /** + * DBName: 表所属的库名称 + * + * @return string|null + */ + public function getDBName() + { + return $this->get("DBName"); + } + + /** + * DBName: 表所属的库名称 + * + * @param string $dbName + */ + public function setDBName($dbName) + { + $this->set("DBName", $dbName); + } + + /** + * Engine: 表的引擎(innodb, myisam) + * + * @return string|null + */ + public function getEngine() + { + return $this->get("Engine"); + } + + /** + * Engine: 表的引擎(innodb, myisam) + * + * @param string $engine + */ + public function setEngine($engine) + { + $this->set("Engine", $engine); + } +} diff --git a/src/UDB/Models/UDBBackupSet.php b/src/UDB/Models/UDBBackupSet.php index 975f5f0e..d5e87c17 100644 --- a/src/UDB/Models/UDBBackupSet.php +++ b/src/UDB/Models/UDBBackupSet.php @@ -1,6 +1,6 @@ get("Zone"); + } + + /** + * Zone: 备份所在可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + /** * BackupId: 备份id * @@ -142,6 +162,26 @@ public function setState($state) $this->set("State", $state); } + /** + * ErrorInfo: 备份错误信息 + * + * @return string|null + */ + public function getErrorInfo() + { + return $this->get("ErrorInfo"); + } + + /** + * ErrorInfo: 备份错误信息 + * + * @param string $errorInfo + */ + public function setErrorInfo($errorInfo) + { + $this->set("ErrorInfo", $errorInfo); + } + /** * DBId: dbid * @@ -182,26 +222,6 @@ public function setDBName($dbName) $this->set("DBName", $dbName); } - /** - * Zone: 备份所在可用区 - * - * @return string|null - */ - public function getZone() - { - return $this->get("Zone"); - } - - /** - * Zone: 备份所在可用区 - * - * @param string $zone - */ - public function setZone($zone) - { - $this->set("Zone", $zone); - } - /** * BackupZone: 跨机房高可用备库所在可用区 * @@ -241,4 +261,24 @@ public function setBackupEndTime($backupEndTime) { $this->set("BackupEndTime", $backupEndTime); } + + /** + * MD5: 备份文件的MD5值,备份完成后显示,备份中或备份失败时为空,目前只支持Mysql NVMe机型与Mongo + * + * @return string|null + */ + public function getMD5() + { + return $this->get("MD5"); + } + + /** + * MD5: 备份文件的MD5值,备份完成后显示,备份中或备份失败时为空,目前只支持Mysql NVMe机型与Mongo + * + * @param string $md5 + */ + public function setMD5($md5) + { + $this->set("MD5", $md5); + } } diff --git a/src/UDB/Models/UDBDatabaseData.php b/src/UDB/Models/UDBDatabaseData.php new file mode 100644 index 00000000..713a142f --- /dev/null +++ b/src/UDB/Models/UDBDatabaseData.php @@ -0,0 +1,76 @@ +get("DBName"); + } + + /** + * DBName: 数据库名称 + * + * @param string $dbName + */ + public function setDBName($dbName) + { + $this->set("DBName", $dbName); + } + + /** + * TableDataSet: 该库所有的表集合 + * + * @return TableData[]|null + */ + public function getTableDataSet() + { + $items = $this->get("TableDataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new TableData($item)); + } + return $result; + } + + /** + * TableDataSet: 该库所有的表集合 + * + * @param TableData[] $tableDataSet + */ + public function setTableDataSet(array $tableDataSet) + { + $result = []; + foreach ($tableDataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDB/Models/UDBInstanceBinlogSet.php b/src/UDB/Models/UDBInstanceBinlogSet.php index 3174cdcf..5f165b18 100644 --- a/src/UDB/Models/UDBInstanceBinlogSet.php +++ b/src/UDB/Models/UDBInstanceBinlogSet.php @@ -1,6 +1,6 @@ set("Zone", $zone); } + /** + * CaseSensitivityParam: 0区分大小写, 1不分区 + * + * @return integer|null + */ + public function getCaseSensitivityParam() + { + return $this->get("CaseSensitivityParam"); + } + + /** + * CaseSensitivityParam: 0区分大小写, 1不分区 + * + * @param int $caseSensitivityParam + */ + public function setCaseSensitivityParam($caseSensitivityParam) + { + $this->set("CaseSensitivityParam", $caseSensitivityParam); + } + /** * ClusterRole: 当DB类型为mongodb时,返回该实例所在集群中的角色,包括:mongos、configsrv_sccc、configsrv_csrs、shardsrv_datanode、shardsrv_arbiter,其中congfigsrv分为sccc和csrs两种模式,shardsrv分为datanode和arbiter两种模式 * @@ -263,7 +283,7 @@ public function setInstanceType($instanceType) } /** - * InstanceTypeId: UDB数据库机型ID + * InstanceTypeId: UDB数据库机型ID (已弃用) * * @return integer|null */ @@ -273,7 +293,7 @@ public function getInstanceTypeId() } /** - * InstanceTypeId: UDB数据库机型ID + * InstanceTypeId: UDB数据库机型ID (已弃用) * * @param int $instanceTypeId */ @@ -423,7 +443,7 @@ public function setBackupBlacklist($backupBlacklist) } /** - * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败, Remakeing:重做中,RemakeFail:重做失败,VersionUpgrading:小版本升级中,VersionUpgradeWaitForSwitch:高可用等待切换,VersionUpgradeFail:小版本升级失败,UpdatingSSL:修改SSL中,UpdateSSLFail:修改SSL失败,MajorVersionUpgrading:小版本升级中,MajorVersionUpgradeWaitForSwitch:高可用等待切换,MajorVersionUpgradeFail * * @return string|null */ @@ -433,7 +453,7 @@ public function getState() } /** - * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败, Remakeing:重做中,RemakeFail:重做失败,VersionUpgrading:小版本升级中,VersionUpgradeWaitForSwitch:高可用等待切换,VersionUpgradeFail:小版本升级失败,UpdatingSSL:修改SSL中,UpdateSSLFail:修改SSL失败,MajorVersionUpgrading:小版本升级中,MajorVersionUpgradeWaitForSwitch:高可用等待切换,MajorVersionUpgradeFail * * @param string $state */ @@ -833,4 +853,144 @@ public function setUserUFileData(array $userUFileData) { $this->set("UserUFileData", $userUFileData->getAll()); } + + /** + * DBSubVersion: mysql实例提供具体小版本信息 + * + * @return string|null + */ + public function getDBSubVersion() + { + return $this->get("DBSubVersion"); + } + + /** + * DBSubVersion: mysql实例提供具体小版本信息 + * + * @param string $dbSubVersion + */ + public function setDBSubVersion($dbSubVersion) + { + $this->set("DBSubVersion", $dbSubVersion); + } + + /** + * EnableSSL: mysql是否开启了SSL;1->未开启 2->开启 + * + * @return integer|null + */ + public function getEnableSSL() + { + return $this->get("EnableSSL"); + } + + /** + * EnableSSL: mysql是否开启了SSL;1->未开启 2->开启 + * + * @param int $enableSSL + */ + public function setEnableSSL($enableSSL) + { + $this->set("EnableSSL", $enableSSL); + } + + /** + * SSLExpirationTime: SSL到期时间 + * + * @return integer|null + */ + public function getSSLExpirationTime() + { + return $this->get("SSLExpirationTime"); + } + + /** + * SSLExpirationTime: SSL到期时间 + * + * @param int $sslExpirationTime + */ + public function setSSLExpirationTime($sslExpirationTime) + { + $this->set("SSLExpirationTime", $sslExpirationTime); + } + + /** + * BackupMethod: 默认的备份方式,nobackup表示不备份, snapshot 表示使用快照备份,logic 表示使用逻辑备份,xtrabackup表示使用物理备份。 + * + * @return string|null + */ + public function getBackupMethod() + { + return $this->get("BackupMethod"); + } + + /** + * BackupMethod: 默认的备份方式,nobackup表示不备份, snapshot 表示使用快照备份,logic 表示使用逻辑备份,xtrabackup表示使用物理备份。 + * + * @param string $backupMethod + */ + public function setBackupMethod($backupMethod) + { + $this->set("BackupMethod", $backupMethod); + } + + /** + * MachineType: 数据库机型规格 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 数据库机型规格 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * SpecificationType: 是否使用可选cpu类型规格 + * + * @return integer|null + */ + public function getSpecificationType() + { + return $this->get("SpecificationType"); + } + + /** + * SpecificationType: 是否使用可选cpu类型规格 + * + * @param int $specificationType + */ + public function setSpecificationType($specificationType) + { + $this->set("SpecificationType", $specificationType); + } + + /** + * 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/UDB/Models/UDBParamGroupSet.php b/src/UDB/Models/UDBParamGroupSet.php index 62c09741..60801971 100644 --- a/src/UDB/Models/UDBParamGroupSet.php +++ b/src/UDB/Models/UDBParamGroupSet.php @@ -1,6 +1,6 @@ get("GroupType"); + } + + /** + * GroupType: 参数组类型:1:稳定版参数组,2:高性能版参数组。默认是稳定版参数组 + * + * @param int $groupType + */ + public function setGroupType($groupType) + { + $this->set("GroupType", $groupType); + } + /** * GroupId: 参数组id * diff --git a/src/UDB/Models/UDBParamMemberSet.php b/src/UDB/Models/UDBParamMemberSet.php index 2bc88af1..14191c02 100644 --- a/src/UDB/Models/UDBParamMemberSet.php +++ b/src/UDB/Models/UDBParamMemberSet.php @@ -1,6 +1,6 @@ set("Zone", $zone); } + /** + * ReplicationDelaySeconds: 延时从库时长 + * + * @return integer|null + */ + public function getReplicationDelaySeconds() + { + return $this->get("ReplicationDelaySeconds"); + } + + /** + * ReplicationDelaySeconds: 延时从库时长 + * + * @param int $replicationDelaySeconds + */ + public function setReplicationDelaySeconds($replicationDelaySeconds) + { + $this->set("ReplicationDelaySeconds", $replicationDelaySeconds); + } + /** * DBId: DB实例id * @@ -303,7 +323,7 @@ public function setBackupBlacklist($backupBlacklist) } /** - * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败,Remakeing:重做中,RemakeFail:重做失败, MajorVersionUpgrading:小版本升级中,MajorVersionUpgradeWaitForSwitch:高可用等待切换,MajorVersionUpgradeFail * * @return string|null */ @@ -313,7 +333,7 @@ public function getState() } /** - * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败,Remakeing:重做中,RemakeFail:重做失败, MajorVersionUpgrading:小版本升级中,MajorVersionUpgradeWaitForSwitch:高可用等待切换,MajorVersionUpgradeFail * * @param string $state */ @@ -743,22 +763,62 @@ public function setTag($tag) } /** - * IPv6Address: 获取该实例的IPv6地址 + * CaseSensitivityParam: 0 区分大小写, 1不区分, 只针对mysql8.0 + * + * @return integer|null + */ + public function getCaseSensitivityParam() + { + return $this->get("CaseSensitivityParam"); + } + + /** + * CaseSensitivityParam: 0 区分大小写, 1不区分, 只针对mysql8.0 + * + * @param int $caseSensitivityParam + */ + public function setCaseSensitivityParam($caseSensitivityParam) + { + $this->set("CaseSensitivityParam", $caseSensitivityParam); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @return integer|null + */ + public function getSpecificationType() + { + return $this->get("SpecificationType"); + } + + /** + * SpecificationType: 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * + * @param int $specificationType + */ + public function setSpecificationType($specificationType) + { + $this->set("SpecificationType", $specificationType); + } + + /** + * MachineType: 规格类型ID,当SpecificationType为1时有效 * * @return string|null */ - public function getIPv6Address() + public function getMachineType() { - return $this->get("IPv6Address"); + return $this->get("MachineType"); } /** - * IPv6Address: 获取该实例的IPv6地址 + * MachineType: 规格类型ID,当SpecificationType为1时有效 * - * @param string $iPv6Address + * @param string $machineType */ - public function setIPv6Address($iPv6Address) + public function setMachineType($machineType) { - $this->set("IPv6Address", $iPv6Address); + $this->set("MachineType", $machineType); } } diff --git a/src/UDB/Models/UDBTypeSet.php b/src/UDB/Models/UDBTypeSet.php index 72f6cb48..f4c4c3c2 100644 --- a/src/UDB/Models/UDBTypeSet.php +++ b/src/UDB/Models/UDBTypeSet.php @@ -1,6 +1,6 @@ set("DBTypeId", $dbTypeId); } + + /** + * DBSubVersion: mysql子版本,如mysql-8.0.25,mysql-8.0.16 + * + * @return string|null + */ + public function getDBSubVersion() + { + return $this->get("DBSubVersion"); + } + + /** + * DBSubVersion: mysql子版本,如mysql-8.0.25,mysql-8.0.16 + * + * @param string $dbSubVersion + */ + public function setDBSubVersion($dbSubVersion) + { + $this->set("DBSubVersion", $dbSubVersion); + } } diff --git a/src/UDB/Models/UFileDataSet.php b/src/UDB/Models/UFileDataSet.php index b21883be..906ca859 100644 --- a/src/UDB/Models/UFileDataSet.php +++ b/src/UDB/Models/UFileDataSet.php @@ -1,6 +1,6 @@ get("Key"); + } + + /** + * Key: 用户资源标签的键值 + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: 用户资源标签值 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 用户资源标签值 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UDB/Params/CreateUDBMySQLInstanceParamLabels.php b/src/UDB/Params/CreateUDBMySQLInstanceParamLabels.php new file mode 100644 index 00000000..eaf3eb85 --- /dev/null +++ b/src/UDB/Params/CreateUDBMySQLInstanceParamLabels.php @@ -0,0 +1,64 @@ +get("Key"); + } + + /** + * Key: 用户资源标签的键值 + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: 用户资源标签值 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 用户资源标签值 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UDB/Params/CreateUDBSQLServerInstanceParamLabels.php b/src/UDB/Params/CreateUDBSQLServerInstanceParamLabels.php new file mode 100644 index 00000000..dae1ec3f --- /dev/null +++ b/src/UDB/Params/CreateUDBSQLServerInstanceParamLabels.php @@ -0,0 +1,64 @@ +get("Key"); + } + + /** + * Key: 用户资源标签的键值 + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: 用户资源标签值 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 用户资源标签值 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UDB/UDBClient.php b/src/UDB/UDBClient.php index 8d0ed372..2a9aad47 100644 --- a/src/UDB/UDBClient.php +++ b/src/UDB/UDBClient.php @@ -1,6 +1,6 @@ (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) DB实例Id,该值可以通过DescribeUDBInstance获取 * "BackupName" => (string) 备份名称 * "UseBlacklist" => (boolean) 是否使用黑名单备份,默认false - * "BackupMethod" => (string) 使用的备份方式。(快照备份即物理备份。注意只有SSD版本的mysql实例支持设置为snapshot) + * "BackupMethod" => (string) 使用的备份方式。默认使用逻辑备份(快照备份即物理备份。SSD版本的mysql/mongodb实例支持设置为snapshot,NVMe版本的mysql实例支持设置为xtrabackup) * "Blacklist" => (string) 备份黑名单列表,以 ; 分隔。注意:只有逻辑备份下备份黑名单才生效,快照备份备份黑名单下无效 * "ForceBackup" => (boolean) true表示逻辑备份时是使用 --force 参数,false表示不使用 --force 参数。物理备份此参数无效。 * ] @@ -182,9 +202,9 @@ public function backupUDBInstance(BackupUDBInstanceRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) DB实例Id,该值可以通过DescribeUDBInstance获取 * "BackupFile" => (string) 需要备份文件,可通过DescribeUDBInstanceBinlog获得 如果要传入多个文件名,以空格键分割,用单引号包含. * "BackupName" => (string) DB备份文件名称 @@ -212,9 +232,9 @@ public function backupUDBInstanceBinlog(BackupUDBInstanceBinlogRequest $request * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) DB实例Id,该值可以通过DescribeUDBInstance获取 * "BackupName" => (string) 备份名称 * ] @@ -241,8 +261,8 @@ public function backupUDBInstanceErrorLog(BackupUDBInstanceErrorLogRequest $requ * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) DB实例Id,该值可以通过DescribeUDBInstance获取 * "BeginTime" => (integer) 过滤条件:起始时间(时间戳) * "EndTime" => (integer) 过滤条件:结束时间(时间戳) @@ -271,9 +291,9 @@ public function backupUDBInstanceSlowLog(BackupUDBInstanceSlowLogRequest $reques * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) DB实例Id * "GroupId" => (string) 参数组Id * ] @@ -300,10 +320,10 @@ public function changeUDBParamGroup(ChangeUDBParamGroupRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - * "SrcDBId" => (string) 源实例的Id + * "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) + * "SrcDBId" => (string) 源实例的Id(只支持普通版DB不支持高可用) * ] * * Outputs: @@ -357,9 +377,9 @@ public function checkUDBInstanceToHAAllowance(CheckUDBInstanceToHAAllowanceReque * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) DB实例的id,该值可以通过DescribeUDBInstance获取 * "LogType" => (integer) 日志类型,10-error(暂不支持)、20-slow(暂不支持 )、30-binlog * "BeforeTime" => (integer) 删除时间点(至少前一天)之前log,采用时间戳(秒),默认当 前时间点前一天 @@ -387,15 +407,15 @@ public function clearUDBLog(ClearUDBLogRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "Name" => (string) PrimaryDB实例名称,至少6位 * "AdminPassword" => (string) 管理员密码 - * "DBTypeId" => (string) DB类型id对应的字符串形式(例如:mongodb-2.6)注意:当前仅支持mongodb + * "DBTypeId" => (string) DB类型id对应的字符串形式 mongodb-3.4,mongodb-3.6,mongodb-4.0 * "DiskSpace" => (integer) 磁盘空间(GB), 暂时支持20G - 3000G * "ParamGroupId" => (integer) DB实例使用的配置参数组id - * "MemoryLimit" => (integer) 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M + * "MemoryLimit" => (integer) 内存限制(MB),目前支持以下几档 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M * "Port" => (integer) 端口号 * "ChargeType" => (string) Year, Month, Dynamic,Trial,默认: Month * "Quantity" => (integer) 购买时长(N个月),默认值1个月。如果为0,代表购买到月底。 @@ -403,10 +423,7 @@ public function clearUDBLog(ClearUDBLogRequest $request = null) * "BackupCount" => (integer) 备份策略,每周备份数量,默认7次 * "BackupTime" => (integer) 备份策略,备份开始时间,单位小时计,默认1点 * "BackupDuration" => (integer) 备份策略,备份时间间隔,单位小时计,默认24小时 - * "UseSSD" => (boolean) 是否使用SSD,默认为true - * "SSDType" => (string) SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 * "CPU" => (integer) cpu核数 - * "InstanceType" => (string) UDB数据库机型 * "SubnetId" => (string) 子网ID * "VPCId" => (string) VPC的ID * "ClusterId" => (string) 所属分片集群的ID @@ -436,16 +453,16 @@ public function createMongoDBReplicaSet(CreateMongoDBReplicaSetRequest $request * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "Name" => (string) 实例名称,至少6位 * "AdminPassword" => (string) 管理员密码 - * "DBTypeId" => (string) DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6,14:postgresql-10.4 - * "Port" => (integer) 端口号,mysql默认3306,mongodb默认27017,postgresql默认5432 + * "DBTypeId" => (string) DB类型,mysql/sqlserver按版本细分 mysql-8.0, mysql-5.6, percona-5.6, mysql-5.7, percona-5.7, sqlserver-2017 + * "Port" => (integer) 端口号,mysql默认3306,sqlserver默认1433 * "DiskSpace" => (integer) 磁盘空间(GB), 暂时支持20G - 32T * "ParamGroupId" => (integer) DB实例使用的配置参数组id - * "MemoryLimit" => (integer) 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * "MemoryLimit" => (integer) 内存限制(MB)(待废弃,请通过指定MachineType和SpecificationType创建),目前支持以下几档 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M * "ChargeType" => (string) Year, Month, Dynamic,Trial,默认: Month * "Quantity" => (integer) 购买时长,默认值1 * "AdminUser" => (string) 管理员帐户名,默认root @@ -453,19 +470,31 @@ public function createMongoDBReplicaSet(CreateMongoDBReplicaSetRequest $request * "BackupTime" => (integer) 备份策略,备份开始时间,单位小时计,默认1点 * "BackupDuration" => (integer) 备份策略,备份时间间隔,单位小时计,默认24小时 * "BackupId" => (integer) 备份id,如果指定,则表明从备份恢复实例 - * "UseSSD" => (boolean) 是否使用SSD,默认为true。目前主要可用区、海外机房、新机房只提供SSD资源,非SSD资源不再提供。 - * "SSDType" => (string) SSD类型,可选值为"SATA"、“NVMe”,如果UseSSD为true ,则必选 + * "InstanceType" => (string) 对于快杰机型,请使用最新的 SpecificationClass 和 StorageClass 字段进行创建。目前仅有少量地域支持 SATA_SSD 存储类型;若创建的是 SATA_SSD 机型,可通过该字段指定。字段说明:SATA_SSD:SATA SSD 机型(仅部分地域支持)NVMe_SSD:快杰机型 + * "SSDType" => (string) 已废弃 * "InstanceMode" => (string) UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" - * "UDBCId" => (string) 专区ID信息(如果这个参数存在这说明是在专区中创建DB) - * "CPU" => (integer) cpu核数 - * "BackupZone" => (string) 跨可用区高可用备库所在可用区,参见 [可用区列表](../summary/regionlist.html) + * "CPU" => (integer) cpu核数,如果db类型为sqlserver,必传参数 + * "BackupZone" => (string) 跨可用区高可用备库所在可用区,参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "SubnetId" => (string) 子网ID * "VPCId" => (string) VPC的ID * "DisableSemisync" => (boolean) 是否开启异步高可用,默认不填,可置为true - * "ClusterRole" => (string) 当DB类型(DBTypeId)为mongodb时,需要指定mongo的角色,可选值为configsrv (配置节点),shardsrv (数据节点) - * "HAArch" => (string) 高可用架构:1) haproxy(默认): 当前仅支持mysql。2) sentinel: 基于vip和哨兵节点的架构,当前支持mysql和pg。 + * "ClusterRole" => (string) 已废弃 * "Tag" => (string) 实例所在的业务组名称 - * "EnableIpV6" => (boolean) 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + * "DBSubVersion" => (string) MySQL 小版本号,支持指定小版本进行创建,请通过 DescribeUDBType 接口获取可用版本。 + * "CaseSensitivityParam" => (integer) mysql大小写参数, 0 为大小写敏感, 1 为大小写不敏感, 目前只针对mysql8.0有效 + * "SpecificationType" => (string) 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * "MachineType" => (string) 规格类型 ID,当 SpecificationType = 1 时生效,请通过 ListUDBMachineType 接口获取。 + * "AlarmTemplateId" => (string) 告警模版id + * "BackupURL" => (string) 备份文件的US3内网下载地址 + * "StorageClass" => (string) 存储类型 CLOUD_SSD: SSD云盘, CLOUD_RSSD: RSSD 云盘, CLOUD_SSD_ESSENTIAL: SSD Essential云盘 ,该字段和SpecificationClass组合优先级比InstanceType字段高 + * "SpecificationClass" => (string) 规格类型 O: NVMe型, OM: 共享型,N: 通用型 + * "SemisyncFlag" => (integer) 半同步开启开关 1:表示开启半同步,2:表示关闭半同步,0:表示默认值,默认也是开启半同步 + * "Labels" => (array) [ + * [ + * "Key" => (string) 用户资源标签的键值 + * "Value" => (string) 用户资源标签值 + * ] + * ] * "CouponId" => (string) 使用的代金券id * ] * @@ -492,9 +521,9 @@ public function createUDBInstance(CreateUDBInstanceRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "Name" => (string) 实例名称,至少6位 * "SrcDBId" => (string) 源实例的Id * "RecoveryTime" => (integer) 恢复到某个时间点的时间戳(UTC时间格式,默认单位秒) @@ -505,6 +534,10 @@ public function createUDBInstance(CreateUDBInstanceRequest $request = null) * "SubnetId" => (string) 子网ID * "VPCId" => (string) VPC的ID * "EnableIpV6" => (boolean) 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + * "Tables" => (string) 指定需要恢复的表, 如果指定该字段则回档实例只有指定的表数据,格式为(库名.表名), 指定多个用逗号隔开,eg: [ udb.test, mysql_school.my_student] + * "AdminPassword" => (string) 管理员密码 (指定库表回档到新实例时有效) + * "SpecificationType" => (integer) 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * "MachineType" => (string) 规格类型ID,当SpecificationType为1时有效 * "CouponId" => (string) 使用的代金券id * ] * @@ -523,6 +556,67 @@ public function createUDBInstanceByRecovery(CreateUDBInstanceByRecoveryRequest $ return new CreateUDBInstanceByRecoveryResponse($resp->toArray(), $resp->getRequestId()); } + /** + * CreateUDBMySQLInstance - 创建UDB实例(包括创建mysql NVMe、共享型和O2实例以及从备份恢复实例) + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_my_sql_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) + * "Name" => (string) 实例名称,至少6位 + * "AdminPassword" => (string) 管理员密码 + * "DBTypeId" => (string) DB类型,mysql按版本细分 mysql-8.4, mysql-8.0, mysql-5.7, percona-5.7, mysql-5.6, percona-5.6、mysql-5.5 + * "Port" => (integer) 端口号,mysql默认3306 + * "DiskSpace" => (integer) 磁盘空间(GB), 暂时支持20G - 32T + * "ParamGroupId" => (integer) DB实例使用的配置参数组id + * "MachineType" => (string) 规格类型 ID,请通过 ListUDBMachineType 接口获取,返回体中的ID字段为MachineType的值。 + * "StorageClass" => (string) 存储类型 CLOUD_RSSD: RSSD 云盘, CLOUD_SSD_ESSENTIAL: SSD Essential云盘 ,该字段和SpecificationClass组合使用,CLOUD_RSSD对应O型,CLOUD_SSD_ESSENTIAL对应OM型(北京2、乌兰察布支持),注:圣保罗、丹佛、哈萨克斯坦地域仅支持O2机型,CLOUD_RSSD对应O2型 + * "SpecificationClass" => (string) 规格类型 O: NVMe型, O2: O2 ,OM: 共享型 + * "ChargeType" => (string) Year, Month, Dynamic,Trial,默认: Month + * "Quantity" => (integer) 购买时长,默认值1 + * "BackupCount" => (integer) 备份策略,每周备份数量,默认7次 + * "BackupTime" => (integer) 备份策略,备份开始时间,单位小时计,默认1点 + * "BackupDuration" => (integer) 备份策略,备份时间间隔,单位小时计,默认24小时 + * "BackupId" => (integer) 备份id,如果指定,则表明从备份恢复实例 + * "InstanceMode" => (string) UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * "BackupZone" => (string) 跨可用区高可用备库所在可用区,参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "SubnetId" => (string) 子网ID + * "VPCId" => (string) VPC的ID + * "DisableSemisync" => (boolean) 是否开启异步高可用,默认不填,可置为true + * "Tag" => (string) 实例所在的业务组名称 + * "DBSubVersion" => (string) MySQL 小版本号,支持指定小版本进行创建,请通过 DescribeUDBType 接口获取可用版本。 + * "CaseSensitivityParam" => (integer) mysql大小写参数, 0 为大小写敏感, 1 为大小写不敏感, 目前只针对mysql8.0有效 + * "AlarmTemplateId" => (string) 告警模版id + * "BackupURL" => (string) 备份文件的US3内网下载地址 + * "SemisyncFlag" => (integer) 半同步开启开关 1:表示开启半同步,2:表示关闭半同步,0:表示默认值,默认也是开启半同步 + * "Labels" => (array) [ + * [ + * "Key" => (string) 用户资源标签的键值 + * "Value" => (string) 用户资源标签值 + * ] + * ] + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "DBId" => (string) BD实例id + * ] + * + * @return CreateUDBMySQLInstanceResponse + * @throws UCloudException + */ + public function createUDBMySQLInstance(CreateUDBMySQLInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUDBMySQLInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + /** * CreateUDBParamGroup - 从已有配置文件创建新配置文件 * @@ -564,14 +658,17 @@ public function createUDBParamGroup(CreateUDBParamGroupRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "SrcId" => (string) primary节点的DBId,该值可以通过DescribeUDBInstance获取 * "Name" => (string) 实例名称,至少6位 * "Port" => (integer) 端口号,默认27017,取值范围3306至65535。 * "IsArbiter" => (boolean) 是否是仲裁节点,默认false,仲裁节点按最小机型创建 - * "UseSSD" => (boolean) 是否使用SSD,默认 为 true + * "UseSSD" => (boolean) 是否使用SSD,默认为true。目前主要可用区、海外机房、新机房只提供SSD资源,非SSD资源不再提供。 + * "InstanceType" => (string) UDB数据库机型: "Normal": "标准机型" , "SATA_SSD": "SSD机型" , "PCIE_SSD": "SSD高性能机型" , "Normal_Volume": "标准大容量机型", "SATA_SSD_Volume": "SSD大容量机型" , "PCIE_SSD_Volume": "SSD高性能大容量机型", "NVMe_SSD": "快杰机型" + * "ChargeType" => (string) Year, Month, Dynamic,Trial,默认和主库保持一致 + * "Quantity" => (string) 购买时长,默认默认和主库保持一致 * "CouponId" => (string) 使用的代金券id * ] * @@ -629,6 +726,63 @@ public function createUDBRouteInstance(CreateUDBRouteInstanceRequest $request = return new CreateUDBRouteInstanceResponse($resp->toArray(), $resp->getRequestId()); } + /** + * CreateUDBSQLServerInstance - 创建UDB实例(包括创建SQLServer实例以及从备份恢复实例) + * + * See also: https://docs.ucloud.cn/api/udb-api/create_udb_sql_server_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) + * "Name" => (string) 实例名称,至少6位 + * "AdminPassword" => (string) 管理员密码 + * "DBTypeId" => (string) DB类型,SQL Server按版本细分 sqlserver-2017、sqlserver-2019、sqlserver-2022 + * "Port" => (integer) 端口号,sqlserver默认1433 + * "DiskSpace" => (integer) 磁盘空间(GB), 暂时支持20G - 32T + * "StorageClass" => (string) 存储类型 CLOUD_RSSD: RSSD 云盘,该字段和SpecificationClass组合使用,CLOUD_RSSD对应O型 + * "SpecificationClass" => (string) 规格类型 O: NVMe型 + * "InstanceMode" => (string) UDB实例模式类型, 可选值如下: "Normal": SQL Server普通版实例 "HA": SQL Server集群版实例 默认是"Normal" + * "MachineType" => (string) 规格类型 ID,如果创建的是SQL Server集群版,该参数必填,请通过 ListUDBMachineType 接口获取,返回体中的ID字段为MachineType的值。 + * "CPU" => (integer) CPU核,如果是创建的SQL Server普通版,该参数必传,目前支持2/4/8/16/32/64 + * "MemoryLimit" => (integer) 内存限制(MB),如果是创建的SQL Server普通版,该参数必传,目前支持以下几档 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * "ChargeType" => (string) Year, Month, Dynamic,Trial,默认: Month + * "Quantity" => (integer) 购买时长,默认值1 + * "BackupCount" => (integer) 备份策略,每周备份数量,默认7次 + * "BackupTime" => (integer) 备份策略,备份开始时间,单位小时计,默认1点 + * "BackupDuration" => (integer) 备份策略,备份时间间隔,单位小时计,默认24小时 + * "BackupId" => (integer) 备份id,如果指定,则表明从备份恢复实例 + * "SubnetId" => (string) 子网ID,如果创建的是SQL Server集群版,该参数必填 + * "VPCId" => (string) VPC的ID,如果创建的是SQL Server集群版,该参数必填 + * "Tag" => (string) 实例所在的业务组名称 + * "AlarmTemplateId" => (string) 告警模版id + * "BackupURL" => (string) 备份文件的US3内网下载地址 + * "Labels" => (array) [ + * [ + * "Key" => (string) 用户资源标签的键值 + * "Value" => (string) 用户资源标签值 + * ] + * ] + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "DBId" => (string) BD实例id + * ] + * + * @return CreateUDBSQLServerInstanceResponse + * @throws UCloudException + */ + public function createUDBSQLServerInstance(CreateUDBSQLServerInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUDBSQLServerInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + /** * CreateUDBSlave - 创建UDB实例的slave * @@ -637,24 +791,25 @@ public function createUDBRouteInstance(CreateUDBRouteInstanceRequest $request = * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "SrcId" => (string) master实例的DBId,该值可以通过DescribeUDBInstance获取 * "Name" => (string) 实例名称,至少6位 * "Port" => (integer) 端口号 - * "UseSSD" => (boolean) 是否使用SSD,默认为true - * "SSDType" => (string) SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + * "SSDType" => (string) 仅对主为SSD型实例有效。 可选值"SATA","NVMe" * "IsLock" => (boolean) 是否锁主库,默认为true - * "InstanceMode" => (string) UDB实例部署模式,可选值如下:Normal: 普通单点实例HA: 高可用部署实例 - * "MemoryLimit" => (integer) 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * "MemoryLimit" => (integer) 内存限制(MB),目前支持以下几档 2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M * "DiskSpace" => (integer) 磁盘空间(GB), 暂时支持20G - 3000G(API支持,前端暂时只开放内存定制) - * "InstanceType" => (string) UDB实例类型:Normal、SATA_SSD、NVMe_SSD * "SubnetId" => (string) 子网ID(如果不传用默认子网) * "VPCId" => (string) VPCID(如果不传用默认的VPC) * "ChargeType" => (string) Year, Month, Dynamic,Trial,默认和主库保持一致 * "Quantity" => (integer) 购买时长,默认默认和主库保持一致 * "ParamGroupId" => (integer) DB实例使用的配置参数组id,默认和主库保持一致 + * "IsCreatePhysically" => (boolean) 使用物理方式创建从库,目前仅限创建快杰从库,默认为false + * "DelaySeconds" => (integer) 设置从库的延时复制时长(单位秒) + * "SpecificationType" => (integer) 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * "MachineType" => (string) 规格类型ID,当SpecificationType为1时有效 * "CouponId" => (string) 使用的代金券id * ] * @@ -681,9 +836,9 @@ public function createUDBSlave(CreateUDBSlaveRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) DB实例的id,该值可以通过DescribeUDBInstance获取 * "UDBCId" => (string) 专区ID * ] @@ -761,22 +916,23 @@ public function deleteUDBParamGroup(DeleteUDBParamGroupRequest $request = null) } /** - * DescribeUDBBackup - 列表UDB实例备份信息 + * DescribeUDBBackup - 列表UDB实例备份信息.Zone不填表示多可用区,填代表单可用区 * * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_backup * * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "Offset" => (integer) 分页显示的起始偏移,列表操作则指定 * "Limit" => (integer) 分页显示的条目数,列表操作则指定 * "DBId" => (string) DB实例Id,如果指定,则只获取该db的备份信息 该值可以通过DescribeUDBInstance获取 * "BackupType" => (integer) 备份类型,取值为0或1,0表示自动,1表示手动 * "BeginTime" => (integer) 过滤条件:起始时间(Unix时间戳) * "EndTime" => (integer) 过滤条件:结束时间(Unix时间戳) + * "ClassType" => (string) 如果未指定GroupId,则可选是否选取特定DB类型的配置(sql, nosql, postgresql, sqlserver) * ] * * Outputs: @@ -784,17 +940,19 @@ public function deleteUDBParamGroup(DeleteUDBParamGroupRequest $request = null) * $outputs = [ * "DataSet" => (array) 备份信息 参照UDBBackupSet[ * [ + * "Zone" => (string) 备份所在可用区 * "BackupId" => (integer) 备份id * "BackupName" => (string) 备份名称 * "BackupTime" => (integer) 备份时间(Unix时间戳) * "BackupSize" => (integer) 备份文件大小(字节) * "BackupType" => (integer) 备份类型,取值为0或1,0表示自动,1表示手动 * "State" => (string) 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + * "ErrorInfo" => (string) 备份错误信息 * "DBId" => (string) dbid * "DBName" => (string) 对应的db名称 - * "Zone" => (string) 备份所在可用区 * "BackupZone" => (string) 跨机房高可用备库所在可用区 * "BackupEndTime" => (integer) 备份完成时间(Unix时间戳) + * "MD5" => (string) 备份文件的MD5值,备份完成后显示,备份中或备份失败时为空,目前只支持Mysql NVMe机型与Mongo * ] * ] * "TotalCount" => (integer) 满足条件备份总数,如果指定dbid,则是该db备份总数 @@ -839,17 +997,65 @@ public function describeUDBBackupBlacklist(DescribeUDBBackupBlacklistRequest $re } /** - * DescribeUDBBinlogBackupURL - 获取UDB的Binlog备份地址 + * DescribeUDBBinlogBackup - 列表UDB实例Binlog自动备份信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_binlog_backup + * + * 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) 分页显示的起始偏移,列表操作则指定 + * "Limit" => (integer) 分页显示的条目数,列表操作则指定 + * "DBId" => (string) DB实例Id,如果指定,则只获取该db的备份信息; 当Type为2时必填 + * "BeginTime" => (integer) 过滤条件:起始时间(时间戳) + * "EndTime" => (integer) 过滤条件:结束时间(时间戳) + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) Binlog备份信息 参见BinlogBackupSet[ + * [ + * "BackupId" => (integer) 备份id + * "BackupName" => (string) 备份名称 + * "BackupTime" => (integer) 备份时间 + * "BackupSize" => (integer) 备份文件大小 + * "State" => (string) 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + * "BinlogType" => (string) binlog备份类型 Manual:手动备份 ,Auto:自动备份 + * "DBId" => (string) dbid + * "ServerId" => (string) 节点标识ID + * "LogStartTime" => (integer) 日志开始时间 + * "LogEndTime" => (integer) 日志结束时间 + * ] + * ] + * "TotalCount" => (integer) 备份总数,如果指定dbid,则是该db备份总数 + * ] + * + * @return DescribeUDBBinlogBackupResponse + * @throws UCloudException + */ + public function describeUDBBinlogBackup(DescribeUDBBinlogBackupRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUDBBinlogBackupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBBinlogBackupURL - 获取UDB的Binlog或者错误日志或者慢查询日志的备份地址 * * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_binlog_backup_url * * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "DBId" => (string) DB实例Id - * "BackupId" => (integer) DB实例binlog备份ID,可以从DescribeUDBLogPackage结果当中获得 + * "BackupId" => (integer) DB实例日志备份ID,可以从DescribeUDBLogPackage结果当中获得 + * "BinlogType" => (string) binlog备份类型 Manual:手动备份 ,Auto:自动备份 * ] * * Outputs: @@ -876,9 +1082,9 @@ public function describeUDBBinlogBackupURL(DescribeUDBBinlogBackupURLRequest $re * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区,不填时默认全部可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区,不填时默认全部可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "ClassType" => (string) DB种类,如果是列表操作,则需要指定,不区分大小写,其取值如下:mysql: SQL;mongo: NOSQL;postgresql: postgresql * "Offset" => (integer) 分页显示起始偏移位置,列表操作时必填 * "Limit" => (integer) 分页显示数量,列表操作时必填 @@ -886,6 +1092,8 @@ public function describeUDBBinlogBackupURL(DescribeUDBBinlogBackupURLRequest $re * "IsInUDBC" => (boolean) 是否查看专区里面DB * "UDBCId" => (string) IsInUDBC为True,UDBCId为空,说明查看整个可用区的专区的db,如果UDBId不为空则只查看此专区下面的db * "IncludeSlaves" => (boolean) 当只获取这个特定DBId的信息时,如果有该选项,那么把这个DBId实例的所有从库信息一起拉取并返回 + * "VPCId" => (string) 根据VPCId筛选DB + * "Tag" => (string) 根据 业务组 筛选DB * ] * * Outputs: @@ -894,6 +1102,7 @@ public function describeUDBBinlogBackupURL(DescribeUDBBinlogBackupURLRequest $re * "DataSet" => (array) DB实例信息列表 UDBInstanceSet[ * [ * "Zone" => (string) DB实例所在可用区 + * "CaseSensitivityParam" => (integer) 0区分大小写, 1不分区 * "ClusterRole" => (string) 当DB类型为mongodb时,返回该实例所在集群中的角色,包括:mongos、configsrv_sccc、configsrv_csrs、shardsrv_datanode、shardsrv_arbiter,其中congfigsrv分为sccc和csrs两种模式,shardsrv分为datanode和arbiter两种模式 * "DBId" => (string) DB实例id * "Name" => (string) 实例名称,至少6位 @@ -905,7 +1114,7 @@ public function describeUDBBinlogBackupURL(DescribeUDBBinlogBackupURLRequest $re * "VPCId" => (string) VPC的ID * "SubnetId" => (string) 子网ID * "InstanceType" => (string) UDB数据库机型 - * "InstanceTypeId" => (integer) UDB数据库机型ID + * "InstanceTypeId" => (integer) UDB数据库机型ID (已弃用) * "Tag" => (string) 获取资源其他信息 * "Port" => (integer) 端口号,mysql默认3306,mongodb默认27017 * "SrcDBId" => (string) 对mysql的slave而言是master的DBId,对master则为空, 对mongodb则是副本集id @@ -913,7 +1122,7 @@ public function describeUDBBinlogBackupURL(DescribeUDBBinlogBackupURLRequest $re * "BackupBeginTime" => (integer) 备份策略,不可修改,开始时间,单位小时计,默认3点 * "BackupDuration" => (integer) 备份策略,一天内备份时间间隔,单位小时,默认24小时 * "BackupBlacklist" => (string) 备份策略,备份黑名单,mongodb则不适用 - * "State" => (string) DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * "State" => (string) DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败, Remakeing:重做中,RemakeFail:重做失败,VersionUpgrading:小版本升级中,VersionUpgradeWaitForSwitch:高可用等待切换,VersionUpgradeFail:小版本升级失败,UpdatingSSL:修改SSL中,UpdateSSLFail:修改SSL失败,MajorVersionUpgrading:小版本升级中,MajorVersionUpgradeWaitForSwitch:高可用等待切换,MajorVersionUpgradeFail * "CreateTime" => (integer) DB实例创建时间,采用UTC计时时间戳 * "ModifyTime" => (integer) DB实例修改时间,采用UTC计时时间戳 * "ExpiredTime" => (integer) DB实例过期时间,采用UTC计时时间戳 @@ -932,6 +1141,7 @@ public function describeUDBBinlogBackupURL(DescribeUDBBinlogBackupURLRequest $re * "DataSet" => (array) 如果在需要返回从库的场景下,返回该DB实例的所有从库DB实例信息列表。列表中每一个元素的内容同UDBSlaveInstanceSet 。如果这个DB实例没有从库的情况下,此时返回一个空的列表[ * [ * "Zone" => (string) 可用区 + * "ReplicationDelaySeconds" => (integer) 延时从库时长 * "DBId" => (string) DB实例id * "Name" => (string) 实例名称,至少6位 * "DBTypeId" => (string) DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 @@ -945,7 +1155,7 @@ public function describeUDBBinlogBackupURL(DescribeUDBBinlogBackupURLRequest $re * "BackupBeginTime" => (integer) 备份策略,不可修改,开始时间,单位小时计,默认3点 * "BackupDuration" => (integer) 备份策略,一天内备份时间间隔,单位小时,默认24小时 * "BackupBlacklist" => (string) 备份策略,备份黑名单,mongodb则不适用 - * "State" => (string) DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * "State" => (string) DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败,Remakeing:重做中,RemakeFail:重做失败, MajorVersionUpgrading:小版本升级中,MajorVersionUpgradeWaitForSwitch:高可用等待切换,MajorVersionUpgradeFail * "CreateTime" => (integer) DB实例创建时间,采用UTC计时时间戳 * "ModifyTime" => (integer) DB实例修改时间,采用UTC计时时间戳 * "ExpiredTime" => (integer) DB实例过期时间,采用UTC计时时间戳 @@ -967,7 +1177,9 @@ public function describeUDBBinlogBackupURL(DescribeUDBBinlogBackupURLRequest $re * "InstanceType" => (string) UDB数据库机型 * "InstanceTypeId" => (integer) UDB数据库机型ID * "Tag" => (string) 获取资源其他信息 - * "IPv6Address" => (string) 获取该实例的IPv6地址 + * "CaseSensitivityParam" => (integer) 0 区分大小写, 1不区分, 只针对mysql8.0 + * "SpecificationType" => (integer) 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * "MachineType" => (string) 规格类型ID,当SpecificationType为1时有效 * ] * ] * "BackupZone" => (string) 跨可用区高可用备库所在可用区 @@ -976,6 +1188,13 @@ public function describeUDBBinlogBackupURL(DescribeUDBBinlogBackupURLRequest $re * "TokenID" => (string) Ufile的令牌tokenid * "Bucket" => (string) bucket名称 * ] + * "DBSubVersion" => (string) mysql实例提供具体小版本信息 + * "EnableSSL" => (integer) mysql是否开启了SSL;1->未开启 2->开启 + * "SSLExpirationTime" => (integer) SSL到期时间 + * "BackupMethod" => (string) 默认的备份方式,nobackup表示不备份, snapshot 表示使用快照备份,logic 表示使用逻辑备份,xtrabackup表示使用物理备份。 + * "MachineType" => (string) 数据库机型规格 + * "SpecificationType" => (integer) 是否使用可选cpu类型规格 + * "CPU" => (integer) CPU核数 * ] * ] * "TotalCount" => (integer) 用户db组的数量,对于 mysql: 主从结对数量,没有slave,则只有master mongodb: 副本集数量 @@ -1028,11 +1247,12 @@ public function describeUDBInstanceBackupState(DescribeUDBInstanceBackupStateReq * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) DB实例Id,该值可通过DescribeUDBInstance获取 * "BackupId" => (integer) DB实例备份ID,该值可以通过DescribeUDBBackup获取 + * "ValidTime" => (integer) DB响应中URL的过期时间,该值最小默认4小时,最大7天。不填默认为四小时。(单位/秒) * ] * * Outputs: @@ -1040,6 +1260,7 @@ public function describeUDBInstanceBackupState(DescribeUDBInstanceBackupStateReq * $outputs = [ * "BackupPath" => (string) DB实例备份文件公网的地址 * "InnerBackupPath" => (string) DB实例备份文件内网的地址 + * "MD5" => (string) 备份文件的md5值 * ] * * @return DescribeUDBInstanceBackupURLResponse @@ -1160,17 +1381,22 @@ public function describeUDBInstanceLog(DescribeUDBInstanceLogRequest $request = * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "MemoryLimit" => (integer) 内存限制(MB),单位为MB.目前支持:1000-96000 + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "MemoryLimit" => (integer) 内存限制(MB),单位为MB.目前支持:2000-96000 * "DiskSpace" => (integer) 磁盘空间(GB),暂时支持20(GB) - 3000(GB), 输入不带单位 * "DBTypeId" => (string) UDB实例的DB版本字符串 * "Count" => (integer) 购买DB实例数量,最大数量为10台, 默认为1台 * "ChargeType" => (string) Year,按年付费; Month,按月付费 Dynamic,按需付费(需开启权限) Trial,试用(需开启权限)默认为月付 * "Quantity" => (integer) DB购买多少个"计费时间单位",默认值为1。比如:买2个月,Quantity就是2。如果计费单位是“按月”,并且Quantity为0,表示“购买到月底” - * "UseSSD" => (string) 是否使用SSD,只能填true或false,默认为false - * "SSDType" => (string) SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必填 - * "InstanceMode" => (string) 实例的部署类型。可选值为:Normal: 普通单点实例,Slave: 从库实例,HA: 高可用部署实例,默认是Normal + * "SSDType" => (string) 该字段已废弃。 + * "InstanceMode" => (string) 实例的部署类型。可选值为:Normal: 普通单点实例,Slave: 从库实例,HA: 高可用部署实例,默认是Normal + * "CPU" => (integer) CPU个数,如果db类型为sqlserver,则为必填参数 + * "InstanceType" => (string) 对于快杰机型,请使用最新的 SpecificationClass 和 StorageClass 字段进行创建。目前仅有少量地域支持 SATA_SSD 存储类型;若创建的是 SATA_SSD 机型,可通过该字段指定。字段说明:SATA_SSD:SATA SSD 机型(仅部分地域支持)NVMe_SSD:快杰机型 + * "SpecificationType" => (integer) 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * "MachineType" => (string) 规格类型ID,当SpecificationType为1时有效 + * "StorageClass" => (string) 存储类型 CLOUD_SSD: SSD云盘, CLOUD_RSSD: RSSD 云盘, CLOUD_SSD_ESSENTIAL: SSD Essential云盘 ,该字段和SpecificationClass组合优先级比InstanceType字段高 + * "SpecificationClass" => (string) 规格类型 O: NVME, OM: 共享型,N: 通用型 * ] * * Outputs: @@ -1201,9 +1427,9 @@ public function describeUDBInstancePrice(DescribeUDBInstancePriceRequest $reques * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 * ] * @@ -1230,14 +1456,18 @@ public function describeUDBInstanceState(DescribeUDBInstanceStateRequest $reques * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) 实例的Id * "MemoryLimit" => (integer) 内存限制(MB) * "DiskSpace" => (integer) 磁盘空间(GB), 暂时支持20G - 500G - * "UseSSD" => (boolean) 是否使用SSD,默认为false - * "SSDType" => (string) SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 + * "SSDType" => (string) "SATA", "NVMe" + * "InstanceType" => (string) "SATA_SSD", "NVMe_SSD" + * "OrderStartTime" => (integer) 获取指定时间开始后面的升级价格, 不填的话 是默认当前时间 + * "CPU" => (integer) CPU核数 快杰SQLServer升降级必传 + * "MachineType" => (string) 规格类型ID,当SpecificationType为1时有效 + * "SpecificationType" => (integer) 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType * ] * * Outputs: @@ -1256,7 +1486,7 @@ public function describeUDBInstanceUpgradePrice(DescribeUDBInstanceUpgradePriceR } /** - * DescribeUDBLogBackupURL - 获取UDB的slowlog备份地址 + * DescribeUDBLogBackupURL - 获取UDB的错误日志或者慢查询日志备份地址 * * See also: https://docs.ucloud.cn/api/udb-api/describe_udb_log_backup_url * @@ -1267,7 +1497,7 @@ public function describeUDBInstanceUpgradePrice(DescribeUDBInstanceUpgradePriceR * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) DB实例Id - * "BackupId" => (integer) DB实例备份ID + * "BackupId" => (integer) DB实例日志备份ID, 可以从DescribeUDBLogPackage结果当中获得。 * ] * * Outputs: @@ -1294,14 +1524,14 @@ public function describeUDBLogBackupURL(DescribeUDBLogBackupURLRequest $request * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "Offset" => (integer) 分页显示的起始偏移,列表操作则指定 * "Limit" => (integer) 分页显示的条目数,列表操作则指定 - * "Type" => (integer) 需要列出的备份文件类型,每种文件的值如下 2 : BINLOG\_BACKUP 3 : SLOW\_QUERY\_BACKUP 4 : ERRORLOG\_BACKUP + * "Type" => (integer) 需要列出的备份文件类型,每种类型的值如下: 2 代表 BINLOG_BACKUP; 3 代表 SLOW_QUERY_BACKUP; 4 代表 ERRORLOG_BACKUP; * "Types" => (array) Types作为Type的补充,支持多值传入,可以获取多个类型的日志记录,如:Types.0=2&Types.1=3 - * "DBId" => (string) DB实例Id,如果指定,则只获取该db的备份信息 + * "DBId" => (string) DB实例Id,如果指定,则只获取该db的备份信息; 当Type为2时必填 * "BeginTime" => (integer) 过滤条件:起始时间(时间戳) * "EndTime" => (integer) 过滤条件:结束时间(时间戳) * ] @@ -1311,15 +1541,16 @@ public function describeUDBLogBackupURL(DescribeUDBLogBackupURLRequest $request * $outputs = [ * "DataSet" => (array) 备份信息 参见LogPackageDataSet[ * [ + * "Zone" => (string) 所在可用区 * "BackupId" => (integer) 备份id * "BackupName" => (string) 备份名称 * "BackupTime" => (integer) 备份时间 * "BackupSize" => (integer) 备份文件大小 * "BackupType" => (integer) 备份类型,包括2-binlog备份,3-slowlog备份 + * "BinlogType" => (string) binlog备份类型 Manual //手动备份 Auto //自动备份 * "State" => (string) 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 * "DBId" => (string) dbid * "DBName" => (string) 对应的db名称 - * "Zone" => (string) 所在可用区 * "BackupZone" => (string) 跨可用区高可用备库所在可用区 * ] * ] @@ -1359,6 +1590,7 @@ public function describeUDBLogPackage(DescribeUDBLogPackageRequest $request = nu * $outputs = [ * "DataSet" => (array) 参数组列表 参照UDBParamGroupSet[ * [ + * "GroupType" => (integer) 参数组类型:1:稳定版参数组,2:高性能版参数组。默认是稳定版参数组 * "GroupId" => (integer) 参数组id * "GroupName" => (string) 参数组名称 * "DBTypeId" => (string) DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6 7:percona-5.6 @@ -1441,13 +1673,14 @@ public function describeUDBSplittingInfo(DescribeUDBSplittingInfoRequest $reques * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "BackupZone" => (string) 跨可用区高可用DB的备库所在区域,仅当该可用区支持跨可用区高可用时填入。参见 [可用区列表](../summary/regionlist.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "BackupZone" => (string) 跨可用区高可用DB的备库所在区域,仅当该可用区支持跨可用区高可用时填入。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "DBClusterType" => (string) DB实例类型,如mysql,sqlserver,mongo,postgresql * "InstanceMode" => (string) 返回支持某种实例类型的DB类型。如果没传,则表示任何实例类型均可。normal:单点,ha:高可用,sharded_cluster:分片集群 * "DiskType" => (string) 返回支持某种磁盘类型的DB类型,如Normal、SSD、NVMe_SSD。如果没传,则表示任何磁盘类型均可。 * "CompatibleWithDBType" => (string) 返回从备份创建实例时,该版本号所支持的备份创建版本。如果没传,则表示不是从备份创建。 + * "DBSubVersion" => (string) 返回从备份创建实例时,该小版本号所支持的备份创建小版本。如果没传,则表示不是从备份创建。 * ] * * Outputs: @@ -1456,6 +1689,7 @@ public function describeUDBSplittingInfo(DescribeUDBSplittingInfoRequest $reques * "DataSet" => (array) DB类型列表 参数见 UDBTypeSet[ * [ * "DBTypeId" => (string) DB类型id,mysql/mongodb按版本细分各有一个id, 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + * "DBSubVersion" => (string) mysql子版本,如mysql-8.0.25,mysql-8.0.16 * ] * ] * ] @@ -1477,8 +1711,8 @@ public function describeUDBType(DescribeUDBTypeRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "MasterDBId" => (string) DB实例ID(master) * ] * @@ -1592,9 +1826,9 @@ public function extractUDBParamGroup(ExtractUDBParamGroupRequest $request = null * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) DB实例Id * ] * @@ -1647,6 +1881,121 @@ public function getUDBClientConnNum(GetUDBClientConnNumRequest $request = null) return new GetUDBClientConnNumResponse($resp->toArray(), $resp->getRequestId()); } + /** + * GetUDBInstanceSSLCertURL - 获取SSL证书下载地址 + * + * See also: https://docs.ucloud.cn/api/udb-api/get_udb_instance_ssl_cert_url + * + * 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) + * "DBId" => (string) 实例ID + * "ExpireTime" => (integer) URL的过期时间,该值最小默认1小时,最大7天。(单位/秒) + * ] + * + * Outputs: + * + * $outputs = [ + * "InternetUrl" => (string) 外网链接 + * "InnerUrl" => (string) 内网链接 + * ] + * + * @return GetUDBInstanceSSLCertURLResponse + * @throws UCloudException + */ + public function getUDBInstanceSSLCertURL(GetUDBInstanceSSLCertURLRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUDBInstanceSSLCertURLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUDBMachineType - 获取UDB云数据库支持的计算规格列表,暂不支持获取跨可用区实例的计算规格,目前支持的数据库品类包括:NVMe版和SSD云盘版MySQL + * + * See also: https://docs.ucloud.cn/api/udb-api/list_udb_machine_type + * + * 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) + * "InstanceMode" => (string) UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 计算规格列表[ + * [ + * "ID" => (string) 计算规格id, 目前支持CPU和内存比1:2、1:4、1:8三类配比规格;规格的格式为:"机型.配比.CPU核数规格";机型支持o和n两种机型,分别代表快杰NVMe和SSD云盘机型;配比映射关系如下:2m代表CPU内存配比1比2,4m代表CPU内存配比1比4,8m代表CPU内存配比1比8,CPU核数规格射关系如下:small代表1C,medium代表2C,xlarge代表4C,2xlarge代表8C,4xlarge代表16C,8xlarge代表32C,16xlarge代表64C,例如 "o.mysql4m.medium"表示创建快杰NVMe机型2C8G的实例,"o.mysql8m.4xlarge"表示创建快杰NVMe机型16C128G的实例 + * "Description" => (string) 计算规格描述,格式为"nCmG",表示n核mG内存实例 + * "Cpu" => (integer) 规格cpu核数 + * "Memory" => (integer) 规格内存大小,单位(GB) + * "Os" => (string) 内部云主机机型,可选"o/n" + * "Group" => (string) 内存/cpu配比 + * ] + * ] + * "DefaultMachineType" => (object) 默认计算规格[ + * "ID" => (string) 计算规格id, 目前支持CPU和内存比1:2、1:4、1:8三类配比规格;规格的格式为:"机型.配比.CPU核数规格";机型支持o和n两种机型,分别代表快杰NVMe和SSD云盘机型;配比映射关系如下:2m代表CPU内存配比1比2,4m代表CPU内存配比1比4,8m代表CPU内存配比1比8,CPU核数规格射关系如下:small代表1C,medium代表2C,xlarge代表4C,2xlarge代表8C,4xlarge代表16C,8xlarge代表32C,16xlarge代表64C,例如 "o.mysql4m.medium"表示创建快杰NVMe机型2C8G的实例,"o.mysql8m.4xlarge"表示创建快杰NVMe机型16C128G的实例 + * "Description" => (string) 计算规格描述,格式为"nCmG",表示n核mG内存实例 + * "Cpu" => (integer) 规格cpu核数 + * "Memory" => (integer) 规格内存大小,单位(GB) + * "Os" => (string) 内部云主机机型,可选"o/n" + * "Group" => (string) 内存/cpu配比 + * ] + * ] + * + * @return ListUDBMachineTypeResponse + * @throws UCloudException + */ + public function listUDBMachineType(ListUDBMachineTypeRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUDBMachineTypeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUDBUserTables - 查看udb实例所有的用户表集合 (只包括引擎为innodb和myisam的表) + * + * See also: https://docs.ucloud.cn/api/udb-api/list_udb_user_tables + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "DBId" => (string) udb实例的ID + * ] + * + * Outputs: + * + * $outputs = [ + * "Tables" => (array) 用户库表的集合[ + * [ + * "DBName" => (string) 数据库名称 + * "TableDataSet" => (array) 该库所有的表集合[ + * [ + * "TableName" => (string) 表名称 + * "DBName" => (string) 表所属的库名称 + * "Engine" => (string) 表的引擎(innodb, myisam) + * ] + * ] + * ] + * ] + * ] + * + * @return ListUDBUserTablesResponse + * @throws UCloudException + */ + public function listUDBUserTables(ListUDBUserTablesRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUDBUserTablesResponse($resp->toArray(), $resp->getRequestId()); + } + /** * ModifyUDBInstanceName - 重命名UDB实例 * @@ -1655,9 +2004,9 @@ public function getUDBClientConnNum(GetUDBClientConnNumRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 * "Name" => (string) 实例的新名字, 长度要求为6~63位 * ] @@ -1684,9 +2033,9 @@ public function modifyUDBInstanceName(ModifyUDBInstanceNameRequest $request = nu * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) 实例的ID,该值可以通过DescribeUDBInstance获取 * "Password" => (string) 实例的新密码 * "AccountName" => (string) sqlserver帐号,仅在sqlserver的情况下填该参数 @@ -1706,6 +2055,65 @@ public function modifyUDBInstancePassword(ModifyUDBInstancePasswordRequest $requ return new ModifyUDBInstancePasswordResponse($resp->toArray(), $resp->getRequestId()); } + /** + * ModifyUDBInstanceRemarkName - 修改UDB实例备注信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/modify_udb_instance_remark_name + * + * 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) + * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 + * "Name" => (string) 实例的新备注 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ModifyUDBInstanceRemarkNameResponse + * @throws UCloudException + */ + public function modifyUDBInstanceRemarkName(ModifyUDBInstanceRemarkNameRequest $request = null) + { + $resp = $this->invoke($request); + return new ModifyUDBInstanceRemarkNameResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUDBInstanceSSL - 调整SSL的信息 + * + * See also: https://docs.ucloud.cn/api/udb-api/modify_udb_instance_ssl + * + * 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) + * "DBId" => (string) 实例ID + * "EnableSSL" => (integer) 是否开启SSL 1->关闭 2->开启 + * "ValidTime" => (integer) SSL证书有效时间,1-5年,默认为1年 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ModifyUDBInstanceSSLResponse + * @throws UCloudException + */ + public function modifyUDBInstanceSSL(ModifyUDBInstanceSSLRequest $request = null) + { + $resp = $this->invoke($request); + return new ModifyUDBInstanceSSLResponse($resp->toArray(), $resp->getRequestId()); + } + /** * PromoteUDBInstanceToHA - 普通db升级为高可用(只针对mysql5.5及以上版本SSD机型的实例) ,对于NVMe机型的单点升级高可用,虽然也能使用该操作再加上SwitchUDBInstanceToHA,但是更建议直接调用新的API接口(UpgradeUDBInstanceToHA) * @@ -1741,9 +2149,9 @@ public function promoteUDBInstanceToHA(PromoteUDBInstanceToHARequest $request = * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 * "IsForce" => (boolean) 是否强制(如果从库落后可能会禁止提升),默认false 如果落后情况下,强制提升丢失数据 * ] @@ -1770,18 +2178,19 @@ public function promoteUDBSlave(PromoteUDBSlaveRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) 实例的Id - * "MemoryLimit" => (integer) 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/ 12000M/16000M/ 24000M/32000M/ 48000M/64000M/96000M/128000M/192000M/256000M/320000M。 + * "MemoryLimit" => (integer) 内存限制(MB),目前支持以下几档 2000M/4000M/ 6000M/8000M/ 12000M/16000M/ 24000M/32000M/ 48000M/64000M/96000M/128000M/192000M/256000M/320000M。 * "DiskSpace" => (integer) 磁盘空间(GB), 暂时支持20G-32T - * "UseSSD" => (boolean) 是否使用SSD,默认为true - * "SSDType" => (string) SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 - * "UDBCId" => (string) 专区的ID,如果有值表示专区中的DB配置升降级 + * "SSDType" => (string) SSD类型,可选值为"SATA"、“NVMe” * "InstanceType" => (string) UDB数据库机型: "Normal": "标准机型" , "SATA_SSD": "SSD机型" , "PCIE_SSD": "SSD高性能机型" , "Normal_Volume": "标准大容量机型", "SATA_SSD_Volume": "SSD大容量机型" , "PCIE_SSD_Volume": "SSD高性能大容量机型",“NVMe_SSD”:“快杰机型” * "InstanceMode" => (string) UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" * "StartAfterUpgrade" => (boolean) DB关闭状态下升降级,升降级后是否启动DB,默认为false + * "MachineType" => (string) 规格类型ID,当SpecificationType为1时有效 + * "SpecificationType" => (string) 实例计算规格类型,0或不传代表使用内存方式购买,1代表使用内存-cpu可选配比方式购买,需要填写MachineType + * "CPU" => (integer) 数据库的CPU核数(只对普通版的SQLServer有用) * "CouponId" => (string) 使用的代金券id * ] * @@ -1807,8 +2216,8 @@ public function resizeUDBInstance(ResizeUDBInstanceRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "MasterDBId" => (string) 待关闭读写分离中间键ProxyId * ] * @@ -1834,9 +2243,9 @@ public function restartRWSplitting(RestartRWSplittingRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 * ] * @@ -1854,6 +2263,35 @@ public function restartUDBInstance(RestartUDBInstanceRequest $request = null) return new RestartUDBInstanceResponse($resp->toArray(), $resp->getRequestId()); } + /** + * RollbackUDBInstance - 在原实例回档指定库表 + * + * See also: https://docs.ucloud.cn/api/udb-api/rollback_udb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "SrcDBId" => (string) 源实例的Id + * "RecoveryTime" => (string) 恢复到某个时间点的时间戳(UTC时间格式,默认单位秒) + * "Tables" => (string) 指定需要恢复的表,格式为(库名.表名), 指定多个用逗号隔开,eg: [ udb.test, mysql_school.my_student] + * ] + * + * Outputs: + * + * $outputs = [ + * "DBId" => (string) 源实例的Id + * ] + * + * @return RollbackUDBInstanceResponse + * @throws UCloudException + */ + public function rollbackUDBInstance(RollbackUDBInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new RollbackUDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + /** * SetUDBRWSplitting - 设置读写分离的模式 * @@ -1893,9 +2331,9 @@ public function setUDBRWSplitting(SetUDBRWSplittingRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 * ] * @@ -1921,9 +2359,9 @@ public function startUDBInstance(StartUDBInstanceRequest $request = null) * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 * "ForceToKill" => (boolean) 是否使用强制手段关闭DB,默认是false * ] @@ -2010,14 +2448,18 @@ public function switchUDBInstanceToHA(SwitchUDBInstanceToHARequest $request = nu * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "DBId" => (string) 主节点的Id * "BackupTime" => (integer) 备份的整点时间,范围[0,23] * "BackupDate" => (string) 备份时期标记位。共7位,每一位为一周中一天的备份情况,0表示关闭当天备份,1表示打开当天备份。最右边的一位为星期天的备份开关,其余从右到左依次为星期一到星期六的备份配置开关,每周必须至少设置两天备份。例如:1100000表示打开星期六和星期五的备份功能 * "ForceDump" => (boolean) 当导出某些数据遇到问题后,是否强制导出其他剩余数据默认是false需要同时设置BackupDate字段 - * "BackupMethod" => (string) 选择默认的备份方式,可选 snapshot 表示使用快照/物理备份,不填或者其它任何值为默认的逻辑备份。需要同时设置BackupDate字段。(注意现在只有SSD 版本的 MySQL实例支持物理备份) + * "BackupMethod" => (string) 选择默认的备份方式,可选nobackup表示不备份, snapshot 表示使用快照备份,logic 表示使用逻辑备份。需要同时设置BackupDate字段。(快照备份即物理备份。SSD版本的mysql实例支持设置为snapshot,NVMe版本的mysql实例支持设置为xtrabackup) + * "UserTokenID" => (string) 自动备份转存到用户自己的bucket 的tokenid, 需要用户自己自己设置权限 + * "UserBucket" => (string) 自动备份转存到用户自己的bucket名称,要包含到对应的token id里 + * "EnableBinlogBackup" => (boolean) 是否开启binlog备份, 默认为未开启 + * "BinlogRemoteSaveDays" => (integer) 远端binlog保存时长(天) * ] * * Outputs: @@ -2125,6 +2567,38 @@ public function upgradeUDBInstanceToHA(UpgradeUDBInstanceToHARequest $request = return new UpgradeUDBInstanceToHAResponse($resp->toArray(), $resp->getRequestId()); } + /** + * UpgradeUDBVersion - 升级db实例版本 + * + * See also: https://docs.ucloud.cn/api/udb-api/upgrade_udb_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) + * "DBId" => (string) db实例资源id + * "DBSubVersion" => (string) db需要升级的小版本 + * "SwitchType" => (string) 切换类型,可选值为"immediately"和"customize",分别代表立即切换和自定义切换时间,自定义切换时间需要填写SwitchStartTime和SwitchEndTime + * "SwitchStartTime" => (integer) 该值为一个unix时间戳,代表开始切换实例的时间 + * "SwitchEndTime" => (integer) 该值为一个unix时间戳,代表开始预期切换实例结束的时间 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpgradeUDBVersionResponse + * @throws UCloudException + */ + public function upgradeUDBVersion(UpgradeUDBVersionRequest $request = null) + { + $resp = $this->invoke($request); + return new UpgradeUDBVersionResponse($resp->toArray(), $resp->getRequestId()); + } + /** * UploadUDBParamGroup - 导入UDB配置 * diff --git a/src/UDNS/Apis/AssociateUDNSZoneVPCRequest.php b/src/UDNS/Apis/AssociateUDNSZoneVPCRequest.php new file mode 100644 index 00000000..0859d2aa --- /dev/null +++ b/src/UDNS/Apis/AssociateUDNSZoneVPCRequest.php @@ -0,0 +1,133 @@ + "AssociateUDNSZoneVPC"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + $this->markRequired("VPCProjectId"); + $this->markRequired("VPCId"); + } + + + + /** + * 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); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * VPCProjectId: VPC所属项目ID + * + * @return string|null + */ + public function getVPCProjectId() + { + return $this->get("VPCProjectId"); + } + + /** + * VPCProjectId: VPC所属项目ID + * + * @param string $vpcProjectId + */ + public function setVPCProjectId($vpcProjectId) + { + $this->set("VPCProjectId", $vpcProjectId); + } + + /** + * 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); + } +} diff --git a/src/UDNS/Apis/AssociateUDNSZoneVPCResponse.php b/src/UDNS/Apis/AssociateUDNSZoneVPCResponse.php new file mode 100644 index 00000000..907a9d62 --- /dev/null +++ b/src/UDNS/Apis/AssociateUDNSZoneVPCResponse.php @@ -0,0 +1,26 @@ + "CreateUDNSRecord"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + $this->markRequired("Name"); + $this->markRequired("Type"); + $this->markRequired("Value"); + $this->markRequired("ValueType"); + } + + + + /** + * 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); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * Name: 主机记录 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 主机记录 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Type: 记录类型。枚举值,“A”,"CNAME","MX","AAAA","SRV","PTR","TXT"。 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 记录类型。枚举值,“A”,"CNAME","MX","AAAA","SRV","PTR","TXT"。 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Value: 数值组,支持逗号分割。格式为:Value|权重|IsEnabled,其中权重支持1-10,IsEnabled为枚举值(1为启用,0为禁用)。输入格式示例:192.168.1.1|1|1,192.168.1.2|10|0。 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 数值组,支持逗号分割。格式为:Value|权重|IsEnabled,其中权重支持1-10,IsEnabled为枚举值(1为启用,0为禁用)。输入格式示例:192.168.1.1|1|1,192.168.1.2|10|0。 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } + + /** + * ValueType: 值类型。枚举值,“Normal”,标准;“Multivalue”,多值返回。仅在值为“Multivalue”时,Value的权重生效。 + * + * @return string|null + */ + public function getValueType() + { + return $this->get("ValueType"); + } + + /** + * ValueType: 值类型。枚举值,“Normal”,标准;“Multivalue”,多值返回。仅在值为“Multivalue”时,Value的权重生效。 + * + * @param string $valueType + */ + public function setValueType($valueType) + { + $this->set("ValueType", $valueType); + } + + /** + * TTL: TTL值,范围为5-600,单位为秒。默认为5 + * + * @return integer|null + */ + public function getTTL() + { + return $this->get("TTL"); + } + + /** + * TTL: TTL值,范围为5-600,单位为秒。默认为5 + * + * @param int $ttl + */ + public function setTTL($ttl) + { + $this->set("TTL", $ttl); + } + + /** + * Remark: 记录的备注信息 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 记录的备注信息 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UDNS/Apis/CreateUDNSRecordResponse.php b/src/UDNS/Apis/CreateUDNSRecordResponse.php new file mode 100644 index 00000000..93905104 --- /dev/null +++ b/src/UDNS/Apis/CreateUDNSRecordResponse.php @@ -0,0 +1,44 @@ +get("DNSRecordId"); + } + + /** + * DNSRecordId: 域名记录的资源ID + * + * @param string $dnsRecordId + */ + public function setDNSRecordId($dnsRecordId) + { + $this->set("DNSRecordId", $dnsRecordId); + } +} diff --git a/src/UDNS/Apis/CreateUDNSZoneRequest.php b/src/UDNS/Apis/CreateUDNSZoneRequest.php new file mode 100644 index 00000000..de47625b --- /dev/null +++ b/src/UDNS/Apis/CreateUDNSZoneRequest.php @@ -0,0 +1,232 @@ + "CreateUDNSZone"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneName"); + $this->markRequired("Type"); + } + + + + /** + * 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); + } + + /** + * DNSZoneName: 域名字符串 + * + * @return string|null + */ + public function getDNSZoneName() + { + return $this->get("DNSZoneName"); + } + + /** + * DNSZoneName: 域名字符串 + * + * @param string $dnsZoneName + */ + public function setDNSZoneName($dnsZoneName) + { + $this->set("DNSZoneName", $dnsZoneName); + } + + /** + * Type: 域名类型。枚举值,“private”,内网DNS;“public”,公网DNS,暂只支持private。 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 域名类型。枚举值,“private”,内网DNS;“public”,公网DNS,暂只支持private。 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Tag: 所属业务组名称 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 所属业务组名称 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * IsRecursionEnabled: 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * + * @return string|null + */ + public function getIsRecursionEnabled() + { + return $this->get("IsRecursionEnabled"); + } + + /** + * IsRecursionEnabled: 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * + * @param string $isRecursionEnabled + */ + public function setIsRecursionEnabled($isRecursionEnabled) + { + $this->set("IsRecursionEnabled", $isRecursionEnabled); + } + + /** + * 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); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费,默认为按月付费 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费,默认为按月付费 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * CouponId: 代金券ID,默认不使用 + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券ID,默认不使用 + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDNS/Apis/CreateUDNSZoneResponse.php b/src/UDNS/Apis/CreateUDNSZoneResponse.php new file mode 100644 index 00000000..ab7acbc4 --- /dev/null +++ b/src/UDNS/Apis/CreateUDNSZoneResponse.php @@ -0,0 +1,44 @@ +get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } +} diff --git a/src/UDNS/Apis/DeleteUDNSRecordRequest.php b/src/UDNS/Apis/DeleteUDNSRecordRequest.php new file mode 100644 index 00000000..4cf00408 --- /dev/null +++ b/src/UDNS/Apis/DeleteUDNSRecordRequest.php @@ -0,0 +1,112 @@ + "DeleteUDNSRecord"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + $this->markRequired("RecordIds"); + } + + + + /** + * 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); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * RecordIds: 域名记录资源ID + * + * @return string[]|null + */ + public function getRecordIds() + { + return $this->get("RecordIds"); + } + + /** + * RecordIds: 域名记录资源ID + * + * @param string[] $recordIds + */ + public function setRecordIds(array $recordIds) + { + $this->set("RecordIds", $recordIds); + } +} diff --git a/src/UDNS/Apis/DeleteUDNSRecordResponse.php b/src/UDNS/Apis/DeleteUDNSRecordResponse.php new file mode 100644 index 00000000..92767372 --- /dev/null +++ b/src/UDNS/Apis/DeleteUDNSRecordResponse.php @@ -0,0 +1,26 @@ + "DescribeUDNSDomain"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("DNSZoneName"); + $this->markRequired("VPCId"); + } + + + + /** + * 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); + } + + /** + * DNSZoneName: zone名称 + * + * @return string|null + */ + public function getDNSZoneName() + { + return $this->get("DNSZoneName"); + } + + /** + * DNSZoneName: zone名称 + * + * @param string $dnsZoneName + */ + public function setDNSZoneName($dnsZoneName) + { + $this->set("DNSZoneName", $dnsZoneName); + } + + /** + * VPCId: VPI资源ID + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPI资源ID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Offset: 查询数量偏移 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 查询数量偏移 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数量 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数量 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UDNS/Apis/DescribeUDNSDomainResponse.php b/src/UDNS/Apis/DescribeUDNSDomainResponse.php new file mode 100644 index 00000000..09afeb76 --- /dev/null +++ b/src/UDNS/Apis/DescribeUDNSDomainResponse.php @@ -0,0 +1,78 @@ +get("RecordInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RecordInfo($item)); + } + return $result; + } + + /** + * RecordInfos: 查询记录 + * + * @param RecordInfo[] $recordInfos + */ + public function setRecordInfos(array $recordInfos) + { + $result = []; + foreach ($recordInfos 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/UDNS/Apis/DescribeUDNSRecordRequest.php b/src/UDNS/Apis/DescribeUDNSRecordRequest.php new file mode 100644 index 00000000..8c0c7f9e --- /dev/null +++ b/src/UDNS/Apis/DescribeUDNSRecordRequest.php @@ -0,0 +1,211 @@ + "DescribeUDNSRecord"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + } + + + + /** + * 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); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * RecordIds: 域名记录资源ID + * + * @return string[]|null + */ + public function getRecordIds() + { + return $this->get("RecordIds"); + } + + /** + * RecordIds: 域名记录资源ID + * + * @param string[] $recordIds + */ + public function setRecordIds(array $recordIds) + { + $this->set("RecordIds", $recordIds); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @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); + } + + /** + * Query: 模糊查询记录 + * + * @return string|null + */ + public function getQuery() + { + return $this->get("Query"); + } + + /** + * Query: 模糊查询记录 + * + * @param string $query + */ + public function setQuery($query) + { + $this->set("Query", $query); + } + + /** + * SortKey: 排序字段,只支持host update_time + * + * @return string|null + */ + public function getSortKey() + { + return $this->get("SortKey"); + } + + /** + * SortKey: 排序字段,只支持host update_time + * + * @param string $sortKey + */ + public function setSortKey($sortKey) + { + $this->set("SortKey", $sortKey); + } + + /** + * SortDir: 排序方式,支持asc desc + * + * @return string|null + */ + public function getSortDir() + { + return $this->get("SortDir"); + } + + /** + * SortDir: 排序方式,支持asc desc + * + * @param string $sortDir + */ + public function setSortDir($sortDir) + { + $this->set("SortDir", $sortDir); + } +} diff --git a/src/UDNS/Apis/DescribeUDNSRecordResponse.php b/src/UDNS/Apis/DescribeUDNSRecordResponse.php new file mode 100644 index 00000000..9930e543 --- /dev/null +++ b/src/UDNS/Apis/DescribeUDNSRecordResponse.php @@ -0,0 +1,78 @@ +get("TotalCount"); + } + + /** + * TotalCount: 资源数量 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * RecordInfos: 域名记录详细信息 + * + * @return RecordInfo[]|null + */ + public function getRecordInfos() + { + $items = $this->get("RecordInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RecordInfo($item)); + } + return $result; + } + + /** + * RecordInfos: 域名记录详细信息 + * + * @param RecordInfo[] $recordInfos + */ + public function setRecordInfos(array $recordInfos) + { + $result = []; + foreach ($recordInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDNS/Apis/DescribeUDNSZoneRequest.php b/src/UDNS/Apis/DescribeUDNSZoneRequest.php new file mode 100644 index 00000000..3954419e --- /dev/null +++ b/src/UDNS/Apis/DescribeUDNSZoneRequest.php @@ -0,0 +1,130 @@ + "DescribeUDNSZone"]); + $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); + } + + /** + * DNSZoneIds: 域名资源ID + * + * @return string[]|null + */ + public function getDNSZoneIds() + { + return $this->get("DNSZoneIds"); + } + + /** + * DNSZoneIds: 域名资源ID + * + * @param string[] $dnsZoneIds + */ + public function setDNSZoneIds(array $dnsZoneIds) + { + $this->set("DNSZoneIds", $dnsZoneIds); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @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/UDNS/Apis/DescribeUDNSZoneResponse.php b/src/UDNS/Apis/DescribeUDNSZoneResponse.php new file mode 100644 index 00000000..786db168 --- /dev/null +++ b/src/UDNS/Apis/DescribeUDNSZoneResponse.php @@ -0,0 +1,78 @@ +get("TotalCount"); + } + + /** + * TotalCount: 符合查询条件的域名数量 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DNSZoneInfos: 域名资源信息 + * + * @return ZoneInfo[]|null + */ + public function getDNSZoneInfos() + { + $items = $this->get("DNSZoneInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ZoneInfo($item)); + } + return $result; + } + + /** + * DNSZoneInfos: 域名资源信息 + * + * @param ZoneInfo[] $dnsZoneInfos + */ + public function setDNSZoneInfos(array $dnsZoneInfos) + { + $result = []; + foreach ($dnsZoneInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDNS/Apis/DisassociateUDNSZoneVPCRequest.php b/src/UDNS/Apis/DisassociateUDNSZoneVPCRequest.php new file mode 100644 index 00000000..32fad44d --- /dev/null +++ b/src/UDNS/Apis/DisassociateUDNSZoneVPCRequest.php @@ -0,0 +1,133 @@ + "DisassociateUDNSZoneVPC"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + $this->markRequired("VPCProjectId"); + $this->markRequired("VPCId"); + } + + + + /** + * 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); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * VPCProjectId: VPC所属项目ID + * + * @return string|null + */ + public function getVPCProjectId() + { + return $this->get("VPCProjectId"); + } + + /** + * VPCProjectId: VPC所属项目ID + * + * @param string $vpcProjectId + */ + public function setVPCProjectId($vpcProjectId) + { + $this->set("VPCProjectId", $vpcProjectId); + } + + /** + * 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); + } +} diff --git a/src/UDNS/Apis/DisassociateUDNSZoneVPCResponse.php b/src/UDNS/Apis/DisassociateUDNSZoneVPCResponse.php new file mode 100644 index 00000000..8258ad88 --- /dev/null +++ b/src/UDNS/Apis/DisassociateUDNSZoneVPCResponse.php @@ -0,0 +1,26 @@ + "ModifyUDNSRecord"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + $this->markRequired("RecordId"); + } + + + + /** + * 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); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * RecordId: 域名记录资源ID + * + * @return string|null + */ + public function getRecordId() + { + return $this->get("RecordId"); + } + + /** + * RecordId: 域名记录资源ID + * + * @param string $recordId + */ + public function setRecordId($recordId) + { + $this->set("RecordId", $recordId); + } + + /** + * Value: 数值组,支持逗号分割。格式为:Value|权重|Enable,其中权重支持1-10,Enable为枚举值(1为启用,0为禁用)。输入格式示例:192.168.1.1|1|1,192.168.1.2|10|0。 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 数值组,支持逗号分割。格式为:Value|权重|Enable,其中权重支持1-10,Enable为枚举值(1为启用,0为禁用)。输入格式示例:192.168.1.1|1|1,192.168.1.2|10|0。 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } + + /** + * ValueType: 值类型。枚举值,“Normal”,标准;“Multivalue”,多值返回。仅在值为“Multivalue”时,Value的权重生效。 + * + * @return string|null + */ + public function getValueType() + { + return $this->get("ValueType"); + } + + /** + * ValueType: 值类型。枚举值,“Normal”,标准;“Multivalue”,多值返回。仅在值为“Multivalue”时,Value的权重生效。 + * + * @param string $valueType + */ + public function setValueType($valueType) + { + $this->set("ValueType", $valueType); + } + + /** + * TTL: TTL值,单位为秒 + * + * @return integer|null + */ + public function getTTL() + { + return $this->get("TTL"); + } + + /** + * TTL: TTL值,单位为秒 + * + * @param int $ttl + */ + public function setTTL($ttl) + { + $this->set("TTL", $ttl); + } + + /** + * Remark: 记录的备注信息 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 记录的备注信息 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * Type: 记录类型。枚举值,“A”,"CNAME","MX","AAAA","SRV","PTR","TXT"。 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 记录类型。枚举值,“A”,"CNAME","MX","AAAA","SRV","PTR","TXT"。 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } +} diff --git a/src/UDNS/Apis/ModifyUDNSRecordResponse.php b/src/UDNS/Apis/ModifyUDNSRecordResponse.php new file mode 100644 index 00000000..c2289b3e --- /dev/null +++ b/src/UDNS/Apis/ModifyUDNSRecordResponse.php @@ -0,0 +1,26 @@ + "ModifyUDNSZone"]); + $this->markRequired("Region"); + $this->markRequired("DNSZoneId"); + } + + + + /** + * 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); + } + + /** + * DNSZoneId: 域名资源ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: 域名资源ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * IsRecursionEnabled: 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * + * @return string|null + */ + public function getIsRecursionEnabled() + { + return $this->get("IsRecursionEnabled"); + } + + /** + * IsRecursionEnabled: 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * + * @param string $isRecursionEnabled + */ + public function setIsRecursionEnabled($isRecursionEnabled) + { + $this->set("IsRecursionEnabled", $isRecursionEnabled); + } +} diff --git a/src/UDNS/Apis/ModifyUDNSZoneResponse.php b/src/UDNS/Apis/ModifyUDNSZoneResponse.php new file mode 100644 index 00000000..3392ba49 --- /dev/null +++ b/src/UDNS/Apis/ModifyUDNSZoneResponse.php @@ -0,0 +1,26 @@ +get("RecordId"); + } + + /** + * RecordId: 域名记录资源ID + * + * @param string $recordId + */ + public function setRecordId($recordId) + { + $this->set("RecordId", $recordId); + } + + /** + * Name: 主机记录 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 主机记录 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Type: 记录类型 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 记录类型 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * ValueSet: 数值组 + * + * @return ValueSet[]|null + */ + public function getValueSet() + { + $items = $this->get("ValueSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ValueSet($item)); + } + return $result; + } + + /** + * ValueSet: 数值组 + * + * @param ValueSet[] $valueSet + */ + public function setValueSet(array $valueSet) + { + $result = []; + foreach ($valueSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ValueType: 记录策略,标准或随机应答 + * + * @return string|null + */ + public function getValueType() + { + return $this->get("ValueType"); + } + + /** + * ValueType: 记录策略,标准或随机应答 + * + * @param string $valueType + */ + public function setValueType($valueType) + { + $this->set("ValueType", $valueType); + } + + /** + * TTL: TTL值,单位为秒 + * + * @return integer|null + */ + public function getTTL() + { + return $this->get("TTL"); + } + + /** + * TTL: TTL值,单位为秒 + * + * @param int $ttl + */ + public function setTTL($ttl) + { + $this->set("TTL", $ttl); + } + + /** + * Remark: 记录备注信息 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 记录备注信息 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UDNS/Models/VPCInfo.php b/src/UDNS/Models/VPCInfo.php new file mode 100644 index 00000000..cef0a077 --- /dev/null +++ b/src/UDNS/Models/VPCInfo.php @@ -0,0 +1,124 @@ +get("VPCId"); + } + + /** + * VPCId: VPC ID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * VPCProjectId: VPC所属项目ID + * + * @return string|null + */ + public function getVPCProjectId() + { + return $this->get("VPCProjectId"); + } + + /** + * VPCProjectId: VPC所属项目ID + * + * @param string $vpcProjectId + */ + public function setVPCProjectId($vpcProjectId) + { + $this->set("VPCProjectId", $vpcProjectId); + } + + /** + * Name: VPC名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: VPC名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Network: VPC地址空间 + * + * @return string[]|null + */ + public function getNetwork() + { + return $this->get("Network"); + } + + /** + * Network: VPC地址空间 + * + * @param string[] $network + */ + public function setNetwork(array $network) + { + $this->set("Network", $network); + } + + /** + * VPCType: VPC类型:Normal 公有云 Hybrid 托管云 + * + * @return string|null + */ + public function getVPCType() + { + return $this->get("VPCType"); + } + + /** + * VPCType: VPC类型:Normal 公有云 Hybrid 托管云 + * + * @param string $vpcType + */ + public function setVPCType($vpcType) + { + $this->set("VPCType", $vpcType); + } +} diff --git a/src/UDNS/Models/ValueSet.php b/src/UDNS/Models/ValueSet.php new file mode 100644 index 00000000..736e5796 --- /dev/null +++ b/src/UDNS/Models/ValueSet.php @@ -0,0 +1,84 @@ +get("Data"); + } + + /** + * Data: 主机记录 + * + * @param string $data + */ + public function setData($data) + { + $this->set("Data", $data); + } + + /** + * Weight: 权重 + * + * @return integer|null + */ + public function getWeight() + { + return $this->get("Weight"); + } + + /** + * Weight: 权重 + * + * @param int $weight + */ + public function setWeight($weight) + { + $this->set("Weight", $weight); + } + + /** + * IsEnabled: 是否启用 + * + * @return integer|null + */ + public function getIsEnabled() + { + return $this->get("IsEnabled"); + } + + /** + * IsEnabled: 是否启用 + * + * @param int $isEnabled + */ + public function setIsEnabled($isEnabled) + { + $this->set("IsEnabled", $isEnabled); + } +} diff --git a/src/UDNS/Models/ZoneInfo.php b/src/UDNS/Models/ZoneInfo.php new file mode 100644 index 00000000..d5c331c5 --- /dev/null +++ b/src/UDNS/Models/ZoneInfo.php @@ -0,0 +1,256 @@ +get("DNSZoneName"); + } + + /** + * DNSZoneName: 域名名称 + * + * @param string $dnsZoneName + */ + public function setDNSZoneName($dnsZoneName) + { + $this->set("DNSZoneName", $dnsZoneName); + } + + /** + * DNSZoneId: UDNS私有域名 Zone ID + * + * @return string|null + */ + public function getDNSZoneId() + { + return $this->get("DNSZoneId"); + } + + /** + * DNSZoneId: UDNS私有域名 Zone ID + * + * @param string $dnsZoneId + */ + public function setDNSZoneId($dnsZoneId) + { + $this->set("DNSZoneId", $dnsZoneId); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * IsRecursionEnabled: 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * + * @return string|null + */ + public function getIsRecursionEnabled() + { + return $this->get("IsRecursionEnabled"); + } + + /** + * IsRecursionEnabled: 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * + * @param string $isRecursionEnabled + */ + public function setIsRecursionEnabled($isRecursionEnabled) + { + $this->set("IsRecursionEnabled", $isRecursionEnabled); + } + + /** + * 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); + } + + /** + * ChargeType: 计费类型(Dynamic、Month、Year) + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型(Dynamic、Month、Year) + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * IsAutoRenew: 是否开启自动续费(Yes No) + * + * @return string|null + */ + public function getIsAutoRenew() + { + return $this->get("IsAutoRenew"); + } + + /** + * IsAutoRenew: 是否开启自动续费(Yes No) + * + * @param string $isAutoRenew + */ + public function setIsAutoRenew($isAutoRenew) + { + $this->set("IsAutoRenew", $isAutoRenew); + } + + /** + * RecordInfos: 记录相关ID + * + * @return string[]|null + */ + public function getRecordInfos() + { + return $this->get("RecordInfos"); + } + + /** + * RecordInfos: 记录相关ID + * + * @param string[] $recordInfos + */ + public function setRecordInfos(array $recordInfos) + { + $this->set("RecordInfos", $recordInfos); + } + + /** + * VPCInfos: 绑定的VPC信息 + * + * @return VPCInfo[]|null + */ + public function getVPCInfos() + { + $items = $this->get("VPCInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new VPCInfo($item)); + } + return $result; + } + + /** + * VPCInfos: 绑定的VPC信息 + * + * @param VPCInfo[] $vpcInfos + */ + public function setVPCInfos(array $vpcInfos) + { + $result = []; + foreach ($vpcInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDNS/UDNSClient.php b/src/UDNS/UDNSClient.php new file mode 100644 index 00000000..e3e81848 --- /dev/null +++ b/src/UDNS/UDNSClient.php @@ -0,0 +1,416 @@ + (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "VPCProjectId" => (string) VPC所属项目ID + * "VPCId" => (string) VPC资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return AssociateUDNSZoneVPCResponse + * @throws UCloudException + */ + public function associateUDNSZoneVPC(AssociateUDNSZoneVPCRequest $request = null) + { + $resp = $this->invoke($request); + return new AssociateUDNSZoneVPCResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUDNSRecord - 创建域名记录 + * + * See also: https://docs.ucloud.cn/api/udns-api/create_udns_record + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "Name" => (string) 主机记录 + * "Type" => (string) 记录类型。枚举值,“A”,"CNAME","MX","AAAA","SRV","PTR","TXT"。 + * "Value" => (string) 数值组,支持逗号分割。格式为:Value|权重|IsEnabled,其中权重支持1-10,IsEnabled为枚举值(1为启用,0为禁用)。输入格式示例:192.168.1.1|1|1,192.168.1.2|10|0。 + * "ValueType" => (string) 值类型。枚举值,“Normal”,标准;“Multivalue”,多值返回。仅在值为“Multivalue”时,Value的权重生效。 + * "TTL" => (integer) TTL值,范围为5-600,单位为秒。默认为5 + * "Remark" => (string) 记录的备注信息 + * ] + * + * Outputs: + * + * $outputs = [ + * "DNSRecordId" => (string) 域名记录的资源ID + * ] + * + * @return CreateUDNSRecordResponse + * @throws UCloudException + */ + public function createUDNSRecord(CreateUDNSRecordRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUDNSRecordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUDNSZone - 创建域名 + * + * See also: https://docs.ucloud.cn/api/udns-api/create_udns_zone + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneName" => (string) 域名字符串 + * "Type" => (string) 域名类型。枚举值,“private”,内网DNS;“public”,公网DNS,暂只支持private。 + * "Tag" => (string) 所属业务组名称 + * "Remark" => (string) 备注 + * "IsRecursionEnabled" => (string) 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * "Quantity" => (integer) 购买时长,默认为1 + * "ChargeType" => (string) 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费,默认为按月付费 + * "CouponId" => (string) 代金券ID,默认不使用 + * ] + * + * Outputs: + * + * $outputs = [ + * "DNSZoneId" => (string) 域名资源ID + * ] + * + * @return CreateUDNSZoneResponse + * @throws UCloudException + */ + public function createUDNSZone(CreateUDNSZoneRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUDNSZoneResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUDNSRecord - 删除域名记录 + * + * See also: https://docs.ucloud.cn/api/udns-api/delete_udns_record + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "RecordIds" => (array) 域名记录资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteUDNSRecordResponse + * @throws UCloudException + */ + public function deleteUDNSRecord(DeleteUDNSRecordRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUDNSRecordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDNSDomain - zone下所有域名的rr记录 + * + * See also: https://docs.ucloud.cn/api/udns-api/describe_udns_domain + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneName" => (string) zone名称 + * "VPCId" => (string) VPI资源ID + * "Offset" => (integer) 查询数量偏移 + * "Limit" => (integer) 返回数量 + * ] + * + * Outputs: + * + * $outputs = [ + * "RecordInfos" => (array) 查询记录[ + * [ + * "RecordId" => (string) 域名记录资源ID + * "Name" => (string) 主机记录 + * "Type" => (string) 记录类型 + * "ValueSet" => (array) 数值组[ + * [ + * "Data" => (string) 主机记录 + * "Weight" => (integer) 权重 + * "IsEnabled" => (integer) 是否启用 + * ] + * ] + * "ValueType" => (string) 记录策略,标准或随机应答 + * "TTL" => (integer) TTL值,单位为秒 + * "Remark" => (string) 记录备注信息 + * ] + * ] + * "TotalCount" => (integer) 总条数 + * ] + * + * @return DescribeUDNSDomainResponse + * @throws UCloudException + */ + public function describeUDNSDomain(DescribeUDNSDomainRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUDNSDomainResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDNSRecord - 获取域名记录 + * + * See also: https://docs.ucloud.cn/api/udns-api/describe_udns_record + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "RecordIds" => (array) 域名记录资源ID + * "Limit" => (integer) 数据分页值, 默认为20 + * "Offset" => (integer) 数据偏移量, 默认为0 + * "Query" => (string) 模糊查询记录 + * "SortKey" => (string) 排序字段,只支持host update_time + * "SortDir" => (string) 排序方式,支持asc desc + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 资源数量 + * "RecordInfos" => (array) 域名记录详细信息[ + * [ + * "RecordId" => (string) 域名记录资源ID + * "Name" => (string) 主机记录 + * "Type" => (string) 记录类型 + * "ValueSet" => (array) 数值组[ + * [ + * "Data" => (string) 主机记录 + * "Weight" => (integer) 权重 + * "IsEnabled" => (integer) 是否启用 + * ] + * ] + * "ValueType" => (string) 记录策略,标准或随机应答 + * "TTL" => (integer) TTL值,单位为秒 + * "Remark" => (string) 记录备注信息 + * ] + * ] + * ] + * + * @return DescribeUDNSRecordResponse + * @throws UCloudException + */ + public function describeUDNSRecord(DescribeUDNSRecordRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUDNSRecordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDNSZone - 获取域名信息 + * + * See also: https://docs.ucloud.cn/api/udns-api/describe_udns_zone + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneIds" => (array) 域名资源ID + * "Limit" => (integer) 数据分页值, 默认为20 + * "Offset" => (integer) 数据偏移量, 默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 符合查询条件的域名数量 + * "DNSZoneInfos" => (array) 域名资源信息[ + * [ + * "DNSZoneName" => (string) 域名名称 + * "DNSZoneId" => (string) UDNS私有域名 Zone ID + * "Tag" => (string) 业务组 + * "Remark" => (string) 备注 + * "IsRecursionEnabled" => (string) 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * "CreateTime" => (integer) 创建时间 + * "ExpireTime" => (integer) 过期时间 + * "ChargeType" => (string) 计费类型(Dynamic、Month、Year) + * "IsAutoRenew" => (string) 是否开启自动续费(Yes No) + * "RecordInfos" => (array) 记录相关ID + * "VPCInfos" => (array) 绑定的VPC信息[ + * [ + * "VPCId" => (string) VPC ID + * "VPCProjectId" => (string) VPC所属项目ID + * "Name" => (string) VPC名称 + * "Network" => (array) VPC地址空间 + * "VPCType" => (string) VPC类型:Normal 公有云 Hybrid 托管云 + * ] + * ] + * ] + * ] + * ] + * + * @return DescribeUDNSZoneResponse + * @throws UCloudException + */ + public function describeUDNSZone(DescribeUDNSZoneRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUDNSZoneResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DisassociateUDNSZoneVPC - 解绑域名和VPC + * + * See also: https://docs.ucloud.cn/api/udns-api/disassociate_udns_zone_vpc + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "VPCProjectId" => (string) VPC所属项目ID + * "VPCId" => (string) VPC资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DisassociateUDNSZoneVPCResponse + * @throws UCloudException + */ + public function disassociateUDNSZoneVPC(DisassociateUDNSZoneVPCRequest $request = null) + { + $resp = $this->invoke($request); + return new DisassociateUDNSZoneVPCResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUDNSRecord - 修改域名记录 + * + * See also: https://docs.ucloud.cn/api/udns-api/modify_udns_record + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "RecordId" => (string) 域名记录资源ID + * "Value" => (string) 数值组,支持逗号分割。格式为:Value|权重|Enable,其中权重支持1-10,Enable为枚举值(1为启用,0为禁用)。输入格式示例:192.168.1.1|1|1,192.168.1.2|10|0。 + * "ValueType" => (string) 值类型。枚举值,“Normal”,标准;“Multivalue”,多值返回。仅在值为“Multivalue”时,Value的权重生效。 + * "TTL" => (integer) TTL值,单位为秒 + * "Remark" => (string) 记录的备注信息 + * "Type" => (string) 记录类型。枚举值,“A”,"CNAME","MX","AAAA","SRV","PTR","TXT"。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ModifyUDNSRecordResponse + * @throws UCloudException + */ + public function modifyUDNSRecord(ModifyUDNSRecordRequest $request = null) + { + $resp = $this->invoke($request); + return new ModifyUDNSRecordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUDNSZone - 修改域名备注/递归查询状态 + * + * See also: https://docs.ucloud.cn/api/udns-api/modify_udns_zone + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DNSZoneId" => (string) 域名资源ID + * "Remark" => (string) 备注 + * "IsRecursionEnabled" => (string) 是否支持迭代。枚举值,"enable",支持迭代; "disable",不支持迭代 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ModifyUDNSZoneResponse + * @throws UCloudException + */ + public function modifyUDNSZone(ModifyUDNSZoneRequest $request = null) + { + $resp = $this->invoke($request); + return new ModifyUDNSZoneResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UES/Apis/CreateUESInstanceRequest.php b/src/UES/Apis/CreateUESInstanceRequest.php new file mode 100644 index 00000000..8fe0f6ba --- /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 00000000..0fb625f2 --- /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 00000000..f61f14a0 --- /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 00000000..d38cb142 --- /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 00000000..f255f8e2 --- /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 00000000..7f90c135 --- /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 00000000..81db56c3 --- /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 00000000..62a2c3d5 --- /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 00000000..9d9e6fc1 --- /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 00000000..853f1416 --- /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 00000000..997d5ef3 --- /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 00000000..ac51c7e9 --- /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 00000000..599024cf --- /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 00000000..a263dbc2 --- /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 00000000..950f9e5a --- /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 00000000..4abc05e5 --- /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 00000000..7bae79e5 --- /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 00000000..ea205a8c --- /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 00000000..1109944e --- /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 00000000..001745d2 --- /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 00000000..da725623 --- /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 00000000..4ec0cebf --- /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 00000000..0abe5e95 --- /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 00000000..bfe2cc9a --- /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/UFile/Apis/AddCORSRuleRequest.php b/src/UFile/Apis/AddCORSRuleRequest.php new file mode 100644 index 00000000..8ade2cde --- /dev/null +++ b/src/UFile/Apis/AddCORSRuleRequest.php @@ -0,0 +1,152 @@ + "AddCORSRule"]); + $this->markRequired("BucketName"); + $this->markRequired("AllowedOrigin"); + $this->markRequired("AllowedMethod"); + } + + + + /** + * 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); + } + + /** + * BucketName: Bucket名称 + * + * @return string|null + */ + public function getBucketName() + { + return $this->get("BucketName"); + } + + /** + * BucketName: Bucket名称 + * + * @param string $bucketName + */ + public function setBucketName($bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * AllowedOrigin: 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) + * + * @return string|null + */ + public function getAllowedOrigin() + { + return $this->get("AllowedOrigin"); + } + + /** + * AllowedOrigin: 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) + * + * @param string $allowedOrigin + */ + public function setAllowedOrigin($allowedOrigin) + { + $this->set("AllowedOrigin", $allowedOrigin); + } + + /** + * AllowedMethod: 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + * + * @return string|null + */ + public function getAllowedMethod() + { + return $this->get("AllowedMethod"); + } + + /** + * AllowedMethod: 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + * + * @param string $allowedMethod + */ + public function setAllowedMethod($allowedMethod) + { + $this->set("AllowedMethod", $allowedMethod); + } + + /** + * AllowedHeader: 指定允许的跨域请求头(多个Header用‘,’分隔) + * + * @return string|null + */ + public function getAllowedHeader() + { + return $this->get("AllowedHeader"); + } + + /** + * AllowedHeader: 指定允许的跨域请求头(多个Header用‘,’分隔) + * + * @param string $allowedHeader + */ + public function setAllowedHeader($allowedHeader) + { + $this->set("AllowedHeader", $allowedHeader); + } + + /** + * ExposeHeader: 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + * + * @return string|null + */ + public function getExposeHeader() + { + return $this->get("ExposeHeader"); + } + + /** + * ExposeHeader: 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + * + * @param string $exposeHeader + */ + public function setExposeHeader($exposeHeader) + { + $this->set("ExposeHeader", $exposeHeader); + } +} diff --git a/src/UFile/Apis/AddCORSRuleResponse.php b/src/UFile/Apis/AddCORSRuleResponse.php new file mode 100644 index 00000000..c442a6de --- /dev/null +++ b/src/UFile/Apis/AddCORSRuleResponse.php @@ -0,0 +1,44 @@ +get("CORSId"); + } + + /** + * CORSId: 增加一条跨域规则的cors_id + * + * @param string $corsId + */ + public function setCORSId($corsId) + { + $this->set("CORSId", $corsId); + } +} diff --git a/src/UFile/Apis/AddUFileSSLCertRequest.php b/src/UFile/Apis/AddUFileSSLCertRequest.php new file mode 100644 index 00000000..4ed2929d --- /dev/null +++ b/src/UFile/Apis/AddUFileSSLCertRequest.php @@ -0,0 +1,152 @@ + "AddUFileSSLCert"]); + $this->markRequired("BucketName"); + $this->markRequired("Domain"); + $this->markRequired("CertificateName"); + } + + + + /** + * BucketName: 存储桶名称,全局唯一 + * + * @return string|null + */ + public function getBucketName() + { + return $this->get("BucketName"); + } + + /** + * BucketName: 存储桶名称,全局唯一 + * + * @param string $bucketName + */ + public function setBucketName($bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * Domain: 域名 + * + * @return string|null + */ + public function getDomain() + { + return $this->get("Domain"); + } + + /** + * Domain: 域名 + * + * @param string $domain + */ + public function setDomain($domain) + { + $this->set("Domain", $domain); + } + + /** + * CertificateName: SSL证书名称 + * + * @return string|null + */ + public function getCertificateName() + { + return $this->get("CertificateName"); + } + + /** + * CertificateName: SSL证书名称 + * + * @param string $certificateName + */ + public function setCertificateName($certificateName) + { + $this->set("CertificateName", $certificateName); + } + + /** + * Certificate: 填写SSL证书文件内容(PEM编码)。证书文件内容填写格式:如果您的业务场景仅需确保服务端证书可信,则证书文件需要包含服务器证书(①)和中间证书(②)。如果您的中间证书和服务器证书是两个文件,您可以在证书链配置项填写中间证书内容即可。 + * + * @return string|null + */ + public function getCertificate() + { + return $this->get("Certificate"); + } + + /** + * Certificate: 填写SSL证书文件内容(PEM编码)。证书文件内容填写格式:如果您的业务场景仅需确保服务端证书可信,则证书文件需要包含服务器证书(①)和中间证书(②)。如果您的中间证书和服务器证书是两个文件,您可以在证书链配置项填写中间证书内容即可。 + * + * @param string $certificate + */ + public function setCertificate($certificate) + { + $this->set("Certificate", $certificate); + } + + /** + * CertificateKey: 填写SSL证书私钥内容(PEM编码)。 + * + * @return string|null + */ + public function getCertificateKey() + { + return $this->get("CertificateKey"); + } + + /** + * CertificateKey: 填写SSL证书私钥内容(PEM编码)。 + * + * @param string $certificateKey + */ + public function setCertificateKey($certificateKey) + { + $this->set("CertificateKey", $certificateKey); + } + + /** + * USSLId: ussl证书的资源ID + * + * @return string|null + */ + public function getUSSLId() + { + return $this->get("USSLId"); + } + + /** + * USSLId: ussl证书的资源ID + * + * @param string $usslId + */ + public function setUSSLId($usslId) + { + $this->set("USSLId", $usslId); + } +} diff --git a/src/UFile/Apis/AddUFileSSLCertResponse.php b/src/UFile/Apis/AddUFileSSLCertResponse.php new file mode 100644 index 00000000..77acc28b --- /dev/null +++ b/src/UFile/Apis/AddUFileSSLCertResponse.php @@ -0,0 +1,26 @@ + "BindBucketDomain"]); + $this->markRequired("BucketName"); + $this->markRequired("Domain"); + } + + + + /** + * 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); + } + + /** + * BucketName: 自定义域名对应的bucket名称 + * + * @return string|null + */ + public function getBucketName() + { + return $this->get("BucketName"); + } + + /** + * BucketName: 自定义域名对应的bucket名称 + * + * @param string $bucketName + */ + public function setBucketName($bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * Domain: 自定义域名 + * + * @return string|null + */ + public function getDomain() + { + return $this->get("Domain"); + } + + /** + * Domain: 自定义域名 + * + * @param string $domain + */ + public function setDomain($domain) + { + $this->set("Domain", $domain); + } +} diff --git a/src/UFile/Apis/BindBucketDomainResponse.php b/src/UFile/Apis/BindBucketDomainResponse.php new file mode 100644 index 00000000..d1fc1ec0 --- /dev/null +++ b/src/UFile/Apis/BindBucketDomainResponse.php @@ -0,0 +1,64 @@ +get("BucketName"); + } + + /** + * BucketName: 自定义域名对应的bucket名称 + * + * @param string $bucketName + */ + public function setBucketName($bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * BucketId: 自定义域名对应的Bucket的Id + * + * @return string|null + */ + public function getBucketId() + { + return $this->get("BucketId"); + } + + /** + * BucketId: 自定义域名对应的Bucket的Id + * + * @param string $bucketId + */ + public function setBucketId($bucketId) + { + $this->set("BucketId", $bucketId); + } +} diff --git a/src/UFile/Apis/CreateBucketRequest.php b/src/UFile/Apis/CreateBucketRequest.php index a8521b04..99fd9a9b 100644 --- a/src/UFile/Apis/CreateBucketRequest.php +++ b/src/UFile/Apis/CreateBucketRequest.php @@ -1,6 +1,6 @@ set("Type", $type); } + + /** + * Tag: Bucket所属业务组,默认为default + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: Bucket所属业务组,默认为default + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } } diff --git a/src/UFile/Apis/CreateBucketResponse.php b/src/UFile/Apis/CreateBucketResponse.php index 45294468..f49a379c 100644 --- a/src/UFile/Apis/CreateBucketResponse.php +++ b/src/UFile/Apis/CreateBucketResponse.php @@ -1,6 +1,6 @@ set("IADays", $iaDays); } + + /** + * Tags: Tag,参数格式"k1=v1&k2=v2",key的最大长度为128, value最大长度为256byte,单个object的tag的最大数量为10 + * + * @return string|null + */ + public function getTags() + { + return $this->get("Tags"); + } + + /** + * Tags: Tag,参数格式"k1=v1&k2=v2",key的最大长度为128, value最大长度为256byte,单个object的tag的最大数量为10 + * + * @param string $tags + */ + public function setTags($tags) + { + $this->set("Tags", $tags); + } } diff --git a/src/UFile/Apis/CreateUFileLifeCycleResponse.php b/src/UFile/Apis/CreateUFileLifeCycleResponse.php index b0ba2738..df75dfc9 100644 --- a/src/UFile/Apis/CreateUFileLifeCycleResponse.php +++ b/src/UFile/Apis/CreateUFileLifeCycleResponse.php @@ -1,6 +1,6 @@ set("ExpireTime", $expireTime); } + + /** + * BlackIPList: 令牌黑名单,支持ipv4,ipv6格式。 + * + * @return string[]|null + */ + public function getBlackIPList() + { + return $this->get("BlackIPList"); + } + + /** + * BlackIPList: 令牌黑名单,支持ipv4,ipv6格式。 + * + * @param string[] $blackIPList + */ + public function setBlackIPList(array $blackIPList) + { + $this->set("BlackIPList", $blackIPList); + } + + /** + * WhiteIPList: 令牌白名单,支持ipv4,ipv6格式。 + * + * @return string[]|null + */ + public function getWhiteIPList() + { + return $this->get("WhiteIPList"); + } + + /** + * WhiteIPList: 令牌白名单,支持ipv4,ipv6格式。 + * + * @param string[] $whiteIPList + */ + public function setWhiteIPList(array $whiteIPList) + { + $this->set("WhiteIPList", $whiteIPList); + } } diff --git a/src/UFile/Apis/CreateUFileTokenResponse.php b/src/UFile/Apis/CreateUFileTokenResponse.php index 32ed742d..47171145 100644 --- a/src/UFile/Apis/CreateUFileTokenResponse.php +++ b/src/UFile/Apis/CreateUFileTokenResponse.php @@ -1,6 +1,6 @@ set("TokenId", $tokenId); } + + /** + * UFileTokenSet: 创建令牌的详细信息 + * + * @return UFileTokenSet|null + */ + public function getUFileTokenSet() + { + return new UFileTokenSet($this->get("UFileTokenSet")); + } + + /** + * UFileTokenSet: 创建令牌的详细信息 + * + * @param UFileTokenSet $uFileTokenSet + */ + public function setUFileTokenSet(array $uFileTokenSet) + { + $this->set("UFileTokenSet", $uFileTokenSet->getAll()); + } } diff --git a/src/UFile/Apis/DeleteBucketRequest.php b/src/UFile/Apis/DeleteBucketRequest.php index 23343ac5..dfc2262a 100644 --- a/src/UFile/Apis/DeleteBucketRequest.php +++ b/src/UFile/Apis/DeleteBucketRequest.php @@ -1,6 +1,6 @@ "DeleteCORSRule"]); + $this->markRequired("BucketName"); + $this->markRequired("CORSId"); + } + + + + /** + * 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); + } + + /** + * BucketName: Bucket名称 + * + * @return string|null + */ + public function getBucketName() + { + return $this->get("BucketName"); + } + + /** + * BucketName: Bucket名称 + * + * @param string $bucketName + */ + public function setBucketName($bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * CORSId: 跨域规则ID + * + * @return string|null + */ + public function getCORSId() + { + return $this->get("CORSId"); + } + + /** + * CORSId: 跨域规则ID + * + * @param string $corsId + */ + public function setCORSId($corsId) + { + $this->set("CORSId", $corsId); + } +} diff --git a/src/UFile/Apis/DeleteCORSRuleResponse.php b/src/UFile/Apis/DeleteCORSRuleResponse.php new file mode 100644 index 00000000..af34ba64 --- /dev/null +++ b/src/UFile/Apis/DeleteCORSRuleResponse.php @@ -0,0 +1,26 @@ + "DeleteUFileSSLCert"]); + $this->markRequired("BucketName"); + $this->markRequired("Domain"); + } + + + + /** + * BucketName: 存储桶名称,全局唯一 + * + * @return string|null + */ + public function getBucketName() + { + return $this->get("BucketName"); + } + + /** + * BucketName: 存储桶名称,全局唯一 + * + * @param string $bucketName + */ + public function setBucketName($bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * Domain: 域名 + * + * @return string|null + */ + public function getDomain() + { + return $this->get("Domain"); + } + + /** + * Domain: 域名 + * + * @param string $domain + */ + public function setDomain($domain) + { + $this->set("Domain", $domain); + } +} diff --git a/src/UFile/Apis/DeleteUFileSSLCertResponse.php b/src/UFile/Apis/DeleteUFileSSLCertResponse.php new file mode 100644 index 00000000..0f8d58be --- /dev/null +++ b/src/UFile/Apis/DeleteUFileSSLCertResponse.php @@ -0,0 +1,26 @@ + "DescribeCORSRule"]); + $this->markRequired("BucketName"); + } + + + + /** + * 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); + } + + /** + * BucketName: Bucket名称 + * + * @return string|null + */ + public function getBucketName() + { + return $this->get("BucketName"); + } + + /** + * BucketName: Bucket名称 + * + * @param string $bucketName + */ + public function setBucketName($bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * CORSId: 跨域规则ID,不指定则返回所有跨域规则信息 + * + * @return string|null + */ + public function getCORSId() + { + return $this->get("CORSId"); + } + + /** + * CORSId: 跨域规则ID,不指定则返回所有跨域规则信息 + * + * @param string $corsId + */ + public function setCORSId($corsId) + { + $this->set("CORSId", $corsId); + } +} diff --git a/src/UFile/Apis/DescribeCORSRuleResponse.php b/src/UFile/Apis/DescribeCORSRuleResponse.php new file mode 100644 index 00000000..40353a81 --- /dev/null +++ b/src/UFile/Apis/DescribeCORSRuleResponse.php @@ -0,0 +1,57 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CORSRuleSet($item)); + } + return $result; + } + + /** + * DataSet: 跨域规则信息集合 + * + * @param CORSRuleSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UFile/Apis/DescribeUFileLifeCycleRequest.php b/src/UFile/Apis/DescribeUFileLifeCycleRequest.php index ca476a5f..7a551447 100644 --- a/src/UFile/Apis/DescribeUFileLifeCycleRequest.php +++ b/src/UFile/Apis/DescribeUFileLifeCycleRequest.php @@ -1,6 +1,6 @@ get("DateSet"); + $items = $this->get("DataSet"); if ($items == null) { return []; } @@ -42,14 +42,14 @@ public function getDateSet() } /** - * DateSet: 生命周期信息 + * DataSet: 生命周期信息 * - * @param LifeCycleItem[] $dateSet + * @param LifeCycleItem[] $dataSet */ - public function setDateSet(array $dateSet) + public function setDataSet(array $dataSet) { $result = []; - foreach ($dateSet as $i => $item) { + foreach ($dataSet as $i => $item) { array_push($result, $item->getAll()); } return $result; diff --git a/src/UFile/Apis/DescribeUFileRefererRequest.php b/src/UFile/Apis/DescribeUFileRefererRequest.php new file mode 100644 index 00000000..22849b8f --- /dev/null +++ b/src/UFile/Apis/DescribeUFileRefererRequest.php @@ -0,0 +1,90 @@ + "DescribeUFileReferer"]); + $this->markRequired("BucketName"); + } + + + + /** + * 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); + } + + /** + * BucketName: 存储空间名称 + * + * @return string|null + */ + public function getBucketName() + { + return $this->get("BucketName"); + } + + /** + * BucketName: 存储空间名称 + * + * @param string $bucketName + */ + public function setBucketName($bucketName) + { + $this->set("BucketName", $bucketName); + } +} diff --git a/src/UFile/Apis/DescribeUFileRefererResponse.php b/src/UFile/Apis/DescribeUFileRefererResponse.php new file mode 100644 index 00000000..2cede50d --- /dev/null +++ b/src/UFile/Apis/DescribeUFileRefererResponse.php @@ -0,0 +1,144 @@ +get("RefererType"); + } + + /** + * RefererType: 防盗链Referer类型,支持两种类型,1黑名单,2白名单;未开启referer时不返回此参数 + * + * @param int $refererType + */ + public function setRefererType($refererType) + { + $this->set("RefererType", $refererType); + } + + /** + * RefererList: 防盗链Referer规则列表;未开启referer时不返回此参数 + * + * @return string[]|null + */ + public function getRefererList() + { + return $this->get("RefererList"); + } + + /** + * RefererList: 防盗链Referer规则列表;未开启referer时不返回此参数 + * + * @param string[] $refererList + */ + public function setRefererList(array $refererList) + { + $this->set("RefererList", $refererList); + } + + /** + * NullRefer: ReferType为白名单时,NullRefer为false代表不允许NULL refer访问,为true代表允许Null refer访问; 未开启referer时不返回此参数 + * + * @return boolean|null + */ + public function getNullRefer() + { + return $this->get("NullRefer"); + } + + /** + * NullRefer: ReferType为白名单时,NullRefer为false代表不允许NULL refer访问,为true代表允许Null refer访问; 未开启referer时不返回此参数 + * + * @param boolean $nullRefer + */ + public function setNullRefer($nullRefer) + { + $this->set("NullRefer", $nullRefer); + } + + /** + * RefererStatus: 防盗链功能是否开启,"on"表示开启,"off"表示关闭 + * + * @return string|null + */ + public function getRefererStatus() + { + return $this->get("RefererStatus"); + } + + /** + * RefererStatus: 防盗链功能是否开启,"on"表示开启,"off"表示关闭 + * + * @param string $refererStatus + */ + public function setRefererStatus($refererStatus) + { + $this->set("RefererStatus", $refererStatus); + } + + /** + * BlackList: 黑名单列表 + * + * @return string[]|null + */ + public function getBlackList() + { + return $this->get("BlackList"); + } + + /** + * BlackList: 黑名单列表 + * + * @param string[] $blackList + */ + public function setBlackList(array $blackList) + { + $this->set("BlackList", $blackList); + } + + /** + * WhiteList: 白名单列表 + * + * @return string[]|null + */ + public function getWhiteList() + { + return $this->get("WhiteList"); + } + + /** + * WhiteList: 白名单列表 + * + * @param string[] $whiteList + */ + public function setWhiteList(array $whiteList) + { + $this->set("WhiteList", $whiteList); + } +} diff --git a/src/UFile/Apis/DescribeUFileSSLCertRequest.php b/src/UFile/Apis/DescribeUFileSSLCertRequest.php new file mode 100644 index 00000000..5dc63b05 --- /dev/null +++ b/src/UFile/Apis/DescribeUFileSSLCertRequest.php @@ -0,0 +1,50 @@ + "DescribeUFileSSLCert"]); + $this->markRequired("BucketName"); + } + + + + /** + * BucketName: 存储桶名称,全局唯一 + * + * @return string|null + */ + public function getBucketName() + { + return $this->get("BucketName"); + } + + /** + * BucketName: 存储桶名称,全局唯一 + * + * @param string $bucketName + */ + public function setBucketName($bucketName) + { + $this->set("BucketName", $bucketName); + } +} diff --git a/src/UFile/Apis/DescribeUFileSSLCertResponse.php b/src/UFile/Apis/DescribeUFileSSLCertResponse.php new file mode 100644 index 00000000..cadd1db1 --- /dev/null +++ b/src/UFile/Apis/DescribeUFileSSLCertResponse.php @@ -0,0 +1,57 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UFileSSLCert($item)); + } + return $result; + } + + /** + * DataSet: 证书列表 + * + * @param UFileSSLCert[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UFile/Apis/DescribeUFileTokenRequest.php b/src/UFile/Apis/DescribeUFileTokenRequest.php index 891171b9..6a04611a 100644 --- a/src/UFile/Apis/DescribeUFileTokenRequest.php +++ b/src/UFile/Apis/DescribeUFileTokenRequest.php @@ -1,6 +1,6 @@ "GetBucketStaticPageRule"]); + $this->markRequired("Region"); + $this->markRequired("Bucket"); + } + + + + /** + * 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); + } + + /** + * Bucket: 存储桶名称 + * + * @return string|null + */ + public function getBucket() + { + return $this->get("Bucket"); + } + + /** + * Bucket: 存储桶名称 + * + * @param string $bucket + */ + public function setBucket($bucket) + { + $this->set("Bucket", $bucket); + } +} diff --git a/src/UFile/Apis/GetBucketStaticPageRuleResponse.php b/src/UFile/Apis/GetBucketStaticPageRuleResponse.php new file mode 100644 index 00000000..aa9e9818 --- /dev/null +++ b/src/UFile/Apis/GetBucketStaticPageRuleResponse.php @@ -0,0 +1,45 @@ +get("Rule")); + } + + /** + * Rule: 规则内容 + * + * @param BucketStaticPageRule $rule + */ + public function setRule(array $rule) + { + $this->set("Rule", $rule->getAll()); + } +} diff --git a/src/UFile/Apis/GetUFileDailyBillRequest.php b/src/UFile/Apis/GetUFileDailyBillRequest.php new file mode 100644 index 00000000..33ce0fe6 --- /dev/null +++ b/src/UFile/Apis/GetUFileDailyBillRequest.php @@ -0,0 +1,132 @@ + "GetUFileDailyBill"]); + $this->markRequired("Region"); + $this->markRequired("StartTime"); + $this->markRequired("EndTime"); + } + + + + /** + * 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); + } + + /** + * StartTime: 查询开始时间;unix时间戳,单位s + * + * @return integer|null + */ + public function getStartTime() + { + return $this->get("StartTime"); + } + + /** + * StartTime: 查询开始时间;unix时间戳,单位s + * + * @param int $startTime + */ + public function setStartTime($startTime) + { + $this->set("StartTime", $startTime); + } + + /** + * EndTime: 查询结束时间;unix时间戳,单位s + * + * @return integer|null + */ + public function getEndTime() + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询结束时间;unix时间戳,单位s + * + * @param int $endTime + */ + public function setEndTime($endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * BucketName: 空间名称。此字段不为空,返回此Bucket日账单,否则,返回这个项目的日账单 + * + * @return string|null + */ + public function getBucketName() + { + return $this->get("BucketName"); + } + + /** + * BucketName: 空间名称。此字段不为空,返回此Bucket日账单,否则,返回这个项目的日账单 + * + * @param string $bucketName + */ + public function setBucketName($bucketName) + { + $this->set("BucketName", $bucketName); + } +} diff --git a/src/UFile/Apis/GetUFileDailyBillResponse.php b/src/UFile/Apis/GetUFileDailyBillResponse.php new file mode 100644 index 00000000..0d3bc7fc --- /dev/null +++ b/src/UFile/Apis/GetUFileDailyBillResponse.php @@ -0,0 +1,58 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BucketBills($item)); + } + return $result; + } + + /** + * DataSet: 消费情况 + * + * @param BucketBills[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UFile/Apis/GetUFileDailyReportRequest.php b/src/UFile/Apis/GetUFileDailyReportRequest.php index 139159f9..0da477a5 100644 --- a/src/UFile/Apis/GetUFileDailyReportRequest.php +++ b/src/UFile/Apis/GetUFileDailyReportRequest.php @@ -1,6 +1,6 @@ set("Referers", $referers); } + + /** + * WhiteList: 白名单列表中的一项 + * + * @return string[]|null + */ + public function getWhiteList() + { + return $this->get("WhiteList"); + } + + /** + * WhiteList: 白名单列表中的一项 + * + * @param string[] $whiteList + */ + public function setWhiteList(array $whiteList) + { + $this->set("WhiteList", $whiteList); + } + + /** + * BlackList: 黑名单列表中的一项 + * + * @return string[]|null + */ + public function getBlackList() + { + return $this->get("BlackList"); + } + + /** + * BlackList: 黑名单列表中的一项 + * + * @param string[] $blackList + */ + public function setBlackList(array $blackList) + { + $this->set("BlackList", $blackList); + } } diff --git a/src/UFile/Apis/SetUFileRefererResponse.php b/src/UFile/Apis/SetUFileRefererResponse.php index 0b931e34..31de5f8e 100644 --- a/src/UFile/Apis/SetUFileRefererResponse.php +++ b/src/UFile/Apis/SetUFileRefererResponse.php @@ -1,6 +1,6 @@ "UpdateBucketStaticPageRule"]); + $this->markRequired("Region"); + $this->markRequired("Bucket"); + } + + + + /** + * 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); + } + + /** + * Bucket: 存储桶名称 + * + * @return string|null + */ + public function getBucket() + { + return $this->get("Bucket"); + } + + /** + * Bucket: 存储桶名称 + * + * @param string $bucket + */ + public function setBucket($bucket) + { + $this->set("Bucket", $bucket); + } + + /** + * Status: 启用状态(enable/disable,只有绑定了自定义域名才能开启) + * + * @return string|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 启用状态(enable/disable,只有绑定了自定义域名才能开启) + * + * @param string $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * DefaultIndex: 默认首页 + * + * @return string|null + */ + public function getDefaultIndex() + { + return $this->get("DefaultIndex"); + } + + /** + * DefaultIndex: 默认首页 + * + * @param string $defaultIndex + */ + public function setDefaultIndex($defaultIndex) + { + $this->set("DefaultIndex", $defaultIndex); + } + + /** + * SubDirRedirect: 子目录是否启用重定向 + * + * @return string|null + */ + public function getSubDirRedirect() + { + return $this->get("SubDirRedirect"); + } + + /** + * SubDirRedirect: 子目录是否启用重定向 + * + * @param string $subDirRedirect + */ + public function setSubDirRedirect($subDirRedirect) + { + $this->set("SubDirRedirect", $subDirRedirect); + } + + /** + * RuleFor404: 404规则 + * + * @return string|null + */ + public function getRuleFor404() + { + return $this->get("RuleFor404"); + } + + /** + * RuleFor404: 404规则 + * + * @param string $ruleFor404 + */ + public function setRuleFor404($ruleFor404) + { + $this->set("RuleFor404", $ruleFor404); + } + + /** + * DefaultPage404: 404时的默认页面 + * + * @return string|null + */ + public function getDefaultPage404() + { + return $this->get("DefaultPage404"); + } + + /** + * DefaultPage404: 404时的默认页面 + * + * @param string $defaultPage404 + */ + public function setDefaultPage404($defaultPage404) + { + $this->set("DefaultPage404", $defaultPage404); + } +} diff --git a/src/UFile/Apis/UpdateBucketStaticPageRuleResponse.php b/src/UFile/Apis/UpdateBucketStaticPageRuleResponse.php new file mode 100644 index 00000000..d2933d60 --- /dev/null +++ b/src/UFile/Apis/UpdateBucketStaticPageRuleResponse.php @@ -0,0 +1,26 @@ + "UpdateCORSRule"]); + $this->markRequired("CORSId"); + $this->markRequired("BucketName"); + $this->markRequired("AllowedOrigin"); + $this->markRequired("AllowedMethod"); + } + + + + /** + * 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); + } + + /** + * CORSId: 跨域规则ID + * + * @return string|null + */ + public function getCORSId() + { + return $this->get("CORSId"); + } + + /** + * CORSId: 跨域规则ID + * + * @param string $corsId + */ + public function setCORSId($corsId) + { + $this->set("CORSId", $corsId); + } + + /** + * BucketName: Bucket名称 + * + * @return string|null + */ + public function getBucketName() + { + return $this->get("BucketName"); + } + + /** + * BucketName: Bucket名称 + * + * @param string $bucketName + */ + public function setBucketName($bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * AllowedOrigin: 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) + * + * @return string|null + */ + public function getAllowedOrigin() + { + return $this->get("AllowedOrigin"); + } + + /** + * AllowedOrigin: 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) + * + * @param string $allowedOrigin + */ + public function setAllowedOrigin($allowedOrigin) + { + $this->set("AllowedOrigin", $allowedOrigin); + } + + /** + * AllowedMethod: 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + * + * @return string|null + */ + public function getAllowedMethod() + { + return $this->get("AllowedMethod"); + } + + /** + * AllowedMethod: 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + * + * @param string $allowedMethod + */ + public function setAllowedMethod($allowedMethod) + { + $this->set("AllowedMethod", $allowedMethod); + } + + /** + * AllowedHeader: 指定允许的跨域请求头(多个Header用‘,’分隔) + * + * @return string|null + */ + public function getAllowedHeader() + { + return $this->get("AllowedHeader"); + } + + /** + * AllowedHeader: 指定允许的跨域请求头(多个Header用‘,’分隔) + * + * @param string $allowedHeader + */ + public function setAllowedHeader($allowedHeader) + { + $this->set("AllowedHeader", $allowedHeader); + } + + /** + * ExposeHeader: 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + * + * @return string|null + */ + public function getExposeHeader() + { + return $this->get("ExposeHeader"); + } + + /** + * ExposeHeader: 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + * + * @param string $exposeHeader + */ + public function setExposeHeader($exposeHeader) + { + $this->set("ExposeHeader", $exposeHeader); + } +} diff --git a/src/UFile/Apis/UpdateCORSRuleResponse.php b/src/UFile/Apis/UpdateCORSRuleResponse.php new file mode 100644 index 00000000..cfdd3f7e --- /dev/null +++ b/src/UFile/Apis/UpdateCORSRuleResponse.php @@ -0,0 +1,26 @@ +set("IADays", $iaDays); } + + /** + * Tags: Tag,参数格式"k1=v1&k2=v2",key的最大长度为128, value最大长度为256byte,单个object的tag的最大数量为10 + * + * @return string|null + */ + public function getTags() + { + return $this->get("Tags"); + } + + /** + * Tags: Tag,参数格式"k1=v1&k2=v2",key的最大长度为128, value最大长度为256byte,单个object的tag的最大数量为10 + * + * @param string $tags + */ + public function setTags($tags) + { + $this->set("Tags", $tags); + } } diff --git a/src/UFile/Apis/UpdateUFileLifeCycleResponse.php b/src/UFile/Apis/UpdateUFileLifeCycleResponse.php index 7112d0ee..f099e861 100644 --- a/src/UFile/Apis/UpdateUFileLifeCycleResponse.php +++ b/src/UFile/Apis/UpdateUFileLifeCycleResponse.php @@ -1,6 +1,6 @@ "UpdateUFileSSLCert"]); + $this->markRequired("BucketName"); + $this->markRequired("Domain"); + $this->markRequired("CertificateName"); + $this->markRequired("Certificate"); + $this->markRequired("CertificateKey"); + } + + + + /** + * BucketName: 存储桶名称,全局唯一 + * + * @return string|null + */ + public function getBucketName() + { + return $this->get("BucketName"); + } + + /** + * BucketName: 存储桶名称,全局唯一 + * + * @param string $bucketName + */ + public function setBucketName($bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * Domain: 域名 + * + * @return string|null + */ + public function getDomain() + { + return $this->get("Domain"); + } + + /** + * Domain: 域名 + * + * @param string $domain + */ + public function setDomain($domain) + { + $this->set("Domain", $domain); + } + + /** + * CertificateName: SSL证书名称 + * + * @return string|null + */ + public function getCertificateName() + { + return $this->get("CertificateName"); + } + + /** + * CertificateName: SSL证书名称 + * + * @param string $certificateName + */ + public function setCertificateName($certificateName) + { + $this->set("CertificateName", $certificateName); + } + + /** + * Certificate: 填写SSL证书文件内容(PEM编码)。 证书文件内容填写格式: 如果您的业务场景仅需确保服务端证书可信,则证书文件需要包含服务器证书(①)和中间证书(②)。如果您的中间证书和服务器证书是两个文件,您可以在证书链配置项填写中间证书内容即可。 + * + * @return string|null + */ + public function getCertificate() + { + return $this->get("Certificate"); + } + + /** + * Certificate: 填写SSL证书文件内容(PEM编码)。 证书文件内容填写格式: 如果您的业务场景仅需确保服务端证书可信,则证书文件需要包含服务器证书(①)和中间证书(②)。如果您的中间证书和服务器证书是两个文件,您可以在证书链配置项填写中间证书内容即可。 + * + * @param string $certificate + */ + public function setCertificate($certificate) + { + $this->set("Certificate", $certificate); + } + + /** + * CertificateKey: 填写SSL证书私钥内容(PEM编码)。 + * + * @return string|null + */ + public function getCertificateKey() + { + return $this->get("CertificateKey"); + } + + /** + * CertificateKey: 填写SSL证书私钥内容(PEM编码)。 + * + * @param string $certificateKey + */ + public function setCertificateKey($certificateKey) + { + $this->set("CertificateKey", $certificateKey); + } +} diff --git a/src/UFile/Apis/UpdateUFileSSLCertResponse.php b/src/UFile/Apis/UpdateUFileSSLCertResponse.php new file mode 100644 index 00000000..18bfc4f6 --- /dev/null +++ b/src/UFile/Apis/UpdateUFileSSLCertResponse.php @@ -0,0 +1,26 @@ + "UpdateUdsRule"]); + $this->markRequired("RuleId"); + $this->markRequired("RuleName"); + $this->markRequired("SrcBucket"); + $this->markRequired("SrcTokenId"); + $this->markRequired("DstBucket"); + $this->markRequired("DstTokenId"); + $this->markRequired("DstDirectory"); + $this->markRequired("KeepUS3Name"); + $this->markRequired("Prefixes"); + } + + + + /** + * RuleId: 规则的唯一Id + * + * @return string|null + */ + public function getRuleId() + { + return $this->get("RuleId"); + } + + /** + * RuleId: 规则的唯一Id + * + * @param string $ruleId + */ + public function setRuleId($ruleId) + { + $this->set("RuleId", $ruleId); + } + + /** + * RuleName: 规则名称 + * + * @return string|null + */ + public function getRuleName() + { + return $this->get("RuleName"); + } + + /** + * RuleName: 规则名称 + * + * @param string $ruleName + */ + public function setRuleName($ruleName) + { + $this->set("RuleName", $ruleName); + } + + /** + * SrcBucket: 源Bucket名字,全局唯一 + * + * @return string|null + */ + public function getSrcBucket() + { + return $this->get("SrcBucket"); + } + + /** + * SrcBucket: 源Bucket名字,全局唯一 + * + * @param string $srcBucket + */ + public function setSrcBucket($srcBucket) + { + $this->set("SrcBucket", $srcBucket); + } + + /** + * SrcTokenId: 源bucket的token之一的tokenId + * + * @return string|null + */ + public function getSrcTokenId() + { + return $this->get("SrcTokenId"); + } + + /** + * SrcTokenId: 源bucket的token之一的tokenId + * + * @param string $srcTokenId + */ + public function setSrcTokenId($srcTokenId) + { + $this->set("SrcTokenId", $srcTokenId); + } + + /** + * DstBucket: 目标Bucket名字,全局唯一 + * + * @return string|null + */ + public function getDstBucket() + { + return $this->get("DstBucket"); + } + + /** + * DstBucket: 目标Bucket名字,全局唯一 + * + * @param string $dstBucket + */ + public function setDstBucket($dstBucket) + { + $this->set("DstBucket", $dstBucket); + } + + /** + * DstTokenId: 目标bucket的token之一的tokenId + * + * @return string|null + */ + public function getDstTokenId() + { + return $this->get("DstTokenId"); + } + + /** + * DstTokenId: 目标bucket的token之一的tokenId + * + * @param string $dstTokenId + */ + public function setDstTokenId($dstTokenId) + { + $this->set("DstTokenId", $dstTokenId); + } + + /** + * DstDirectory: 解压后的目标目录 + * + * @return string|null + */ + public function getDstDirectory() + { + return $this->get("DstDirectory"); + } + + /** + * DstDirectory: 解压后的目标目录 + * + * @param string $dstDirectory + */ + public function setDstDirectory($dstDirectory) + { + $this->set("DstDirectory", $dstDirectory); + } + + /** + * KeepUS3Name: 是否以压缩文件的前缀为最后一层目录 + * + * @return boolean|null + */ + public function getKeepUS3Name() + { + return $this->get("KeepUS3Name"); + } + + /** + * KeepUS3Name: 是否以压缩文件的前缀为最后一层目录 + * + * @param boolean $keepUS3Name + */ + public function setKeepUS3Name($keepUS3Name) + { + $this->set("KeepUS3Name", $keepUS3Name); + } + + /** + * Prefixes: 触发解压缩的前缀 + * + * @return string|null + */ + public function getPrefixes() + { + return $this->get("Prefixes"); + } + + /** + * Prefixes: 触发解压缩的前缀 + * + * @param string $prefixes + */ + public function setPrefixes($prefixes) + { + $this->set("Prefixes", $prefixes); + } + + /** + * Ops: 操作的ops数组,"Ops.0":"unzip" + * + * @return string[]|null + */ + public function getOps() + { + return $this->get("Ops"); + } + + /** + * Ops: 操作的ops数组,"Ops.0":"unzip" + * + * @param string[] $ops + */ + public function setOps(array $ops) + { + $this->set("Ops", $ops); + } + + /** + * Events: 通知的事件数组 + * + * @return string[]|null + */ + public function getEvents() + { + return $this->get("Events"); + } + + /** + * Events: 通知的事件数组 + * + * @param string[] $events + */ + public function setEvents(array $events) + { + $this->set("Events", $events); + } + + /** + * ContactGroupId: 联系的用户组ID + * + * @return string|null + */ + public function getContactGroupId() + { + return $this->get("ContactGroupId"); + } + + /** + * ContactGroupId: 联系的用户组ID + * + * @param string $contactGroupId + */ + public function setContactGroupId($contactGroupId) + { + $this->set("ContactGroupId", $contactGroupId); + } + + /** + * NotificationTypes: 通知的类型数组 + * + * @return string[]|null + */ + public function getNotificationTypes() + { + return $this->get("NotificationTypes"); + } + + /** + * NotificationTypes: 通知的类型数组 + * + * @param string[] $notificationTypes + */ + public function setNotificationTypes(array $notificationTypes) + { + $this->set("NotificationTypes", $notificationTypes); + } +} diff --git a/src/UFile/Apis/UpdateUdsRuleResponse.php b/src/UFile/Apis/UpdateUdsRuleResponse.php new file mode 100644 index 00000000..6c7c8cbc --- /dev/null +++ b/src/UFile/Apis/UpdateUdsRuleResponse.php @@ -0,0 +1,64 @@ +get("RuleId"); + } + + /** + * RuleId: 返回规则的规则ID + * + * @param string $ruleId + */ + public function setRuleId($ruleId) + { + $this->set("RuleId", $ruleId); + } + + /** + * Mesage: 该请求的消息成功或者失败的描述 + * + * @return string|null + */ + public function getMesage() + { + return $this->get("Mesage"); + } + + /** + * Mesage: 该请求的消息成功或者失败的描述 + * + * @param string $mesage + */ + public function setMesage($mesage) + { + $this->set("Mesage", $mesage); + } +} diff --git a/src/UFile/Models/BucketBills.php b/src/UFile/Models/BucketBills.php new file mode 100644 index 00000000..84419692 --- /dev/null +++ b/src/UFile/Models/BucketBills.php @@ -0,0 +1,56 @@ +get("BucketBills"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UFileDailyBillItem($item)); + } + return $result; + } + + /** + * BucketBills: + * + * @param UFileDailyBillItem[] $bucketBills + */ + public function setBucketBills(array $bucketBills) + { + $result = []; + foreach ($bucketBills as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UFile/Models/BucketStaticPageRule.php b/src/UFile/Models/BucketStaticPageRule.php new file mode 100644 index 00000000..e5fc50a6 --- /dev/null +++ b/src/UFile/Models/BucketStaticPageRule.php @@ -0,0 +1,124 @@ +get("Status"); + } + + /** + * Status: 启用状态 + * + * @param string $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * DefaultIndex: 默认网页 + * + * @return string|null + */ + public function getDefaultIndex() + { + return $this->get("DefaultIndex"); + } + + /** + * DefaultIndex: 默认网页 + * + * @param string $defaultIndex + */ + public function setDefaultIndex($defaultIndex) + { + $this->set("DefaultIndex", $defaultIndex); + } + + /** + * SubDirRedirect: 子目录重定向功能的启用状态 + * + * @return string|null + */ + public function getSubDirRedirect() + { + return $this->get("SubDirRedirect"); + } + + /** + * SubDirRedirect: 子目录重定向功能的启用状态 + * + * @param string $subDirRedirect + */ + public function setSubDirRedirect($subDirRedirect) + { + $this->set("SubDirRedirect", $subDirRedirect); + } + + /** + * RuleFor404: 404时的处理规则 + * + * @return string|null + */ + public function getRuleFor404() + { + return $this->get("RuleFor404"); + } + + /** + * RuleFor404: 404时的处理规则 + * + * @param string $ruleFor404 + */ + public function setRuleFor404($ruleFor404) + { + $this->set("RuleFor404", $ruleFor404); + } + + /** + * DefaultPage404: 默认404页面在存储桶的路径 + * + * @return string|null + */ + public function getDefaultPage404() + { + return $this->get("DefaultPage404"); + } + + /** + * DefaultPage404: 默认404页面在存储桶的路径 + * + * @param string $defaultPage404 + */ + public function setDefaultPage404($defaultPage404) + { + $this->set("DefaultPage404", $defaultPage404); + } +} diff --git a/src/UFile/Models/CORSRuleSet.php b/src/UFile/Models/CORSRuleSet.php new file mode 100644 index 00000000..49d84e3c --- /dev/null +++ b/src/UFile/Models/CORSRuleSet.php @@ -0,0 +1,164 @@ +get("AllowedOrigin"); + } + + /** + * AllowedOrigin: 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) + * + * @param string $allowedOrigin + */ + public function setAllowedOrigin($allowedOrigin) + { + $this->set("AllowedOrigin", $allowedOrigin); + } + + /** + * AllowedMethod: 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + * + * @return string|null + */ + public function getAllowedMethod() + { + return $this->get("AllowedMethod"); + } + + /** + * AllowedMethod: 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + * + * @param string $allowedMethod + */ + public function setAllowedMethod($allowedMethod) + { + $this->set("AllowedMethod", $allowedMethod); + } + + /** + * CORSId: 跨域规则id + * + * @return string|null + */ + public function getCORSId() + { + return $this->get("CORSId"); + } + + /** + * CORSId: 跨域规则id + * + * @param string $corsId + */ + public function setCORSId($corsId) + { + $this->set("CORSId", $corsId); + } + + /** + * CreateTime: 跨域规则创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 跨域规则创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ModifyTime: 跨域规则最新修改时间 + * + * @return integer|null + */ + public function getModifyTime() + { + return $this->get("ModifyTime"); + } + + /** + * ModifyTime: 跨域规则最新修改时间 + * + * @param int $modifyTime + */ + public function setModifyTime($modifyTime) + { + $this->set("ModifyTime", $modifyTime); + } + + /** + * AllowedHeader: 指定允许的跨域请求头(多个Header用‘,’分隔) + * + * @return string|null + */ + public function getAllowedHeader() + { + return $this->get("AllowedHeader"); + } + + /** + * AllowedHeader: 指定允许的跨域请求头(多个Header用‘,’分隔) + * + * @param string $allowedHeader + */ + public function setAllowedHeader($allowedHeader) + { + $this->set("AllowedHeader", $allowedHeader); + } + + /** + * ExposeHeader: 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + * + * @return string|null + */ + public function getExposeHeader() + { + return $this->get("ExposeHeader"); + } + + /** + * ExposeHeader: 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + * + * @param string $exposeHeader + */ + public function setExposeHeader($exposeHeader) + { + $this->set("ExposeHeader", $exposeHeader); + } +} diff --git a/src/UFile/Models/LifeCycleItem.php b/src/UFile/Models/LifeCycleItem.php index 89e4e910..ea1da9e1 100644 --- a/src/UFile/Models/LifeCycleItem.php +++ b/src/UFile/Models/LifeCycleItem.php @@ -1,6 +1,6 @@ get("MinSize"); + } + + /** + * MinSize: 文件的最小size + * + * @param string $minSize + */ + public function setMinSize($minSize) + { + $this->set("MinSize", $minSize); + } + + /** + * MaxSize: 文件的最大size + * + * @return string|null + */ + public function getMaxSize() + { + return $this->get("MaxSize"); + } + + /** + * MaxSize: 文件的最大size + * + * @param string $maxSize + */ + public function setMaxSize($maxSize) + { + $this->set("MaxSize", $maxSize); + } + /** * LifeCycleId: 生命周期Id * diff --git a/src/UFile/Models/UFileBucketSet.php b/src/UFile/Models/UFileBucketSet.php index 2a87aeca..fedd35be 100644 --- a/src/UFile/Models/UFileBucketSet.php +++ b/src/UFile/Models/UFileBucketSet.php @@ -1,6 +1,6 @@ get("GetCountIaBill"); + } + + /** + * GetCountIaBill: 下载低频存储次数费用;分 + * + * @param float $getCountIaBill + */ + public function setGetCountIaBill($getCountIaBill) + { + $this->set("GetCountIaBill", $getCountIaBill); + } + + /** + * GetCountBill: 下载标准存储次数费用;分 + * + * @return float|null + */ + public function getGetCountBill() + { + return $this->get("GetCountBill"); + } + + /** + * GetCountBill: 下载标准存储次数费用;分 + * + * @param float $getCountBill + */ + public function setGetCountBill($getCountBill) + { + $this->set("GetCountBill", $getCountBill); + } + + /** + * PutCountAcBill: 上传归档存储次数费用;分 + * + * @return float|null + */ + public function getPutCountAcBill() + { + return $this->get("PutCountAcBill"); + } + + /** + * PutCountAcBill: 上传归档存储次数费用;分 + * + * @param float $putCountAcBill + */ + public function setPutCountAcBill($putCountAcBill) + { + $this->set("PutCountAcBill", $putCountAcBill); + } + + /** + * PutCountIaBill: 上传低频存储次数费用;分 + * + * @return float|null + */ + public function getPutCountIaBill() + { + return $this->get("PutCountIaBill"); + } + + /** + * PutCountIaBill: 上传低频存储次数费用;分 + * + * @param float $putCountIaBill + */ + public function setPutCountIaBill($putCountIaBill) + { + $this->set("PutCountIaBill", $putCountIaBill); + } + + /** + * PutCountBill: 上传标准存储次数费用;分 + * + * @return float|null + */ + public function getPutCountBill() + { + return $this->get("PutCountBill"); + } + + /** + * PutCountBill: 上传标准存储次数费用;分 + * + * @param float $putCountBill + */ + public function setPutCountBill($putCountBill) + { + $this->set("PutCountBill", $putCountBill); + } + + /** + * ObjectTagCountBill: 对象标签费用: 分 + * + * @return float|null + */ + public function getObjectTagCountBill() + { + return $this->get("ObjectTagCountBill"); + } + + /** + * ObjectTagCountBill: 对象标签费用: 分 + * + * @param float $objectTagCountBill + */ + public function setObjectTagCountBill($objectTagCountBill) + { + $this->set("ObjectTagCountBill", $objectTagCountBill); + } + + /** + * StorageBill: 标准-存储总容量费用;分 + * + * @return float|null + */ + public function getStorageBill() + { + return $this->get("StorageBill"); + } + + /** + * StorageBill: 标准-存储总容量费用;分 + * + * @param float $storageBill + */ + public function setStorageBill($storageBill) + { + $this->set("StorageBill", $storageBill); + } + + /** + * IaStorageBill: 低频-存储总容量费用;分 + * + * @return float|null + */ + public function getIaStorageBill() + { + return $this->get("IaStorageBill"); + } + + /** + * IaStorageBill: 低频-存储总容量费用;分 + * + * @param float $iaStorageBill + */ + public function setIaStorageBill($iaStorageBill) + { + $this->set("IaStorageBill", $iaStorageBill); + } + + /** + * AcStorageBill: 归档-存储总容量费用;分 + * + * @return float|null + */ + public function getAcStorageBill() + { + return $this->get("AcStorageBill"); + } + + /** + * AcStorageBill: 归档-存储总容量费用;分 + * + * @param float $acStorageBill + */ + public function setAcStorageBill($acStorageBill) + { + $this->set("AcStorageBill", $acStorageBill); + } + + /** + * IaGetSizeBill: 低频-数据取回量,即低频文件的数据取回量费用;分 + * + * @return float|null + */ + public function getIaGetSizeBill() + { + return $this->get("IaGetSizeBill"); + } + + /** + * IaGetSizeBill: 低频-数据取回量,即低频文件的数据取回量费用;分 + * + * @param float $iaGetSizeBill + */ + public function setIaGetSizeBill($iaGetSizeBill) + { + $this->set("IaGetSizeBill", $iaGetSizeBill); + } + + /** + * AcRestoreBill: 归档-标准解冻量,即归档文件的解冻类型为标准(Strandard)的解冻量费用; 分 + * + * @return float|null + */ + public function getAcRestoreBill() + { + return $this->get("AcRestoreBill"); + } + + /** + * AcRestoreBill: 归档-标准解冻量,即归档文件的解冻类型为标准(Strandard)的解冻量费用; 分 + * + * @param float $acRestoreBill + */ + public function setAcRestoreBill($acRestoreBill) + { + $this->set("AcRestoreBill", $acRestoreBill); + } + + /** + * AcExpeditedRetrievalBill: 归档-高优先级解冻量,即归档文件的解冻类型为高优先级(Expedited)的解冻量费用; 分 + * + * @return float|null + */ + public function getAcExpeditedRetrievalBill() + { + return $this->get("AcExpeditedRetrievalBill"); + } + + /** + * AcExpeditedRetrievalBill: 归档-高优先级解冻量,即归档文件的解冻类型为高优先级(Expedited)的解冻量费用; 分 + * + * @param float $acExpeditedRetrievalBill + */ + public function setAcExpeditedRetrievalBill($acExpeditedRetrievalBill) + { + $this->set("AcExpeditedRetrievalBill", $acExpeditedRetrievalBill); + } + + /** + * IaShortStorageBill: 低频-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 + * + * @return float|null + */ + public function getIaShortStorageBill() + { + return $this->get("IaShortStorageBill"); + } + + /** + * IaShortStorageBill: 低频-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 + * + * @param float $iaShortStorageBill + */ + public function setIaShortStorageBill($iaShortStorageBill) + { + $this->set("IaShortStorageBill", $iaShortStorageBill); + } + + /** + * AcShortStorageBill: 归档-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 + * + * @return float|null + */ + public function getAcShortStorageBill() + { + return $this->get("AcShortStorageBill"); + } + + /** + * AcShortStorageBill: 归档-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 + * + * @param float $acShortStorageBill + */ + public function setAcShortStorageBill($acShortStorageBill) + { + $this->set("AcShortStorageBill", $acShortStorageBill); + } + + /** + * ImageHandleFlowBill: 基础图片处理量费用;分 + * + * @return float|null + */ + public function getImageHandleFlowBill() + { + return $this->get("ImageHandleFlowBill"); + } + + /** + * ImageHandleFlowBill: 基础图片处理量费用;分 + * + * @param float $imageHandleFlowBill + */ + public function setImageHandleFlowBill($imageHandleFlowBill) + { + $this->set("ImageHandleFlowBill", $imageHandleFlowBill); + } + + /** + * ImageCompressCountBill: 图片高级压缩次数费用;分 + * + * @return float|null + */ + public function getImageCompressCountBill() + { + return $this->get("ImageCompressCountBill"); + } + + /** + * ImageCompressCountBill: 图片高级压缩次数费用;分 + * + * @param float $imageCompressCountBill + */ + public function setImageCompressCountBill($imageCompressCountBill) + { + $this->set("ImageCompressCountBill", $imageCompressCountBill); + } + + /** + * BusyFlowBill: 忙时流量费用;分;海外无此字段 + * + * @return float|null + */ + public function getBusyFlowBill() + { + return $this->get("BusyFlowBill"); + } + + /** + * BusyFlowBill: 忙时流量费用;分;海外无此字段 + * + * @param float $busyFlowBill + */ + public function setBusyFlowBill($busyFlowBill) + { + $this->set("BusyFlowBill", $busyFlowBill); + } + + /** + * IdleFlowBill: 闲时流量费用;分;海外无此字段 + * + * @return float|null + */ + public function getIdleFlowBill() + { + return $this->get("IdleFlowBill"); + } + + /** + * IdleFlowBill: 闲时流量费用;分;海外无此字段 + * + * @param float $idleFlowBill + */ + public function setIdleFlowBill($idleFlowBill) + { + $this->set("IdleFlowBill", $idleFlowBill); + } + + /** + * CdnFlowBill: cdn回源流量费用;分 + * + * @return float|null + */ + public function getCdnFlowBill() + { + return $this->get("CdnFlowBill"); + } + + /** + * CdnFlowBill: cdn回源流量费用;分 + * + * @param float $cdnFlowBill + */ + public function setCdnFlowBill($cdnFlowBill) + { + $this->set("CdnFlowBill", $cdnFlowBill); + } + + /** + * FlowBill: 下载流量费用:分;国内无此字段 + * + * @return float|null + */ + public function getFlowBill() + { + return $this->get("FlowBill"); + } + + /** + * FlowBill: 下载流量费用:分;国内无此字段 + * + * @param float $flowBill + */ + public function setFlowBill($flowBill) + { + $this->set("FlowBill", $flowBill); + } + + /** + * Date: 配额消费时间,unix时间戳;单位s,精确到日期 + * + * @return integer|null + */ + public function getDate() + { + return $this->get("Date"); + } + + /** + * Date: 配额消费时间,unix时间戳;单位s,精确到日期 + * + * @param int $date + */ + public function setDate($date) + { + $this->set("Date", $date); + } + + /** + * GetCountAcBill: 下载归档存储次数费用;分 + * + * @return float|null + */ + public function getGetCountAcBill() + { + return $this->get("GetCountAcBill"); + } + + /** + * GetCountAcBill: 下载归档存储次数费用;分 + * + * @param float $getCountAcBill + */ + public function setGetCountAcBill($getCountAcBill) + { + $this->set("GetCountAcBill", $getCountAcBill); + } +} diff --git a/src/UFile/Models/UFileDailyReportItem.php b/src/UFile/Models/UFileDailyReportItem.php index 7ea0f846..0d58c639 100644 --- a/src/UFile/Models/UFileDailyReportItem.php +++ b/src/UFile/Models/UFileDailyReportItem.php @@ -1,6 +1,6 @@ get("AcExpeditedRetrieval"); + } + + /** + * AcExpeditedRetrieval: 归档-高优先级解冻量,即归档文件的解冻类型为高优先级(Expedited)的解冻量;单位GB + * + * @param float $acExpeditedRetrieval + */ + public function setAcExpeditedRetrieval($acExpeditedRetrieval) + { + $this->set("AcExpeditedRetrieval", $acExpeditedRetrieval); + } + + /** + * IaShortStorage: 低频-短期存储量,即补足未满最短存储期限的剩余天数的存储量;单位GB + * + * @return float|null + */ + public function getIaShortStorage() + { + return $this->get("IaShortStorage"); + } + + /** + * IaShortStorage: 低频-短期存储量,即补足未满最短存储期限的剩余天数的存储量;单位GB + * + * @param float $iaShortStorage + */ + public function setIaShortStorage($iaShortStorage) + { + $this->set("IaShortStorage", $iaShortStorage); + } + + /** + * AcShortStorage: 归档-短期存储量,即补足未满最短存储期限的剩余天数的存储量;单位GB + * + * @return float|null + */ + public function getAcShortStorage() + { + return $this->get("AcShortStorage"); + } + + /** + * AcShortStorage: 归档-短期存储量,即补足未满最短存储期限的剩余天数的存储量;单位GB + * + * @param float $acShortStorage + */ + public function setAcShortStorage($acShortStorage) + { + $this->set("AcShortStorage", $acShortStorage); + } + + /** + * ImageHandleFlow: 基础图片处理量;单位GB + * + * @return float|null + */ + public function getImageHandleFlow() + { + return $this->get("ImageHandleFlow"); + } + + /** + * ImageHandleFlow: 基础图片处理量;单位GB + * + * @param float $imageHandleFlow + */ + public function setImageHandleFlow($imageHandleFlow) + { + $this->set("ImageHandleFlow", $imageHandleFlow); + } + + /** + * ImageCompressCount: 图片高级压缩次数;单位千次 + * + * @return float|null + */ + public function getImageCompressCount() + { + return $this->get("ImageCompressCount"); + } + + /** + * ImageCompressCount: 图片高级压缩次数;单位千次 + * + * @param float $imageCompressCount + */ + public function setImageCompressCount($imageCompressCount) + { + $this->set("ImageCompressCount", $imageCompressCount); + } + + /** + * BusyFlow: 忙时流量;单位GB;海外无此字段 * * @return float|null */ @@ -133,7 +233,7 @@ public function getBusyFlow() } /** - * BusyFlow: 忙时流量;单位byte;海外无此字段 + * BusyFlow: 忙时流量;单位GB;海外无此字段 * * @param float $busyFlow */ @@ -143,7 +243,7 @@ public function setBusyFlow($busyFlow) } /** - * IdleFlow: 闲时流量;单位byte;海外无此字段 + * IdleFlow: 闲时流量;单位GB;海外无此字段 * * @return float|null */ @@ -153,7 +253,7 @@ public function getIdleFlow() } /** - * IdleFlow: 闲时流量;单位byte;海外无此字段 + * IdleFlow: 闲时流量;单位GB;海外无此字段 * * @param float $idleFlow */ @@ -163,7 +263,7 @@ public function setIdleFlow($idleFlow) } /** - * CdnFlow: cdn回源流量;单位byte + * CdnFlow: cdn回源流量;单位GB * * @return float|null */ @@ -173,7 +273,7 @@ public function getCdnFlow() } /** - * CdnFlow: cdn回源流量;单位byte + * CdnFlow: cdn回源流量;单位GB * * @param float $cdnFlow */ @@ -183,7 +283,7 @@ public function setCdnFlow($cdnFlow) } /** - * Flow: 下载流量:单位byte;国内无此字段 + * Flow: 下载流量:单位GB;国内无此字段 * * @return float|null */ @@ -193,7 +293,7 @@ public function getFlow() } /** - * Flow: 下载流量:单位byte;国内无此字段 + * Flow: 下载流量:单位GB;国内无此字段 * * @param float $flow */ @@ -203,7 +303,7 @@ public function setFlow($flow) } /** - * Date: 配额消费时间,unix时间戳(单位s),精确到日期 + * Date: 配额消费时间,unix时间戳;单位s,精确到日期 * * @return integer|null */ @@ -213,7 +313,7 @@ public function getDate() } /** - * Date: 配额消费时间,unix时间戳(单位s),精确到日期 + * Date: 配额消费时间,unix时间戳;单位s,精确到日期 * * @param int $date */ @@ -223,7 +323,7 @@ public function setDate($date) } /** - * ApiTimes: API请求次数(万次) + * ApiTimes: 请求次数;单位万次 * * @return float|null */ @@ -233,7 +333,7 @@ public function getApiTimes() } /** - * ApiTimes: API请求次数(万次) + * ApiTimes: 请求次数;单位万次 * * @param float $apiTimes */ @@ -241,4 +341,24 @@ public function setApiTimes($apiTimes) { $this->set("ApiTimes", $apiTimes); } + + /** + * ObjectTagCount: 对象标签个数; 单位万个 + * + * @return float|null + */ + public function getObjectTagCount() + { + return $this->get("ObjectTagCount"); + } + + /** + * ObjectTagCount: 对象标签个数; 单位万个 + * + * @param float $objectTagCount + */ + public function setObjectTagCount($objectTagCount) + { + $this->set("ObjectTagCount", $objectTagCount); + } } diff --git a/src/UFile/Models/UFileDomainSet.php b/src/UFile/Models/UFileDomainSet.php index 98a25375..66e8a214 100644 --- a/src/UFile/Models/UFileDomainSet.php +++ b/src/UFile/Models/UFileDomainSet.php @@ -1,6 +1,6 @@ get("Domain"); + } + + /** + * Domain: 域名 + * + * @param string $domain + */ + public function setDomain($domain) + { + $this->set("Domain", $domain); + } + + /** + * Certificate: SSL证书内容,和域名对应 + * + * @return string|null + */ + public function getCertificate() + { + return $this->get("Certificate"); + } + + /** + * Certificate: SSL证书内容,和域名对应 + * + * @param string $certificate + */ + public function setCertificate($certificate) + { + $this->set("Certificate", $certificate); + } + + /** + * CertificateKey: SSL证书对应的私钥 + * + * @return string|null + */ + public function getCertificateKey() + { + return $this->get("CertificateKey"); + } + + /** + * CertificateKey: SSL证书对应的私钥 + * + * @param string $certificateKey + */ + public function setCertificateKey($certificateKey) + { + $this->set("CertificateKey", $certificateKey); + } + + /** + * CertificateName: SSL证书名称 + * + * @return string|null + */ + public function getCertificateName() + { + return $this->get("CertificateName"); + } + + /** + * CertificateName: SSL证书名称 + * + * @param string $certificateName + */ + public function setCertificateName($certificateName) + { + $this->set("CertificateName", $certificateName); + } +} diff --git a/src/UFile/Models/UFileTokenSet.php b/src/UFile/Models/UFileTokenSet.php index bf5925d3..24af9a51 100644 --- a/src/UFile/Models/UFileTokenSet.php +++ b/src/UFile/Models/UFileTokenSet.php @@ -1,6 +1,6 @@ get("Region"); + } + + /** + * Region: 所属地区 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + /** * TokenId: 令牌ID * @@ -103,7 +123,7 @@ public function setPrivateKey($privateKey) } /** - * AllowedOps: 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + * AllowedOps: 令牌允许执行的操作,[ TOKEN_ALLOW_NONE 没有权限, TOKEN_ALLOW_READ 下载权限, TOKEN_ALLOW_WRITE 上传权限, TOKEN_ALLOW_DELETE 删除权限, TOKEN_ALLOW_LIST 列表权限, TOKEN_ALLOW_IOP 图片处理权限] * * @return string[]|null */ @@ -113,7 +133,7 @@ public function getAllowedOps() } /** - * AllowedOps: 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + * AllowedOps: 令牌允许执行的操作,[ TOKEN_ALLOW_NONE 没有权限, TOKEN_ALLOW_READ 下载权限, TOKEN_ALLOW_WRITE 上传权限, TOKEN_ALLOW_DELETE 删除权限, TOKEN_ALLOW_LIST 列表权限, TOKEN_ALLOW_IOP 图片处理权限] * * @param string[] $allowedOps */ @@ -223,22 +243,42 @@ public function setModifyTime($modifyTime) } /** - * Region: 所属地区 + * BlackIPList: 令牌黑名单 * - * @return string|null + * @return string[]|null */ - public function getRegion() + public function getBlackIPList() { - return $this->get("Region"); + return $this->get("BlackIPList"); } /** - * Region: 所属地区 + * BlackIPList: 令牌黑名单 * - * @param string $region + * @param string[] $blackIPList */ - public function setRegion($region) + public function setBlackIPList(array $blackIPList) { - $this->set("Region", $region); + $this->set("BlackIPList", $blackIPList); + } + + /** + * WhiteIPList: 令牌白名单 + * + * @return string[]|null + */ + public function getWhiteIPList() + { + return $this->get("WhiteIPList"); + } + + /** + * WhiteIPList: 令牌白名单 + * + * @param string[] $whiteIPList + */ + public function setWhiteIPList(array $whiteIPList) + { + $this->set("WhiteIPList", $whiteIPList); } } diff --git a/src/UFile/Models/UFileTotalReportItem.php b/src/UFile/Models/UFileTotalReportItem.php index d3c6811e..28d9f56f 100644 --- a/src/UFile/Models/UFileTotalReportItem.php +++ b/src/UFile/Models/UFileTotalReportItem.php @@ -1,6 +1,6 @@ (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "BucketName" => (string) Bucket名称 + * "AllowedOrigin" => (string) 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) + * "AllowedMethod" => (string) 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + * "AllowedHeader" => (string) 指定允许的跨域请求头(多个Header用‘,’分隔) + * "ExposeHeader" => (string) 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + * ] + * + * Outputs: + * + * $outputs = [ + * "CORSId" => (string) 增加一条跨域规则的cors_id + * ] + * + * @return AddCORSRuleResponse + * @throws UCloudException + */ + public function addCORSRule(AddCORSRuleRequest $request = null) + { + $resp = $this->invoke($request); + return new AddCORSRuleResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * AddUFileSSLCert - 给指定域名添加证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/add_ufile_ssl_cert + * + * Arguments: + * + * $args = [ + * "BucketName" => (string) 存储桶名称,全局唯一 + * "Domain" => (string) 域名 + * "CertificateName" => (string) SSL证书名称 + * "Certificate" => (string) 填写SSL证书文件内容(PEM编码)。证书文件内容填写格式:如果您的业务场景仅需确保服务端证书可信,则证书文件需要包含服务器证书(①)和中间证书(②)。如果您的中间证书和服务器证书是两个文件,您可以在证书链配置项填写中间证书内容即可。 + * "CertificateKey" => (string) 填写SSL证书私钥内容(PEM编码)。 + * "USSLId" => (string) ussl证书的资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return AddUFileSSLCertResponse + * @throws UCloudException + */ + public function addUFileSSLCert(AddUFileSSLCertRequest $request = null) + { + $resp = $this->invoke($request); + return new AddUFileSSLCertResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * BindBucketDomain - 绑定自定义域名 + * + * See also: https://docs.ucloud.cn/api/ufile-api/bind_bucket_domain + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "BucketName" => (string) 自定义域名对应的bucket名称 + * "Domain" => (string) 自定义域名 + * ] + * + * Outputs: + * + * $outputs = [ + * "BucketName" => (string) 自定义域名对应的bucket名称 + * "BucketId" => (string) 自定义域名对应的Bucket的Id + * ] + * + * @return BindBucketDomainResponse + * @throws UCloudException + */ + public function bindBucketDomain(BindBucketDomainRequest $request = null) + { + $resp = $this->invoke($request); + return new BindBucketDomainResponse($resp->toArray(), $resp->getRequestId()); + } + /** * CreateBucket - 创建Bucket * @@ -69,10 +187,11 @@ class UFileClient extends Client * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "BucketName" => (string) 待创建Bucket的名称,具有全局唯一性 * "Type" => (string) Bucket访问类型,public或private; 默认为private + * "Tag" => (string) Bucket所属业务组,默认为default * ] * * Outputs: @@ -108,6 +227,7 @@ public function createBucket(CreateBucketRequest $request = null) * "Days" => (integer) 指定一个过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;参数范围:[7,36500],0代表不启用 * "ArchivalDays" => (integer) 指定一个过期天数N,文件会在其最近更新时间点的N天后,自动变为归档存储类型;参数范围:[7,36500],0代表不启用 * "IADays" => (integer) 指定一个过期天数N,文件会在其最近更新时间点的N天后,自动变为低频存储类型;参数范围:[7,36500],0代表不启用 + * "Tags" => (string) Tag,参数格式"k1=v1&k2=v2",key的最大长度为128, value最大长度为256byte,单个object的tag的最大数量为10 * ] * * Outputs: @@ -133,19 +253,36 @@ public function createUFileLifeCycle(CreateUFileLifeCycleRequest $request = null * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "TokenName" => (string) 令牌名称 - * "AllowedOps" => (array) 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ]。默认TOKEN_ALLOW_NONE + * "AllowedOps" => (array) 令牌允许执行的操作[ TOKEN_ALLOW_NONE 没有权限, TOKEN_ALLOW_READ 下载权限 , TOKEN_ALLOW_WRITE 上传权限 , TOKEN_ALLOW_DELETE 删除权限 , TOKEN_ALLOW_LIST 列表权限, TOKEN_ALLOW_IOP 图片处理权限, TOKEN_DENY_UPDATE 禁止覆盖权限]。默认TOKEN_ALLOW_NONE * "AllowedPrefixes" => (array) 令牌允许操作的key前缀,默认*表示全部 * "AllowedBuckets" => (array) 令牌允许操作的bucket,默认*表示全部 * "ExpireTime" => (integer) Unix 时间戳,精确到秒,为令牌过期时间点。默认过期时间为一天(即当前Unix时间戳+86400);注意:过期时间不能超过 4102416000 + * "BlackIPList" => (array) 令牌黑名单,支持ipv4,ipv6格式。 + * "WhiteIPList" => (array) 令牌白名单,支持ipv4,ipv6格式。 * ] * * Outputs: * * $outputs = [ - * "TokenId" => (string) 创建令牌的token_id + * "TokenId" => (string) 令牌唯一ID + * "UFileTokenSet" => (object) 创建令牌的详细信息[ + * "Region" => (string) 所属地区 + * "TokenId" => (string) 令牌ID + * "TokenName" => (string) 令牌名称 + * "PublicKey" => (string) 令牌公钥 + * "PrivateKey" => (string) 令牌私钥 + * "AllowedOps" => (array) 令牌允许执行的操作,[ TOKEN_ALLOW_NONE 没有权限, TOKEN_ALLOW_READ 下载权限, TOKEN_ALLOW_WRITE 上传权限, TOKEN_ALLOW_DELETE 删除权限, TOKEN_ALLOW_LIST 列表权限, TOKEN_ALLOW_IOP 图片处理权限] + * "AllowedPrefixes" => (array) 令牌允许操作的key前缀 + * "AllowedBuckets" => (array) 令牌允许操作的bucket + * "ExpireTime" => (integer) 令牌的超时时间点 + * "CreateTime" => (integer) 创建时间 + * "ModifyTime" => (integer) 修改时间 + * "BlackIPList" => (array) 令牌黑名单 + * "WhiteIPList" => (array) 令牌白名单 + * ] * ] * * @return CreateUFileTokenResponse @@ -185,6 +322,33 @@ public function deleteBucket(DeleteBucketRequest $request = null) return new DeleteBucketResponse($resp->toArray(), $resp->getRequestId()); } + /** + * DeleteCORSRule - 删除跨域规则 + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_cors_rule + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "BucketName" => (string) Bucket名称 + * "CORSId" => (string) 跨域规则ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteCORSRuleResponse + * @throws UCloudException + */ + public function deleteCORSRule(DeleteCORSRuleRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteCORSRuleResponse($resp->toArray(), $resp->getRequestId()); + } + /** * DeleteUFileLifeCycle - 删除生命周期管理 * @@ -213,6 +377,32 @@ public function deleteUFileLifeCycle(DeleteUFileLifeCycleRequest $request = null return new DeleteUFileLifeCycleResponse($resp->toArray(), $resp->getRequestId()); } + /** + * DeleteUFileSSLCert - 删除指定域名添加证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/delete_ufile_ssl_cert + * + * Arguments: + * + * $args = [ + * "BucketName" => (string) 存储桶名称,全局唯一 + * "Domain" => (string) 域名 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteUFileSSLCertResponse + * @throws UCloudException + */ + public function deleteUFileSSLCert(DeleteUFileSSLCertRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUFileSSLCertResponse($resp->toArray(), $resp->getRequestId()); + } + /** * DeleteUFileToken - 删除令牌 * @@ -289,6 +479,44 @@ public function describeBucket(DescribeBucketRequest $request = null) return new DescribeBucketResponse($resp->toArray(), $resp->getRequestId()); } + /** + * DescribeCORSRule - 获取跨域规则信息 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_cors_rule + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "BucketName" => (string) Bucket名称 + * "CORSId" => (string) 跨域规则ID,不指定则返回所有跨域规则信息 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 跨域规则信息集合[ + * [ + * "AllowedOrigin" => (string) 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) + * "AllowedMethod" => (string) 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + * "CORSId" => (string) 跨域规则id + * "CreateTime" => (integer) 跨域规则创建时间 + * "ModifyTime" => (integer) 跨域规则最新修改时间 + * "AllowedHeader" => (string) 指定允许的跨域请求头(多个Header用‘,’分隔) + * "ExposeHeader" => (string) 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + * ] + * ] + * ] + * + * @return DescribeCORSRuleResponse + * @throws UCloudException + */ + public function describeCORSRule(DescribeCORSRuleRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeCORSRuleResponse($resp->toArray(), $resp->getRequestId()); + } + /** * DescribeUFileLifeCycle - 获取生命周期信息 * @@ -306,8 +534,10 @@ public function describeBucket(DescribeBucketRequest $request = null) * Outputs: * * $outputs = [ - * "DateSet" => (array) 生命周期信息[ + * "DataSet" => (array) 生命周期信息[ * [ + * "MinSize" => (string) 文件的最小size + * "MaxSize" => (string) 文件的最大size * "LifeCycleId" => (string) 生命周期Id * "LifeCycleName" => (string) 生命周期名称 * "Prefix" => (string) 生命周期所适用的前缀;*为整个存储空间文件; @@ -329,6 +559,72 @@ public function describeUFileLifeCycle(DescribeUFileLifeCycleRequest $request = return new DescribeUFileLifeCycleResponse($resp->toArray(), $resp->getRequestId()); } + /** + * DescribeUFileReferer - 对象存储防盗链列表 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_referer + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "BucketName" => (string) 存储空间名称 + * ] + * + * Outputs: + * + * $outputs = [ + * "RefererType" => (integer) 防盗链Referer类型,支持两种类型,1黑名单,2白名单;未开启referer时不返回此参数 + * "RefererList" => (array) 防盗链Referer规则列表;未开启referer时不返回此参数 + * "NullRefer" => (boolean) ReferType为白名单时,NullRefer为false代表不允许NULL refer访问,为true代表允许Null refer访问; 未开启referer时不返回此参数 + * "RefererStatus" => (string) 防盗链功能是否开启,"on"表示开启,"off"表示关闭 + * "BlackList" => (array) 黑名单列表 + * "WhiteList" => (array) 白名单列表 + * ] + * + * @return DescribeUFileRefererResponse + * @throws UCloudException + */ + public function describeUFileReferer(DescribeUFileRefererRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUFileRefererResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUFileSSLCert - 查询指定存储桶所有证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/describe_ufile_ssl_cert + * + * Arguments: + * + * $args = [ + * "BucketName" => (string) 存储桶名称,全局唯一 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 证书列表[ + * [ + * "Domain" => (string) 域名 + * "Certificate" => (string) SSL证书内容,和域名对应 + * "CertificateKey" => (string) SSL证书对应的私钥 + * "CertificateName" => (string) SSL证书名称 + * ] + * ] + * ] + * + * @return DescribeUFileSSLCertResponse + * @throws UCloudException + */ + public function describeUFileSSLCert(DescribeUFileSSLCertRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUFileSSLCertResponse($resp->toArray(), $resp->getRequestId()); + } + /** * DescribeUFileToken - 获取令牌信息 * @@ -349,17 +645,19 @@ public function describeUFileLifeCycle(DescribeUFileLifeCycleRequest $request = * $outputs = [ * "DataSet" => (array) 令牌描述信息[ * [ + * "Region" => (string) 所属地区 * "TokenId" => (string) 令牌ID * "TokenName" => (string) 令牌名称 * "PublicKey" => (string) 令牌公钥 * "PrivateKey" => (string) 令牌私钥 - * "AllowedOps" => (array) 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + * "AllowedOps" => (array) 令牌允许执行的操作,[ TOKEN_ALLOW_NONE 没有权限, TOKEN_ALLOW_READ 下载权限, TOKEN_ALLOW_WRITE 上传权限, TOKEN_ALLOW_DELETE 删除权限, TOKEN_ALLOW_LIST 列表权限, TOKEN_ALLOW_IOP 图片处理权限] * "AllowedPrefixes" => (array) 令牌允许操作的key前缀 * "AllowedBuckets" => (array) 令牌允许操作的bucket * "ExpireTime" => (integer) 令牌的超时时间点 * "CreateTime" => (integer) 创建时间 * "ModifyTime" => (integer) 修改时间 - * "Region" => (string) 所属地区 + * "BlackIPList" => (array) 令牌黑名单 + * "WhiteIPList" => (array) 令牌白名单 * ] * ] * ] @@ -373,6 +671,99 @@ public function describeUFileToken(DescribeUFileTokenRequest $request = null) return new DescribeUFileTokenResponse($resp->toArray(), $resp->getRequestId()); } + /** + * GetBucketStaticPageRule - 获取bucket静态网页配置 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_bucket_static_page_rule + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Bucket" => (string) 存储桶名称 + * ] + * + * Outputs: + * + * $outputs = [ + * "Rule" => (object) 规则内容[ + * "Status" => (string) 启用状态 + * "DefaultIndex" => (string) 默认网页 + * "SubDirRedirect" => (string) 子目录重定向功能的启用状态 + * "RuleFor404" => (string) 404时的处理规则 + * "DefaultPage404" => (string) 默认404页面在存储桶的路径 + * ] + * ] + * + * @return GetBucketStaticPageRuleResponse + * @throws UCloudException + */ + public function getBucketStaticPageRule(GetBucketStaticPageRuleRequest $request = null) + { + $resp = $this->invoke($request); + return new GetBucketStaticPageRuleResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUFileDailyBill - 获取bucket每日账单 + * + * See also: https://docs.ucloud.cn/api/ufile-api/get_ufile_daily_bill + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "StartTime" => (integer) 查询开始时间;unix时间戳,单位s + * "EndTime" => (integer) 查询结束时间;unix时间戳,单位s + * "BucketName" => (string) 空间名称。此字段不为空,返回此Bucket日账单,否则,返回这个项目的日账单 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 消费情况[ + * [ + * "BucketBills" => (array) [ + * [ + * "GetCountIaBill" => (number) 下载低频存储次数费用;分 + * "GetCountBill" => (number) 下载标准存储次数费用;分 + * "PutCountAcBill" => (number) 上传归档存储次数费用;分 + * "PutCountIaBill" => (number) 上传低频存储次数费用;分 + * "PutCountBill" => (number) 上传标准存储次数费用;分 + * "ObjectTagCountBill" => (number) 对象标签费用: 分 + * "StorageBill" => (number) 标准-存储总容量费用;分 + * "IaStorageBill" => (number) 低频-存储总容量费用;分 + * "AcStorageBill" => (number) 归档-存储总容量费用;分 + * "IaGetSizeBill" => (number) 低频-数据取回量,即低频文件的数据取回量费用;分 + * "AcRestoreBill" => (number) 归档-标准解冻量,即归档文件的解冻类型为标准(Strandard)的解冻量费用; 分 + * "AcExpeditedRetrievalBill" => (number) 归档-高优先级解冻量,即归档文件的解冻类型为高优先级(Expedited)的解冻量费用; 分 + * "IaShortStorageBill" => (number) 低频-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 + * "AcShortStorageBill" => (number) 归档-短期存储量,即补足未满最短存储期限的剩余天数的存储量费用;分 + * "ImageHandleFlowBill" => (number) 基础图片处理量费用;分 + * "ImageCompressCountBill" => (number) 图片高级压缩次数费用;分 + * "BusyFlowBill" => (number) 忙时流量费用;分;海外无此字段 + * "IdleFlowBill" => (number) 闲时流量费用;分;海外无此字段 + * "CdnFlowBill" => (number) cdn回源流量费用;分 + * "FlowBill" => (number) 下载流量费用:分;国内无此字段 + * "Date" => (integer) 配额消费时间,unix时间戳;单位s,精确到日期 + * "GetCountAcBill" => (number) 下载归档存储次数费用;分 + * ] + * ] + * ] + * ] + * ] + * + * @return GetUFileDailyBillResponse + * @throws UCloudException + */ + public function getUFileDailyBill(GetUFileDailyBillRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUFileDailyBillResponse($resp->toArray(), $resp->getRequestId()); + } + /** * GetUFileDailyReport - 查看日消费报表 * @@ -395,26 +786,32 @@ public function describeUFileToken(DescribeUFileTokenRequest $request = null) * [ * "Total" => (array) 总消费情况[ * [ - * "Flow" => (number) 下载流量:单位byte;国内无此字段 - * "IdleFlow" => (number) 闲时流量;单位byte;海外无此字段 - * "BusyFlow" => (number) 忙时流量;单位byte;海外无此字段 - * "CdnFlow" => (number) cdn回源流量;单位byte + * "Flow" => (number) 下载流量:单位GB;国内无此字段 + * "IdleFlow" => (number) 闲时流量;单位GB;海外无此字段 + * "BusyFlow" => (number) 忙时流量;单位GB;海外无此字段 + * "CdnFlow" => (number) cdn回源流量;单位GB * "ApiTimes" => (number) API请求次数(万次) * ] * ] * "Daily" => (array) 日消费情况[ * [ - * "Storage" => (number) 标准存储量;单位byte - * "IaStorage" => (number) 低频存储量;单位byte - * "AcStorage" => (number) 冷存(归档)存储量;单位byte - * "IaGetSize" => (number) 低频数据取回量;单位byte - * "AcRestore" => (number) 冷存激活量,即归档数据取回量;单位byte - * "BusyFlow" => (number) 忙时流量;单位byte;海外无此字段 - * "IdleFlow" => (number) 闲时流量;单位byte;海外无此字段 - * "CdnFlow" => (number) cdn回源流量;单位byte - * "Flow" => (number) 下载流量:单位byte;国内无此字段 - * "Date" => (integer) 配额消费时间,unix时间戳(单位s),精确到日期 - * "ApiTimes" => (number) API请求次数(万次) + * "Storage" => (number) 标准-存储总容量;单位GB + * "IaStorage" => (number) 低频-存储总容量;单位GB + * "AcStorage" => (number) 归档-存储总容量;单位GB + * "IaGetSize" => (number) 低频-数据取回量,即低频文件的数据取回量;单位GB + * "AcRestore" => (number) 归档-标准解冻量,即归档文件的解冻类型为标准(Strandard)的解冻量;单位GB + * "AcExpeditedRetrieval" => (number) 归档-高优先级解冻量,即归档文件的解冻类型为高优先级(Expedited)的解冻量;单位GB + * "IaShortStorage" => (number) 低频-短期存储量,即补足未满最短存储期限的剩余天数的存储量;单位GB + * "AcShortStorage" => (number) 归档-短期存储量,即补足未满最短存储期限的剩余天数的存储量;单位GB + * "ImageHandleFlow" => (number) 基础图片处理量;单位GB + * "ImageCompressCount" => (number) 图片高级压缩次数;单位千次 + * "BusyFlow" => (number) 忙时流量;单位GB;海外无此字段 + * "IdleFlow" => (number) 闲时流量;单位GB;海外无此字段 + * "CdnFlow" => (number) cdn回源流量;单位GB + * "Flow" => (number) 下载流量:单位GB;国内无此字段 + * "Date" => (integer) 配额消费时间,unix时间戳;单位s,精确到日期 + * "ApiTimes" => (number) 请求次数;单位万次 + * "ObjectTagCount" => (number) 对象标签个数; 单位万个 * ] * ] * ] @@ -577,8 +974,10 @@ public function getUFileReport(GetUFileReportRequest $request = null) * "BucketName" => (string) 存储空间名称 * "RefererStatus" => (string) 开启关闭referer防盗链;关闭防盗链会清空防盗链参数设置,开启防盗链必须指定 RefererType、Referers;开启:on, 关闭:off; * "RefererAllowNull" => (boolean) RefererType为白名单时,RefererAllowNull为false代表不允许空referer访问,为true代表允许空referer访问;此参数默认为 true; - * "RefererType" => (integer) 防盗链Referer类型,支持两种类型,黑名单和白名单; 1黑名单,2白名单;RefererStatus为"on"时此参数必填; - * "Referers" => (array) 防盗链Referer规则,支持正则表达式(不支持符号';') + * "RefererType" => (integer) 防盗链Referer类型,支持三种类型,1代表设置黑名单、2代表设置白名单,3代表同时设置黑白名单; (其中1和2是为了向前兼容,后续调用只应该传递类型3)RefererStatus为"on"时此参数必填; + * "Referers" => (array) 防盗链Referer规则,支持正则表达式(不支持符号';'),该字段已弃用,请使用WhiteList.n或BlackList.n + * "WhiteList" => (array) 白名单列表中的一项 + * "BlackList" => (array) 黑名单列表中的一项 * ] * * Outputs: @@ -624,6 +1023,69 @@ public function updateBucket(UpdateBucketRequest $request = null) return new UpdateBucketResponse($resp->toArray(), $resp->getRequestId()); } + /** + * UpdateBucketStaticPageRule - 修改bucket静态网页配置 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_bucket_static_page_rule + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Bucket" => (string) 存储桶名称 + * "Status" => (string) 启用状态(enable/disable,只有绑定了自定义域名才能开启) + * "DefaultIndex" => (string) 默认首页 + * "SubDirRedirect" => (string) 子目录是否启用重定向 + * "RuleFor404" => (string) 404规则 + * "DefaultPage404" => (string) 404时的默认页面 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateBucketStaticPageRuleResponse + * @throws UCloudException + */ + public function updateBucketStaticPageRule(UpdateBucketStaticPageRuleRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateBucketStaticPageRuleResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateCORSRule - 更新跨域规则 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_cors_rule + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "CORSId" => (string) 跨域规则ID + * "BucketName" => (string) Bucket名称 + * "AllowedOrigin" => (string) 指定允许的跨域请求的来源,使用通配符(*)表示允许所有来源的跨域请求(多个Origin用‘,’分隔) + * "AllowedMethod" => (string) 指定允许的跨域请求方法。支持的方法名有:GET、PUT、POST、DELETE、HEAD、OPTIONS(多个Method用‘,’分隔) + * "AllowedHeader" => (string) 指定允许的跨域请求头(多个Header用‘,’分隔) + * "ExposeHeader" => (string) 指定允许用户从应用程序中访问的响应头(多个ExposeHeader用‘,’分隔) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateCORSRuleResponse + * @throws UCloudException + */ + public function updateCORSRule(UpdateCORSRuleRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateCORSRuleResponse($resp->toArray(), $resp->getRequestId()); + } + /** * UpdateUFileLifeCycle - 更新生命周期管理 * @@ -642,6 +1104,7 @@ public function updateBucket(UpdateBucketRequest $request = null) * "Days" => (integer) 指定一个过期天数N,文件会在其最近更新时间点的N天后过期,自动删除;范围: [7,36500] * "ArchivalDays" => (integer) 指定一个过期天数N,文件会在其最近更新时间点的N天后过期,自动转换为归档存储类型;范围: [7,36500],0代表不启用 * "IADays" => (integer) 指定一个过期天数N,文件会在其最近更新时间点的N天后过期,自动转换为低频存储类型;范围: [7,36500],0代表不启用 + * "Tags" => (string) Tag,参数格式"k1=v1&k2=v2",key的最大长度为128, value最大长度为256byte,单个object的tag的最大数量为10 * ] * * Outputs: @@ -658,6 +1121,35 @@ public function updateUFileLifeCycle(UpdateUFileLifeCycleRequest $request = null return new UpdateUFileLifeCycleResponse($resp->toArray(), $resp->getRequestId()); } + /** + * UpdateUFileSSLCert - 更新指定域名证书 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_ufile_ssl_cert + * + * Arguments: + * + * $args = [ + * "BucketName" => (string) 存储桶名称,全局唯一 + * "Domain" => (string) 域名 + * "CertificateName" => (string) SSL证书名称 + * "Certificate" => (string) 填写SSL证书文件内容(PEM编码)。 证书文件内容填写格式: 如果您的业务场景仅需确保服务端证书可信,则证书文件需要包含服务器证书(①)和中间证书(②)。如果您的中间证书和服务器证书是两个文件,您可以在证书链配置项填写中间证书内容即可。 + * "CertificateKey" => (string) 填写SSL证书私钥内容(PEM编码)。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateUFileSSLCertResponse + * @throws UCloudException + */ + public function updateUFileSSLCert(UpdateUFileSSLCertRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateUFileSSLCertResponse($resp->toArray(), $resp->getRequestId()); + } + /** * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 * @@ -689,4 +1181,43 @@ public function updateUFileToken(UpdateUFileTokenRequest $request = null) $resp = $this->invoke($request); return new UpdateUFileTokenResponse($resp->toArray(), $resp->getRequestId()); } + + /** + * UpdateUdsRule - 针对对象存储的文件,进行自动触发解压。 + * + * See also: https://docs.ucloud.cn/api/ufile-api/update_uds_rule + * + * Arguments: + * + * $args = [ + * "RuleId" => (string) 规则的唯一Id + * "RuleName" => (string) 规则名称 + * "SrcBucket" => (string) 源Bucket名字,全局唯一 + * "SrcTokenId" => (string) 源bucket的token之一的tokenId + * "DstBucket" => (string) 目标Bucket名字,全局唯一 + * "DstTokenId" => (string) 目标bucket的token之一的tokenId + * "DstDirectory" => (string) 解压后的目标目录 + * "KeepUS3Name" => (boolean) 是否以压缩文件的前缀为最后一层目录 + * "Prefixes" => (string) 触发解压缩的前缀 + * "Ops" => (array) 操作的ops数组,"Ops.0":"unzip" + * "Events" => (array) 通知的事件数组 + * "ContactGroupId" => (string) 联系的用户组ID + * "NotificationTypes" => (array) 通知的类型数组 + * ] + * + * Outputs: + * + * $outputs = [ + * "RuleId" => (string) 返回规则的规则ID + * "Mesage" => (string) 该请求的消息成功或者失败的描述 + * ] + * + * @return UpdateUdsRuleResponse + * @throws UCloudException + */ + public function updateUdsRule(UpdateUdsRuleRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateUdsRuleResponse($resp->toArray(), $resp->getRequestId()); + } } diff --git a/src/UHadoop/Apis/AddUHadoopInstanceNodeRequest.php b/src/UHadoop/Apis/AddUHadoopInstanceNodeRequest.php new file mode 100644 index 00000000..9048100f --- /dev/null +++ b/src/UHadoop/Apis/AddUHadoopInstanceNodeRequest.php @@ -0,0 +1,293 @@ + "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); + } + + /** + * 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); + } + + /** + * 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 00000000..4a3920eb --- /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("AppConfigs"); + $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: 集群机器的登录密码,需要输入base64编码后的内容 + * + * @return string|null + */ + public function getPassword() + { + return $this->get("Password"); + } + + /** + * Password: 集群机器的登录密码,需要输入base64编码后的内容 + * + * @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); + } + + /** + * AppConfigs: 集群需要安装的组件,格式:组件#版本通过ListUHadoopFrameworkApp接口获取,例如:Spark#3.3.0 + * + * @return string[]|null + */ + public function getAppConfigs() + { + return $this->get("AppConfigs"); + } + + /** + * AppConfigs: 集群需要安装的组件,格式:组件#版本通过ListUHadoopFrameworkApp接口获取,例如:Spark#3.3.0 + * + * @param string[] $appConfigs + */ + public function setAppConfigs(array $appConfigs) + { + $this->set("AppConfigs", $appConfigs); + } + + /** + * 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); + } + + /** + * 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 00000000..6d39c61f --- /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 00000000..57cff025 --- /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 00000000..4b849cdd --- /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); + } + + /** + * 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); + } + + /** + * 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 00000000..a9e97582 --- /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 00000000..3e099634 --- /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 00000000..dfdbd987 --- /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/ListUHadoopFrameworkAppByUseCaseRequest.php b/src/UHadoop/Apis/ListUHadoopFrameworkAppByUseCaseRequest.php new file mode 100644 index 00000000..3f8befb0 --- /dev/null +++ b/src/UHadoop/Apis/ListUHadoopFrameworkAppByUseCaseRequest.php @@ -0,0 +1,91 @@ + "ListUHadoopFrameworkAppByUseCase"]); + $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/UHadoop/Apis/ListUHadoopFrameworkAppByUseCaseResponse.php b/src/UHadoop/Apis/ListUHadoopFrameworkAppByUseCaseResponse.php new file mode 100644 index 00000000..ef241f7f --- /dev/null +++ b/src/UHadoop/Apis/ListUHadoopFrameworkAppByUseCaseResponse.php @@ -0,0 +1,58 @@ +get("AppConfigSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AppConfigVersion($item)); + } + return $result; + } + + /** + * AppConfigSet: 使用场景的app版本信息 + * + * @param AppConfigVersion[] $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/ListUHadoopFrameworkAppRequest.php b/src/UHadoop/Apis/ListUHadoopFrameworkAppRequest.php new file mode 100644 index 00000000..b8347a47 --- /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 00000000..667db0f7 --- /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 AppConfig($item)); + } + return $result; + } + + /** + * AppConfigSet: 应用配置详情 + * + * @param AppConfig[] $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 00000000..f19463e0 --- /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 00000000..f460070b --- /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 00000000..6019149c --- /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 00000000..6448ddb3 --- /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 00000000..4e83ed00 --- /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 00000000..a018124d --- /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 00000000..7d1f0acd --- /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/AppConfigVersion.php b/src/UHadoop/Models/AppConfigVersion.php new file mode 100644 index 00000000..0dd2e91f --- /dev/null +++ b/src/UHadoop/Models/AppConfigVersion.php @@ -0,0 +1,136 @@ +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); + } + + /** + * 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); + } + + /** + * FrameworkVersion: 框架版本 + * + * @return string|null + */ + public function getFrameworkVersion() + { + return $this->get("FrameworkVersion"); + } + + /** + * FrameworkVersion: 框架版本 + * + * @param string $frameworkVersion + */ + public function setFrameworkVersion($frameworkVersion) + { + $this->set("FrameworkVersion", $frameworkVersion); + } + + /** + * UseCases: 框架示例 + * + * @return UseCases[]|null + */ + public function getUseCases() + { + $items = $this->get("UseCases"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UseCases($item)); + } + return $result; + } + + /** + * UseCases: 框架示例 + * + * @param UseCases[] $useCases + */ + public function setUseCases(array $useCases) + { + $result = []; + foreach ($useCases as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHadoop/Models/ClusterInfo.php b/src/UHadoop/Models/ClusterInfo.php new file mode 100644 index 00000000..afbeca57 --- /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 00000000..c8940634 --- /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 00000000..58dc4125 --- /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 00000000..c79aa641 --- /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/Models/UseCases.php b/src/UHadoop/Models/UseCases.php new file mode 100644 index 00000000..1718e035 --- /dev/null +++ b/src/UHadoop/Models/UseCases.php @@ -0,0 +1,84 @@ +get("ClusterCase"); + } + + /** + * ClusterCase: 集群种类 + * + * @param string $clusterCase + */ + public function setClusterCase($clusterCase) + { + $this->set("ClusterCase", $clusterCase); + } + + /** + * MustHas: 依赖的组件 + * + * @return string|null + */ + public function getMustHas() + { + return $this->get("MustHas"); + } + + /** + * MustHas: 依赖的组件 + * + * @param string $mustHas + */ + public function setMustHas($mustHas) + { + $this->set("MustHas", $mustHas); + } + + /** + * AppVersion: 组件版本 + * + * @return string|null + */ + public function getAppVersion() + { + return $this->get("AppVersion"); + } + + /** + * AppVersion: 组件版本 + * + * @param string $appVersion + */ + public function setAppVersion($appVersion) + { + $this->set("AppVersion", $appVersion); + } +} diff --git a/src/UHadoop/UHadoopClient.php b/src/UHadoop/UHadoopClient.php new file mode 100644 index 00000000..0255e14a --- /dev/null +++ b/src/UHadoop/UHadoopClient.php @@ -0,0 +1,499 @@ + (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "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 - 创建实例接口。\\ 创建实例前需要按以下步骤准备必要参数:\\ 1.获取Region(地域)和 Zone(可用区),访问链接:https://docs.ucloud.cn/api/summary/regionlist 可以获取所有支持的地域和可用区;\\ 2.FrameworkVersion,访问链接:https://docs.ucloud.cn/api/uhadoop-api/list_uhadoop_framework_app_by_use_case,响应字段的AppConfigSet[N].FrameworkVersion是框架版本是支持的 UHadoop 版本;\\ 3.ChargeType付费类型,可用值:Dynamic为按小时付费,Month为按月付费,Year为按年付费;\\ 4.InstanceGroupConfigs需要获取NodeType机型详情,访问链接:https://docs.ucloud.cn/api/uhadoop-api/get_uhadoop_node_type,响应字段的InstanceTypeSet[N].NodeType是机型名称,响应字段的InstanceTypeSet[N].SuitableRole是机型可用的节点类型;\\ 5.获取DiskSize磁盘大小范围 ,访问链接:https://docs.ucloud.cn/api/uhadoop-api/get_uhadoop_node_type,该接口响应字段的InstanceTypeSet[N].DiskSet[N].DiskMinSize和InstanceTypeSet[N].DiskSet[N].DiskMaxSize是磁盘大小的取值范围;\\ 6.InstanceName,自定义输入实例名称,只能包含中英文、数字以及- _ ;\\7.Password,集群机器的登录密码,需要输入base64编码后的内容;\\8.AppConfigs 集群需要安装的组件,访问链接,https://docs.ucloud.cn/api/uhadoop-api/list_uhadoop_framework_app ,AppConfigSet[N].AppName是组件名称,AppConfigSet[N].AppVersion是组件版本 + * + * 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) 集群机器的登录密码,需要输入base64编码后的内容 + * "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 + * "AppConfigs" => (array) 集群需要安装的组件,格式:组件#版本通过ListUHadoopFrameworkApp接口获取,例如:Spark#3.3.0 + * "Framework" => (string) 框架,值为'Hadoop'|'HDFS'|'MR'|'StarRocks'之一,框架,例如Hadoop|MR|HDFS|StarRocks Hadoop框架包含存储与计算服务 MR集群包含计算服务 HDFS只包含存储服务,StarRocks为StarRocks集群 + * "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) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "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()); + } + + /** + * ListUHadoopFrameworkAppByUseCase - 按使用场景列出uhadoop的框架和框架中的应用 + * + * See also: https://docs.ucloud.cn/api/uhadoop-api/list_uhadoop_framework_app_by_use_case + * + * 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 = [ + * "AppConfigSet" => (array) 使用场景的app版本信息[ + * [ + * "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 + * "Framework" => (string) 框架,值为'Hadoop'|'HDFS'|'MR'|'StarRocks'之一,框架,例如Hadoop|MR|HDFS|StarRocks Hadoop框架包含存储与计算服务 MR集群包含计算服务 HDFS只包含存储服务,StarRocks为StarRocks集群 + * "FrameworkVersion" => (string) 框架版本 + * "UseCases" => (array) 框架示例[ + * [ + * "ClusterCase" => (string) 集群种类 + * "MustHas" => (string) 依赖的组件 + * "AppVersion" => (string) 组件版本 + * ] + * ] + * ] + * ] + * ] + * + * @return ListUHadoopFrameworkAppByUseCaseResponse + * @throws UCloudException + */ + public function listUHadoopFrameworkAppByUseCase(ListUHadoopFrameworkAppByUseCaseRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUHadoopFrameworkAppByUseCaseResponse($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()); + } +} diff --git a/src/UKafka/Apis/AddUKafkaInstanceNodeRequest.php b/src/UKafka/Apis/AddUKafkaInstanceNodeRequest.php new file mode 100644 index 00000000..408a8b9a --- /dev/null +++ b/src/UKafka/Apis/AddUKafkaInstanceNodeRequest.php @@ -0,0 +1,154 @@ + "AddUKafkaInstanceNode"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + $this->markRequired("NodeType"); + $this->markRequired("NodeCount"); + } + + + + /** + * 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); + } + + /** + * NodeType: 机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * + * @return string|null + */ + public function getNodeType() + { + return $this->get("NodeType"); + } + + /** + * NodeType: 机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * + * @param string $nodeType + */ + public function setNodeType($nodeType) + { + $this->set("NodeType", $nodeType); + } + + /** + * 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/UKafka/Apis/AddUKafkaInstanceNodeResponse.php b/src/UKafka/Apis/AddUKafkaInstanceNodeResponse.php new file mode 100644 index 00000000..1b62994e --- /dev/null +++ b/src/UKafka/Apis/AddUKafkaInstanceNodeResponse.php @@ -0,0 +1,26 @@ + "CreateUKafkaInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("FrameworkVersion"); + $this->markRequired("ChargeType"); + $this->markRequired("NodeType"); + $this->markRequired("DiskSize"); + $this->markRequired("InstanceName"); + } + + + + /** + * 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); + } + + /** + * FrameworkVersion: kafka版本,支持的版本可通过ListUKafkaFrameworkVersion 接口返回字段的FrameworkVersions获取 + * + * @return string|null + */ + public function getFrameworkVersion() + { + return $this->get("FrameworkVersion"); + } + + /** + * FrameworkVersion: kafka版本,支持的版本可通过ListUKafkaFrameworkVersion 接口返回字段的FrameworkVersions获取 + * + * @param string $frameworkVersion + */ + public function setFrameworkVersion($frameworkVersion) + { + $this->set("FrameworkVersion", $frameworkVersion); + } + + /** + * ChargeType: 付费方式 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * NodeType: 机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * + * @return string|null + */ + public function getNodeType() + { + return $this->get("NodeType"); + } + + /** + * NodeType: 机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * + * @param string $nodeType + */ + public function setNodeType($nodeType) + { + $this->set("NodeType", $nodeType); + } + + /** + * DiskSize: 数据盘大小。支持范围根据GetUKafkaNodeType 接口返回的InstanceTypeSet[].MaxDiskSize 和MinDiskSize获取 + * + * @return integer|null + */ + public function getDiskSize() + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 数据盘大小。支持范围根据GetUKafkaNodeType 接口返回的InstanceTypeSet[].MaxDiskSize 和MinDiskSize获取 + * + * @param int $diskSize + */ + public function setDiskSize($diskSize) + { + $this->set("DiskSize", $diskSize); + } + + /** + * InstanceName: 实例名,可自定义。只能包含中英文、数字以及- _ . + * + * @return string|null + */ + public function getInstanceName() + { + return $this->get("InstanceName"); + } + + /** + * InstanceName: 实例名,可自定义。只能包含中英文、数字以及- _ . + * + * @param string $instanceName + */ + public function setInstanceName($instanceName) + { + $this->set("InstanceName", $instanceName); + } + + /** + * VPCId: VPCID,不填时为默认VPCID + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCID,不填时为默认VPCID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网 ID,不填时为默认子网 ID + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网 ID,不填时为默认子网 ID + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * BusinessId: 业务组,默认Default + * + * @return string|null + */ + public function getBusinessId() + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 业务组,默认Default + * + * @param string $businessId + */ + public function setBusinessId($businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * Quantity: 实例数量,默认 1 + * + * @return string|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 实例数量,默认 1 + * + * @param string $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * NodeCount: 实例节点数量。默认 3 节点 + * + * @return integer|null + */ + public function getNodeCount() + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 实例节点数量。默认 3 节点 + * + * @param int $nodeCount + */ + public function setNodeCount($nodeCount) + { + $this->set("NodeCount", $nodeCount); + } + + /** + * LogRetentionHours: kafka 日志保存时间,支持范围[1,240]。默认 72 小时 + * + * @return string|null + */ + public function getLogRetentionHours() + { + return $this->get("LogRetentionHours"); + } + + /** + * LogRetentionHours: kafka 日志保存时间,支持范围[1,240]。默认 72 小时 + * + * @param string $logRetentionHours + */ + public function setLogRetentionHours($logRetentionHours) + { + $this->set("LogRetentionHours", $logRetentionHours); + } + + /** + * DiskControllerType: 磁盘管理方式,支持值:NONE、CLEAN。默认值:NONE + * + * @return string|null + */ + public function getDiskControllerType() + { + return $this->get("DiskControllerType"); + } + + /** + * DiskControllerType: 磁盘管理方式,支持值:NONE、CLEAN。默认值:NONE + * + * @param string $diskControllerType + */ + public function setDiskControllerType($diskControllerType) + { + $this->set("DiskControllerType", $diskControllerType); + } + + /** + * DiskThreshold: 磁盘清理阈值,支持范围[70,90]。DiskControllerType 为CLEAN 时必填。默认值 90 + * + * @return string|null + */ + public function getDiskThreshold() + { + return $this->get("DiskThreshold"); + } + + /** + * DiskThreshold: 磁盘清理阈值,支持范围[70,90]。DiskControllerType 为CLEAN 时必填。默认值 90 + * + * @param string $diskThreshold + */ + public function setDiskThreshold($diskThreshold) + { + $this->set("DiskThreshold", $diskThreshold); + } + + /** + * IsSecurityEnabled: 是否开启安全组,支持"true","false",默认 false + * + * @return string|null + */ + public function getIsSecurityEnabled() + { + return $this->get("IsSecurityEnabled"); + } + + /** + * IsSecurityEnabled: 是否开启安全组,支持"true","false",默认 false + * + * @param string $isSecurityEnabled + */ + public function setIsSecurityEnabled($isSecurityEnabled) + { + $this->set("IsSecurityEnabled", $isSecurityEnabled); + } +} diff --git a/src/UKafka/Apis/CreateUKafkaInstanceResponse.php b/src/UKafka/Apis/CreateUKafkaInstanceResponse.php new file mode 100644 index 00000000..98ea5082 --- /dev/null +++ b/src/UKafka/Apis/CreateUKafkaInstanceResponse.php @@ -0,0 +1,44 @@ +get("InstanceId"); + } + + /** + * InstanceId: 实例资源 ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/UKafka/Apis/DeleteUKafkaInstanceRequest.php b/src/UKafka/Apis/DeleteUKafkaInstanceRequest.php new file mode 100644 index 00000000..46f22e89 --- /dev/null +++ b/src/UKafka/Apis/DeleteUKafkaInstanceRequest.php @@ -0,0 +1,112 @@ + "DeleteUKafkaInstance"]); + $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/UKafka/Apis/DeleteUKafkaInstanceResponse.php b/src/UKafka/Apis/DeleteUKafkaInstanceResponse.php new file mode 100644 index 00000000..9713bce5 --- /dev/null +++ b/src/UKafka/Apis/DeleteUKafkaInstanceResponse.php @@ -0,0 +1,26 @@ + "DescribeUKafkaConsumer"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterInstanceId"); + $this->markRequired("ConsumerGroup"); + $this->markRequired("Type"); + } + + + + /** + * 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); + } + + /** + * ClusterInstanceId: 实例 ID + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: 实例 ID + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } + + /** + * ConsumerGroup: 消费组组名 + * + * @return string|null + */ + public function getConsumerGroup() + { + return $this->get("ConsumerGroup"); + } + + /** + * ConsumerGroup: 消费组组名 + * + * @param string $consumerGroup + */ + public function setConsumerGroup($consumerGroup) + { + $this->set("ConsumerGroup", $consumerGroup); + } + + /** + * Type: 消费者组类型(同消费者组列表返回的类型值) + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 消费者组类型(同消费者组列表返回的类型值) + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } +} diff --git a/src/UKafka/Apis/DescribeUKafkaConsumerResponse.php b/src/UKafka/Apis/DescribeUKafkaConsumerResponse.php new file mode 100644 index 00000000..a336944f --- /dev/null +++ b/src/UKafka/Apis/DescribeUKafkaConsumerResponse.php @@ -0,0 +1,84 @@ +get("GroupName"); + } + + /** + * GroupName: 消费者组组名 + * + * @param string $groupName + */ + public function setGroupName($groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * Type: 消费者组类型 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 消费者组类型 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Topics: 消费者组所订阅 topic 信息 + * + * @return string[]|null + */ + public function getTopics() + { + return $this->get("Topics"); + } + + /** + * Topics: 消费者组所订阅 topic 信息 + * + * @param string[] $topics + */ + public function setTopics(array $topics) + { + $this->set("Topics", $topics); + } +} diff --git a/src/UKafka/Apis/DescribeUKafkaInstanceRequest.php b/src/UKafka/Apis/DescribeUKafkaInstanceRequest.php new file mode 100644 index 00000000..4177d69c --- /dev/null +++ b/src/UKafka/Apis/DescribeUKafkaInstanceRequest.php @@ -0,0 +1,112 @@ + "DescribeUKafkaInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterInstanceId"); + } + + + + /** + * 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); + } + + /** + * ClusterInstanceId: 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } +} diff --git a/src/UKafka/Apis/DescribeUKafkaInstanceResponse.php b/src/UKafka/Apis/DescribeUKafkaInstanceResponse.php new file mode 100644 index 00000000..ddc11ccd --- /dev/null +++ b/src/UKafka/Apis/DescribeUKafkaInstanceResponse.php @@ -0,0 +1,64 @@ +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/UKafka/Apis/GetUKafkaNodeTypeRequest.php b/src/UKafka/Apis/GetUKafkaNodeTypeRequest.php new file mode 100644 index 00000000..4b06f4c2 --- /dev/null +++ b/src/UKafka/Apis/GetUKafkaNodeTypeRequest.php @@ -0,0 +1,111 @@ + "GetUKafkaNodeType"]); + $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); + } + + /** + * NodeType: 传参时返回指定机型信息,参数为空时返回所有机型信息 + * + * @return string|null + */ + public function getNodeType() + { + return $this->get("NodeType"); + } + + /** + * NodeType: 传参时返回指定机型信息,参数为空时返回所有机型信息 + * + * @param string $nodeType + */ + public function setNodeType($nodeType) + { + $this->set("NodeType", $nodeType); + } +} diff --git a/src/UKafka/Apis/GetUKafkaNodeTypeResponse.php b/src/UKafka/Apis/GetUKafkaNodeTypeResponse.php new file mode 100644 index 00000000..946355be --- /dev/null +++ b/src/UKafka/Apis/GetUKafkaNodeTypeResponse.php @@ -0,0 +1,58 @@ +get("NodeTypeSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new InstanceType($item)); + } + return $result; + } + + /** + * NodeTypeSet: 机型信息列表 + * + * @param InstanceType[] $nodeTypeSet + */ + public function setNodeTypeSet(array $nodeTypeSet) + { + $result = []; + foreach ($nodeTypeSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UKafka/Apis/IsUKafkaTopicNameExistRequest.php b/src/UKafka/Apis/IsUKafkaTopicNameExistRequest.php new file mode 100644 index 00000000..3e36bab6 --- /dev/null +++ b/src/UKafka/Apis/IsUKafkaTopicNameExistRequest.php @@ -0,0 +1,133 @@ + "IsUKafkaTopicNameExist"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterInstanceId"); + $this->markRequired("TopicName"); + } + + + + /** + * 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); + } + + /** + * ClusterInstanceId: 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } + + /** + * TopicName: 待检查的topic名称 + * + * @return string|null + */ + public function getTopicName() + { + return $this->get("TopicName"); + } + + /** + * TopicName: 待检查的topic名称 + * + * @param string $topicName + */ + public function setTopicName($topicName) + { + $this->set("TopicName", $topicName); + } +} diff --git a/src/UKafka/Apis/IsUKafkaTopicNameExistResponse.php b/src/UKafka/Apis/IsUKafkaTopicNameExistResponse.php new file mode 100644 index 00000000..adfd9c8f --- /dev/null +++ b/src/UKafka/Apis/IsUKafkaTopicNameExistResponse.php @@ -0,0 +1,44 @@ +get("IsExist"); + } + + /** + * IsExist: 是否已经存在 + * + * @param string $isExist + */ + public function setIsExist($isExist) + { + $this->set("IsExist", $isExist); + } +} diff --git a/src/UKafka/Apis/ListUKafkaConsumersRequest.php b/src/UKafka/Apis/ListUKafkaConsumersRequest.php new file mode 100644 index 00000000..70e618b5 --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaConsumersRequest.php @@ -0,0 +1,112 @@ + "ListUKafkaConsumers"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterInstanceId"); + } + + + + /** + * 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); + } + + /** + * ClusterInstanceId: 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } +} diff --git a/src/UKafka/Apis/ListUKafkaConsumersResponse.php b/src/UKafka/Apis/ListUKafkaConsumersResponse.php new file mode 100644 index 00000000..6915c99e --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaConsumersResponse.php @@ -0,0 +1,57 @@ +get("Groups"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Group($item)); + } + return $result; + } + + /** + * Groups: 消费者组列表 + * + * @param Group[] $groups + */ + public function setGroups(array $groups) + { + $result = []; + foreach ($groups as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UKafka/Apis/ListUKafkaFrameworkVersionRequest.php b/src/UKafka/Apis/ListUKafkaFrameworkVersionRequest.php new file mode 100644 index 00000000..8549765b --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaFrameworkVersionRequest.php @@ -0,0 +1,91 @@ + "ListUKafkaFrameworkVersion"]); + $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/UKafka/Apis/ListUKafkaFrameworkVersionResponse.php b/src/UKafka/Apis/ListUKafkaFrameworkVersionResponse.php new file mode 100644 index 00000000..827c1b9b --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaFrameworkVersionResponse.php @@ -0,0 +1,57 @@ +get("FrameworkVersions"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Version($item)); + } + return $result; + } + + /** + * FrameworkVersions: kafka版本 + * + * @param Version[] $frameworkVersions + */ + public function setFrameworkVersions(array $frameworkVersions) + { + $result = []; + foreach ($frameworkVersions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UKafka/Apis/ListUKafkaInstanceRequest.php b/src/UKafka/Apis/ListUKafkaInstanceRequest.php new file mode 100644 index 00000000..08fa4e90 --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaInstanceRequest.php @@ -0,0 +1,191 @@ + "ListUKafkaInstance"]); + $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); + } + + /** + * Limit: 默认为60 + * + * @return string|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 默认为60 + * + * @param string $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 默认为0 + * + * @return string|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 默认为0 + * + * @param string $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } + + /** + * 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: SubnetId + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: SubnetId + * + * @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); + } +} diff --git a/src/UKafka/Apis/ListUKafkaInstanceResponse.php b/src/UKafka/Apis/ListUKafkaInstanceResponse.php new file mode 100644 index 00000000..fdc3503f --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaInstanceResponse.php @@ -0,0 +1,65 @@ +get("ClusterSet")); + } + + /** + * ClusterSet: 实例信息 + * + * @param ClusterSet $clusterSet + */ + public function setClusterSet(array $clusterSet) + { + $this->set("ClusterSet", $clusterSet->getAll()); + } + + /** + * TotalCount: 总数 + * + * @return string|null + */ + public function getTotalCount() + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 总数 + * + * @param string $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UKafka/Apis/ListUKafkaTopicsRequest.php b/src/UKafka/Apis/ListUKafkaTopicsRequest.php new file mode 100644 index 00000000..e9bbfdd1 --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaTopicsRequest.php @@ -0,0 +1,112 @@ + "ListUKafkaTopics"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterInstanceId"); + } + + + + /** + * 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); + } + + /** + * ClusterInstanceId: 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } +} diff --git a/src/UKafka/Apis/ListUKafkaTopicsResponse.php b/src/UKafka/Apis/ListUKafkaTopicsResponse.php new file mode 100644 index 00000000..dbaed966 --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaTopicsResponse.php @@ -0,0 +1,77 @@ +get("TopicList"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new TopicInfo($item)); + } + return $result; + } + + /** + * TopicList: topic 信息列表 + * + * @param TopicInfo[] $topicList + */ + public function setTopicList(array $topicList) + { + $result = []; + foreach ($topicList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Length: topic 列表长度 + * + * @return integer|null + */ + public function getLength() + { + return $this->get("Length"); + } + + /** + * Length: topic 列表长度 + * + * @param int $length + */ + public function setLength($length) + { + $this->set("Length", $length); + } +} diff --git a/src/UKafka/Apis/ModifyUKafkaInstanceTypeRequest.php b/src/UKafka/Apis/ModifyUKafkaInstanceTypeRequest.php new file mode 100644 index 00000000..54a6c2a0 --- /dev/null +++ b/src/UKafka/Apis/ModifyUKafkaInstanceTypeRequest.php @@ -0,0 +1,133 @@ + "ModifyUKafkaInstanceType"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + $this->markRequired("NodeType"); + } + + + + /** + * 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); + } + + /** + * NodeType: 目标机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName。仅升级CPU 和内存 + * + * @return string|null + */ + public function getNodeType() + { + return $this->get("NodeType"); + } + + /** + * NodeType: 目标机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName。仅升级CPU 和内存 + * + * @param string $nodeType + */ + public function setNodeType($nodeType) + { + $this->set("NodeType", $nodeType); + } +} diff --git a/src/UKafka/Apis/ModifyUKafkaInstanceTypeResponse.php b/src/UKafka/Apis/ModifyUKafkaInstanceTypeResponse.php new file mode 100644 index 00000000..eadcc05e --- /dev/null +++ b/src/UKafka/Apis/ModifyUKafkaInstanceTypeResponse.php @@ -0,0 +1,26 @@ + "ResizeUKafkaDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + $this->markRequired("DiskSize"); + } + + + + /** + * 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); + } + + /** + * DiskSize: 数据盘大小。支持范围根据GetUKafkaNodeType 接口返回的InstanceTypeSet[].MaxDiskSize 和MinDiskSize获取 + * + * @return integer|null + */ + public function getDiskSize() + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 数据盘大小。支持范围根据GetUKafkaNodeType 接口返回的InstanceTypeSet[].MaxDiskSize 和MinDiskSize获取 + * + * @param int $diskSize + */ + public function setDiskSize($diskSize) + { + $this->set("DiskSize", $diskSize); + } +} diff --git a/src/UKafka/Apis/ResizeUKafkaDiskResponse.php b/src/UKafka/Apis/ResizeUKafkaDiskResponse.php new file mode 100644 index 00000000..fc41a98b --- /dev/null +++ b/src/UKafka/Apis/ResizeUKafkaDiskResponse.php @@ -0,0 +1,26 @@ +get("Endpoints")); + } + + /** + * Endpoints: broker 访问端点 + * + * @param Endpoints $endpoints + */ + public function setEndpoints(array $endpoints) + { + $this->set("Endpoints", $endpoints->getAll()); + } + + /** + * BrokerId: broker id + * + * @return string|null + */ + public function getBrokerId() + { + return $this->get("BrokerId"); + } + + /** + * BrokerId: broker id + * + * @param string $brokerId + */ + public function setBrokerId($brokerId) + { + $this->set("BrokerId", $brokerId); + } + + /** + * BrokerInfo: broker 关联topic 信息 + * + * @return BrokerOfTopicInfo[]|null + */ + public function getBrokerInfo() + { + $items = $this->get("BrokerInfo"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BrokerOfTopicInfo($item)); + } + return $result; + } + + /** + * BrokerInfo: broker 关联topic 信息 + * + * @param BrokerOfTopicInfo[] $brokerInfo + */ + public function setBrokerInfo(array $brokerInfo) + { + $result = []; + foreach ($brokerInfo as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * CreateTime: broker 创建信息 + * + * @return string|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: broker 创建信息 + * + * @param string $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * DomainName: broker 域名 + * + * @return string|null + */ + public function getDomainName() + { + return $this->get("DomainName"); + } + + /** + * DomainName: broker 域名 + * + * @param string $domainName + */ + public function setDomainName($domainName) + { + $this->set("DomainName", $domainName); + } + + /** + * ExpireTime: broker 过期时间 + * + * @return integer|null + */ + public function getExpireTime() + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: broker 过期时间 + * + * @param int $expireTime + */ + public function setExpireTime($expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * IPSet: broker IP 信息 + * + * @return IP[]|null + */ + public function getIPSet() + { + $items = $this->get("IPSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new IP($item)); + } + return $result; + } + + /** + * IPSet: broker IP 信息 + * + * @param IP[] $ipSet + */ + public function setIPSet(array $ipSet) + { + $result = []; + foreach ($ipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * InstanceGroupType: broker 机型信息 + * + * @return string|null + */ + public function getInstanceGroupType() + { + return $this->get("InstanceGroupType"); + } + + /** + * InstanceGroupType: broker 机型信息 + * + * @param string $instanceGroupType + */ + public function setInstanceGroupType($instanceGroupType) + { + $this->set("InstanceGroupType", $instanceGroupType); + } + + /** + * KafkaPort: kafka 服务端口 + * + * @return integer|null + */ + public function getKafkaPort() + { + return $this->get("KafkaPort"); + } + + /** + * KafkaPort: kafka 服务端口 + * + * @param int $kafkaPort + */ + public function setKafkaPort($kafkaPort) + { + $this->set("KafkaPort", $kafkaPort); + } + + /** + * Remark: broker 备注信息 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: broker 备注信息 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * ResourceId: broker 注册资源信息 + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: broker 注册资源信息 + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * SecurityGroupId: 安全组 id + * + * @return string|null + */ + public function getSecurityGroupId() + { + return $this->get("SecurityGroupId"); + } + + /** + * SecurityGroupId: 安全组 id + * + * @param string $securityGroupId + */ + public function setSecurityGroupId($securityGroupId) + { + $this->set("SecurityGroupId", $securityGroupId); + } + + /** + * State: broker 当前状态 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: broker 当前状态 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * UHostConfig: broker 节点配置 + * + * @return UHostConfig|null + */ + public function getUHostConfig() + { + return new UHostConfig($this->get("UHostConfig")); + } + + /** + * UHostConfig: broker 节点配置 + * + * @param UHostConfig $uHostConfig + */ + public function setUHostConfig(array $uHostConfig) + { + $this->set("UHostConfig", $uHostConfig->getAll()); + } + + /** + * UHostId: 节点 id + * + * @return string|null + */ + public function getUHostId() + { + return $this->get("UHostId"); + } + + /** + * UHostId: 节点 id + * + * @param string $uHostId + */ + public function setUHostId($uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * UHostName: 节点名称 + * + * @return string|null + */ + public function getUHostName() + { + return $this->get("UHostName"); + } + + /** + * UHostName: 节点名称 + * + * @param string $uHostName + */ + public function setUHostName($uHostName) + { + $this->set("UHostName", $uHostName); + } + + /** + * UHostRole: 节点类型 + * + * @return string|null + */ + public function getUHostRole() + { + return $this->get("UHostRole"); + } + + /** + * UHostRole: 节点类型 + * + * @param string $uHostRole + */ + public function setUHostRole($uHostRole) + { + $this->set("UHostRole", $uHostRole); + } + + /** + * ZooKeeper: 节点是否部署 zookeeper + * + * @return string|null + */ + public function getZooKeeper() + { + return $this->get("ZooKeeper"); + } + + /** + * ZooKeeper: 节点是否部署 zookeeper + * + * @param string $zooKeeper + */ + public function setZooKeeper($zooKeeper) + { + $this->set("ZooKeeper", $zooKeeper); + } + + /** + * ZooKeeperPort: zookeeper 服务端口 + * + * @return integer|null + */ + public function getZooKeeperPort() + { + return $this->get("ZooKeeperPort"); + } + + /** + * ZooKeeperPort: zookeeper 服务端口 + * + * @param int $zooKeeperPort + */ + public function setZooKeeperPort($zooKeeperPort) + { + $this->set("ZooKeeperPort", $zooKeeperPort); + } +} diff --git a/src/UKafka/Models/BrokerOfTopicInfo.php b/src/UKafka/Models/BrokerOfTopicInfo.php new file mode 100644 index 00000000..104586fb --- /dev/null +++ b/src/UKafka/Models/BrokerOfTopicInfo.php @@ -0,0 +1,124 @@ +get("PartitionOnBroker"); + } + + /** + * PartitionOnBroker: topic 在 broker 上分布的 partition 数量 + * + * @param string $partitionOnBroker + */ + public function setPartitionOnBroker($partitionOnBroker) + { + $this->set("PartitionOnBroker", $partitionOnBroker); + } + + /** + * Partitions: topic 在 broker上 partition 列表 + * + * @return string|null + */ + public function getPartitions() + { + return $this->get("Partitions"); + } + + /** + * Partitions: topic 在 broker上 partition 列表 + * + * @param string $partitions + */ + public function setPartitions($partitions) + { + $this->set("Partitions", $partitions); + } + + /** + * Replication: Topic 副本数 + * + * @return integer|null + */ + public function getReplication() + { + return $this->get("Replication"); + } + + /** + * Replication: Topic 副本数 + * + * @param int $replication + */ + public function setReplication($replication) + { + $this->set("Replication", $replication); + } + + /** + * TopicName: topic 名称 + * + * @return string|null + */ + public function getTopicName() + { + return $this->get("TopicName"); + } + + /** + * TopicName: topic 名称 + * + * @param string $topicName + */ + public function setTopicName($topicName) + { + $this->set("TopicName", $topicName); + } + + /** + * TotalPartitions: partition 数量 + * + * @return integer|null + */ + public function getTotalPartitions() + { + return $this->get("TotalPartitions"); + } + + /** + * TotalPartitions: partition 数量 + * + * @param int $totalPartitions + */ + public function setTotalPartitions($totalPartitions) + { + $this->set("TotalPartitions", $totalPartitions); + } +} diff --git a/src/UKafka/Models/ClusterInfo.php b/src/UKafka/Models/ClusterInfo.php new file mode 100644 index 00000000..6aefcc25 --- /dev/null +++ b/src/UKafka/Models/ClusterInfo.php @@ -0,0 +1,456 @@ +get("Zone"); + } + + /** + * Zone: 所属可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * AutoRenew: 是否开启自动续费 + * + * @return string|null + */ + public function getAutoRenew() + { + return $this->get("AutoRenew"); + } + + /** + * AutoRenew: 是否开启自动续费 + * + * @param string $autoRenew + */ + public function setAutoRenew($autoRenew) + { + $this->set("AutoRenew", $autoRenew); + } + + /** + * 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: 付费类型 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费类型 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * ClusterInstanceId: 实例id + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: 实例id + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } + + /** + * ClusterInstanceName: 实例名称 + * + * @return string|null + */ + public function getClusterInstanceName() + { + return $this->get("ClusterInstanceName"); + } + + /** + * ClusterInstanceName: 实例名称 + * + * @param string $clusterInstanceName + */ + public function setClusterInstanceName($clusterInstanceName) + { + $this->set("ClusterInstanceName", $clusterInstanceName); + } + + /** + * 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); + } + + /** + * Framework: 实例框架 + * + * @return string|null + */ + public function getFramework() + { + return $this->get("Framework"); + } + + /** + * Framework: 实例框架 + * + * @param string $framework + */ + public function setFramework($framework) + { + $this->set("Framework", $framework); + } + + /** + * FrameworkVersion: 实例框架版本 + * + * @return string|null + */ + public function getFrameworkVersion() + { + return $this->get("FrameworkVersion"); + } + + /** + * FrameworkVersion: 实例框架版本 + * + * @param string $frameworkVersion + */ + public function setFrameworkVersion($frameworkVersion) + { + $this->set("FrameworkVersion", $frameworkVersion); + } + + /** + * NetworkId: 网络 id(已废弃) + * + * @return string|null + */ + public function getNetworkId() + { + return $this->get("NetworkId"); + } + + /** + * NetworkId: 网络 id(已废弃) + * + * @param string $networkId + */ + public function setNetworkId($networkId) + { + $this->set("NetworkId", $networkId); + } + + /** + * Remark: 实例备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 实例备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * RunningTime: 实例运行时间 + * + * @return integer|null + */ + public function getRunningTime() + { + return $this->get("RunningTime"); + } + + /** + * RunningTime: 实例运行时间 + * + * @param int $runningTime + */ + public function setRunningTime($runningTime) + { + $this->set("RunningTime", $runningTime); + } + + /** + * State: 实例当前状态,实例状态:"Running"| "Abnormal"| "Creating"| "Deleting"| "CreateFailed"| "DeleteFailed"| "Unavailable"| "Deleted"| "Updating"| "Deploying"| "Migrating"| "ExpandFailed" + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 实例当前状态,实例状态:"Running"| "Abnormal"| "Creating"| "Deleting"| "CreateFailed"| "DeleteFailed"| "Unavailable"| "Deleted"| "Updating"| "Deploying"| "Migrating"| "ExpandFailed" + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * 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); + } + + /** + * UHostCount: 实例节点个数 + * + * @return integer|null + */ + public function getUHostCount() + { + return $this->get("UHostCount"); + } + + /** + * UHostCount: 实例节点个数 + * + * @param int $uHostCount + */ + public function setUHostCount($uHostCount) + { + $this->set("UHostCount", $uHostCount); + } + + /** + * UHostSet: 节点信息列表 + * + * @return Broker[]|null + */ + public function getUHostSet() + { + $items = $this->get("UHostSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Broker($item)); + } + return $result; + } + + /** + * UHostSet: 节点信息列表 + * + * @param Broker[] $uHostSet + */ + public function setUHostSet(array $uHostSet) + { + $result = []; + foreach ($uHostSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * 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); + } + + /** + * ValidBrokerNum: 可用节点个数 + * + * @return integer|null + */ + public function getValidBrokerNum() + { + return $this->get("ValidBrokerNum"); + } + + /** + * ValidBrokerNum: 可用节点个数 + * + * @param int $validBrokerNum + */ + public function setValidBrokerNum($validBrokerNum) + { + $this->set("ValidBrokerNum", $validBrokerNum); + } + + /** + * IsOpenSecgroup: 是否开启安全组 + * + * @return string|null + */ + public function getIsOpenSecgroup() + { + return $this->get("IsOpenSecgroup"); + } + + /** + * IsOpenSecgroup: 是否开启安全组 + * + * @param string $isOpenSecgroup + */ + public function setIsOpenSecgroup($isOpenSecgroup) + { + $this->set("IsOpenSecgroup", $isOpenSecgroup); + } +} diff --git a/src/UKafka/Models/ClusterSet.php b/src/UKafka/Models/ClusterSet.php new file mode 100644 index 00000000..7a5fd852 --- /dev/null +++ b/src/UKafka/Models/ClusterSet.php @@ -0,0 +1,424 @@ +get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ClusterInstanceId: 实例id + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: 实例id + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } + + /** + * ClusterInstanceName: 实例名称 + * + * @return string|null + */ + public function getClusterInstanceName() + { + return $this->get("ClusterInstanceName"); + } + + /** + * ClusterInstanceName: 实例名称 + * + * @param string $clusterInstanceName + */ + public function setClusterInstanceName($clusterInstanceName) + { + $this->set("ClusterInstanceName", $clusterInstanceName); + } + + /** + * Framework: 框架 + * + * @return string|null + */ + public function getFramework() + { + return $this->get("Framework"); + } + + /** + * Framework: 框架 + * + * @param string $framework + */ + public function setFramework($framework) + { + $this->set("Framework", $framework); + } + + /** + * FrameworkVersion: Kafka 框架版本 + * + * @return string|null + */ + public function getFrameworkVersion() + { + return $this->get("FrameworkVersion"); + } + + /** + * FrameworkVersion: Kafka 框架版本 + * + * @param string $frameworkVersion + */ + public function setFrameworkVersion($frameworkVersion) + { + $this->set("FrameworkVersion", $frameworkVersion); + } + + /** + * Remark: 实例备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 实例备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * CreateTime: 实例创建时间戳 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 实例创建时间戳 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * RunningTime: 实例运行时间 + * + * @return integer|null + */ + public function getRunningTime() + { + return $this->get("RunningTime"); + } + + /** + * RunningTime: 实例运行时间 + * + * @param int $runningTime + */ + public function setRunningTime($runningTime) + { + $this->set("RunningTime", $runningTime); + } + + /** + * ExpireTime: 实例过期时间 + * + * @return integer|null + */ + public function getExpireTime() + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 实例过期时间 + * + * @param int $expireTime + */ + public function setExpireTime($expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * AutoRenew: 是否自动续费 + * + * @return string|null + */ + public function getAutoRenew() + { + return $this->get("AutoRenew"); + } + + /** + * AutoRenew: 是否自动续费 + * + * @param string $autoRenew + */ + public function setAutoRenew($autoRenew) + { + $this->set("AutoRenew", $autoRenew); + } + + /** + * ChargeType: 付费类型 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费类型 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * UHostCount: 实例节点个数 + * + * @return integer|null + */ + public function getUHostCount() + { + return $this->get("UHostCount"); + } + + /** + * UHostCount: 实例节点个数 + * + * @param int $uHostCount + */ + public function setUHostCount($uHostCount) + { + $this->set("UHostCount", $uHostCount); + } + + /** + * RedundantCount: 冗余计数(已废弃) + * + * @return integer|null + */ + public function getRedundantCount() + { + return $this->get("RedundantCount"); + } + + /** + * RedundantCount: 冗余计数(已废弃) + * + * @param int $redundantCount + */ + public function setRedundantCount($redundantCount) + { + $this->set("RedundantCount", $redundantCount); + } + + /** + * State: 实例当前状态,集群状态:"Running"| "Abnormal"| "Creating"| "Deleting"| "CreateFailed"| "DeleteFailed"| "Unavailable"| "Deleted"| "Updating"| "Deploying"| "Migrating"| "ExpandFailed" + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 实例当前状态,集群状态:"Running"| "Abnormal"| "Creating"| "Deleting"| "CreateFailed"| "DeleteFailed"| "Unavailable"| "Deleted"| "Updating"| "Deploying"| "Migrating"| "ExpandFailed" + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * Tag: 实例标记 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 实例标记 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * InstanceGroupType: 实例机型 + * + * @return string|null + */ + public function getInstanceGroupType() + { + return $this->get("InstanceGroupType"); + } + + /** + * InstanceGroupType: 实例机型 + * + * @param string $instanceGroupType + */ + public function setInstanceGroupType($instanceGroupType) + { + $this->set("InstanceGroupType", $instanceGroupType); + } + + /** + * 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); + } + + /** + * NewMessage: 事件状态未读消息(已废弃) + * + * @return string|null + */ + public function getNewMessage() + { + return $this->get("NewMessage"); + } + + /** + * NewMessage: 事件状态未读消息(已废弃) + * + * @param string $newMessage + */ + public function setNewMessage($newMessage) + { + $this->set("NewMessage", $newMessage); + } +} diff --git a/src/UKafka/Models/DiskSet.php b/src/UKafka/Models/DiskSet.php new file mode 100644 index 00000000..2d41c8bd --- /dev/null +++ b/src/UKafka/Models/DiskSet.php @@ -0,0 +1,64 @@ +get("Type"); + } + + /** + * Type: 磁盘类型。Boot 表示系统盘,Data 表示数据盘 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Size: 磁盘大小 + * + * @return string|null + */ + public function getSize() + { + return $this->get("Size"); + } + + /** + * Size: 磁盘大小 + * + * @param string $size + */ + public function setSize($size) + { + $this->set("Size", $size); + } +} diff --git a/src/UKafka/Models/Endpoints.php b/src/UKafka/Models/Endpoints.php new file mode 100644 index 00000000..426072b2 --- /dev/null +++ b/src/UKafka/Models/Endpoints.php @@ -0,0 +1,64 @@ +get("PlainText")); + } + + /** + * PlainText: PLAINTEXT 协议访问信息 + * + * @param Url $plainText + */ + public function setPlainText(array $plainText) + { + $this->set("PlainText", $plainText->getAll()); + } + + /** + * SaslPlainText: SASL_PLAINTEXT 协议访问信息 + * + * @return Url|null + */ + public function getSaslPlainText() + { + return new Url($this->get("SaslPlainText")); + } + + /** + * SaslPlainText: SASL_PLAINTEXT 协议访问信息 + * + * @param Url $saslPlainText + */ + public function setSaslPlainText(array $saslPlainText) + { + $this->set("SaslPlainText", $saslPlainText->getAll()); + } +} diff --git a/src/UKafka/Models/Group.php b/src/UKafka/Models/Group.php new file mode 100644 index 00000000..99036c22 --- /dev/null +++ b/src/UKafka/Models/Group.php @@ -0,0 +1,104 @@ +get("GroupName"); + } + + /** + * GroupName: 消费者组组名 + * + * @param string $groupName + */ + public function setGroupName($groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * Type: 消费者组类型 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 消费者组类型 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * NumOfTopics: 订阅 Topic 数量 + * + * @return integer|null + */ + public function getNumOfTopics() + { + return $this->get("NumOfTopics"); + } + + /** + * NumOfTopics: 订阅 Topic 数量 + * + * @param int $numOfTopics + */ + public function setNumOfTopics($numOfTopics) + { + $this->set("NumOfTopics", $numOfTopics); + } + + /** + * GroupId: 消费者组资源ID + * + * @return string|null + */ + public function getGroupId() + { + return $this->get("GroupId"); + } + + /** + * GroupId: 消费者组资源ID + * + * @param string $groupId + */ + public function setGroupId($groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UKafka/Models/IP.php b/src/UKafka/Models/IP.php new file mode 100644 index 00000000..94758f6e --- /dev/null +++ b/src/UKafka/Models/IP.php @@ -0,0 +1,64 @@ +get("IP"); + } + + /** + * IP: IP地址 + * + * @param string $ip + */ + public function setIP($ip) + { + $this->set("IP", $ip); + } + + /** + * Type: IP类型 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: IP类型 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } +} diff --git a/src/UKafka/Models/InstanceType.php b/src/UKafka/Models/InstanceType.php new file mode 100644 index 00000000..2ac5f176 --- /dev/null +++ b/src/UKafka/Models/InstanceType.php @@ -0,0 +1,184 @@ +get("DiskSet")); + } + + /** + * DiskSet: 机型磁盘类型信息 + * + * @param DiskSet $diskSet + */ + public function setDiskSet(array $diskSet) + { + $this->set("DiskSet", $diskSet->getAll()); + } + + /** + * 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); + } + + /** + * DiskType: 磁盘类型。RSSD 表示固态云盘,SSD 表示本地固态盘,COMMON 表示本地 SATA 盘 + * + * @return string|null + */ + public function getDiskType() + { + return $this->get("DiskType"); + } + + /** + * DiskType: 磁盘类型。RSSD 表示固态云盘,SSD 表示本地固态盘,COMMON 表示本地 SATA 盘 + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * NodeTypeName: 机型名称 + * + * @return string|null + */ + public function getNodeTypeName() + { + return $this->get("NodeTypeName"); + } + + /** + * NodeTypeName: 机型名称 + * + * @param string $nodeTypeName + */ + public function setNodeTypeName($nodeTypeName) + { + $this->set("NodeTypeName", $nodeTypeName); + } + + /** + * Memory: 内存大小(单位 MB) + * + * @return string|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小(单位 MB) + * + * @param string $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * MaxDiskSize: 机型最大支持磁盘大小 + * + * @return integer|null + */ + public function getMaxDiskSize() + { + return $this->get("MaxDiskSize"); + } + + /** + * MaxDiskSize: 机型最大支持磁盘大小 + * + * @param int $maxDiskSize + */ + public function setMaxDiskSize($maxDiskSize) + { + $this->set("MaxDiskSize", $maxDiskSize); + } + + /** + * MinDiskSize: 机型最小支持磁盘大小 + * + * @return integer|null + */ + public function getMinDiskSize() + { + return $this->get("MinDiskSize"); + } + + /** + * MinDiskSize: 机型最小支持磁盘大小 + * + * @param int $minDiskSize + */ + public function setMinDiskSize($minDiskSize) + { + $this->set("MinDiskSize", $minDiskSize); + } + + /** + * IsOpenSecGroup: 该机型是否支持安全组 + * + * @return boolean|null + */ + public function getIsOpenSecGroup() + { + return $this->get("IsOpenSecGroup"); + } + + /** + * IsOpenSecGroup: 该机型是否支持安全组 + * + * @param boolean $isOpenSecGroup + */ + public function setIsOpenSecGroup($isOpenSecGroup) + { + $this->set("IsOpenSecGroup", $isOpenSecGroup); + } +} diff --git a/src/UKafka/Models/TopicInfo.php b/src/UKafka/Models/TopicInfo.php new file mode 100644 index 00000000..0c158887 --- /dev/null +++ b/src/UKafka/Models/TopicInfo.php @@ -0,0 +1,144 @@ +get("Topic"); + } + + /** + * Topic: topic 名称 + * + * @param string $topic + */ + public function setTopic($topic) + { + $this->set("Topic", $topic); + } + + /** + * NumOfPartition: 分区数量 + * + * @return integer|null + */ + public function getNumOfPartition() + { + return $this->get("NumOfPartition"); + } + + /** + * NumOfPartition: 分区数量 + * + * @param int $numOfPartition + */ + public function setNumOfPartition($numOfPartition) + { + $this->set("NumOfPartition", $numOfPartition); + } + + /** + * NumOfOccupyBroker: 占用 broker 数量 + * + * @return integer|null + */ + public function getNumOfOccupyBroker() + { + return $this->get("NumOfOccupyBroker"); + } + + /** + * NumOfOccupyBroker: 占用 broker 数量 + * + * @param int $numOfOccupyBroker + */ + public function setNumOfOccupyBroker($numOfOccupyBroker) + { + $this->set("NumOfOccupyBroker", $numOfOccupyBroker); + } + + /** + * NumOfReplica: 副本数量 + * + * @return integer|null + */ + public function getNumOfReplica() + { + return $this->get("NumOfReplica"); + } + + /** + * NumOfReplica: 副本数量 + * + * @param int $numOfReplica + */ + public function setNumOfReplica($numOfReplica) + { + $this->set("NumOfReplica", $numOfReplica); + } + + /** + * UnderReplicasPer: 落后副本占比 + * + * @return float|null + */ + public function getUnderReplicasPer() + { + return $this->get("UnderReplicasPer"); + } + + /** + * UnderReplicasPer: 落后副本占比 + * + * @param float $underReplicasPer + */ + public function setUnderReplicasPer($underReplicasPer) + { + $this->set("UnderReplicasPer", $underReplicasPer); + } + + /** + * Status: topic 状态 + * + * @return string|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: topic 状态 + * + * @param string $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } +} diff --git a/src/UKafka/Models/UHostConfig.php b/src/UKafka/Models/UHostConfig.php new file mode 100644 index 00000000..93410a4a --- /dev/null +++ b/src/UKafka/Models/UHostConfig.php @@ -0,0 +1,144 @@ +get("DiskType"); + } + + /** + * DiskType: 节点数据盘类型 + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * BootDiskSize: 节点系统盘大小(单位G)【删除】 + * + * @return integer|null + */ + public function getBootDiskSize() + { + return $this->get("BootDiskSize"); + } + + /** + * BootDiskSize: 节点系统盘大小(单位G)【删除】 + * + * @param int $bootDiskSize + */ + public function setBootDiskSize($bootDiskSize) + { + $this->set("BootDiskSize", $bootDiskSize); + } + + /** + * 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); + } + + /** + * DataDiskSize: 节点数据盘大小(单位G) + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 节点数据盘大小(单位G) + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * Memory: 节点内存(单位MB) + * + * @return integer|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 节点内存(单位MB) + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * OS: 节点内部系统名称【删除】 + * + * @return string|null + */ + public function getOS() + { + return $this->get("OS"); + } + + /** + * OS: 节点内部系统名称【删除】 + * + * @param string $os + */ + public function setOS($os) + { + $this->set("OS", $os); + } +} diff --git a/src/UKafka/Models/Url.php b/src/UKafka/Models/Url.php new file mode 100644 index 00000000..1142e737 --- /dev/null +++ b/src/UKafka/Models/Url.php @@ -0,0 +1,64 @@ +get("Protocal"); + } + + /** + * Protocal: 访问协议 + * + * @param string $protocal + */ + public function setProtocal($protocal) + { + $this->set("Protocal", $protocal); + } + + /** + * Addr: 访问地址 + * + * @return string|null + */ + public function getAddr() + { + return $this->get("Addr"); + } + + /** + * Addr: 访问地址 + * + * @param string $addr + */ + public function setAddr($addr) + { + $this->set("Addr", $addr); + } +} diff --git a/src/UKafka/Models/Version.php b/src/UKafka/Models/Version.php new file mode 100644 index 00000000..23c2482d --- /dev/null +++ b/src/UKafka/Models/Version.php @@ -0,0 +1,64 @@ +get("Version"); + } + + /** + * Version: kafka版本 + * + * @param string $version + */ + public function setVersion($version) + { + $this->set("Version", $version); + } + + /** + * Label: kafka 版本标签。recommend 表示推荐版本,beta 表示公测版本 + * + * @return string|null + */ + public function getLabel() + { + return $this->get("Label"); + } + + /** + * Label: kafka 版本标签。recommend 表示推荐版本,beta 表示公测版本 + * + * @param string $label + */ + public function setLabel($label) + { + $this->set("Label", $label); + } +} diff --git a/src/UKafka/UKafkaClient.php b/src/UKafka/UKafkaClient.php new file mode 100644 index 00000000..392f2460 --- /dev/null +++ b/src/UKafka/UKafkaClient.php @@ -0,0 +1,584 @@ + (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 + * "NodeType" => (string) 机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * "NodeCount" => (string) 新添加节点数量 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return AddUKafkaInstanceNodeResponse + * @throws UCloudException + */ + public function addUKafkaInstanceNode(AddUKafkaInstanceNodeRequest $request = null) + { + $resp = $this->invoke($request); + return new AddUKafkaInstanceNodeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUKafkaInstance - 创建实例接口。\\ 创建实例前需要按以下步骤准备必要参数:\\ 1.获取Region(地域)和 Zone(可用区),访问链接:https://docs.ucloud.cn/api/summary/regionlist 可以获取所有支持的地域和可用区;\\ 2.获取FrameworkVersion,访问链接:https://docs.ucloud.cn/api/ukafka-api/list_ukafka_framework_version,响应字段的FrameworkVersions[N].Version是支持的 Kafka 版本;\\ 3.ChargeType付费类型,可用值:Dynamic为按小时付费,Month为按月付费,Year为按年付费;\\ 4.获取NodeType机型详情,访问链接:https://docs.ucloud.cn/api/ukafka-api/get_ukafka_node_type,响应字段的NodeTypeSet[N].NodeTypeName是支持的所有机型;\\ 5.获取DiskSize磁盘大小范围 ,访问链接:https://docs.ucloud.cn/api/ukafka-api/get_ukafka_node_type,该接口响应字段的NodeTypeSet[N].MinDiskSize和NodeTypeSet[N].MaxDiskSize是磁盘大小的取值范围;\\ 6.InstanceName,自定义输入实例名称,只能包含中英文、数字以及- _ . + * + * See also: https://docs.ucloud.cn/api/ukafka-api/create_ukafka_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) + * "FrameworkVersion" => (string) kafka版本,支持的版本可通过ListUKafkaFrameworkVersion 接口返回字段的FrameworkVersions获取 + * "ChargeType" => (string) 付费方式 + * "NodeType" => (string) 机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * "DiskSize" => (integer) 数据盘大小。支持范围根据GetUKafkaNodeType 接口返回的InstanceTypeSet[].MaxDiskSize 和MinDiskSize获取 + * "InstanceName" => (string) 实例名,可自定义。只能包含中英文、数字以及- _ . + * "VPCId" => (string) VPCID,不填时为默认VPCID + * "SubnetId" => (string) 子网 ID,不填时为默认子网 ID + * "BusinessId" => (string) 业务组,默认Default + * "Quantity" => (string) 实例数量,默认 1 + * "NodeCount" => (integer) 实例节点数量。默认 3 节点 + * "LogRetentionHours" => (string) kafka 日志保存时间,支持范围[1,240]。默认 72 小时 + * "DiskControllerType" => (string) 磁盘管理方式,支持值:NONE、CLEAN。默认值:NONE + * "DiskThreshold" => (string) 磁盘清理阈值,支持范围[70,90]。DiskControllerType 为CLEAN 时必填。默认值 90 + * "IsSecurityEnabled" => (string) 是否开启安全组,支持"true","false",默认 false + * ] + * + * Outputs: + * + * $outputs = [ + * "InstanceId" => (string) 实例资源 ID + * ] + * + * @return CreateUKafkaInstanceResponse + * @throws UCloudException + */ + public function createUKafkaInstance(CreateUKafkaInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUKafkaInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUKafkaInstance - 删除实例 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/delete_ukafka_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 DeleteUKafkaInstanceResponse + * @throws UCloudException + */ + public function deleteUKafkaInstance(DeleteUKafkaInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUKafkaInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUKafkaConsumer - 获取 Kafka 消费组信息 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/describe_ukafka_consumer + * + * 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) + * "ClusterInstanceId" => (string) 实例 ID + * "ConsumerGroup" => (string) 消费组组名 + * "Type" => (string) 消费者组类型(同消费者组列表返回的类型值) + * ] + * + * Outputs: + * + * $outputs = [ + * "GroupName" => (string) 消费者组组名 + * "Type" => (string) 消费者组类型 + * "Topics" => (array) 消费者组所订阅 topic 信息 + * ] + * + * @return DescribeUKafkaConsumerResponse + * @throws UCloudException + */ + public function describeUKafkaConsumer(DescribeUKafkaConsumerRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUKafkaConsumerResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUKafkaInstance - 获取整个实例的信息。实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/describe_ukafka_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) + * "ClusterInstanceId" => (string) 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterSet" => (array) 实例信息列表[ + * [ + * "Zone" => (string) 所属可用区 + * "AutoRenew" => (string) 是否开启自动续费 + * "BusinessId" => (string) 业务组 ID + * "ChargeType" => (string) 付费类型 + * "ClusterInstanceId" => (string) 实例id + * "ClusterInstanceName" => (string) 实例名称 + * "CreateTime" => (integer) 实例创建时间 + * "ExpireTime" => (integer) 实例过期时间 + * "Framework" => (string) 实例框架 + * "FrameworkVersion" => (string) 实例框架版本 + * "NetworkId" => (string) 网络 id(已废弃) + * "Remark" => (string) 实例备注 + * "RunningTime" => (integer) 实例运行时间 + * "State" => (string) 实例当前状态,实例状态:"Running"| "Abnormal"| "Creating"| "Deleting"| "CreateFailed"| "DeleteFailed"| "Unavailable"| "Deleted"| "Updating"| "Deploying"| "Migrating"| "ExpandFailed" + * "SubnetId" => (string) 所属子网 id + * "Tag" => (string) 实例标记 + * "UHostCount" => (integer) 实例节点个数 + * "UHostSet" => (array) 节点信息列表[ + * [ + * "Endpoints" => (object) broker 访问端点[ + * "PlainText" => (object) PLAINTEXT 协议访问信息[ + * "Protocal" => (string) 访问协议 + * "Addr" => (string) 访问地址 + * ] + * "SaslPlainText" => (object) SASL_PLAINTEXT 协议访问信息[ + * "Protocal" => (string) 访问协议 + * "Addr" => (string) 访问地址 + * ] + * ] + * "BrokerId" => (string) broker id + * "BrokerInfo" => (array) broker 关联topic 信息[ + * [ + * "PartitionOnBroker" => (string) topic 在 broker 上分布的 partition 数量 + * "Partitions" => (string) topic 在 broker上 partition 列表 + * "Replication" => (integer) Topic 副本数 + * "TopicName" => (string) topic 名称 + * "TotalPartitions" => (integer) partition 数量 + * ] + * ] + * "CreateTime" => (string) broker 创建信息 + * "DomainName" => (string) broker 域名 + * "ExpireTime" => (integer) broker 过期时间 + * "IPSet" => (array) broker IP 信息[ + * [ + * "IP" => (string) IP地址 + * "Type" => (string) IP类型 + * ] + * ] + * "InstanceGroupType" => (string) broker 机型信息 + * "KafkaPort" => (integer) kafka 服务端口 + * "Remark" => (string) broker 备注信息 + * "ResourceId" => (string) broker 注册资源信息 + * "SecurityGroupId" => (string) 安全组 id + * "State" => (string) broker 当前状态 + * "UHostConfig" => (object) broker 节点配置[ + * "DiskType" => (string) 节点数据盘类型 + * "BootDiskSize" => (integer) 节点系统盘大小(单位G)【删除】 + * "CPU" => (integer) 节点 CPU 核心数 + * "DataDiskSize" => (integer) 节点数据盘大小(单位G) + * "Memory" => (integer) 节点内存(单位MB) + * "OS" => (string) 节点内部系统名称【删除】 + * ] + * "UHostId" => (string) 节点 id + * "UHostName" => (string) 节点名称 + * "UHostRole" => (string) 节点类型 + * "ZooKeeper" => (string) 节点是否部署 zookeeper + * "ZooKeeperPort" => (integer) zookeeper 服务端口 + * ] + * ] + * "VPCId" => (string) 所属 VPC id + * "ValidBrokerNum" => (integer) 可用节点个数 + * "IsOpenSecgroup" => (string) 是否开启安全组 + * ] + * ] + * ] + * + * @return DescribeUKafkaInstanceResponse + * @throws UCloudException + */ + public function describeUKafkaInstance(DescribeUKafkaInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUKafkaInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUKafkaNodeType - 获取节点机型配置 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/get_ukafka_node_type + * + * 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) + * "NodeType" => (string) 传参时返回指定机型信息,参数为空时返回所有机型信息 + * ] + * + * Outputs: + * + * $outputs = [ + * "NodeTypeSet" => (array) 机型信息列表[ + * [ + * "DiskSet" => (object) 机型磁盘类型信息[ + * "Type" => (string) 磁盘类型。Boot 表示系统盘,Data 表示数据盘 + * "Size" => (string) 磁盘大小 + * ] + * "CPU" => (integer) CPU核心数 + * "DiskType" => (string) 磁盘类型。RSSD 表示固态云盘,SSD 表示本地固态盘,COMMON 表示本地 SATA 盘 + * "NodeTypeName" => (string) 机型名称 + * "Memory" => (string) 内存大小(单位 MB) + * "MaxDiskSize" => (integer) 机型最大支持磁盘大小 + * "MinDiskSize" => (integer) 机型最小支持磁盘大小 + * "IsOpenSecGroup" => (boolean) 该机型是否支持安全组 + * ] + * ] + * ] + * + * @return GetUKafkaNodeTypeResponse + * @throws UCloudException + */ + public function getUKafkaNodeType(GetUKafkaNodeTypeRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUKafkaNodeTypeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * IsUKafkaTopicNameExist - 检查一个topic名称是否已经在集群中了。实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/is_ukafka_topic_name_exist + * + * 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) + * "ClusterInstanceId" => (string) 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * "TopicName" => (string) 待检查的topic名称 + * ] + * + * Outputs: + * + * $outputs = [ + * "IsExist" => (string) 是否已经存在 + * ] + * + * @return IsUKafkaTopicNameExistResponse + * @throws UCloudException + */ + public function isUKafkaTopicNameExist(IsUKafkaTopicNameExistRequest $request = null) + { + $resp = $this->invoke($request); + return new IsUKafkaTopicNameExistResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUKafkaConsumers - 列出 Kafka 消费组 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/list_ukafka_consumers + * + * 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) + * "ClusterInstanceId" => (string) 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * ] + * + * Outputs: + * + * $outputs = [ + * "Groups" => (array) 消费者组列表[ + * [ + * "GroupName" => (string) 消费者组组名 + * "Type" => (string) 消费者组类型 + * "NumOfTopics" => (integer) 订阅 Topic 数量 + * "GroupId" => (string) 消费者组资源ID + * ] + * ] + * ] + * + * @return ListUKafkaConsumersResponse + * @throws UCloudException + */ + public function listUKafkaConsumers(ListUKafkaConsumersRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUKafkaConsumersResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUKafkaFrameworkVersion - 列举ukafka框架版本 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/list_ukafka_framework_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 = [ + * "FrameworkVersions" => (array) kafka版本[ + * [ + * "Version" => (string) kafka版本 + * "Label" => (string) kafka 版本标签。recommend 表示推荐版本,beta 表示公测版本 + * ] + * ] + * ] + * + * @return ListUKafkaFrameworkVersionResponse + * @throws UCloudException + */ + public function listUKafkaFrameworkVersion(ListUKafkaFrameworkVersionRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUKafkaFrameworkVersionResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUKafkaInstance - 获取实例列表信息 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/list_ukafka_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" => (string) 默认为60 + * "Offset" => (string) 默认为0 + * "VPCId" => (string) VPCId + * "SubnetId" => (string) SubnetId + * "BusinessId" => (string) 业务组 ID + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterSet" => (object) 实例信息[ + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ClusterInstanceId" => (string) 实例id + * "ClusterInstanceName" => (string) 实例名称 + * "Framework" => (string) 框架 + * "FrameworkVersion" => (string) Kafka 框架版本 + * "Remark" => (string) 实例备注 + * "CreateTime" => (integer) 实例创建时间戳 + * "RunningTime" => (integer) 实例运行时间 + * "ExpireTime" => (integer) 实例过期时间 + * "AutoRenew" => (string) 是否自动续费 + * "ChargeType" => (string) 付费类型 + * "UHostCount" => (integer) 实例节点个数 + * "RedundantCount" => (integer) 冗余计数(已废弃) + * "State" => (string) 实例当前状态,集群状态:"Running"| "Abnormal"| "Creating"| "Deleting"| "CreateFailed"| "DeleteFailed"| "Unavailable"| "Deleted"| "Updating"| "Deploying"| "Migrating"| "ExpandFailed" + * "Tag" => (string) 实例标记 + * "InstanceGroupType" => (string) 实例机型 + * "VPCId" => (string) 所属 VPC id + * "SubnetId" => (string) 所属子网 id + * "BusinessId" => (string) 业务组 ID + * "NewMessage" => (string) 事件状态未读消息(已废弃) + * ] + * "TotalCount" => (string) 总数 + * ] + * + * @return ListUKafkaInstanceResponse + * @throws UCloudException + */ + public function listUKafkaInstance(ListUKafkaInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUKafkaInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUKafkaTopics - 获取 kafka 实例 topic 列表信息。实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/list_ukafka_topics + * + * 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) + * "ClusterInstanceId" => (string) 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * ] + * + * Outputs: + * + * $outputs = [ + * "TopicList" => (array) topic 信息列表[ + * [ + * "Topic" => (string) topic 名称 + * "NumOfPartition" => (integer) 分区数量 + * "NumOfOccupyBroker" => (integer) 占用 broker 数量 + * "NumOfReplica" => (integer) 副本数量 + * "UnderReplicasPer" => (number) 落后副本占比 + * "Status" => (string) topic 状态 + * ] + * ] + * "Length" => (integer) topic 列表长度 + * ] + * + * @return ListUKafkaTopicsResponse + * @throws UCloudException + */ + public function listUKafkaTopics(ListUKafkaTopicsRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUKafkaTopicsResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUKafkaInstanceType - 规格升降级,仅升级CPU 和内存 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/modify_ukafka_instance_type + * + * 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 + * "NodeType" => (string) 目标机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName。仅升级CPU 和内存 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ModifyUKafkaInstanceTypeResponse + * @throws UCloudException + */ + public function modifyUKafkaInstanceType(ModifyUKafkaInstanceTypeRequest $request = null) + { + $resp = $this->invoke($request); + return new ModifyUKafkaInstanceTypeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeUKafkaDisk - 磁盘扩容 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/resize_ukafka_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) + * "InstanceId" => (string) 实例ID + * "DiskSize" => (integer) 数据盘大小。支持范围根据GetUKafkaNodeType 接口返回的InstanceTypeSet[].MaxDiskSize 和MinDiskSize获取 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ResizeUKafkaDiskResponse + * @throws UCloudException + */ + public function resizeUKafkaDisk(ResizeUKafkaDiskRequest $request = null) + { + $resp = $this->invoke($request); + return new ResizeUKafkaDiskResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/ULB/Apis/AddSSLBindingRequest.php b/src/ULB/Apis/AddSSLBindingRequest.php new file mode 100644 index 00000000..1f2057b2 --- /dev/null +++ b/src/ULB/Apis/AddSSLBindingRequest.php @@ -0,0 +1,134 @@ + "AddSSLBinding"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + $this->markRequired("ListenerId"); + $this->markRequired("SSLIds"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * ListenerId: 监听器的ID + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * SSLIds: SSLId的数组 + * + * @return string[]|null + */ + public function getSSLIds() + { + return $this->get("SSLIds"); + } + + /** + * SSLIds: SSLId的数组 + * + * @param string[] $sslIds + */ + public function setSSLIds(array $sslIds) + { + $this->set("SSLIds", $sslIds); + } +} diff --git a/src/ULB/Apis/AddSSLBindingResponse.php b/src/ULB/Apis/AddSSLBindingResponse.php new file mode 100644 index 00000000..e7f1946e --- /dev/null +++ b/src/ULB/Apis/AddSSLBindingResponse.php @@ -0,0 +1,26 @@ + "AddTargets"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + $this->markRequired("ListenerId"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * ListenerId: 监听器的ID + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * Targets: + * + * @return AddTargetsParamTargets[]|null + */ + public function getTargets() + { + $items = $this->get("Targets"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AddTargetsParamTargets($item)); + } + return $result; + } + + /** + * Targets: + * + * @param AddTargetsParamTargets[] $targets + */ + public function setTargets(array $targets) + { + $result = []; + foreach ($targets as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/AddTargetsResponse.php b/src/ULB/Apis/AddTargetsResponse.php new file mode 100644 index 00000000..edac6c56 --- /dev/null +++ b/src/ULB/Apis/AddTargetsResponse.php @@ -0,0 +1,57 @@ +get("Targets"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new TargetSet($item)); + } + return $result; + } + + /** + * Targets: 服务节点信息 + * + * @param TargetSet[] $targets + */ + public function setTargets(array $targets) + { + $result = []; + foreach ($targets as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/AllocateBackendRequest.php b/src/ULB/Apis/AllocateBackendRequest.php index 300279aa..fd64a735 100644 --- a/src/ULB/Apis/AllocateBackendRequest.php +++ b/src/ULB/Apis/AllocateBackendRequest.php @@ -1,6 +1,6 @@ markRequired("ULBId"); $this->markRequired("VServerId"); $this->markRequired("ResourceType"); - $this->markRequired("ResourceId"); } @@ -74,7 +73,7 @@ public function setProjectId($projectId) } /** - * ULBId: 负载均衡实例的ID + * ULBId: 传统型负载均衡实例的ID * * @return string|null */ @@ -84,7 +83,7 @@ public function getULBId() } /** - * ULBId: 负载均衡实例的ID + * ULBId: 传统型负载均衡实例的ID * * @param string $ulbId */ @@ -114,7 +113,7 @@ public function setVServerId($vServerId) } /** - * ResourceType: 所添加的后端资源的类型,枚举值:UHost -> 云主机;UNI -> 虚拟网卡;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube,USDP->智能大数据平台;默认值为UHost。报文转发模式不支持UDocker、UHybrid、CUBE + * ResourceType: 所添加的后端资源的类型,枚举值:UHost -> 云主机;UNI -> 虚拟网卡;UPM -> 物理云主机;UHybrid->混合云主机;CUBE->Cube, IP->IP类型;默认值为UHost。报文转发模式不支持UHybrid、CUBE、IP * * @return string|null */ @@ -124,7 +123,7 @@ public function getResourceType() } /** - * ResourceType: 所添加的后端资源的类型,枚举值:UHost -> 云主机;UNI -> 虚拟网卡;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube,USDP->智能大数据平台;默认值为UHost。报文转发模式不支持UDocker、UHybrid、CUBE + * ResourceType: 所添加的后端资源的类型,枚举值:UHost -> 云主机;UNI -> 虚拟网卡;UPM -> 物理云主机;UHybrid->混合云主机;CUBE->Cube, IP->IP类型;默认值为UHost。报文转发模式不支持UHybrid、CUBE、IP * * @param string $resourceType */ @@ -134,7 +133,7 @@ public function setResourceType($resourceType) } /** - * ResourceId: 所添加的后端资源的资源ID + * ResourceId: 所添加的后端资源的资源ID;与ResourceIP二选一必填 * * @return string|null */ @@ -144,7 +143,7 @@ public function getResourceId() } /** - * ResourceId: 所添加的后端资源的资源ID + * ResourceId: 所添加的后端资源的资源ID;与ResourceIP二选一必填 * * @param string $resourceId */ @@ -154,7 +153,7 @@ public function setResourceId($resourceId) } /** - * ResourceIP: 所添加的后端服务器的资源实例IP,当ResourceType 为 UHybrid 时有效,且必填 + * ResourceIP: 所添加的后端服务器的资源实例IP,当ResourceType 为 UHybrid 或 IP时有效,且必填;与ResourceId二选一必填 * * @return string|null */ @@ -164,7 +163,7 @@ public function getResourceIP() } /** - * ResourceIP: 所添加的后端服务器的资源实例IP,当ResourceType 为 UHybrid 时有效,且必填 + * ResourceIP: 所添加的后端服务器的资源实例IP,当ResourceType 为 UHybrid 或 IP时有效,且必填;与ResourceId二选一必填 * * @param string $resourceIP */ @@ -174,7 +173,7 @@ public function setResourceIP($resourceIP) } /** - * VPCId: 所添加的后端服务器所在的vpc,当ResourceType 为 UHybrid 时有效,且必填 + * VPCId: 所添加的后端服务器所在的vpc,当ResourceType 为 UHybrid 或 IP 时有效,且必填 * * @return string|null */ @@ -184,7 +183,7 @@ public function getVPCId() } /** - * VPCId: 所添加的后端服务器所在的vpc,当ResourceType 为 UHybrid 时有效,且必填 + * VPCId: 所添加的后端服务器所在的vpc,当ResourceType 为 UHybrid 或 IP 时有效,且必填 * * @param string $vpcId */ @@ -194,7 +193,7 @@ public function setVPCId($vpcId) } /** - * SubnetId: 所添加的后端服务器所在的子网,当ResourceType 为 UHybrid 时有效,且必填 + * SubnetId: 所添加的后端服务器所在的子网,当ResourceType 为 UHybrid 或 IP 时有效,且必填 * * @return string|null */ @@ -204,7 +203,7 @@ public function getSubnetId() } /** - * SubnetId: 所添加的后端服务器所在的子网,当ResourceType 为 UHybrid 时有效,且必填 + * SubnetId: 所添加的后端服务器所在的子网,当ResourceType 为 UHybrid 或 IP 时有效,且必填 * * @param string $subnetId */ diff --git a/src/ULB/Apis/AllocateBackendResponse.php b/src/ULB/Apis/AllocateBackendResponse.php index a67d9236..e4e1eeda 100644 --- a/src/ULB/Apis/AllocateBackendResponse.php +++ b/src/ULB/Apis/AllocateBackendResponse.php @@ -1,6 +1,6 @@ "CreateListener"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * Name: 监听器的名称。限定字符长度:[1-255];限定特殊字符,仅支持:“-”,“_”,“.”;默认值:listener + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 监听器的名称。限定字符长度:[1-255];限定特殊字符,仅支持:“-”,“_”,“.”;默认值:listener + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Remark: 监听器的备注信息。限定字符长度:[0-255] + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 监听器的备注信息。限定字符长度:[0-255] + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * ListenerPort: 监听器的监听端口。应用型限定取值:[1-65535],默认值80 + * + * @return integer|null + */ + public function getListenerPort() + { + return $this->get("ListenerPort"); + } + + /** + * ListenerPort: 监听器的监听端口。应用型限定取值:[1-65535],默认值80 + * + * @param int $listenerPort + */ + public function setListenerPort($listenerPort) + { + $this->set("ListenerPort", $listenerPort); + } + + /** + * ListenerProtocol: 监听协议。应用型限定取值:“HTTP”/"HTTPS",默认值“HTTP” + * + * @return string|null + */ + public function getListenerProtocol() + { + return $this->get("ListenerProtocol"); + } + + /** + * ListenerProtocol: 监听协议。应用型限定取值:“HTTP”/"HTTPS",默认值“HTTP” + * + * @param string $listenerProtocol + */ + public function setListenerProtocol($listenerProtocol) + { + $this->set("ListenerProtocol", $listenerProtocol); + } + + /** + * Certificates: (应用型专用)服务器默认证书ID。仅HTTPS监听支持,且必填;暂时只支持最大长度为1 + * + * @return string[]|null + */ + public function getCertificates() + { + return $this->get("Certificates"); + } + + /** + * Certificates: (应用型专用)服务器默认证书ID。仅HTTPS监听支持,且必填;暂时只支持最大长度为1 + * + * @param string[] $certificates + */ + public function setCertificates(array $certificates) + { + $this->set("Certificates", $certificates); + } + + /** + * SecurityPolicyId: (应用型专用)安全策略组ID。仅HTTPS监听支持绑定;默认值“Default”,表示绑定原生策略 + * + * @return string|null + */ + public function getSecurityPolicyId() + { + return $this->get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: (应用型专用)安全策略组ID。仅HTTPS监听支持绑定;默认值“Default”,表示绑定原生策略 + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } + + /** + * IdleTimeout: 连接空闲超时时间。单位:秒。应用型限定取值:[1-86400];默认值60 + * + * @return integer|null + */ + public function getIdleTimeout() + { + return $this->get("IdleTimeout"); + } + + /** + * IdleTimeout: 连接空闲超时时间。单位:秒。应用型限定取值:[1-86400];默认值60 + * + * @param int $idleTimeout + */ + public function setIdleTimeout($idleTimeout) + { + $this->set("IdleTimeout", $idleTimeout); + } + + /** + * Scheduler: 负载均衡算法。应用型限定取值:"Roundrobin"/"Source"/"WeightRoundrobin"/" Leastconn"/"Backup",默认值"Roundrobin" + * + * @return string|null + */ + public function getScheduler() + { + return $this->get("Scheduler"); + } + + /** + * Scheduler: 负载均衡算法。应用型限定取值:"Roundrobin"/"Source"/"WeightRoundrobin"/" Leastconn"/"Backup",默认值"Roundrobin" + * + * @param string $scheduler + */ + public function setScheduler($scheduler) + { + $this->set("Scheduler", $scheduler); + } + + /** + * StickinessConfig: + * + * @return CreateListenerParamStickinessConfig|null + */ + public function getStickinessConfig() + { + return new CreateListenerParamStickinessConfig($this->get("StickinessConfig")); + } + + /** + * StickinessConfig: + * + * @param CreateListenerParamStickinessConfig $stickinessConfig + */ + public function setStickinessConfig(array $stickinessConfig) + { + $this->set("StickinessConfig", $stickinessConfig->getAll()); + } + + /** + * HealthCheckConfig: + * + * @return CreateListenerParamHealthCheckConfig|null + */ + public function getHealthCheckConfig() + { + return new CreateListenerParamHealthCheckConfig($this->get("HealthCheckConfig")); + } + + /** + * HealthCheckConfig: + * + * @param CreateListenerParamHealthCheckConfig $healthCheckConfig + */ + public function setHealthCheckConfig(array $healthCheckConfig) + { + $this->set("HealthCheckConfig", $healthCheckConfig->getAll()); + } + + /** + * CompressionEnabled: (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩。默认值为:false + * + * @return boolean|null + */ + public function getCompressionEnabled() + { + return $this->get("CompressionEnabled"); + } + + /** + * CompressionEnabled: (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩。默认值为:false + * + * @param boolean $compressionEnabled + */ + public function setCompressionEnabled($compressionEnabled) + { + $this->set("CompressionEnabled", $compressionEnabled); + } + + /** + * HTTP2Enabled: (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启;默认值为:false + * + * @return boolean|null + */ + public function getHTTP2Enabled() + { + return $this->get("HTTP2Enabled"); + } + + /** + * HTTP2Enabled: (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启;默认值为:false + * + * @param boolean $http2Enabled + */ + public function setHTTP2Enabled($http2Enabled) + { + $this->set("HTTP2Enabled", $http2Enabled); + } + + /** + * RedirectEnabled: (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启;默认值为:false + * + * @return boolean|null + */ + public function getRedirectEnabled() + { + return $this->get("RedirectEnabled"); + } + + /** + * RedirectEnabled: (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启;默认值为:false + * + * @param boolean $redirectEnabled + */ + public function setRedirectEnabled($redirectEnabled) + { + $this->set("RedirectEnabled", $redirectEnabled); + } + + /** + * RedirectPort: (应用型专用)重定向端口。限定取值:[1-65535],默认值443 + * + * @return integer|null + */ + public function getRedirectPort() + { + return $this->get("RedirectPort"); + } + + /** + * RedirectPort: (应用型专用)重定向端口。限定取值:[1-65535],默认值443 + * + * @param int $redirectPort + */ + public function setRedirectPort($redirectPort) + { + $this->set("RedirectPort", $redirectPort); + } +} diff --git a/src/ULB/Apis/CreateListenerResponse.php b/src/ULB/Apis/CreateListenerResponse.php new file mode 100644 index 00000000..49335e0d --- /dev/null +++ b/src/ULB/Apis/CreateListenerResponse.php @@ -0,0 +1,44 @@ +get("ListenerId"); + } + + /** + * ListenerId: 监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } +} diff --git a/src/ULB/Apis/CreateLoadBalancerRequest.php b/src/ULB/Apis/CreateLoadBalancerRequest.php new file mode 100644 index 00000000..420c832e --- /dev/null +++ b/src/ULB/Apis/CreateLoadBalancerRequest.php @@ -0,0 +1,339 @@ + "CreateLoadBalancer"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("VPCId"); + $this->markRequired("SubnetId"); + } + + + + /** + * 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); + } + + /** + * 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。负载均衡实例的内网VIP和SNAT场景的源IP限定在该子网内;指定子网不影响添加后端服务节点时的范围,依旧是整个VPC下支持的资源 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 负载均衡实例所属的子网资源ID。负载均衡实例的内网VIP和SNAT场景的源IP限定在该子网内;指定子网不影响添加后端服务节点时的范围,依旧是整个VPC下支持的资源 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Type: 负载均衡实例的类型。限定枚举值:"Application" / "Network",默认值:"Application" + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 负载均衡实例的类型。限定枚举值:"Application" / "Network",默认值:"Application" + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Name: 负载均衡实例的名称。默认值:lb;特殊字符仅支持:“-”,“_”,“.”;限定字符长度:[1-255] + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 负载均衡实例的名称。默认值:lb;特殊字符仅支持:“-”,“_”,“.”;限定字符长度:[1-255] + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Tag: 负载均衡实例所属的业务组ID。默认值为“Default”; 传空则为Default业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 负载均衡实例所属的业务组ID。默认值为“Default”; 传空则为Default业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 负载均衡实例的备注信息。限定字符长度:[0-255] + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 负载均衡实例的备注信息。限定字符长度:[0-255] + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * IPVersion: 负载均衡实例的IP协议。限定枚举值:"IPv4" / "IPv6"/"DualStack",默认值为:“IPv4” + * + * @return string|null + */ + public function getIPVersion() + { + return $this->get("IPVersion"); + } + + /** + * IPVersion: 负载均衡实例的IP协议。限定枚举值:"IPv4" / "IPv6"/"DualStack",默认值为:“IPv4” + * + * @param string $ipVersion + */ + public function setIPVersion($ipVersion) + { + $this->set("IPVersion", $ipVersion); + } + + /** + * ChargeType: 付费模式。限定枚举值:"Year" / "Month"/"Day"/"Dynamic",默认值为:“Month” + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费模式。限定枚举值:"Year" / "Month"/"Day"/"Dynamic",默认值为:“Month” + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买的时长, 默认: 1; 0-> 购买至月末(0只在月付费有效,其余付费模式传0,实际收费按一个周期计费) + * + * @return integer|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买的时长, 默认: 1; 0-> 购买至月末(0只在月付费有效,其余付费模式传0,实际收费按一个周期计费) + * + * @param int $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * SecGroups: + * + * @return CreateLoadBalancerParamSecGroups[]|null + */ + public function getSecGroups() + { + $items = $this->get("SecGroups"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateLoadBalancerParamSecGroups($item)); + } + return $result; + } + + /** + * SecGroups: + * + * @param CreateLoadBalancerParamSecGroups[] $secGroups + */ + public function setSecGroups(array $secGroups) + { + $result = []; + foreach ($secGroups as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * LabelInfos: + * + * @return CreateLoadBalancerParamLabelInfos[]|null + */ + public function getLabelInfos() + { + $items = $this->get("LabelInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateLoadBalancerParamLabelInfos($item)); + } + return $result; + } + + /** + * LabelInfos: + * + * @param CreateLoadBalancerParamLabelInfos[] $labelInfos + */ + public function setLabelInfos(array $labelInfos) + { + $result = []; + foreach ($labelInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * CouponId: 代金券code + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券code + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/ULB/Apis/CreateLoadBalancerResponse.php b/src/ULB/Apis/CreateLoadBalancerResponse.php new file mode 100644 index 00000000..9a5c8c4b --- /dev/null +++ b/src/ULB/Apis/CreateLoadBalancerResponse.php @@ -0,0 +1,44 @@ +get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } +} diff --git a/src/ULB/Apis/CreatePolicyRequest.php b/src/ULB/Apis/CreatePolicyRequest.php index eb162cd0..37894a4f 100644 --- a/src/ULB/Apis/CreatePolicyRequest.php +++ b/src/ULB/Apis/CreatePolicyRequest.php @@ -1,6 +1,6 @@ set("Match", $match); } + /** + * DomainMatchMode: 内容转发规则中域名的匹配方式,默认与原本一致。枚举值:Regular,正则;Wildcard,泛域名 + * + * @return string|null + */ + public function getDomainMatchMode() + { + return $this->get("DomainMatchMode"); + } + + /** + * DomainMatchMode: 内容转发规则中域名的匹配方式,默认与原本一致。枚举值:Regular,正则;Wildcard,泛域名 + * + * @param string $domainMatchMode + */ + public function setDomainMatchMode($domainMatchMode) + { + $this->set("DomainMatchMode", $domainMatchMode); + } + /** * Type: 内容转发匹配字段的类型 * @@ -174,7 +194,7 @@ public function setType($type) } /** - * PolicyPriority: 策略优先级,1-9999 + * PolicyPriority: 策略优先级,1-9999;只针对路径规则生效 * * @return integer|null */ @@ -184,7 +204,7 @@ public function getPolicyPriority() } /** - * PolicyPriority: 策略优先级,1-9999 + * PolicyPriority: 策略优先级,1-9999;只针对路径规则生效 * * @param int $policyPriority */ diff --git a/src/ULB/Apis/CreatePolicyResponse.php b/src/ULB/Apis/CreatePolicyResponse.php index 7deb787c..7a26afb8 100644 --- a/src/ULB/Apis/CreatePolicyResponse.php +++ b/src/ULB/Apis/CreatePolicyResponse.php @@ -1,6 +1,6 @@ "CreateRule"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + $this->markRequired("ListenerId"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * ListenerId: 监听器的ID + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * RuleConditions: + * + * @return CreateRuleParamRuleConditions[]|null + */ + public function getRuleConditions() + { + $items = $this->get("RuleConditions"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateRuleParamRuleConditions($item)); + } + return $result; + } + + /** + * RuleConditions: + * + * @param CreateRuleParamRuleConditions[] $ruleConditions + */ + public function setRuleConditions(array $ruleConditions) + { + $result = []; + foreach ($ruleConditions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * RuleActions: + * + * @return CreateRuleParamRuleActions[]|null + */ + public function getRuleActions() + { + $items = $this->get("RuleActions"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateRuleParamRuleActions($item)); + } + return $result; + } + + /** + * RuleActions: + * + * @param CreateRuleParamRuleActions[] $ruleActions + */ + public function setRuleActions(array $ruleActions) + { + $result = []; + foreach ($ruleActions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Pass: 当转发的服务节点为空时,规则是否忽略。默认值true + * + * @return boolean|null + */ + public function getPass() + { + return $this->get("Pass"); + } + + /** + * Pass: 当转发的服务节点为空时,规则是否忽略。默认值true + * + * @param boolean $pass + */ + public function setPass($pass) + { + $this->set("Pass", $pass); + } +} diff --git a/src/ULB/Apis/CreateRuleResponse.php b/src/ULB/Apis/CreateRuleResponse.php new file mode 100644 index 00000000..f76b2d0c --- /dev/null +++ b/src/ULB/Apis/CreateRuleResponse.php @@ -0,0 +1,44 @@ +get("RuleId"); + } + + /** + * RuleId: 转发规则的ID + * + * @param string $ruleId + */ + public function setRuleId($ruleId) + { + $this->set("RuleId", $ruleId); + } +} diff --git a/src/ULB/Apis/CreateSSLRequest.php b/src/ULB/Apis/CreateSSLRequest.php index 3e60befa..555642c4 100644 --- a/src/ULB/Apis/CreateSSLRequest.php +++ b/src/ULB/Apis/CreateSSLRequest.php @@ -1,6 +1,6 @@ set("CaCert", $caCert); } + + /** + * USSLId: USSL证书的ID + * + * @return string|null + */ + public function getUSSLId() + { + return $this->get("USSLId"); + } + + /** + * USSLId: USSL证书的ID + * + * @param string $usslId + */ + public function setUSSLId($usslId) + { + $this->set("USSLId", $usslId); + } } diff --git a/src/ULB/Apis/CreateSSLResponse.php b/src/ULB/Apis/CreateSSLResponse.php index 69e2ebd4..2d3d3534 100644 --- a/src/ULB/Apis/CreateSSLResponse.php +++ b/src/ULB/Apis/CreateSSLResponse.php @@ -1,6 +1,6 @@ "CreateSecurityPolicy"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("TLSVersion"); + $this->markRequired("SSLCiphers"); + $this->markRequired("SecurityPolicyName"); + } + + + + /** + * 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); + } + + /** + * TLSVersion: TLS版本 + * + * @return string|null + */ + public function getTLSVersion() + { + return $this->get("TLSVersion"); + } + + /** + * TLSVersion: TLS版本 + * + * @param string $tlsVersion + */ + public function setTLSVersion($tlsVersion) + { + $this->set("TLSVersion", $tlsVersion); + } + + /** + * SSLCiphers: 加密套件 + * + * @return string[]|null + */ + public function getSSLCiphers() + { + return $this->get("SSLCiphers"); + } + + /** + * SSLCiphers: 加密套件 + * + * @param string[] $sslCiphers + */ + public function setSSLCiphers(array $sslCiphers) + { + $this->set("SSLCiphers", $sslCiphers); + } + + /** + * SecurityPolicyName: 安全策略名称 + * + * @return string|null + */ + public function getSecurityPolicyName() + { + return $this->get("SecurityPolicyName"); + } + + /** + * SecurityPolicyName: 安全策略名称 + * + * @param string $securityPolicyName + */ + public function setSecurityPolicyName($securityPolicyName) + { + $this->set("SecurityPolicyName", $securityPolicyName); + } +} diff --git a/src/ULB/Apis/CreateSecurityPolicyResponse.php b/src/ULB/Apis/CreateSecurityPolicyResponse.php new file mode 100644 index 00000000..a37d6d5d --- /dev/null +++ b/src/ULB/Apis/CreateSecurityPolicyResponse.php @@ -0,0 +1,44 @@ +get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: 安全策略ID + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } +} diff --git a/src/ULB/Apis/CreateULBRequest.php b/src/ULB/Apis/CreateULBRequest.php index 8c9bdb51..55c31e7d 100644 --- a/src/ULB/Apis/CreateULBRequest.php +++ b/src/ULB/Apis/CreateULBRequest.php @@ -1,6 +1,6 @@ set("ResponseMsg", $responseMsg); } + + /** + * SecurityPolicyId: 安全策略组ID,默认值'Default' + * + * @return string|null + */ + public function getSecurityPolicyId() + { + return $this->get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: 安全策略组ID,默认值'Default' + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } + + /** + * EnableCompression: 0:关闭 1:开启,用于数据压缩功能 + * + * @return integer|null + */ + public function getEnableCompression() + { + return $this->get("EnableCompression"); + } + + /** + * EnableCompression: 0:关闭 1:开启,用于数据压缩功能 + * + * @param int $enableCompression + */ + public function setEnableCompression($enableCompression) + { + $this->set("EnableCompression", $enableCompression); + } + + /** + * ForwardPort: 重定向端口,取值范围[0-65535];默认值为0,代表关闭;仅HTTP协议支持开启重定向功能 + * + * @return integer|null + */ + public function getForwardPort() + { + return $this->get("ForwardPort"); + } + + /** + * ForwardPort: 重定向端口,取值范围[0-65535];默认值为0,代表关闭;仅HTTP协议支持开启重定向功能 + * + * @param int $forwardPort + */ + public function setForwardPort($forwardPort) + { + $this->set("ForwardPort", $forwardPort); + } + + /** + * EnableHTTP2: 0:关闭 1:开启,用于开启http2功能;默认值为0 + * + * @return integer|null + */ + public function getEnableHTTP2() + { + return $this->get("EnableHTTP2"); + } + + /** + * EnableHTTP2: 0:关闭 1:开启,用于开启http2功能;默认值为0 + * + * @param int $enableHTTP2 + */ + public function setEnableHTTP2($enableHTTP2) + { + $this->set("EnableHTTP2", $enableHTTP2); + } } diff --git a/src/ULB/Apis/CreateVServerResponse.php b/src/ULB/Apis/CreateVServerResponse.php index 685a2a5e..d84a1e27 100644 --- a/src/ULB/Apis/CreateVServerResponse.php +++ b/src/ULB/Apis/CreateVServerResponse.php @@ -1,6 +1,6 @@ "DeleteListener"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + $this->markRequired("ListenerId"); + $this->markRequired("RelatedRedirectDisabled"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 应用型负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 应用型负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * ListenerId: 应用型负载均衡监听器的ID + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 应用型负载均衡监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * RelatedRedirectDisabled: 是否关闭相关监听器的重定向功能。默认为false,即有其他监听器重定向到本监听器,则删除失败。为true时,会先关闭相关监听器的重定向功能,再删除本监听器。默认值为:false + * + * @return boolean|null + */ + public function getRelatedRedirectDisabled() + { + return $this->get("RelatedRedirectDisabled"); + } + + /** + * RelatedRedirectDisabled: 是否关闭相关监听器的重定向功能。默认为false,即有其他监听器重定向到本监听器,则删除失败。为true时,会先关闭相关监听器的重定向功能,再删除本监听器。默认值为:false + * + * @param boolean $relatedRedirectDisabled + */ + public function setRelatedRedirectDisabled($relatedRedirectDisabled) + { + $this->set("RelatedRedirectDisabled", $relatedRedirectDisabled); + } +} diff --git a/src/ULB/Apis/DeleteListenerResponse.php b/src/ULB/Apis/DeleteListenerResponse.php new file mode 100644 index 00000000..df235e6d --- /dev/null +++ b/src/ULB/Apis/DeleteListenerResponse.php @@ -0,0 +1,26 @@ + "DeleteLoadBalancer"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 应用型负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 应用型负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } +} diff --git a/src/ULB/Apis/DeleteLoadBalancerResponse.php b/src/ULB/Apis/DeleteLoadBalancerResponse.php new file mode 100644 index 00000000..5535fd55 --- /dev/null +++ b/src/ULB/Apis/DeleteLoadBalancerResponse.php @@ -0,0 +1,26 @@ + "DeleteRule"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + $this->markRequired("ListenerId"); + $this->markRequired("RuleId"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 应用型负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 应用型负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * ListenerId: 应用型负载均衡监听器的ID + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 应用型负载均衡监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * RuleId: 应用型负载均衡的转发规则的ID + * + * @return string|null + */ + public function getRuleId() + { + return $this->get("RuleId"); + } + + /** + * RuleId: 应用型负载均衡的转发规则的ID + * + * @param string $ruleId + */ + public function setRuleId($ruleId) + { + $this->set("RuleId", $ruleId); + } +} diff --git a/src/ULB/Apis/DeleteRuleResponse.php b/src/ULB/Apis/DeleteRuleResponse.php new file mode 100644 index 00000000..f82dfedd --- /dev/null +++ b/src/ULB/Apis/DeleteRuleResponse.php @@ -0,0 +1,26 @@ + "DeleteSSLBinding"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + $this->markRequired("ListenerId"); + $this->markRequired("SSLIds"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * ListenerId: 监听器的ID + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * SSLIds: SSLId的数组 + * + * @return string[]|null + */ + public function getSSLIds() + { + return $this->get("SSLIds"); + } + + /** + * SSLIds: SSLId的数组 + * + * @param string[] $sslIds + */ + public function setSSLIds(array $sslIds) + { + $this->set("SSLIds", $sslIds); + } +} diff --git a/src/ULB/Apis/DeleteSSLBindingResponse.php b/src/ULB/Apis/DeleteSSLBindingResponse.php new file mode 100644 index 00000000..65a2a975 --- /dev/null +++ b/src/ULB/Apis/DeleteSSLBindingResponse.php @@ -0,0 +1,26 @@ + "DeleteSecurityPolicy"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("SecurityPolicyId"); + } + + + + /** + * 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); + } + + /** + * SecurityPolicyId: 安全策略ID + * + * @return string|null + */ + public function getSecurityPolicyId() + { + return $this->get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: 安全策略ID + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } +} diff --git a/src/ULB/Apis/DeleteSecurityPolicyResponse.php b/src/ULB/Apis/DeleteSecurityPolicyResponse.php new file mode 100644 index 00000000..95acab9a --- /dev/null +++ b/src/ULB/Apis/DeleteSecurityPolicyResponse.php @@ -0,0 +1,26 @@ + "DescribeListeners"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * 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); + } + + /** + * ListenerId: 应用型负载均衡监听器的ID。若指定ListenerId,则忽略LoadBalancerId。ListenId和LoadBalancerId必选其一 + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 应用型负载均衡监听器的ID。若指定ListenerId,则忽略LoadBalancerId。ListenId和LoadBalancerId必选其一 + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * LoadBalancerId: 应用型负载均衡实例的ID。未指定ListenId,则描述指定的LoadBalancerId下的所有监听器。 + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 应用型负载均衡实例的ID。未指定ListenId,则描述指定的LoadBalancerId下的所有监听器。 + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * 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: 数据分页值,默认为100 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值,默认为100 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/ULB/Apis/DescribeListenersResponse.php b/src/ULB/Apis/DescribeListenersResponse.php new file mode 100644 index 00000000..838fe41a --- /dev/null +++ b/src/ULB/Apis/DescribeListenersResponse.php @@ -0,0 +1,92 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的负载均衡监听器总数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * Listeners: 负载均衡监听器信息 + * + * @return Listener[]|null + */ + public function getListeners() + { + $items = $this->get("Listeners"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Listener($item)); + } + return $result; + } + + /** + * Listeners: 负载均衡监听器信息 + * + * @param Listener[] $listeners + */ + public function setListeners(array $listeners) + { + $result = []; + foreach ($listeners as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/DescribeLoadBalancersRequest.php b/src/ULB/Apis/DescribeLoadBalancersRequest.php new file mode 100644 index 00000000..93192bea --- /dev/null +++ b/src/ULB/Apis/DescribeLoadBalancersRequest.php @@ -0,0 +1,211 @@ + "DescribeLoadBalancers"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * 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); + } + + /** + * Type: 负载均衡实例的类型。限定枚举值:"Application" / "Network",默认值:"Application" + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 负载均衡实例的类型。限定枚举值:"Application" / "Network",默认值:"Application" + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * ShowDetail: 是否获取监听器和后端服务节点的详细信息。默认值:false + * + * @return boolean|null + */ + public function getShowDetail() + { + return $this->get("ShowDetail"); + } + + /** + * ShowDetail: 是否获取监听器和后端服务节点的详细信息。默认值:false + * + * @param boolean $showDetail + */ + public function setShowDetail($showDetail) + { + $this->set("ShowDetail", $showDetail); + } + + /** + * LoadBalancerIds: 负载均衡实例的ID。必须是同一类型的实例,若指定了实例ID,将忽略除Type外的其他过滤条件 + * + * @return string[]|null + */ + public function getLoadBalancerIds() + { + return $this->get("LoadBalancerIds"); + } + + /** + * LoadBalancerIds: 负载均衡实例的ID。必须是同一类型的实例,若指定了实例ID,将忽略除Type外的其他过滤条件 + * + * @param string[] $loadBalancerIds + */ + public function setLoadBalancerIds(array $loadBalancerIds) + { + $this->set("LoadBalancerIds", $loadBalancerIds); + } + + /** + * VPCId: 限定所在的VPC + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: 限定所在的VPC + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 限定所在的子网 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 限定所在的子网 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Offset: 数据偏移量,默认为0 + * + * @return string|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量,默认为0 + * + * @param string $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 数据分页值,默认为100 + * + * @return string|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值,默认为100 + * + * @param string $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/ULB/Apis/DescribeLoadBalancersResponse.php b/src/ULB/Apis/DescribeLoadBalancersResponse.php new file mode 100644 index 00000000..fa137adf --- /dev/null +++ b/src/ULB/Apis/DescribeLoadBalancersResponse.php @@ -0,0 +1,97 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的负载均衡实例总数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * LoadBalancers: 负载均衡实例信息 + * + * @return LoadBalancer[]|null + */ + public function getLoadBalancers() + { + $items = $this->get("LoadBalancers"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new LoadBalancer($item)); + } + return $result; + } + + /** + * LoadBalancers: 负载均衡实例信息 + * + * @param LoadBalancer[] $loadBalancers + */ + public function setLoadBalancers(array $loadBalancers) + { + $result = []; + foreach ($loadBalancers as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/DescribeRulesRequest.php b/src/ULB/Apis/DescribeRulesRequest.php new file mode 100644 index 00000000..a46fd5f2 --- /dev/null +++ b/src/ULB/Apis/DescribeRulesRequest.php @@ -0,0 +1,133 @@ + "DescribeRules"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + $this->markRequired("ListenerId"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 应用型负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 应用型负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * ListenerId: 监听器的ID + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * RuleId: 应用型负载均衡转发规则的ID。指定RuleId,则只描述该规则 + * + * @return string|null + */ + public function getRuleId() + { + return $this->get("RuleId"); + } + + /** + * RuleId: 应用型负载均衡转发规则的ID。指定RuleId,则只描述该规则 + * + * @param string $ruleId + */ + public function setRuleId($ruleId) + { + $this->set("RuleId", $ruleId); + } +} diff --git a/src/ULB/Apis/DescribeRulesResponse.php b/src/ULB/Apis/DescribeRulesResponse.php new file mode 100644 index 00000000..93363212 --- /dev/null +++ b/src/ULB/Apis/DescribeRulesResponse.php @@ -0,0 +1,67 @@ +get("Rules"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Rule($item)); + } + return $result; + } + + /** + * Rules: 转发规则信息 + * + * @param Rule[] $rules + */ + public function setRules(array $rules) + { + $result = []; + foreach ($rules as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/DescribeSSLRequest.php b/src/ULB/Apis/DescribeSSLRequest.php index d715c9e6..d769b970 100644 --- a/src/ULB/Apis/DescribeSSLRequest.php +++ b/src/ULB/Apis/DescribeSSLRequest.php @@ -1,6 +1,6 @@ "DescribeSSLV2"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * 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); + } + + /** + * SSLId: SSL证书的Id + * + * @return string|null + */ + public function getSSLId() + { + return $this->get("SSLId"); + } + + /** + * SSLId: SSL证书的Id + * + * @param string $sslId + */ + public function setSSLId($sslId) + { + $this->set("SSLId", $sslId); + } + + /** + * Limit: 数据分页值,默认为20 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值,默认为20 + * + * @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/ULB/Apis/DescribeSSLV2Response.php b/src/ULB/Apis/DescribeSSLV2Response.php new file mode 100644 index 00000000..143a56e6 --- /dev/null +++ b/src/ULB/Apis/DescribeSSLV2Response.php @@ -0,0 +1,78 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的SSL证书总数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: SSL证书详细信息,具体结构见SSLInfo + * + * @return SSLInfo[]|null + */ + public function getDataSet() + { + $items = $this->get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SSLInfo($item)); + } + return $result; + } + + /** + * DataSet: SSL证书详细信息,具体结构见SSLInfo + * + * @param SSLInfo[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/DescribeSecurityPoliciesRequest.php b/src/ULB/Apis/DescribeSecurityPoliciesRequest.php new file mode 100644 index 00000000..ef37be38 --- /dev/null +++ b/src/ULB/Apis/DescribeSecurityPoliciesRequest.php @@ -0,0 +1,131 @@ + "DescribeSecurityPolicies"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * 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); + } + + /** + * SecurityPolicyId: 安全策略ID + * + * @return string|null + */ + public function getSecurityPolicyId() + { + return $this->get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: 安全策略ID + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } + + /** + * Limit: 数据分页值 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 数据偏移量 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/ULB/Apis/DescribeSecurityPoliciesResponse.php b/src/ULB/Apis/DescribeSecurityPoliciesResponse.php new file mode 100644 index 00000000..955973fe --- /dev/null +++ b/src/ULB/Apis/DescribeSecurityPoliciesResponse.php @@ -0,0 +1,78 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SecurityPolicy($item)); + } + return $result; + } + + /** + * DataSet: 安全策略列表,每项参数详见SecurityPolicy + * + * @param SecurityPolicy[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet 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/ULB/Apis/DescribeSecurityPoliciesV2Request.php b/src/ULB/Apis/DescribeSecurityPoliciesV2Request.php new file mode 100644 index 00000000..0f9a35e6 --- /dev/null +++ b/src/ULB/Apis/DescribeSecurityPoliciesV2Request.php @@ -0,0 +1,131 @@ + "DescribeSecurityPoliciesV2"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * 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); + } + + /** + * SecurityPolicyId: 安全策略ID + * + * @return string|null + */ + public function getSecurityPolicyId() + { + return $this->get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: 安全策略ID + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } + + /** + * Limit: 数据分页值 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 数据偏移量 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/ULB/Apis/DescribeSecurityPoliciesV2Response.php b/src/ULB/Apis/DescribeSecurityPoliciesV2Response.php new file mode 100644 index 00000000..0d1516f5 --- /dev/null +++ b/src/ULB/Apis/DescribeSecurityPoliciesV2Response.php @@ -0,0 +1,78 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SecurityPolicyInfo($item)); + } + return $result; + } + + /** + * DataSet: 安全策略列表,每项参数详见SecurityPolicyInfo + * + * @param SecurityPolicyInfo[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet 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/ULB/Apis/DescribeSupportCiphersRequest.php b/src/ULB/Apis/DescribeSupportCiphersRequest.php new file mode 100644 index 00000000..ee51965b --- /dev/null +++ b/src/ULB/Apis/DescribeSupportCiphersRequest.php @@ -0,0 +1,71 @@ + "DescribeSupportCiphers"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * 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/ULB/Apis/DescribeSupportCiphersResponse.php b/src/ULB/Apis/DescribeSupportCiphersResponse.php new file mode 100644 index 00000000..70dcd7b3 --- /dev/null +++ b/src/ULB/Apis/DescribeSupportCiphersResponse.php @@ -0,0 +1,57 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new TLSAndCiphers($item)); + } + return $result; + } + + /** + * DataSet: 返回支持的TLS最低版本和加密套件,每项参数详见 TLSAndCiphers + * + * @param TLSAndCiphers[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/DescribeULBRequest.php b/src/ULB/Apis/DescribeULBRequest.php index 1df7cbc5..2b6e786c 100644 --- a/src/ULB/Apis/DescribeULBRequest.php +++ b/src/ULB/Apis/DescribeULBRequest.php @@ -1,6 +1,6 @@ "RemoveTargets"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + $this->markRequired("ListenerId"); + $this->markRequired("Ids"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * ListenerId: 监听器的ID + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * Ids: 服务节点的标识ID。不超过20个; + * + * @return string[]|null + */ + public function getIds() + { + return $this->get("Ids"); + } + + /** + * Ids: 服务节点的标识ID。不超过20个; + * + * @param string[] $ids + */ + public function setIds(array $ids) + { + $this->set("Ids", $ids); + } +} diff --git a/src/ULB/Apis/RemoveTargetsResponse.php b/src/ULB/Apis/RemoveTargetsResponse.php new file mode 100644 index 00000000..ca9519a3 --- /dev/null +++ b/src/ULB/Apis/RemoveTargetsResponse.php @@ -0,0 +1,26 @@ + "UnBindSecurityPolicy"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("SecurityPolicyId"); + } + + + + /** + * 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); + } + + /** + * SecurityPolicyId: 安全策略ID + * + * @return string|null + */ + public function getSecurityPolicyId() + { + return $this->get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: 安全策略ID + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } +} diff --git a/src/ULB/Apis/UnBindSecurityPolicyResponse.php b/src/ULB/Apis/UnBindSecurityPolicyResponse.php new file mode 100644 index 00000000..67fb9734 --- /dev/null +++ b/src/ULB/Apis/UnBindSecurityPolicyResponse.php @@ -0,0 +1,26 @@ + "UpdateBackendBatch"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("ULBId"); + } + + + + /** + * 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); + } + + /** + * ULBId: 负载均衡资源ID + * + * @return string|null + */ + public function getULBId() + { + return $this->get("ULBId"); + } + + /** + * ULBId: 负载均衡资源ID + * + * @param string $ulbId + */ + public function setULBId($ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * Attributes: + * + * @return UpdateBackendBatchParamAttributes[]|null + */ + public function getAttributes() + { + $items = $this->get("Attributes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UpdateBackendBatchParamAttributes($item)); + } + return $result; + } + + /** + * Attributes: + * + * @param UpdateBackendBatchParamAttributes[] $attributes + */ + public function setAttributes(array $attributes) + { + $result = []; + foreach ($attributes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/UpdateBackendBatchResponse.php b/src/ULB/Apis/UpdateBackendBatchResponse.php new file mode 100644 index 00000000..3aa18671 --- /dev/null +++ b/src/ULB/Apis/UpdateBackendBatchResponse.php @@ -0,0 +1,57 @@ +get("BackendSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BackendMsg($item)); + } + return $result; + } + + /** + * BackendSet: 返回ulb对每个rs的修改是否成功 + * + * @param BackendMsg[] $backendSet + */ + public function setBackendSet(array $backendSet) + { + $result = []; + foreach ($backendSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/UpdateListenerAttributeRequest.php b/src/ULB/Apis/UpdateListenerAttributeRequest.php new file mode 100644 index 00000000..0aea646e --- /dev/null +++ b/src/ULB/Apis/UpdateListenerAttributeRequest.php @@ -0,0 +1,355 @@ + "UpdateListenerAttribute"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + $this->markRequired("ListenerId"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * ListenerId: 监听器的ID + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * Name: 监听器的名称。限定字符长度:[1-255];限定特殊字符,仅支持:-_. + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 监听器的名称。限定字符长度:[1-255];限定特殊字符,仅支持:-_. + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Remark: 监听器的备注信息。限定字符长度:[0-255] + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 监听器的备注信息。限定字符长度:[0-255] + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * Certificates: (应用型专用)服务器默认证书ID。仅HTTPS监听支持 + * + * @return string[]|null + */ + public function getCertificates() + { + return $this->get("Certificates"); + } + + /** + * Certificates: (应用型专用)服务器默认证书ID。仅HTTPS监听支持 + * + * @param string[] $certificates + */ + public function setCertificates(array $certificates) + { + $this->set("Certificates", $certificates); + } + + /** + * SecurityPolicyId: (应用型专用)安全策略组ID。仅HTTPS监听支持绑定。“Default”,表示绑定原生策略 + * + * @return string|null + */ + public function getSecurityPolicyId() + { + return $this->get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: (应用型专用)安全策略组ID。仅HTTPS监听支持绑定。“Default”,表示绑定原生策略 + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } + + /** + * IdleTimeout: 连接空闲超时时间。单位:秒。应用型限定取值:[1-86400] + * + * @return integer|null + */ + public function getIdleTimeout() + { + return $this->get("IdleTimeout"); + } + + /** + * IdleTimeout: 连接空闲超时时间。单位:秒。应用型限定取值:[1-86400] + * + * @param int $idleTimeout + */ + public function setIdleTimeout($idleTimeout) + { + $this->set("IdleTimeout", $idleTimeout); + } + + /** + * Scheduler: 负载均衡算法。应用型限定取值:"Roundrobin"/"Source"/"WeightRoundrobin"/" Leastconn"/"Backup" + * + * @return string|null + */ + public function getScheduler() + { + return $this->get("Scheduler"); + } + + /** + * Scheduler: 负载均衡算法。应用型限定取值:"Roundrobin"/"Source"/"WeightRoundrobin"/" Leastconn"/"Backup" + * + * @param string $scheduler + */ + public function setScheduler($scheduler) + { + $this->set("Scheduler", $scheduler); + } + + /** + * StickinessConfig: + * + * @return UpdateListenerAttributeParamStickinessConfig|null + */ + public function getStickinessConfig() + { + return new UpdateListenerAttributeParamStickinessConfig($this->get("StickinessConfig")); + } + + /** + * StickinessConfig: + * + * @param UpdateListenerAttributeParamStickinessConfig $stickinessConfig + */ + public function setStickinessConfig(array $stickinessConfig) + { + $this->set("StickinessConfig", $stickinessConfig->getAll()); + } + + /** + * HealthCheckConfig: + * + * @return UpdateListenerAttributeParamHealthCheckConfig|null + */ + public function getHealthCheckConfig() + { + return new UpdateListenerAttributeParamHealthCheckConfig($this->get("HealthCheckConfig")); + } + + /** + * HealthCheckConfig: + * + * @param UpdateListenerAttributeParamHealthCheckConfig $healthCheckConfig + */ + public function setHealthCheckConfig(array $healthCheckConfig) + { + $this->set("HealthCheckConfig", $healthCheckConfig->getAll()); + } + + /** + * CompressionEnabled: (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩 + * + * @return boolean|null + */ + public function getCompressionEnabled() + { + return $this->get("CompressionEnabled"); + } + + /** + * CompressionEnabled: (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩 + * + * @param boolean $compressionEnabled + */ + public function setCompressionEnabled($compressionEnabled) + { + $this->set("CompressionEnabled", $compressionEnabled); + } + + /** + * HTTP2Enabled: (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启 + * + * @return boolean|null + */ + public function getHTTP2Enabled() + { + return $this->get("HTTP2Enabled"); + } + + /** + * HTTP2Enabled: (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启 + * + * @param boolean $http2Enabled + */ + public function setHTTP2Enabled($http2Enabled) + { + $this->set("HTTP2Enabled", $http2Enabled); + } + + /** + * RedirectEnabled: (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启 + * + * @return boolean|null + */ + public function getRedirectEnabled() + { + return $this->get("RedirectEnabled"); + } + + /** + * RedirectEnabled: (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启 + * + * @param boolean $redirectEnabled + */ + public function setRedirectEnabled($redirectEnabled) + { + $this->set("RedirectEnabled", $redirectEnabled); + } + + /** + * RedirectPort: (应用型专用)重定向端口。限定取值:[1-65535] + * + * @return integer|null + */ + public function getRedirectPort() + { + return $this->get("RedirectPort"); + } + + /** + * RedirectPort: (应用型专用)重定向端口。限定取值:[1-65535] + * + * @param int $redirectPort + */ + public function setRedirectPort($redirectPort) + { + $this->set("RedirectPort", $redirectPort); + } +} diff --git a/src/ULB/Apis/UpdateListenerAttributeResponse.php b/src/ULB/Apis/UpdateListenerAttributeResponse.php new file mode 100644 index 00000000..50deccf8 --- /dev/null +++ b/src/ULB/Apis/UpdateListenerAttributeResponse.php @@ -0,0 +1,26 @@ + "UpdateLoadBalancerAttribute"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * Name: 负载均衡实例的名称,不传则默认不修改 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 负载均衡实例的名称,不传则默认不修改 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Tag: 负载均衡实例所属的业务组ID,不传则默认不修改 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 负载均衡实例所属的业务组ID,不传则默认不修改 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 负载均衡实例的备注信息,不传则默认不修改,限定字符长度:[0-255] + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 负载均衡实例的备注信息,不传则默认不修改,限定字符长度:[0-255] + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * AccessLogConfig: + * + * @return UpdateLoadBalancerAttributeParamAccessLogConfig|null + */ + public function getAccessLogConfig() + { + return new UpdateLoadBalancerAttributeParamAccessLogConfig($this->get("AccessLogConfig")); + } + + /** + * AccessLogConfig: + * + * @param UpdateLoadBalancerAttributeParamAccessLogConfig $accessLogConfig + */ + public function setAccessLogConfig(array $accessLogConfig) + { + $this->set("AccessLogConfig", $accessLogConfig->getAll()); + } +} diff --git a/src/ULB/Apis/UpdateLoadBalancerAttributeResponse.php b/src/ULB/Apis/UpdateLoadBalancerAttributeResponse.php new file mode 100644 index 00000000..20c25359 --- /dev/null +++ b/src/ULB/Apis/UpdateLoadBalancerAttributeResponse.php @@ -0,0 +1,26 @@ +get("PolicyPriority"); + } + + /** + * PolicyPriority: 策略优先级,1-9999;只针对路径规则生效 + * + * @param int $policyPriority + */ + public function setPolicyPriority($policyPriority) + { + $this->set("PolicyPriority", $policyPriority); + } + + /** + * DomainMatchMode: 内容转发规则中域名的匹配方式,默认与原本一致。枚举值:Regular,正则;Wildcard,泛域名 + * + * @return string|null + */ + public function getDomainMatchMode() + { + return $this->get("DomainMatchMode"); + } + + /** + * DomainMatchMode: 内容转发规则中域名的匹配方式,默认与原本一致。枚举值:Regular,正则;Wildcard,泛域名 + * + * @param string $domainMatchMode + */ + public function setDomainMatchMode($domainMatchMode) + { + $this->set("DomainMatchMode", $domainMatchMode); + } + + /** + * PolicyId: 传统型负载均衡转发规则的ID,当Type为Default时,可以不传或为空 * * @return string|null */ @@ -143,7 +183,7 @@ public function getPolicyId() } /** - * PolicyId: 转发规则的ID,当Type为Default时,可以不传或为空 + * PolicyId: 传统型负载均衡转发规则的ID,当Type为Default时,可以不传或为空 * * @param string $policyId */ @@ -153,7 +193,7 @@ public function setPolicyId($policyId) } /** - * BackendId: 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId,不传表示更新转发节点为空 + * BackendId: 内容转发策略应用的后端资源实例的ID(CLB的后端节点Id),来源于 AllocateBackend 返回的 BackendId,不传表示更新转发节点为空 * * @return string[]|null */ @@ -163,7 +203,7 @@ public function getBackendId() } /** - * BackendId: 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId,不传表示更新转发节点为空 + * BackendId: 内容转发策略应用的后端资源实例的ID(CLB的后端节点Id),来源于 AllocateBackend 返回的 BackendId,不传表示更新转发节点为空 * * @param string[] $backendId */ diff --git a/src/ULB/Apis/UpdatePolicyResponse.php b/src/ULB/Apis/UpdatePolicyResponse.php index b110c8b5..c9a699ca 100644 --- a/src/ULB/Apis/UpdatePolicyResponse.php +++ b/src/ULB/Apis/UpdatePolicyResponse.php @@ -1,6 +1,6 @@ "UpdateRuleAttribute"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + $this->markRequired("ListenerId"); + $this->markRequired("RuleId"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * ListenerId: 监听器的ID + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * RuleId: 转发规则的ID + * + * @return string|null + */ + public function getRuleId() + { + return $this->get("RuleId"); + } + + /** + * RuleId: 转发规则的ID + * + * @param string $ruleId + */ + public function setRuleId($ruleId) + { + $this->set("RuleId", $ruleId); + } + + /** + * RuleConditions: + * + * @return UpdateRuleAttributeParamRuleConditions[]|null + */ + public function getRuleConditions() + { + $items = $this->get("RuleConditions"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UpdateRuleAttributeParamRuleConditions($item)); + } + return $result; + } + + /** + * RuleConditions: + * + * @param UpdateRuleAttributeParamRuleConditions[] $ruleConditions + */ + public function setRuleConditions(array $ruleConditions) + { + $result = []; + foreach ($ruleConditions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * RuleActions: + * + * @return UpdateRuleAttributeParamRuleActions[]|null + */ + public function getRuleActions() + { + $items = $this->get("RuleActions"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UpdateRuleAttributeParamRuleActions($item)); + } + return $result; + } + + /** + * RuleActions: + * + * @param UpdateRuleAttributeParamRuleActions[] $ruleActions + */ + public function setRuleActions(array $ruleActions) + { + $result = []; + foreach ($ruleActions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Pass: 当转发的服务节点为空时,规则是否忽略。默认转发规则不可更改 + * + * @return boolean|null + */ + public function getPass() + { + return $this->get("Pass"); + } + + /** + * Pass: 当转发的服务节点为空时,规则是否忽略。默认转发规则不可更改 + * + * @param boolean $pass + */ + public function setPass($pass) + { + $this->set("Pass", $pass); + } +} diff --git a/src/ULB/Apis/UpdateRuleAttributeResponse.php b/src/ULB/Apis/UpdateRuleAttributeResponse.php new file mode 100644 index 00000000..7541d1b8 --- /dev/null +++ b/src/ULB/Apis/UpdateRuleAttributeResponse.php @@ -0,0 +1,26 @@ + "UpdateSSLBinding"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("OldSSLId"); + $this->markRequired("NewSSLId"); + } + + + + /** + * 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); + } + + /** + * OldSSLId: 监听器实例绑定的旧的证书 + * + * @return string|null + */ + public function getOldSSLId() + { + return $this->get("OldSSLId"); + } + + /** + * OldSSLId: 监听器实例绑定的旧的证书 + * + * @param string $oldSSLId + */ + public function setOldSSLId($oldSSLId) + { + $this->set("OldSSLId", $oldSSLId); + } + + /** + * NewSSLId: 监听器实例需要绑定的新的证书 + * + * @return string|null + */ + public function getNewSSLId() + { + return $this->get("NewSSLId"); + } + + /** + * NewSSLId: 监听器实例需要绑定的新的证书 + * + * @param string $newSSLId + */ + public function setNewSSLId($newSSLId) + { + $this->set("NewSSLId", $newSSLId); + } + + /** + * LoadBalancerId: 所操作LB实例ID(仅LoadBalancerId传参时,将更换该LB所有原证书为OldSSLId的绑定关系;LoadBalancerId和ListenerId都不传参则将更新该项目下所有原证书为OldSSLId的绑定关系)(LB指CLB或ALB) + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 所操作LB实例ID(仅LoadBalancerId传参时,将更换该LB所有原证书为OldSSLId的绑定关系;LoadBalancerId和ListenerId都不传参则将更新该项目下所有原证书为OldSSLId的绑定关系)(LB指CLB或ALB) + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * ListenerId: 所操作监听器实例ID(仅ListenerId传参时,将更换该监听器所有原证书为OldSSLId的绑定关系;LoadBalancerId和ListenerId都不传参则将更新该项目下所有原证书为OldSSLId的绑定关系;若LoadBalancerId与ListenerId皆有传参,则会强校验ULB与Vsserver的所属关系,将更换该ulb下vserver所绑定的OldSSLId为NewSSLId)(监听器指VServer或Listener) + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 所操作监听器实例ID(仅ListenerId传参时,将更换该监听器所有原证书为OldSSLId的绑定关系;LoadBalancerId和ListenerId都不传参则将更新该项目下所有原证书为OldSSLId的绑定关系;若LoadBalancerId与ListenerId皆有传参,则会强校验ULB与Vsserver的所属关系,将更换该ulb下vserver所绑定的OldSSLId为NewSSLId)(监听器指VServer或Listener) + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } +} diff --git a/src/ULB/Apis/UpdateSSLBindingResponse.php b/src/ULB/Apis/UpdateSSLBindingResponse.php new file mode 100644 index 00000000..3a627955 --- /dev/null +++ b/src/ULB/Apis/UpdateSSLBindingResponse.php @@ -0,0 +1,26 @@ + "UpdateSecurityPolicy"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("SecurityPolicyId"); + } + + + + /** + * 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); + } + + /** + * SecurityPolicyId: 安全策略ID + * + * @return string|null + */ + public function getSecurityPolicyId() + { + return $this->get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: 安全策略ID + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } + + /** + * SSLCiphers: 加密套件,TLS最低版本和加密套件必须全不为空或全为空 + * + * @return string[]|null + */ + public function getSSLCiphers() + { + return $this->get("SSLCiphers"); + } + + /** + * SSLCiphers: 加密套件,TLS最低版本和加密套件必须全不为空或全为空 + * + * @param string[] $sslCiphers + */ + public function setSSLCiphers(array $sslCiphers) + { + $this->set("SSLCiphers", $sslCiphers); + } + + /** + * TLSVersion: TLS最低版本,TLS最低版本和加密套件必须全不为空或全为空 + * + * @return string|null + */ + public function getTLSVersion() + { + return $this->get("TLSVersion"); + } + + /** + * TLSVersion: TLS最低版本,TLS最低版本和加密套件必须全不为空或全为空 + * + * @param string $tlsVersion + */ + public function setTLSVersion($tlsVersion) + { + $this->set("TLSVersion", $tlsVersion); + } + + /** + * SecurityPolicyName: 安全策略名称 + * + * @return string|null + */ + public function getSecurityPolicyName() + { + return $this->get("SecurityPolicyName"); + } + + /** + * SecurityPolicyName: 安全策略名称 + * + * @param string $securityPolicyName + */ + public function setSecurityPolicyName($securityPolicyName) + { + $this->set("SecurityPolicyName", $securityPolicyName); + } +} diff --git a/src/ULB/Apis/UpdateSecurityPolicyResponse.php b/src/ULB/Apis/UpdateSecurityPolicyResponse.php new file mode 100644 index 00000000..e76b2fa9 --- /dev/null +++ b/src/ULB/Apis/UpdateSecurityPolicyResponse.php @@ -0,0 +1,26 @@ + "UpdateTargetsAttribute"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("LoadBalancerId"); + $this->markRequired("ListenerId"); + } + + + + /** + * 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); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * ListenerId: 监听器的ID + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * Targets: + * + * @return UpdateTargetsAttributeParamTargets[]|null + */ + public function getTargets() + { + $items = $this->get("Targets"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UpdateTargetsAttributeParamTargets($item)); + } + return $result; + } + + /** + * Targets: + * + * @param UpdateTargetsAttributeParamTargets[] $targets + */ + public function setTargets(array $targets) + { + $result = []; + foreach ($targets as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/UpdateTargetsAttributeResponse.php b/src/ULB/Apis/UpdateTargetsAttributeResponse.php new file mode 100644 index 00000000..9ad94322 --- /dev/null +++ b/src/ULB/Apis/UpdateTargetsAttributeResponse.php @@ -0,0 +1,26 @@ +set("Remark", $remark); } + + /** + * EnableLog: 日志开关,1代表开启日志,0代表关闭日志,传1时必须同时传BucketName,TokenName与TokenId二选一 + * + * @return integer|null + */ + public function getEnableLog() + { + return $this->get("EnableLog"); + } + + /** + * EnableLog: 日志开关,1代表开启日志,0代表关闭日志,传1时必须同时传BucketName,TokenName与TokenId二选一 + * + * @param int $enableLog + */ + public function setEnableLog($enableLog) + { + $this->set("EnableLog", $enableLog); + } + + /** + * BucketName: 设置用于存储ulb日志的bucket + * + * @return string|null + */ + public function getBucketName() + { + return $this->get("BucketName"); + } + + /** + * BucketName: 设置用于存储ulb日志的bucket + * + * @param string $bucketName + */ + public function setBucketName($bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * TokenName: 用于指定上传到bucket所需的token,与TokenId选填其一即可 + * + * @return string|null + */ + public function getTokenName() + { + return $this->get("TokenName"); + } + + /** + * TokenName: 用于指定上传到bucket所需的token,与TokenId选填其一即可 + * + * @param string $tokenName + */ + public function setTokenName($tokenName) + { + $this->set("TokenName", $tokenName); + } + + /** + * TokenId: 用于指定上传到bucket所需的token,与TokenName选填其一即可 + * + * @return string|null + */ + public function getTokenId() + { + return $this->get("TokenId"); + } + + /** + * TokenId: 用于指定上传到bucket所需的token,与TokenName选填其一即可 + * + * @param string $tokenId + */ + public function setTokenId($tokenId) + { + $this->set("TokenId", $tokenId); + } + + /** + * IsWAFOn: 是否开启WAF。枚举类型:Yes,No,默认值为No + * + * @return string|null + */ + public function getIsWAFOn() + { + return $this->get("IsWAFOn"); + } + + /** + * IsWAFOn: 是否开启WAF。枚举类型:Yes,No,默认值为No + * + * @param string $isWAFOn + */ + public function setIsWAFOn($isWAFOn) + { + $this->set("IsWAFOn", $isWAFOn); + } } diff --git a/src/ULB/Apis/UpdateULBAttributeResponse.php b/src/ULB/Apis/UpdateULBAttributeResponse.php index 690a9329..8675c69f 100644 --- a/src/ULB/Apis/UpdateULBAttributeResponse.php +++ b/src/ULB/Apis/UpdateULBAttributeResponse.php @@ -1,6 +1,6 @@ set("ResponseMsg", $responseMsg); } + + /** + * SecurityPolicyId: 安全策略组ID + * + * @return string|null + */ + public function getSecurityPolicyId() + { + return $this->get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: 安全策略组ID + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } + + /** + * EnableCompression: 0:关闭 1:开启,用于数据压缩功能 + * + * @return integer|null + */ + public function getEnableCompression() + { + return $this->get("EnableCompression"); + } + + /** + * EnableCompression: 0:关闭 1:开启,用于数据压缩功能 + * + * @param int $enableCompression + */ + public function setEnableCompression($enableCompression) + { + $this->set("EnableCompression", $enableCompression); + } + + /** + * ForwardPort: 重定向端口,取值范围[0-65535];默认值为0,代表关闭;仅HTTP协议支持开启重定向功能 + * + * @return integer|null + */ + public function getForwardPort() + { + return $this->get("ForwardPort"); + } + + /** + * ForwardPort: 重定向端口,取值范围[0-65535];默认值为0,代表关闭;仅HTTP协议支持开启重定向功能 + * + * @param int $forwardPort + */ + public function setForwardPort($forwardPort) + { + $this->set("ForwardPort", $forwardPort); + } + + /** + * EnableHTTP2: 0:关闭 1:开启,用于开启http2功能;默认值为0 + * + * @return integer|null + */ + public function getEnableHTTP2() + { + return $this->get("EnableHTTP2"); + } + + /** + * EnableHTTP2: 0:关闭 1:开启,用于开启http2功能;默认值为0 + * + * @param int $enableHTTP2 + */ + public function setEnableHTTP2($enableHTTP2) + { + $this->set("EnableHTTP2", $enableHTTP2); + } } diff --git a/src/ULB/Apis/UpdateVServerAttributeResponse.php b/src/ULB/Apis/UpdateVServerAttributeResponse.php index c692cbb2..9fafc115 100644 --- a/src/ULB/Apis/UpdateVServerAttributeResponse.php +++ b/src/ULB/Apis/UpdateVServerAttributeResponse.php @@ -1,6 +1,6 @@ get("Enabled"); + } + + /** + * Enabled: (应用型专用)是否开启访问日志记录功能 + * + * @param boolean $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * US3BucketName: (应用型专用)用于存储访问日志的bucket + * + * @return string|null + */ + public function getUS3BucketName() + { + return $this->get("US3BucketName"); + } + + /** + * US3BucketName: (应用型专用)用于存储访问日志的bucket + * + * @param string $us3BucketName + */ + public function setUS3BucketName($us3BucketName) + { + $this->set("US3BucketName", $us3BucketName); + } + + /** + * US3TokenId: (应用型专用)上传访问日志到bucket所需的token + * + * @return string|null + */ + public function getUS3TokenId() + { + return $this->get("US3TokenId"); + } + + /** + * US3TokenId: (应用型专用)上传访问日志到bucket所需的token + * + * @param string $us3TokenId + */ + public function setUS3TokenId($us3TokenId) + { + $this->set("US3TokenId", $us3TokenId); + } +} diff --git a/src/ULB/Models/BackendMsg.php b/src/ULB/Models/BackendMsg.php new file mode 100644 index 00000000..b2be6cea --- /dev/null +++ b/src/ULB/Models/BackendMsg.php @@ -0,0 +1,84 @@ +get("BackendId"); + } + + /** + * BackendId: rs的资源ID + * + * @param string $backendId + */ + public function setBackendId($backendId) + { + $this->set("BackendId", $backendId); + } + + /** + * SubMessage: 修改rs返回的消息 + * + * @return string|null + */ + public function getSubMessage() + { + return $this->get("SubMessage"); + } + + /** + * SubMessage: 修改rs返回的消息 + * + * @param string $subMessage + */ + public function setSubMessage($subMessage) + { + $this->set("SubMessage", $subMessage); + } + + /** + * SubRetCode: 修改rs的返回值 + * + * @return integer|null + */ + public function getSubRetCode() + { + return $this->get("SubRetCode"); + } + + /** + * SubRetCode: 修改rs的返回值 + * + * @param int $subRetCode + */ + public function setSubRetCode($subRetCode) + { + $this->set("SubRetCode", $subRetCode); + } +} diff --git a/src/ULB/Models/BindSecurityPolicy.php b/src/ULB/Models/BindSecurityPolicy.php new file mode 100644 index 00000000..cc72c3ec --- /dev/null +++ b/src/ULB/Models/BindSecurityPolicy.php @@ -0,0 +1,124 @@ +get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: 安全策略组ID + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } + + /** + * SecurityPolicyName: 安全策略组名称 + * + * @return string|null + */ + public function getSecurityPolicyName() + { + return $this->get("SecurityPolicyName"); + } + + /** + * SecurityPolicyName: 安全策略组名称 + * + * @param string $securityPolicyName + */ + public function setSecurityPolicyName($securityPolicyName) + { + $this->set("SecurityPolicyName", $securityPolicyName); + } + + /** + * TLSVersion: TLS最低版本 + * + * @return string|null + */ + public function getTLSVersion() + { + return $this->get("TLSVersion"); + } + + /** + * TLSVersion: TLS最低版本 + * + * @param string $tlsVersion + */ + public function setTLSVersion($tlsVersion) + { + $this->set("TLSVersion", $tlsVersion); + } + + /** + * SSLCiphers: 加密套件 + * + * @return string[]|null + */ + public function getSSLCiphers() + { + return $this->get("SSLCiphers"); + } + + /** + * SSLCiphers: 加密套件 + * + * @param string[] $sslCiphers + */ + public function setSSLCiphers(array $sslCiphers) + { + $this->set("SSLCiphers", $sslCiphers); + } + + /** + * SecurityPolicyType: 安全策略类型 0:预定义 1:自定义 + * + * @return integer|null + */ + public function getSecurityPolicyType() + { + return $this->get("SecurityPolicyType"); + } + + /** + * SecurityPolicyType: 安全策略类型 0:预定义 1:自定义 + * + * @param int $securityPolicyType + */ + public function setSecurityPolicyType($securityPolicyType) + { + $this->set("SecurityPolicyType", $securityPolicyType); + } +} diff --git a/src/ULB/Models/BindVServerInfo.php b/src/ULB/Models/BindVServerInfo.php new file mode 100644 index 00000000..4e326854 --- /dev/null +++ b/src/ULB/Models/BindVServerInfo.php @@ -0,0 +1,104 @@ +get("VServerId"); + } + + /** + * VServerId: 绑定的VServerId + * + * @param string $vServerId + */ + public function setVServerId($vServerId) + { + $this->set("VServerId", $vServerId); + } + + /** + * VServerName: 绑定的VServer名称 + * + * @return string|null + */ + public function getVServerName() + { + return $this->get("VServerName"); + } + + /** + * VServerName: 绑定的VServer名称 + * + * @param string $vServerName + */ + public function setVServerName($vServerName) + { + $this->set("VServerName", $vServerName); + } + + /** + * Port: VServer端口 + * + * @return integer|null + */ + public function getPort() + { + return $this->get("Port"); + } + + /** + * Port: VServer端口 + * + * @param int $port + */ + public function setPort($port) + { + $this->set("Port", $port); + } + + /** + * ULBId: ULB的ID + * + * @return string|null + */ + public function getULBId() + { + return $this->get("ULBId"); + } + + /** + * ULBId: ULB的ID + * + * @param string $ulbId + */ + public function setULBId($ulbId) + { + $this->set("ULBId", $ulbId); + } +} diff --git a/src/ULB/Models/Certificate.php b/src/ULB/Models/Certificate.php new file mode 100644 index 00000000..59fc10f8 --- /dev/null +++ b/src/ULB/Models/Certificate.php @@ -0,0 +1,64 @@ +get("SSLId"); + } + + /** + * SSLId: 证书ID + * + * @param string $sslId + */ + public function setSSLId($sslId) + { + $this->set("SSLId", $sslId); + } + + /** + * IsDefault: 是否为默认证书 + * + * @return boolean|null + */ + public function getIsDefault() + { + return $this->get("IsDefault"); + } + + /** + * IsDefault: 是否为默认证书 + * + * @param boolean $isDefault + */ + public function setIsDefault($isDefault) + { + $this->set("IsDefault", $isDefault); + } +} diff --git a/src/ULB/Models/CorsConfigSet.php b/src/ULB/Models/CorsConfigSet.php new file mode 100644 index 00000000..85274adf --- /dev/null +++ b/src/ULB/Models/CorsConfigSet.php @@ -0,0 +1,144 @@ +get("AllowOrigin"); + } + + /** + * AllowOrigin: 允许的访问来源列表。支持只配置一个元素*,或配置一个或多个值。单个值必须以http://或者https://开头,后边加一个正确的域名或一级泛域名。(例:http://*.test.abc.example.com)单个值可以不加端口,也可以指定端口,端口范围:1~65535。最多支持5个值 + * + * @param string[] $allowOrigin + */ + public function setAllowOrigin(array $allowOrigin) + { + $this->set("AllowOrigin", $allowOrigin); + } + + /** + * AllowHeaders: 允许跨域的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * + * @return string[]|null + */ + public function getAllowHeaders() + { + return $this->get("AllowHeaders"); + } + + /** + * AllowHeaders: 允许跨域的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * + * @param string[] $allowHeaders + */ + public function setAllowHeaders(array $allowHeaders) + { + $this->set("AllowHeaders", $allowHeaders); + } + + /** + * ExposeHeaders: 允许暴露的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * + * @return string[]|null + */ + public function getExposeHeaders() + { + return $this->get("ExposeHeaders"); + } + + /** + * ExposeHeaders: 允许暴露的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * + * @param string[] $exposeHeaders + */ + public function setExposeHeaders(array $exposeHeaders) + { + $this->set("ExposeHeaders", $exposeHeaders); + } + + /** + * AllowMethods: 选择跨域访问时允许的 HTTP 方法。取值:GETPOSTPUTDELETEHEADOPTIONSPATCH + * + * @return string[]|null + */ + public function getAllowMethods() + { + return $this->get("AllowMethods"); + } + + /** + * AllowMethods: 选择跨域访问时允许的 HTTP 方法。取值:GETPOSTPUTDELETEHEADOPTIONSPATCH + * + * @param string[] $allowMethods + */ + public function setAllowMethods(array $allowMethods) + { + $this->set("AllowMethods", $allowMethods); + } + + /** + * AllowCredentials: 是否允许携带凭证信息。取值:on:是。off:否。 + * + * @return string|null + */ + public function getAllowCredentials() + { + return $this->get("AllowCredentials"); + } + + /** + * AllowCredentials: 是否允许携带凭证信息。取值:on:是。off:否。 + * + * @param string $allowCredentials + */ + public function setAllowCredentials($allowCredentials) + { + $this->set("AllowCredentials", $allowCredentials); + } + + /** + * MaxAge: 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 + * + * @return integer|null + */ + public function getMaxAge() + { + return $this->get("MaxAge"); + } + + /** + * MaxAge: 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 + * + * @param int $maxAge + */ + public function setMaxAge($maxAge) + { + $this->set("MaxAge", $maxAge); + } +} diff --git a/src/ULB/Models/FirewallSet.php b/src/ULB/Models/FirewallSet.php index 532cbbd4..15387ec2 100644 --- a/src/ULB/Models/FirewallSet.php +++ b/src/ULB/Models/FirewallSet.php @@ -1,6 +1,6 @@ get("HttpCode"); + } + + /** + * HttpCode: 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 + * + * @param int $httpCode + */ + public function setHttpCode($httpCode) + { + $this->set("HttpCode", $httpCode); + } + + /** + * Content: 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + * + * @return string|null + */ + public function getContent() + { + return $this->get("Content"); + } + + /** + * Content: 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + * + * @param string $content + */ + public function setContent($content) + { + $this->set("Content", $content); + } +} diff --git a/src/ULB/Models/ForwardConfigSet.php b/src/ULB/Models/ForwardConfigSet.php new file mode 100644 index 00000000..0b5a000b --- /dev/null +++ b/src/ULB/Models/ForwardConfigSet.php @@ -0,0 +1,56 @@ +get("Targets"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ForwardTargetSet($item)); + } + return $result; + } + + /** + * Targets: 转发的后端服务节点。限定在监听器的服务节点池里;数组长度可以为0。具体结构详见 ForwardTargetSet + * + * @param ForwardTargetSet[] $targets + */ + public function setTargets(array $targets) + { + $result = []; + foreach ($targets as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Models/ForwardTargetSet.php b/src/ULB/Models/ForwardTargetSet.php new file mode 100644 index 00000000..0abd44c6 --- /dev/null +++ b/src/ULB/Models/ForwardTargetSet.php @@ -0,0 +1,64 @@ +get("Id"); + } + + /** + * Id: 服务节点的标识ID + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Weight: 权重。仅监听器负载均衡算法是加权轮询是有效;取值范围[1-100],默认值为1 + * + * @return integer|null + */ + public function getWeight() + { + return $this->get("Weight"); + } + + /** + * Weight: 权重。仅监听器负载均衡算法是加权轮询是有效;取值范围[1-100],默认值为1 + * + * @param int $weight + */ + public function setWeight($weight) + { + $this->set("Weight", $weight); + } +} diff --git a/src/ULB/Models/HealthCheckConfigSet.php b/src/ULB/Models/HealthCheckConfigSet.php new file mode 100644 index 00000000..92a5100a --- /dev/null +++ b/src/ULB/Models/HealthCheckConfigSet.php @@ -0,0 +1,144 @@ +get("Enabled"); + } + + /** + * Enabled: 是否开启健康检查功能。暂时不支持关闭。 默认值为:true + * + * @param boolean $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * Type: 健康检查方式。应用型限定取值: Port -> 端口检查;HTTP -> HTTP检查; 默认值:Port + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 健康检查方式。应用型限定取值: Port -> 端口检查;HTTP -> HTTP检查; 默认值:Port + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Domain: (应用型专用)HTTP检查域名。 当Type为HTTP时,此字段有意义,代表HTTP检查域名 + * + * @return string|null + */ + public function getDomain() + { + return $this->get("Domain"); + } + + /** + * Domain: (应用型专用)HTTP检查域名。 当Type为HTTP时,此字段有意义,代表HTTP检查域名 + * + * @param string $domain + */ + public function setDomain($domain) + { + $this->set("Domain", $domain); + } + + /** + * Path: (应用型专用)HTTP检查路径。当Type为HTTP时,此字段有意义,代表HTTP检查路径 + * + * @return string|null + */ + public function getPath() + { + return $this->get("Path"); + } + + /** + * Path: (应用型专用)HTTP检查路径。当Type为HTTP时,此字段有意义,代表HTTP检查路径 + * + * @param string $path + */ + public function setPath($path) + { + $this->set("Path", $path); + } + + /** + * Method: (应用型专用)HTTP检查方法。当Type为HTTP时,此字段有意义,代表HTTP检查方法 + * + * @return string|null + */ + public function getMethod() + { + return $this->get("Method"); + } + + /** + * Method: (应用型专用)HTTP检查方法。当Type为HTTP时,此字段有意义,代表HTTP检查方法 + * + * @param string $method + */ + public function setMethod($method) + { + $this->set("Method", $method); + } + + /** + * ResponseCode: (应用型专用)GRPC检查响应码。当Type为GRPC时,此字段有意义,代表GRPC检查响应码 + * + * @return string|null + */ + public function getResponseCode() + { + return $this->get("ResponseCode"); + } + + /** + * ResponseCode: (应用型专用)GRPC检查响应码。当Type为GRPC时,此字段有意义,代表GRPC检查响应码 + * + * @param string $responseCode + */ + public function setResponseCode($responseCode) + { + $this->set("ResponseCode", $responseCode); + } +} diff --git a/src/ULB/Models/HostConfigSet.php b/src/ULB/Models/HostConfigSet.php new file mode 100644 index 00000000..cef2d62a --- /dev/null +++ b/src/ULB/Models/HostConfigSet.php @@ -0,0 +1,64 @@ +get("Values"); + } + + /** + * Values: 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 + * + * @param string[] $values + */ + public function setValues(array $values) + { + $this->set("Values", $values); + } + + /** + * MatchMode: 匹配方式。限定枚举值:Regular-正则,Wildcard-泛域名; 默认值:Regular + * + * @return string|null + */ + public function getMatchMode() + { + return $this->get("MatchMode"); + } + + /** + * MatchMode: 匹配方式。限定枚举值:Regular-正则,Wildcard-泛域名; 默认值:Regular + * + * @param string $matchMode + */ + public function setMatchMode($matchMode) + { + $this->set("MatchMode", $matchMode); + } +} diff --git a/src/ULB/Models/IPInfo.php b/src/ULB/Models/IPInfo.php new file mode 100644 index 00000000..ee5d8b8f --- /dev/null +++ b/src/ULB/Models/IPInfo.php @@ -0,0 +1,164 @@ +get("IP"); + } + + /** + * IP: IP地址 + * + * @param string $ip + */ + public function setIP($ip) + { + $this->set("IP", $ip); + } + + /** + * Id: 唯一标识ID + * + * @return string|null + */ + public function getId() + { + return $this->get("Id"); + } + + /** + * Id: 唯一标识ID + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * IPVersion: IP协议版本 + * + * @return string|null + */ + public function getIPVersion() + { + return $this->get("IPVersion"); + } + + /** + * IPVersion: IP协议版本 + * + * @param string $ipVersion + */ + public function setIPVersion($ipVersion) + { + $this->set("IPVersion", $ipVersion); + } + + /** + * OperatorName: 外网IP的运营商信息。枚举值为:Telecom -> 电信,Unicom -> 联通,International -> 国际IP,Bgp -> BGP,Duplet -> 双线(电信+联通双线路),BGPPro -> 精品BGP,China-mobile -> 中国移动,Anycast -> AnycastEIP + * + * @return string|null + */ + public function getOperatorName() + { + return $this->get("OperatorName"); + } + + /** + * OperatorName: 外网IP的运营商信息。枚举值为:Telecom -> 电信,Unicom -> 联通,International -> 国际IP,Bgp -> BGP,Duplet -> 双线(电信+联通双线路),BGPPro -> 精品BGP,China-mobile -> 中国移动,Anycast -> AnycastEIP + * + * @param string $operatorName + */ + public function setOperatorName($operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * BandwidthType: 带宽类型。限定枚举值:1 -> 共享带宽,0 -> 普通带宽类型 + * + * @return integer|null + */ + public function getBandwidthType() + { + return $this->get("BandwidthType"); + } + + /** + * BandwidthType: 带宽类型。限定枚举值:1 -> 共享带宽,0 -> 普通带宽类型 + * + * @param int $bandwidthType + */ + public function setBandwidthType($bandwidthType) + { + $this->set("BandwidthType", $bandwidthType); + } + + /** + * Bandwidth: 带宽值。单位M + * + * @return integer|null + */ + public function getBandwidth() + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽值。单位M + * + * @param int $bandwidth + */ + public function setBandwidth($bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * AddressType: 网络模式。 限定枚举值:Internet -> 互联网,Intranet -> 内联网 + * + * @return string|null + */ + public function getAddressType() + { + return $this->get("AddressType"); + } + + /** + * AddressType: 网络模式。 限定枚举值:Internet -> 互联网,Intranet -> 内联网 + * + * @param string $addressType + */ + public function setAddressType($addressType) + { + $this->set("AddressType", $addressType); + } +} diff --git a/src/ULB/Models/InsertHeaderConfigSet.php b/src/ULB/Models/InsertHeaderConfigSet.php new file mode 100644 index 00000000..ad835dd3 --- /dev/null +++ b/src/ULB/Models/InsertHeaderConfigSet.php @@ -0,0 +1,84 @@ +get("Key"); + } + + /** + * Key: 插入的 header 字段名称,长度为 1~40 个字符,支持大小写字母 a~z、数字、下划线(_)和短划线(-)。头字段名称不能重复用于InsertHeader中。header 字段不能使用以下(此处判断大小写不敏感)x-real-ip、x-forwarded-for、x-forwarded-proto、x-forwarded-srcport、ucloud-alb-trace、connection、upgrade、content-length、transfer-encoding、keep-alive、te、host、cookie、remoteip、authority + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } + + /** + * ValueType: 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 + * + * @return string|null + */ + public function getValueType() + { + return $this->get("ValueType"); + } + + /** + * ValueType: 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 + * + * @param string $valueType + */ + public function setValueType($valueType) + { + $this->set("ValueType", $valueType); + } +} diff --git a/src/ULB/Models/Listener.php b/src/ULB/Models/Listener.php new file mode 100644 index 00000000..8d57e1fd --- /dev/null +++ b/src/ULB/Models/Listener.php @@ -0,0 +1,420 @@ +get("ListenerId"); + } + + /** + * ListenerId: 监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * Name: 监听器的名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 监听器的名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Remark: 监听器的备注信息 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 监听器的备注信息 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * ListenerPort: 监听器的监听端口 + * + * @return integer|null + */ + public function getListenerPort() + { + return $this->get("ListenerPort"); + } + + /** + * ListenerPort: 监听器的监听端口 + * + * @param int $listenerPort + */ + public function setListenerPort($listenerPort) + { + $this->set("ListenerPort", $listenerPort); + } + + /** + * ListenerProtocol: 监听协议。应用型限定取值: HTTP、HTTPS + * + * @return string|null + */ + public function getListenerProtocol() + { + return $this->get("ListenerProtocol"); + } + + /** + * ListenerProtocol: 监听协议。应用型限定取值: HTTP、HTTPS + * + * @param string $listenerProtocol + */ + public function setListenerProtocol($listenerProtocol) + { + $this->set("ListenerProtocol", $listenerProtocol); + } + + /** + * Certificates: (应用型专用)服务器默认证书ID。仅HTTPS监听支持。具体接口详见 Certificate + * + * @return Certificate[]|null + */ + public function getCertificates() + { + $items = $this->get("Certificates"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Certificate($item)); + } + return $result; + } + + /** + * Certificates: (应用型专用)服务器默认证书ID。仅HTTPS监听支持。具体接口详见 Certificate + * + * @param Certificate[] $certificates + */ + public function setCertificates(array $certificates) + { + $result = []; + foreach ($certificates as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SecurityPolicyId: (应用型专用)安全策略组ID。仅HTTPS监听支持绑定;Default -> 原生策略 + * + * @return string|null + */ + public function getSecurityPolicyId() + { + return $this->get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: (应用型专用)安全策略组ID。仅HTTPS监听支持绑定;Default -> 原生策略 + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } + + /** + * IdleTimeout: 连接空闲超时时间。单位:秒 + * + * @return integer|null + */ + public function getIdleTimeout() + { + return $this->get("IdleTimeout"); + } + + /** + * IdleTimeout: 连接空闲超时时间。单位:秒 + * + * @param int $idleTimeout + */ + public function setIdleTimeout($idleTimeout) + { + $this->set("IdleTimeout", $idleTimeout); + } + + /** + * Scheduler: 负载均衡算法。应用型限定取值:Roundrobin -> 轮询;Source -> 源地址; WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup ->主备模式 + * + * @return string|null + */ + public function getScheduler() + { + return $this->get("Scheduler"); + } + + /** + * Scheduler: 负载均衡算法。应用型限定取值:Roundrobin -> 轮询;Source -> 源地址; WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup ->主备模式 + * + * @param string $scheduler + */ + public function setScheduler($scheduler) + { + $this->set("Scheduler", $scheduler); + } + + /** + * StickinessConfig: 会话保持相关配置。具体结构详见 StickinessConfigSet + * + * @return StickinessConfigSet|null + */ + public function getStickinessConfig() + { + return new StickinessConfigSet($this->get("StickinessConfig")); + } + + /** + * StickinessConfig: 会话保持相关配置。具体结构详见 StickinessConfigSet + * + * @param StickinessConfigSet $stickinessConfig + */ + public function setStickinessConfig(array $stickinessConfig) + { + $this->set("StickinessConfig", $stickinessConfig->getAll()); + } + + /** + * HealthCheckConfig: 健康检查相关配置。具体结构详见 HealthCheckConfigSet + * + * @return HealthCheckConfigSet|null + */ + public function getHealthCheckConfig() + { + return new HealthCheckConfigSet($this->get("HealthCheckConfig")); + } + + /** + * HealthCheckConfig: 健康检查相关配置。具体结构详见 HealthCheckConfigSet + * + * @param HealthCheckConfigSet $healthCheckConfig + */ + public function setHealthCheckConfig(array $healthCheckConfig) + { + $this->set("HealthCheckConfig", $healthCheckConfig->getAll()); + } + + /** + * CompressionEnabled: (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩 + * + * @return boolean|null + */ + public function getCompressionEnabled() + { + return $this->get("CompressionEnabled"); + } + + /** + * CompressionEnabled: (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩 + * + * @param boolean $compressionEnabled + */ + public function setCompressionEnabled($compressionEnabled) + { + $this->set("CompressionEnabled", $compressionEnabled); + } + + /** + * HTTP2Enabled: (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启 + * + * @return boolean|null + */ + public function getHTTP2Enabled() + { + return $this->get("HTTP2Enabled"); + } + + /** + * HTTP2Enabled: (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启 + * + * @param boolean $http2Enabled + */ + public function setHTTP2Enabled($http2Enabled) + { + $this->set("HTTP2Enabled", $http2Enabled); + } + + /** + * RedirectEnabled: (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启 + * + * @return boolean|null + */ + public function getRedirectEnabled() + { + return $this->get("RedirectEnabled"); + } + + /** + * RedirectEnabled: (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启 + * + * @param boolean $redirectEnabled + */ + public function setRedirectEnabled($redirectEnabled) + { + $this->set("RedirectEnabled", $redirectEnabled); + } + + /** + * RedirectPort: (应用型专用)重定向端口 + * + * @return integer|null + */ + public function getRedirectPort() + { + return $this->get("RedirectPort"); + } + + /** + * RedirectPort: (应用型专用)重定向端口 + * + * @param int $redirectPort + */ + public function setRedirectPort($redirectPort) + { + $this->set("RedirectPort", $redirectPort); + } + + /** + * Targets: 添加的服务节点信息。具体结构详见 Target + * + * @return Target[]|null + */ + public function getTargets() + { + $items = $this->get("Targets"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Target($item)); + } + return $result; + } + + /** + * Targets: 添加的服务节点信息。具体结构详见 Target + * + * @param Target[] $targets + */ + public function setTargets(array $targets) + { + $result = []; + foreach ($targets as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Rules: (应用型专用)转发规则信息 + * + * @return Rule[]|null + */ + public function getRules() + { + $items = $this->get("Rules"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Rule($item)); + } + return $result; + } + + /** + * Rules: (应用型专用)转发规则信息 + * + * @param Rule[] $rules + */ + public function setRules(array $rules) + { + $result = []; + foreach ($rules as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * State: listener健康状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康,PartialHealth -> 部分健康,None -> 无节点状态 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: listener健康状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康,PartialHealth -> 部分健康,None -> 无节点状态 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } +} diff --git a/src/ULB/Models/LoadBalancer.php b/src/ULB/Models/LoadBalancer.php new file mode 100644 index 00000000..e9a08145 --- /dev/null +++ b/src/ULB/Models/LoadBalancer.php @@ -0,0 +1,440 @@ +get("VPCId"); + } + + /** + * VPCId: 负载均衡实例所属的VPC资源ID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 负载均衡实例所属的子网资源ID。负载均衡实例的内网VIP和SNAT场景的源IP限定在该子网内;指定子网不影响添加后端服务节点时的范围,依旧是整个VPC下支持的资源 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 负载均衡实例所属的子网资源ID。负载均衡实例的内网VIP和SNAT场景的源IP限定在该子网内;指定子网不影响添加后端服务节点时的范围,依旧是整个VPC下支持的资源 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @return string|null + */ + public function getLoadBalancerId() + { + return $this->get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * Type: 负载均衡实例的类型。限定枚举值:Application -> 应用型,Network -> 网络型 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 负载均衡实例的类型。限定枚举值:Application -> 应用型,Network -> 网络型 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Name: 负载均衡实例的名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 负载均衡实例的名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Tag: 负载均衡实例所属的业务组ID + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 负载均衡实例所属的业务组ID + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 负载均衡实例的备注信息 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 负载均衡实例的备注信息 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * IPVersion: 负载均衡实例支持的IP协议版本 + * + * @return string|null + */ + public function getIPVersion() + { + return $this->get("IPVersion"); + } + + /** + * IPVersion: 负载均衡实例支持的IP协议版本 + * + * @param string $ipVersion + */ + public function setIPVersion($ipVersion) + { + $this->set("IPVersion", $ipVersion); + } + + /** + * IPInfos: 绑定的IP信息。具体结构详见 IPInfo + * + * @return IPInfo[]|null + */ + public function getIPInfos() + { + $items = $this->get("IPInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new IPInfo($item)); + } + return $result; + } + + /** + * IPInfos: 绑定的IP信息。具体结构详见 IPInfo + * + * @param IPInfo[] $ipInfos + */ + public function setIPInfos(array $ipInfos) + { + $result = []; + foreach ($ipInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SnatIPs: 应用型实例的代理IP或网络型FULLNAT模式下snat所用的IP + * + * @return string[]|null + */ + public function getSnatIPs() + { + return $this->get("SnatIPs"); + } + + /** + * SnatIPs: 应用型实例的代理IP或网络型FULLNAT模式下snat所用的IP + * + * @param string[] $snatIPs + */ + public function setSnatIPs(array $snatIPs) + { + $this->set("SnatIPs", $snatIPs); + } + + /** + * Firewall: 防火墙信息 + * + * @return FirewallSet|null + */ + public function getFirewall() + { + return new FirewallSet($this->get("Firewall")); + } + + /** + * Firewall: 防火墙信息 + * + * @param FirewallSet $firewall + */ + public function setFirewall(array $firewall) + { + $this->set("Firewall", $firewall->getAll()); + } + + /** + * AccessLogConfig: (应用型专用)访问日志相关配置 + * + * @return AccessLogConfigSet|null + */ + public function getAccessLogConfig() + { + return new AccessLogConfigSet($this->get("AccessLogConfig")); + } + + /** + * AccessLogConfig: (应用型专用)访问日志相关配置 + * + * @param AccessLogConfigSet $accessLogConfig + */ + public function setAccessLogConfig(array $accessLogConfig) + { + $this->set("AccessLogConfig", $accessLogConfig->getAll()); + } + + /** + * ChargeType: 付费模式 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费模式 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * PurchaseValue: 有效期(计费)。格式为Unix Timestamp + * + * @return integer|null + */ + public function getPurchaseValue() + { + return $this->get("PurchaseValue"); + } + + /** + * PurchaseValue: 有效期(计费)。格式为Unix Timestamp + * + * @param int $purchaseValue + */ + public function setPurchaseValue($purchaseValue) + { + $this->set("PurchaseValue", $purchaseValue); + } + + /** + * CreateTime: 负载均衡实例创建时间。格式为Unix Timestamp + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 负载均衡实例创建时间。格式为Unix Timestamp + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * Listeners: 监听器信息。当ShowDetail为false时,为空 + * + * @return Listener[]|null + */ + public function getListeners() + { + $items = $this->get("Listeners"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Listener($item)); + } + return $result; + } + + /** + * Listeners: 监听器信息。当ShowDetail为false时,为空 + * + * @param Listener[] $listeners + */ + public function setListeners(array $listeners) + { + $result = []; + foreach ($listeners as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Status: lb状态:Normal-正常;Arrears-欠费停服 + * + * @return string|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: lb状态:Normal-正常;Arrears-欠费停服 + * + * @param string $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * AutoRenewEnabled: 是否开启自动续费 + * + * @return boolean|null + */ + public function getAutoRenewEnabled() + { + return $this->get("AutoRenewEnabled"); + } + + /** + * AutoRenewEnabled: 是否开启自动续费 + * + * @param boolean $autoRenewEnabled + */ + public function setAutoRenewEnabled($autoRenewEnabled) + { + $this->set("AutoRenewEnabled", $autoRenewEnabled); + } + + /** + * SecGroup: 安全组信息 + * + * @return SecGroupInfo[]|null + */ + public function getSecGroup() + { + $items = $this->get("SecGroup"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SecGroupInfo($item)); + } + return $result; + } + + /** + * SecGroup: 安全组信息 + * + * @param SecGroupInfo[] $secGroup + */ + public function setSecGroup(array $secGroup) + { + $result = []; + foreach ($secGroup as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Models/LoggerSet.php b/src/ULB/Models/LoggerSet.php index 16b135c7..d4d727ed 100644 --- a/src/ULB/Models/LoggerSet.php +++ b/src/ULB/Models/LoggerSet.php @@ -1,6 +1,6 @@ get("Values"); + } + + /** + * Values: 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 + * + * @param string[] $values + */ + public function setValues(array $values) + { + $this->set("Values", $values); + } +} diff --git a/src/ULB/Models/PolicyBackendSet.php b/src/ULB/Models/PolicyBackendSet.php index 34c73418..1d1b3327 100644 --- a/src/ULB/Models/PolicyBackendSet.php +++ b/src/ULB/Models/PolicyBackendSet.php @@ -1,6 +1,6 @@ get("Key"); + } + + /** + * Key: 删除的 header 字段名称,目前只能删除以下几个默认配置的字段: X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } +} diff --git a/src/ULB/Models/Rule.php b/src/ULB/Models/Rule.php new file mode 100644 index 00000000..ea7b9f4e --- /dev/null +++ b/src/ULB/Models/Rule.php @@ -0,0 +1,148 @@ +get("RuleId"); + } + + /** + * RuleId: 转发规则的ID + * + * @param string $ruleId + */ + public function setRuleId($ruleId) + { + $this->set("RuleId", $ruleId); + } + + /** + * RuleConditions: 转发规则匹配条件。具体结构详见 RuleCondition + * + * @return RuleCondition[]|null + */ + public function getRuleConditions() + { + $items = $this->get("RuleConditions"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RuleCondition($item)); + } + return $result; + } + + /** + * RuleConditions: 转发规则匹配条件。具体结构详见 RuleCondition + * + * @param RuleCondition[] $ruleConditions + */ + public function setRuleConditions(array $ruleConditions) + { + $result = []; + foreach ($ruleConditions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * RuleActions: 转发动作。具体规则详见RuleAction + * + * @return RuleAction[]|null + */ + public function getRuleActions() + { + $items = $this->get("RuleActions"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RuleAction($item)); + } + return $result; + } + + /** + * RuleActions: 转发动作。具体规则详见RuleAction + * + * @param RuleAction[] $ruleActions + */ + public function setRuleActions(array $ruleActions) + { + $result = []; + foreach ($ruleActions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * IsDefault: 是否为默认转发规则 + * + * @return boolean|null + */ + public function getIsDefault() + { + return $this->get("IsDefault"); + } + + /** + * IsDefault: 是否为默认转发规则 + * + * @param boolean $isDefault + */ + public function setIsDefault($isDefault) + { + $this->set("IsDefault", $isDefault); + } + + /** + * Pass: 当转发的服务节点为空时,规则是否忽略 + * + * @return boolean|null + */ + public function getPass() + { + return $this->get("Pass"); + } + + /** + * Pass: 当转发的服务节点为空时,规则是否忽略 + * + * @param boolean $pass + */ + public function setPass($pass) + { + $this->set("Pass", $pass); + } +} diff --git a/src/ULB/Models/RuleAction.php b/src/ULB/Models/RuleAction.php new file mode 100644 index 00000000..556d15f6 --- /dev/null +++ b/src/ULB/Models/RuleAction.php @@ -0,0 +1,164 @@ +get("Type"); + } + + /** + * Type: 动作类型。限定枚举值:Forward、"InsertHeader"、"Cors"、"FixedResponse"、"RemoveHeader" + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * ForwardConfig: 转发服务节点相关配置,对应 type 值: "Forward"。具体结构详见 ForwardConfigSet + * + * @return ForwardConfigSet|null + */ + public function getForwardConfig() + { + return new ForwardConfigSet($this->get("ForwardConfig")); + } + + /** + * ForwardConfig: 转发服务节点相关配置,对应 type 值: "Forward"。具体结构详见 ForwardConfigSet + * + * @param ForwardConfigSet $forwardConfig + */ + public function setForwardConfig(array $forwardConfig) + { + $this->set("ForwardConfig", $forwardConfig->getAll()); + } + + /** + * FixedResponseConfig: 静态返回相关配置,对应 type 值: "FixedResponse"。具体结构详见 FixedResponseConfigSet + * + * @return FixedResponseConfigSet|null + */ + public function getFixedResponseConfig() + { + return new FixedResponseConfigSet($this->get("FixedResponseConfig")); + } + + /** + * FixedResponseConfig: 静态返回相关配置,对应 type 值: "FixedResponse"。具体结构详见 FixedResponseConfigSet + * + * @param FixedResponseConfigSet $fixedResponseConfig + */ + public function setFixedResponseConfig(array $fixedResponseConfig) + { + $this->set("FixedResponseConfig", $fixedResponseConfig->getAll()); + } + + /** + * InsertHeaderConfig: 插入 header 相关配置,对应 type 值: "InsertHeader"。具体结构详见 InsertHeaderConfigSet + * + * @return InsertHeaderConfigSet|null + */ + public function getInsertHeaderConfig() + { + return new InsertHeaderConfigSet($this->get("InsertHeaderConfig")); + } + + /** + * InsertHeaderConfig: 插入 header 相关配置,对应 type 值: "InsertHeader"。具体结构详见 InsertHeaderConfigSet + * + * @param InsertHeaderConfigSet $insertHeaderConfig + */ + public function setInsertHeaderConfig(array $insertHeaderConfig) + { + $this->set("InsertHeaderConfig", $insertHeaderConfig->getAll()); + } + + /** + * CorsConfig: 跨域相关配置,对应 type 值: "Cors"。具体结构详见 CorsConfigSet + * + * @return CorsConfigSet|null + */ + public function getCorsConfig() + { + return new CorsConfigSet($this->get("CorsConfig")); + } + + /** + * CorsConfig: 跨域相关配置,对应 type 值: "Cors"。具体结构详见 CorsConfigSet + * + * @param CorsConfigSet $corsConfig + */ + public function setCorsConfig(array $corsConfig) + { + $this->set("CorsConfig", $corsConfig->getAll()); + } + + /** + * RemoveHeaderConfig: 删除 header 相关配置,对应 type 值: "RemoveHeader"。具体结构详见 RemoveHeaderConfigSet + * + * @return RemoveHeaderConfigSet|null + */ + public function getRemoveHeaderConfig() + { + return new RemoveHeaderConfigSet($this->get("RemoveHeaderConfig")); + } + + /** + * RemoveHeaderConfig: 删除 header 相关配置,对应 type 值: "RemoveHeader"。具体结构详见 RemoveHeaderConfigSet + * + * @param RemoveHeaderConfigSet $removeHeaderConfig + */ + public function setRemoveHeaderConfig(array $removeHeaderConfig) + { + $this->set("RemoveHeaderConfig", $removeHeaderConfig->getAll()); + } + + /** + * Order: 转发规则动作执行的顺序,取值为1~1000,按值从小到大执行动作。值不能为空,不能重复。Forward、FixedResponse 类型的动作不判断 Order,最后一个执行 + * + * @return integer|null + */ + public function getOrder() + { + return $this->get("Order"); + } + + /** + * Order: 转发规则动作执行的顺序,取值为1~1000,按值从小到大执行动作。值不能为空,不能重复。Forward、FixedResponse 类型的动作不判断 Order,最后一个执行 + * + * @param int $order + */ + public function setOrder($order) + { + $this->set("Order", $order); + } +} diff --git a/src/ULB/Models/RuleCondition.php b/src/ULB/Models/RuleCondition.php new file mode 100644 index 00000000..3a139a96 --- /dev/null +++ b/src/ULB/Models/RuleCondition.php @@ -0,0 +1,84 @@ +get("Type"); + } + + /** + * Type: 匹配条件类型。限定枚举值:Host,Path + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * HostConfig: 域名相关配置。Type为Host时必填。具体结构详见 HostConfigSet + * + * @return HostConfigSet|null + */ + public function getHostConfig() + { + return new HostConfigSet($this->get("HostConfig")); + } + + /** + * HostConfig: 域名相关配置。Type为Host时必填。具体结构详见 HostConfigSet + * + * @param HostConfigSet $hostConfig + */ + public function setHostConfig(array $hostConfig) + { + $this->set("HostConfig", $hostConfig->getAll()); + } + + /** + * PathConfig: 路径相关配置。Type为Path时必填。具体结构详见 PathConfigSet + * + * @return PathConfigSet|null + */ + public function getPathConfig() + { + return new PathConfigSet($this->get("PathConfig")); + } + + /** + * PathConfig: 路径相关配置。Type为Path时必填。具体结构详见 PathConfigSet + * + * @param PathConfigSet $pathConfig + */ + public function setPathConfig(array $pathConfig) + { + $this->set("PathConfig", $pathConfig->getAll()); + } +} diff --git a/src/ULB/Models/SSLBindedTargetSet.php b/src/ULB/Models/SSLBindedTargetSet.php index 50f4ac64..b2180337 100644 --- a/src/ULB/Models/SSLBindedTargetSet.php +++ b/src/ULB/Models/SSLBindedTargetSet.php @@ -1,6 +1,6 @@ get("SSLId"); + } + + /** + * SSLId: SSL证书的Id + * + * @param string $sslId + */ + public function setSSLId($sslId) + { + $this->set("SSLId", $sslId); + } + + /** + * SSLName: SSL证书的名字 + * + * @return string|null + */ + public function getSSLName() + { + return $this->get("SSLName"); + } + + /** + * SSLName: SSL证书的名字 + * + * @param string $sslName + */ + public function setSSLName($sslName) + { + $this->set("SSLName", $sslName); + } + + /** + * SSLType: SSL证书类型,暂时只有 Pem 一种类型 + * + * @return string|null + */ + public function getSSLType() + { + return $this->get("SSLType"); + } + + /** + * SSLType: SSL证书类型,暂时只有 Pem 一种类型 + * + * @param string $sslType + */ + public function setSSLType($sslType) + { + $this->set("SSLType", $sslType); + } + + /** + * SSLContent: SSL证书的内容 + * + * @return string|null + */ + public function getSSLContent() + { + return $this->get("SSLContent"); + } + + /** + * SSLContent: SSL证书的内容 + * + * @param string $sslContent + */ + public function setSSLContent($sslContent) + { + $this->set("SSLContent", $sslContent); + } + + /** + * CreateTime: SSL证书的创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: SSL证书的创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * HashValue: SSL证书的HASH值 + * + * @return string|null + */ + public function getHashValue() + { + return $this->get("HashValue"); + } + + /** + * HashValue: SSL证书的HASH值 + * + * @param string $hashValue + */ + public function setHashValue($hashValue) + { + $this->set("HashValue", $hashValue); + } + + /** + * Relations: SSL绑定ULB和ALB的关系 + * + * @return SSLRelation[]|null + */ + public function getRelations() + { + $items = $this->get("Relations"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SSLRelation($item)); + } + return $result; + } + + /** + * Relations: SSL绑定ULB和ALB的关系 + * + * @param SSLRelation[] $relations + */ + public function setRelations(array $relations) + { + $result = []; + foreach ($relations as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SSLSource: SSL证书来源,SSL证书来源,0代表证书来自于ULB平台,1代表证书来自于USSL平台 + * + * @return integer|null + */ + public function getSSLSource() + { + return $this->get("SSLSource"); + } + + /** + * SSLSource: SSL证书来源,SSL证书来源,0代表证书来自于ULB平台,1代表证书来自于USSL平台 + * + * @param int $sslSource + */ + public function setSSLSource($sslSource) + { + $this->set("SSLSource", $sslSource); + } + + /** + * USSLId: USSL证书平台的编号,只有当SSLSource为1时才出现 + * + * @return string|null + */ + public function getUSSLId() + { + return $this->get("USSLId"); + } + + /** + * USSLId: USSL证书平台的编号,只有当SSLSource为1时才出现 + * + * @param string $usslId + */ + public function setUSSLId($usslId) + { + $this->set("USSLId", $usslId); + } + + /** + * Domains: SSL证书的域名 + * + * @return string|null + */ + public function getDomains() + { + return $this->get("Domains"); + } + + /** + * Domains: SSL证书的域名 + * + * @param string $domains + */ + public function setDomains($domains) + { + $this->set("Domains", $domains); + } + + /** + * DNSNames: SSL证书的扩展域名 + * + * @return string|null + */ + public function getDNSNames() + { + return $this->get("DNSNames"); + } + + /** + * DNSNames: SSL证书的扩展域名 + * + * @param string $dnsNames + */ + public function setDNSNames($dnsNames) + { + $this->set("DNSNames", $dnsNames); + } + + /** + * NotBefore: 证书颁发时间 + * + * @return integer|null + */ + public function getNotBefore() + { + return $this->get("NotBefore"); + } + + /** + * NotBefore: 证书颁发时间 + * + * @param int $notBefore + */ + public function setNotBefore($notBefore) + { + $this->set("NotBefore", $notBefore); + } + + /** + * NotAfter: 证书过期时间 + * + * @return integer|null + */ + public function getNotAfter() + { + return $this->get("NotAfter"); + } + + /** + * NotAfter: 证书过期时间 + * + * @param int $notAfter + */ + public function setNotAfter($notAfter) + { + $this->set("NotAfter", $notAfter); + } +} diff --git a/src/ULB/Models/SSLRelation.php b/src/ULB/Models/SSLRelation.php new file mode 100644 index 00000000..19f88aa9 --- /dev/null +++ b/src/ULB/Models/SSLRelation.php @@ -0,0 +1,124 @@ +get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * LoadBalancerName: 负载均衡实例的名称 + * + * @return string|null + */ + public function getLoadBalancerName() + { + return $this->get("LoadBalancerName"); + } + + /** + * LoadBalancerName: 负载均衡实例的名称 + * + * @param string $loadBalancerName + */ + public function setLoadBalancerName($loadBalancerName) + { + $this->set("LoadBalancerName", $loadBalancerName); + } + + /** + * ListenerId: 监听器的ID + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * ListenerName: 监听器的名称 + * + * @return string|null + */ + public function getListenerName() + { + return $this->get("ListenerName"); + } + + /** + * ListenerName: 监听器的名称 + * + * @param string $listenerName + */ + public function setListenerName($listenerName) + { + $this->set("ListenerName", $listenerName); + } + + /** + * IsDefault: 是否为监听器默认SSL证书 + * + * @return boolean|null + */ + public function getIsDefault() + { + return $this->get("IsDefault"); + } + + /** + * IsDefault: 是否为监听器默认SSL证书 + * + * @param boolean $isDefault + */ + public function setIsDefault($isDefault) + { + $this->set("IsDefault", $isDefault); + } +} diff --git a/src/ULB/Models/SecGroupInfo.php b/src/ULB/Models/SecGroupInfo.php new file mode 100644 index 00000000..7ea3ede6 --- /dev/null +++ b/src/ULB/Models/SecGroupInfo.php @@ -0,0 +1,104 @@ +get("SecgroupId"); + } + + /** + * SecgroupId: 安全组id + * + * @param string $secgroupId + */ + public function setSecgroupId($secgroupId) + { + $this->set("SecgroupId", $secgroupId); + } + + /** + * Name: 安全组名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 安全组名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * 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); + } + + /** + * Priority: 优先级 + * + * @return integer|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 优先级 + * + * @param int $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } +} diff --git a/src/ULB/Models/SecurityPolicy.php b/src/ULB/Models/SecurityPolicy.php new file mode 100644 index 00000000..ec64d665 --- /dev/null +++ b/src/ULB/Models/SecurityPolicy.php @@ -0,0 +1,156 @@ +get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: 安全策略ID + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } + + /** + * SecurityPolicyName: 安全策略名称 + * + * @return string|null + */ + public function getSecurityPolicyName() + { + return $this->get("SecurityPolicyName"); + } + + /** + * SecurityPolicyName: 安全策略名称 + * + * @param string $securityPolicyName + */ + public function setSecurityPolicyName($securityPolicyName) + { + $this->set("SecurityPolicyName", $securityPolicyName); + } + + /** + * TLSVersion: TLS最低版本 + * + * @return string|null + */ + public function getTLSVersion() + { + return $this->get("TLSVersion"); + } + + /** + * TLSVersion: TLS最低版本 + * + * @param string $tlsVersion + */ + public function setTLSVersion($tlsVersion) + { + $this->set("TLSVersion", $tlsVersion); + } + + /** + * SSLCiphers: 加密套件 + * + * @return string[]|null + */ + public function getSSLCiphers() + { + return $this->get("SSLCiphers"); + } + + /** + * SSLCiphers: 加密套件 + * + * @param string[] $sslCiphers + */ + public function setSSLCiphers(array $sslCiphers) + { + $this->set("SSLCiphers", $sslCiphers); + } + + /** + * SecurityPolicyType: 安全策略类型 0:预定义 1:自定义 + * + * @return integer|null + */ + public function getSecurityPolicyType() + { + return $this->get("SecurityPolicyType"); + } + + /** + * SecurityPolicyType: 安全策略类型 0:预定义 1:自定义 + * + * @param int $securityPolicyType + */ + public function setSecurityPolicyType($securityPolicyType) + { + $this->set("SecurityPolicyType", $securityPolicyType); + } + + /** + * VServerSet: 关联的监听 + * + * @return BindVServerInfo[]|null + */ + public function getVServerSet() + { + $items = $this->get("VServerSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BindVServerInfo($item)); + } + return $result; + } + + /** + * VServerSet: 关联的监听 + * + * @param BindVServerInfo[] $vServerSet + */ + public function setVServerSet(array $vServerSet) + { + $result = []; + foreach ($vServerSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Models/SecurityPolicyInfo.php b/src/ULB/Models/SecurityPolicyInfo.php new file mode 100644 index 00000000..3c5f4510 --- /dev/null +++ b/src/ULB/Models/SecurityPolicyInfo.php @@ -0,0 +1,156 @@ +get("SecurityPolicyId"); + } + + /** + * SecurityPolicyId: 安全策略ID + * + * @param string $securityPolicyId + */ + public function setSecurityPolicyId($securityPolicyId) + { + $this->set("SecurityPolicyId", $securityPolicyId); + } + + /** + * SecurityPolicyName: 安全策略名称 + * + * @return string|null + */ + public function getSecurityPolicyName() + { + return $this->get("SecurityPolicyName"); + } + + /** + * SecurityPolicyName: 安全策略名称 + * + * @param string $securityPolicyName + */ + public function setSecurityPolicyName($securityPolicyName) + { + $this->set("SecurityPolicyName", $securityPolicyName); + } + + /** + * TLSVersion: TLS最低版本 + * + * @return string|null + */ + public function getTLSVersion() + { + return $this->get("TLSVersion"); + } + + /** + * TLSVersion: TLS最低版本 + * + * @param string $tlsVersion + */ + public function setTLSVersion($tlsVersion) + { + $this->set("TLSVersion", $tlsVersion); + } + + /** + * SSLCiphers: 加密套件 + * + * @return string[]|null + */ + public function getSSLCiphers() + { + return $this->get("SSLCiphers"); + } + + /** + * SSLCiphers: 加密套件 + * + * @param string[] $sslCiphers + */ + public function setSSLCiphers(array $sslCiphers) + { + $this->set("SSLCiphers", $sslCiphers); + } + + /** + * SecurityPolicyType: 安全策略类型 0:预定义 1:自定义 + * + * @return integer|null + */ + public function getSecurityPolicyType() + { + return $this->get("SecurityPolicyType"); + } + + /** + * SecurityPolicyType: 安全策略类型 0:预定义 1:自定义 + * + * @param int $securityPolicyType + */ + public function setSecurityPolicyType($securityPolicyType) + { + $this->set("SecurityPolicyType", $securityPolicyType); + } + + /** + * Relations: 关联的监听 + * + * @return SecurityPolicyRelation[]|null + */ + public function getRelations() + { + $items = $this->get("Relations"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SecurityPolicyRelation($item)); + } + return $result; + } + + /** + * Relations: 关联的监听 + * + * @param SecurityPolicyRelation[] $relations + */ + public function setRelations(array $relations) + { + $result = []; + foreach ($relations as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Models/SecurityPolicyRelation.php b/src/ULB/Models/SecurityPolicyRelation.php new file mode 100644 index 00000000..a07e2267 --- /dev/null +++ b/src/ULB/Models/SecurityPolicyRelation.php @@ -0,0 +1,104 @@ +get("LoadBalancerId"); + } + + /** + * LoadBalancerId: 负载均衡实例的ID + * + * @param string $loadBalancerId + */ + public function setLoadBalancerId($loadBalancerId) + { + $this->set("LoadBalancerId", $loadBalancerId); + } + + /** + * ListenerId: 监听器的ID + * + * @return string|null + */ + public function getListenerId() + { + return $this->get("ListenerId"); + } + + /** + * ListenerId: 监听器的ID + * + * @param string $listenerId + */ + public function setListenerId($listenerId) + { + $this->set("ListenerId", $listenerId); + } + + /** + * ListenerName: 监听器的名称 + * + * @return string|null + */ + public function getListenerName() + { + return $this->get("ListenerName"); + } + + /** + * ListenerName: 监听器的名称 + * + * @param string $listenerName + */ + public function setListenerName($listenerName) + { + $this->set("ListenerName", $listenerName); + } + + /** + * ListenerPort: 监听端口 + * + * @return integer|null + */ + public function getListenerPort() + { + return $this->get("ListenerPort"); + } + + /** + * ListenerPort: 监听端口 + * + * @param int $listenerPort + */ + public function setListenerPort($listenerPort) + { + $this->set("ListenerPort", $listenerPort); + } +} diff --git a/src/ULB/Models/StickinessConfigSet.php b/src/ULB/Models/StickinessConfigSet.php new file mode 100644 index 00000000..1f20234e --- /dev/null +++ b/src/ULB/Models/StickinessConfigSet.php @@ -0,0 +1,84 @@ +get("Enabled"); + } + + /** + * Enabled: 是否开启会话保持功能。应用型负载均衡实例基于Cookie实现 + * + * @param boolean $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * Type: (应用型专用)Cookie处理方式。限定枚举值: ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: (应用型专用)Cookie处理方式。限定枚举值: ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * CookieName: (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效 + * + * @return string|null + */ + public function getCookieName() + { + return $this->get("CookieName"); + } + + /** + * CookieName: (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效 + * + * @param string $cookieName + */ + public function setCookieName($cookieName) + { + $this->set("CookieName", $cookieName); + } +} diff --git a/src/ULB/Models/TLSAndCiphers.php b/src/ULB/Models/TLSAndCiphers.php new file mode 100644 index 00000000..fb23f65e --- /dev/null +++ b/src/ULB/Models/TLSAndCiphers.php @@ -0,0 +1,64 @@ +get("TLSVersion"); + } + + /** + * TLSVersion: TLS最低版本 + * + * @param string $tlsVersion + */ + public function setTLSVersion($tlsVersion) + { + $this->set("TLSVersion", $tlsVersion); + } + + /** + * SSLCiphers: 加密套件 + * + * @return string[]|null + */ + public function getSSLCiphers() + { + return $this->get("SSLCiphers"); + } + + /** + * SSLCiphers: 加密套件 + * + * @param string[] $sslCiphers + */ + public function setSSLCiphers(array $sslCiphers) + { + $this->set("SSLCiphers", $sslCiphers); + } +} diff --git a/src/ULB/Models/Target.php b/src/ULB/Models/Target.php new file mode 100644 index 00000000..f6e0f948 --- /dev/null +++ b/src/ULB/Models/Target.php @@ -0,0 +1,264 @@ + 云主机,UNI -> 虚拟网卡,UPM -> 物理云主机,IP -> IP类型; 默认值:"UHost"; 非IP类型,如果该资源有多个IP,将只能添加主IP; 非IP类型,展示时,会显示相关资源信息,IP类型只展示IP信息。 在相关资源被删除时,非IP类型会把相关资源从lb中剔除,IP类型不保证这个逻辑 + * + * @return string|null + */ + public function getResourceType() + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 服务节点的类型。限定枚举值:UHost -> 云主机,UNI -> 虚拟网卡,UPM -> 物理云主机,IP -> IP类型; 默认值:"UHost"; 非IP类型,如果该资源有多个IP,将只能添加主IP; 非IP类型,展示时,会显示相关资源信息,IP类型只展示IP信息。 在相关资源被删除时,非IP类型会把相关资源从lb中剔除,IP类型不保证这个逻辑 + * + * @param string $resourceType + */ + public function setResourceType($resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * 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); + } + + /** + * ResourceName: 服务节点的资源名称 + * + * @return string|null + */ + public function getResourceName() + { + return $this->get("ResourceName"); + } + + /** + * ResourceName: 服务节点的资源名称 + * + * @param string $resourceName + */ + public function setResourceName($resourceName) + { + $this->set("ResourceName", $resourceName); + } + + /** + * 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); + } + + /** + * ResourceIP: 服务节点的IP + * + * @return string|null + */ + public function getResourceIP() + { + return $this->get("ResourceIP"); + } + + /** + * ResourceIP: 服务节点的IP + * + * @param string $resourceIP + */ + public function setResourceIP($resourceIP) + { + $this->set("ResourceIP", $resourceIP); + } + + /** + * Port: 服务节点的端口 + * + * @return integer|null + */ + public function getPort() + { + return $this->get("Port"); + } + + /** + * Port: 服务节点的端口 + * + * @param int $port + */ + public function setPort($port) + { + $this->set("Port", $port); + } + + /** + * Weight: 服务节点的权重。仅在加权轮询算法时有效 + * + * @return integer|null + */ + public function getWeight() + { + return $this->get("Weight"); + } + + /** + * Weight: 服务节点的权重。仅在加权轮询算法时有效 + * + * @param int $weight + */ + public function setWeight($weight) + { + $this->set("Weight", $weight); + } + + /** + * Enabled: 服务节点是否启用 + * + * @return boolean|null + */ + public function getEnabled() + { + return $this->get("Enabled"); + } + + /** + * Enabled: 服务节点是否启用 + * + * @param boolean $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * IsBackup: 服务节点是否为备节点 + * + * @return boolean|null + */ + public function getIsBackup() + { + return $this->get("IsBackup"); + } + + /** + * IsBackup: 服务节点是否为备节点 + * + * @param boolean $isBackup + */ + public function setIsBackup($isBackup) + { + $this->set("IsBackup", $isBackup); + } + + /** + * Id: 服务节点的标识ID。为ALB/NLB中使用,与资源自身ID无关,可用于UpdateTargetsAttribute/RemoveTargets + * + * @return string|null + */ + public function getId() + { + return $this->get("Id"); + } + + /** + * Id: 服务节点的标识ID。为ALB/NLB中使用,与资源自身ID无关,可用于UpdateTargetsAttribute/RemoveTargets + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * State: 服务节点的健康检查状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 服务节点的健康检查状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } +} diff --git a/src/ULB/Models/TargetSet.php b/src/ULB/Models/TargetSet.php new file mode 100644 index 00000000..67028ec4 --- /dev/null +++ b/src/ULB/Models/TargetSet.php @@ -0,0 +1,244 @@ + 云主机,UNI -> 虚拟网卡,UPM -> 物理云主机,IP -> IP类型; 默认值:"UHost"; 非IP类型,如果该资源有多个IP,将只能添加主IP; 非IP类型,展示时,会显示相关资源信息,IP类型只展示IP信息。 在相关资源被删除时,非IP类型会把相关资源从lb中剔除,IP类型不保证这个逻辑 + * + * @return string|null + */ + public function getResourceType() + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 服务节点的类型。限定枚举值:UHost -> 云主机,UNI -> 虚拟网卡,UPM -> 物理云主机,IP -> IP类型; 默认值:"UHost"; 非IP类型,如果该资源有多个IP,将只能添加主IP; 非IP类型,展示时,会显示相关资源信息,IP类型只展示IP信息。 在相关资源被删除时,非IP类型会把相关资源从lb中剔除,IP类型不保证这个逻辑 + * + * @param string $resourceType + */ + public function setResourceType($resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * ResourceId: 服务节点的资源ID。在非IP类型时,必传 + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 服务节点的资源ID。在非IP类型时,必传 + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * VPCId: 服务节点的VPC资源ID。在IP类型时,必传 + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: 服务节点的VPC资源ID。在IP类型时,必传 + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 服务节点的子网资源ID。在IP类型时,必传 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 服务节点的子网资源ID。在IP类型时,必传 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * ResourceIP: 服务节点的IP。在IP类型时,必传 + * + * @return string|null + */ + public function getResourceIP() + { + return $this->get("ResourceIP"); + } + + /** + * ResourceIP: 服务节点的IP。在IP类型时,必传 + * + * @param string $resourceIP + */ + public function setResourceIP($resourceIP) + { + $this->set("ResourceIP", $resourceIP); + } + + /** + * Port: 服务节点的端口。限定取值:[1-65535]; 默认值:80 + * + * @return integer|null + */ + public function getPort() + { + return $this->get("Port"); + } + + /** + * Port: 服务节点的端口。限定取值:[1-65535]; 默认值:80 + * + * @param int $port + */ + public function setPort($port) + { + $this->set("Port", $port); + } + + /** + * Weight: 服务节点的权重。限定取值:[1-100]; 仅在加权轮询算法时有效; 默认值:1 + * + * @return integer|null + */ + public function getWeight() + { + return $this->get("Weight"); + } + + /** + * Weight: 服务节点的权重。限定取值:[1-100]; 仅在加权轮询算法时有效; 默认值:1 + * + * @param int $weight + */ + public function setWeight($weight) + { + $this->set("Weight", $weight); + } + + /** + * Enabled: 服务节点是否启用。 默认值:true + * + * @return boolean|null + */ + public function getEnabled() + { + return $this->get("Enabled"); + } + + /** + * Enabled: 服务节点是否启用。 默认值:true + * + * @param boolean $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * IsBackup: 服务节点是否为备节点。 默认值:false + * + * @return boolean|null + */ + public function getIsBackup() + { + return $this->get("IsBackup"); + } + + /** + * IsBackup: 服务节点是否为备节点。 默认值:false + * + * @param boolean $isBackup + */ + public function setIsBackup($isBackup) + { + $this->set("IsBackup", $isBackup); + } + + /** + * Id: 服务节点的标识ID。 + * + * @return string|null + */ + public function getId() + { + return $this->get("Id"); + } + + /** + * Id: 服务节点的标识ID。 + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * State: 服务节点的健康检查状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 服务节点的健康检查状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } +} diff --git a/src/ULB/Models/ULBBackendSet.php b/src/ULB/Models/ULBBackendSet.php index fd725adc..4a74d3d9 100644 --- a/src/ULB/Models/ULBBackendSet.php +++ b/src/ULB/Models/ULBBackendSet.php @@ -1,6 +1,6 @@ set("IsBackup", $isBackup); } + + /** + * Weight: 后端RS权重(在加权轮询算法下有效) + * + * @return integer|null + */ + public function getWeight() + { + return $this->get("Weight"); + } + + /** + * Weight: 后端RS权重(在加权轮询算法下有效) + * + * @param int $weight + */ + public function setWeight($weight) + { + $this->set("Weight", $weight); + } + + /** + * VPCId: 后端服务器所在的VPC + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: 后端服务器所在的VPC + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } } diff --git a/src/ULB/Models/ULBIPSet.php b/src/ULB/Models/ULBIPSet.php index 176b17ac..8468a03e 100644 --- a/src/ULB/Models/ULBIPSet.php +++ b/src/ULB/Models/ULBIPSet.php @@ -1,6 +1,6 @@ get("SSLSource"); + } + + /** + * SSLSource: SSL证书来源,SSL证书来源,0代表证书来自于ULB平台,1代表证书来自于USSL平台 + * + * @param int $sslSource + */ + public function setSSLSource($sslSource) + { + $this->set("SSLSource", $sslSource); + } + + /** + * USSLId: USSL证书平台的编号,只有当SSLSource为1时才出现 + * + * @return string|null + */ + public function getUSSLId() + { + return $this->get("USSLId"); + } + + /** + * USSLId: USSL证书平台的编号,只有当SSLSource为1时才出现 + * + * @param string $usslId + */ + public function setUSSLId($usslId) + { + $this->set("USSLId", $usslId); + } + + /** + * Domains: SSL证书平台的域名,多域名时,不展示扩展域名 + * + * @return string|null + */ + public function getDomains() + { + return $this->get("Domains"); + } + + /** + * Domains: SSL证书平台的域名,多域名时,不展示扩展域名 + * + * @param string $domains + */ + public function setDomains($domains) + { + $this->set("Domains", $domains); + } + + /** + * NotBefore: 证书颁发时间 + * + * @return integer|null + */ + public function getNotBefore() + { + return $this->get("NotBefore"); + } + + /** + * NotBefore: 证书颁发时间 + * + * @param int $notBefore + */ + public function setNotBefore($notBefore) + { + $this->set("NotBefore", $notBefore); + } + + /** + * NotAfter: 证书过期时间 + * + * @return integer|null + */ + public function getNotAfter() + { + return $this->get("NotAfter"); + } + + /** + * NotAfter: 证书过期时间 + * + * @param int $notAfter + */ + public function setNotAfter($notAfter) + { + $this->set("NotAfter", $notAfter); + } } diff --git a/src/ULB/Models/ULBSet.php b/src/ULB/Models/ULBSet.php index b043e71f..74ab0c80 100644 --- a/src/ULB/Models/ULBSet.php +++ b/src/ULB/Models/ULBSet.php @@ -1,6 +1,6 @@ set("IPVersion", $ipVersion); } + /** + * SnatIps: ULB后向代理IP,仅当有代理IP时返回否 + * + * @return string[]|null + */ + public function getSnatIps() + { + return $this->get("SnatIps"); + } + + /** + * SnatIps: ULB后向代理IP,仅当有代理IP时返回否 + * + * @param string[] $snatIps + */ + public function setSnatIps(array $snatIps) + { + $this->set("SnatIps", $snatIps); + } + /** * ListenType: ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发;Comprehensive,兼容型;Pending,未定型 * diff --git a/src/ULB/Models/ULBSimpleSet.php b/src/ULB/Models/ULBSimpleSet.php index abae97fa..ea468ba8 100644 --- a/src/ULB/Models/ULBSimpleSet.php +++ b/src/ULB/Models/ULBSimpleSet.php @@ -1,6 +1,6 @@ set("IPVersion", $ipVersion); } + /** + * SnatIps: ULB后向代理IP,仅当有代理IP时返回否 + * + * @return string[]|null + */ + public function getSnatIps() + { + return $this->get("SnatIps"); + } + + /** + * SnatIps: ULB后向代理IP,仅当有代理IP时返回否 + * + * @param string[] $snatIps + */ + public function setSnatIps(array $snatIps) + { + $this->set("SnatIps", $snatIps); + } + /** * ULBId: 负载均衡的资源ID * @@ -425,4 +445,24 @@ public function setLogSet(array $logSet) { $this->set("LogSet", $logSet->getAll()); } + + /** + * WAFMode: WAF功能状态,枚举类型:Unavailable:无法创建WAF;NoWAF:未绑定WAF;Intranet:内网回源Waf;Extranet:外网回源Waf + * + * @return string|null + */ + public function getWAFMode() + { + return $this->get("WAFMode"); + } + + /** + * WAFMode: WAF功能状态,枚举类型:Unavailable:无法创建WAF;NoWAF:未绑定WAF;Intranet:内网回源Waf;Extranet:外网回源Waf + * + * @param string $wafMode + */ + public function setWAFMode($wafMode) + { + $this->set("WAFMode", $wafMode); + } } diff --git a/src/ULB/Models/ULBVServerSet.php b/src/ULB/Models/ULBVServerSet.php index bf0842cd..99d4ac53 100644 --- a/src/ULB/Models/ULBVServerSet.php +++ b/src/ULB/Models/ULBVServerSet.php @@ -1,6 +1,6 @@ set("MonitorType", $monitorType); } + /** + * PersistenceType: VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 + * + * @return string|null + */ + public function getPersistenceType() + { + return $this->get("PersistenceType"); + } + + /** + * PersistenceType: VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 + * + * @param string $persistenceType + */ + public function setPersistenceType($persistenceType) + { + $this->set("PersistenceType", $persistenceType); + } + /** * ULBId: 负载均衡实例的Id * @@ -242,26 +262,6 @@ public function setMethod($method) $this->set("Method", $method); } - /** - * PersistenceType: VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 - * - * @return string|null - */ - public function getPersistenceType() - { - return $this->get("PersistenceType"); - } - - /** - * PersistenceType: VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 - * - * @param string $persistenceType - */ - public function setPersistenceType($persistenceType) - { - $this->set("PersistenceType", $persistenceType); - } - /** * PersistenceInfo: 根据PersistenceType确定: None或ServerInsert,此字段为空; UserDefined,此字段展示用户自定义会话string。 * @@ -437,4 +437,84 @@ public function setPolicySet(array $policySet) } return $result; } + + /** + * EnableCompression: 数据压缩开关,0:关闭 1:开启 + * + * @return integer|null + */ + public function getEnableCompression() + { + return $this->get("EnableCompression"); + } + + /** + * EnableCompression: 数据压缩开关,0:关闭 1:开启 + * + * @param int $enableCompression + */ + public function setEnableCompression($enableCompression) + { + $this->set("EnableCompression", $enableCompression); + } + + /** + * SecurityPolicy: VServer绑定的安全策略,具体结构见BindSecurityPolicy + * + * @return BindSecurityPolicy|null + */ + public function getSecurityPolicy() + { + return new BindSecurityPolicy($this->get("SecurityPolicy")); + } + + /** + * SecurityPolicy: VServer绑定的安全策略,具体结构见BindSecurityPolicy + * + * @param BindSecurityPolicy $securityPolicy + */ + public function setSecurityPolicy(array $securityPolicy) + { + $this->set("SecurityPolicy", $securityPolicy->getAll()); + } + + /** + * ForwardPort: 重定向端口,取值范围[0-65535];默认值为0,代表关闭;仅HTTP协议支持开启重定向功能 + * + * @return integer|null + */ + public function getForwardPort() + { + return $this->get("ForwardPort"); + } + + /** + * ForwardPort: 重定向端口,取值范围[0-65535];默认值为0,代表关闭;仅HTTP协议支持开启重定向功能 + * + * @param int $forwardPort + */ + public function setForwardPort($forwardPort) + { + $this->set("ForwardPort", $forwardPort); + } + + /** + * EnableHTTP2: 0:关闭 1:开启,用于开启http2功能;默认值为0 + * + * @return integer|null + */ + public function getEnableHTTP2() + { + return $this->get("EnableHTTP2"); + } + + /** + * EnableHTTP2: 0:关闭 1:开启,用于开启http2功能;默认值为0 + * + * @param int $enableHTTP2 + */ + public function setEnableHTTP2($enableHTTP2) + { + $this->set("EnableHTTP2", $enableHTTP2); + } } diff --git a/src/ULB/Params/AddTargetsParamTargets.php b/src/ULB/Params/AddTargetsParamTargets.php new file mode 100644 index 00000000..1d1f3be8 --- /dev/null +++ b/src/ULB/Params/AddTargetsParamTargets.php @@ -0,0 +1,204 @@ +get("ResourceType"); + } + + /** + * ResourceType: 服务节点的类型。限定枚举值:"UHost" / "UNI"/"UPM"/"IP",默认值:"UHost";非IP类型,如果该资源有多个IP,将只能添加主IP;非IP类型,展示时,会显示相关资源信息,IP类型只展示IP信息。在相关资源被删除时,非IP类型会把相关资源从lb中剔除,IP类型不保证这个逻辑 + * + * @param string $resourceType + */ + public function setResourceType($resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * ResourceId: 服务节点的资源ID。在非IP类型时,必传 + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 服务节点的资源ID。在非IP类型时,必传 + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * VPCId: 服务节点的VPC资源ID。在IP类型时,必传 + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: 服务节点的VPC资源ID。在IP类型时,必传 + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 服务节点的子网资源ID。在IP类型时,必传 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 服务节点的子网资源ID。在IP类型时,必传 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * ResourceIP: 服务节点的IP。在IP类型时,必传 + * + * @return string|null + */ + public function getResourceIP() + { + return $this->get("ResourceIP"); + } + + /** + * ResourceIP: 服务节点的IP。在IP类型时,必传 + * + * @param string $resourceIP + */ + public function setResourceIP($resourceIP) + { + $this->set("ResourceIP", $resourceIP); + } + + /** + * Port: 服务节点的端口。限定取值:[1-65535],默认值80 + * + * @return integer|null + */ + public function getPort() + { + return $this->get("Port"); + } + + /** + * Port: 服务节点的端口。限定取值:[1-65535],默认值80 + * + * @param int $port + */ + public function setPort($port) + { + $this->set("Port", $port); + } + + /** + * Weight: 服务节点的权重。限定取值:[1-100],默认值1;仅在加权轮询算法时有效 + * + * @return integer|null + */ + public function getWeight() + { + return $this->get("Weight"); + } + + /** + * Weight: 服务节点的权重。限定取值:[1-100],默认值1;仅在加权轮询算法时有效 + * + * @param int $weight + */ + public function setWeight($weight) + { + $this->set("Weight", $weight); + } + + /** + * Enabled: 服务节点是否启用。默认值true + * + * @return boolean|null + */ + public function getEnabled() + { + return $this->get("Enabled"); + } + + /** + * Enabled: 服务节点是否启用。默认值true + * + * @param boolean $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * IsBackup: 服务节点是否为备节点。默认值false + * + * @return boolean|null + */ + public function getIsBackup() + { + return $this->get("IsBackup"); + } + + /** + * IsBackup: 服务节点是否为备节点。默认值false + * + * @param boolean $isBackup + */ + public function setIsBackup($isBackup) + { + $this->set("IsBackup", $isBackup); + } +} diff --git a/src/ULB/Params/CreateListenerParamHealthCheckConfig.php b/src/ULB/Params/CreateListenerParamHealthCheckConfig.php new file mode 100644 index 00000000..16ff3376 --- /dev/null +++ b/src/ULB/Params/CreateListenerParamHealthCheckConfig.php @@ -0,0 +1,144 @@ +get("Enabled"); + } + + /** + * Enabled: 是否开启健康检查功能。暂时不支持关闭。默认值为:true + * + * @param boolean $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * Type: 健康检查方式。应用型限定取值:“Port”/"HTTP/GRPC",默认值:“Port” + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 健康检查方式。应用型限定取值:“Port”/"HTTP/GRPC",默认值:“Port” + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Domain: (应用型专用)HTTP检查域名 + * + * @return string|null + */ + public function getDomain() + { + return $this->get("Domain"); + } + + /** + * Domain: (应用型专用)HTTP检查域名 + * + * @param string $domain + */ + public function setDomain($domain) + { + $this->set("Domain", $domain); + } + + /** + * Path: (应用型专用)HTTP检查路径 + * + * @return string|null + */ + public function getPath() + { + return $this->get("Path"); + } + + /** + * Path: (应用型专用)HTTP检查路径 + * + * @param string $path + */ + public function setPath($path) + { + $this->set("Path", $path); + } + + /** + * Method: (应用型专用)HTTP检查方法。只支持GET和HEAD。 + * + * @return string|null + */ + public function getMethod() + { + return $this->get("Method"); + } + + /** + * Method: (应用型专用)HTTP检查方法。只支持GET和HEAD。 + * + * @param string $method + */ + public function setMethod($method) + { + $this->set("Method", $method); + } + + /** + * ResponseCode: (应用型专用)GRPC检查响应码 + * + * @return string|null + */ + public function getResponseCode() + { + return $this->get("ResponseCode"); + } + + /** + * ResponseCode: (应用型专用)GRPC检查响应码 + * + * @param string $responseCode + */ + public function setResponseCode($responseCode) + { + $this->set("ResponseCode", $responseCode); + } +} diff --git a/src/ULB/Params/CreateListenerParamStickinessConfig.php b/src/ULB/Params/CreateListenerParamStickinessConfig.php new file mode 100644 index 00000000..457e4f2c --- /dev/null +++ b/src/ULB/Params/CreateListenerParamStickinessConfig.php @@ -0,0 +1,84 @@ +get("Enabled"); + } + + /** + * Enabled: 是否开启会话保持功能。应用型负载均衡实例基于Cookie实现;默认值为:false + * + * @param boolean $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * Type: (应用型专用)Cookie处理方式。限定枚举值:"ServerInsert" / "UserDefined";默认值为:“ServerInsert” + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: (应用型专用)Cookie处理方式。限定枚举值:"ServerInsert" / "UserDefined";默认值为:“ServerInsert” + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * CookieName: (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效;限定字符长度:[0-255] + * + * @return string|null + */ + public function getCookieName() + { + return $this->get("CookieName"); + } + + /** + * CookieName: (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效;限定字符长度:[0-255] + * + * @param string $cookieName + */ + public function setCookieName($cookieName) + { + $this->set("CookieName", $cookieName); + } +} diff --git a/src/ULB/Params/CreateLoadBalancerParamLabelInfos.php b/src/ULB/Params/CreateLoadBalancerParamLabelInfos.php new file mode 100644 index 00000000..f8727644 --- /dev/null +++ b/src/ULB/Params/CreateLoadBalancerParamLabelInfos.php @@ -0,0 +1,64 @@ +get("Key"); + } + + /** + * Key: 标签键 + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: 标签值 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 标签值 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/ULB/Params/CreateLoadBalancerParamSecGroups.php b/src/ULB/Params/CreateLoadBalancerParamSecGroups.php new file mode 100644 index 00000000..7d92553c --- /dev/null +++ b/src/ULB/Params/CreateLoadBalancerParamSecGroups.php @@ -0,0 +1,64 @@ +get("SecGroupId"); + } + + /** + * SecGroupId: 安全组id + * + * @param string $secGroupId + */ + public function setSecGroupId($secGroupId) + { + $this->set("SecGroupId", $secGroupId); + } + + /** + * Priority: 安全组优先级 + * + * @return integer|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 安全组优先级 + * + * @param int $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } +} diff --git a/src/ULB/Params/CreateRuleParamRuleActions.php b/src/ULB/Params/CreateRuleParamRuleActions.php new file mode 100644 index 00000000..b8159566 --- /dev/null +++ b/src/ULB/Params/CreateRuleParamRuleActions.php @@ -0,0 +1,164 @@ +get("Type"); + } + + /** + * Type: 动作类型。限定枚举值:"Forward"、"InsertHeader"、"Cors"、"FixedResponse"、"RemoveHeader"。只会处理 Type 对应的结构体。 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * ForwardConfig: + * + * @return CreateRuleParamRuleActionsForwardConfig|null + */ + public function getForwardConfig() + { + return new CreateRuleParamRuleActionsForwardConfig($this->get("ForwardConfig")); + } + + /** + * ForwardConfig: + * + * @param CreateRuleParamRuleActionsForwardConfig $forwardConfig + */ + public function setForwardConfig(array $forwardConfig) + { + $this->set("ForwardConfig", $forwardConfig->getAll()); + } + + /** + * Order: 转发规则动作执行的顺序,取值为1~1000,按值从小到大执行动作。值不能为空,不能重复。Forward、FixedResponse 类型的动作不判断 Order,最后一个执行 + * + * @return integer|null + */ + public function getOrder() + { + return $this->get("Order"); + } + + /** + * Order: 转发规则动作执行的顺序,取值为1~1000,按值从小到大执行动作。值不能为空,不能重复。Forward、FixedResponse 类型的动作不判断 Order,最后一个执行 + * + * @param int $order + */ + public function setOrder($order) + { + $this->set("Order", $order); + } + + /** + * InsertHeaderConfig: + * + * @return CreateRuleParamRuleActionsInsertHeaderConfig|null + */ + public function getInsertHeaderConfig() + { + return new CreateRuleParamRuleActionsInsertHeaderConfig($this->get("InsertHeaderConfig")); + } + + /** + * InsertHeaderConfig: + * + * @param CreateRuleParamRuleActionsInsertHeaderConfig $insertHeaderConfig + */ + public function setInsertHeaderConfig(array $insertHeaderConfig) + { + $this->set("InsertHeaderConfig", $insertHeaderConfig->getAll()); + } + + /** + * RemoveHeaderConfig: + * + * @return CreateRuleParamRuleActionsRemoveHeaderConfig|null + */ + public function getRemoveHeaderConfig() + { + return new CreateRuleParamRuleActionsRemoveHeaderConfig($this->get("RemoveHeaderConfig")); + } + + /** + * RemoveHeaderConfig: + * + * @param CreateRuleParamRuleActionsRemoveHeaderConfig $removeHeaderConfig + */ + public function setRemoveHeaderConfig(array $removeHeaderConfig) + { + $this->set("RemoveHeaderConfig", $removeHeaderConfig->getAll()); + } + + /** + * CorsConfig: + * + * @return CreateRuleParamRuleActionsCorsConfig|null + */ + public function getCorsConfig() + { + return new CreateRuleParamRuleActionsCorsConfig($this->get("CorsConfig")); + } + + /** + * CorsConfig: + * + * @param CreateRuleParamRuleActionsCorsConfig $corsConfig + */ + public function setCorsConfig(array $corsConfig) + { + $this->set("CorsConfig", $corsConfig->getAll()); + } + + /** + * FixedResponseConfig: + * + * @return CreateRuleParamRuleActionsFixedResponseConfig|null + */ + public function getFixedResponseConfig() + { + return new CreateRuleParamRuleActionsFixedResponseConfig($this->get("FixedResponseConfig")); + } + + /** + * FixedResponseConfig: + * + * @param CreateRuleParamRuleActionsFixedResponseConfig $fixedResponseConfig + */ + public function setFixedResponseConfig(array $fixedResponseConfig) + { + $this->set("FixedResponseConfig", $fixedResponseConfig->getAll()); + } +} diff --git a/src/ULB/Params/CreateRuleParamRuleActionsCorsConfig.php b/src/ULB/Params/CreateRuleParamRuleActionsCorsConfig.php new file mode 100644 index 00000000..18736758 --- /dev/null +++ b/src/ULB/Params/CreateRuleParamRuleActionsCorsConfig.php @@ -0,0 +1,144 @@ +get("AllowOrigin"); + } + + /** + * AllowOrigin: 允许的访问来源列表。支持只配置一个元素*,或配置一个或多个值。单个值必须以http://或者https://开头,后边加一个正确的域名或一级泛域名。(例:http://*.test.abc.example.com)单个值可以不加端口,也可以指定端口,端口范围:1~65535。最多支持5个值 + * + * @param string[] $allowOrigin + */ + public function setAllowOrigin(array $allowOrigin) + { + $this->set("AllowOrigin", $allowOrigin); + } + + /** + * AllowHeaders: 允许跨域的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * + * @return string[]|null + */ + public function getAllowHeaders() + { + return $this->get("AllowHeaders"); + } + + /** + * AllowHeaders: 允许跨域的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * + * @param string[] $allowHeaders + */ + public function setAllowHeaders(array $allowHeaders) + { + $this->set("AllowHeaders", $allowHeaders); + } + + /** + * ExposeHeaders: 允许暴露的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * + * @return string[]|null + */ + public function getExposeHeaders() + { + return $this->get("ExposeHeaders"); + } + + /** + * ExposeHeaders: 允许暴露的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * + * @param string[] $exposeHeaders + */ + public function setExposeHeaders(array $exposeHeaders) + { + $this->set("ExposeHeaders", $exposeHeaders); + } + + /** + * AllowMethods: 选择跨域访问时允许的 HTTP 方法。取值:GET。POST。PUT。DELETE。HEAD。OPTIONS。PATCH。 + * + * @return string[]|null + */ + public function getAllowMethods() + { + return $this->get("AllowMethods"); + } + + /** + * AllowMethods: 选择跨域访问时允许的 HTTP 方法。取值:GET。POST。PUT。DELETE。HEAD。OPTIONS。PATCH。 + * + * @param string[] $allowMethods + */ + public function setAllowMethods(array $allowMethods) + { + $this->set("AllowMethods", $allowMethods); + } + + /** + * AllowCredentials: 是否允许携带凭证信息。取值:on:是。off:否。 + * + * @return string|null + */ + public function getAllowCredentials() + { + return $this->get("AllowCredentials"); + } + + /** + * AllowCredentials: 是否允许携带凭证信息。取值:on:是。off:否。 + * + * @param string $allowCredentials + */ + public function setAllowCredentials($allowCredentials) + { + $this->set("AllowCredentials", $allowCredentials); + } + + /** + * MaxAge: 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 + * + * @return integer|null + */ + public function getMaxAge() + { + return $this->get("MaxAge"); + } + + /** + * MaxAge: 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 + * + * @param int $maxAge + */ + public function setMaxAge($maxAge) + { + $this->set("MaxAge", $maxAge); + } +} diff --git a/src/ULB/Params/CreateRuleParamRuleActionsFixedResponseConfig.php b/src/ULB/Params/CreateRuleParamRuleActionsFixedResponseConfig.php new file mode 100644 index 00000000..4aff90e5 --- /dev/null +++ b/src/ULB/Params/CreateRuleParamRuleActionsFixedResponseConfig.php @@ -0,0 +1,64 @@ +get("HttpCode"); + } + + /** + * HttpCode: 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 + * + * @param int $httpCode + */ + public function setHttpCode($httpCode) + { + $this->set("HttpCode", $httpCode); + } + + /** + * Content: 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + * + * @return string|null + */ + public function getContent() + { + return $this->get("Content"); + } + + /** + * Content: 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + * + * @param string $content + */ + public function setContent($content) + { + $this->set("Content", $content); + } +} diff --git a/src/ULB/Params/CreateRuleParamRuleActionsForwardConfig.php b/src/ULB/Params/CreateRuleParamRuleActionsForwardConfig.php new file mode 100644 index 00000000..e1f63a63 --- /dev/null +++ b/src/ULB/Params/CreateRuleParamRuleActionsForwardConfig.php @@ -0,0 +1,56 @@ +get("Targets"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateRuleParamRuleActionsForwardConfigTargets($item)); + } + return $result; + } + + /** + * Targets: + * + * @param CreateRuleParamRuleActionsForwardConfigTargets[] $targets + */ + public function setTargets(array $targets) + { + $result = []; + foreach ($targets as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Params/CreateRuleParamRuleActionsForwardConfigTargets.php b/src/ULB/Params/CreateRuleParamRuleActionsForwardConfigTargets.php new file mode 100644 index 00000000..5cf819aa --- /dev/null +++ b/src/ULB/Params/CreateRuleParamRuleActionsForwardConfigTargets.php @@ -0,0 +1,64 @@ +get("Id"); + } + + /** + * Id: 转发的后端服务节点的标识ID。限定在监听器的服务节点池里;数组长度可以是0;转发服务节点配置的数组长度不为0时,Id必填 + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Weight: 转发的后端服务节点的权重。仅监听器负载均衡算法是加权轮询是有效 + * + * @return integer|null + */ + public function getWeight() + { + return $this->get("Weight"); + } + + /** + * Weight: 转发的后端服务节点的权重。仅监听器负载均衡算法是加权轮询是有效 + * + * @param int $weight + */ + public function setWeight($weight) + { + $this->set("Weight", $weight); + } +} diff --git a/src/ULB/Params/CreateRuleParamRuleActionsInsertHeaderConfig.php b/src/ULB/Params/CreateRuleParamRuleActionsInsertHeaderConfig.php new file mode 100644 index 00000000..bc262709 --- /dev/null +++ b/src/ULB/Params/CreateRuleParamRuleActionsInsertHeaderConfig.php @@ -0,0 +1,84 @@ +get("Key"); + } + + /** + * Key: 插入的 header 字段名称,长度为 1~40 个字符,支持大小写字母 a~z、数字、下划线(_)和短划线(-)。头字段名称不能重复用于InsertHeader中。header 字段不能使用以下(此处判断大小写不敏感)x-real-ip、x-forwarded-for、x-forwarded-proto、x-forwarded-srcport、ucloud-alb-trace、connection、upgrade、content-length、transfer-encoding、keep-alive、te、host、cookie、remoteip、authority + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * ValueType: 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 + * + * @return string|null + */ + public function getValueType() + { + return $this->get("ValueType"); + } + + /** + * ValueType: 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 + * + * @param string $valueType + */ + public function setValueType($valueType) + { + $this->set("ValueType", $valueType); + } + + /** + * Value: 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/ULB/Params/CreateRuleParamRuleActionsRemoveHeaderConfig.php b/src/ULB/Params/CreateRuleParamRuleActionsRemoveHeaderConfig.php new file mode 100644 index 00000000..b2593d6a --- /dev/null +++ b/src/ULB/Params/CreateRuleParamRuleActionsRemoveHeaderConfig.php @@ -0,0 +1,44 @@ +get("Key"); + } + + /** + * Key: 删除的 header 字段名称,目前只能删除以下几个默认配置的字段X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } +} diff --git a/src/ULB/Params/CreateRuleParamRuleConditions.php b/src/ULB/Params/CreateRuleParamRuleConditions.php new file mode 100644 index 00000000..31f5b13c --- /dev/null +++ b/src/ULB/Params/CreateRuleParamRuleConditions.php @@ -0,0 +1,84 @@ +get("Type"); + } + + /** + * Type: 匹配条件类型。限定枚举值:"Host"/"Path" + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * HostConfig: + * + * @return CreateRuleParamRuleConditionsHostConfig|null + */ + public function getHostConfig() + { + return new CreateRuleParamRuleConditionsHostConfig($this->get("HostConfig")); + } + + /** + * HostConfig: + * + * @param CreateRuleParamRuleConditionsHostConfig $hostConfig + */ + public function setHostConfig(array $hostConfig) + { + $this->set("HostConfig", $hostConfig->getAll()); + } + + /** + * PathConfig: + * + * @return CreateRuleParamRuleConditionsPathConfig|null + */ + public function getPathConfig() + { + return new CreateRuleParamRuleConditionsPathConfig($this->get("PathConfig")); + } + + /** + * PathConfig: + * + * @param CreateRuleParamRuleConditionsPathConfig $pathConfig + */ + public function setPathConfig(array $pathConfig) + { + $this->set("PathConfig", $pathConfig->getAll()); + } +} diff --git a/src/ULB/Params/CreateRuleParamRuleConditionsHostConfig.php b/src/ULB/Params/CreateRuleParamRuleConditionsHostConfig.php new file mode 100644 index 00000000..41db2e7f --- /dev/null +++ b/src/ULB/Params/CreateRuleParamRuleConditionsHostConfig.php @@ -0,0 +1,64 @@ +get("MatchMode"); + } + + /** + * MatchMode: 匹配方式。限定枚举值:"Regular"/"Wildcard",默认值:"Regular" + * + * @param string $matchMode + */ + public function setMatchMode($matchMode) + { + $this->set("MatchMode", $matchMode); + } + + /** + * Values: 取值。暂时只支持数组长度为1;取值需符合相关匹配方式的条件;域名匹配时必填 + * + * @return string[]|null + */ + public function getValues() + { + return $this->get("Values"); + } + + /** + * Values: 取值。暂时只支持数组长度为1;取值需符合相关匹配方式的条件;域名匹配时必填 + * + * @param string[] $values + */ + public function setValues(array $values) + { + $this->set("Values", $values); + } +} diff --git a/src/ULB/Params/CreateRuleParamRuleConditionsPathConfig.php b/src/ULB/Params/CreateRuleParamRuleConditionsPathConfig.php new file mode 100644 index 00000000..becff5eb --- /dev/null +++ b/src/ULB/Params/CreateRuleParamRuleConditionsPathConfig.php @@ -0,0 +1,44 @@ +get("Values"); + } + + /** + * Values: 取值。暂时只支持数组长度为1;取值需符合相关条件;路径匹配时必填 + * + * @param string[] $values + */ + public function setValues(array $values) + { + $this->set("Values", $values); + } +} diff --git a/src/ULB/Params/UpdateBackendBatchParamAttributes.php b/src/ULB/Params/UpdateBackendBatchParamAttributes.php new file mode 100644 index 00000000..e712fb40 --- /dev/null +++ b/src/ULB/Params/UpdateBackendBatchParamAttributes.php @@ -0,0 +1,124 @@ +get("BackendId"); + } + + /** + * BackendId: 后端资源实例的ID(ULB后端ID,非资源自身ID) + * + * @param string $backendId + */ + public function setBackendId($backendId) + { + $this->set("BackendId", $backendId); + } + + /** + * Port: 后端资源服务端口,取值范围[1-65535] + * + * @return integer|null + */ + public function getPort() + { + return $this->get("Port"); + } + + /** + * Port: 后端资源服务端口,取值范围[1-65535] + * + * @param int $port + */ + public function setPort($port) + { + $this->set("Port", $port); + } + + /** + * Weight: 所添加的后端RS权重(在加权轮询算法下有效),取值范围[0-100],默认为1 + * + * @return integer|null + */ + public function getWeight() + { + return $this->get("Weight"); + } + + /** + * Weight: 所添加的后端RS权重(在加权轮询算法下有效),取值范围[0-100],默认为1 + * + * @param int $weight + */ + public function setWeight($weight) + { + $this->set("Weight", $weight); + } + + /** + * Enabled: 后端实例状态开关 + * + * @return integer|null + */ + public function getEnabled() + { + return $this->get("Enabled"); + } + + /** + * Enabled: 后端实例状态开关 + * + * @param int $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * IsBackup: 是否为backup 0:主rs 1:备rs 默认为0 + * + * @return integer|null + */ + public function getIsBackup() + { + return $this->get("IsBackup"); + } + + /** + * IsBackup: 是否为backup 0:主rs 1:备rs 默认为0 + * + * @param int $isBackup + */ + public function setIsBackup($isBackup) + { + $this->set("IsBackup", $isBackup); + } +} diff --git a/src/ULB/Params/UpdateListenerAttributeParamHealthCheckConfig.php b/src/ULB/Params/UpdateListenerAttributeParamHealthCheckConfig.php new file mode 100644 index 00000000..d867b8a2 --- /dev/null +++ b/src/ULB/Params/UpdateListenerAttributeParamHealthCheckConfig.php @@ -0,0 +1,144 @@ +get("Enabled"); + } + + /** + * Enabled: 是否开启健康检查功能。暂时不支持关闭;默认值为:true + * + * @param boolean $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * Type: 健康检查方式。应用型限定取值:“Port”/"HTTP";默认值:“Port” + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 健康检查方式。应用型限定取值:“Port”/"HTTP";默认值:“Port” + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Domain: (应用型专用)HTTP检查域名 + * + * @return string|null + */ + public function getDomain() + { + return $this->get("Domain"); + } + + /** + * Domain: (应用型专用)HTTP检查域名 + * + * @param string $domain + */ + public function setDomain($domain) + { + $this->set("Domain", $domain); + } + + /** + * Path: (应用型专用)HTTP检查路径 + * + * @return string|null + */ + public function getPath() + { + return $this->get("Path"); + } + + /** + * Path: (应用型专用)HTTP检查路径 + * + * @param string $path + */ + public function setPath($path) + { + $this->set("Path", $path); + } + + /** + * Method: (应用型专用)HTTP检查方法。只支持GET和HEAD。 + * + * @return string|null + */ + public function getMethod() + { + return $this->get("Method"); + } + + /** + * Method: (应用型专用)HTTP检查方法。只支持GET和HEAD。 + * + * @param string $method + */ + public function setMethod($method) + { + $this->set("Method", $method); + } + + /** + * ResponseCode: (应用型专用)GRPC检查响应码 + * + * @return string|null + */ + public function getResponseCode() + { + return $this->get("ResponseCode"); + } + + /** + * ResponseCode: (应用型专用)GRPC检查响应码 + * + * @param string $responseCode + */ + public function setResponseCode($responseCode) + { + $this->set("ResponseCode", $responseCode); + } +} diff --git a/src/ULB/Params/UpdateListenerAttributeParamStickinessConfig.php b/src/ULB/Params/UpdateListenerAttributeParamStickinessConfig.php new file mode 100644 index 00000000..969e0c0c --- /dev/null +++ b/src/ULB/Params/UpdateListenerAttributeParamStickinessConfig.php @@ -0,0 +1,84 @@ +get("Enabled"); + } + + /** + * Enabled: 是否开启会话保持功能。应用型负载均衡实例基于Cookie实现,网络型负载均衡则基于源IP,保证在对应的空闲超时时间内,同一个源IP送到同一个服务节点。默认值为:false + * + * @param boolean $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * Type: (应用型专用)Cookie处理方式。限定枚举值:"ServerInsert" / "UserDefined",不传值则不修改 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: (应用型专用)Cookie处理方式。限定枚举值:"ServerInsert" / "UserDefined",不传值则不修改 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * CookieName: (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效;限定字符长度:[0-255] + * + * @return string|null + */ + public function getCookieName() + { + return $this->get("CookieName"); + } + + /** + * CookieName: (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效;限定字符长度:[0-255] + * + * @param string $cookieName + */ + public function setCookieName($cookieName) + { + $this->set("CookieName", $cookieName); + } +} diff --git a/src/ULB/Params/UpdateLoadBalancerAttributeParamAccessLogConfig.php b/src/ULB/Params/UpdateLoadBalancerAttributeParamAccessLogConfig.php new file mode 100644 index 00000000..8882b4b6 --- /dev/null +++ b/src/ULB/Params/UpdateLoadBalancerAttributeParamAccessLogConfig.php @@ -0,0 +1,84 @@ +get("Enabled"); + } + + /** + * Enabled: (应用型专用)是否开启访问日志记录功能 + * + * @param boolean $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * US3BucketName: (应用型专用)用于存储访问日志的bucket + * + * @return string|null + */ + public function getUS3BucketName() + { + return $this->get("US3BucketName"); + } + + /** + * US3BucketName: (应用型专用)用于存储访问日志的bucket + * + * @param string $us3BucketName + */ + public function setUS3BucketName($us3BucketName) + { + $this->set("US3BucketName", $us3BucketName); + } + + /** + * US3TokenId: (应用型专用)上传访问日志到bucket所需的token + * + * @return string|null + */ + public function getUS3TokenId() + { + return $this->get("US3TokenId"); + } + + /** + * US3TokenId: (应用型专用)上传访问日志到bucket所需的token + * + * @param string $us3TokenId + */ + public function setUS3TokenId($us3TokenId) + { + $this->set("US3TokenId", $us3TokenId); + } +} diff --git a/src/ULB/Params/UpdateRuleAttributeParamRuleActions.php b/src/ULB/Params/UpdateRuleAttributeParamRuleActions.php new file mode 100644 index 00000000..949491f7 --- /dev/null +++ b/src/ULB/Params/UpdateRuleAttributeParamRuleActions.php @@ -0,0 +1,164 @@ +get("Type"); + } + + /** + * Type: 动作类型。限定枚举值:"Forward";RuleActions数组长度不为0时必填 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * ForwardConfig: + * + * @return UpdateRuleAttributeParamRuleActionsForwardConfig|null + */ + public function getForwardConfig() + { + return new UpdateRuleAttributeParamRuleActionsForwardConfig($this->get("ForwardConfig")); + } + + /** + * ForwardConfig: + * + * @param UpdateRuleAttributeParamRuleActionsForwardConfig $forwardConfig + */ + public function setForwardConfig(array $forwardConfig) + { + $this->set("ForwardConfig", $forwardConfig->getAll()); + } + + /** + * Order: 转发规则动作执行的顺序,取值为1~1000,按值从小到大执行动作。值不能为空,不能重复。Forward、FixedResponse 类型的动作不判断 Order,最后一个执行 + * + * @return integer|null + */ + public function getOrder() + { + return $this->get("Order"); + } + + /** + * Order: 转发规则动作执行的顺序,取值为1~1000,按值从小到大执行动作。值不能为空,不能重复。Forward、FixedResponse 类型的动作不判断 Order,最后一个执行 + * + * @param int $order + */ + public function setOrder($order) + { + $this->set("Order", $order); + } + + /** + * InsertHeaderConfig: + * + * @return UpdateRuleAttributeParamRuleActionsInsertHeaderConfig|null + */ + public function getInsertHeaderConfig() + { + return new UpdateRuleAttributeParamRuleActionsInsertHeaderConfig($this->get("InsertHeaderConfig")); + } + + /** + * InsertHeaderConfig: + * + * @param UpdateRuleAttributeParamRuleActionsInsertHeaderConfig $insertHeaderConfig + */ + public function setInsertHeaderConfig(array $insertHeaderConfig) + { + $this->set("InsertHeaderConfig", $insertHeaderConfig->getAll()); + } + + /** + * RemoveHeaderConfig: + * + * @return UpdateRuleAttributeParamRuleActionsRemoveHeaderConfig|null + */ + public function getRemoveHeaderConfig() + { + return new UpdateRuleAttributeParamRuleActionsRemoveHeaderConfig($this->get("RemoveHeaderConfig")); + } + + /** + * RemoveHeaderConfig: + * + * @param UpdateRuleAttributeParamRuleActionsRemoveHeaderConfig $removeHeaderConfig + */ + public function setRemoveHeaderConfig(array $removeHeaderConfig) + { + $this->set("RemoveHeaderConfig", $removeHeaderConfig->getAll()); + } + + /** + * CorsConfig: + * + * @return UpdateRuleAttributeParamRuleActionsCorsConfig|null + */ + public function getCorsConfig() + { + return new UpdateRuleAttributeParamRuleActionsCorsConfig($this->get("CorsConfig")); + } + + /** + * CorsConfig: + * + * @param UpdateRuleAttributeParamRuleActionsCorsConfig $corsConfig + */ + public function setCorsConfig(array $corsConfig) + { + $this->set("CorsConfig", $corsConfig->getAll()); + } + + /** + * FixedResponseConfig: + * + * @return UpdateRuleAttributeParamRuleActionsFixedResponseConfig|null + */ + public function getFixedResponseConfig() + { + return new UpdateRuleAttributeParamRuleActionsFixedResponseConfig($this->get("FixedResponseConfig")); + } + + /** + * FixedResponseConfig: + * + * @param UpdateRuleAttributeParamRuleActionsFixedResponseConfig $fixedResponseConfig + */ + public function setFixedResponseConfig(array $fixedResponseConfig) + { + $this->set("FixedResponseConfig", $fixedResponseConfig->getAll()); + } +} diff --git a/src/ULB/Params/UpdateRuleAttributeParamRuleActionsCorsConfig.php b/src/ULB/Params/UpdateRuleAttributeParamRuleActionsCorsConfig.php new file mode 100644 index 00000000..e1a1c144 --- /dev/null +++ b/src/ULB/Params/UpdateRuleAttributeParamRuleActionsCorsConfig.php @@ -0,0 +1,144 @@ +get("AllowOrigin"); + } + + /** + * AllowOrigin: 允许的访问来源列表。支持只配置一个元素*,或配置一个或多个值。单个值必须以http://或者https://开头,后边加一个正确的域名或一级泛域名。(例:http://*.test.abc.example.com)单个值可以不加端口,也可以指定端口,端口范围:1~65535。最多支持5个值 + * + * @param string[] $allowOrigin + */ + public function setAllowOrigin(array $allowOrigin) + { + $this->set("AllowOrigin", $allowOrigin); + } + + /** + * AllowHeaders: 允许跨域的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * + * @return string[]|null + */ + public function getAllowHeaders() + { + return $this->get("AllowHeaders"); + } + + /** + * AllowHeaders: 允许跨域的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * + * @param string[] $allowHeaders + */ + public function setAllowHeaders(array $allowHeaders) + { + $this->set("AllowHeaders", $allowHeaders); + } + + /** + * ExposeHeaders: 允许暴露的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * + * @return string[]|null + */ + public function getExposeHeaders() + { + return $this->get("ExposeHeaders"); + } + + /** + * ExposeHeaders: 允许暴露的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * + * @param string[] $exposeHeaders + */ + public function setExposeHeaders(array $exposeHeaders) + { + $this->set("ExposeHeaders", $exposeHeaders); + } + + /** + * AllowMethods: 选择跨域访问时允许的 HTTP 方法。取值:GET。POST。PUT。DELETE。HEAD。OPTIONS。PATCH。 + * + * @return string[]|null + */ + public function getAllowMethods() + { + return $this->get("AllowMethods"); + } + + /** + * AllowMethods: 选择跨域访问时允许的 HTTP 方法。取值:GET。POST。PUT。DELETE。HEAD。OPTIONS。PATCH。 + * + * @param string[] $allowMethods + */ + public function setAllowMethods(array $allowMethods) + { + $this->set("AllowMethods", $allowMethods); + } + + /** + * AllowCredentials: 是否允许携带凭证信息。取值:on:是。off:否。 + * + * @return string|null + */ + public function getAllowCredentials() + { + return $this->get("AllowCredentials"); + } + + /** + * AllowCredentials: 是否允许携带凭证信息。取值:on:是。off:否。 + * + * @param string $allowCredentials + */ + public function setAllowCredentials($allowCredentials) + { + $this->set("AllowCredentials", $allowCredentials); + } + + /** + * MaxAge: 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 + * + * @return integer|null + */ + public function getMaxAge() + { + return $this->get("MaxAge"); + } + + /** + * MaxAge: 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 + * + * @param int $maxAge + */ + public function setMaxAge($maxAge) + { + $this->set("MaxAge", $maxAge); + } +} diff --git a/src/ULB/Params/UpdateRuleAttributeParamRuleActionsFixedResponseConfig.php b/src/ULB/Params/UpdateRuleAttributeParamRuleActionsFixedResponseConfig.php new file mode 100644 index 00000000..be76d43d --- /dev/null +++ b/src/ULB/Params/UpdateRuleAttributeParamRuleActionsFixedResponseConfig.php @@ -0,0 +1,64 @@ +get("HttpCode"); + } + + /** + * HttpCode: 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 + * + * @param int $httpCode + */ + public function setHttpCode($httpCode) + { + $this->set("HttpCode", $httpCode); + } + + /** + * Content: 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + * + * @return string|null + */ + public function getContent() + { + return $this->get("Content"); + } + + /** + * Content: 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + * + * @param string $content + */ + public function setContent($content) + { + $this->set("Content", $content); + } +} diff --git a/src/ULB/Params/UpdateRuleAttributeParamRuleActionsForwardConfig.php b/src/ULB/Params/UpdateRuleAttributeParamRuleActionsForwardConfig.php new file mode 100644 index 00000000..af43d8b3 --- /dev/null +++ b/src/ULB/Params/UpdateRuleAttributeParamRuleActionsForwardConfig.php @@ -0,0 +1,56 @@ +get("Targets"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UpdateRuleAttributeParamRuleActionsForwardConfigTargets($item)); + } + return $result; + } + + /** + * Targets: + * + * @param UpdateRuleAttributeParamRuleActionsForwardConfigTargets[] $targets + */ + public function setTargets(array $targets) + { + $result = []; + foreach ($targets as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Params/UpdateRuleAttributeParamRuleActionsForwardConfigTargets.php b/src/ULB/Params/UpdateRuleAttributeParamRuleActionsForwardConfigTargets.php new file mode 100644 index 00000000..475447e0 --- /dev/null +++ b/src/ULB/Params/UpdateRuleAttributeParamRuleActionsForwardConfigTargets.php @@ -0,0 +1,64 @@ +get("Id"); + } + + /** + * Id: 转发的后端服务节点的标识ID。限定在监听器的服务节点池里;数组长度可以是0;转发服务节点配置的数组长度不为0时,Id必填 + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Weight: 转发的后端服务节点的权重。仅监听器负载均衡算法是加权轮询是有效 + * + * @return integer|null + */ + public function getWeight() + { + return $this->get("Weight"); + } + + /** + * Weight: 转发的后端服务节点的权重。仅监听器负载均衡算法是加权轮询是有效 + * + * @param int $weight + */ + public function setWeight($weight) + { + $this->set("Weight", $weight); + } +} diff --git a/src/ULB/Params/UpdateRuleAttributeParamRuleActionsInsertHeaderConfig.php b/src/ULB/Params/UpdateRuleAttributeParamRuleActionsInsertHeaderConfig.php new file mode 100644 index 00000000..8d20cd29 --- /dev/null +++ b/src/ULB/Params/UpdateRuleAttributeParamRuleActionsInsertHeaderConfig.php @@ -0,0 +1,84 @@ +get("Key"); + } + + /** + * Key: 插入的 header 字段名称,长度为 1~40 个字符,支持大小写字母 a~z、数字、下划线(_)和短划线(-)。头字段名称不能重复用于InsertHeader中。header 字段不能使用以下(此处判断大小写不敏感)x-real-ip、x-forwarded-for、x-forwarded-proto、x-forwarded-srcport、ucloud-alb-trace、connection、upgrade、content-length、transfer-encoding、keep-alive、te、host、cookie、remoteip、authority + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * ValueType: 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 + * + * @return string|null + */ + public function getValueType() + { + return $this->get("ValueType"); + } + + /** + * ValueType: 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 + * + * @param string $valueType + */ + public function setValueType($valueType) + { + $this->set("ValueType", $valueType); + } + + /** + * Value: 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/ULB/Params/UpdateRuleAttributeParamRuleActionsRemoveHeaderConfig.php b/src/ULB/Params/UpdateRuleAttributeParamRuleActionsRemoveHeaderConfig.php new file mode 100644 index 00000000..79d09047 --- /dev/null +++ b/src/ULB/Params/UpdateRuleAttributeParamRuleActionsRemoveHeaderConfig.php @@ -0,0 +1,44 @@ +get("Key"); + } + + /** + * Key: 删除的 header 字段名称,目前只能删除以下几个默认配置的字段X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } +} diff --git a/src/ULB/Params/UpdateRuleAttributeParamRuleConditions.php b/src/ULB/Params/UpdateRuleAttributeParamRuleConditions.php new file mode 100644 index 00000000..8e180491 --- /dev/null +++ b/src/ULB/Params/UpdateRuleAttributeParamRuleConditions.php @@ -0,0 +1,84 @@ +get("Type"); + } + + /** + * Type: 匹配条件类型。限定枚举值:"Host"/"Path";RuleConditions数组长度不为0时必填 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * HostConfig: + * + * @return UpdateRuleAttributeParamRuleConditionsHostConfig|null + */ + public function getHostConfig() + { + return new UpdateRuleAttributeParamRuleConditionsHostConfig($this->get("HostConfig")); + } + + /** + * HostConfig: + * + * @param UpdateRuleAttributeParamRuleConditionsHostConfig $hostConfig + */ + public function setHostConfig(array $hostConfig) + { + $this->set("HostConfig", $hostConfig->getAll()); + } + + /** + * PathConfig: + * + * @return UpdateRuleAttributeParamRuleConditionsPathConfig|null + */ + public function getPathConfig() + { + return new UpdateRuleAttributeParamRuleConditionsPathConfig($this->get("PathConfig")); + } + + /** + * PathConfig: + * + * @param UpdateRuleAttributeParamRuleConditionsPathConfig $pathConfig + */ + public function setPathConfig(array $pathConfig) + { + $this->set("PathConfig", $pathConfig->getAll()); + } +} diff --git a/src/ULB/Params/UpdateRuleAttributeParamRuleConditionsHostConfig.php b/src/ULB/Params/UpdateRuleAttributeParamRuleConditionsHostConfig.php new file mode 100644 index 00000000..03eed03e --- /dev/null +++ b/src/ULB/Params/UpdateRuleAttributeParamRuleConditionsHostConfig.php @@ -0,0 +1,64 @@ +get("MatchMode"); + } + + /** + * MatchMode: 匹配方式。限定枚举值:"Regular"/"Wildcard",默认值:"Regular" + * + * @param string $matchMode + */ + public function setMatchMode($matchMode) + { + $this->set("MatchMode", $matchMode); + } + + /** + * Values: 取值。暂时只支持数组长度为1;取值需符合相关匹配方式的条件;修改域名匹配时必填 + * + * @return string[]|null + */ + public function getValues() + { + return $this->get("Values"); + } + + /** + * Values: 取值。暂时只支持数组长度为1;取值需符合相关匹配方式的条件;修改域名匹配时必填 + * + * @param string[] $values + */ + public function setValues(array $values) + { + $this->set("Values", $values); + } +} diff --git a/src/ULB/Params/UpdateRuleAttributeParamRuleConditionsPathConfig.php b/src/ULB/Params/UpdateRuleAttributeParamRuleConditionsPathConfig.php new file mode 100644 index 00000000..4dd95caa --- /dev/null +++ b/src/ULB/Params/UpdateRuleAttributeParamRuleConditionsPathConfig.php @@ -0,0 +1,44 @@ +get("Values"); + } + + /** + * Values: 取值。暂时只支持数组长度为1;取值需符合相关条件;修改路径匹配时必填 + * + * @param string[] $values + */ + public function setValues(array $values) + { + $this->set("Values", $values); + } +} diff --git a/src/ULB/Params/UpdateTargetsAttributeParamTargets.php b/src/ULB/Params/UpdateTargetsAttributeParamTargets.php new file mode 100644 index 00000000..46df8fd1 --- /dev/null +++ b/src/ULB/Params/UpdateTargetsAttributeParamTargets.php @@ -0,0 +1,104 @@ +get("Id"); + } + + /** + * Id: 服务节点的标识ID。限定枚举值:"UHost" / "UNI"/"UPM"/"IP";要更新的Targets数组长度至少为1,不超过20个 + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Weight: 服务节点的权重。限定取值:[1-100],默认值1;仅在加权轮询算法时有效;要更新的Targets数组长度至少为1,不超过20个 + * + * @return integer|null + */ + public function getWeight() + { + return $this->get("Weight"); + } + + /** + * Weight: 服务节点的权重。限定取值:[1-100],默认值1;仅在加权轮询算法时有效;要更新的Targets数组长度至少为1,不超过20个 + * + * @param int $weight + */ + public function setWeight($weight) + { + $this->set("Weight", $weight); + } + + /** + * Enabled: 服务节点是否启用。默认值true;要更新的Targets数组长度至少为1,不超过20个 + * + * @return boolean|null + */ + public function getEnabled() + { + return $this->get("Enabled"); + } + + /** + * Enabled: 服务节点是否启用。默认值true;要更新的Targets数组长度至少为1,不超过20个 + * + * @param boolean $enabled + */ + public function setEnabled($enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * IsBackup: 服务节点是否为备节点。默认值false;要更新的Targets数组长度至少为1,不超过20个 + * + * @return boolean|null + */ + public function getIsBackup() + { + return $this->get("IsBackup"); + } + + /** + * IsBackup: 服务节点是否为备节点。默认值false;要更新的Targets数组长度至少为1,不超过20个 + * + * @param boolean $isBackup + */ + public function setIsBackup($isBackup) + { + $this->set("IsBackup", $isBackup); + } +} diff --git a/src/ULB/ULBClient.php b/src/ULB/ULBClient.php index 0c7b002b..fc9ecd65 100644 --- a/src/ULB/ULBClient.php +++ b/src/ULB/ULBClient.php @@ -1,6 +1,6 @@ (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 负载均衡实例的ID + * "ListenerId" => (string) 监听器的ID + * "SSLIds" => (array) SSLId的数组 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return AddSSLBindingResponse + * @throws UCloudException + */ + public function addSSLBinding(AddSSLBindingRequest $request = null) + { + $resp = $this->invoke($request); + return new AddSSLBindingResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * AddTargets - 给应用型负载均衡监听器添加后端服务节点 + * + * See also: https://docs.ucloud.cn/api/ulb-api/add_targets + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 负载均衡实例的ID + * "ListenerId" => (string) 监听器的ID + * "Targets" => (array) [ + * [ + * "ResourceType" => (string) 服务节点的类型。限定枚举值:"UHost" / "UNI"/"UPM"/"IP",默认值:"UHost";非IP类型,如果该资源有多个IP,将只能添加主IP;非IP类型,展示时,会显示相关资源信息,IP类型只展示IP信息。在相关资源被删除时,非IP类型会把相关资源从lb中剔除,IP类型不保证这个逻辑 + * "ResourceId" => (string) 服务节点的资源ID。在非IP类型时,必传 + * "VPCId" => (string) 服务节点的VPC资源ID。在IP类型时,必传 + * "SubnetId" => (string) 服务节点的子网资源ID。在IP类型时,必传 + * "ResourceIP" => (string) 服务节点的IP。在IP类型时,必传 + * "Port" => (integer) 服务节点的端口。限定取值:[1-65535],默认值80 + * "Weight" => (integer) 服务节点的权重。限定取值:[1-100],默认值1;仅在加权轮询算法时有效 + * "Enabled" => (boolean) 服务节点是否启用。默认值true + * "IsBackup" => (boolean) 服务节点是否为备节点。默认值false + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * "Targets" => (array) 服务节点信息[ + * [ + * "ResourceType" => (string) 服务节点的类型。限定枚举值:UHost -> 云主机,UNI -> 虚拟网卡,UPM -> 物理云主机,IP -> IP类型; 默认值:"UHost"; 非IP类型,如果该资源有多个IP,将只能添加主IP; 非IP类型,展示时,会显示相关资源信息,IP类型只展示IP信息。 在相关资源被删除时,非IP类型会把相关资源从lb中剔除,IP类型不保证这个逻辑 + * "ResourceId" => (string) 服务节点的资源ID。在非IP类型时,必传 + * "VPCId" => (string) 服务节点的VPC资源ID。在IP类型时,必传 + * "SubnetId" => (string) 服务节点的子网资源ID。在IP类型时,必传 + * "ResourceIP" => (string) 服务节点的IP。在IP类型时,必传 + * "Port" => (integer) 服务节点的端口。限定取值:[1-65535]; 默认值:80 + * "Weight" => (integer) 服务节点的权重。限定取值:[1-100]; 仅在加权轮询算法时有效; 默认值:1 + * "Enabled" => (boolean) 服务节点是否启用。 默认值:true + * "IsBackup" => (boolean) 服务节点是否为备节点。 默认值:false + * "Id" => (string) 服务节点的标识ID。 + * "State" => (string) 服务节点的健康检查状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康 + * ] + * ] + * ] + * + * @return AddTargetsResponse + * @throws UCloudException + */ + public function addTargets(AddTargetsRequest $request = null) + { + $resp = $this->invoke($request); + return new AddTargetsResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * AllocateBackend - 添加CLB后端资源实例 * * See also: https://docs.ucloud.cn/api/ulb-api/allocate_backend * @@ -77,13 +216,13 @@ class ULBClient extends Client * $args = [ * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) - * "ULBId" => (string) 负载均衡实例的ID + * "ULBId" => (string) 传统型负载均衡实例的ID * "VServerId" => (string) VServer实例的ID - * "ResourceType" => (string) 所添加的后端资源的类型,枚举值:UHost -> 云主机;UNI -> 虚拟网卡;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube,USDP->智能大数据平台;默认值为UHost。报文转发模式不支持UDocker、UHybrid、CUBE - * "ResourceId" => (string) 所添加的后端资源的资源ID - * "ResourceIP" => (string) 所添加的后端服务器的资源实例IP,当ResourceType 为 UHybrid 时有效,且必填 - * "VPCId" => (string) 所添加的后端服务器所在的vpc,当ResourceType 为 UHybrid 时有效,且必填 - * "SubnetId" => (string) 所添加的后端服务器所在的子网,当ResourceType 为 UHybrid 时有效,且必填 + * "ResourceType" => (string) 所添加的后端资源的类型,枚举值:UHost -> 云主机;UNI -> 虚拟网卡;UPM -> 物理云主机;UHybrid->混合云主机;CUBE->Cube, IP->IP类型;默认值为UHost。报文转发模式不支持UHybrid、CUBE、IP + * "ResourceId" => (string) 所添加的后端资源的资源ID;与ResourceIP二选一必填 + * "ResourceIP" => (string) 所添加的后端服务器的资源实例IP,当ResourceType 为 UHybrid 或 IP时有效,且必填;与ResourceId二选一必填 + * "VPCId" => (string) 所添加的后端服务器所在的vpc,当ResourceType 为 UHybrid 或 IP 时有效,且必填 + * "SubnetId" => (string) 所添加的后端服务器所在的子网,当ResourceType 为 UHybrid 或 IP 时有效,且必填 * "Port" => (integer) 所添加的后端资源服务端口,取值范围[1-65535],默认80 * "Weight" => (integer) 所添加的后端RS权重(在加权轮询算法下有效),取值范围[1-100],默认为1 * "Enabled" => (integer) 后端实例状态开关,枚举值: 1:启用; 0:禁用 默认为启用 @@ -93,7 +232,7 @@ class ULBClient extends Client * Outputs: * * $outputs = [ - * "BackendId" => (string) 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关),可用于 UpdateBackendAttribute/UpdateBackendAttributeBatch/ReleaseBackend + * "BackendId" => (string) 所添加的后端资源在CLB中的对象ID,(为CLB系统中使用,与资源自身ID无关),可用于 UpdateBackendAttribute/UpdateBackendAttributeBatch/ReleaseBackend * ] * * @return AllocateBackendResponse @@ -106,16 +245,16 @@ public function allocateBackend(AllocateBackendRequest $request = null) } /** - * BindSSL - 将SSL证书绑定到VServer + * BindSSL - 将SSL证书绑定到传统型负载均衡VServer * * See also: https://docs.ucloud.cn/api/ulb-api/bind_ssl * * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - * "ULBId" => (string) 所绑定ULB实例ID + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULBId" => (string) 所绑定CLB实例ID * "VServerId" => (string) 所绑定VServer实例ID * "SSLId" => (string) SSL证书的Id * ] @@ -135,21 +274,124 @@ public function bindSSL(BindSSLRequest $request = null) } /** - * CreatePolicy - 创建VServer内容转发策略 + * CreateListener - 创建一个应用型负载均衡的监听器 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_listener + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 负载均衡实例的ID + * "Name" => (string) 监听器的名称。限定字符长度:[1-255];限定特殊字符,仅支持:“-”,“_”,“.”;默认值:listener + * "Remark" => (string) 监听器的备注信息。限定字符长度:[0-255] + * "ListenerPort" => (integer) 监听器的监听端口。应用型限定取值:[1-65535],默认值80 + * "ListenerProtocol" => (string) 监听协议。应用型限定取值:“HTTP”/"HTTPS",默认值“HTTP” + * "Certificates" => (array) (应用型专用)服务器默认证书ID。仅HTTPS监听支持,且必填;暂时只支持最大长度为1 + * "SecurityPolicyId" => (string) (应用型专用)安全策略组ID。仅HTTPS监听支持绑定;默认值“Default”,表示绑定原生策略 + * "IdleTimeout" => (integer) 连接空闲超时时间。单位:秒。应用型限定取值:[1-86400];默认值60 + * "Scheduler" => (string) 负载均衡算法。应用型限定取值:"Roundrobin"/"Source"/"WeightRoundrobin"/" Leastconn"/"Backup",默认值"Roundrobin" + * "StickinessConfig" => (object) [ + * "Enabled" => (boolean) 是否开启会话保持功能。应用型负载均衡实例基于Cookie实现;默认值为:false + * "Type" => (string) (应用型专用)Cookie处理方式。限定枚举值:"ServerInsert" / "UserDefined";默认值为:“ServerInsert” + * "CookieName" => (string) (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效;限定字符长度:[0-255] + * ] + * "HealthCheckConfig" => (object) [ + * "Enabled" => (boolean) 是否开启健康检查功能。暂时不支持关闭。默认值为:true + * "Type" => (string) 健康检查方式。应用型限定取值:“Port”/"HTTP/GRPC",默认值:“Port” + * "Domain" => (string) (应用型专用)HTTP检查域名 + * "Path" => (string) (应用型专用)HTTP检查路径 + * "Method" => (string) (应用型专用)HTTP检查方法。只支持GET和HEAD。 + * "ResponseCode" => (string) (应用型专用)GRPC检查响应码 + * ] + * "CompressionEnabled" => (boolean) (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩。默认值为:false + * "HTTP2Enabled" => (boolean) (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启;默认值为:false + * "RedirectEnabled" => (boolean) (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启;默认值为:false + * "RedirectPort" => (integer) (应用型专用)重定向端口。限定取值:[1-65535],默认值443 + * ] + * + * Outputs: + * + * $outputs = [ + * "ListenerId" => (string) 监听器的ID + * ] + * + * @return CreateListenerResponse + * @throws UCloudException + */ + public function createListener(CreateListenerRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateListenerResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateLoadBalancer - 创建一个应用型负载均衡实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_load_balancer + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "VPCId" => (string) 负载均衡实例所属的VPC资源ID + * "SubnetId" => (string) 负载均衡实例所属的子网资源ID。负载均衡实例的内网VIP和SNAT场景的源IP限定在该子网内;指定子网不影响添加后端服务节点时的范围,依旧是整个VPC下支持的资源 + * "Type" => (string) 负载均衡实例的类型。限定枚举值:"Application" / "Network",默认值:"Application" + * "Name" => (string) 负载均衡实例的名称。默认值:lb;特殊字符仅支持:“-”,“_”,“.”;限定字符长度:[1-255] + * "Tag" => (string) 负载均衡实例所属的业务组ID。默认值为“Default”; 传空则为Default业务组 + * "Remark" => (string) 负载均衡实例的备注信息。限定字符长度:[0-255] + * "IPVersion" => (string) 负载均衡实例的IP协议。限定枚举值:"IPv4" / "IPv6"/"DualStack",默认值为:“IPv4” + * "ChargeType" => (string) 付费模式。限定枚举值:"Year" / "Month"/"Day"/"Dynamic",默认值为:“Month” + * "Quantity" => (integer) 购买的时长, 默认: 1; 0-> 购买至月末(0只在月付费有效,其余付费模式传0,实际收费按一个周期计费) + * "SecGroups" => (array) [ + * [ + * "SecGroupId" => (string) 安全组id + * "Priority" => (integer) 安全组优先级 + * ] + * ] + * "LabelInfos" => (array) [ + * [ + * "Key" => (string) 标签键 + * "Value" => (string) 标签值 + * ] + * ] + * "CouponId" => (string) 代金券code + * ] + * + * Outputs: + * + * $outputs = [ + * "LoadBalancerId" => (string) 负载均衡实例的ID + * ] + * + * @return CreateLoadBalancerResponse + * @throws UCloudException + */ + public function createLoadBalancer(CreateLoadBalancerRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateLoadBalancerResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreatePolicy - 传统型负载均衡创建VServer内容转发策略 * * See also: https://docs.ucloud.cn/api/ulb-api/create_policy * * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - * "ULBId" => (string) 需要添加内容转发策略的负载均衡实例ID - * "VServerId" => (string) 需要添加内容转发策略的VServer实例ID - * "BackendId" => (array) 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULBId" => (string) 需要添加内容转发策略的传统型负载均衡实例ID + * "VServerId" => (string) 需要添加内容转发策略的传统型负载均衡VServer实例ID + * "BackendId" => (array) 内容转发策略应用的传统型负载均衡后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId * "Match" => (string) 内容转发匹配字段 + * "DomainMatchMode" => (string) 内容转发规则中域名的匹配方式,默认与原本一致。枚举值:Regular,正则;Wildcard,泛域名 * "Type" => (string) 内容转发匹配字段的类型 - * "PolicyPriority" => (integer) 策略优先级,1-9999 + * "PolicyPriority" => (integer) 策略优先级,1-9999;只针对路径规则生效 * ] * * Outputs: @@ -167,6 +409,82 @@ public function createPolicy(CreatePolicyRequest $request = null) return new CreatePolicyResponse($resp->toArray(), $resp->getRequestId()); } + /** + * CreateRule - 给应用型负载均衡监听器创建一条转发规则 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_rule + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 负载均衡实例的ID + * "ListenerId" => (string) 监听器的ID + * "RuleConditions" => (array) [ + * [ + * "Type" => (string) 匹配条件类型。限定枚举值:"Host"/"Path" + * "HostConfig" => (object) [ + * "MatchMode" => (string) 匹配方式。限定枚举值:"Regular"/"Wildcard",默认值:"Regular" + * "Values" => (array) 取值。暂时只支持数组长度为1;取值需符合相关匹配方式的条件;域名匹配时必填 + * ] + * "PathConfig" => (object) [ + * "Values" => (array) 取值。暂时只支持数组长度为1;取值需符合相关条件;路径匹配时必填 + * ] + * ] + * ] + * "RuleActions" => (array) [ + * [ + * "Type" => (string) 动作类型。限定枚举值:"Forward"、"InsertHeader"、"Cors"、"FixedResponse"、"RemoveHeader"。只会处理 Type 对应的结构体。 + * "ForwardConfig" => (object) [ + * "Targets" => (array) [ + * [ + * "Id" => (string) 转发的后端服务节点的标识ID。限定在监听器的服务节点池里;数组长度可以是0;转发服务节点配置的数组长度不为0时,Id必填 + * "Weight" => (integer) 转发的后端服务节点的权重。仅监听器负载均衡算法是加权轮询是有效 + * ] + * ] + * ] + * "Order" => (integer) 转发规则动作执行的顺序,取值为1~1000,按值从小到大执行动作。值不能为空,不能重复。Forward、FixedResponse 类型的动作不判断 Order,最后一个执行 + * "InsertHeaderConfig" => (object) [ + * "Key" => (string) 插入的 header 字段名称,长度为 1~40 个字符,支持大小写字母 a~z、数字、下划线(_)和短划线(-)。头字段名称不能重复用于InsertHeader中。header 字段不能使用以下(此处判断大小写不敏感)x-real-ip、x-forwarded-for、x-forwarded-proto、x-forwarded-srcport、ucloud-alb-trace、connection、upgrade、content-length、transfer-encoding、keep-alive、te、host、cookie、remoteip、authority + * "ValueType" => (string) 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 + * "Value" => (string) 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 + * ] + * "RemoveHeaderConfig" => (object) [ + * "Key" => (string) 删除的 header 字段名称,目前只能删除以下几个默认配置的字段X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort + * ] + * "CorsConfig" => (object) [ + * "AllowOrigin" => (array) 允许的访问来源列表。支持只配置一个元素*,或配置一个或多个值。单个值必须以http://或者https://开头,后边加一个正确的域名或一级泛域名。(例:http://*.test.abc.example.com)单个值可以不加端口,也可以指定端口,端口范围:1~65535。最多支持5个值 + * "AllowHeaders" => (array) 允许跨域的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * "ExposeHeaders" => (array) 允许暴露的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * "AllowMethods" => (array) 选择跨域访问时允许的 HTTP 方法。取值:GET。POST。PUT。DELETE。HEAD。OPTIONS。PATCH。 + * "AllowCredentials" => (string) 是否允许携带凭证信息。取值:on:是。off:否。 + * "MaxAge" => (integer) 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 + * ] + * "FixedResponseConfig" => (object) [ + * "HttpCode" => (integer) 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 + * "Content" => (string) 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + * ] + * ] + * ] + * "Pass" => (boolean) 当转发的服务节点为空时,规则是否忽略。默认值true + * ] + * + * Outputs: + * + * $outputs = [ + * "RuleId" => (string) 转发规则的ID + * ] + * + * @return CreateRuleResponse + * @throws UCloudException + */ + public function createRule(CreateRuleRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateRuleResponse($resp->toArray(), $resp->getRequestId()); + } + /** * CreateSSL - 创建SSL证书,可以把整个 Pem 证书内容传过来,或者把证书、私钥、CA证书分别传过来 * @@ -183,6 +501,7 @@ public function createPolicy(CreatePolicyRequest $request = null) * "UserCert" => (string) 用户的证书 * "PrivateKey" => (string) 加密证书的私钥 * "CaCert" => (string) CA证书 + * "USSLId" => (string) USSL证书的ID * ] * * Outputs: @@ -201,7 +520,37 @@ public function createSSL(CreateSSLRequest $request = null) } /** - * CreateULB - 创建负载均衡实例,可以选择内网或者外网 + * CreateSecurityPolicy - 创建安全策略 + * + * See also: https://docs.ucloud.cn/api/ulb-api/create_security_policy + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "TLSVersion" => (string) TLS版本 + * "SSLCiphers" => (array) 加密套件 + * "SecurityPolicyName" => (string) 安全策略名称 + * ] + * + * Outputs: + * + * $outputs = [ + * "SecurityPolicyId" => (string) 安全策略ID + * ] + * + * @return CreateSecurityPolicyResponse + * @throws UCloudException + */ + public function createSecurityPolicy(CreateSecurityPolicyRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateSecurityPolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateULB - 创建传统型负载均衡负载均衡实例,可以选择内网或者外网 * * See also: https://docs.ucloud.cn/api/ulb-api/create_ulb * @@ -213,20 +562,20 @@ public function createSSL(CreateSSLRequest $request = null) * "ULBName" => (string) 负载均衡的名字,默认值为“ULB” * "Tag" => (string) 业务组 * "Remark" => (string) 备注 - * "OuterMode" => (string) 创建的ULB是否为外网模式,默认即为外网模式 - * "InnerMode" => (string) 创建的ULB是否为内网模式 + * "OuterMode" => (string) 创建的CLB是否为外网模式,默认即为外网模式 + * "InnerMode" => (string) 创建的CLB是否为内网模式 * "ChargeType" => (string) 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费 - * "VPCId" => (string) ULB所在的VPC的ID, 如果不传则使用默认的VPC - * "SubnetId" => (string) ULB 所属的子网ID,如果不传则随机选择一个。 - * "BusinessId" => (string) ULB 所属的业务组ID,如果不传则使用默认的业务组 + * "VPCId" => (string) CLB所在的VPC的ID。 如果不传则使用默认的VPC,若不传且无默认VPC则接口报错 + * "SubnetId" => (string) CLB 所属的子网ID,如果不传则随机选择一个。 + * "BusinessId" => (string) CLB 所属的业务组ID,如果不传则使用默认的业务组 * "FirewallId" => (string) 防火墙ID,如果不传,则默认不绑定防火墙 - * "ListenType" => (string) ULB 监听器类型,外网ULB默认RequestProxy,内网ULB默认PacketsTransmit。枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发。 + * "ListenType" => (string) CLB 监听器类型,外网CLB默认RequestProxy,内网ULB默认PacketsTransmit。枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发。 * ] * * Outputs: * * $outputs = [ - * "ULBId" => (string) 负载均衡实例的Id + * "ULBId" => (string) 传统型负载均衡实例的Id * "IPv6AddressId" => (string) IPv6地址Id * ] * @@ -240,7 +589,7 @@ public function createULB(CreateULBRequest $request = null) } /** - * CreateVServer - 创建VServer实例,定义监听的协议和端口以及负载均衡算法 + * CreateVServer - 创建CLB的VServer实例,定义监听的协议和端口以及负载均衡算法 * * See also: https://docs.ucloud.cn/api/ulb-api/create_vserver * @@ -249,7 +598,7 @@ public function createULB(CreateULBRequest $request = null) * $args = [ * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) - * "ULBId" => (string) 负载均衡实例ID + * "ULBId" => (string) 传统型负载均衡实例ID * "VServerName" => (string) VServer实例名称,默认为"VServer" * "ListenType" => (string) 监听器类型,枚举值,RequestProxy ,请求代理;PacketsTransmit ,报文转发。默认为RequestProxy * "Protocol" => (string) VServer实例的协议,请求代理模式下有 HTTP、HTTPS、TCP,报文转发下有 TCP,UDP。默认为“HTTP" @@ -263,6 +612,10 @@ public function createULB(CreateULBRequest $request = null) * "Path" => (string) 根据MonitorType确认; 当MonitorType为Path时,此字段有意义,代表HTTP检查路径 * "RequestMsg" => (string) 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 * "ResponseMsg" => (string) 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + * "SecurityPolicyId" => (string) 安全策略组ID,默认值'Default' + * "EnableCompression" => (integer) 0:关闭 1:开启,用于数据压缩功能 + * "ForwardPort" => (integer) 重定向端口,取值范围[0-65535];默认值为0,代表关闭;仅HTTP协议支持开启重定向功能 + * "EnableHTTP2" => (integer) 0:关闭 1:开启,用于开启http2功能;默认值为0 * ] * * Outputs: @@ -281,17 +634,73 @@ public function createVServer(CreateVServerRequest $request = null) } /** - * DeletePolicy - 删除内容转发策略 + * DeleteListener - 删除一个应用型负载均衡监听器 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_listener + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 应用型负载均衡实例的ID + * "ListenerId" => (string) 应用型负载均衡监听器的ID + * "RelatedRedirectDisabled" => (boolean) 是否关闭相关监听器的重定向功能。默认为false,即有其他监听器重定向到本监听器,则删除失败。为true时,会先关闭相关监听器的重定向功能,再删除本监听器。默认值为:false + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteListenerResponse + * @throws UCloudException + */ + public function deleteListener(DeleteListenerRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteListenerResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteLoadBalancer - 删除一个应用型负载均衡实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_load_balancer + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 应用型负载均衡实例的ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteLoadBalancerResponse + * @throws UCloudException + */ + public function deleteLoadBalancer(DeleteLoadBalancerRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteLoadBalancerResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeletePolicy - 删除传统型负载均衡的内容转发策略 * * See also: https://docs.ucloud.cn/api/ulb-api/delete_policy * * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - * "PolicyId" => (string) 内容转发策略ID - * "VServerId" => (string) VServer 资源ID + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "PolicyId" => (string) CLB的内容转发策略ID + * "VServerId" => (string) CLB的VServer 资源ID * ] * * Outputs: @@ -308,6 +717,35 @@ public function deletePolicy(DeletePolicyRequest $request = null) return new DeletePolicyResponse($resp->toArray(), $resp->getRequestId()); } + /** + * DeleteRule - 删除应用型负载均衡监听器的一条转发规则 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_rule + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 应用型负载均衡实例的ID + * "ListenerId" => (string) 应用型负载均衡监听器的ID + * "RuleId" => (string) 应用型负载均衡的转发规则的ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteRuleResponse + * @throws UCloudException + */ + public function deleteRule(DeleteRuleRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteRuleResponse($resp->toArray(), $resp->getRequestId()); + } + /** * DeleteSSL - 删除SSL证书 * @@ -336,17 +774,18 @@ public function deleteSSL(DeleteSSLRequest $request = null) } /** - * DeleteULB - 删除负载均衡实例 + * DeleteSSLBinding - 删除监听器绑定的扩展证书 * - * See also: https://docs.ucloud.cn/api/ulb-api/delete_ulb + * See also: https://docs.ucloud.cn/api/ulb-api/delete_ssl_binding * * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - * "ULBId" => (string) 负载均衡实例的ID - * "ReleaseEip" => (boolean) 删除ulb时是否释放绑定的EIP,false标识只解绑EIP,true表示会释放绑定的EIP,默认是false。Anycast IP 此参数无效 + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 负载均衡实例的ID + * "ListenerId" => (string) 监听器的ID + * "SSLIds" => (array) SSLId的数组 * ] * * Outputs: @@ -354,27 +793,26 @@ public function deleteSSL(DeleteSSLRequest $request = null) * $outputs = [ * ] * - * @return DeleteULBResponse + * @return DeleteSSLBindingResponse * @throws UCloudException */ - public function deleteULB(DeleteULBRequest $request = null) + public function deleteSSLBinding(DeleteSSLBindingRequest $request = null) { $resp = $this->invoke($request); - return new DeleteULBResponse($resp->toArray(), $resp->getRequestId()); + return new DeleteSSLBindingResponse($resp->toArray(), $resp->getRequestId()); } /** - * DeleteVServer - 删除VServer实例 + * DeleteSecurityPolicy - 删除安全策略 * - * See also: https://docs.ucloud.cn/api/ulb-api/delete_vserver + * See also: https://docs.ucloud.cn/api/ulb-api/delete_security_policy * * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - * "ULBId" => (string) 负载均衡实例的ID - * "VServerId" => (string) VServer实例的ID + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SecurityPolicyId" => (string) 安全策略ID * ] * * Outputs: @@ -382,29 +820,488 @@ public function deleteULB(DeleteULBRequest $request = null) * $outputs = [ * ] * - * @return DeleteVServerResponse + * @return DeleteSecurityPolicyResponse * @throws UCloudException */ - public function deleteVServer(DeleteVServerRequest $request = null) + public function deleteSecurityPolicy(DeleteSecurityPolicyRequest $request = null) { $resp = $this->invoke($request); - return new DeleteVServerResponse($resp->toArray(), $resp->getRequestId()); + return new DeleteSecurityPolicyResponse($resp->toArray(), $resp->getRequestId()); } /** - * DescribeSSL - 获取SSL证书信息 + * DeleteULB - 删除传统型负载均衡实例 * - * See also: https://docs.ucloud.cn/api/ulb-api/describe_ssl + * See also: https://docs.ucloud.cn/api/ulb-api/delete_ulb * * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - * "SSLId" => (string) SSL证书的Id - * "Limit" => (integer) 数据分页值,默认为20 - * "Offset" => (integer) 数据偏移量,默认值为0 - * ] + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULBId" => (string) 传统型负载均衡实例的ID + * "ReleaseEip" => (boolean) 删除clb时是否释放绑定的EIP,false标识只解绑EIP,true表示会释放绑定的EIP,默认是false。Anycast IP 此参数无效 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteULBResponse + * @throws UCloudException + */ + public function deleteULB(DeleteULBRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteULBResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteVServer - 删除CLB的VServer实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/delete_vserver + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULBId" => (string) 传统型负载均衡实例的ID + * "VServerId" => (string) CLB下的VServer实例的ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteVServerResponse + * @throws UCloudException + */ + public function deleteVServer(DeleteVServerRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteVServerResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeListeners - 描述一个指定的监听器或者一个应用型负载均衡实例下的所有监听器 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_listeners + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ListenerId" => (string) 应用型负载均衡监听器的ID。若指定ListenerId,则忽略LoadBalancerId。ListenId和LoadBalancerId必选其一 + * "LoadBalancerId" => (string) 应用型负载均衡实例的ID。未指定ListenId,则描述指定的LoadBalancerId下的所有监听器。 + * "Offset" => (integer) 数据偏移量,默认为0 + * "Limit" => (integer) 数据分页值,默认为100 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的负载均衡监听器总数 + * "Listeners" => (array) 负载均衡监听器信息[ + * [ + * "ListenerId" => (string) 监听器的ID + * "Name" => (string) 监听器的名称 + * "Remark" => (string) 监听器的备注信息 + * "ListenerPort" => (integer) 监听器的监听端口 + * "ListenerProtocol" => (string) 监听协议。应用型限定取值: HTTP、HTTPS + * "Certificates" => (array) (应用型专用)服务器默认证书ID。仅HTTPS监听支持。具体接口详见 Certificate[ + * [ + * "SSLId" => (string) 证书ID + * "IsDefault" => (boolean) 是否为默认证书 + * ] + * ] + * "SecurityPolicyId" => (string) (应用型专用)安全策略组ID。仅HTTPS监听支持绑定;Default -> 原生策略 + * "IdleTimeout" => (integer) 连接空闲超时时间。单位:秒 + * "Scheduler" => (string) 负载均衡算法。应用型限定取值:Roundrobin -> 轮询;Source -> 源地址; WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup ->主备模式 + * "StickinessConfig" => (object) 会话保持相关配置。具体结构详见 StickinessConfigSet[ + * "Enabled" => (boolean) 是否开启会话保持功能。应用型负载均衡实例基于Cookie实现 + * "Type" => (string) (应用型专用)Cookie处理方式。限定枚举值: ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY + * "CookieName" => (string) (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效 + * ] + * "HealthCheckConfig" => (object) 健康检查相关配置。具体结构详见 HealthCheckConfigSet[ + * "Enabled" => (boolean) 是否开启健康检查功能。暂时不支持关闭。 默认值为:true + * "Type" => (string) 健康检查方式。应用型限定取值: Port -> 端口检查;HTTP -> HTTP检查; 默认值:Port + * "Domain" => (string) (应用型专用)HTTP检查域名。 当Type为HTTP时,此字段有意义,代表HTTP检查域名 + * "Path" => (string) (应用型专用)HTTP检查路径。当Type为HTTP时,此字段有意义,代表HTTP检查路径 + * "Method" => (string) (应用型专用)HTTP检查方法。当Type为HTTP时,此字段有意义,代表HTTP检查方法 + * "ResponseCode" => (string) (应用型专用)GRPC检查响应码。当Type为GRPC时,此字段有意义,代表GRPC检查响应码 + * ] + * "CompressionEnabled" => (boolean) (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩 + * "HTTP2Enabled" => (boolean) (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启 + * "RedirectEnabled" => (boolean) (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启 + * "RedirectPort" => (integer) (应用型专用)重定向端口 + * "Targets" => (array) 添加的服务节点信息。具体结构详见 Target[ + * [ + * "ResourceType" => (string) 服务节点的类型。限定枚举值:UHost -> 云主机,UNI -> 虚拟网卡,UPM -> 物理云主机,IP -> IP类型; 默认值:"UHost"; 非IP类型,如果该资源有多个IP,将只能添加主IP; 非IP类型,展示时,会显示相关资源信息,IP类型只展示IP信息。 在相关资源被删除时,非IP类型会把相关资源从lb中剔除,IP类型不保证这个逻辑 + * "ResourceId" => (string) 服务节点的资源ID + * "ResourceName" => (string) 服务节点的资源名称 + * "VPCId" => (string) 服务节点的VPC资源ID + * "SubnetId" => (string) 服务节点的子网资源ID + * "ResourceIP" => (string) 服务节点的IP + * "Port" => (integer) 服务节点的端口 + * "Weight" => (integer) 服务节点的权重。仅在加权轮询算法时有效 + * "Enabled" => (boolean) 服务节点是否启用 + * "IsBackup" => (boolean) 服务节点是否为备节点 + * "Id" => (string) 服务节点的标识ID。为ALB/NLB中使用,与资源自身ID无关,可用于UpdateTargetsAttribute/RemoveTargets + * "State" => (string) 服务节点的健康检查状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康 + * ] + * ] + * "Rules" => (array) (应用型专用)转发规则信息[ + * [ + * "RuleId" => (string) 转发规则的ID + * "RuleConditions" => (array) 转发规则匹配条件。具体结构详见 RuleCondition[ + * [ + * "Type" => (string) 匹配条件类型。限定枚举值:Host,Path + * "HostConfig" => (object) 域名相关配置。Type为Host时必填。具体结构详见 HostConfigSet[ + * "Values" => (array) 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 + * "MatchMode" => (string) 匹配方式。限定枚举值:Regular-正则,Wildcard-泛域名; 默认值:Regular + * ] + * "PathConfig" => (object) 路径相关配置。Type为Path时必填。具体结构详见 PathConfigSet[ + * "Values" => (array) 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 + * ] + * ] + * ] + * "RuleActions" => (array) 转发动作。具体规则详见RuleAction[ + * [ + * "Type" => (string) 动作类型。限定枚举值:Forward、"InsertHeader"、"Cors"、"FixedResponse"、"RemoveHeader" + * "ForwardConfig" => (object) 转发服务节点相关配置,对应 type 值: "Forward"。具体结构详见 ForwardConfigSet[ + * "Targets" => (array) 转发的后端服务节点。限定在监听器的服务节点池里;数组长度可以为0。具体结构详见 ForwardTargetSet[ + * [ + * "Id" => (string) 服务节点的标识ID + * "Weight" => (integer) 权重。仅监听器负载均衡算法是加权轮询是有效;取值范围[1-100],默认值为1 + * ] + * ] + * ] + * "FixedResponseConfig" => (object) 静态返回相关配置,对应 type 值: "FixedResponse"。具体结构详见 FixedResponseConfigSet[ + * "HttpCode" => (integer) 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 + * "Content" => (string) 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + * ] + * "InsertHeaderConfig" => (object) 插入 header 相关配置,对应 type 值: "InsertHeader"。具体结构详见 InsertHeaderConfigSet[ + * "Key" => (string) 插入的 header 字段名称,长度为 1~40 个字符,支持大小写字母 a~z、数字、下划线(_)和短划线(-)。头字段名称不能重复用于InsertHeader中。header 字段不能使用以下(此处判断大小写不敏感)x-real-ip、x-forwarded-for、x-forwarded-proto、x-forwarded-srcport、ucloud-alb-trace、connection、upgrade、content-length、transfer-encoding、keep-alive、te、host、cookie、remoteip、authority + * "Value" => (string) 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 + * "ValueType" => (string) 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 + * ] + * "CorsConfig" => (object) 跨域相关配置,对应 type 值: "Cors"。具体结构详见 CorsConfigSet[ + * "AllowOrigin" => (array) 允许的访问来源列表。支持只配置一个元素*,或配置一个或多个值。单个值必须以http://或者https://开头,后边加一个正确的域名或一级泛域名。(例:http://*.test.abc.example.com)单个值可以不加端口,也可以指定端口,端口范围:1~65535。最多支持5个值 + * "AllowHeaders" => (array) 允许跨域的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * "ExposeHeaders" => (array) 允许暴露的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * "AllowMethods" => (array) 选择跨域访问时允许的 HTTP 方法。取值:GETPOSTPUTDELETEHEADOPTIONSPATCH + * "AllowCredentials" => (string) 是否允许携带凭证信息。取值:on:是。off:否。 + * "MaxAge" => (integer) 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 + * ] + * "RemoveHeaderConfig" => (object) 删除 header 相关配置,对应 type 值: "RemoveHeader"。具体结构详见 RemoveHeaderConfigSet[ + * "Key" => (string) 删除的 header 字段名称,目前只能删除以下几个默认配置的字段: X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort + * ] + * "Order" => (integer) 转发规则动作执行的顺序,取值为1~1000,按值从小到大执行动作。值不能为空,不能重复。Forward、FixedResponse 类型的动作不判断 Order,最后一个执行 + * ] + * ] + * "IsDefault" => (boolean) 是否为默认转发规则 + * "Pass" => (boolean) 当转发的服务节点为空时,规则是否忽略 + * ] + * ] + * "State" => (string) listener健康状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康,PartialHealth -> 部分健康,None -> 无节点状态 + * ] + * ] + * ] + * + * @return DescribeListenersResponse + * @throws UCloudException + */ + public function describeListeners(DescribeListenersRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeListenersResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeLoadBalancers - 描述特定条件下的应用型负载均衡实例或者全部的应用型负载均衡实例 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_load_balancers + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (string) 负载均衡实例的类型。限定枚举值:"Application" / "Network",默认值:"Application" + * "ShowDetail" => (boolean) 是否获取监听器和后端服务节点的详细信息。默认值:false + * "LoadBalancerIds" => (array) 负载均衡实例的ID。必须是同一类型的实例,若指定了实例ID,将忽略除Type外的其他过滤条件 + * "VPCId" => (string) 限定所在的VPC + * "SubnetId" => (string) 限定所在的子网 + * "Offset" => (string) 数据偏移量,默认为0 + * "Limit" => (string) 数据分页值,默认为100 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的负载均衡实例总数 + * "LoadBalancers" => (array) 负载均衡实例信息[ + * [ + * "VPCId" => (string) 负载均衡实例所属的VPC资源ID + * "SubnetId" => (string) 负载均衡实例所属的子网资源ID。负载均衡实例的内网VIP和SNAT场景的源IP限定在该子网内;指定子网不影响添加后端服务节点时的范围,依旧是整个VPC下支持的资源 + * "LoadBalancerId" => (string) 负载均衡实例的ID + * "Type" => (string) 负载均衡实例的类型。限定枚举值:Application -> 应用型,Network -> 网络型 + * "Name" => (string) 负载均衡实例的名称 + * "Tag" => (string) 负载均衡实例所属的业务组ID + * "Remark" => (string) 负载均衡实例的备注信息 + * "IPVersion" => (string) 负载均衡实例支持的IP协议版本 + * "IPInfos" => (array) 绑定的IP信息。具体结构详见 IPInfo[ + * [ + * "IP" => (string) IP地址 + * "Id" => (string) 唯一标识ID + * "IPVersion" => (string) IP协议版本 + * "OperatorName" => (string) 外网IP的运营商信息。枚举值为:Telecom -> 电信,Unicom -> 联通,International -> 国际IP,Bgp -> BGP,Duplet -> 双线(电信+联通双线路),BGPPro -> 精品BGP,China-mobile -> 中国移动,Anycast -> AnycastEIP + * "BandwidthType" => (integer) 带宽类型。限定枚举值:1 -> 共享带宽,0 -> 普通带宽类型 + * "Bandwidth" => (integer) 带宽值。单位M + * "AddressType" => (string) 网络模式。 限定枚举值:Internet -> 互联网,Intranet -> 内联网 + * ] + * ] + * "SnatIPs" => (array) 应用型实例的代理IP或网络型FULLNAT模式下snat所用的IP + * "Firewall" => (object) 防火墙信息[ + * "FirewallName" => (string) 防火墙名称 + * "FirewallId" => (string) 防火墙ID + * ] + * "AccessLogConfig" => (object) (应用型专用)访问日志相关配置[ + * "Enabled" => (boolean) (应用型专用)是否开启访问日志记录功能 + * "US3BucketName" => (string) (应用型专用)用于存储访问日志的bucket + * "US3TokenId" => (string) (应用型专用)上传访问日志到bucket所需的token + * ] + * "ChargeType" => (string) 付费模式 + * "PurchaseValue" => (integer) 有效期(计费)。格式为Unix Timestamp + * "CreateTime" => (integer) 负载均衡实例创建时间。格式为Unix Timestamp + * "Listeners" => (array) 监听器信息。当ShowDetail为false时,为空[ + * [ + * "ListenerId" => (string) 监听器的ID + * "Name" => (string) 监听器的名称 + * "Remark" => (string) 监听器的备注信息 + * "ListenerPort" => (integer) 监听器的监听端口 + * "ListenerProtocol" => (string) 监听协议。应用型限定取值: HTTP、HTTPS + * "Certificates" => (array) (应用型专用)服务器默认证书ID。仅HTTPS监听支持。具体接口详见 Certificate[ + * [ + * "SSLId" => (string) 证书ID + * "IsDefault" => (boolean) 是否为默认证书 + * ] + * ] + * "SecurityPolicyId" => (string) (应用型专用)安全策略组ID。仅HTTPS监听支持绑定;Default -> 原生策略 + * "IdleTimeout" => (integer) 连接空闲超时时间。单位:秒 + * "Scheduler" => (string) 负载均衡算法。应用型限定取值:Roundrobin -> 轮询;Source -> 源地址; WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup ->主备模式 + * "StickinessConfig" => (object) 会话保持相关配置。具体结构详见 StickinessConfigSet[ + * "Enabled" => (boolean) 是否开启会话保持功能。应用型负载均衡实例基于Cookie实现 + * "Type" => (string) (应用型专用)Cookie处理方式。限定枚举值: ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY + * "CookieName" => (string) (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效 + * ] + * "HealthCheckConfig" => (object) 健康检查相关配置。具体结构详见 HealthCheckConfigSet[ + * "Enabled" => (boolean) 是否开启健康检查功能。暂时不支持关闭。 默认值为:true + * "Type" => (string) 健康检查方式。应用型限定取值: Port -> 端口检查;HTTP -> HTTP检查; 默认值:Port + * "Domain" => (string) (应用型专用)HTTP检查域名。 当Type为HTTP时,此字段有意义,代表HTTP检查域名 + * "Path" => (string) (应用型专用)HTTP检查路径。当Type为HTTP时,此字段有意义,代表HTTP检查路径 + * "Method" => (string) (应用型专用)HTTP检查方法。当Type为HTTP时,此字段有意义,代表HTTP检查方法 + * "ResponseCode" => (string) (应用型专用)GRPC检查响应码。当Type为GRPC时,此字段有意义,代表GRPC检查响应码 + * ] + * "CompressionEnabled" => (boolean) (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩 + * "HTTP2Enabled" => (boolean) (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启 + * "RedirectEnabled" => (boolean) (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启 + * "RedirectPort" => (integer) (应用型专用)重定向端口 + * "Targets" => (array) 添加的服务节点信息。具体结构详见 Target[ + * [ + * "ResourceType" => (string) 服务节点的类型。限定枚举值:UHost -> 云主机,UNI -> 虚拟网卡,UPM -> 物理云主机,IP -> IP类型; 默认值:"UHost"; 非IP类型,如果该资源有多个IP,将只能添加主IP; 非IP类型,展示时,会显示相关资源信息,IP类型只展示IP信息。 在相关资源被删除时,非IP类型会把相关资源从lb中剔除,IP类型不保证这个逻辑 + * "ResourceId" => (string) 服务节点的资源ID + * "ResourceName" => (string) 服务节点的资源名称 + * "VPCId" => (string) 服务节点的VPC资源ID + * "SubnetId" => (string) 服务节点的子网资源ID + * "ResourceIP" => (string) 服务节点的IP + * "Port" => (integer) 服务节点的端口 + * "Weight" => (integer) 服务节点的权重。仅在加权轮询算法时有效 + * "Enabled" => (boolean) 服务节点是否启用 + * "IsBackup" => (boolean) 服务节点是否为备节点 + * "Id" => (string) 服务节点的标识ID。为ALB/NLB中使用,与资源自身ID无关,可用于UpdateTargetsAttribute/RemoveTargets + * "State" => (string) 服务节点的健康检查状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康 + * ] + * ] + * "Rules" => (array) (应用型专用)转发规则信息[ + * [ + * "RuleId" => (string) 转发规则的ID + * "RuleConditions" => (array) 转发规则匹配条件。具体结构详见 RuleCondition[ + * [ + * "Type" => (string) 匹配条件类型。限定枚举值:Host,Path + * "HostConfig" => (object) 域名相关配置。Type为Host时必填。具体结构详见 HostConfigSet[ + * "Values" => (array) 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 + * "MatchMode" => (string) 匹配方式。限定枚举值:Regular-正则,Wildcard-泛域名; 默认值:Regular + * ] + * "PathConfig" => (object) 路径相关配置。Type为Path时必填。具体结构详见 PathConfigSet[ + * "Values" => (array) 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 + * ] + * ] + * ] + * "RuleActions" => (array) 转发动作。具体规则详见RuleAction[ + * [ + * "Type" => (string) 动作类型。限定枚举值:Forward、"InsertHeader"、"Cors"、"FixedResponse"、"RemoveHeader" + * "ForwardConfig" => (object) 转发服务节点相关配置,对应 type 值: "Forward"。具体结构详见 ForwardConfigSet[ + * "Targets" => (array) 转发的后端服务节点。限定在监听器的服务节点池里;数组长度可以为0。具体结构详见 ForwardTargetSet[ + * [ + * "Id" => (string) 服务节点的标识ID + * "Weight" => (integer) 权重。仅监听器负载均衡算法是加权轮询是有效;取值范围[1-100],默认值为1 + * ] + * ] + * ] + * "FixedResponseConfig" => (object) 静态返回相关配置,对应 type 值: "FixedResponse"。具体结构详见 FixedResponseConfigSet[ + * "HttpCode" => (integer) 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 + * "Content" => (string) 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + * ] + * "InsertHeaderConfig" => (object) 插入 header 相关配置,对应 type 值: "InsertHeader"。具体结构详见 InsertHeaderConfigSet[ + * "Key" => (string) 插入的 header 字段名称,长度为 1~40 个字符,支持大小写字母 a~z、数字、下划线(_)和短划线(-)。头字段名称不能重复用于InsertHeader中。header 字段不能使用以下(此处判断大小写不敏感)x-real-ip、x-forwarded-for、x-forwarded-proto、x-forwarded-srcport、ucloud-alb-trace、connection、upgrade、content-length、transfer-encoding、keep-alive、te、host、cookie、remoteip、authority + * "Value" => (string) 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 + * "ValueType" => (string) 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 + * ] + * "CorsConfig" => (object) 跨域相关配置,对应 type 值: "Cors"。具体结构详见 CorsConfigSet[ + * "AllowOrigin" => (array) 允许的访问来源列表。支持只配置一个元素*,或配置一个或多个值。单个值必须以http://或者https://开头,后边加一个正确的域名或一级泛域名。(例:http://*.test.abc.example.com)单个值可以不加端口,也可以指定端口,端口范围:1~65535。最多支持5个值 + * "AllowHeaders" => (array) 允许跨域的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * "ExposeHeaders" => (array) 允许暴露的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * "AllowMethods" => (array) 选择跨域访问时允许的 HTTP 方法。取值:GETPOSTPUTDELETEHEADOPTIONSPATCH + * "AllowCredentials" => (string) 是否允许携带凭证信息。取值:on:是。off:否。 + * "MaxAge" => (integer) 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 + * ] + * "RemoveHeaderConfig" => (object) 删除 header 相关配置,对应 type 值: "RemoveHeader"。具体结构详见 RemoveHeaderConfigSet[ + * "Key" => (string) 删除的 header 字段名称,目前只能删除以下几个默认配置的字段: X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort + * ] + * "Order" => (integer) 转发规则动作执行的顺序,取值为1~1000,按值从小到大执行动作。值不能为空,不能重复。Forward、FixedResponse 类型的动作不判断 Order,最后一个执行 + * ] + * ] + * "IsDefault" => (boolean) 是否为默认转发规则 + * "Pass" => (boolean) 当转发的服务节点为空时,规则是否忽略 + * ] + * ] + * "State" => (string) listener健康状态。限定枚举值:Healthy -> 健康,Unhealthy -> 不健康,PartialHealth -> 部分健康,None -> 无节点状态 + * ] + * ] + * "Status" => (string) lb状态:Normal-正常;Arrears-欠费停服 + * "AutoRenewEnabled" => (boolean) 是否开启自动续费 + * "SecGroup" => (array) 安全组信息[ + * [ + * "SecgroupId" => (string) 安全组id + * "Name" => (string) 安全组名称 + * "VPCId" => (string) 安全组所属vpc id + * "Priority" => (integer) 优先级 + * ] + * ] + * ] + * ] + * ] + * + * @return DescribeLoadBalancersResponse + * @throws UCloudException + */ + public function describeLoadBalancers(DescribeLoadBalancersRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeLoadBalancersResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeRules - 描述一条指定的转发规则或者一个应用型负载均衡监听器下的所有转发规则 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_rules + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 应用型负载均衡实例的ID + * "ListenerId" => (string) 监听器的ID + * "RuleId" => (string) 应用型负载均衡转发规则的ID。指定RuleId,则只描述该规则 + * ] + * + * Outputs: + * + * $outputs = [ + * "Rules" => (array) 转发规则信息[ + * [ + * "RuleId" => (string) 转发规则的ID + * "RuleConditions" => (array) 转发规则匹配条件。具体结构详见 RuleCondition[ + * [ + * "Type" => (string) 匹配条件类型。限定枚举值:Host,Path + * "HostConfig" => (object) 域名相关配置。Type为Host时必填。具体结构详见 HostConfigSet[ + * "Values" => (array) 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 + * "MatchMode" => (string) 匹配方式。限定枚举值:Regular-正则,Wildcard-泛域名; 默认值:Regular + * ] + * "PathConfig" => (object) 路径相关配置。Type为Path时必填。具体结构详见 PathConfigSet[ + * "Values" => (array) 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 + * ] + * ] + * ] + * "RuleActions" => (array) 转发动作。具体规则详见RuleAction[ + * [ + * "Type" => (string) 动作类型。限定枚举值:Forward、"InsertHeader"、"Cors"、"FixedResponse"、"RemoveHeader" + * "ForwardConfig" => (object) 转发服务节点相关配置,对应 type 值: "Forward"。具体结构详见 ForwardConfigSet[ + * "Targets" => (array) 转发的后端服务节点。限定在监听器的服务节点池里;数组长度可以为0。具体结构详见 ForwardTargetSet[ + * [ + * "Id" => (string) 服务节点的标识ID + * "Weight" => (integer) 权重。仅监听器负载均衡算法是加权轮询是有效;取值范围[1-100],默认值为1 + * ] + * ] + * ] + * "FixedResponseConfig" => (object) 静态返回相关配置,对应 type 值: "FixedResponse"。具体结构详见 FixedResponseConfigSet[ + * "HttpCode" => (integer) 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 + * "Content" => (string) 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + * ] + * "InsertHeaderConfig" => (object) 插入 header 相关配置,对应 type 值: "InsertHeader"。具体结构详见 InsertHeaderConfigSet[ + * "Key" => (string) 插入的 header 字段名称,长度为 1~40 个字符,支持大小写字母 a~z、数字、下划线(_)和短划线(-)。头字段名称不能重复用于InsertHeader中。header 字段不能使用以下(此处判断大小写不敏感)x-real-ip、x-forwarded-for、x-forwarded-proto、x-forwarded-srcport、ucloud-alb-trace、connection、upgrade、content-length、transfer-encoding、keep-alive、te、host、cookie、remoteip、authority + * "Value" => (string) 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 + * "ValueType" => (string) 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 + * ] + * "CorsConfig" => (object) 跨域相关配置,对应 type 值: "Cors"。具体结构详见 CorsConfigSet[ + * "AllowOrigin" => (array) 允许的访问来源列表。支持只配置一个元素*,或配置一个或多个值。单个值必须以http://或者https://开头,后边加一个正确的域名或一级泛域名。(例:http://*.test.abc.example.com)单个值可以不加端口,也可以指定端口,端口范围:1~65535。最多支持5个值 + * "AllowHeaders" => (array) 允许跨域的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * "ExposeHeaders" => (array) 允许暴露的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * "AllowMethods" => (array) 选择跨域访问时允许的 HTTP 方法。取值:GETPOSTPUTDELETEHEADOPTIONSPATCH + * "AllowCredentials" => (string) 是否允许携带凭证信息。取值:on:是。off:否。 + * "MaxAge" => (integer) 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 + * ] + * "RemoveHeaderConfig" => (object) 删除 header 相关配置,对应 type 值: "RemoveHeader"。具体结构详见 RemoveHeaderConfigSet[ + * "Key" => (string) 删除的 header 字段名称,目前只能删除以下几个默认配置的字段: X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort + * ] + * "Order" => (integer) 转发规则动作执行的顺序,取值为1~1000,按值从小到大执行动作。值不能为空,不能重复。Forward、FixedResponse 类型的动作不判断 Order,最后一个执行 + * ] + * ] + * "IsDefault" => (boolean) 是否为默认转发规则 + * "Pass" => (boolean) 当转发的服务节点为空时,规则是否忽略 + * ] + * ] + * ] + * + * @return DescribeRulesResponse + * @throws UCloudException + */ + public function describeRules(DescribeRulesRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeRulesResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeSSL - 获取SSL证书信息,仅能获取SSL证书与传统型负载均衡监听器的绑定关系 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_ssl + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SSLId" => (string) SSL证书的Id + * "Limit" => (integer) 数据分页值,默认为20 + * "Offset" => (integer) 数据偏移量,默认值为0 + * ] * * Outputs: * @@ -426,21 +1323,207 @@ public function deleteVServer(DeleteVServerRequest $request = null) * "ULBName" => (string) ULB实例的名称 * ] * ] + * "SSLSource" => (integer) SSL证书来源,SSL证书来源,0代表证书来自于ULB平台,1代表证书来自于USSL平台 + * "USSLId" => (string) USSL证书平台的编号,只有当SSLSource为1时才出现 + * "Domains" => (string) SSL证书平台的域名,多域名时,不展示扩展域名 + * "NotBefore" => (integer) 证书颁发时间 + * "NotAfter" => (integer) 证书过期时间 + * ] + * ] + * ] + * + * @return DescribeSSLResponse + * @throws UCloudException + */ + public function describeSSL(DescribeSSLRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeSSLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeSSLV2 - 获取SSL证书信息,该接口可以同时获取SSL与传统型和应用型负载均衡监听器的绑定关系 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_sslv2 + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SSLId" => (string) SSL证书的Id + * "Limit" => (integer) 数据分页值,默认为20 + * "Offset" => (integer) 数据偏移量,默认值为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的SSL证书总数 + * "DataSet" => (array) SSL证书详细信息,具体结构见SSLInfo[ + * [ + * "SSLId" => (string) SSL证书的Id + * "SSLName" => (string) SSL证书的名字 + * "SSLType" => (string) SSL证书类型,暂时只有 Pem 一种类型 + * "SSLContent" => (string) SSL证书的内容 + * "CreateTime" => (integer) SSL证书的创建时间 + * "HashValue" => (string) SSL证书的HASH值 + * "Relations" => (array) SSL绑定ULB和ALB的关系[ + * [ + * "LoadBalancerId" => (string) 负载均衡实例的ID + * "LoadBalancerName" => (string) 负载均衡实例的名称 + * "ListenerId" => (string) 监听器的ID + * "ListenerName" => (string) 监听器的名称 + * "IsDefault" => (boolean) 是否为监听器默认SSL证书 + * ] + * ] + * "SSLSource" => (integer) SSL证书来源,SSL证书来源,0代表证书来自于ULB平台,1代表证书来自于USSL平台 + * "USSLId" => (string) USSL证书平台的编号,只有当SSLSource为1时才出现 + * "Domains" => (string) SSL证书的域名 + * "DNSNames" => (string) SSL证书的扩展域名 + * "NotBefore" => (integer) 证书颁发时间 + * "NotAfter" => (integer) 证书过期时间 + * ] + * ] + * ] + * + * @return DescribeSSLV2Response + * @throws UCloudException + */ + public function describeSSLV2(DescribeSSLV2Request $request = null) + { + $resp = $this->invoke($request); + return new DescribeSSLV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeSecurityPolicies - 获取安全策略的信息,绑定关系仅能获取安全策略与传统型负载均衡监听器的绑定关系 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_security_policies + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SecurityPolicyId" => (string) 安全策略ID + * "Limit" => (integer) 数据分页值 + * "Offset" => (integer) 数据偏移量 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 安全策略列表,每项参数详见SecurityPolicy[ + * [ + * "SecurityPolicyId" => (string) 安全策略ID + * "SecurityPolicyName" => (string) 安全策略名称 + * "TLSVersion" => (string) TLS最低版本 + * "SSLCiphers" => (array) 加密套件 + * "SecurityPolicyType" => (integer) 安全策略类型 0:预定义 1:自定义 + * "VServerSet" => (array) 关联的监听[ + * [ + * "VServerId" => (string) 绑定的VServerId + * "VServerName" => (string) 绑定的VServer名称 + * "Port" => (integer) VServer端口 + * "ULBId" => (string) ULB的ID + * ] + * ] + * ] + * ] + * "TotalCount" => (integer) 满足条件的安全策略总数 + * ] + * + * @return DescribeSecurityPoliciesResponse + * @throws UCloudException + */ + public function describeSecurityPolicies(DescribeSecurityPoliciesRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeSecurityPoliciesResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeSecurityPoliciesV2 - 获取安全策略的信息,可以同时获取安全策略与传统型和应用性负载均衡监听器的绑定关系 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_security_policies_v2 + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SecurityPolicyId" => (string) 安全策略ID + * "Limit" => (integer) 数据分页值 + * "Offset" => (integer) 数据偏移量 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 安全策略列表,每项参数详见SecurityPolicyInfo[ + * [ + * "SecurityPolicyId" => (string) 安全策略ID + * "SecurityPolicyName" => (string) 安全策略名称 + * "TLSVersion" => (string) TLS最低版本 + * "SSLCiphers" => (array) 加密套件 + * "SecurityPolicyType" => (integer) 安全策略类型 0:预定义 1:自定义 + * "Relations" => (array) 关联的监听[ + * [ + * "LoadBalancerId" => (string) 负载均衡实例的ID + * "ListenerId" => (string) 监听器的ID + * "ListenerName" => (string) 监听器的名称 + * "ListenerPort" => (integer) 监听端口 + * ] + * ] + * ] + * ] + * "TotalCount" => (integer) 满足条件的安全策略总数 + * ] + * + * @return DescribeSecurityPoliciesV2Response + * @throws UCloudException + */ + public function describeSecurityPoliciesV2(DescribeSecurityPoliciesV2Request $request = null) + { + $resp = $this->invoke($request); + return new DescribeSecurityPoliciesV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeSupportCiphers - 返回安全策略所有支持的加密套件 + * + * See also: https://docs.ucloud.cn/api/ulb-api/describe_support_ciphers + * + * 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 = [ + * "DataSet" => (array) 返回支持的TLS最低版本和加密套件,每项参数详见 TLSAndCiphers[ + * [ + * "TLSVersion" => (string) TLS最低版本 + * "SSLCiphers" => (array) 加密套件 * ] * ] * ] * - * @return DescribeSSLResponse + * @return DescribeSupportCiphersResponse * @throws UCloudException */ - public function describeSSL(DescribeSSLRequest $request = null) + public function describeSupportCiphers(DescribeSupportCiphersRequest $request = null) { $resp = $this->invoke($request); - return new DescribeSSLResponse($resp->toArray(), $resp->getRequestId()); + return new DescribeSupportCiphersResponse($resp->toArray(), $resp->getRequestId()); } /** - * DescribeULB - 获取ULB详细信息 + * DescribeULB - 获取CLB详细信息 * * See also: https://docs.ucloud.cn/api/ulb-api/describe_ulb * @@ -451,17 +1534,17 @@ public function describeSSL(DescribeSSLRequest $request = null) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "Offset" => (integer) 数据偏移量,默认为0 * "Limit" => (integer) 数据分页值,默认为20 - * "ULBId" => (string) 负载均衡实例的Id。 若指定则返回指定的负载均衡实例的信息; 若不指定则返回当前数据中心中所有的负载均衡实例的信息 - * "VPCId" => (string) ULB所属的VPC - * "SubnetId" => (string) ULB所属的子网ID - * "BusinessId" => (string) ULB所属的业务组ID + * "ULBId" => (string) 传统型负载均衡实例的Id。 若指定则返回指定的传统型负载均衡实例的信息; 若不指定则返回当前数据中心中所有的传统型负载均衡实例的信息 + * "VPCId" => (string) CLB所属的VPC + * "SubnetId" => (string) CLB所属的子网ID + * "BusinessId" => (string) CLB所属的业务组ID * ] * * Outputs: * * $outputs = [ - * "TotalCount" => (integer) 满足条件的ULB总数 - * "DataSet" => (array) ULB列表,每项参数详见 ULBSet[ + * "TotalCount" => (integer) 满足条件的CLB总数 + * "DataSet" => (array) CLB列表,每项参数详见 ULBSet[ * [ * "ULBId" => (string) 负载均衡的资源ID * "Name" => (string) 负载均衡的资源名称 @@ -482,6 +1565,7 @@ public function describeSSL(DescribeSSLRequest $request = null) * "VServerSet" => (array) 负载均衡实例中存在的VServer实例列表,具体结构见下方 ULBVServerSet[ * [ * "MonitorType" => (string) 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测, Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path; 报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize + * "PersistenceType" => (string) VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 * "ULBId" => (string) 负载均衡实例的Id * "Domain" => (string) 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查域名 * "Path" => (string) 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查路径 @@ -492,7 +1576,6 @@ public function describeSSL(DescribeSSLRequest $request = null) * "Protocol" => (string) VServer实例的协议。 枚举值为:HTTP,TCP,UDP,HTTPS。 * "FrontendPort" => (integer) VServer服务端口 * "Method" => (string) VServer负载均衡的模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口)。 - * "PersistenceType" => (string) VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 * "PersistenceInfo" => (string) 根据PersistenceType确定: None或ServerInsert,此字段为空; UserDefined,此字段展示用户自定义会话string。 * "ClientTimeout" => (integer) 空闲连接的回收时间,单位:秒。 * "Status" => (integer) VServer的运行状态。枚举值: 0 -> rs全部运行正常;1 -> rs全部运行异常;2 -> rs部分运行异常。 @@ -512,6 +1595,11 @@ public function describeSSL(DescribeSSLRequest $request = null) * "ULBName" => (string) ULB实例的名称 * ] * ] + * "SSLSource" => (integer) SSL证书来源,SSL证书来源,0代表证书来自于ULB平台,1代表证书来自于USSL平台 + * "USSLId" => (string) USSL证书平台的编号,只有当SSLSource为1时才出现 + * "Domains" => (string) SSL证书平台的域名,多域名时,不展示扩展域名 + * "NotBefore" => (integer) 证书颁发时间 + * "NotAfter" => (integer) 证书过期时间 * ] * ] * "BackendSet" => (array) 后端资源信息列表,具体结构见下方 ULBBackendSet[ @@ -529,6 +1617,8 @@ public function describeSSL(DescribeSSLRequest $request = null) * "Status" => (integer) 后端提供服务的实例运行状态,枚举值:0健康检查健康状态 1 健康检查异常 * "SubnetId" => (string) 后端提供服务的资源所在的子网的ID * "IsBackup" => (integer) 是否为backup,只有当vserver的Backup属性为1时才会有此字段,说明:0:主rs1:备rs + * "Weight" => (integer) 后端RS权重(在加权轮询算法下有效) + * "VPCId" => (string) 后端服务器所在的VPC * ] * ] * "ListenType" => (string) 监听器类型,枚举值为: RequestProxy -> 请求代理;PacketsTransmit -> 报文转发 @@ -557,10 +1647,21 @@ public function describeSSL(DescribeSSLRequest $request = null) * ] * ] * ] + * "EnableCompression" => (integer) 数据压缩开关,0:关闭 1:开启 + * "SecurityPolicy" => (object) VServer绑定的安全策略,具体结构见BindSecurityPolicy[ + * "SecurityPolicyId" => (string) 安全策略组ID + * "SecurityPolicyName" => (string) 安全策略组名称 + * "TLSVersion" => (string) TLS最低版本 + * "SSLCiphers" => (array) 加密套件 + * "SecurityPolicyType" => (integer) 安全策略类型 0:预定义 1:自定义 + * ] + * "ForwardPort" => (integer) 重定向端口,取值范围[0-65535];默认值为0,代表关闭;仅HTTP协议支持开启重定向功能 + * "EnableHTTP2" => (integer) 0:关闭 1:开启,用于开启http2功能;默认值为0 * ] * ] * "ULBType" => (string) ULB 的类型 * "IPVersion" => (string) ULB ip类型,枚举值:IPv6 / IPv4 (内部测试,暂未对外开放) + * "SnatIps" => (array) ULB后向代理IP,仅当有代理IP时返回否 * "ListenType" => (string) ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发;Comprehensive,兼容型;Pending,未定型 * "VPCId" => (string) ULB所在的VPC的ID * "SubnetId" => (string) ULB 为 InnerMode 时,ULB 所属的子网ID,默认为空 @@ -592,31 +1693,32 @@ public function describeULB(DescribeULBRequest $request = null) } /** - * DescribeULBSimple - 获取ULB信息 + * DescribeULBSimple - 获取CLB信息 * * See also: https://docs.ucloud.cn/api/ulb-api/describe_ulb_simple * * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "Offset" => (integer) 数据偏移量,默认为0 * "Limit" => (integer) 数据分页值,默认为10000 - * "ULBId" => (string) 负载均衡实例的Id。 若指定则返回指定的负载均衡实例的信息; 若不指定则返回当前数据中心中所有的负载均衡实例的信息 - * "VPCId" => (string) ULB所属的VPC - * "SubnetId" => (string) ULB所属的子网ID - * "BusinessId" => (string) ULB所属的业务组ID + * "ULBId" => (string) 传统型负载均衡实例的Id。 若指定则返回指定的传统型负载均衡实例的信息; 若不指定则返回当前数据中心中所有的传统型负载均衡实例的信息 + * "VPCId" => (string) CLB所属的VPC + * "SubnetId" => (string) CLB所属的子网ID + * "BusinessId" => (string) CLB所属的业务组ID * ] * * Outputs: * * $outputs = [ - * "TotalCount" => (integer) 满足条件的ULB总数 - * "DataSet" => (array) ULB列表,每项参数详见 ULBSimpleSet[ + * "TotalCount" => (integer) 满足条件的CLB总数 + * "DataSet" => (array) CLB列表,每项参数详见 ULBSimpleSet[ * [ * "ListenType" => (string) ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发;Comprehensive,兼容型;Pending,未定型 * "IPVersion" => (string) ULB提供服务的IP类型。枚举值,“IPv4”,"IPv6"。默认为“IPv4” + * "SnatIps" => (array) ULB后向代理IP,仅当有代理IP时返回否 * "ULBId" => (string) 负载均衡的资源ID * "Name" => (string) 负载均衡的资源名称 * "Tag" => (string) 负载均衡的业务组名称 @@ -651,6 +1753,7 @@ public function describeULB(DescribeULBRequest $request = null) * "TokenID" => (string) 上传到bucket使用的token的tokenid * "TokenName" => (string) bucket的token名称 * ] + * "WAFMode" => (string) WAF功能状态,枚举类型:Unavailable:无法创建WAF;NoWAF:未绑定WAF;Intranet:内网回源Waf;Extranet:外网回源Waf * ] * ] * ] @@ -665,7 +1768,7 @@ public function describeULBSimple(DescribeULBSimpleRequest $request = null) } /** - * DescribeVServer - 获取ULB下的VServer的详细信息 + * DescribeVServer - 获取CLB下的VServer的详细信息 * * See also: https://docs.ucloud.cn/api/ulb-api/describe_vserver * @@ -674,8 +1777,8 @@ public function describeULBSimple(DescribeULBSimpleRequest $request = null) * $args = [ * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) - * "ULBId" => (string) 负载均衡实例的Id - * "VServerId" => (string) VServer实例的Id;若指定则返回指定的VServer实例的信息; 若不指定则返回当前负载均衡实例下所有VServer的信息 + * "ULBId" => (string) 传统型负载均衡实例的Id + * "VServerId" => (string) CLB下的VServer实例的Id;若指定则返回指定的VServer实例的信息; 若不指定则返回当前传统型负载均衡实例下所有VServer的信息 * "Limit" => (integer) 数据分页值 * "Offset" => (integer) 数据偏移量 * ] @@ -687,6 +1790,7 @@ public function describeULBSimple(DescribeULBSimpleRequest $request = null) * "DataSet" => (array) VServer列表,每项参数详见 ULBVServerSet[ * [ * "MonitorType" => (string) 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测, Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path; 报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize + * "PersistenceType" => (string) VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 * "ULBId" => (string) 负载均衡实例的Id * "Domain" => (string) 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查域名 * "Path" => (string) 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查路径 @@ -697,7 +1801,6 @@ public function describeULBSimple(DescribeULBSimpleRequest $request = null) * "Protocol" => (string) VServer实例的协议。 枚举值为:HTTP,TCP,UDP,HTTPS。 * "FrontendPort" => (integer) VServer服务端口 * "Method" => (string) VServer负载均衡的模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口)。 - * "PersistenceType" => (string) VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 * "PersistenceInfo" => (string) 根据PersistenceType确定: None或ServerInsert,此字段为空; UserDefined,此字段展示用户自定义会话string。 * "ClientTimeout" => (integer) 空闲连接的回收时间,单位:秒。 * "Status" => (integer) VServer的运行状态。枚举值: 0 -> rs全部运行正常;1 -> rs全部运行异常;2 -> rs部分运行异常。 @@ -717,6 +1820,11 @@ public function describeULBSimple(DescribeULBSimpleRequest $request = null) * "ULBName" => (string) ULB实例的名称 * ] * ] + * "SSLSource" => (integer) SSL证书来源,SSL证书来源,0代表证书来自于ULB平台,1代表证书来自于USSL平台 + * "USSLId" => (string) USSL证书平台的编号,只有当SSLSource为1时才出现 + * "Domains" => (string) SSL证书平台的域名,多域名时,不展示扩展域名 + * "NotBefore" => (integer) 证书颁发时间 + * "NotAfter" => (integer) 证书过期时间 * ] * ] * "BackendSet" => (array) 后端资源信息列表,具体结构见下方 ULBBackendSet[ @@ -734,6 +1842,8 @@ public function describeULBSimple(DescribeULBSimpleRequest $request = null) * "Status" => (integer) 后端提供服务的实例运行状态,枚举值:0健康检查健康状态 1 健康检查异常 * "SubnetId" => (string) 后端提供服务的资源所在的子网的ID * "IsBackup" => (integer) 是否为backup,只有当vserver的Backup属性为1时才会有此字段,说明:0:主rs1:备rs + * "Weight" => (integer) 后端RS权重(在加权轮询算法下有效) + * "VPCId" => (string) 后端服务器所在的VPC * ] * ] * "ListenType" => (string) 监听器类型,枚举值为: RequestProxy -> 请求代理;PacketsTransmit -> 报文转发 @@ -762,6 +1872,16 @@ public function describeULBSimple(DescribeULBSimpleRequest $request = null) * ] * ] * ] + * "EnableCompression" => (integer) 数据压缩开关,0:关闭 1:开启 + * "SecurityPolicy" => (object) VServer绑定的安全策略,具体结构见BindSecurityPolicy[ + * "SecurityPolicyId" => (string) 安全策略组ID + * "SecurityPolicyName" => (string) 安全策略组名称 + * "TLSVersion" => (string) TLS最低版本 + * "SSLCiphers" => (array) 加密套件 + * "SecurityPolicyType" => (integer) 安全策略类型 0:预定义 1:自定义 + * ] + * "ForwardPort" => (integer) 重定向端口,取值范围[0-65535];默认值为0,代表关闭;仅HTTP协议支持开启重定向功能 + * "EnableHTTP2" => (integer) 0:关闭 1:开启,用于开启http2功能;默认值为0 * ] * ] * ] @@ -776,17 +1896,17 @@ public function describeVServer(DescribeVServerRequest $request = null) } /** - * ReleaseBackend - 从VServer释放后端资源实例 + * ReleaseBackend - 从CLB的VServer释放后端资源实例 * * See also: https://docs.ucloud.cn/api/ulb-api/release_backend * * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - * "ULBId" => (string) 负载均衡实例的ID - * "BackendId" => (string) 后端资源实例的ID(ULB后端ID,非资源自身ID) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULBId" => (string) 传统型负载均衡实例的ID + * "BackendId" => (string) 后端资源实例的ID(CLB后端ID,非资源自身ID) * ] * * Outputs: @@ -804,17 +1924,73 @@ public function releaseBackend(ReleaseBackendRequest $request = null) } /** - * UnbindSSL - 从VServer解绑SSL证书 + * RemoveTargets - 从应用型负载均衡监听器删除后端服务节点 + * + * See also: https://docs.ucloud.cn/api/ulb-api/remove_targets + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 负载均衡实例的ID + * "ListenerId" => (string) 监听器的ID + * "Ids" => (array) 服务节点的标识ID。不超过20个; + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return RemoveTargetsResponse + * @throws UCloudException + */ + public function removeTargets(RemoveTargetsRequest $request = null) + { + $resp = $this->invoke($request); + return new RemoveTargetsResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UnBindSecurityPolicy - 批量解绑安全策略,会同时解绑与传统型和应用型负载均衡监听器的绑定关系 + * + * See also: https://docs.ucloud.cn/api/ulb-api/un_bind_security_policy + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SecurityPolicyId" => (string) 安全策略ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UnBindSecurityPolicyResponse + * @throws UCloudException + */ + public function unBindSecurityPolicy(UnBindSecurityPolicyRequest $request = null) + { + $resp = $this->invoke($request); + return new UnBindSecurityPolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UnbindSSL - 从CLB下的VServer解绑SSL证书 * * See also: https://docs.ucloud.cn/api/ulb-api/unbind_ssl * * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - * "ULBId" => (string) 所绑定ULB实例ID - * "VServerId" => (string) 所绑定VServer实例ID + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULBId" => (string) 所绑定CLB实例ID + * "VServerId" => (string) CLB所绑定VServer实例ID * "SSLId" => (string) SSL证书的Id * ] * @@ -833,7 +2009,7 @@ public function unbindSSL(UnbindSSLRequest $request = null) } /** - * UpdateBackendAttribute - 更新ULB后端资源实例(服务节点)属性 + * UpdateBackendAttribute - 更新CLB后端资源实例(服务节点)属性 * * See also: https://docs.ucloud.cn/api/ulb-api/update_backend_attribute * @@ -842,8 +2018,8 @@ public function unbindSSL(UnbindSSLRequest $request = null) * $args = [ * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) - * "ULBId" => (string) 负载均衡资源ID - * "BackendId" => (string) 后端资源实例的ID(ULB后端ID,非资源自身ID) + * "ULBId" => (string) 传统型负载均衡资源ID + * "BackendId" => (string) 后端资源实例的ID(CLB后端ID,非资源自身ID) * "Port" => (integer) 后端资源服务端口,取值范围[1-65535] * "Weight" => (integer) 所添加的后端RS权重(在加权轮询算法下有效),取值范围[1-100],默认为1 * "Enabled" => (integer) 后端实例状态开关 @@ -865,20 +2041,151 @@ public function updateBackendAttribute(UpdateBackendAttributeRequest $request = } /** - * UpdatePolicy - 更新内容转发规则,包括转发规则后的服务节点 + * UpdateBackendBatch - 批量更新ULB后端资源实例(服务节点)属性 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_backend_batch + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULBId" => (string) 负载均衡资源ID + * "Attributes" => (array) [ + * [ + * "BackendId" => (string) 后端资源实例的ID(ULB后端ID,非资源自身ID) + * "Port" => (integer) 后端资源服务端口,取值范围[1-65535] + * "Weight" => (integer) 所添加的后端RS权重(在加权轮询算法下有效),取值范围[0-100],默认为1 + * "Enabled" => (integer) 后端实例状态开关 + * "IsBackup" => (integer) 是否为backup 0:主rs 1:备rs 默认为0 + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * "BackendSet" => (array) 返回ulb对每个rs的修改是否成功[ + * [ + * "BackendId" => (string) rs的资源ID + * "SubMessage" => (string) 修改rs返回的消息 + * "SubRetCode" => (integer) 修改rs的返回值 + * ] + * ] + * ] + * + * @return UpdateBackendBatchResponse + * @throws UCloudException + */ + public function updateBackendBatch(UpdateBackendBatchRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateBackendBatchResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateListenerAttribute - 更新一个应用型负载均衡监听器的属性 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_listener_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 负载均衡实例的ID + * "ListenerId" => (string) 监听器的ID + * "Name" => (string) 监听器的名称。限定字符长度:[1-255];限定特殊字符,仅支持:-_. + * "Remark" => (string) 监听器的备注信息。限定字符长度:[0-255] + * "Certificates" => (array) (应用型专用)服务器默认证书ID。仅HTTPS监听支持 + * "SecurityPolicyId" => (string) (应用型专用)安全策略组ID。仅HTTPS监听支持绑定。“Default”,表示绑定原生策略 + * "IdleTimeout" => (integer) 连接空闲超时时间。单位:秒。应用型限定取值:[1-86400] + * "Scheduler" => (string) 负载均衡算法。应用型限定取值:"Roundrobin"/"Source"/"WeightRoundrobin"/" Leastconn"/"Backup" + * "StickinessConfig" => (object) [ + * "Enabled" => (boolean) 是否开启会话保持功能。应用型负载均衡实例基于Cookie实现,网络型负载均衡则基于源IP,保证在对应的空闲超时时间内,同一个源IP送到同一个服务节点。默认值为:false + * "Type" => (string) (应用型专用)Cookie处理方式。限定枚举值:"ServerInsert" / "UserDefined",不传值则不修改 + * "CookieName" => (string) (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效;限定字符长度:[0-255] + * ] + * "HealthCheckConfig" => (object) [ + * "Enabled" => (boolean) 是否开启健康检查功能。暂时不支持关闭;默认值为:true + * "Type" => (string) 健康检查方式。应用型限定取值:“Port”/"HTTP";默认值:“Port” + * "Domain" => (string) (应用型专用)HTTP检查域名 + * "Path" => (string) (应用型专用)HTTP检查路径 + * "Method" => (string) (应用型专用)HTTP检查方法。只支持GET和HEAD。 + * "ResponseCode" => (string) (应用型专用)GRPC检查响应码 + * ] + * "CompressionEnabled" => (boolean) (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩 + * "HTTP2Enabled" => (boolean) (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启 + * "RedirectEnabled" => (boolean) (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启 + * "RedirectPort" => (integer) (应用型专用)重定向端口。限定取值:[1-65535] + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateListenerAttributeResponse + * @throws UCloudException + */ + public function updateListenerAttribute(UpdateListenerAttributeRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateListenerAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateLoadBalancerAttribute - 更新一个应用型负载均衡实例的属性 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_load_balancer_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 负载均衡实例的ID + * "Name" => (string) 负载均衡实例的名称,不传则默认不修改 + * "Tag" => (string) 负载均衡实例所属的业务组ID,不传则默认不修改 + * "Remark" => (string) 负载均衡实例的备注信息,不传则默认不修改,限定字符长度:[0-255] + * "AccessLogConfig" => (object) [ + * "Enabled" => (boolean) (应用型专用)是否开启访问日志记录功能 + * "US3BucketName" => (string) (应用型专用)用于存储访问日志的bucket + * "US3TokenId" => (string) (应用型专用)上传访问日志到bucket所需的token + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateLoadBalancerAttributeResponse + * @throws UCloudException + */ + public function updateLoadBalancerAttribute(UpdateLoadBalancerAttributeRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateLoadBalancerAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdatePolicy - 更新传统型负载均衡内容转发规则,包括转发规则后的服务节点 * * See also: https://docs.ucloud.cn/api/ulb-api/update_policy * * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - * "ULBId" => (string) 需要添加内容转发策略的负载均衡实例ID - * "VServerId" => (string) 需要添加内容转发策略的VServer实例ID,只支持请求代理模式下,HTTP或HTTPS协议的VServer + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULBId" => (string) 需要添加内容转发策略的传统型负载均衡实例ID + * "VServerId" => (string) 需要添加内容转发策略的VServer实例ID,只支持请求代理模式下,HTTP或HTTPS协议的CLB下的VServer * "Match" => (string) 内容转发匹配字段 - * "PolicyId" => (string) 转发规则的ID,当Type为Default时,可以不传或为空 - * "BackendId" => (array) 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId,不传表示更新转发节点为空 + * "PolicyPriority" => (integer) 策略优先级,1-9999;只针对路径规则生效 + * "DomainMatchMode" => (string) 内容转发规则中域名的匹配方式,默认与原本一致。枚举值:Regular,正则;Wildcard,泛域名 + * "PolicyId" => (string) 传统型负载均衡转发规则的ID,当Type为Default时,可以不传或为空 + * "BackendId" => (array) 内容转发策略应用的后端资源实例的ID(CLB的后端节点Id),来源于 AllocateBackend 返回的 BackendId,不传表示更新转发节点为空 * "Type" => (string) 内容转发匹配字段的类型,枚举值:Domain -> 域名转发规则;Path -> 路径转发规则;Default -> 默认转发规则,不传默认值Domain * ] * @@ -896,6 +2203,82 @@ public function updatePolicy(UpdatePolicyRequest $request = null) return new UpdatePolicyResponse($resp->toArray(), $resp->getRequestId()); } + /** + * UpdateRuleAttribute - 更新应用型负载均衡监听器的一条转发规则的属性 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_rule_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 负载均衡实例的ID + * "ListenerId" => (string) 监听器的ID + * "RuleId" => (string) 转发规则的ID + * "RuleConditions" => (array) [ + * [ + * "Type" => (string) 匹配条件类型。限定枚举值:"Host"/"Path";RuleConditions数组长度不为0时必填 + * "HostConfig" => (object) [ + * "MatchMode" => (string) 匹配方式。限定枚举值:"Regular"/"Wildcard",默认值:"Regular" + * "Values" => (array) 取值。暂时只支持数组长度为1;取值需符合相关匹配方式的条件;修改域名匹配时必填 + * ] + * "PathConfig" => (object) [ + * "Values" => (array) 取值。暂时只支持数组长度为1;取值需符合相关条件;修改路径匹配时必填 + * ] + * ] + * ] + * "RuleActions" => (array) [ + * [ + * "Type" => (string) 动作类型。限定枚举值:"Forward";RuleActions数组长度不为0时必填 + * "ForwardConfig" => (object) [ + * "Targets" => (array) [ + * [ + * "Id" => (string) 转发的后端服务节点的标识ID。限定在监听器的服务节点池里;数组长度可以是0;转发服务节点配置的数组长度不为0时,Id必填 + * "Weight" => (integer) 转发的后端服务节点的权重。仅监听器负载均衡算法是加权轮询是有效 + * ] + * ] + * ] + * "Order" => (integer) 转发规则动作执行的顺序,取值为1~1000,按值从小到大执行动作。值不能为空,不能重复。Forward、FixedResponse 类型的动作不判断 Order,最后一个执行 + * "InsertHeaderConfig" => (object) [ + * "Key" => (string) 插入的 header 字段名称,长度为 1~40 个字符,支持大小写字母 a~z、数字、下划线(_)和短划线(-)。头字段名称不能重复用于InsertHeader中。header 字段不能使用以下(此处判断大小写不敏感)x-real-ip、x-forwarded-for、x-forwarded-proto、x-forwarded-srcport、ucloud-alb-trace、connection、upgrade、content-length、transfer-encoding、keep-alive、te、host、cookie、remoteip、authority + * "ValueType" => (string) 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 + * "Value" => (string) 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 + * ] + * "RemoveHeaderConfig" => (object) [ + * "Key" => (string) 删除的 header 字段名称,目前只能删除以下几个默认配置的字段X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort + * ] + * "CorsConfig" => (object) [ + * "AllowOrigin" => (array) 允许的访问来源列表。支持只配置一个元素*,或配置一个或多个值。单个值必须以http://或者https://开头,后边加一个正确的域名或一级泛域名。(例:http://*.test.abc.example.com)单个值可以不加端口,也可以指定端口,端口范围:1~65535。最多支持5个值 + * "AllowHeaders" => (array) 允许跨域的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * "ExposeHeaders" => (array) 允许暴露的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 + * "AllowMethods" => (array) 选择跨域访问时允许的 HTTP 方法。取值:GET。POST。PUT。DELETE。HEAD。OPTIONS。PATCH。 + * "AllowCredentials" => (string) 是否允许携带凭证信息。取值:on:是。off:否。 + * "MaxAge" => (integer) 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 + * ] + * "FixedResponseConfig" => (object) [ + * "HttpCode" => (integer) 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 + * "Content" => (string) 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + * ] + * ] + * ] + * "Pass" => (boolean) 当转发的服务节点为空时,规则是否忽略。默认转发规则不可更改 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateRuleAttributeResponse + * @throws UCloudException + */ + public function updateRuleAttribute(UpdateRuleAttributeRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateRuleAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + /** * UpdateSSLAttribute - 更新修改SSL的属性,如:修改SSLName * @@ -925,19 +2308,120 @@ public function updateSSLAttribute(UpdateSSLAttributeRequest $request = null) } /** - * UpdateULBAttribute - 更新ULB名字业务组备注等属性字段 + * UpdateSSLBinding - 将传统型或应用型负载均衡监听器绑定的证书更换为另一个证书, + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_ssl_binding + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "OldSSLId" => (string) 监听器实例绑定的旧的证书 + * "NewSSLId" => (string) 监听器实例需要绑定的新的证书 + * "LoadBalancerId" => (string) 所操作LB实例ID(仅LoadBalancerId传参时,将更换该LB所有原证书为OldSSLId的绑定关系;LoadBalancerId和ListenerId都不传参则将更新该项目下所有原证书为OldSSLId的绑定关系)(LB指CLB或ALB) + * "ListenerId" => (string) 所操作监听器实例ID(仅ListenerId传参时,将更换该监听器所有原证书为OldSSLId的绑定关系;LoadBalancerId和ListenerId都不传参则将更新该项目下所有原证书为OldSSLId的绑定关系;若LoadBalancerId与ListenerId皆有传参,则会强校验ULB与Vsserver的所属关系,将更换该ulb下vserver所绑定的OldSSLId为NewSSLId)(监听器指VServer或Listener) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateSSLBindingResponse + * @throws UCloudException + */ + public function updateSSLBinding(UpdateSSLBindingRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateSSLBindingResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateSecurityPolicy - 更新安全策略 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_security_policy + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SecurityPolicyId" => (string) 安全策略ID + * "SSLCiphers" => (array) 加密套件,TLS最低版本和加密套件必须全不为空或全为空 + * "TLSVersion" => (string) TLS最低版本,TLS最低版本和加密套件必须全不为空或全为空 + * "SecurityPolicyName" => (string) 安全策略名称 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateSecurityPolicyResponse + * @throws UCloudException + */ + public function updateSecurityPolicy(UpdateSecurityPolicyRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateSecurityPolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateTargetsAttribute - 更新应用型负载均衡监听器后端服务节点的属性 + * + * See also: https://docs.ucloud.cn/api/ulb-api/update_targets_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "LoadBalancerId" => (string) 负载均衡实例的ID + * "ListenerId" => (string) 监听器的ID + * "Targets" => (array) [ + * [ + * "Id" => (string) 服务节点的标识ID。限定枚举值:"UHost" / "UNI"/"UPM"/"IP";要更新的Targets数组长度至少为1,不超过20个 + * "Weight" => (integer) 服务节点的权重。限定取值:[1-100],默认值1;仅在加权轮询算法时有效;要更新的Targets数组长度至少为1,不超过20个 + * "Enabled" => (boolean) 服务节点是否启用。默认值true;要更新的Targets数组长度至少为1,不超过20个 + * "IsBackup" => (boolean) 服务节点是否为备节点。默认值false;要更新的Targets数组长度至少为1,不超过20个 + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateTargetsAttributeResponse + * @throws UCloudException + */ + public function updateTargetsAttribute(UpdateTargetsAttributeRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateTargetsAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateULBAttribute - 更新CLB名字业务组备注等属性字段 * * See also: https://docs.ucloud.cn/api/ulb-api/update_ulb_attribute * * Arguments: * * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) - * "ULBId" => (string) ULB资源ID - * "Name" => (string) 名字 - * "Tag" => (string) 业务 - * "Remark" => (string) 备注 + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULBId" => (string) CLB资源ID + * "Name" => (string) 名字,不传则默认不修改 + * "Tag" => (string) 业务,不传则默认不修改 + * "Remark" => (string) 备注,不传则默认不修改 + * "EnableLog" => (integer) 日志开关,1代表开启日志,0代表关闭日志,传1时必须同时传BucketName,TokenName与TokenId二选一 + * "BucketName" => (string) 设置用于存储ulb日志的bucket + * "TokenName" => (string) 用于指定上传到bucket所需的token,与TokenId选填其一即可 + * "TokenId" => (string) 用于指定上传到bucket所需的token,与TokenName选填其一即可 + * "IsWAFOn" => (string) 是否开启WAF。枚举类型:Yes,No,默认值为No * ] * * Outputs: @@ -955,7 +2439,7 @@ public function updateULBAttribute(UpdateULBAttributeRequest $request = null) } /** - * UpdateVServerAttribute - 更新VServer实例属性 + * UpdateVServerAttribute - 更新传统型负载均衡VServer实例属性 * * See also: https://docs.ucloud.cn/api/ulb-api/update_vserver_attribute * @@ -964,8 +2448,8 @@ public function updateULBAttribute(UpdateULBAttributeRequest $request = null) * $args = [ * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) - * "ULBId" => (string) 负载均衡实例ID - * "VServerId" => (string) VServer实例ID + * "ULBId" => (string) 传统型负载均衡实例ID + * "VServerId" => (string) 传统型负载均衡VServer实例ID * "VServerName" => (string) VServer实例名称,若无此字段则不做修改 * "Method" => (string) VServer负载均衡模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口); WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup -> 主备模式。ConsistentHash,SourcePort,ConsistentHashPort 只在报文转发中使用;Leastconn只在请求代理中使用;Roundrobin、Source和WeightRoundrobin,Backup在请求代理和报文转发中使用。默认为:"Roundrobin" * "PersistenceType" => (string) VServer会话保持模式,若无此字段则不做修改。枚举值:None:关闭;ServerInsert:自动生成KEY;UserDefined:用户自定义KEY。 @@ -976,6 +2460,10 @@ public function updateULBAttribute(UpdateULBAttributeRequest $request = null) * "Path" => (string) MonitorType 为 Path 时指定健康检查发送请求时的路径,默认为 / * "RequestMsg" => (string) 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 * "ResponseMsg" => (string) 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + * "SecurityPolicyId" => (string) 安全策略组ID + * "EnableCompression" => (integer) 0:关闭 1:开启,用于数据压缩功能 + * "ForwardPort" => (integer) 重定向端口,取值范围[0-65535];默认值为0,代表关闭;仅HTTP协议支持开启重定向功能 + * "EnableHTTP2" => (integer) 0:关闭 1:开启,用于开启http2功能;默认值为0 * ] * * Outputs: diff --git a/src/ULightHost/Apis/CheckULHostResourceCapacityRequest.php b/src/ULightHost/Apis/CheckULHostResourceCapacityRequest.php new file mode 100644 index 00000000..1f797ce8 --- /dev/null +++ b/src/ULightHost/Apis/CheckULHostResourceCapacityRequest.php @@ -0,0 +1,252 @@ + "CheckULHostResourceCapacity"]); + $this->markRequired("Region"); + $this->markRequired("ImageId"); + $this->markRequired("BundleId"); + } + + + + /** + * 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); + } + + /** + * ImageId: 镜像ID。 请通过 [DescribeImage](describe_image.html)获取 + * + * @return string|null + */ + public function getImageId() + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像ID。 请通过 [DescribeImage](describe_image.html)获取 + * + * @param string $imageId + */ + public function setImageId($imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * BundleId: 套餐ID。如:"ulh.c1m1s40b30t800" + * + * @return string|null + */ + public function getBundleId() + { + return $this->get("BundleId"); + } + + /** + * BundleId: 套餐ID。如:"ulh.c1m1s40b30t800" + * + * @param string $bundleId + */ + public function setBundleId($bundleId) + { + $this->set("BundleId", $bundleId); + } + + /** + * Name: 轻量应用主机名称。默认:套餐ID。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 轻量应用主机名称。默认:套餐ID。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * ChargeType: 计费模式。枚举值: \\ > Year,按年付费; \\ > Month,按月付费;\\ > ThirtyDay,30天期付费,跨境电商相关套餐使用此计费方式;默认:Month + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值: \\ > Year,按年付费; \\ > Month,按月付费;\\ > ThirtyDay,30天期付费,跨境电商相关套餐使用此计费方式;默认: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); + } + + /** + * VPCId: VPC ID。默认为当前地域的默认VPC。 + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC ID。默认为当前地域的默认VPC。 + * + * @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); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @return string|null + */ + public function getSecurityGroupId() + { + return $this->get("SecurityGroupId"); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @param string $securityGroupId + */ + public function setSecurityGroupId($securityGroupId) + { + $this->set("SecurityGroupId", $securityGroupId); + } + + /** + * CouponId: 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/ULightHost/Apis/CheckULHostResourceCapacityResponse.php b/src/ULightHost/Apis/CheckULHostResourceCapacityResponse.php new file mode 100644 index 00000000..e796337e --- /dev/null +++ b/src/ULightHost/Apis/CheckULHostResourceCapacityResponse.php @@ -0,0 +1,44 @@ +get("ResourceEnough"); + } + + /** + * ResourceEnough: 资源是否充足 + * + * @param boolean $resourceEnough + */ + public function setResourceEnough($resourceEnough) + { + $this->set("ResourceEnough", $resourceEnough); + } +} diff --git a/src/ULightHost/Apis/CreateULHostInstanceRequest.php b/src/ULightHost/Apis/CreateULHostInstanceRequest.php new file mode 100644 index 00000000..f9fe50ad --- /dev/null +++ b/src/ULightHost/Apis/CreateULHostInstanceRequest.php @@ -0,0 +1,273 @@ + "CreateULHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("ImageId"); + $this->markRequired("BundleId"); + $this->markRequired("Password"); + } + + + + /** + * 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); + } + + /** + * ImageId: 镜像ID。 请通过 [DescribeImage](describe_image.html)获取 + * + * @return string|null + */ + public function getImageId() + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像ID。 请通过 [DescribeImage](describe_image.html)获取 + * + * @param string $imageId + */ + public function setImageId($imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * BundleId: 套餐ID。如:"ulh.c1m1s40b30t800" + * + * @return string|null + */ + public function getBundleId() + { + return $this->get("BundleId"); + } + + /** + * BundleId: 套餐ID。如:"ulh.c1m1s40b30t800" + * + * @param string $bundleId + */ + public function setBundleId($bundleId) + { + $this->set("BundleId", $bundleId); + } + + /** + * Password: ULHost密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64 + * + * @return string|null + */ + public function getPassword() + { + return $this->get("Password"); + } + + /** + * Password: ULHost密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64 + * + * @param string $password + */ + public function setPassword($password) + { + $this->set("Password", $password); + } + + /** + * Name: 轻量应用主机名称。默认:套餐ID。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 轻量应用主机名称。默认:套餐ID。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * ChargeType: 计费模式。枚举值: \\ > Year,按年付费; \\ > Month,按月付费;\\ > ThirtyDay,30天期付费,跨境电商相关套餐使用此计费方式;默认:Month + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值: \\ > Year,按年付费; \\ > Month,按月付费;\\ > ThirtyDay,30天期付费,跨境电商相关套餐使用此计费方式;默认: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); + } + + /** + * VPCId: VPC ID。默认为当前地域的默认VPC。 + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC ID。默认为当前地域的默认VPC。 + * + * @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); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @return string|null + */ + public function getSecurityGroupId() + { + return $this->get("SecurityGroupId"); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @param string $securityGroupId + */ + public function setSecurityGroupId($securityGroupId) + { + $this->set("SecurityGroupId", $securityGroupId); + } + + /** + * CouponId: 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/ULightHost/Apis/CreateULHostInstanceResponse.php b/src/ULightHost/Apis/CreateULHostInstanceResponse.php new file mode 100644 index 00000000..91db2914 --- /dev/null +++ b/src/ULightHost/Apis/CreateULHostInstanceResponse.php @@ -0,0 +1,44 @@ +get("ULHostId"); + } + + /** + * ULHostId: 实例ID + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } +} diff --git a/src/ULightHost/Apis/DescribeULHostBundlesRequest.php b/src/ULightHost/Apis/DescribeULHostBundlesRequest.php new file mode 100644 index 00000000..8541a9fc --- /dev/null +++ b/src/ULightHost/Apis/DescribeULHostBundlesRequest.php @@ -0,0 +1,70 @@ + "DescribeULHostBundles"]); + $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/ULightHost/Apis/DescribeULHostBundlesResponse.php b/src/ULightHost/Apis/DescribeULHostBundlesResponse.php new file mode 100644 index 00000000..20800bbb --- /dev/null +++ b/src/ULightHost/Apis/DescribeULHostBundlesResponse.php @@ -0,0 +1,57 @@ +get("Bundles"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Bundle($item)); + } + return $result; + } + + /** + * Bundles: 套餐列表 + * + * @param Bundle[] $bundles + */ + public function setBundles(array $bundles) + { + $result = []; + foreach ($bundles as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULightHost/Apis/DescribeULHostImageRequest.php b/src/ULightHost/Apis/DescribeULHostImageRequest.php new file mode 100644 index 00000000..395c175a --- /dev/null +++ b/src/ULightHost/Apis/DescribeULHostImageRequest.php @@ -0,0 +1,250 @@ + "DescribeULHostImage"]); + $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); + } + + /** + * ImageType: 镜像类型。标准镜像:Base,应用镜像:App, 自定义镜像:Custom,默认返回所有类型 + * + * @return string|null + */ + public function getImageType() + { + return $this->get("ImageType"); + } + + /** + * ImageType: 镜像类型。标准镜像:Base,应用镜像:App, 自定义镜像:Custom,默认返回所有类型 + * + * @param string $imageType + */ + public function setImageType($imageType) + { + $this->set("ImageType", $imageType); + } + + /** + * Scene: 使用场景,当ImageType为"App"时生效。- Normal 常规专区- CrossBorder 跨境专区默认返回所有 + * + * @return string|null + */ + public function getScene() + { + return $this->get("Scene"); + } + + /** + * Scene: 使用场景,当ImageType为"App"时生效。- Normal 常规专区- CrossBorder 跨境专区默认返回所有 + * + * @param string $scene + */ + public function setScene($scene) + { + $this->set("Scene", $scene); + } + + /** + * OsType: 操作系统类型:Linux, Windows 默认返回所有类型 + * + * @return string|null + */ + public function getOsType() + { + return $this->get("OsType"); + } + + /** + * OsType: 操作系统类型:Linux, Windows 默认返回所有类型 + * + * @param string $osType + */ + public function setOsType($osType) + { + $this->set("OsType", $osType); + } + + /** + * ImageId: 镜像Id + * + * @return string|null + */ + public function getImageId() + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像Id + * + * @param string $imageId + */ + public function setImageId($imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * ImageIds: 镜像Id列表 + * + * @return string[]|null + */ + public function getImageIds() + { + return $this->get("ImageIds"); + } + + /** + * ImageIds: 镜像Id列表 + * + * @param string[] $imageIds + */ + public function setImageIds(array $imageIds) + { + $this->set("ImageIds", $imageIds); + } + + /** + * Tag: 业务组Id。默认:Default + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组Id。默认:Default + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * 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: 返回数据长度,默认为20 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/ULightHost/Apis/DescribeULHostImageResponse.php b/src/ULightHost/Apis/DescribeULHostImageResponse.php new file mode 100644 index 00000000..33e8ca59 --- /dev/null +++ b/src/ULightHost/Apis/DescribeULHostImageResponse.php @@ -0,0 +1,77 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的镜像总数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * ImageSet: 镜像列表详见 UHostImageSet + * + * @return ULHostImageSet[]|null + */ + public function getImageSet() + { + $items = $this->get("ImageSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULHostImageSet($item)); + } + return $result; + } + + /** + * ImageSet: 镜像列表详见 UHostImageSet + * + * @param ULHostImageSet[] $imageSet + */ + public function setImageSet(array $imageSet) + { + $result = []; + foreach ($imageSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULightHost/Apis/DescribeULHostInstanceRequest.php b/src/ULightHost/Apis/DescribeULHostInstanceRequest.php new file mode 100644 index 00000000..75072282 --- /dev/null +++ b/src/ULightHost/Apis/DescribeULHostInstanceRequest.php @@ -0,0 +1,130 @@ + "DescribeULHostInstance"]); + $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); + } + + /** + * ULHostIds: 【数组】轻量应用云主机ID。 + * + * @return string[]|null + */ + public function getULHostIds() + { + return $this->get("ULHostIds"); + } + + /** + * ULHostIds: 【数组】轻量应用云主机ID。 + * + * @param string[] $ulHostIds + */ + public function setULHostIds(array $ulHostIds) + { + $this->set("ULHostIds", $ulHostIds); + } + + /** + * 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: 返回数据长度,默认为20,最大100 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20,最大100 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/ULightHost/Apis/DescribeULHostInstanceResponse.php b/src/ULightHost/Apis/DescribeULHostInstanceResponse.php new file mode 100644 index 00000000..15306913 --- /dev/null +++ b/src/ULightHost/Apis/DescribeULHostInstanceResponse.php @@ -0,0 +1,60 @@ +get("ULHostInstanceSets"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULHostInstanceSet($item)); + } + return $result; + } + + /** + * ULHostInstanceSets: 实例列表 + * + * @param ULHostInstanceSet[] $ulHostInstanceSets + */ + public function setULHostInstanceSets(array $ulHostInstanceSets) + { + $result = []; + foreach ($ulHostInstanceSets as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULightHost/Apis/GetULHostInstancePriceRequest.php b/src/ULightHost/Apis/GetULHostInstancePriceRequest.php new file mode 100644 index 00000000..71e44500 --- /dev/null +++ b/src/ULightHost/Apis/GetULHostInstancePriceRequest.php @@ -0,0 +1,151 @@ + "GetULHostInstancePrice"]); + $this->markRequired("Region"); + $this->markRequired("BundleId"); + } + + + + /** + * 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); + } + + /** + * BundleId: 套餐ID + * + * @return string|null + */ + public function getBundleId() + { + return $this->get("BundleId"); + } + + /** + * BundleId: 套餐ID + * + * @param string $bundleId + */ + public function setBundleId($bundleId) + { + $this->set("BundleId", $bundleId); + } + + /** + * ChargeType: 获取指定计费模式的价格。枚举值:\\ > Year,按年付费; \\ > Month。未指定时,返回所有计费模式价格 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 获取指定计费模式的价格。枚举值:\\ > Year,按年付费; \\ > Month。未指定时,返回所有计费模式价格 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Count: 购买台数,范围[1,5]。默认:1 + * + * @return integer|null + */ + public function getCount() + { + return $this->get("Count"); + } + + /** + * Count: 购买台数,范围[1,5]。默认:1 + * + * @param int $count + */ + public function setCount($count) + { + $this->set("Count", $count); + } + + /** + * 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); + } +} diff --git a/src/ULightHost/Apis/GetULHostInstancePriceResponse.php b/src/ULightHost/Apis/GetULHostInstancePriceResponse.php new file mode 100644 index 00000000..bae5aab5 --- /dev/null +++ b/src/ULightHost/Apis/GetULHostInstancePriceResponse.php @@ -0,0 +1,57 @@ +get("PriceSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULHostPriceSet($item)); + } + return $result; + } + + /** + * PriceSet: 价格 + * + * @param ULHostPriceSet[] $priceSet + */ + public function setPriceSet(array $priceSet) + { + $result = []; + foreach ($priceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULightHost/Apis/GetULHostRenewPriceRequest.php b/src/ULightHost/Apis/GetULHostRenewPriceRequest.php new file mode 100644 index 00000000..70ebc743 --- /dev/null +++ b/src/ULightHost/Apis/GetULHostRenewPriceRequest.php @@ -0,0 +1,111 @@ + "GetULHostRenewPrice"]); + $this->markRequired("Region"); + $this->markRequired("ULHostId"); + } + + + + /** + * 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); + } + + /** + * ULHostId: ULHost实例ID + * + * @return string|null + */ + public function getULHostId() + { + return $this->get("ULHostId"); + } + + /** + * ULHostId: ULHost实例ID + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } + + /** + * ChargeType: 计费类型。支持:Year/Month;默认:Month + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型。支持:Year/Month;默认:Month + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } +} diff --git a/src/ULightHost/Apis/GetULHostRenewPriceResponse.php b/src/ULightHost/Apis/GetULHostRenewPriceResponse.php new file mode 100644 index 00000000..22e02349 --- /dev/null +++ b/src/ULightHost/Apis/GetULHostRenewPriceResponse.php @@ -0,0 +1,57 @@ +get("PriceSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULHostPriceSet($item)); + } + return $result; + } + + /** + * PriceSet: 价格 + * + * @param ULHostPriceSet[] $priceSet + */ + public function setPriceSet(array $priceSet) + { + $result = []; + foreach ($priceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULightHost/Apis/ModifyULHostAttributeRequest.php b/src/ULightHost/Apis/ModifyULHostAttributeRequest.php new file mode 100644 index 00000000..dd22dd5f --- /dev/null +++ b/src/ULightHost/Apis/ModifyULHostAttributeRequest.php @@ -0,0 +1,131 @@ + "ModifyULHostAttribute"]); + $this->markRequired("Region"); + $this->markRequired("ULHostId"); + } + + + + /** + * 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); + } + + /** + * ULHostId: ULHost实例Id + * + * @return string|null + */ + public function getULHostId() + { + return $this->get("ULHostId"); + } + + /** + * ULHostId: ULHost实例Id + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } + + /** + * Name: 名称。和Remark至少选择一个进行修改 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 名称。和Remark至少选择一个进行修改 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Remark: 备注。和Name至少选择一个进行修改 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注。和Name至少选择一个进行修改 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/ULightHost/Apis/ModifyULHostAttributeResponse.php b/src/ULightHost/Apis/ModifyULHostAttributeResponse.php new file mode 100644 index 00000000..d4fc70dd --- /dev/null +++ b/src/ULightHost/Apis/ModifyULHostAttributeResponse.php @@ -0,0 +1,44 @@ +get("ULHostId"); + } + + /** + * ULHostId: ULHost实例Id + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } +} diff --git a/src/ULightHost/Apis/PoweroffULHostInstanceRequest.php b/src/ULightHost/Apis/PoweroffULHostInstanceRequest.php new file mode 100644 index 00000000..29982bda --- /dev/null +++ b/src/ULightHost/Apis/PoweroffULHostInstanceRequest.php @@ -0,0 +1,91 @@ + "PoweroffULHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("ULHostId"); + } + + + + /** + * 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); + } + + /** + * ULHostId: ULHost实例ID + * + * @return string|null + */ + public function getULHostId() + { + return $this->get("ULHostId"); + } + + /** + * ULHostId: ULHost实例ID + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } +} diff --git a/src/ULightHost/Apis/PoweroffULHostInstanceResponse.php b/src/ULightHost/Apis/PoweroffULHostInstanceResponse.php new file mode 100644 index 00000000..b6a028f6 --- /dev/null +++ b/src/ULightHost/Apis/PoweroffULHostInstanceResponse.php @@ -0,0 +1,44 @@ +get("ULHostId"); + } + + /** + * ULHostId: ULHost实例ID + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } +} diff --git a/src/ULightHost/Apis/RebootULHostInstanceRequest.php b/src/ULightHost/Apis/RebootULHostInstanceRequest.php new file mode 100644 index 00000000..b3f65d61 --- /dev/null +++ b/src/ULightHost/Apis/RebootULHostInstanceRequest.php @@ -0,0 +1,91 @@ + "RebootULHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("ULHostId"); + } + + + + /** + * 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); + } + + /** + * ULHostId: ULHost实例ID + * + * @return string|null + */ + public function getULHostId() + { + return $this->get("ULHostId"); + } + + /** + * ULHostId: ULHost实例ID + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } +} diff --git a/src/ULightHost/Apis/RebootULHostInstanceResponse.php b/src/ULightHost/Apis/RebootULHostInstanceResponse.php new file mode 100644 index 00000000..c23ca4c2 --- /dev/null +++ b/src/ULightHost/Apis/RebootULHostInstanceResponse.php @@ -0,0 +1,44 @@ +get("ULHostId"); + } + + /** + * ULHostId: ULHost实例ID + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } +} diff --git a/src/ULightHost/Apis/ReinstallULHostInstanceRequest.php b/src/ULightHost/Apis/ReinstallULHostInstanceRequest.php new file mode 100644 index 00000000..c35d884a --- /dev/null +++ b/src/ULightHost/Apis/ReinstallULHostInstanceRequest.php @@ -0,0 +1,133 @@ + "ReinstallULHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("ImageId"); + $this->markRequired("ULHostId"); + $this->markRequired("Password"); + } + + + + /** + * 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); + } + + /** + * ImageId: 镜像Id。暂不支持使用自定义镜像重装 + * + * @return string|null + */ + public function getImageId() + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像Id。暂不支持使用自定义镜像重装 + * + * @param string $imageId + */ + public function setImageId($imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * ULHostId: 实例Id + * + * @return string|null + */ + public function getULHostId() + { + return $this->get("ULHostId"); + } + + /** + * ULHostId: 实例Id + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } + + /** + * Password: 登陆密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64 UGFzc3dvcmQx + * + * @return string|null + */ + public function getPassword() + { + return $this->get("Password"); + } + + /** + * Password: 登陆密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64 UGFzc3dvcmQx + * + * @param string $password + */ + public function setPassword($password) + { + $this->set("Password", $password); + } +} diff --git a/src/ULightHost/Apis/ReinstallULHostInstanceResponse.php b/src/ULightHost/Apis/ReinstallULHostInstanceResponse.php new file mode 100644 index 00000000..b71256a0 --- /dev/null +++ b/src/ULightHost/Apis/ReinstallULHostInstanceResponse.php @@ -0,0 +1,44 @@ +get("ULHostId"); + } + + /** + * ULHostId: 实例Id + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } +} diff --git a/src/ULightHost/Apis/ResetULHostInstancePasswordRequest.php b/src/ULightHost/Apis/ResetULHostInstancePasswordRequest.php new file mode 100644 index 00000000..12fbdab6 --- /dev/null +++ b/src/ULightHost/Apis/ResetULHostInstancePasswordRequest.php @@ -0,0 +1,112 @@ + "ResetULHostInstancePassword"]); + $this->markRequired("Region"); + $this->markRequired("ULHostId"); + $this->markRequired("Password"); + } + + + + /** + * 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); + } + + /** + * ULHostId: ULHost实例ID + * + * @return string|null + */ + public function getULHostId() + { + return $this->get("ULHostId"); + } + + /** + * ULHostId: ULHost实例ID + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } + + /** + * Password: ULHost新密码(密码格式使用BASE64编码) + * + * @return string|null + */ + public function getPassword() + { + return $this->get("Password"); + } + + /** + * Password: ULHost新密码(密码格式使用BASE64编码) + * + * @param string $password + */ + public function setPassword($password) + { + $this->set("Password", $password); + } +} diff --git a/src/ULightHost/Apis/ResetULHostInstancePasswordResponse.php b/src/ULightHost/Apis/ResetULHostInstancePasswordResponse.php new file mode 100644 index 00000000..a5422297 --- /dev/null +++ b/src/ULightHost/Apis/ResetULHostInstancePasswordResponse.php @@ -0,0 +1,44 @@ +get("ULHostId"); + } + + /** + * ULHostId: ULHost实例ID + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } +} diff --git a/src/ULightHost/Apis/StartULHostInstanceRequest.php b/src/ULightHost/Apis/StartULHostInstanceRequest.php new file mode 100644 index 00000000..bd4930ae --- /dev/null +++ b/src/ULightHost/Apis/StartULHostInstanceRequest.php @@ -0,0 +1,91 @@ + "StartULHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("ULHostId"); + } + + + + /** + * 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); + } + + /** + * ULHostId: ULHost实例ID + * + * @return string|null + */ + public function getULHostId() + { + return $this->get("ULHostId"); + } + + /** + * ULHostId: ULHost实例ID + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } +} diff --git a/src/ULightHost/Apis/StartULHostInstanceResponse.php b/src/ULightHost/Apis/StartULHostInstanceResponse.php new file mode 100644 index 00000000..c6ba8faa --- /dev/null +++ b/src/ULightHost/Apis/StartULHostInstanceResponse.php @@ -0,0 +1,44 @@ +get("ULHostId"); + } + + /** + * ULHostId: ULHost实例ID + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } +} diff --git a/src/ULightHost/Apis/StopULHostInstanceRequest.php b/src/ULightHost/Apis/StopULHostInstanceRequest.php new file mode 100644 index 00000000..bc98a371 --- /dev/null +++ b/src/ULightHost/Apis/StopULHostInstanceRequest.php @@ -0,0 +1,91 @@ + "StopULHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("ULHostId"); + } + + + + /** + * 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); + } + + /** + * ULHostId: ULHost实例ID。 + * + * @return string|null + */ + public function getULHostId() + { + return $this->get("ULHostId"); + } + + /** + * ULHostId: ULHost实例ID。 + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } +} diff --git a/src/ULightHost/Apis/StopULHostInstanceResponse.php b/src/ULightHost/Apis/StopULHostInstanceResponse.php new file mode 100644 index 00000000..ea043185 --- /dev/null +++ b/src/ULightHost/Apis/StopULHostInstanceResponse.php @@ -0,0 +1,44 @@ +get("ULHostId"); + } + + /** + * ULHostId: ULHost实例ID + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } +} diff --git a/src/ULightHost/Apis/TerminateULHostInstanceRequest.php b/src/ULightHost/Apis/TerminateULHostInstanceRequest.php new file mode 100644 index 00000000..31b8717c --- /dev/null +++ b/src/ULightHost/Apis/TerminateULHostInstanceRequest.php @@ -0,0 +1,111 @@ + "TerminateULHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("ULHostId"); + } + + + + /** + * 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); + } + + /** + * ULHostId: ULHost资源Id + * + * @return string|null + */ + public function getULHostId() + { + return $this->get("ULHostId"); + } + + /** + * ULHostId: ULHost资源Id + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } + + /** + * ReleaseUDisk: 删除主机时是否同时删除挂载的数据盘。默认为false。 + * + * @return boolean|null + */ + public function getReleaseUDisk() + { + return $this->get("ReleaseUDisk"); + } + + /** + * ReleaseUDisk: 删除主机时是否同时删除挂载的数据盘。默认为false。 + * + * @param boolean $releaseUDisk + */ + public function setReleaseUDisk($releaseUDisk) + { + $this->set("ReleaseUDisk", $releaseUDisk); + } +} diff --git a/src/ULightHost/Apis/TerminateULHostInstanceResponse.php b/src/ULightHost/Apis/TerminateULHostInstanceResponse.php new file mode 100644 index 00000000..25e74810 --- /dev/null +++ b/src/ULightHost/Apis/TerminateULHostInstanceResponse.php @@ -0,0 +1,64 @@ +get("InRecycle"); + } + + /** + * InRecycle: 用于判断主机删除时是否进入回收站。放入回收站:"Yes", 彻底删除:“No”。 + * + * @param string $inRecycle + */ + public function setInRecycle($inRecycle) + { + $this->set("InRecycle", $inRecycle); + } + + /** + * ULHostId: ULHost 实例 Id + * + * @return string|null + */ + public function getULHostId() + { + return $this->get("ULHostId"); + } + + /** + * ULHostId: ULHost 实例 Id + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } +} diff --git a/src/ULightHost/Models/Bundle.php b/src/ULightHost/Models/Bundle.php new file mode 100644 index 00000000..5e34a59d --- /dev/null +++ b/src/ULightHost/Models/Bundle.php @@ -0,0 +1,144 @@ +get("BundleId"); + } + + /** + * BundleId: 套餐ID。 + * + * @param string $bundleId + */ + public function setBundleId($bundleId) + { + $this->set("BundleId", $bundleId); + } + + /** + * 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: 内存大小。单位:MB。 + * + * @return integer|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小。单位:MB。 + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * SysDiskSpace: 系统盘大小。单位:GB。 + * + * @return integer|null + */ + public function getSysDiskSpace() + { + return $this->get("SysDiskSpace"); + } + + /** + * SysDiskSpace: 系统盘大小。单位:GB。 + * + * @param int $sysDiskSpace + */ + public function setSysDiskSpace($sysDiskSpace) + { + $this->set("SysDiskSpace", $sysDiskSpace); + } + + /** + * Bandwidth: 外网带宽。单位:Mbps。 + * + * @return integer|null + */ + public function getBandwidth() + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 外网带宽。单位:Mbps。 + * + * @param int $bandwidth + */ + public function setBandwidth($bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * TrafficPacket: 流量包大小。单位:GB。 + * + * @return integer|null + */ + public function getTrafficPacket() + { + return $this->get("TrafficPacket"); + } + + /** + * TrafficPacket: 流量包大小。单位:GB。 + * + * @param int $trafficPacket + */ + public function setTrafficPacket($trafficPacket) + { + $this->set("TrafficPacket", $trafficPacket); + } +} diff --git a/src/ULightHost/Models/ExclusiveUTPInfo.php b/src/ULightHost/Models/ExclusiveUTPInfo.php new file mode 100644 index 00000000..75ce0a0d --- /dev/null +++ b/src/ULightHost/Models/ExclusiveUTPInfo.php @@ -0,0 +1,164 @@ +get("TotalSize"); + } + + /** + * TotalSize: 当前周期总流量 + * + * @param int $totalSize + */ + public function setTotalSize($totalSize) + { + $this->set("TotalSize", $totalSize); + } + + /** + * AvailableSize: 当前周期剩余流量 + * + * @return integer|null + */ + public function getAvailableSize() + { + return $this->get("AvailableSize"); + } + + /** + * AvailableSize: 当前周期剩余流量 + * + * @param int $availableSize + */ + public function setAvailableSize($availableSize) + { + $this->set("AvailableSize", $availableSize); + } + + /** + * UsedSize: 当前周期已使用流量 + * + * @return integer|null + */ + public function getUsedSize() + { + return $this->get("UsedSize"); + } + + /** + * UsedSize: 当前周期已使用流量 + * + * @param int $usedSize + */ + public function setUsedSize($usedSize) + { + $this->set("UsedSize", $usedSize); + } + + /** + * ExcessSize: 当前周期超出限额的流量 + * + * @return integer|null + */ + public function getExcessSize() + { + return $this->get("ExcessSize"); + } + + /** + * ExcessSize: 当前周期超出限额的流量 + * + * @param int $excessSize + */ + public function setExcessSize($excessSize) + { + $this->set("ExcessSize", $excessSize); + } + + /** + * LastResetTime: 上次重置时间 + * + * @return integer|null + */ + public function getLastResetTime() + { + return $this->get("LastResetTime"); + } + + /** + * LastResetTime: 上次重置时间 + * + * @param int $lastResetTime + */ + public function setLastResetTime($lastResetTime) + { + $this->set("LastResetTime", $lastResetTime); + } + + /** + * NextResetTime: 下次重置时间 + * + * @return integer|null + */ + public function getNextResetTime() + { + return $this->get("NextResetTime"); + } + + /** + * NextResetTime: 下次重置时间 + * + * @param int $nextResetTime + */ + public function setNextResetTime($nextResetTime) + { + $this->set("NextResetTime", $nextResetTime); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } +} diff --git a/src/ULightHost/Models/UHostIPSet.php b/src/ULightHost/Models/UHostIPSet.php new file mode 100644 index 00000000..e1d053ee --- /dev/null +++ b/src/ULightHost/Models/UHostIPSet.php @@ -0,0 +1,244 @@ +get("IPMode"); + } + + /** + * IPMode: IPv4/IPv6; + * + * @param string $ipMode + */ + public function setIPMode($ipMode) + { + $this->set("IPMode", $ipMode); + } + + /** + * Default: 内网 Private 类型下,表示是否为默认网卡。true: 是默认网卡;其他值:不是。 + * + * @return string|null + */ + public function getDefault() + { + return $this->get("Default"); + } + + /** + * Default: 内网 Private 类型下,表示是否为默认网卡。true: 是默认网卡;其他值:不是。 + * + * @param string $default + */ + public function setDefault($default) + { + $this->set("Default", $default); + } + + /** + * Mac: 内网 Private 类型下,当前网卡的Mac。 + * + * @return string|null + */ + public function getMac() + { + return $this->get("Mac"); + } + + /** + * Mac: 内网 Private 类型下,当前网卡的Mac。 + * + * @param string $mac + */ + public function setMac($mac) + { + $this->set("Mac", $mac); + } + + /** + * Weight: 当前EIP的权重。权重最大的为当前的出口IP。 + * + * @return integer|null + */ + public function getWeight() + { + return $this->get("Weight"); + } + + /** + * Weight: 当前EIP的权重。权重最大的为当前的出口IP。 + * + * @param int $weight + */ + public function setWeight($weight) + { + $this->set("Weight", $weight); + } + + /** + * Type: 国际: Internation,BGP: Bgp,内网: Private + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 国际: Internation,BGP: Bgp,内网: Private + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * IPId: 外网IP资源ID 。(内网IP无对应的资源ID) + * + * @return string|null + */ + public function getIPId() + { + return $this->get("IPId"); + } + + /** + * IPId: 外网IP资源ID 。(内网IP无对应的资源ID) + * + * @param string $ipId + */ + public function setIPId($ipId) + { + $this->set("IPId", $ipId); + } + + /** + * IP: IP地址 + * + * @return string|null + */ + public function getIP() + { + return $this->get("IP"); + } + + /** + * IP: IP地址 + * + * @param string $ip + */ + public function setIP($ip) + { + $this->set("IP", $ip); + } + + /** + * Bandwidth: IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + * + * @return integer|null + */ + public function getBandwidth() + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + * + * @param int $bandwidth + */ + public function setBandwidth($bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * VPCId: IP地址对应的VPC ID。(北京一不支持,字段返回为空) + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: IP地址对应的VPC ID。(北京一不支持,字段返回为空) + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: IP地址对应的子网 ID。(北京一不支持,字段返回为空) + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: IP地址对应的子网 ID。(北京一不支持,字段返回为空) + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * NetworkInterfaceId: 弹性网卡为默认网卡时,返回对应的 ID 值 + * + * @return string|null + */ + public function getNetworkInterfaceId() + { + return $this->get("NetworkInterfaceId"); + } + + /** + * NetworkInterfaceId: 弹性网卡为默认网卡时,返回对应的 ID 值 + * + * @param string $networkInterfaceId + */ + public function setNetworkInterfaceId($networkInterfaceId) + { + $this->set("NetworkInterfaceId", $networkInterfaceId); + } +} diff --git a/src/ULightHost/Models/ULHostDiskSet.php b/src/ULightHost/Models/ULHostDiskSet.php new file mode 100644 index 00000000..96fc9256 --- /dev/null +++ b/src/ULightHost/Models/ULHostDiskSet.php @@ -0,0 +1,144 @@ +get("DiskId"); + } + + /** + * DiskId: 磁盘Id + * + * @param string $diskId + */ + public function setDiskId($diskId) + { + $this->set("DiskId", $diskId); + } + + /** + * DiskType: 磁盘类型。如:"CLOUD_RSSD"、"CLOUD_SSD" + * + * @return string|null + */ + public function getDiskType() + { + return $this->get("DiskType"); + } + + /** + * DiskType: 磁盘类型。如:"CLOUD_RSSD"、"CLOUD_SSD" + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * Type: 磁盘类型。系统盘:"Boot";数据盘:"Data" + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 磁盘类型。系统盘:"Boot";数据盘:"Data" + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Size: 磁盘大小。单位:GB + * + * @return integer|null + */ + public function getSize() + { + return $this->get("Size"); + } + + /** + * Size: 磁盘大小。单位:GB + * + * @param int $size + */ + public function setSize($size) + { + $this->set("Size", $size); + } + + /** + * IsBoot: 是否为系统盘。是:"True";否:"False" + * + * @return string|null + */ + public function getIsBoot() + { + return $this->get("IsBoot"); + } + + /** + * IsBoot: 是否为系统盘。是:"True";否:"False" + * + * @param string $isBoot + */ + public function setIsBoot($isBoot) + { + $this->set("IsBoot", $isBoot); + } + + /** + * Drive: 磁盘盘符。系统盘:"vda" + * + * @return string|null + */ + public function getDrive() + { + return $this->get("Drive"); + } + + /** + * Drive: 磁盘盘符。系统盘:"vda" + * + * @param string $drive + */ + public function setDrive($drive) + { + $this->set("Drive", $drive); + } +} diff --git a/src/ULightHost/Models/ULHostImageSet.php b/src/ULightHost/Models/ULHostImageSet.php new file mode 100644 index 00000000..99124da1 --- /dev/null +++ b/src/ULightHost/Models/ULHostImageSet.php @@ -0,0 +1,384 @@ +get("Zone"); + } + + /** + * Zone: 可用区,参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ImageId: 镜像ID + * + * @return string|null + */ + public function getImageId() + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像ID + * + * @param string $imageId + */ + public function setImageId($imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * ImageName: 镜像名称 + * + * @return string|null + */ + public function getImageName() + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称 + * + * @param string $imageName + */ + public function setImageName($imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * DisplayName: 用于控制台显示的名称 + * + * @return string|null + */ + public function getDisplayName() + { + return $this->get("DisplayName"); + } + + /** + * DisplayName: 用于控制台显示的名称 + * + * @param string $displayName + */ + public function setDisplayName($displayName) + { + $this->set("DisplayName", $displayName); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * OsType: 操作系统类型:Linux,Windows + * + * @return string|null + */ + public function getOsType() + { + return $this->get("OsType"); + } + + /** + * OsType: 操作系统类型:Linux,Windows + * + * @param string $osType + */ + public function setOsType($osType) + { + $this->set("OsType", $osType); + } + + /** + * OsName: 操作系统名称 + * + * @return string|null + */ + public function getOsName() + { + return $this->get("OsName"); + } + + /** + * OsName: 操作系统名称 + * + * @param string $osName + */ + public function setOsName($osName) + { + $this->set("OsName", $osName); + } + + /** + * ImageType: 镜像类型 标准镜像:Base, 行业镜像:Business,自定义镜像:Custom + * + * @return string|null + */ + public function getImageType() + { + return $this->get("ImageType"); + } + + /** + * ImageType: 镜像类型 标准镜像:Base, 行业镜像:Business,自定义镜像:Custom + * + * @param string $imageType + */ + public function setImageType($imageType) + { + $this->set("ImageType", $imageType); + } + + /** + * Features: 特殊状态标识,目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra(网络增强2.0), NetEnhanced_Extreme(网络增强3.0), HotPlug(热升级), GPU(GPU镜像),CloudInit, IPv6(支持IPv6网络),RssdAttachable(支持RSSD云盘),Vgpu_AMD(支持AMD的vgpu),Vgpu_NVIDIA(支持NVIDIA的vgpu),Aarch64_Type(支持arm64架构) + * + * @return string[]|null + */ + public function getFeatures() + { + return $this->get("Features"); + } + + /** + * Features: 特殊状态标识,目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra(网络增强2.0), NetEnhanced_Extreme(网络增强3.0), HotPlug(热升级), GPU(GPU镜像),CloudInit, IPv6(支持IPv6网络),RssdAttachable(支持RSSD云盘),Vgpu_AMD(支持AMD的vgpu),Vgpu_NVIDIA(支持NVIDIA的vgpu),Aarch64_Type(支持arm64架构) + * + * @param string[] $features + */ + public function setFeatures(array $features) + { + $this->set("Features", $features); + } + + /** + * IntegratedSoftware: 集成软件名称(仅行业镜像将返回这个值) + * + * @return string|null + */ + public function getIntegratedSoftware() + { + return $this->get("IntegratedSoftware"); + } + + /** + * IntegratedSoftware: 集成软件名称(仅行业镜像将返回这个值) + * + * @param string $integratedSoftware + */ + public function setIntegratedSoftware($integratedSoftware) + { + $this->set("IntegratedSoftware", $integratedSoftware); + } + + /** + * State: 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable,复制中:Copying + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable,复制中:Copying + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * ImageDescription: 镜像描述 + * + * @return string|null + */ + public function getImageDescription() + { + return $this->get("ImageDescription"); + } + + /** + * ImageDescription: 镜像描述 + * + * @param string $imageDescription + */ + public function setImageDescription($imageDescription) + { + $this->set("ImageDescription", $imageDescription); + } + + /** + * CreateTime: 创建时间,格式为Unix时间戳 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间,格式为Unix时间戳 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ImageSize: 镜像大小 + * + * @return integer|null + */ + public function getImageSize() + { + return $this->get("ImageSize"); + } + + /** + * ImageSize: 镜像大小 + * + * @param int $imageSize + */ + public function setImageSize($imageSize) + { + $this->set("ImageSize", $imageSize); + } + + /** + * MinimalCPU: 默认值为空'''。当CentOS 7.3/7.4/7.5等镜像会标记为“Broadwell” + * + * @return string|null + */ + public function getMinimalCPU() + { + return $this->get("MinimalCPU"); + } + + /** + * MinimalCPU: 默认值为空'''。当CentOS 7.3/7.4/7.5等镜像会标记为“Broadwell” + * + * @param string $minimalCPU + */ + public function setMinimalCPU($minimalCPU) + { + $this->set("MinimalCPU", $minimalCPU); + } + + /** + * MaintainEol: 系统EOL的时间,格式:YYYY/MM/DD + * + * @return string|null + */ + public function getMaintainEol() + { + return $this->get("MaintainEol"); + } + + /** + * MaintainEol: 系统EOL的时间,格式:YYYY/MM/DD + * + * @param string $maintainEol + */ + public function setMaintainEol($maintainEol) + { + $this->set("MaintainEol", $maintainEol); + } + + /** + * SceneCategories: 场景分类,目前包含Featured(精选),PreInstalledDrivers(预装驱动),AIPainting(AI绘画),AIModels(AI模型),HPC(高性能计算) + * + * @return string[]|null + */ + public function getSceneCategories() + { + return $this->get("SceneCategories"); + } + + /** + * SceneCategories: 场景分类,目前包含Featured(精选),PreInstalledDrivers(预装驱动),AIPainting(AI绘画),AIModels(AI模型),HPC(高性能计算) + * + * @param string[] $sceneCategories + */ + public function setSceneCategories(array $sceneCategories) + { + $this->set("SceneCategories", $sceneCategories); + } + + /** + * ImageLogoLink: 应用镜像图标url + * + * @return string|null + */ + public function getImageLogoLink() + { + return $this->get("ImageLogoLink"); + } + + /** + * ImageLogoLink: 应用镜像图标url + * + * @param string $imageLogoLink + */ + public function setImageLogoLink($imageLogoLink) + { + $this->set("ImageLogoLink", $imageLogoLink); + } +} diff --git a/src/ULightHost/Models/ULHostInstanceSet.php b/src/ULightHost/Models/ULHostInstanceSet.php new file mode 100644 index 00000000..8e68e24d --- /dev/null +++ b/src/ULightHost/Models/ULHostInstanceSet.php @@ -0,0 +1,428 @@ +get("Zone"); + } + + /** + * Zone: 可用区。 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ULHostId: 实例Id。 + * + * @return string|null + */ + public function getULHostId() + { + return $this->get("ULHostId"); + } + + /** + * ULHostId: 实例Id。 + * + * @param string $ulHostId + */ + public function setULHostId($ulHostId) + { + $this->set("ULHostId", $ulHostId); + } + + /** + * Name: 实例名称。默认套餐Id + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 实例名称。默认套餐Id + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Tag: 业务组。 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组。 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注。 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注。 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * ImageId: 镜像Id。 + * + * @return string|null + */ + public function getImageId() + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像Id。 + * + * @param string $imageId + */ + public function setImageId($imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * ImageName: 镜像名称。 + * + * @return string|null + */ + public function getImageName() + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称。 + * + * @param string $imageName + */ + public function setImageName($imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * Apps: 【数组】镜像包含的应用列表。 + * + * @return string[]|null + */ + public function getApps() + { + return $this->get("Apps"); + } + + /** + * Apps: 【数组】镜像包含的应用列表。 + * + * @param string[] $apps + */ + public function setApps(array $apps) + { + $this->set("Apps", $apps); + } + + /** + * 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: 内存。单位:MB + * + * @return integer|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 内存。单位:MB + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * State: 实例状态。枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\> 运行中: Running; \\> 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ > 未知(空字符串,获取状态超时或出错):"" + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 实例状态。枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\> 运行中: Running; \\> 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ > 未知(空字符串,获取状态超时或出错):"" + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * ChargeType: 计费模式。枚举值:Month/Year + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值:Month/Year + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * IPSet: IP信息 + * + * @return UHostIPSet[]|null + */ + public function getIPSet() + { + $items = $this->get("IPSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UHostIPSet($item)); + } + return $result; + } + + /** + * IPSet: IP信息 + * + * @param UHostIPSet[] $ipSet + */ + public function setIPSet(array $ipSet) + { + $result = []; + foreach ($ipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DiskSet: 磁盘信息 + * + * @return ULHostDiskSet[]|null + */ + public function getDiskSet() + { + $items = $this->get("DiskSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULHostDiskSet($item)); + } + return $result; + } + + /** + * DiskSet: 磁盘信息 + * + * @param ULHostDiskSet[] $diskSet + */ + public function setDiskSet(array $diskSet) + { + $result = []; + foreach ($diskSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * EIPExclusiveUTPInfo: 流量包详情信息 + * + * @return ExclusiveUTPInfo|null + */ + public function getEIPExclusiveUTPInfo() + { + return new ExclusiveUTPInfo($this->get("EIPExclusiveUTPInfo")); + } + + /** + * EIPExclusiveUTPInfo: 流量包详情信息 + * + * @param ExclusiveUTPInfo $eipExclusiveUTPInfo + */ + public function setEIPExclusiveUTPInfo(array $eipExclusiveUTPInfo) + { + $this->set("EIPExclusiveUTPInfo", $eipExclusiveUTPInfo->getAll()); + } + + /** + * AutoRenew: 是否自动续费。枚举值:Yes/No + * + * @return string|null + */ + public function getAutoRenew() + { + return $this->get("AutoRenew"); + } + + /** + * AutoRenew: 是否自动续费。枚举值:Yes/No + * + * @param string $autoRenew + */ + public function setAutoRenew($autoRenew) + { + $this->set("AutoRenew", $autoRenew); + } + + /** + * IsExpire: 是否过期。枚举值:Yes/No + * + * @return string|null + */ + public function getIsExpire() + { + return $this->get("IsExpire"); + } + + /** + * IsExpire: 是否过期。枚举值:Yes/No + * + * @param string $isExpire + */ + public function setIsExpire($isExpire) + { + $this->set("IsExpire", $isExpire); + } + + /** + * ExpireTime: 过期时间。Unix时间戳 + * + * @return integer|null + */ + public function getExpireTime() + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 过期时间。Unix时间戳 + * + * @param int $expireTime + */ + public function setExpireTime($expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * CreateTime: 创建时间。Unix时间戳 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间。Unix时间戳 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } +} diff --git a/src/ULightHost/Models/ULHostPriceSet.php b/src/ULightHost/Models/ULHostPriceSet.php new file mode 100644 index 00000000..a865de63 --- /dev/null +++ b/src/ULightHost/Models/ULHostPriceSet.php @@ -0,0 +1,84 @@ +get("ChargeType"); + } + + /** + * ChargeType: 计费模式 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: 价格 + * + * @return float|null + */ + public function getPrice() + { + return $this->get("Price"); + } + + /** + * Price: 价格 + * + * @param float $price + */ + public function setPrice($price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 原价 + * + * @return float|null + */ + public function getOriginalPrice() + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 原价 + * + * @param float $originalPrice + */ + public function setOriginalPrice($originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } +} diff --git a/src/ULightHost/ULightHostClient.php b/src/ULightHost/ULightHostClient.php new file mode 100644 index 00000000..ef5b23eb --- /dev/null +++ b/src/ULightHost/ULightHostClient.php @@ -0,0 +1,610 @@ + (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ImageId" => (string) 镜像ID。 请通过 [DescribeImage](describe_image.html)获取 + * "BundleId" => (string) 套餐ID。如:"ulh.c1m1s40b30t800" + * "Name" => (string) 轻量应用主机名称。默认:套餐ID。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。 + * "ChargeType" => (string) 计费模式。枚举值: \\ > Year,按年付费; \\ > Month,按月付费;\\ > ThirtyDay,30天期付费,跨境电商相关套餐使用此计费方式;默认:Month + * "Quantity" => (integer) 购买时长。默认:1。不支持购买到月末 + * "VPCId" => (string) VPC ID。默认为当前地域的默认VPC。 + * "SubnetId" => (string) 子网 ID。默认为当前地域的默认子网。 + * "SecurityGroupId" => (string) 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * "CouponId" => (string) 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + * ] + * + * Outputs: + * + * $outputs = [ + * "ResourceEnough" => (boolean) 资源是否充足 + * ] + * + * @return CheckULHostResourceCapacityResponse + * @throws UCloudException + */ + public function checkULHostResourceCapacity(CheckULHostResourceCapacityRequest $request = null) + { + $resp = $this->invoke($request); + return new CheckULHostResourceCapacityResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateULHostInstance - 创建轻量应用云主机 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/create_ul_host_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) + * "ImageId" => (string) 镜像ID。 请通过 [DescribeImage](describe_image.html)获取 + * "BundleId" => (string) 套餐ID。如:"ulh.c1m1s40b30t800" + * "Password" => (string) ULHost密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64 + * "Name" => (string) 轻量应用主机名称。默认:套餐ID。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。 + * "ChargeType" => (string) 计费模式。枚举值: \\ > Year,按年付费; \\ > Month,按月付费;\\ > ThirtyDay,30天期付费,跨境电商相关套餐使用此计费方式;默认:Month + * "Quantity" => (integer) 购买时长。默认:1。不支持购买到月末 + * "VPCId" => (string) VPC ID。默认为当前地域的默认VPC。 + * "SubnetId" => (string) 子网 ID。默认为当前地域的默认子网。 + * "SecurityGroupId" => (string) 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * "CouponId" => (string) 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + * ] + * + * Outputs: + * + * $outputs = [ + * "ULHostId" => (string) 实例ID + * ] + * + * @return CreateULHostInstanceResponse + * @throws UCloudException + */ + public function createULHostInstance(CreateULHostInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateULHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeULHostBundles - 获取轻量应用云主机套餐列表 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/describe_ul_host_bundles + * + * 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 = [ + * "Bundles" => (array) 套餐列表[ + * [ + * "BundleId" => (string) 套餐ID。 + * "CPU" => (integer) CPU核数。 + * "Memory" => (integer) 内存大小。单位:MB。 + * "SysDiskSpace" => (integer) 系统盘大小。单位:GB。 + * "Bandwidth" => (integer) 外网带宽。单位:Mbps。 + * "TrafficPacket" => (integer) 流量包大小。单位:GB。 + * ] + * ] + * ] + * + * @return DescribeULHostBundlesResponse + * @throws UCloudException + */ + public function describeULHostBundles(DescribeULHostBundlesRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeULHostBundlesResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeULHostImage - 获取指定数据中心镜像列表 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/describe_ul_host_image + * + * 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) + * "ImageType" => (string) 镜像类型。标准镜像:Base,应用镜像:App, 自定义镜像:Custom,默认返回所有类型 + * "Scene" => (string) 使用场景,当ImageType为"App"时生效。- Normal 常规专区- CrossBorder 跨境专区默认返回所有 + * "OsType" => (string) 操作系统类型:Linux, Windows 默认返回所有类型 + * "ImageId" => (string) 镜像Id + * "ImageIds" => (array) 镜像Id列表 + * "Tag" => (string) 业务组Id。默认:Default + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * "Limit" => (integer) 返回数据长度,默认为20 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的镜像总数 + * "ImageSet" => (array) 镜像列表详见 UHostImageSet[ + * [ + * "Zone" => (string) 可用区,参见 [可用区列表](../summary/regionlist.html) + * "ImageId" => (string) 镜像ID + * "ImageName" => (string) 镜像名称 + * "DisplayName" => (string) 用于控制台显示的名称 + * "Tag" => (string) 业务组 + * "OsType" => (string) 操作系统类型:Linux,Windows + * "OsName" => (string) 操作系统名称 + * "ImageType" => (string) 镜像类型 标准镜像:Base, 行业镜像:Business,自定义镜像:Custom + * "Features" => (array) 特殊状态标识,目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra(网络增强2.0), NetEnhanced_Extreme(网络增强3.0), HotPlug(热升级), GPU(GPU镜像),CloudInit, IPv6(支持IPv6网络),RssdAttachable(支持RSSD云盘),Vgpu_AMD(支持AMD的vgpu),Vgpu_NVIDIA(支持NVIDIA的vgpu),Aarch64_Type(支持arm64架构) + * "IntegratedSoftware" => (string) 集成软件名称(仅行业镜像将返回这个值) + * "State" => (string) 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable,复制中:Copying + * "ImageDescription" => (string) 镜像描述 + * "CreateTime" => (integer) 创建时间,格式为Unix时间戳 + * "ImageSize" => (integer) 镜像大小 + * "MinimalCPU" => (string) 默认值为空'''。当CentOS 7.3/7.4/7.5等镜像会标记为“Broadwell” + * "MaintainEol" => (string) 系统EOL的时间,格式:YYYY/MM/DD + * "SceneCategories" => (array) 场景分类,目前包含Featured(精选),PreInstalledDrivers(预装驱动),AIPainting(AI绘画),AIModels(AI模型),HPC(高性能计算) + * "ImageLogoLink" => (string) 应用镜像图标url + * ] + * ] + * ] + * + * @return DescribeULHostImageResponse + * @throws UCloudException + */ + public function describeULHostImage(DescribeULHostImageRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeULHostImageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeULHostInstance - 获取轻量应用云主机列表 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/describe_ul_host_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) + * "ULHostIds" => (array) 【数组】轻量应用云主机ID。 + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * "Limit" => (integer) 返回数据长度,默认为20,最大100 + * ] + * + * Outputs: + * + * $outputs = [ + * "ULHostInstanceSets" => (array) 实例列表[ + * [ + * "Zone" => (string) 可用区。 + * "ULHostId" => (string) 实例Id。 + * "Name" => (string) 实例名称。默认套餐Id + * "Tag" => (string) 业务组。 + * "Remark" => (string) 备注。 + * "ImageId" => (string) 镜像Id。 + * "ImageName" => (string) 镜像名称。 + * "Apps" => (array) 【数组】镜像包含的应用列表。 + * "CPU" => (integer) CPU核数。 + * "Memory" => (integer) 内存。单位:MB + * "State" => (string) 实例状态。枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\> 运行中: Running; \\> 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ > 未知(空字符串,获取状态超时或出错):"" + * "ChargeType" => (string) 计费模式。枚举值:Month/Year + * "IPSet" => (array) IP信息[ + * [ + * "IPMode" => (string) IPv4/IPv6; + * "Default" => (string) 内网 Private 类型下,表示是否为默认网卡。true: 是默认网卡;其他值:不是。 + * "Mac" => (string) 内网 Private 类型下,当前网卡的Mac。 + * "Weight" => (integer) 当前EIP的权重。权重最大的为当前的出口IP。 + * "Type" => (string) 国际: Internation,BGP: Bgp,内网: Private + * "IPId" => (string) 外网IP资源ID 。(内网IP无对应的资源ID) + * "IP" => (string) IP地址 + * "Bandwidth" => (integer) IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + * "VPCId" => (string) IP地址对应的VPC ID。(北京一不支持,字段返回为空) + * "SubnetId" => (string) IP地址对应的子网 ID。(北京一不支持,字段返回为空) + * "NetworkInterfaceId" => (string) 弹性网卡为默认网卡时,返回对应的 ID 值 + * ] + * ] + * "DiskSet" => (array) 磁盘信息[ + * [ + * "DiskId" => (string) 磁盘Id + * "DiskType" => (string) 磁盘类型。如:"CLOUD_RSSD"、"CLOUD_SSD" + * "Type" => (string) 磁盘类型。系统盘:"Boot";数据盘:"Data" + * "Size" => (integer) 磁盘大小。单位:GB + * "IsBoot" => (string) 是否为系统盘。是:"True";否:"False" + * "Drive" => (string) 磁盘盘符。系统盘:"vda" + * ] + * ] + * "EIPExclusiveUTPInfo" => (object) 流量包详情信息[ + * "TotalSize" => (integer) 当前周期总流量 + * "AvailableSize" => (integer) 当前周期剩余流量 + * "UsedSize" => (integer) 当前周期已使用流量 + * "ExcessSize" => (integer) 当前周期超出限额的流量 + * "LastResetTime" => (integer) 上次重置时间 + * "NextResetTime" => (integer) 下次重置时间 + * "CreateTime" => (integer) 创建时间 + * ] + * "AutoRenew" => (string) 是否自动续费。枚举值:Yes/No + * "IsExpire" => (string) 是否过期。枚举值:Yes/No + * "ExpireTime" => (integer) 过期时间。Unix时间戳 + * "CreateTime" => (integer) 创建时间。Unix时间戳 + * ] + * ] + * ] + * + * @return DescribeULHostInstanceResponse + * @throws UCloudException + */ + public function describeULHostInstance(DescribeULHostInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeULHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetULHostInstancePrice - 获取轻量应用云主机套餐价格 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/get_ul_host_instance_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "BundleId" => (string) 套餐ID + * "ChargeType" => (string) 获取指定计费模式的价格。枚举值:\\ > Year,按年付费; \\ > Month。未指定时,返回所有计费模式价格 + * "Count" => (integer) 购买台数,范围[1,5]。默认:1 + * "Quantity" => (integer) 购买时长。默认: 1。不支持购买到月末 + * ] + * + * Outputs: + * + * $outputs = [ + * "PriceSet" => (array) 价格[ + * [ + * "ChargeType" => (string) 计费模式 + * "Price" => (number) 价格 + * "OriginalPrice" => (number) 原价 + * ] + * ] + * ] + * + * @return GetULHostInstancePriceResponse + * @throws UCloudException + */ + public function getULHostInstancePrice(GetULHostInstancePriceRequest $request = null) + { + $resp = $this->invoke($request); + return new GetULHostInstancePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetULHostRenewPrice - 获取主机续费价格 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/get_ul_host_renew_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULHostId" => (string) ULHost实例ID + * "ChargeType" => (string) 计费类型。支持:Year/Month;默认:Month + * ] + * + * Outputs: + * + * $outputs = [ + * "PriceSet" => (array) 价格[ + * [ + * "ChargeType" => (string) 计费模式 + * "Price" => (number) 价格 + * "OriginalPrice" => (number) 原价 + * ] + * ] + * ] + * + * @return GetULHostRenewPriceResponse + * @throws UCloudException + */ + public function getULHostRenewPrice(GetULHostRenewPriceRequest $request = null) + { + $resp = $this->invoke($request); + return new GetULHostRenewPriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyULHostAttribute - 修改指定ULHost实例属性信息,包含名称和备注 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/modify_ul_host_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULHostId" => (string) ULHost实例Id + * "Name" => (string) 名称。和Remark至少选择一个进行修改 + * "Remark" => (string) 备注。和Name至少选择一个进行修改 + * ] + * + * Outputs: + * + * $outputs = [ + * "ULHostId" => (string) ULHost实例Id + * ] + * + * @return ModifyULHostAttributeResponse + * @throws UCloudException + */ + public function modifyULHostAttribute(ModifyULHostAttributeRequest $request = null) + { + $resp = $this->invoke($request); + return new ModifyULHostAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * PoweroffULHostInstance - 直接关闭UHost实例电源,无需等待实例正常关闭。 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/poweroff_ul_host_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) + * "ULHostId" => (string) ULHost实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * "ULHostId" => (string) ULHost实例ID + * ] + * + * @return PoweroffULHostInstanceResponse + * @throws UCloudException + */ + public function poweroffULHostInstance(PoweroffULHostInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new PoweroffULHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RebootULHostInstance - 重新启动UHost实例。 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/reboot_ul_host_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) + * "ULHostId" => (string) ULHost实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * "ULHostId" => (string) ULHost实例ID + * ] + * + * @return RebootULHostInstanceResponse + * @throws UCloudException + */ + public function rebootULHostInstance(RebootULHostInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new RebootULHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ReinstallULHostInstance - 重装轻量应用云主机 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/reinstall_ul_host_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) + * "ImageId" => (string) 镜像Id。暂不支持使用自定义镜像重装 + * "ULHostId" => (string) 实例Id + * "Password" => (string) 登陆密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64 UGFzc3dvcmQx + * ] + * + * Outputs: + * + * $outputs = [ + * "ULHostId" => (string) 实例Id + * ] + * + * @return ReinstallULHostInstanceResponse + * @throws UCloudException + */ + public function reinstallULHostInstance(ReinstallULHostInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new ReinstallULHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResetULHostInstancePassword - 重置轻量应用云主机管理员密码。 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/reset_ul_host_instance_password + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULHostId" => (string) ULHost实例ID + * "Password" => (string) ULHost新密码(密码格式使用BASE64编码) + * ] + * + * Outputs: + * + * $outputs = [ + * "ULHostId" => (string) ULHost实例ID + * ] + * + * @return ResetULHostInstancePasswordResponse + * @throws UCloudException + */ + public function resetULHostInstancePassword(ResetULHostInstancePasswordRequest $request = null) + { + $resp = $this->invoke($request); + return new ResetULHostInstancePasswordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StartULHostInstance - 启动处于关闭状态的UHost实例。 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/start_ul_host_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) + * "ULHostId" => (string) ULHost实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * "ULHostId" => (string) ULHost实例ID + * ] + * + * @return StartULHostInstanceResponse + * @throws UCloudException + */ + public function startULHostInstance(StartULHostInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new StartULHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StopULHostInstance - 指停止处于运行状态的ULHost实例 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/stop_ul_host_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) + * "ULHostId" => (string) ULHost实例ID。 + * ] + * + * Outputs: + * + * $outputs = [ + * "ULHostId" => (string) ULHost实例ID + * ] + * + * @return StopULHostInstanceResponse + * @throws UCloudException + */ + public function stopULHostInstance(StopULHostInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new StopULHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * TerminateULHostInstance - 删除指定数据中心的ULHost实例。 + * + * See also: https://docs.ucloud.cn/api/ulighthost-api/terminate_ul_host_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) + * "ULHostId" => (string) ULHost资源Id + * "ReleaseUDisk" => (boolean) 删除主机时是否同时删除挂载的数据盘。默认为false。 + * ] + * + * Outputs: + * + * $outputs = [ + * "InRecycle" => (string) 用于判断主机删除时是否进入回收站。放入回收站:"Yes", 彻底删除:“No”。 + * "ULHostId" => (string) ULHost 实例 Id + * ] + * + * @return TerminateULHostInstanceResponse + * @throws UCloudException + */ + public function terminateULHostInstance(TerminateULHostInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new TerminateULHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UMongoDB/Apis/BackupUMongoDBClusterRequest.php b/src/UMongoDB/Apis/BackupUMongoDBClusterRequest.php new file mode 100644 index 00000000..76b54ebb --- /dev/null +++ b/src/UMongoDB/Apis/BackupUMongoDBClusterRequest.php @@ -0,0 +1,133 @@ + "BackupUMongoDBCluster"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterId"); + $this->markRequired("BackupName"); + } + + + + /** + * 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); + } + + /** + * 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); + } + + /** + * BackupName: 备份名称 + * + * @return string|null + */ + public function getBackupName() + { + return $this->get("BackupName"); + } + + /** + * BackupName: 备份名称 + * + * @param string $backupName + */ + public function setBackupName($backupName) + { + $this->set("BackupName", $backupName); + } +} diff --git a/src/UMongoDB/Apis/BackupUMongoDBClusterResponse.php b/src/UMongoDB/Apis/BackupUMongoDBClusterResponse.php new file mode 100644 index 00000000..e295eddc --- /dev/null +++ b/src/UMongoDB/Apis/BackupUMongoDBClusterResponse.php @@ -0,0 +1,64 @@ +get("BackupId"); + } + + /** + * BackupId: 备份ID + * + * @param string $backupId + */ + public function setBackupId($backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * 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/UMongoDB/Apis/BackupUMongoDBLogRequest.php b/src/UMongoDB/Apis/BackupUMongoDBLogRequest.php new file mode 100644 index 00000000..3b50c02d --- /dev/null +++ b/src/UMongoDB/Apis/BackupUMongoDBLogRequest.php @@ -0,0 +1,217 @@ + "BackupUMongoDBLog"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $this->markRequired("ClusterId"); + $this->markRequired("NodeId"); + $this->markRequired("Begin"); + $this->markRequired("End"); + $this->markRequired("LogType"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 日志包名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 日志包名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * 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); + } + + /** + * NodeId: 节点id, 慢日志 mongos 节点不可选 + * + * @return string|null + */ + public function getNodeId() + { + return $this->get("NodeId"); + } + + /** + * NodeId: 节点id, 慢日志 mongos 节点不可选 + * + * @param string $nodeId + */ + public function setNodeId($nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * Begin: 日志开始时间,最早为7x24小时前 + * + * @return integer|null + */ + public function getBegin() + { + return $this->get("Begin"); + } + + /** + * Begin: 日志开始时间,最早为7x24小时前 + * + * @param int $begin + */ + public function setBegin($begin) + { + $this->set("Begin", $begin); + } + + /** + * End: 日志结束时间,时间区间不能超过24小时 + * + * @return integer|null + */ + public function getEnd() + { + return $this->get("End"); + } + + /** + * End: 日志结束时间,时间区间不能超过24小时 + * + * @param int $end + */ + public function setEnd($end) + { + $this->set("End", $end); + } + + /** + * LogType: 日志类型:SlowLog,ErrorLog + * + * @return string|null + */ + public function getLogType() + { + return $this->get("LogType"); + } + + /** + * LogType: 日志类型:SlowLog,ErrorLog + * + * @param string $logType + */ + public function setLogType($logType) + { + $this->set("LogType", $logType); + } +} diff --git a/src/UMongoDB/Apis/BackupUMongoDBLogResponse.php b/src/UMongoDB/Apis/BackupUMongoDBLogResponse.php new file mode 100644 index 00000000..e502420b --- /dev/null +++ b/src/UMongoDB/Apis/BackupUMongoDBLogResponse.php @@ -0,0 +1,26 @@ + "CreateUMongoDBConfigTemplate"]); + $this->markRequired("Region"); + $this->markRequired("TemplateName"); + $this->markRequired("ClusterType"); + $this->markRequired("MongodbVersion"); + $this->markRequired("BaseTemplateId"); + } + + + + /** + * 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); + } + + /** + * TemplateName: 模板名称 + * + * @return string|null + */ + public function getTemplateName() + { + return $this->get("TemplateName"); + } + + /** + * TemplateName: 模板名称 + * + * @param string $templateName + */ + public function setTemplateName($templateName) + { + $this->set("TemplateName", $templateName); + } + + /** + * ClusterType: 集群类型 + * + * @return string|null + */ + public function getClusterType() + { + return $this->get("ClusterType"); + } + + /** + * ClusterType: 集群类型 + * + * @param string $clusterType + */ + public function setClusterType($clusterType) + { + $this->set("ClusterType", $clusterType); + } + + /** + * MongodbVersion: mongo版本 + * + * @return string|null + */ + public function getMongodbVersion() + { + return $this->get("MongodbVersion"); + } + + /** + * MongodbVersion: mongo版本 + * + * @param string $mongodbVersion + */ + public function setMongodbVersion($mongodbVersion) + { + $this->set("MongodbVersion", $mongodbVersion); + } + + /** + * BaseTemplateId: 基础模板 + * + * @return string|null + */ + public function getBaseTemplateId() + { + return $this->get("BaseTemplateId"); + } + + /** + * BaseTemplateId: 基础模板 + * + * @param string $baseTemplateId + */ + public function setBaseTemplateId($baseTemplateId) + { + $this->set("BaseTemplateId", $baseTemplateId); + } + + /** + * Description: 模板描述 + * + * @return string|null + */ + public function getDescription() + { + return $this->get("Description"); + } + + /** + * Description: 模板描述 + * + * @param string $description + */ + public function setDescription($description) + { + $this->set("Description", $description); + } +} diff --git a/src/UMongoDB/Apis/CreateUMongoDBConfigTemplateResponse.php b/src/UMongoDB/Apis/CreateUMongoDBConfigTemplateResponse.php new file mode 100644 index 00000000..cd0901d2 --- /dev/null +++ b/src/UMongoDB/Apis/CreateUMongoDBConfigTemplateResponse.php @@ -0,0 +1,44 @@ +get("TemplateId"); + } + + /** + * TemplateId: 模板Id + * + * @param string $templateId + */ + public function setTemplateId($templateId) + { + $this->set("TemplateId", $templateId); + } +} diff --git a/src/UMongoDB/Apis/CreateUMongoDBReplSetRequest.php b/src/UMongoDB/Apis/CreateUMongoDBReplSetRequest.php new file mode 100644 index 00000000..7e3eee48 --- /dev/null +++ b/src/UMongoDB/Apis/CreateUMongoDBReplSetRequest.php @@ -0,0 +1,423 @@ + "CreateUMongoDBReplSet"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $this->markRequired("DBVersion"); + $this->markRequired("AdminPassword"); + $this->markRequired("DiskSpace"); + $this->markRequired("MachineTypeId"); + $this->markRequired("NodeCount"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 副本集实例名称,至少6位 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 副本集实例名称,至少6位 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * DBVersion: 副本集的Mongodb的版本,例如MongoDB 3.6, MongoDB 4.2 + * + * @return string|null + */ + public function getDBVersion() + { + return $this->get("DBVersion"); + } + + /** + * DBVersion: 副本集的Mongodb的版本,例如MongoDB 3.6, MongoDB 4.2 + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } + + /** + * AdminPassword: 管理员密码 + * + * @return string|null + */ + public function getAdminPassword() + { + return $this->get("AdminPassword"); + } + + /** + * AdminPassword: 管理员密码 + * + * @param string $adminPassword + */ + public function setAdminPassword($adminPassword) + { + $this->set("AdminPassword", $adminPassword); + } + + /** + * DiskSpace: 磁盘空间 (GB):取值范围 20~32000,仅支持 10 的整数倍 + * + * @return integer|null + */ + public function getDiskSpace() + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间 (GB):取值范围 20~32000,仅支持 10 的整数倍 + * + * @param int $diskSpace + */ + public function setDiskSpace($diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * MachineTypeId: 机型配置,如 o.mongo2m.medium + * + * @return string|null + */ + public function getMachineTypeId() + { + return $this->get("MachineTypeId"); + } + + /** + * MachineTypeId: 机型配置,如 o.mongo2m.medium + * + * @param string $machineTypeId + */ + public function setMachineTypeId($machineTypeId) + { + $this->set("MachineTypeId", $machineTypeId); + } + + /** + * NodeCount: 副本集节点数量:仅支持 3、5、7 奇数节点 + * + * @return integer|null + */ + public function getNodeCount() + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 副本集节点数量:仅支持 3、5、7 奇数节点 + * + * @param int $nodeCount + */ + public function setNodeCount($nodeCount) + { + $this->set("NodeCount", $nodeCount); + } + + /** + * ListenPort: mongo服务端口 + * + * @return integer|null + */ + public function getListenPort() + { + return $this->get("ListenPort"); + } + + /** + * ListenPort: mongo服务端口 + * + * @param int $listenPort + */ + public function setListenPort($listenPort) + { + $this->set("ListenPort", $listenPort); + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * Tag: 实例所在的业务组名称 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 实例所在的业务组名称 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * ChargeType: 付费方式:Year, Month, Dynamic,Trial,默认: Month + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式:Year, Month, Dynamic,Trial,默认: 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); + } + + /** + * CrossZones: 跨可用区列表 + * + * @return string[]|null + */ + public function getCrossZones() + { + return $this->get("CrossZones"); + } + + /** + * CrossZones: 跨可用区列表 + * + * @param string[] $crossZones + */ + public function setCrossZones(array $crossZones) + { + $this->set("CrossZones", $crossZones); + } + + /** + * Labels: + * + * @return CreateUMongoDBReplSetParamLabels[]|null + */ + public function getLabels() + { + $items = $this->get("Labels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUMongoDBReplSetParamLabels($item)); + } + return $result; + } + + /** + * Labels: + * + * @param CreateUMongoDBReplSetParamLabels[] $labels + */ + public function setLabels(array $labels) + { + $result = []; + foreach ($labels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SecGroupId: + * + * @return CreateUMongoDBReplSetParamSecGroupId[]|null + */ + public function getSecGroupId() + { + $items = $this->get("SecGroupId"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUMongoDBReplSetParamSecGroupId($item)); + } + return $result; + } + + /** + * SecGroupId: + * + * @param CreateUMongoDBReplSetParamSecGroupId[] $secGroupId + */ + public function setSecGroupId(array $secGroupId) + { + $result = []; + foreach ($secGroupId as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMongoDB/Apis/CreateUMongoDBReplSetResponse.php b/src/UMongoDB/Apis/CreateUMongoDBReplSetResponse.php new file mode 100644 index 00000000..fedbd67a --- /dev/null +++ b/src/UMongoDB/Apis/CreateUMongoDBReplSetResponse.php @@ -0,0 +1,26 @@ + "CreateUMongoDBShardedCluster"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $this->markRequired("DBVersion"); + $this->markRequired("AdminPassword"); + $this->markRequired("MongosNodeCount"); + $this->markRequired("ShardCount"); + $this->markRequired("NodeCount"); + $this->markRequired("DiskSpace"); + $this->markRequired("MachineTypeId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 副本集实例名称,至少6位 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 副本集实例名称,至少6位 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * DBVersion: 副本集的Mongodb的版本,例如MongoDB 3.6, MongoDB 4.2 + * + * @return string|null + */ + public function getDBVersion() + { + return $this->get("DBVersion"); + } + + /** + * DBVersion: 副本集的Mongodb的版本,例如MongoDB 3.6, MongoDB 4.2 + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } + + /** + * AdminPassword: 管理员密码 + * + * @return string|null + */ + public function getAdminPassword() + { + return $this->get("AdminPassword"); + } + + /** + * AdminPassword: 管理员密码 + * + * @param string $adminPassword + */ + public function setAdminPassword($adminPassword) + { + $this->set("AdminPassword", $adminPassword); + } + + /** + * MongosNodeCount: Mongos节点数量 + * + * @return integer|null + */ + public function getMongosNodeCount() + { + return $this->get("MongosNodeCount"); + } + + /** + * MongosNodeCount: Mongos节点数量 + * + * @param int $mongosNodeCount + */ + public function setMongosNodeCount($mongosNodeCount) + { + $this->set("MongosNodeCount", $mongosNodeCount); + } + + /** + * ShardCount: 分片数量 + * + * @return integer|null + */ + public function getShardCount() + { + return $this->get("ShardCount"); + } + + /** + * ShardCount: 分片数量 + * + * @param int $shardCount + */ + public function setShardCount($shardCount) + { + $this->set("ShardCount", $shardCount); + } + + /** + * NodeCount: 每个分片中节点数量 + * + * @return integer|null + */ + public function getNodeCount() + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 每个分片中节点数量 + * + * @param int $nodeCount + */ + public function setNodeCount($nodeCount) + { + $this->set("NodeCount", $nodeCount); + } + + /** + * DiskSpace: 数据节点磁盘空间(GB):取值范围 20~32000,仅支持 10 的整数倍 + * + * @return integer|null + */ + public function getDiskSpace() + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 数据节点磁盘空间(GB):取值范围 20~32000,仅支持 10 的整数倍 + * + * @param int $diskSpace + */ + public function setDiskSpace($diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * MachineTypeId: 数据节点机型配置,如 o.mongo2m.medium + * + * @return string|null + */ + public function getMachineTypeId() + { + return $this->get("MachineTypeId"); + } + + /** + * MachineTypeId: 数据节点机型配置,如 o.mongo2m.medium + * + * @param string $machineTypeId + */ + public function setMachineTypeId($machineTypeId) + { + $this->set("MachineTypeId", $machineTypeId); + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * Tag: 实例所在的业务组名称 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 实例所在的业务组名称 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * ChargeType: 付费方式:Year, Month, Dynamic,Trial,默认: Month + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式:Year, Month, Dynamic,Trial,默认: 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); + } + + /** + * ListenPort: mongo服务端口 + * + * @return integer|null + */ + public function getListenPort() + { + return $this->get("ListenPort"); + } + + /** + * ListenPort: mongo服务端口 + * + * @param int $listenPort + */ + public function setListenPort($listenPort) + { + $this->set("ListenPort", $listenPort); + } + + /** + * TemplateId: 参数配置模版id + * + * @return string|null + */ + public function getTemplateId() + { + return $this->get("TemplateId"); + } + + /** + * TemplateId: 参数配置模版id + * + * @param string $templateId + */ + public function setTemplateId($templateId) + { + $this->set("TemplateId", $templateId); + } + + /** + * MongosMachineTypeId: Mongos节点机型配置 + * + * @return string|null + */ + public function getMongosMachineTypeId() + { + return $this->get("MongosMachineTypeId"); + } + + /** + * MongosMachineTypeId: Mongos节点机型配置 + * + * @param string $mongosMachineTypeId + */ + public function setMongosMachineTypeId($mongosMachineTypeId) + { + $this->set("MongosMachineTypeId", $mongosMachineTypeId); + } + + /** + * Labels: + * + * @return CreateUMongoDBShardedClusterParamLabels[]|null + */ + public function getLabels() + { + $items = $this->get("Labels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUMongoDBShardedClusterParamLabels($item)); + } + return $result; + } + + /** + * Labels: + * + * @param CreateUMongoDBShardedClusterParamLabels[] $labels + */ + public function setLabels(array $labels) + { + $result = []; + foreach ($labels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SecGroupId: + * + * @return CreateUMongoDBShardedClusterParamSecGroupId[]|null + */ + public function getSecGroupId() + { + $items = $this->get("SecGroupId"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUMongoDBShardedClusterParamSecGroupId($item)); + } + return $result; + } + + /** + * SecGroupId: + * + * @param CreateUMongoDBShardedClusterParamSecGroupId[] $secGroupId + */ + public function setSecGroupId(array $secGroupId) + { + $result = []; + foreach ($secGroupId as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMongoDB/Apis/CreateUMongoDBShardedClusterResponse.php b/src/UMongoDB/Apis/CreateUMongoDBShardedClusterResponse.php new file mode 100644 index 00000000..6f9e0285 --- /dev/null +++ b/src/UMongoDB/Apis/CreateUMongoDBShardedClusterResponse.php @@ -0,0 +1,26 @@ + "DescribeUMongoDBBackupURL"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](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); + } + + /** + * 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); + } + + /** + * BackupId: 文件备份ID + * + * @return string|null + */ + public function getBackupId() + { + return $this->get("BackupId"); + } + + /** + * BackupId: 文件备份ID + * + * @param string $backupId + */ + public function setBackupId($backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * PackageId: 打包ID + * + * @return integer|null + */ + public function getPackageId() + { + return $this->get("PackageId"); + } + + /** + * PackageId: 打包ID + * + * @param int $packageId + */ + public function setPackageId($packageId) + { + $this->set("PackageId", $packageId); + } + + /** + * ValidTime: 备份链接过期时间(单位秒) + * + * @return integer|null + */ + public function getValidTime() + { + return $this->get("ValidTime"); + } + + /** + * ValidTime: 备份链接过期时间(单位秒) + * + * @param int $validTime + */ + public function setValidTime($validTime) + { + $this->set("ValidTime", $validTime); + } + + /** + * Category: 类型:如 oplog + * + * @return string|null + */ + public function getCategory() + { + return $this->get("Category"); + } + + /** + * Category: 类型:如 oplog + * + * @param string $category + */ + public function setCategory($category) + { + $this->set("Category", $category); + } +} diff --git a/src/UMongoDB/Apis/DescribeUMongoDBBackupURLResponse.php b/src/UMongoDB/Apis/DescribeUMongoDBBackupURLResponse.php new file mode 100644 index 00000000..a581e4eb --- /dev/null +++ b/src/UMongoDB/Apis/DescribeUMongoDBBackupURLResponse.php @@ -0,0 +1,64 @@ +get("InternetAddress"); + } + + /** + * InternetAddress: 备份文件公网地址 + * + * @param string $internetAddress + */ + public function setInternetAddress($internetAddress) + { + $this->set("InternetAddress", $internetAddress); + } + + /** + * IntranetAddress: 备份文件内网地址 + * + * @return string|null + */ + public function getIntranetAddress() + { + return $this->get("IntranetAddress"); + } + + /** + * IntranetAddress: 备份文件内网地址 + * + * @param string $intranetAddress + */ + public function setIntranetAddress($intranetAddress) + { + $this->set("IntranetAddress", $intranetAddress); + } +} diff --git a/src/UMongoDB/Apis/DescribeUMongoDBInstanceRequest.php b/src/UMongoDB/Apis/DescribeUMongoDBInstanceRequest.php new file mode 100644 index 00000000..2d03802e --- /dev/null +++ b/src/UMongoDB/Apis/DescribeUMongoDBInstanceRequest.php @@ -0,0 +1,131 @@ + "DescribeUMongoDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](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); + } + + /** + * 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); + } + + /** + * ClusterType: 集群类型,ReplicaSet:副本集,SharedCluster:分片集群 + * + * @return string|null + */ + public function getClusterType() + { + return $this->get("ClusterType"); + } + + /** + * ClusterType: 集群类型,ReplicaSet:副本集,SharedCluster:分片集群 + * + * @param string $clusterType + */ + public function setClusterType($clusterType) + { + $this->set("ClusterType", $clusterType); + } +} diff --git a/src/UMongoDB/Apis/DescribeUMongoDBInstanceResponse.php b/src/UMongoDB/Apis/DescribeUMongoDBInstanceResponse.php new file mode 100644 index 00000000..efedd66e --- /dev/null +++ b/src/UMongoDB/Apis/DescribeUMongoDBInstanceResponse.php @@ -0,0 +1,59 @@ +get("ClusterInfo")); + } + + /** + * ClusterInfo: 副本集信息 + * + * @param ClusterInfo $clusterInfo + */ + public function setClusterInfo(array $clusterInfo) + { + $this->set("ClusterInfo", $clusterInfo->getAll()); + } +} diff --git a/src/UMongoDB/Apis/GetUMongoDBBackupParamRequest.php b/src/UMongoDB/Apis/GetUMongoDBBackupParamRequest.php new file mode 100644 index 00000000..45ddd47a --- /dev/null +++ b/src/UMongoDB/Apis/GetUMongoDBBackupParamRequest.php @@ -0,0 +1,112 @@ + "GetUMongoDBBackupParam"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * 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/UMongoDB/Apis/GetUMongoDBBackupParamResponse.php b/src/UMongoDB/Apis/GetUMongoDBBackupParamResponse.php new file mode 100644 index 00000000..14135cc6 --- /dev/null +++ b/src/UMongoDB/Apis/GetUMongoDBBackupParamResponse.php @@ -0,0 +1,45 @@ +get("DataSet")); + } + + /** + * DataSet: 备份策略信息 + * + * @param BackupParam $dataSet + */ + public function setDataSet(array $dataSet) + { + $this->set("DataSet", $dataSet->getAll()); + } +} diff --git a/src/UMongoDB/Apis/GetUMongoDBCfgTempItemRequest.php b/src/UMongoDB/Apis/GetUMongoDBCfgTempItemRequest.php new file mode 100644 index 00000000..572a3726 --- /dev/null +++ b/src/UMongoDB/Apis/GetUMongoDBCfgTempItemRequest.php @@ -0,0 +1,91 @@ + "GetUMongoDBCfgTempItem"]); + $this->markRequired("Region"); + $this->markRequired("TemplateId"); + } + + + + /** + * 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); + } + + /** + * TemplateId: 配置模板Id + * + * @return string|null + */ + public function getTemplateId() + { + return $this->get("TemplateId"); + } + + /** + * TemplateId: 配置模板Id + * + * @param string $templateId + */ + public function setTemplateId($templateId) + { + $this->set("TemplateId", $templateId); + } +} diff --git a/src/UMongoDB/Apis/GetUMongoDBCfgTempItemResponse.php b/src/UMongoDB/Apis/GetUMongoDBCfgTempItemResponse.php new file mode 100644 index 00000000..154bc4bd --- /dev/null +++ b/src/UMongoDB/Apis/GetUMongoDBCfgTempItemResponse.php @@ -0,0 +1,58 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ConfigTemplateItem($item)); + } + return $result; + } + + /** + * DataSet: 配置模板项 + * + * @param ConfigTemplateItem[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMongoDB/Apis/GetUMongoDBLogRequest.php b/src/UMongoDB/Apis/GetUMongoDBLogRequest.php new file mode 100644 index 00000000..5db45e46 --- /dev/null +++ b/src/UMongoDB/Apis/GetUMongoDBLogRequest.php @@ -0,0 +1,194 @@ + "GetUMongoDBLog"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + $this->markRequired("NodeId"); + $this->markRequired("Begin"); + $this->markRequired("LogType"); + } + + + + /** + * 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); + } + + /** + * 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); + } + + /** + * NodeId: 节点id, 慢日志 mongos 节点不可选 + * + * @return string|null + */ + public function getNodeId() + { + return $this->get("NodeId"); + } + + /** + * NodeId: 节点id, 慢日志 mongos 节点不可选 + * + * @param string $nodeId + */ + public function setNodeId($nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * Begin: 查询的日志开始的时间戳(Unix Timestamp)。对于实时查询,这个参数应该是上次轮询请求时的时间戳,后台会返回从该值到当前时间的日志内容 + * + * @return integer|null + */ + public function getBegin() + { + return $this->get("Begin"); + } + + /** + * Begin: 查询的日志开始的时间戳(Unix Timestamp)。对于实时查询,这个参数应该是上次轮询请求时的时间戳,后台会返回从该值到当前时间的日志内容 + * + * @param int $begin + */ + public function setBegin($begin) + { + $this->set("Begin", $begin); + } + + /** + * LogType: 日志类型:SlowLog,ErrorLog + * + * @return string|null + */ + public function getLogType() + { + return $this->get("LogType"); + } + + /** + * LogType: 日志类型:SlowLog,ErrorLog + * + * @param string $logType + */ + public function setLogType($logType) + { + $this->set("LogType", $logType); + } + + /** + * End: 查询日志的结束时间戳(Unix Timestamp),对于实时查询不传该值,与BeginTime的差值不超过24小时:(EndTime-BeginTime) < 24*60*60 + * + * @return integer|null + */ + public function getEnd() + { + return $this->get("End"); + } + + /** + * End: 查询日志的结束时间戳(Unix Timestamp),对于实时查询不传该值,与BeginTime的差值不超过24小时:(EndTime-BeginTime) < 24*60*60 + * + * @param int $end + */ + public function setEnd($end) + { + $this->set("End", $end); + } +} diff --git a/src/UMongoDB/Apis/GetUMongoDBLogResponse.php b/src/UMongoDB/Apis/GetUMongoDBLogResponse.php new file mode 100644 index 00000000..da35fe58 --- /dev/null +++ b/src/UMongoDB/Apis/GetUMongoDBLogResponse.php @@ -0,0 +1,84 @@ +get("Log"); + } + + /** + * Log: 查询到的日志内容,一段纯文本 + * + * @param string $log + */ + public function setLog($log) + { + $this->set("Log", $log); + } + + /** + * MaxLine: 支持的最大行数 + * + * @return integer|null + */ + public function getMaxLine() + { + return $this->get("MaxLine"); + } + + /** + * MaxLine: 支持的最大行数 + * + * @param int $maxLine + */ + public function setMaxLine($maxLine) + { + $this->set("MaxLine", $maxLine); + } + + /** + * IsTruncate: 是否已被截断 + * + * @return boolean|null + */ + public function getIsTruncate() + { + return $this->get("IsTruncate"); + } + + /** + * IsTruncate: 是否已被截断 + * + * @param boolean $isTruncate + */ + public function setIsTruncate($isTruncate) + { + $this->set("IsTruncate", $isTruncate); + } +} diff --git a/src/UMongoDB/Apis/GetUMongoDBRecoverTimeRangeRequest.php b/src/UMongoDB/Apis/GetUMongoDBRecoverTimeRangeRequest.php new file mode 100644 index 00000000..b6c145fc --- /dev/null +++ b/src/UMongoDB/Apis/GetUMongoDBRecoverTimeRangeRequest.php @@ -0,0 +1,112 @@ + "GetUMongoDBRecoverTimeRange"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * 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/UMongoDB/Apis/GetUMongoDBRecoverTimeRangeResponse.php b/src/UMongoDB/Apis/GetUMongoDBRecoverTimeRangeResponse.php new file mode 100644 index 00000000..08540abb --- /dev/null +++ b/src/UMongoDB/Apis/GetUMongoDBRecoverTimeRangeResponse.php @@ -0,0 +1,64 @@ +get("EarliestTime"); + } + + /** + * EarliestTime: 最早可回档时间点 + * + * @param int $earliestTime + */ + public function setEarliestTime($earliestTime) + { + $this->set("EarliestTime", $earliestTime); + } + + /** + * LatestTime: 最晚可回档时间点 + * + * @return integer|null + */ + public function getLatestTime() + { + return $this->get("LatestTime"); + } + + /** + * LatestTime: 最晚可回档时间点 + * + * @param int $latestTime + */ + public function setLatestTime($latestTime) + { + $this->set("LatestTime", $latestTime); + } +} diff --git a/src/UMongoDB/Apis/ListUMongoDBBackupRequest.php b/src/UMongoDB/Apis/ListUMongoDBBackupRequest.php new file mode 100644 index 00000000..4a932607 --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBBackupRequest.php @@ -0,0 +1,112 @@ + "ListUMongoDBBackup"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * 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/UMongoDB/Apis/ListUMongoDBBackupResponse.php b/src/UMongoDB/Apis/ListUMongoDBBackupResponse.php new file mode 100644 index 00000000..9af74b4c --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBBackupResponse.php @@ -0,0 +1,57 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BackupInfo($item)); + } + return $result; + } + + /** + * DataSet: 备份列表 + * + * @param BackupInfo[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMongoDB/Apis/ListUMongoDBConfigTemplateRequest.php b/src/UMongoDB/Apis/ListUMongoDBConfigTemplateRequest.php new file mode 100644 index 00000000..0705a924 --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBConfigTemplateRequest.php @@ -0,0 +1,70 @@ + "ListUMongoDBConfigTemplate"]); + $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/UMongoDB/Apis/ListUMongoDBConfigTemplateResponse.php b/src/UMongoDB/Apis/ListUMongoDBConfigTemplateResponse.php new file mode 100644 index 00000000..002c1b24 --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBConfigTemplateResponse.php @@ -0,0 +1,57 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ConfigTemplate($item)); + } + return $result; + } + + /** + * DataSet: 配置模板列表 + * + * @param ConfigTemplate[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMongoDB/Apis/ListUMongoDBInstancesRequest.php b/src/UMongoDB/Apis/ListUMongoDBInstancesRequest.php new file mode 100644 index 00000000..1c5afa9e --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBInstancesRequest.php @@ -0,0 +1,110 @@ + "ListUMongoDBInstances"]); + $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); + } + + /** + * 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/UMongoDB/Apis/ListUMongoDBInstancesResponse.php b/src/UMongoDB/Apis/ListUMongoDBInstancesResponse.php new file mode 100644 index 00000000..1f24e4a7 --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBInstancesResponse.php @@ -0,0 +1,58 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MongodbInstance($item)); + } + return $result; + } + + /** + * DataSet: 副本集ID + * + * @param MongodbInstance[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMongoDB/Apis/ListUMongoDBLogPackageRequest.php b/src/UMongoDB/Apis/ListUMongoDBLogPackageRequest.php new file mode 100644 index 00000000..0ab27131 --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBLogPackageRequest.php @@ -0,0 +1,132 @@ + "ListUMongoDBLogPackage"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * 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); + } + + /** + * 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); + } +} diff --git a/src/UMongoDB/Apis/ListUMongoDBLogPackageResponse.php b/src/UMongoDB/Apis/ListUMongoDBLogPackageResponse.php new file mode 100644 index 00000000..921fc707 --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBLogPackageResponse.php @@ -0,0 +1,57 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PackageInfo($item)); + } + return $result; + } + + /** + * DataSet: 列表 + * + * @param PackageInfo[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMongoDB/Apis/ListUMongoDBMachineSpecRequest.php b/src/UMongoDB/Apis/ListUMongoDBMachineSpecRequest.php new file mode 100644 index 00000000..ba20f444 --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBMachineSpecRequest.php @@ -0,0 +1,131 @@ + "ListUMongoDBMachineSpec"]); + $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); + } + + /** + * ClassType: 机型,如O + * + * @return string|null + */ + public function getClassType() + { + return $this->get("ClassType"); + } + + /** + * ClassType: 机型,如O + * + * @param string $classType + */ + public function setClassType($classType) + { + $this->set("ClassType", $classType); + } + + /** + * DiskType: 磁盘类型,如CLOUD_RSSD + * + * @return string|null + */ + public function getDiskType() + { + return $this->get("DiskType"); + } + + /** + * DiskType: 磁盘类型,如CLOUD_RSSD + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } +} diff --git a/src/UMongoDB/Apis/ListUMongoDBMachineSpecResponse.php b/src/UMongoDB/Apis/ListUMongoDBMachineSpecResponse.php new file mode 100644 index 00000000..25a0ed7f --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBMachineSpecResponse.php @@ -0,0 +1,59 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MongodbMachineSpec($item)); + } + return $result; + } + + /** + * DataSet: 规格列表 + * + * @param MongodbMachineSpec[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMongoDB/Apis/ListUMongoDBMachineTypeRequest.php b/src/UMongoDB/Apis/ListUMongoDBMachineTypeRequest.php new file mode 100644 index 00000000..97358cc7 --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBMachineTypeRequest.php @@ -0,0 +1,91 @@ + "ListUMongoDBMachineType"]); + $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/UMongoDB/Apis/ListUMongoDBMachineTypeResponse.php b/src/UMongoDB/Apis/ListUMongoDBMachineTypeResponse.php new file mode 100644 index 00000000..3d9d56f9 --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBMachineTypeResponse.php @@ -0,0 +1,57 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MongodbMachineType($item)); + } + return $result; + } + + /** + * DataSet: + * + * @param MongodbMachineType[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMongoDB/Apis/ListUMongoDBVersionRequest.php b/src/UMongoDB/Apis/ListUMongoDBVersionRequest.php new file mode 100644 index 00000000..6a36b023 --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBVersionRequest.php @@ -0,0 +1,91 @@ + "ListUMongoDBVersion"]); + $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/UMongoDB/Apis/ListUMongoDBVersionResponse.php b/src/UMongoDB/Apis/ListUMongoDBVersionResponse.php new file mode 100644 index 00000000..d252f043 --- /dev/null +++ b/src/UMongoDB/Apis/ListUMongoDBVersionResponse.php @@ -0,0 +1,57 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MongoDBVersion($item)); + } + return $result; + } + + /** + * DataSet: + * + * @param MongoDBVersion[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMongoDB/Apis/ModifyUMongoDBAdminPasswordRequest.php b/src/UMongoDB/Apis/ModifyUMongoDBAdminPasswordRequest.php new file mode 100644 index 00000000..f3aab096 --- /dev/null +++ b/src/UMongoDB/Apis/ModifyUMongoDBAdminPasswordRequest.php @@ -0,0 +1,133 @@ + "ModifyUMongoDBAdminPassword"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterId"); + $this->markRequired("Password"); + } + + + + /** + * 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); + } + + /** + * 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); + } + + /** + * Password: 集群新密码(密码格式使用BASE64编码) + * + * @return string|null + */ + public function getPassword() + { + return $this->get("Password"); + } + + /** + * Password: 集群新密码(密码格式使用BASE64编码) + * + * @param string $password + */ + public function setPassword($password) + { + $this->set("Password", $password); + } +} diff --git a/src/UMongoDB/Apis/ModifyUMongoDBAdminPasswordResponse.php b/src/UMongoDB/Apis/ModifyUMongoDBAdminPasswordResponse.php new file mode 100644 index 00000000..7fab1ffe --- /dev/null +++ b/src/UMongoDB/Apis/ModifyUMongoDBAdminPasswordResponse.php @@ -0,0 +1,26 @@ + "ModifyUMongoDBAttribute"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: 集群id + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群id + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * Name: 集群新名称(输入长度为6~63位名称) + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 集群新名称(输入长度为6~63位名称) + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * RemarkName: 集群备注(Name和RemarkName必传其一) + * + * @return string|null + */ + public function getRemarkName() + { + return $this->get("RemarkName"); + } + + /** + * RemarkName: 集群备注(Name和RemarkName必传其一) + * + * @param string $remarkName + */ + public function setRemarkName($remarkName) + { + $this->set("RemarkName", $remarkName); + } +} diff --git a/src/UMongoDB/Apis/ModifyUMongoDBAttributeResponse.php b/src/UMongoDB/Apis/ModifyUMongoDBAttributeResponse.php new file mode 100644 index 00000000..b1b25cfe --- /dev/null +++ b/src/UMongoDB/Apis/ModifyUMongoDBAttributeResponse.php @@ -0,0 +1,26 @@ + "ModifyUMongoDBBackupParam"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * 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); + } + + /** + * AutoBackupToggleWeek: 自动备份预期星期几(1~7),默认 3,7 (周三,周日) + * + * @return string|null + */ + public function getAutoBackupToggleWeek() + { + return $this->get("AutoBackupToggleWeek"); + } + + /** + * AutoBackupToggleWeek: 自动备份预期星期几(1~7),默认 3,7 (周三,周日) + * + * @param string $autoBackupToggleWeek + */ + public function setAutoBackupToggleWeek($autoBackupToggleWeek) + { + $this->set("AutoBackupToggleWeek", $autoBackupToggleWeek); + } + + /** + * AutoBackupToggleTime: 自动备份预期开始时间范围(00:00~23:59),默认 5:00~6:00 + * + * @return string|null + */ + public function getAutoBackupToggleTime() + { + return $this->get("AutoBackupToggleTime"); + } + + /** + * AutoBackupToggleTime: 自动备份预期开始时间范围(00:00~23:59),默认 5:00~6:00 + * + * @param string $autoBackupToggleTime + */ + public function setAutoBackupToggleTime($autoBackupToggleTime) + { + $this->set("AutoBackupToggleTime", $autoBackupToggleTime); + } + + /** + * Disabled: 是否禁用,true:禁用;false:开启 + * + * @return boolean|null + */ + public function getDisabled() + { + return $this->get("Disabled"); + } + + /** + * Disabled: 是否禁用,true:禁用;false:开启 + * + * @param boolean $disabled + */ + public function setDisabled($disabled) + { + $this->set("Disabled", $disabled); + } +} diff --git a/src/UMongoDB/Apis/ModifyUMongoDBBackupParamResponse.php b/src/UMongoDB/Apis/ModifyUMongoDBBackupParamResponse.php new file mode 100644 index 00000000..bf3fd67a --- /dev/null +++ b/src/UMongoDB/Apis/ModifyUMongoDBBackupParamResponse.php @@ -0,0 +1,26 @@ + "ResizeUMongoDBInstance"]); + $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); + } + + /** + * DiskSpace: 集群数据节点磁盘配置 + * + * @return integer|null + */ + public function getDiskSpace() + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 集群数据节点磁盘配置 + * + * @param int $diskSpace + */ + public function setDiskSpace($diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * MachineTypeId: 集群数据节点机型配置 + * + * @return string|null + */ + public function getMachineTypeId() + { + return $this->get("MachineTypeId"); + } + + /** + * MachineTypeId: 集群数据节点机型配置 + * + * @param string $machineTypeId + */ + public function setMachineTypeId($machineTypeId) + { + $this->set("MachineTypeId", $machineTypeId); + } + + /** + * MongosMachineTypeId: 集群Mongos节点机型配置 + * + * @return string|null + */ + public function getMongosMachineTypeId() + { + return $this->get("MongosMachineTypeId"); + } + + /** + * MongosMachineTypeId: 集群Mongos节点机型配置 + * + * @param string $mongosMachineTypeId + */ + public function setMongosMachineTypeId($mongosMachineTypeId) + { + $this->set("MongosMachineTypeId", $mongosMachineTypeId); + } +} diff --git a/src/UMongoDB/Apis/ResizeUMongoDBInstanceResponse.php b/src/UMongoDB/Apis/ResizeUMongoDBInstanceResponse.php new file mode 100644 index 00000000..bbc3d4ee --- /dev/null +++ b/src/UMongoDB/Apis/ResizeUMongoDBInstanceResponse.php @@ -0,0 +1,26 @@ + "RestartUMongoDBCluster"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * 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/UMongoDB/Apis/RestartUMongoDBClusterResponse.php b/src/UMongoDB/Apis/RestartUMongoDBClusterResponse.php new file mode 100644 index 00000000..a28625f2 --- /dev/null +++ b/src/UMongoDB/Apis/RestartUMongoDBClusterResponse.php @@ -0,0 +1,44 @@ +get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UMongoDB/Apis/StartUMongoDBClusterRequest.php b/src/UMongoDB/Apis/StartUMongoDBClusterRequest.php new file mode 100644 index 00000000..ccdabdde --- /dev/null +++ b/src/UMongoDB/Apis/StartUMongoDBClusterRequest.php @@ -0,0 +1,112 @@ + "StartUMongoDBCluster"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * 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/UMongoDB/Apis/StartUMongoDBClusterResponse.php b/src/UMongoDB/Apis/StartUMongoDBClusterResponse.php new file mode 100644 index 00000000..3bcbebc4 --- /dev/null +++ b/src/UMongoDB/Apis/StartUMongoDBClusterResponse.php @@ -0,0 +1,44 @@ +get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UMongoDB/Apis/StopUMongoDBClusterRequest.php b/src/UMongoDB/Apis/StopUMongoDBClusterRequest.php new file mode 100644 index 00000000..864bd62f --- /dev/null +++ b/src/UMongoDB/Apis/StopUMongoDBClusterRequest.php @@ -0,0 +1,112 @@ + "StopUMongoDBCluster"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * 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/UMongoDB/Apis/StopUMongoDBClusterResponse.php b/src/UMongoDB/Apis/StopUMongoDBClusterResponse.php new file mode 100644 index 00000000..bf85605d --- /dev/null +++ b/src/UMongoDB/Apis/StopUMongoDBClusterResponse.php @@ -0,0 +1,44 @@ +get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UMongoDB/Models/BackupInfo.php b/src/UMongoDB/Models/BackupInfo.php new file mode 100644 index 00000000..8bc91d9c --- /dev/null +++ b/src/UMongoDB/Models/BackupInfo.php @@ -0,0 +1,284 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * BackupId: 备份ID + * + * @return string|null + */ + public function getBackupId() + { + return $this->get("BackupId"); + } + + /** + * BackupId: 备份ID + * + * @param string $backupId + */ + public function setBackupId($backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * BackupName: 备份名称 + * + * @return string|null + */ + public function getBackupName() + { + return $this->get("BackupName"); + } + + /** + * BackupName: 备份名称 + * + * @param string $backupName + */ + public function setBackupName($backupName) + { + $this->set("BackupName", $backupName); + } + + /** + * 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); + } + + /** + * State: 备份状态 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 备份状态 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * BackupSize: 备份数据大小 + * + * @return integer|null + */ + public function getBackupSize() + { + return $this->get("BackupSize"); + } + + /** + * BackupSize: 备份数据大小 + * + * @param int $backupSize + */ + public function setBackupSize($backupSize) + { + $this->set("BackupSize", $backupSize); + } + + /** + * BackupType: 备份类型 + * + * @return string|null + */ + public function getBackupType() + { + return $this->get("BackupType"); + } + + /** + * BackupType: 备份类型 + * + * @param string $backupType + */ + public function setBackupType($backupType) + { + $this->set("BackupType", $backupType); + } + + /** + * StartTime: 备份开始时间 + * + * @return integer|null + */ + public function getStartTime() + { + return $this->get("StartTime"); + } + + /** + * StartTime: 备份开始时间 + * + * @param int $startTime + */ + public function setStartTime($startTime) + { + $this->set("StartTime", $startTime); + } + + /** + * EndTime: 备份结束时间 + * + * @return integer|null + */ + public function getEndTime() + { + return $this->get("EndTime"); + } + + /** + * EndTime: 备份结束时间 + * + * @param int $endTime + */ + public function setEndTime($endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * VirtualClusterId: 虚拟节点id + * + * @return string|null + */ + public function getVirtualClusterId() + { + return $this->get("VirtualClusterId"); + } + + /** + * VirtualClusterId: 虚拟节点id + * + * @param string $virtualClusterId + */ + public function setVirtualClusterId($virtualClusterId) + { + $this->set("VirtualClusterId", $virtualClusterId); + } + + /** + * ReplicaType: 副本类型,ConfigRepl或者DataRepl + * + * @return string|null + */ + public function getReplicaType() + { + return $this->get("ReplicaType"); + } + + /** + * ReplicaType: 副本类型,ConfigRepl或者DataRepl + * + * @param string $replicaType + */ + public function setReplicaType($replicaType) + { + $this->set("ReplicaType", $replicaType); + } + + /** + * BatchId: 批次id + * + * @return string|null + */ + public function getBatchId() + { + return $this->get("BatchId"); + } + + /** + * BatchId: 批次id + * + * @param string $batchId + */ + public function setBatchId($batchId) + { + $this->set("BatchId", $batchId); + } + + /** + * DiskSize: 磁盘大小 + * + * @return integer|null + */ + public function getDiskSize() + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 磁盘大小 + * + * @param int $diskSize + */ + public function setDiskSize($diskSize) + { + $this->set("DiskSize", $diskSize); + } +} diff --git a/src/UMongoDB/Models/BackupParam.php b/src/UMongoDB/Models/BackupParam.php new file mode 100644 index 00000000..9586ae1d --- /dev/null +++ b/src/UMongoDB/Models/BackupParam.php @@ -0,0 +1,144 @@ +get("ClusterId"); + } + + /** + * ClusterId: 实例ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * AutoBackupToggleWeek: 自动备份预期周几 (1-7 表示 周一到周末,多个数据用','分割,eg: 3,7) + * + * @return string|null + */ + public function getAutoBackupToggleWeek() + { + return $this->get("AutoBackupToggleWeek"); + } + + /** + * AutoBackupToggleWeek: 自动备份预期周几 (1-7 表示 周一到周末,多个数据用','分割,eg: 3,7) + * + * @param string $autoBackupToggleWeek + */ + public function setAutoBackupToggleWeek($autoBackupToggleWeek) + { + $this->set("AutoBackupToggleWeek", $autoBackupToggleWeek); + } + + /** + * AutoBackupToggleTime: 自动备份预期时间范围 (24小时制,精确到分钟,00:00~23:59) + * + * @return string|null + */ + public function getAutoBackupToggleTime() + { + return $this->get("AutoBackupToggleTime"); + } + + /** + * AutoBackupToggleTime: 自动备份预期时间范围 (24小时制,精确到分钟,00:00~23:59) + * + * @param string $autoBackupToggleTime + */ + public function setAutoBackupToggleTime($autoBackupToggleTime) + { + $this->set("AutoBackupToggleTime", $autoBackupToggleTime); + } + + /** + * AutoBackupCopies: 自动备份保存份数 + * + * @return integer|null + */ + public function getAutoBackupCopies() + { + return $this->get("AutoBackupCopies"); + } + + /** + * AutoBackupCopies: 自动备份保存份数 + * + * @param int $autoBackupCopies + */ + public function setAutoBackupCopies($autoBackupCopies) + { + $this->set("AutoBackupCopies", $autoBackupCopies); + } + + /** + * ManualBackupCopies: 手动备份保存份数 + * + * @return integer|null + */ + public function getManualBackupCopies() + { + return $this->get("ManualBackupCopies"); + } + + /** + * ManualBackupCopies: 手动备份保存份数 + * + * @param int $manualBackupCopies + */ + public function setManualBackupCopies($manualBackupCopies) + { + $this->set("ManualBackupCopies", $manualBackupCopies); + } + + /** + * Disabled: 是否禁用(false:未禁用;true:禁用) + * + * @return boolean|null + */ + public function getDisabled() + { + return $this->get("Disabled"); + } + + /** + * Disabled: 是否禁用(false:未禁用;true:禁用) + * + * @param boolean $disabled + */ + public function setDisabled($disabled) + { + $this->set("Disabled", $disabled); + } +} diff --git a/src/UMongoDB/Models/ClusterInfo.php b/src/UMongoDB/Models/ClusterInfo.php new file mode 100644 index 00000000..8d4be4b4 --- /dev/null +++ b/src/UMongoDB/Models/ClusterInfo.php @@ -0,0 +1,628 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ZoneId: + * + * @return integer|null + */ + public function getZoneId() + { + return $this->get("ZoneId"); + } + + /** + * ZoneId: + * + * @param int $zoneId + */ + public function setZoneId($zoneId) + { + $this->set("ZoneId", $zoneId); + } + + /** + * ClusterType: 集群类型,ReplicaSet :副本集,SharedCluster:分片集 + * + * @return string|null + */ + public function getClusterType() + { + return $this->get("ClusterType"); + } + + /** + * ClusterType: 集群类型,ReplicaSet :副本集,SharedCluster:分片集 + * + * @param string $clusterType + */ + public function setClusterType($clusterType) + { + $this->set("ClusterType", $clusterType); + } + + /** + * 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); + } + + /** + * InstanceName: 实例名称 + * + * @return string|null + */ + public function getInstanceName() + { + return $this->get("InstanceName"); + } + + /** + * InstanceName: 实例名称 + * + * @param string $instanceName + */ + public function setInstanceName($instanceName) + { + $this->set("InstanceName", $instanceName); + } + + /** + * State: 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败,Upgrading: 升降级中,UpgradeFailed: 升降级失败,Switching:主备切换中,UpdatingSSL:修改SSL中,UpdateSSLFail:修改SSL失败 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败,Upgrading: 升降级中,UpgradeFailed: 升降级失败,Switching:主备切换中,UpdatingSSL:修改SSL中,UpdateSSLFail:修改SSL失败 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * DBVersion: 副本集的Mongodb的版本 + * + * @return string|null + */ + public function getDBVersion() + { + return $this->get("DBVersion"); + } + + /** + * DBVersion: 副本集的Mongodb的版本 + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } + + /** + * DiskSpace: 磁盘空间(GB), 默认根据配置机型 + * + * @return integer|null + */ + public function getDiskSpace() + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB), 默认根据配置机型 + * + * @param int $diskSpace + */ + public function setDiskSpace($diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * MachineTypeId: 计算规格 + * + * @return string|null + */ + public function getMachineTypeId() + { + return $this->get("MachineTypeId"); + } + + /** + * MachineTypeId: 计算规格 + * + * @param string $machineTypeId + */ + public function setMachineTypeId($machineTypeId) + { + $this->set("MachineTypeId", $machineTypeId); + } + + /** + * CreateTime: DB实例创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: DB实例创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ConfigReplicaInfo: ConfigSrv信息 + * + * @return ReplicaInfo|null + */ + public function getConfigReplicaInfo() + { + return new ReplicaInfo($this->get("ConfigReplicaInfo")); + } + + /** + * ConfigReplicaInfo: ConfigSrv信息 + * + * @param ReplicaInfo $configReplicaInfo + */ + public function setConfigReplicaInfo(array $configReplicaInfo) + { + $this->set("ConfigReplicaInfo", $configReplicaInfo->getAll()); + } + + /** + * DataReplicaInfos: 数据副本信息 + * + * @return ReplicaInfo[]|null + */ + public function getDataReplicaInfos() + { + $items = $this->get("DataReplicaInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ReplicaInfo($item)); + } + return $result; + } + + /** + * DataReplicaInfos: 数据副本信息 + * + * @param ReplicaInfo[] $dataReplicaInfos + */ + public function setDataReplicaInfos(array $dataReplicaInfos) + { + $result = []; + foreach ($dataReplicaInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * MongosInfo: Mongos节点信息 + * + * @return NodeInfo[]|null + */ + public function getMongosInfo() + { + $items = $this->get("MongosInfo"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodeInfo($item)); + } + return $result; + } + + /** + * MongosInfo: Mongos节点信息 + * + * @param NodeInfo[] $mongosInfo + */ + public function setMongosInfo(array $mongosInfo) + { + $result = []; + foreach ($mongosInfo as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ConnectURL: 副本集的访问地址 + * + * @return string|null + */ + public function getConnectURL() + { + return $this->get("ConnectURL"); + } + + /** + * ConnectURL: 副本集的访问地址 + * + * @param string $connectURL + */ + public function setConnectURL($connectURL) + { + $this->set("ConnectURL", $connectURL); + } + + /** + * DeleteTime: DB实例删除时间 + * + * @return integer|null + */ + public function getDeleteTime() + { + return $this->get("DeleteTime"); + } + + /** + * DeleteTime: DB实例删除时间 + * + * @param int $deleteTime + */ + public function setDeleteTime($deleteTime) + { + $this->set("DeleteTime", $deleteTime); + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * ShardCount: 分片数量,分片集有效 + * + * @return integer|null + */ + public function getShardCount() + { + return $this->get("ShardCount"); + } + + /** + * ShardCount: 分片数量,分片集有效 + * + * @param int $shardCount + */ + public function setShardCount($shardCount) + { + $this->set("ShardCount", $shardCount); + } + + /** + * ShardNodeCount: 每分片节点数量,分片集有效 + * + * @return integer|null + */ + public function getShardNodeCount() + { + return $this->get("ShardNodeCount"); + } + + /** + * ShardNodeCount: 每分片节点数量,分片集有效 + * + * @param int $shardNodeCount + */ + public function setShardNodeCount($shardNodeCount) + { + $this->set("ShardNodeCount", $shardNodeCount); + } + + /** + * MongosCount: Mongos节点数量,分片集有效 + * + * @return integer|null + */ + public function getMongosCount() + { + return $this->get("MongosCount"); + } + + /** + * MongosCount: Mongos节点数量,分片集有效 + * + * @param int $mongosCount + */ + public function setMongosCount($mongosCount) + { + $this->set("MongosCount", $mongosCount); + } + + /** + * ConfigNodeCount: Config配置集群节点数量,分片集有效 + * + * @return integer|null + */ + public function getConfigNodeCount() + { + return $this->get("ConfigNodeCount"); + } + + /** + * ConfigNodeCount: Config配置集群节点数量,分片集有效 + * + * @param int $configNodeCount + */ + public function setConfigNodeCount($configNodeCount) + { + $this->set("ConfigNodeCount", $configNodeCount); + } + + /** + * ConfigMachineType: Config配置集群节点配置,分片集有效 + * + * @return string|null + */ + public function getConfigMachineType() + { + return $this->get("ConfigMachineType"); + } + + /** + * ConfigMachineType: Config配置集群节点配置,分片集有效 + * + * @param string $configMachineType + */ + public function setConfigMachineType($configMachineType) + { + $this->set("ConfigMachineType", $configMachineType); + } + + /** + * Tag: 实例业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 实例业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * DataComputeType: 数据节点计算规格 + * + * @return MongodbMachineType|null + */ + public function getDataComputeType() + { + return new MongodbMachineType($this->get("DataComputeType")); + } + + /** + * DataComputeType: 数据节点计算规格 + * + * @param MongodbMachineType $dataComputeType + */ + public function setDataComputeType(array $dataComputeType) + { + $this->set("DataComputeType", $dataComputeType->getAll()); + } + + /** + * ConfigComputeType: 配置节点计算规格 + * + * @return MongodbMachineType|null + */ + public function getConfigComputeType() + { + return new MongodbMachineType($this->get("ConfigComputeType")); + } + + /** + * ConfigComputeType: 配置节点计算规格 + * + * @param MongodbMachineType $configComputeType + */ + public function setConfigComputeType(array $configComputeType) + { + $this->set("ConfigComputeType", $configComputeType->getAll()); + } + + /** + * MongosComputeType: 路由节点计算规格 + * + * @return MongodbMachineType|null + */ + public function getMongosComputeType() + { + return new MongodbMachineType($this->get("MongosComputeType")); + } + + /** + * MongosComputeType: 路由节点计算规格 + * + * @param MongodbMachineType $mongosComputeType + */ + public function setMongosComputeType(array $mongosComputeType) + { + $this->set("MongosComputeType", $mongosComputeType->getAll()); + } + + /** + * CrossZones: 跨用区列表 + * + * @return string[]|null + */ + public function getCrossZones() + { + return $this->get("CrossZones"); + } + + /** + * CrossZones: 跨用区列表 + * + * @param string[] $crossZones + */ + public function setCrossZones(array $crossZones) + { + $this->set("CrossZones", $crossZones); + } + + /** + * EnableSSL: 是否开启了SSL;1->未开启 2->开启 + * + * @return integer|null + */ + public function getEnableSSL() + { + return $this->get("EnableSSL"); + } + + /** + * EnableSSL: 是否开启了SSL;1->未开启 2->开启 + * + * @param int $enableSSL + */ + public function setEnableSSL($enableSSL) + { + $this->set("EnableSSL", $enableSSL); + } + + /** + * SSLExpirationTime: SSL到期时间 + * + * @return integer|null + */ + public function getSSLExpirationTime() + { + return $this->get("SSLExpirationTime"); + } + + /** + * SSLExpirationTime: SSL到期时间 + * + * @param int $sslExpirationTime + */ + public function setSSLExpirationTime($sslExpirationTime) + { + $this->set("SSLExpirationTime", $sslExpirationTime); + } +} diff --git a/src/UMongoDB/Models/ConfigOptions.php b/src/UMongoDB/Models/ConfigOptions.php new file mode 100644 index 00000000..a0287719 --- /dev/null +++ b/src/UMongoDB/Models/ConfigOptions.php @@ -0,0 +1,264 @@ +get("MongodbVersion"); + } + + /** + * MongodbVersion: mongo版本 + * + * @param string $mongodbVersion + */ + public function setMongodbVersion($mongodbVersion) + { + $this->set("MongodbVersion", $mongodbVersion); + } + + /** + * OptionName: 配置选项名 + * + * @return string|null + */ + public function getOptionName() + { + return $this->get("OptionName"); + } + + /** + * OptionName: 配置选项名 + * + * @param string $optionName + */ + public function setOptionName($optionName) + { + $this->set("OptionName", $optionName); + } + + /** + * OptionValueType: 配置选项类型 string,int,bool + * + * @return string|null + */ + public function getOptionValueType() + { + return $this->get("OptionValueType"); + } + + /** + * OptionValueType: 配置选项类型 string,int,bool + * + * @param string $optionValueType + */ + public function setOptionValueType($optionValueType) + { + $this->set("OptionValueType", $optionValueType); + } + + /** + * OptionValues: 配置选项值范围 + * + * @return string|null + */ + public function getOptionValues() + { + return $this->get("OptionValues"); + } + + /** + * OptionValues: 配置选项值范围 + * + * @param string $optionValues + */ + public function setOptionValues($optionValues) + { + $this->set("OptionValues", $optionValues); + } + + /** + * OptionDefaultValue: 默认值 + * + * @return string|null + */ + public function getOptionDefaultValue() + { + return $this->get("OptionDefaultValue"); + } + + /** + * OptionDefaultValue: 默认值 + * + * @param string $optionDefaultValue + */ + public function setOptionDefaultValue($optionDefaultValue) + { + $this->set("OptionDefaultValue", $optionDefaultValue); + } + + /** + * IsDefaultOption: 是否为默认选项 + * + * @return boolean|null + */ + public function getIsDefaultOption() + { + return $this->get("IsDefaultOption"); + } + + /** + * IsDefaultOption: 是否为默认选项 + * + * @param boolean $isDefaultOption + */ + public function setIsDefaultOption($isDefaultOption) + { + $this->set("IsDefaultOption", $isDefaultOption); + } + + /** + * EnableModify: 是否可修改 + * + * @return boolean|null + */ + public function getEnableModify() + { + return $this->get("EnableModify"); + } + + /** + * EnableModify: 是否可修改 + * + * @param boolean $enableModify + */ + public function setEnableModify($enableModify) + { + $this->set("EnableModify", $enableModify); + } + + /** + * EnableDisplay: 是否前端展示 + * + * @return boolean|null + */ + public function getEnableDisplay() + { + return $this->get("EnableDisplay"); + } + + /** + * EnableDisplay: 是否前端展示 + * + * @param boolean $enableDisplay + */ + public function setEnableDisplay($enableDisplay) + { + $this->set("EnableDisplay", $enableDisplay); + } + + /** + * ForceRestart: 是否需重启 + * + * @return boolean|null + */ + public function getForceRestart() + { + return $this->get("ForceRestart"); + } + + /** + * ForceRestart: 是否需重启 + * + * @param boolean $forceRestart + */ + public function setForceRestart($forceRestart) + { + $this->set("ForceRestart", $forceRestart); + } + + /** + * OptionFormatType: 选项值格式 + * + * @return string|null + */ + public function getOptionFormatType() + { + return $this->get("OptionFormatType"); + } + + /** + * OptionFormatType: 选项值格式 + * + * @param string $optionFormatType + */ + public function setOptionFormatType($optionFormatType) + { + $this->set("OptionFormatType", $optionFormatType); + } + + /** + * AllowedApplyType: 允许应用类型 + * + * @return string|null + */ + public function getAllowedApplyType() + { + return $this->get("AllowedApplyType"); + } + + /** + * AllowedApplyType: 允许应用类型 + * + * @param string $allowedApplyType + */ + public function setAllowedApplyType($allowedApplyType) + { + $this->set("AllowedApplyType", $allowedApplyType); + } + + /** + * Description: 描述 + * + * @return string|null + */ + public function getDescription() + { + return $this->get("Description"); + } + + /** + * Description: 描述 + * + * @param string $description + */ + public function setDescription($description) + { + $this->set("Description", $description); + } +} diff --git a/src/UMongoDB/Models/ConfigTemplate.php b/src/UMongoDB/Models/ConfigTemplate.php new file mode 100644 index 00000000..ee1714ec --- /dev/null +++ b/src/UMongoDB/Models/ConfigTemplate.php @@ -0,0 +1,204 @@ +get("TemplateId"); + } + + /** + * TemplateId: 模板ID + * + * @param string $templateId + */ + public function setTemplateId($templateId) + { + $this->set("TemplateId", $templateId); + } + + /** + * TemplateName: 模板名称 + * + * @return string|null + */ + public function getTemplateName() + { + return $this->get("TemplateName"); + } + + /** + * TemplateName: 模板名称 + * + * @param string $templateName + */ + public function setTemplateName($templateName) + { + $this->set("TemplateName", $templateName); + } + + /** + * MongodbVersion: mongo版本 + * + * @return string|null + */ + public function getMongodbVersion() + { + return $this->get("MongodbVersion"); + } + + /** + * MongodbVersion: mongo版本 + * + * @param string $mongodbVersion + */ + public function setMongodbVersion($mongodbVersion) + { + $this->set("MongodbVersion", $mongodbVersion); + } + + /** + * ClusterType: 集群类型 + * + * @return string|null + */ + public function getClusterType() + { + return $this->get("ClusterType"); + } + + /** + * ClusterType: 集群类型 + * + * @param string $clusterType + */ + public function setClusterType($clusterType) + { + $this->set("ClusterType", $clusterType); + } + + /** + * TemplateType: 模板类型 UsersTemplate DefaultTemplate + * + * @return string|null + */ + public function getTemplateType() + { + return $this->get("TemplateType"); + } + + /** + * TemplateType: 模板类型 UsersTemplate DefaultTemplate + * + * @param string $templateType + */ + public function setTemplateType($templateType) + { + $this->set("TemplateType", $templateType); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ModifyTime: 修改时间 + * + * @return integer|null + */ + public function getModifyTime() + { + return $this->get("ModifyTime"); + } + + /** + * ModifyTime: 修改时间 + * + * @param int $modifyTime + */ + public function setModifyTime($modifyTime) + { + $this->set("ModifyTime", $modifyTime); + } + + /** + * DeleteTime: 删除时间 + * + * @return integer|null + */ + public function getDeleteTime() + { + return $this->get("DeleteTime"); + } + + /** + * DeleteTime: 删除时间 + * + * @param int $deleteTime + */ + public function setDeleteTime($deleteTime) + { + $this->set("DeleteTime", $deleteTime); + } + + /** + * Description: 模板描述 + * + * @return string|null + */ + public function getDescription() + { + return $this->get("Description"); + } + + /** + * Description: 模板描述 + * + * @param string $description + */ + public function setDescription($description) + { + $this->set("Description", $description); + } +} diff --git a/src/UMongoDB/Models/ConfigTemplateItem.php b/src/UMongoDB/Models/ConfigTemplateItem.php new file mode 100644 index 00000000..0cbc84d7 --- /dev/null +++ b/src/UMongoDB/Models/ConfigTemplateItem.php @@ -0,0 +1,184 @@ +get("ItemId"); + } + + /** + * ItemId: itemId + * + * @param string $itemId + */ + public function setItemId($itemId) + { + $this->set("ItemId", $itemId); + } + + /** + * TemplateId: 模板ID + * + * @return string|null + */ + public function getTemplateId() + { + return $this->get("TemplateId"); + } + + /** + * TemplateId: 模板ID + * + * @param string $templateId + */ + public function setTemplateId($templateId) + { + $this->set("TemplateId", $templateId); + } + + /** + * ConfigName: 配置名称 + * + * @return string|null + */ + public function getConfigName() + { + return $this->get("ConfigName"); + } + + /** + * ConfigName: 配置名称 + * + * @param string $configName + */ + public function setConfigName($configName) + { + $this->set("ConfigName", $configName); + } + + /** + * ConfigValue: 配置值 + * + * @return string|null + */ + public function getConfigValue() + { + return $this->get("ConfigValue"); + } + + /** + * ConfigValue: 配置值 + * + * @param string $configValue + */ + public function setConfigValue($configValue) + { + $this->set("ConfigValue", $configValue); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ModifyTime: 修改时间 + * + * @return integer|null + */ + public function getModifyTime() + { + return $this->get("ModifyTime"); + } + + /** + * ModifyTime: 修改时间 + * + * @param int $modifyTime + */ + public function setModifyTime($modifyTime) + { + $this->set("ModifyTime", $modifyTime); + } + + /** + * ConfigOption: 配置选项 + * + * @return ConfigOptions|null + */ + public function getConfigOption() + { + return new ConfigOptions($this->get("ConfigOption")); + } + + /** + * ConfigOption: 配置选项 + * + * @param ConfigOptions $configOption + */ + public function setConfigOption(array $configOption) + { + $this->set("ConfigOption", $configOption->getAll()); + } + + /** + * NodeType: 节点类型: DataNode:数据节点 | ConfigSrvNode:配置节点 | MongosNode:路由节点 + * + * @return string|null + */ + public function getNodeType() + { + return $this->get("NodeType"); + } + + /** + * NodeType: 节点类型: DataNode:数据节点 | ConfigSrvNode:配置节点 | MongosNode:路由节点 + * + * @param string $nodeType + */ + public function setNodeType($nodeType) + { + $this->set("NodeType", $nodeType); + } +} diff --git a/src/UMongoDB/Models/DiskInfo.php b/src/UMongoDB/Models/DiskInfo.php new file mode 100644 index 00000000..0e939e15 --- /dev/null +++ b/src/UMongoDB/Models/DiskInfo.php @@ -0,0 +1,64 @@ +get("DiskId"); + } + + /** + * DiskId: 磁盘id + * + * @param string $diskId + */ + public function setDiskId($diskId) + { + $this->set("DiskId", $diskId); + } + + /** + * 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); + } +} diff --git a/src/UMongoDB/Models/MongoDBVersion.php b/src/UMongoDB/Models/MongoDBVersion.php new file mode 100644 index 00000000..dc5c551e --- /dev/null +++ b/src/UMongoDB/Models/MongoDBVersion.php @@ -0,0 +1,44 @@ +get("DBVersion"); + } + + /** + * DBVersion: MongoDB版本 + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } +} diff --git a/src/UMongoDB/Models/MongodbInstance.php b/src/UMongoDB/Models/MongodbInstance.php new file mode 100644 index 00000000..6ddeb43a --- /dev/null +++ b/src/UMongoDB/Models/MongodbInstance.php @@ -0,0 +1,344 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ClusterId: 副本集/分片集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 副本集/分片集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * Name: 副本集/分片集群实例名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 副本集/分片集群实例名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * DBVersion: 副本集/分片集群的Mongodb的版本,包括MongoDB-3.6, MongoDB-4.2 + * + * @return string|null + */ + public function getDBVersion() + { + return $this->get("DBVersion"); + } + + /** + * DBVersion: 副本集/分片集群的Mongodb的版本,包括MongoDB-3.6, MongoDB-4.2 + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } + + /** + * ConnectURL: 副本集/分片集群的访问地址 + * + * @return string|null + */ + public function getConnectURL() + { + return $this->get("ConnectURL"); + } + + /** + * ConnectURL: 副本集/分片集群的访问地址 + * + * @param string $connectURL + */ + public function setConnectURL($connectURL) + { + $this->set("ConnectURL", $connectURL); + } + + /** + * CreateTime: 副本集/分片集群的创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 副本集/分片集群的创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ClusterType: 集群类型,ReplicaSet :副本集,SharedCluster:分片集 + * + * @return string|null + */ + public function getClusterType() + { + return $this->get("ClusterType"); + } + + /** + * ClusterType: 集群类型,ReplicaSet :副本集,SharedCluster:分片集 + * + * @param string $clusterType + */ + public function setClusterType($clusterType) + { + $this->set("ClusterType", $clusterType); + } + + /** + * State: 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败,Upgrading: 升降级中,UpgradeFailed: 升降级失败,Switching:主备切换中 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败,Upgrading: 升降级中,UpgradeFailed: 升降级失败,Switching:主备切换中 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * IPv6ConnectURL: 副本集/分片集IPv6访问地址 + * + * @return string|null + */ + public function getIPv6ConnectURL() + { + return $this->get("IPv6ConnectURL"); + } + + /** + * IPv6ConnectURL: 副本集/分片集IPv6访问地址 + * + * @param string $iPv6ConnectURL + */ + public function setIPv6ConnectURL($iPv6ConnectURL) + { + $this->set("IPv6ConnectURL", $iPv6ConnectURL); + } + + /** + * ExpiredTime: DB实例过期时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getExpiredTime() + { + return $this->get("ExpiredTime"); + } + + /** + * ExpiredTime: DB实例过期时间,采用UTC计时时间戳 + * + * @param int $expiredTime + */ + public function setExpiredTime($expiredTime) + { + $this->set("ExpiredTime", $expiredTime); + } + + /** + * DataComputeType: 数据节点计算规格 + * + * @return MongodbMachineType|null + */ + public function getDataComputeType() + { + return new MongodbMachineType($this->get("DataComputeType")); + } + + /** + * DataComputeType: 数据节点计算规格 + * + * @param MongodbMachineType $dataComputeType + */ + public function setDataComputeType(array $dataComputeType) + { + $this->set("DataComputeType", $dataComputeType->getAll()); + } + + /** + * 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); + } + + /** + * DiskSpace: 数据节点磁盘空间(GB) + * + * @return integer|null + */ + public function getDiskSpace() + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 数据节点磁盘空间(GB) + * + * @param int $diskSpace + */ + public function setDiskSpace($diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * CrossZones: 跨可用区列表 + * + * @return string[]|null + */ + public function getCrossZones() + { + return $this->get("CrossZones"); + } + + /** + * CrossZones: 跨可用区列表 + * + * @param string[] $crossZones + */ + public function setCrossZones(array $crossZones) + { + $this->set("CrossZones", $crossZones); + } +} diff --git a/src/UMongoDB/Models/MongodbMachineSpec.php b/src/UMongoDB/Models/MongodbMachineSpec.php new file mode 100644 index 00000000..f08cc8c2 --- /dev/null +++ b/src/UMongoDB/Models/MongodbMachineSpec.php @@ -0,0 +1,116 @@ +get("ClassType"); + } + + /** + * ClassType: 规格类型;O | N + * + * @param string $classType + */ + public function setClassType($classType) + { + $this->set("ClassType", $classType); + } + + /** + * DiskType: 磁盘类型;CLOUD_RSSD | CLOUD_SSD | LOCAL_SSD + * + * @return string[]|null + */ + public function getDiskType() + { + return $this->get("DiskType"); + } + + /** + * DiskType: 磁盘类型;CLOUD_RSSD | CLOUD_SSD | LOCAL_SSD + * + * @param string[] $diskType + */ + public function setDiskType(array $diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * ComputeType: 计算规格列表 + * + * @return MongodbMachineType[]|null + */ + public function getComputeType() + { + $items = $this->get("ComputeType"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MongodbMachineType($item)); + } + return $result; + } + + /** + * ComputeType: 计算规格列表 + * + * @param MongodbMachineType[] $computeType + */ + public function setComputeType(array $computeType) + { + $result = []; + foreach ($computeType as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DefaultMachineType: 默认规格 + * + * @return MongodbMachineType|null + */ + public function getDefaultMachineType() + { + return new MongodbMachineType($this->get("DefaultMachineType")); + } + + /** + * DefaultMachineType: 默认规格 + * + * @param MongodbMachineType $defaultMachineType + */ + public function setDefaultMachineType(array $defaultMachineType) + { + $this->set("DefaultMachineType", $defaultMachineType->getAll()); + } +} diff --git a/src/UMongoDB/Models/MongodbMachineType.php b/src/UMongoDB/Models/MongodbMachineType.php new file mode 100644 index 00000000..bbaefebb --- /dev/null +++ b/src/UMongoDB/Models/MongodbMachineType.php @@ -0,0 +1,144 @@ +get("MachineTypeId"); + } + + /** + * MachineTypeId: 机器类型ID o.mongo2m.medium,o.mongo2m.xlarge + * + * @param string $machineTypeId + */ + public function setMachineTypeId($machineTypeId) + { + $this->set("MachineTypeId", $machineTypeId); + } + + /** + * Description: 配置简称 2C4G + * + * @return string|null + */ + public function getDescription() + { + return $this->get("Description"); + } + + /** + * Description: 配置简称 2C4G + * + * @param string $description + */ + public function setDescription($description) + { + $this->set("Description", $description); + } + + /** + * 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); + } + + /** + * UHhostMachineType: 机器类型,N/O + * + * @return string|null + */ + public function getUHhostMachineType() + { + return $this->get("UHhostMachineType"); + } + + /** + * UHhostMachineType: 机器类型,N/O + * + * @param string $uHhostMachineType + */ + public function setUHhostMachineType($uHhostMachineType) + { + $this->set("UHhostMachineType", $uHhostMachineType); + } + + /** + * Group: 配置分组,2m , 4m + * + * @return string|null + */ + public function getGroup() + { + return $this->get("Group"); + } + + /** + * Group: 配置分组,2m , 4m + * + * @param string $group + */ + public function setGroup($group) + { + $this->set("Group", $group); + } +} diff --git a/src/UMongoDB/Models/NodeInfo.php b/src/UMongoDB/Models/NodeInfo.php new file mode 100644 index 00000000..7200f59b --- /dev/null +++ b/src/UMongoDB/Models/NodeInfo.php @@ -0,0 +1,304 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ZoneId: 可用区ID + * + * @return integer|null + */ + public function getZoneId() + { + return $this->get("ZoneId"); + } + + /** + * ZoneId: 可用区ID + * + * @param int $zoneId + */ + public function setZoneId($zoneId) + { + $this->set("ZoneId", $zoneId); + } + + /** + * 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); + } + + /** + * NodeRole: 节点角色,Primary/Secondary/Arbiter/Startup等等 + * + * @return string|null + */ + public function getNodeRole() + { + return $this->get("NodeRole"); + } + + /** + * NodeRole: 节点角色,Primary/Secondary/Arbiter/Startup等等 + * + * @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); + } + + /** + * State: 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * DBVersion: 副本集的Mongodb的版本 + * + * @return string|null + */ + public function getDBVersion() + { + return $this->get("DBVersion"); + } + + /** + * DBVersion: 副本集的Mongodb的版本 + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } + + /** + * 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); + } + + /** + * VirtualClusterId: 虚拟节点ID + * + * @return string|null + */ + public function getVirtualClusterId() + { + return $this->get("VirtualClusterId"); + } + + /** + * VirtualClusterId: 虚拟节点ID + * + * @param string $virtualClusterId + */ + public function setVirtualClusterId($virtualClusterId) + { + $this->set("VirtualClusterId", $virtualClusterId); + } + + /** + * MachineType: 机型信息 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机型信息 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * MachineTypeId: 机型信息ID + * + * @return string|null + */ + public function getMachineTypeId() + { + return $this->get("MachineTypeId"); + } + + /** + * MachineTypeId: 机型信息ID + * + * @param string $machineTypeId + */ + public function setMachineTypeId($machineTypeId) + { + $this->set("MachineTypeId", $machineTypeId); + } + + /** + * CreateTime: DB实例创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: DB实例创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * DataDisk: 数据盘信息 + * + * @return DiskInfo|null + */ + public function getDataDisk() + { + return new DiskInfo($this->get("DataDisk")); + } + + /** + * DataDisk: 数据盘信息 + * + * @param DiskInfo $dataDisk + */ + public function setDataDisk(array $dataDisk) + { + $this->set("DataDisk", $dataDisk->getAll()); + } + + /** + * SysDisk: 系统盘信息 + * + * @return DiskInfo|null + */ + public function getSysDisk() + { + return new DiskInfo($this->get("SysDisk")); + } + + /** + * SysDisk: 系统盘信息 + * + * @param DiskInfo $sysDisk + */ + public function setSysDisk(array $sysDisk) + { + $this->set("SysDisk", $sysDisk->getAll()); + } +} diff --git a/src/UMongoDB/Models/PackageInfo.php b/src/UMongoDB/Models/PackageInfo.php new file mode 100644 index 00000000..2ace4439 --- /dev/null +++ b/src/UMongoDB/Models/PackageInfo.php @@ -0,0 +1,264 @@ +get("Id"); + } + + /** + * Id: id + * + * @param int $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Name: 名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * State: Package_Running,Package_Success,Package_Failed,Package_Deleting,Package_Deleted,Package_DeleteFailed + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: Package_Running,Package_Success,Package_Failed,Package_Deleting,Package_Deleted,Package_DeleteFailed + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * Size: 大小,单位字节 + * + * @return integer|null + */ + public function getSize() + { + return $this->get("Size"); + } + + /** + * Size: 大小,单位字节 + * + * @param int $size + */ + public function setSize($size) + { + $this->set("Size", $size); + } + + /** + * PackageType: SlowLog,ErrorLog + * + * @return string|null + */ + public function getPackageType() + { + return $this->get("PackageType"); + } + + /** + * PackageType: SlowLog,ErrorLog + * + * @param string $packageType + */ + public function setPackageType($packageType) + { + $this->set("PackageType", $packageType); + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * Role: 角色 + * + * @return string|null + */ + public function getRole() + { + return $this->get("Role"); + } + + /** + * Role: 角色 + * + * @param string $role + */ + public function setRole($role) + { + $this->set("Role", $role); + } + + /** + * Begin: 开始时间 + * + * @return integer|null + */ + public function getBegin() + { + return $this->get("Begin"); + } + + /** + * Begin: 开始时间 + * + * @param int $begin + */ + public function setBegin($begin) + { + $this->set("Begin", $begin); + } + + /** + * End: 结束时间 + * + * @return integer|null + */ + public function getEnd() + { + return $this->get("End"); + } + + /** + * End: 结束时间 + * + * @param int $end + */ + public function setEnd($end) + { + $this->set("End", $end); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * FinishTime: 完成时间 + * + * @return integer|null + */ + public function getFinishTime() + { + return $this->get("FinishTime"); + } + + /** + * FinishTime: 完成时间 + * + * @param int $finishTime + */ + public function setFinishTime($finishTime) + { + $this->set("FinishTime", $finishTime); + } +} diff --git a/src/UMongoDB/Models/ReplicaInfo.php b/src/UMongoDB/Models/ReplicaInfo.php new file mode 100644 index 00000000..18aa17f8 --- /dev/null +++ b/src/UMongoDB/Models/ReplicaInfo.php @@ -0,0 +1,276 @@ +get("ReplicaId"); + } + + /** + * ReplicaId: 副本集ID + * + * @param string $replicaId + */ + public function setReplicaId($replicaId) + { + $this->set("ReplicaId", $replicaId); + } + + /** + * 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); + } + + /** + * ReplicaType: 副本类型,ConfigRepl或者DataRepl + * + * @return string|null + */ + public function getReplicaType() + { + return $this->get("ReplicaType"); + } + + /** + * ReplicaType: 副本类型,ConfigRepl或者DataRepl + * + * @param string $replicaType + */ + public function setReplicaType($replicaType) + { + $this->set("ReplicaType", $replicaType); + } + + /** + * State: 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * MachineType: 机器类型 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机器类型 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * MachineTypeId: 机器类型Id + * + * @return string|null + */ + public function getMachineTypeId() + { + return $this->get("MachineTypeId"); + } + + /** + * MachineTypeId: 机器类型Id + * + * @param string $machineTypeId + */ + public function setMachineTypeId($machineTypeId) + { + $this->set("MachineTypeId", $machineTypeId); + } + + /** + * IsolationGroupId: 隔离组ID + * + * @return string|null + */ + public function getIsolationGroupId() + { + return $this->get("IsolationGroupId"); + } + + /** + * IsolationGroupId: 隔离组ID + * + * @param string $isolationGroupId + */ + public function setIsolationGroupId($isolationGroupId) + { + $this->set("IsolationGroupId", $isolationGroupId); + } + + /** + * NodeInfos: 副本集下的节点信息 + * + * @return NodeInfo[]|null + */ + public function getNodeInfos() + { + $items = $this->get("NodeInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodeInfo($item)); + } + return $result; + } + + /** + * NodeInfos: 副本集下的节点信息 + * + * @param NodeInfo[] $nodeInfos + */ + public function setNodeInfos(array $nodeInfos) + { + $result = []; + foreach ($nodeInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NodeCount: 副本集下的节点数量 + * + * @return integer|null + */ + public function getNodeCount() + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 副本集下的节点数量 + * + * @param int $nodeCount + */ + public function setNodeCount($nodeCount) + { + $this->set("NodeCount", $nodeCount); + } + + /** + * CreateTime: 副本集创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 副本集创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * DeleteTime: 副本集删除时间 + * + * @return integer|null + */ + public function getDeleteTime() + { + return $this->get("DeleteTime"); + } + + /** + * DeleteTime: 副本集删除时间 + * + * @param int $deleteTime + */ + public function setDeleteTime($deleteTime) + { + $this->set("DeleteTime", $deleteTime); + } + + /** + * ModifyTime: 副本集修改时间 + * + * @return integer|null + */ + public function getModifyTime() + { + return $this->get("ModifyTime"); + } + + /** + * ModifyTime: 副本集修改时间 + * + * @param int $modifyTime + */ + public function setModifyTime($modifyTime) + { + $this->set("ModifyTime", $modifyTime); + } +} diff --git a/src/UMongoDB/Params/CreateUMongoDBReplSetParamLabels.php b/src/UMongoDB/Params/CreateUMongoDBReplSetParamLabels.php new file mode 100644 index 00000000..355d5cd6 --- /dev/null +++ b/src/UMongoDB/Params/CreateUMongoDBReplSetParamLabels.php @@ -0,0 +1,64 @@ +get("Key"); + } + + /** + * Key: 用户资源标签的键值 + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: 用户资源标签值 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 用户资源标签值 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UMongoDB/Params/CreateUMongoDBReplSetParamSecGroupId.php b/src/UMongoDB/Params/CreateUMongoDBReplSetParamSecGroupId.php new file mode 100644 index 00000000..4f3375aa --- /dev/null +++ b/src/UMongoDB/Params/CreateUMongoDBReplSetParamSecGroupId.php @@ -0,0 +1,64 @@ +get("Id"); + } + + /** + * Id: 安全组 ID。至多可以同时绑定5个安全组。 + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @return integer|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @param int $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } +} diff --git a/src/UMongoDB/Params/CreateUMongoDBShardedClusterParamLabels.php b/src/UMongoDB/Params/CreateUMongoDBShardedClusterParamLabels.php new file mode 100644 index 00000000..c5ac54fd --- /dev/null +++ b/src/UMongoDB/Params/CreateUMongoDBShardedClusterParamLabels.php @@ -0,0 +1,64 @@ +get("Key"); + } + + /** + * Key: 用户资源标签的键值 + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: 用户资源标签值 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 用户资源标签值 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UMongoDB/Params/CreateUMongoDBShardedClusterParamSecGroupId.php b/src/UMongoDB/Params/CreateUMongoDBShardedClusterParamSecGroupId.php new file mode 100644 index 00000000..33dc4c9c --- /dev/null +++ b/src/UMongoDB/Params/CreateUMongoDBShardedClusterParamSecGroupId.php @@ -0,0 +1,64 @@ +get("Id"); + } + + /** + * Id: 安全组 ID。至多可以同时绑定5个安全组。 + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @return integer|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 安全组优先级。取值范围[1, 5] + * + * @param int $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } +} diff --git a/src/UMongoDB/UMongoDBClient.php b/src/UMongoDB/UMongoDBClient.php new file mode 100644 index 00000000..fedae712 --- /dev/null +++ b/src/UMongoDB/UMongoDBClient.php @@ -0,0 +1,1158 @@ + (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) + * "ClusterId" => (string) 实例ID + * "BackupName" => (string) 备份名称 + * ] + * + * Outputs: + * + * $outputs = [ + * "BackupId" => (string) 备份ID + * "ClusterId" => (string) 实例ID + * ] + * + * @return BackupUMongoDBClusterResponse + * @throws UCloudException + */ + public function backupUMongoDBCluster(BackupUMongoDBClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new BackupUMongoDBClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * BackupUMongoDBLog - 日志打包 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/backup_umon_go_db_log + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Name" => (string) 日志包名称 + * "ClusterId" => (string) 集群id + * "NodeId" => (string) 节点id, 慢日志 mongos 节点不可选 + * "Begin" => (integer) 日志开始时间,最早为7x24小时前 + * "End" => (integer) 日志结束时间,时间区间不能超过24小时 + * "LogType" => (string) 日志类型:SlowLog,ErrorLog + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return BackupUMongoDBLogResponse + * @throws UCloudException + */ + public function backupUMongoDBLog(BackupUMongoDBLogRequest $request = null) + { + $resp = $this->invoke($request); + return new BackupUMongoDBLogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUMongoDBConfigTemplate - 创建配置模板 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/create_umon_go_db_config_template + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "TemplateName" => (string) 模板名称 + * "ClusterType" => (string) 集群类型 + * "MongodbVersion" => (string) mongo版本 + * "BaseTemplateId" => (string) 基础模板 + * "Description" => (string) 模板描述 + * ] + * + * Outputs: + * + * $outputs = [ + * "TemplateId" => (string) 模板Id + * ] + * + * @return CreateUMongoDBConfigTemplateResponse + * @throws UCloudException + */ + public function createUMongoDBConfigTemplate(CreateUMongoDBConfigTemplateRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUMongoDBConfigTemplateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUMongoDBReplSet - 创建一个Mongodb副本集群 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/create_umon_go_db_repl_set + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Name" => (string) 副本集实例名称,至少6位 + * "DBVersion" => (string) 副本集的Mongodb的版本,例如MongoDB 3.6, MongoDB 4.2 + * "AdminPassword" => (string) 管理员密码 + * "DiskSpace" => (integer) 磁盘空间 (GB):取值范围 20~32000,仅支持 10 的整数倍 + * "MachineTypeId" => (string) 机型配置,如 o.mongo2m.medium + * "NodeCount" => (integer) 副本集节点数量:仅支持 3、5、7 奇数节点 + * "ListenPort" => (integer) mongo服务端口 + * "SubnetId" => (string) 子网ID + * "VPCId" => (string) VPC的ID + * "Tag" => (string) 实例所在的业务组名称 + * "ChargeType" => (string) 付费方式:Year, Month, Dynamic,Trial,默认: Month + * "Quantity" => (integer) 购买时长,默认值1 + * "CrossZones" => (array) 跨可用区列表 + * "Labels" => (array) [ + * [ + * "Key" => (string) 用户资源标签的键值 + * "Value" => (string) 用户资源标签值 + * ] + * ] + * "SecGroupId" => (array) [ + * [ + * "Id" => (string) 安全组 ID。至多可以同时绑定5个安全组。 + * "Priority" => (integer) 安全组优先级。取值范围[1, 5] + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return CreateUMongoDBReplSetResponse + * @throws UCloudException + */ + public function createUMongoDBReplSet(CreateUMongoDBReplSetRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUMongoDBReplSetResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUMongoDBShardedCluster - 创建一个Mongodb分片集群 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/create_umon_go_db_sharded_cluster + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Name" => (string) 副本集实例名称,至少6位 + * "DBVersion" => (string) 副本集的Mongodb的版本,例如MongoDB 3.6, MongoDB 4.2 + * "AdminPassword" => (string) 管理员密码 + * "MongosNodeCount" => (integer) Mongos节点数量 + * "ShardCount" => (integer) 分片数量 + * "NodeCount" => (integer) 每个分片中节点数量 + * "DiskSpace" => (integer) 数据节点磁盘空间(GB):取值范围 20~32000,仅支持 10 的整数倍 + * "MachineTypeId" => (string) 数据节点机型配置,如 o.mongo2m.medium + * "SubnetId" => (string) 子网ID + * "VPCId" => (string) VPC的ID + * "Tag" => (string) 实例所在的业务组名称 + * "ChargeType" => (string) 付费方式:Year, Month, Dynamic,Trial,默认: Month + * "Quantity" => (integer) 购买时长,默认值1 + * "ListenPort" => (integer) mongo服务端口 + * "TemplateId" => (string) 参数配置模版id + * "MongosMachineTypeId" => (string) Mongos节点机型配置 + * "Labels" => (array) [ + * [ + * "Key" => (string) 用户资源标签的键值 + * "Value" => (string) 用户资源标签值 + * ] + * ] + * "SecGroupId" => (array) [ + * [ + * "Id" => (string) 安全组 ID。至多可以同时绑定5个安全组。 + * "Priority" => (integer) 安全组优先级。取值范围[1, 5] + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return CreateUMongoDBShardedClusterResponse + * @throws UCloudException + */ + public function createUMongoDBShardedCluster(CreateUMongoDBShardedClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUMongoDBShardedClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUMongoDBBackupURL - 获取实例备份下载链接 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/describe_umon_go_db_backup_url + * + * 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) + * "ClusterId" => (string) 集群ID + * "BackupId" => (string) 文件备份ID + * "PackageId" => (integer) 打包ID + * "ValidTime" => (integer) 备份链接过期时间(单位秒) + * "Category" => (string) 类型:如 oplog + * ] + * + * Outputs: + * + * $outputs = [ + * "InternetAddress" => (string) 备份文件公网地址 + * "IntranetAddress" => (string) 备份文件内网地址 + * ] + * + * @return DescribeUMongoDBBackupURLResponse + * @throws UCloudException + */ + public function describeUMongoDBBackupURL(DescribeUMongoDBBackupURLRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUMongoDBBackupURLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUMongoDBInstance - 描述MongoDB实例 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/describe_umon_go_db_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) + * "ClusterId" => (string) 实例资源ID + * "ClusterType" => (string) 集群类型,ReplicaSet:副本集,SharedCluster:分片集群 + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterInfo" => (object) 副本集信息[ + * "Zone" => (string) 可用区 + * "ZoneId" => (integer) + * "ClusterType" => (string) 集群类型,ReplicaSet :副本集,SharedCluster:分片集 + * "ClusterId" => (string) 集群ID + * "InstanceName" => (string) 实例名称 + * "State" => (string) 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败,Upgrading: 升降级中,UpgradeFailed: 升降级失败,Switching:主备切换中,UpdatingSSL:修改SSL中,UpdateSSLFail:修改SSL失败 + * "DBVersion" => (string) 副本集的Mongodb的版本 + * "DiskSpace" => (integer) 磁盘空间(GB), 默认根据配置机型 + * "MachineTypeId" => (string) 计算规格 + * "CreateTime" => (integer) DB实例创建时间 + * "ConfigReplicaInfo" => (object) ConfigSrv信息[ + * "ReplicaId" => (string) 副本集ID + * "ClusterId" => (string) 集群ID + * "ReplicaType" => (string) 副本类型,ConfigRepl或者DataRepl + * "State" => (string) 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。 + * "MachineType" => (string) 机器类型 + * "MachineTypeId" => (string) 机器类型Id + * "IsolationGroupId" => (string) 隔离组ID + * "NodeInfos" => (array) 副本集下的节点信息[ + * [ + * "Zone" => (string) 可用区 + * "ZoneId" => (integer) 可用区ID + * "NodeId" => (string) 节点ID + * "NodeRole" => (string) 节点角色,Primary/Secondary/Arbiter/Startup等等 + * "NodeType" => (string) 节点类型 + * "State" => (string) 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。 + * "DBVersion" => (string) 副本集的Mongodb的版本 + * "ClusterId" => (string) 节点所属副本集ID + * "VirtualClusterId" => (string) 虚拟节点ID + * "MachineType" => (string) 机型信息 + * "MachineTypeId" => (string) 机型信息ID + * "CreateTime" => (integer) DB实例创建时间 + * "DataDisk" => (object) 数据盘信息[ + * "DiskId" => (string) 磁盘id + * "DiskSize" => (integer) 磁盘容量单位GB + * ] + * "SysDisk" => (object) 系统盘信息[ + * "DiskId" => (string) 磁盘id + * "DiskSize" => (integer) 磁盘容量单位GB + * ] + * ] + * ] + * "NodeCount" => (integer) 副本集下的节点数量 + * "CreateTime" => (integer) 副本集创建时间 + * "DeleteTime" => (integer) 副本集删除时间 + * "ModifyTime" => (integer) 副本集修改时间 + * ] + * "DataReplicaInfos" => (array) 数据副本信息 [ + * [ + * "ReplicaId" => (string) 副本集ID + * "ClusterId" => (string) 集群ID + * "ReplicaType" => (string) 副本类型,ConfigRepl或者DataRepl + * "State" => (string) 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。 + * "MachineType" => (string) 机器类型 + * "MachineTypeId" => (string) 机器类型Id + * "IsolationGroupId" => (string) 隔离组ID + * "NodeInfos" => (array) 副本集下的节点信息[ + * [ + * "Zone" => (string) 可用区 + * "ZoneId" => (integer) 可用区ID + * "NodeId" => (string) 节点ID + * "NodeRole" => (string) 节点角色,Primary/Secondary/Arbiter/Startup等等 + * "NodeType" => (string) 节点类型 + * "State" => (string) 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。 + * "DBVersion" => (string) 副本集的Mongodb的版本 + * "ClusterId" => (string) 节点所属副本集ID + * "VirtualClusterId" => (string) 虚拟节点ID + * "MachineType" => (string) 机型信息 + * "MachineTypeId" => (string) 机型信息ID + * "CreateTime" => (integer) DB实例创建时间 + * "DataDisk" => (object) 数据盘信息[ + * "DiskId" => (string) 磁盘id + * "DiskSize" => (integer) 磁盘容量单位GB + * ] + * "SysDisk" => (object) 系统盘信息[ + * "DiskId" => (string) 磁盘id + * "DiskSize" => (integer) 磁盘容量单位GB + * ] + * ] + * ] + * "NodeCount" => (integer) 副本集下的节点数量 + * "CreateTime" => (integer) 副本集创建时间 + * "DeleteTime" => (integer) 副本集删除时间 + * "ModifyTime" => (integer) 副本集修改时间 + * ] + * ] + * "MongosInfo" => (array) Mongos节点信息[ + * [ + * "Zone" => (string) 可用区 + * "ZoneId" => (integer) 可用区ID + * "NodeId" => (string) 节点ID + * "NodeRole" => (string) 节点角色,Primary/Secondary/Arbiter/Startup等等 + * "NodeType" => (string) 节点类型 + * "State" => (string) 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败。 + * "DBVersion" => (string) 副本集的Mongodb的版本 + * "ClusterId" => (string) 节点所属副本集ID + * "VirtualClusterId" => (string) 虚拟节点ID + * "MachineType" => (string) 机型信息 + * "MachineTypeId" => (string) 机型信息ID + * "CreateTime" => (integer) DB实例创建时间 + * "DataDisk" => (object) 数据盘信息[ + * "DiskId" => (string) 磁盘id + * "DiskSize" => (integer) 磁盘容量单位GB + * ] + * "SysDisk" => (object) 系统盘信息[ + * "DiskId" => (string) 磁盘id + * "DiskSize" => (integer) 磁盘容量单位GB + * ] + * ] + * ] + * "ConnectURL" => (string) 副本集的访问地址 + * "DeleteTime" => (integer) DB实例删除时间 + * "SubnetId" => (string) 子网ID + * "VPCId" => (string) VPC的ID + * "ShardCount" => (integer) 分片数量,分片集有效 + * "ShardNodeCount" => (integer) 每分片节点数量,分片集有效 + * "MongosCount" => (integer) Mongos节点数量,分片集有效 + * "ConfigNodeCount" => (integer) Config配置集群节点数量,分片集有效 + * "ConfigMachineType" => (string) Config配置集群节点配置,分片集有效 + * "Tag" => (string) 实例业务组 + * "DataComputeType" => (object) 数据节点计算规格[ + * "MachineTypeId" => (string) 机器类型ID o.mongo2m.medium,o.mongo2m.xlarge + * "Description" => (string) 配置简称 2C4G + * "Cpu" => (integer) cpu核数 + * "Memory" => (integer) 内存用量(GB) + * "UHhostMachineType" => (string) 机器类型,N/O + * "Group" => (string) 配置分组,2m , 4m + * ] + * "ConfigComputeType" => (object) 配置节点计算规格[ + * "MachineTypeId" => (string) 机器类型ID o.mongo2m.medium,o.mongo2m.xlarge + * "Description" => (string) 配置简称 2C4G + * "Cpu" => (integer) cpu核数 + * "Memory" => (integer) 内存用量(GB) + * "UHhostMachineType" => (string) 机器类型,N/O + * "Group" => (string) 配置分组,2m , 4m + * ] + * "MongosComputeType" => (object) 路由节点计算规格[ + * "MachineTypeId" => (string) 机器类型ID o.mongo2m.medium,o.mongo2m.xlarge + * "Description" => (string) 配置简称 2C4G + * "Cpu" => (integer) cpu核数 + * "Memory" => (integer) 内存用量(GB) + * "UHhostMachineType" => (string) 机器类型,N/O + * "Group" => (string) 配置分组,2m , 4m + * ] + * "CrossZones" => (array) 跨用区列表 + * "EnableSSL" => (integer) 是否开启了SSL;1->未开启 2->开启 + * "SSLExpirationTime" => (integer) SSL到期时间 + * ] + * ] + * + * @return DescribeUMongoDBInstanceResponse + * @throws UCloudException + */ + public function describeUMongoDBInstance(DescribeUMongoDBInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUMongoDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUMongoDBBackupParam - 获取实例备份策略 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/get_umon_go_db_backup_param + * + * 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) + * "ClusterId" => (string) 实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (object) 备份策略信息[ + * "ClusterId" => (string) 实例ID + * "AutoBackupToggleWeek" => (string) 自动备份预期周几 (1-7 表示 周一到周末,多个数据用','分割,eg: 3,7) + * "AutoBackupToggleTime" => (string) 自动备份预期时间范围 (24小时制,精确到分钟,00:00~23:59) + * "AutoBackupCopies" => (integer) 自动备份保存份数 + * "ManualBackupCopies" => (integer) 手动备份保存份数 + * "Disabled" => (boolean) 是否禁用(false:未禁用;true:禁用) + * ] + * ] + * + * @return GetUMongoDBBackupParamResponse + * @throws UCloudException + */ + public function getUMongoDBBackupParam(GetUMongoDBBackupParamRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUMongoDBBackupParamResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUMongoDBCfgTempItem - 获取配置模板内容 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/get_umon_go_db_cfg_temp_item + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "TemplateId" => (string) 配置模板Id + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 配置模板项[ + * [ + * "ItemId" => (string) itemId + * "TemplateId" => (string) 模板ID + * "ConfigName" => (string) 配置名称 + * "ConfigValue" => (string) 配置值 + * "CreateTime" => (integer) 创建时间 + * "ModifyTime" => (integer) 修改时间 + * "ConfigOption" => (object) 配置选项[ + * "MongodbVersion" => (string) mongo版本 + * "OptionName" => (string) 配置选项名 + * "OptionValueType" => (string) 配置选项类型 string,int,bool + * "OptionValues" => (string) 配置选项值范围 + * "OptionDefaultValue" => (string) 默认值 + * "IsDefaultOption" => (boolean) 是否为默认选项 + * "EnableModify" => (boolean) 是否可修改 + * "EnableDisplay" => (boolean) 是否前端展示 + * "ForceRestart" => (boolean) 是否需重启 + * "OptionFormatType" => (string) 选项值格式 + * "AllowedApplyType" => (string) 允许应用类型 + * "Description" => (string) 描述 + * ] + * "NodeType" => (string) 节点类型: DataNode:数据节点 | ConfigSrvNode:配置节点 | MongosNode:路由节点 + * ] + * ] + * ] + * + * @return GetUMongoDBCfgTempItemResponse + * @throws UCloudException + */ + public function getUMongoDBCfgTempItem(GetUMongoDBCfgTempItemRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUMongoDBCfgTempItemResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUMongoDBLog - 查询某一段时间内集群节点的错误日志或慢查询日志 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/get_umon_go_db_log + * + * 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) + * "ClusterId" => (string) 集群id + * "NodeId" => (string) 节点id, 慢日志 mongos 节点不可选 + * "Begin" => (integer) 查询的日志开始的时间戳(Unix Timestamp)。对于实时查询,这个参数应该是上次轮询请求时的时间戳,后台会返回从该值到当前时间的日志内容 + * "LogType" => (string) 日志类型:SlowLog,ErrorLog + * "End" => (integer) 查询日志的结束时间戳(Unix Timestamp),对于实时查询不传该值,与BeginTime的差值不超过24小时:(EndTime-BeginTime) < 24*60*60 + * ] + * + * Outputs: + * + * $outputs = [ + * "Log" => (string) 查询到的日志内容,一段纯文本 + * "MaxLine" => (integer) 支持的最大行数 + * "IsTruncate" => (boolean) 是否已被截断 + * ] + * + * @return GetUMongoDBLogResponse + * @throws UCloudException + */ + public function getUMongoDBLog(GetUMongoDBLogRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUMongoDBLogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUMongoDBRecoverTimeRange - 获取UMongoDB可回档时间范围 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/get_umon_go_db_recover_time_range + * + * 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) + * "ClusterId" => (string) 集群id + * ] + * + * Outputs: + * + * $outputs = [ + * "EarliestTime" => (integer) 最早可回档时间点 + * "LatestTime" => (integer) 最晚可回档时间点 + * ] + * + * @return GetUMongoDBRecoverTimeRangeResponse + * @throws UCloudException + */ + public function getUMongoDBRecoverTimeRange(GetUMongoDBRecoverTimeRangeRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUMongoDBRecoverTimeRangeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUMongoDBBackup - 拉取实例备份列表 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/list_umon_go_db_backup + * + * 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) + * "ClusterId" => (string) 实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 备份列表[ + * [ + * "Zone" => (string) 可用区 + * "BackupId" => (string) 备份ID + * "BackupName" => (string) 备份名称 + * "ClusterId" => (string) 实例ID + * "State" => (string) 备份状态 + * "BackupSize" => (integer) 备份数据大小 + * "BackupType" => (string) 备份类型 + * "StartTime" => (integer) 备份开始时间 + * "EndTime" => (integer) 备份结束时间 + * "VirtualClusterId" => (string) 虚拟节点id + * "ReplicaType" => (string) 副本类型,ConfigRepl或者DataRepl + * "BatchId" => (string) 批次id + * "DiskSize" => (integer) 磁盘大小 + * ] + * ] + * ] + * + * @return ListUMongoDBBackupResponse + * @throws UCloudException + */ + public function listUMongoDBBackup(ListUMongoDBBackupRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUMongoDBBackupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUMongoDBConfigTemplate - 拉取配置模板 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/list_umon_go_db_config_template + * + * 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 = [ + * "DataSet" => (array) 配置模板列表[ + * [ + * "TemplateId" => (string) 模板ID + * "TemplateName" => (string) 模板名称 + * "MongodbVersion" => (string) mongo版本 + * "ClusterType" => (string) 集群类型 + * "TemplateType" => (string) 模板类型 UsersTemplate DefaultTemplate + * "CreateTime" => (integer) 创建时间 + * "ModifyTime" => (integer) 修改时间 + * "DeleteTime" => (integer) 删除时间 + * "Description" => (string) 模板描述 + * ] + * ] + * ] + * + * @return ListUMongoDBConfigTemplateResponse + * @throws UCloudException + */ + public function listUMongoDBConfigTemplate(ListUMongoDBConfigTemplateRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUMongoDBConfigTemplateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUMongoDBInstances - 获取副本集/分片集群列表 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/list_umon_go_db_instances + * + * 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) + * "ClusterId" => (string) 集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 副本集ID[ + * [ + * "Zone" => (string) 可用区 + * "ClusterId" => (string) 副本集/分片集群ID + * "Name" => (string) 副本集/分片集群实例名称 + * "DBVersion" => (string) 副本集/分片集群的Mongodb的版本,包括MongoDB-3.6, MongoDB-4.2 + * "ConnectURL" => (string) 副本集/分片集群的访问地址 + * "CreateTime" => (integer) 副本集/分片集群的创建时间 + * "ClusterType" => (string) 集群类型,ReplicaSet :副本集,SharedCluster:分片集 + * "State" => (string) 副本集/分片集群状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中,StartFailed:启动失败,Running:运行,Stopping:关闭中,Stopped:已关闭, StopFailed:关闭失败,Deleting:删除中,Deleted:已删除,DeleteFailed:删除失败,Restarting:重启中,RestartFailed:重启失败,Upgrading: 升降级中,UpgradeFailed: 升降级失败,Switching:主备切换中 + * "IPv6ConnectURL" => (string) 副本集/分片集IPv6访问地址 + * "ExpiredTime" => (integer) DB实例过期时间,采用UTC计时时间戳 + * "DataComputeType" => (object) 数据节点计算规格[ + * "MachineTypeId" => (string) 机器类型ID o.mongo2m.medium,o.mongo2m.xlarge + * "Description" => (string) 配置简称 2C4G + * "Cpu" => (integer) cpu核数 + * "Memory" => (integer) 内存用量(GB) + * "UHhostMachineType" => (string) 机器类型,N/O + * "Group" => (string) 配置分组,2m , 4m + * ] + * "VPCId" => (string) VPC的ID + * "SubnetId" => (string) 子网ID + * "DiskSpace" => (integer) 数据节点磁盘空间(GB) + * "Tag" => (string) 业务组 + * "CrossZones" => (array) 跨可用区列表 + * ] + * ] + * ] + * + * @return ListUMongoDBInstancesResponse + * @throws UCloudException + */ + public function listUMongoDBInstances(ListUMongoDBInstancesRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUMongoDBInstancesResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUMongoDBLogPackage - 日志打包列表 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/list_umon_go_db_log_package + * + * 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) + * "ClusterId" => (string) 集群id + * "NodeId" => (string) 节点id + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 列表[ + * [ + * "Id" => (integer) id + * "Name" => (string) 名称 + * "State" => (string) Package_Running,Package_Success,Package_Failed,Package_Deleting,Package_Deleted,Package_DeleteFailed + * "Size" => (integer) 大小,单位字节 + * "PackageType" => (string) SlowLog,ErrorLog + * "ClusterId" => (string) 集群id + * "NodeId" => (string) 节点id + * "Role" => (string) 角色 + * "Begin" => (integer) 开始时间 + * "End" => (integer) 结束时间 + * "CreateTime" => (integer) 创建时间 + * "FinishTime" => (integer) 完成时间 + * ] + * ] + * ] + * + * @return ListUMongoDBLogPackageResponse + * @throws UCloudException + */ + public function listUMongoDBLogPackage(ListUMongoDBLogPackageRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUMongoDBLogPackageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUMongoDBMachineSpec - 获取UMongoDB支持机器类型列表 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/list_umon_go_db_machine_spec + * + * 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) + * "ClassType" => (string) 机型,如O + * "DiskType" => (string) 磁盘类型,如CLOUD_RSSD + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 规格列表[ + * [ + * "ClassType" => (string) 规格类型;O | N + * "DiskType" => (array) 磁盘类型;CLOUD_RSSD | CLOUD_SSD | LOCAL_SSD + * "ComputeType" => (array) 计算规格列表[ + * [ + * "MachineTypeId" => (string) 机器类型ID o.mongo2m.medium,o.mongo2m.xlarge + * "Description" => (string) 配置简称 2C4G + * "Cpu" => (integer) cpu核数 + * "Memory" => (integer) 内存用量(GB) + * "UHhostMachineType" => (string) 机器类型,N/O + * "Group" => (string) 配置分组,2m , 4m + * ] + * ] + * "DefaultMachineType" => (object) 默认规格[ + * "MachineTypeId" => (string) 机器类型ID o.mongo2m.medium,o.mongo2m.xlarge + * "Description" => (string) 配置简称 2C4G + * "Cpu" => (integer) cpu核数 + * "Memory" => (integer) 内存用量(GB) + * "UHhostMachineType" => (string) 机器类型,N/O + * "Group" => (string) 配置分组,2m , 4m + * ] + * ] + * ] + * ] + * + * @return ListUMongoDBMachineSpecResponse + * @throws UCloudException + */ + public function listUMongoDBMachineSpec(ListUMongoDBMachineSpecRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUMongoDBMachineSpecResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUMongoDBMachineType - 获取UmongDB支持机器类型列表 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/list_umon_go_db_machine_type + * + * 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 = [ + * "DataSet" => (array) [ + * [ + * "MachineTypeId" => (string) 机器类型ID o.mongo2m.medium,o.mongo2m.xlarge + * "Description" => (string) 配置简称 2C4G + * "Cpu" => (integer) cpu核数 + * "Memory" => (integer) 内存用量(GB) + * "UHhostMachineType" => (string) 机器类型,N/O + * "Group" => (string) 配置分组,2m , 4m + * ] + * ] + * ] + * + * @return ListUMongoDBMachineTypeResponse + * @throws UCloudException + */ + public function listUMongoDBMachineType(ListUMongoDBMachineTypeRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUMongoDBMachineTypeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUMongoDBVersion - 获取UMongoDB支持版本列表 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/list_umon_go_db_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 = [ + * "DataSet" => (array) [ + * [ + * "DBVersion" => (string) MongoDB版本 + * ] + * ] + * ] + * + * @return ListUMongoDBVersionResponse + * @throws UCloudException + */ + public function listUMongoDBVersion(ListUMongoDBVersionRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUMongoDBVersionResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUMongoDBAdminPassword - 修改MongoDB集群root密码 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/modify_umon_go_db_admin_password + * + * 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) + * "ClusterId" => (string) 集群ID + * "Password" => (string) 集群新密码(密码格式使用BASE64编码) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ModifyUMongoDBAdminPasswordResponse + * @throws UCloudException + */ + public function modifyUMongoDBAdminPassword(ModifyUMongoDBAdminPasswordRequest $request = null) + { + $resp = $this->invoke($request); + return new ModifyUMongoDBAdminPasswordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUMongoDBAttribute - 修改MongoDB集群名称 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/modify_umon_go_db_attribute + * + * 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) + * "ClusterId" => (string) 集群id + * "Name" => (string) 集群新名称(输入长度为6~63位名称) + * "RemarkName" => (string) 集群备注(Name和RemarkName必传其一) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ModifyUMongoDBAttributeResponse + * @throws UCloudException + */ + public function modifyUMongoDBAttribute(ModifyUMongoDBAttributeRequest $request = null) + { + $resp = $this->invoke($request); + return new ModifyUMongoDBAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUMongoDBBackupParam - 修改实例备份策略 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/modify_umon_go_db_backup_param + * + * 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) + * "ClusterId" => (string) 实例ID + * "AutoBackupToggleWeek" => (string) 自动备份预期星期几(1~7),默认 3,7 (周三,周日) + * "AutoBackupToggleTime" => (string) 自动备份预期开始时间范围(00:00~23:59),默认 5:00~6:00 + * "Disabled" => (boolean) 是否禁用,true:禁用;false:开启 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ModifyUMongoDBBackupParamResponse + * @throws UCloudException + */ + public function modifyUMongoDBBackupParam(ModifyUMongoDBBackupParamRequest $request = null) + { + $resp = $this->invoke($request); + return new ModifyUMongoDBBackupParamResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeUMongoDBInstance - 集群配置升降级 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/resize_umon_go_db_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) + * "ClusterId" => (string) 集群资源ID + * "DiskSpace" => (integer) 集群数据节点磁盘配置 + * "MachineTypeId" => (string) 集群数据节点机型配置 + * "MongosMachineTypeId" => (string) 集群Mongos节点机型配置 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ResizeUMongoDBInstanceResponse + * @throws UCloudException + */ + public function resizeUMongoDBInstance(ResizeUMongoDBInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new ResizeUMongoDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartUMongoDBCluster - 重启集群 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/restart_umon_go_db_cluster + * + * 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) + * "ClusterId" => (string) 集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterId" => (string) 集群ID + * ] + * + * @return RestartUMongoDBClusterResponse + * @throws UCloudException + */ + public function restartUMongoDBCluster(RestartUMongoDBClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new RestartUMongoDBClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StartUMongoDBCluster - 启动集群 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/start_umon_go_db_cluster + * + * 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) + * "ClusterId" => (string) 集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterId" => (string) 集群ID + * ] + * + * @return StartUMongoDBClusterResponse + * @throws UCloudException + */ + public function startUMongoDBCluster(StartUMongoDBClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new StartUMongoDBClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StopUMongoDBCluster - 停止集群 + * + * See also: https://docs.ucloud.cn/api/umongodb-api/stop_umon_go_db_cluster + * + * 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) + * "ClusterId" => (string) 集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterId" => (string) 集群ID + * ] + * + * @return StopUMongoDBClusterResponse + * @throws UCloudException + */ + public function stopUMongoDBCluster(StopUMongoDBClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new StopUMongoDBClusterResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UPFS/Apis/CreateUPFSVolumeRequest.php b/src/UPFS/Apis/CreateUPFSVolumeRequest.php new file mode 100644 index 00000000..7a43f1b0 --- /dev/null +++ b/src/UPFS/Apis/CreateUPFSVolumeRequest.php @@ -0,0 +1,253 @@ + "CreateUPFSVolume"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Size"); + $this->markRequired("ProtocolType"); + } + + + + /** + * 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); + } + + /** + * Size: 文件系统大小,单位为GB,必须为100的整数倍,Size最小为500GB + * + * @return integer|null + */ + public function getSize() + { + return $this->get("Size"); + } + + /** + * Size: 文件系统大小,单位为GB,必须为100的整数倍,Size最小为500GB + * + * @param int $size + */ + public function setSize($size) + { + $this->set("Size", $size); + } + + /** + * ProtocolType: 文件系统协议,目前仅支持POSIX + * + * @return string|null + */ + public function getProtocolType() + { + return $this->get("ProtocolType"); + } + + /** + * ProtocolType: 文件系统协议,目前仅支持POSIX + * + * @param string $protocolType + */ + public function setProtocolType($protocolType) + { + $this->set("ProtocolType", $protocolType); + } + + /** + * VolumeName: 文件系统名称 + * + * @return string|null + */ + public function getVolumeName() + { + return $this->get("VolumeName"); + } + + /** + * VolumeName: 文件系统名称 + * + * @param string $volumeName + */ + public function setVolumeName($volumeName) + { + $this->set("VolumeName", $volumeName); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: 文件系统所属业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 文件系统所属业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * ChargeType: 计费模式,枚举值为: Year,按年付费; Month,按月付费 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,枚举值为: Year,按年付费; 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); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UPFS/Apis/CreateUPFSVolumeResponse.php b/src/UPFS/Apis/CreateUPFSVolumeResponse.php new file mode 100644 index 00000000..234d94ec --- /dev/null +++ b/src/UPFS/Apis/CreateUPFSVolumeResponse.php @@ -0,0 +1,64 @@ +get("VolumeName"); + } + + /** + * VolumeName: UPFS文件系统名称 + * + * @param string $volumeName + */ + public function setVolumeName($volumeName) + { + $this->set("VolumeName", $volumeName); + } + + /** + * VolumeId: UPFS文件系统ID + * + * @return string|null + */ + public function getVolumeId() + { + return $this->get("VolumeId"); + } + + /** + * VolumeId: UPFS文件系统ID + * + * @param string $volumeId + */ + public function setVolumeId($volumeId) + { + $this->set("VolumeId", $volumeId); + } +} diff --git a/src/UPFS/Apis/DescribeUPFSVolumePriceRequest.php b/src/UPFS/Apis/DescribeUPFSVolumePriceRequest.php new file mode 100644 index 00000000..8a5eac64 --- /dev/null +++ b/src/UPFS/Apis/DescribeUPFSVolumePriceRequest.php @@ -0,0 +1,151 @@ + "DescribeUPFSVolumePrice"]); + $this->markRequired("Region"); + $this->markRequired("Size"); + } + + + + /** + * 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); + } + + /** + * Size: 文件系统大小,单位为GB,新架构容量型最小容量为500GB,以100GB递增,最大不超过100TB。 + * + * @return integer|null + */ + public function getSize() + { + return $this->get("Size"); + } + + /** + * Size: 文件系统大小,单位为GB,新架构容量型最小容量为500GB,以100GB递增,最大不超过100TB。 + * + * @param int $size + */ + public function setSize($size) + { + $this->set("Size", $size); + } + + /** + * Quantity: 购买UPFS的时长, 默认为1 + * + * @return integer|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买UPFS的时长, 默认为1 + * + * @param int $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * ChargeType: Year, Month默认: Month + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month默认: Month + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * VolumeId: UPFS文件系统id,第一次创建文件系统时不需要传这个参数 + * + * @return string|null + */ + public function getVolumeId() + { + return $this->get("VolumeId"); + } + + /** + * VolumeId: UPFS文件系统id,第一次创建文件系统时不需要传这个参数 + * + * @param string $volumeId + */ + public function setVolumeId($volumeId) + { + $this->set("VolumeId", $volumeId); + } +} diff --git a/src/UPFS/Apis/DescribeUPFSVolumePriceResponse.php b/src/UPFS/Apis/DescribeUPFSVolumePriceResponse.php new file mode 100644 index 00000000..3a43c4d1 --- /dev/null +++ b/src/UPFS/Apis/DescribeUPFSVolumePriceResponse.php @@ -0,0 +1,57 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UPFSPriceDataSet($item)); + } + return $result; + } + + /** + * DataSet: upfs 价格信息 + * + * @param UPFSPriceDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UPFS/Apis/DescribeUPFSVolumeRequest.php b/src/UPFS/Apis/DescribeUPFSVolumeRequest.php new file mode 100644 index 00000000..2970a032 --- /dev/null +++ b/src/UPFS/Apis/DescribeUPFSVolumeRequest.php @@ -0,0 +1,151 @@ + "DescribeUPFSVolume"]); + $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); + } + + /** + * VolumeId: 文件系统ID + * + * @return string|null + */ + public function getVolumeId() + { + return $this->get("VolumeId"); + } + + /** + * VolumeId: 文件系统ID + * + * @param string $volumeId + */ + public function setVolumeId($volumeId) + { + $this->set("VolumeId", $volumeId); + } + + /** + * Offset: 文件列表起始 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 文件列表起始 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 文件列表长度 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 文件列表长度 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UPFS/Apis/DescribeUPFSVolumeResponse.php b/src/UPFS/Apis/DescribeUPFSVolumeResponse.php new file mode 100644 index 00000000..7a451552 --- /dev/null +++ b/src/UPFS/Apis/DescribeUPFSVolumeResponse.php @@ -0,0 +1,77 @@ +get("TotalCount"); + } + + /** + * TotalCount: UPFS文件系统总数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: UPFS文件系统详细信息列表 + * + * @return UPFSVolumeInfo[]|null + */ + public function getDataSet() + { + $items = $this->get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UPFSVolumeInfo($item)); + } + return $result; + } + + /** + * DataSet: UPFS文件系统详细信息列表 + * + * @param UPFSVolumeInfo[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UPFS/Apis/DescribeUPFSVolumeUpgradePriceRequest.php b/src/UPFS/Apis/DescribeUPFSVolumeUpgradePriceRequest.php new file mode 100644 index 00000000..d317bf11 --- /dev/null +++ b/src/UPFS/Apis/DescribeUPFSVolumeUpgradePriceRequest.php @@ -0,0 +1,112 @@ + "DescribeUPFSVolumeUpgradePrice"]); + $this->markRequired("Region"); + $this->markRequired("VolumeId"); + $this->markRequired("Size"); + } + + + + /** + * 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); + } + + /** + * VolumeId: 文件系统ID + * + * @return string|null + */ + public function getVolumeId() + { + return $this->get("VolumeId"); + } + + /** + * VolumeId: 文件系统ID + * + * @param string $volumeId + */ + public function setVolumeId($volumeId) + { + $this->set("VolumeId", $volumeId); + } + + /** + * Size: 文件系统大小 + * + * @return string|null + */ + public function getSize() + { + return $this->get("Size"); + } + + /** + * Size: 文件系统大小 + * + * @param string $size + */ + public function setSize($size) + { + $this->set("Size", $size); + } +} diff --git a/src/UPFS/Apis/DescribeUPFSVolumeUpgradePriceResponse.php b/src/UPFS/Apis/DescribeUPFSVolumeUpgradePriceResponse.php new file mode 100644 index 00000000..3335a786 --- /dev/null +++ b/src/UPFS/Apis/DescribeUPFSVolumeUpgradePriceResponse.php @@ -0,0 +1,64 @@ +get("Price"); + } + + /** + * Price: 价格(单位:分) + * + * @param float $price + */ + public function setPrice($price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 原价格(单位:分) + * + * @return float|null + */ + public function getOriginalPrice() + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 原价格(单位:分) + * + * @param float $originalPrice + */ + public function setOriginalPrice($originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } +} diff --git a/src/UPFS/Apis/ExtendUPFSVolumeRequest.php b/src/UPFS/Apis/ExtendUPFSVolumeRequest.php new file mode 100644 index 00000000..275b28ea --- /dev/null +++ b/src/UPFS/Apis/ExtendUPFSVolumeRequest.php @@ -0,0 +1,133 @@ + "ExtendUPFSVolume"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("VolumeId"); + $this->markRequired("Size"); + } + + + + /** + * 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); + } + + /** + * 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); + } + + /** + * VolumeId: 文件系统ID + * + * @return string|null + */ + public function getVolumeId() + { + return $this->get("VolumeId"); + } + + /** + * VolumeId: 文件系统ID + * + * @param string $volumeId + */ + public function setVolumeId($volumeId) + { + $this->set("VolumeId", $volumeId); + } + + /** + * Size: 文件系统大小,单位为GB,最小为6000GB,最大为10PB,必须为1000的整数倍 + * + * @return integer|null + */ + public function getSize() + { + return $this->get("Size"); + } + + /** + * Size: 文件系统大小,单位为GB,最小为6000GB,最大为10PB,必须为1000的整数倍 + * + * @param int $size + */ + public function setSize($size) + { + $this->set("Size", $size); + } +} diff --git a/src/UPFS/Apis/ExtendUPFSVolumeResponse.php b/src/UPFS/Apis/ExtendUPFSVolumeResponse.php new file mode 100644 index 00000000..e2d8efaa --- /dev/null +++ b/src/UPFS/Apis/ExtendUPFSVolumeResponse.php @@ -0,0 +1,26 @@ + "RemoveUPFSVolume"]); + $this->markRequired("Region"); + $this->markRequired("VolumeId"); + } + + + + /** + * 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); + } + + /** + * VolumeId: 文件系统ID + * + * @return string|null + */ + public function getVolumeId() + { + return $this->get("VolumeId"); + } + + /** + * VolumeId: 文件系统ID + * + * @param string $volumeId + */ + public function setVolumeId($volumeId) + { + $this->set("VolumeId", $volumeId); + } +} diff --git a/src/UPFS/Apis/RemoveUPFSVolumeResponse.php b/src/UPFS/Apis/RemoveUPFSVolumeResponse.php new file mode 100644 index 00000000..4562a4c0 --- /dev/null +++ b/src/UPFS/Apis/RemoveUPFSVolumeResponse.php @@ -0,0 +1,26 @@ + "UpdateUPFSVolumeInfo"]); + $this->markRequired("Region"); + $this->markRequired("VolumeId"); + } + + + + /** + * 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); + } + + /** + * VolumeId: UPFS文件系统ID + * + * @return string|null + */ + public function getVolumeId() + { + return $this->get("VolumeId"); + } + + /** + * VolumeId: UPFS文件系统ID + * + * @param string $volumeId + */ + public function setVolumeId($volumeId) + { + $this->set("VolumeId", $volumeId); + } + + /** + * VolumeName: UPFS文件系统名称(文件系统名称/备注至少传入其中一个) + * + * @return string|null + */ + public function getVolumeName() + { + return $this->get("VolumeName"); + } + + /** + * VolumeName: UPFS文件系统名称(文件系统名称/备注至少传入其中一个) + * + * @param string $volumeName + */ + public function setVolumeName($volumeName) + { + $this->set("VolumeName", $volumeName); + } + + /** + * Remark: UPFS文件系统备注(文件系统名称/备注至少传入其中一个) + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: UPFS文件系统备注(文件系统名称/备注至少传入其中一个) + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UPFS/Apis/UpdateUPFSVolumeInfoResponse.php b/src/UPFS/Apis/UpdateUPFSVolumeInfoResponse.php new file mode 100644 index 00000000..35997c5d --- /dev/null +++ b/src/UPFS/Apis/UpdateUPFSVolumeInfoResponse.php @@ -0,0 +1,26 @@ +get("ChargeType"); + } + + /** + * ChargeType: Year, Month + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: 价格 (单位: 分) + * + * @return float|null + */ + public function getPrice() + { + return $this->get("Price"); + } + + /** + * Price: 价格 (单位: 分) + * + * @param float $price + */ + public function setPrice($price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 原价格 (单位: 分) + * + * @return float|null + */ + public function getOriginalPrice() + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 原价格 (单位: 分) + * + * @param float $originalPrice + */ + public function setOriginalPrice($originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } + + /** + * ChargeName: “upfs” + * + * @return string|null + */ + public function getChargeName() + { + return $this->get("ChargeName"); + } + + /** + * ChargeName: “upfs” + * + * @param string $chargeName + */ + public function setChargeName($chargeName) + { + $this->set("ChargeName", $chargeName); + } +} diff --git a/src/UPFS/Models/UPFSVolumeInfo.php b/src/UPFS/Models/UPFSVolumeInfo.php new file mode 100644 index 00000000..bbb85437 --- /dev/null +++ b/src/UPFS/Models/UPFSVolumeInfo.php @@ -0,0 +1,284 @@ +get("Zone"); + } + + /** + * Zone: 可用区名字 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * VolumeName: 文件系统名称 + * + * @return string|null + */ + public function getVolumeName() + { + return $this->get("VolumeName"); + } + + /** + * VolumeName: 文件系统名称 + * + * @param string $volumeName + */ + public function setVolumeName($volumeName) + { + $this->set("VolumeName", $volumeName); + } + + /** + * VolumeId: 文件系统ID + * + * @return string|null + */ + public function getVolumeId() + { + return $this->get("VolumeId"); + } + + /** + * VolumeId: 文件系统ID + * + * @param string $volumeId + */ + public function setVolumeId($volumeId) + { + $this->set("VolumeId", $volumeId); + } + + /** + * ProtocolType: 文件系统协议类型 + * + * @return string|null + */ + public function getProtocolType() + { + return $this->get("ProtocolType"); + } + + /** + * ProtocolType: 文件系统协议类型 + * + * @param string $protocolType + */ + public function setProtocolType($protocolType) + { + $this->set("ProtocolType", $protocolType); + } + + /** + * Remark: 文件系统备注信息 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 文件系统备注信息 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: 文件系统所属业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 文件系统所属业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * CreateTime: 文件系统创建时间(unix时间戳) + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 文件系统创建时间(unix时间戳) + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpiredTime: 文件系统过期时间(unix时间戳) + * + * @return integer|null + */ + public function getExpiredTime() + { + return $this->get("ExpiredTime"); + } + + /** + * ExpiredTime: 文件系统过期时间(unix时间戳) + * + * @param int $expiredTime + */ + public function setExpiredTime($expiredTime) + { + $this->set("ExpiredTime", $expiredTime); + } + + /** + * Size: 文件系统大小,单位GB + * + * @return integer|null + */ + public function getSize() + { + return $this->get("Size"); + } + + /** + * Size: 文件系统大小,单位GB + * + * @param int $size + */ + public function setSize($size) + { + $this->set("Size", $size); + } + + /** + * IsExpired: 是否过期 + * + * @return string|null + */ + public function getIsExpired() + { + return $this->get("IsExpired"); + } + + /** + * IsExpired: 是否过期 + * + * @param string $isExpired + */ + public function setIsExpired($isExpired) + { + $this->set("IsExpired", $isExpired); + } + + /** + * ChargeType: 计费类型 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * MountStatus: 文件系统挂载状态 + * + * @return integer|null + */ + public function getMountStatus() + { + return $this->get("MountStatus"); + } + + /** + * MountStatus: 文件系统挂载状态 + * + * @param int $mountStatus + */ + public function setMountStatus($mountStatus) + { + $this->set("MountStatus", $mountStatus); + } + + /** + * MountAddress: 文件系统挂载地址 + * + * @return string|null + */ + public function getMountAddress() + { + return $this->get("MountAddress"); + } + + /** + * MountAddress: 文件系统挂载地址 + * + * @param string $mountAddress + */ + public function setMountAddress($mountAddress) + { + $this->set("MountAddress", $mountAddress); + } +} diff --git a/src/UPFS/UPFSClient.php b/src/UPFS/UPFSClient.php new file mode 100644 index 00000000..1c10c86c --- /dev/null +++ b/src/UPFS/UPFSClient.php @@ -0,0 +1,279 @@ + (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) + * "Size" => (integer) 文件系统大小,单位为GB,必须为100的整数倍,Size最小为500GB + * "ProtocolType" => (string) 文件系统协议,目前仅支持POSIX + * "VolumeName" => (string) 文件系统名称 + * "Remark" => (string) 备注 + * "Tag" => (string) 文件系统所属业务组 + * "ChargeType" => (string) 计费模式,枚举值为: Year,按年付费; Month,按月付费 + * "Quantity" => (integer) 购买时长 默认: 1 + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "VolumeName" => (string) UPFS文件系统名称 + * "VolumeId" => (string) UPFS文件系统ID + * ] + * + * @return CreateUPFSVolumeResponse + * @throws UCloudException + */ + public function createUPFSVolume(CreateUPFSVolumeRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUPFSVolumeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUPFSVolume - 获取UPFS文件系统列表 + * + * See also: https://docs.ucloud.cn/api/upfs-api/describe_upfs_volume + * + * 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) + * "VolumeId" => (string) 文件系统ID + * "Offset" => (integer) 文件列表起始 + * "Limit" => (integer) 文件列表长度 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) UPFS文件系统总数 + * "DataSet" => (array) UPFS文件系统详细信息列表[ + * [ + * "Zone" => (string) 可用区名字 + * "VolumeName" => (string) 文件系统名称 + * "VolumeId" => (string) 文件系统ID + * "ProtocolType" => (string) 文件系统协议类型 + * "Remark" => (string) 文件系统备注信息 + * "Tag" => (string) 文件系统所属业务组 + * "CreateTime" => (integer) 文件系统创建时间(unix时间戳) + * "ExpiredTime" => (integer) 文件系统过期时间(unix时间戳) + * "Size" => (integer) 文件系统大小,单位GB + * "IsExpired" => (string) 是否过期 + * "ChargeType" => (string) 计费类型 + * "MountStatus" => (integer) 文件系统挂载状态 + * "MountAddress" => (string) 文件系统挂载地址 + * ] + * ] + * ] + * + * @return DescribeUPFSVolumeResponse + * @throws UCloudException + */ + public function describeUPFSVolume(DescribeUPFSVolumeRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUPFSVolumeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUPFSVolumePrice - 获取UPFS文件系统价格 + * + * See also: https://docs.ucloud.cn/api/upfs-api/describe_upfs_volume_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Size" => (integer) 文件系统大小,单位为GB,新架构容量型最小容量为500GB,以100GB递增,最大不超过100TB。 + * "Quantity" => (integer) 购买UPFS的时长, 默认为1 + * "ChargeType" => (string) Year, Month默认: Month + * "VolumeId" => (string) UPFS文件系统id,第一次创建文件系统时不需要传这个参数 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) upfs 价格信息[ + * [ + * "ChargeType" => (string) Year, Month + * "Price" => (number) 价格 (单位: 分) + * "OriginalPrice" => (number) 原价格 (单位: 分) + * "ChargeName" => (string) “upfs” + * ] + * ] + * ] + * + * @return DescribeUPFSVolumePriceResponse + * @throws UCloudException + */ + public function describeUPFSVolumePrice(DescribeUPFSVolumePriceRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUPFSVolumePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUPFSVolumeUpgradePrice - UPFS文件系统扩容价格 + * + * See also: https://docs.ucloud.cn/api/upfs-api/describe_upfs_volume_upgrade_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "VolumeId" => (string) 文件系统ID + * "Size" => (string) 文件系统大小 + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (number) 价格(单位:分) + * "OriginalPrice" => (number) 原价格(单位:分) + * ] + * + * @return DescribeUPFSVolumeUpgradePriceResponse + * @throws UCloudException + */ + public function describeUPFSVolumeUpgradePrice(DescribeUPFSVolumeUpgradePriceRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUPFSVolumeUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ExtendUPFSVolume - UPFS文件系统扩容 + * + * See also: https://docs.ucloud.cn/api/upfs-api/extend_upfs_volume + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "VolumeId" => (string) 文件系统ID + * "Size" => (integer) 文件系统大小,单位为GB,最小为6000GB,最大为10PB,必须为1000的整数倍 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ExtendUPFSVolumeResponse + * @throws UCloudException + */ + public function extendUPFSVolume(ExtendUPFSVolumeRequest $request = null) + { + $resp = $this->invoke($request); + return new ExtendUPFSVolumeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RemoveUPFSVolume - 删除UPFS文件系统 + * + * See also: https://docs.ucloud.cn/api/upfs-api/remove_upfs_volume + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "VolumeId" => (string) 文件系统ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return RemoveUPFSVolumeResponse + * @throws UCloudException + */ + public function removeUPFSVolume(RemoveUPFSVolumeRequest $request = null) + { + $resp = $this->invoke($request); + return new RemoveUPFSVolumeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUPFSVolumeInfo - 更改UPFS文件系统相关信息(名称/备注) + * + * See also: https://docs.ucloud.cn/api/upfs-api/update_upfs_volume_info + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "VolumeId" => (string) UPFS文件系统ID + * "VolumeName" => (string) UPFS文件系统名称(文件系统名称/备注至少传入其中一个) + * "Remark" => (string) UPFS文件系统备注(文件系统名称/备注至少传入其中一个) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateUPFSVolumeInfoResponse + * @throws UCloudException + */ + public function updateUPFSVolumeInfo(UpdateUPFSVolumeInfoRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateUPFSVolumeInfoResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UWSC/Apis/AddExportLineRulesRequest.php b/src/UWSC/Apis/AddExportLineRulesRequest.php new file mode 100644 index 00000000..e253ba34 --- /dev/null +++ b/src/UWSC/Apis/AddExportLineRulesRequest.php @@ -0,0 +1,92 @@ + "AddExportLineRules"]); + $this->markRequired("ProjectId"); + $this->markRequired("ResourceId"); + $this->markRequired("RuleTypes"); + } + + + + /** + * 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); + } + + /** + * ResourceId: UReach资源ID + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: UReach资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * RuleTypes: 白名单类型:Developer、CrossBorder + * + * @return string[]|null + */ + public function getRuleTypes() + { + return $this->get("RuleTypes"); + } + + /** + * RuleTypes: 白名单类型:Developer、CrossBorder + * + * @param string[] $ruleTypes + */ + public function setRuleTypes(array $ruleTypes) + { + $this->set("RuleTypes", $ruleTypes); + } +} diff --git a/src/UWSC/Apis/AddExportLineRulesResponse.php b/src/UWSC/Apis/AddExportLineRulesResponse.php new file mode 100644 index 00000000..e358ca9a --- /dev/null +++ b/src/UWSC/Apis/AddExportLineRulesResponse.php @@ -0,0 +1,26 @@ + "BindCPE"]); + $this->markRequired("ProjectId"); + $this->markRequired("CPEId"); + $this->markRequired("Sn"); + } + + + + /** + * 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); + } + + /** + * CPEId: cpe id + * + * @return string|null + */ + public function getCPEId() + { + return $this->get("CPEId"); + } + + /** + * CPEId: cpe id + * + * @param string $cpeId + */ + public function setCPEId($cpeId) + { + $this->set("CPEId", $cpeId); + } + + /** + * Sn: sn id + * + * @return string|null + */ + public function getSn() + { + return $this->get("Sn"); + } + + /** + * Sn: sn id + * + * @param string $sn + */ + public function setSn($sn) + { + $this->set("Sn", $sn); + } +} diff --git a/src/UWSC/Apis/BindCPEResponse.php b/src/UWSC/Apis/BindCPEResponse.php new file mode 100644 index 00000000..bca9b759 --- /dev/null +++ b/src/UWSC/Apis/BindCPEResponse.php @@ -0,0 +1,26 @@ + "CreateCPE"]); + $this->markRequired("ProjectId"); + $this->markRequired("Name"); + $this->markRequired("Remark"); + $this->markRequired("DeviceType"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: cpe 名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: cpe 名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Remark: cpe 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: cpe 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * DeviceType: 设备型号,枚举值: UCPE3600、UCPE3601 + * + * @return string|null + */ + public function getDeviceType() + { + return $this->get("DeviceType"); + } + + /** + * DeviceType: 设备型号,枚举值: UCPE3600、UCPE3601 + * + * @param string $deviceType + */ + public function setDeviceType($deviceType) + { + $this->set("DeviceType", $deviceType); + } + + /** + * Label: 标签:UReach智能网关:Access + * + * @return string|null + */ + public function getLabel() + { + return $this->get("Label"); + } + + /** + * Label: 标签:UReach智能网关:Access + * + * @param string $label + */ + public function setLabel($label) + { + $this->set("Label", $label); + } + + /** + * UserInfo: 结构体,详见UserInfo模型 + * + * @return string|null + */ + public function getUserInfo() + { + return $this->get("UserInfo"); + } + + /** + * UserInfo: 结构体,详见UserInfo模型 + * + * @param string $userInfo + */ + public function setUserInfo($userInfo) + { + $this->set("UserInfo", $userInfo); + } + + /** + * Count: 数量,默认为1 + * + * @return integer|null + */ + public function getCount() + { + return $this->get("Count"); + } + + /** + * Count: 数量,默认为1 + * + * @param int $count + */ + public function setCount($count) + { + $this->set("Count", $count); + } +} diff --git a/src/UWSC/Apis/CreateCPEResponse.php b/src/UWSC/Apis/CreateCPEResponse.php new file mode 100644 index 00000000..a5e2e5fb --- /dev/null +++ b/src/UWSC/Apis/CreateCPEResponse.php @@ -0,0 +1,44 @@ +get("CPEId"); + } + + /** + * CPEId: cpe id + * + * @param string $cpeId + */ + public function setCPEId($cpeId) + { + $this->set("CPEId", $cpeId); + } +} diff --git a/src/UWSC/Apis/CreateExportLineRequest.php b/src/UWSC/Apis/CreateExportLineRequest.php new file mode 100644 index 00000000..602f91c3 --- /dev/null +++ b/src/UWSC/Apis/CreateExportLineRequest.php @@ -0,0 +1,314 @@ + "CreateExportLine"]); + $this->markRequired("ProjectId"); + $this->markRequired("FromRegion"); + $this->markRequired("ToRegion"); + $this->markRequired("IpType"); + $this->markRequired("CPEId"); + } + + + + /** + * 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); + } + + /** + * FromRegion: 本端地域 + * + * @return string|null + */ + public function getFromRegion() + { + return $this->get("FromRegion"); + } + + /** + * FromRegion: 本端地域 + * + * @param string $fromRegion + */ + public function setFromRegion($fromRegion) + { + $this->set("FromRegion", $fromRegion); + } + + /** + * ToRegion: 目标地域 + * + * @return string|null + */ + public function getToRegion() + { + return $this->get("ToRegion"); + } + + /** + * ToRegion: 目标地域 + * + * @param string $toRegion + */ + public function setToRegion($toRegion) + { + $this->set("ToRegion", $toRegion); + } + + /** + * IpType: IP类型:International、BGP、Native、Resident + * + * @return string|null + */ + public function getIpType() + { + return $this->get("IpType"); + } + + /** + * IpType: IP类型:International、BGP、Native、Resident + * + * @param string $ipType + */ + public function setIpType($ipType) + { + $this->set("IpType", $ipType); + } + + /** + * CPEId: CPE Id + * + * @return string|null + */ + public function getCPEId() + { + return $this->get("CPEId"); + } + + /** + * CPEId: CPE Id + * + * @param string $cpeId + */ + public function setCPEId($cpeId) + { + $this->set("CPEId", $cpeId); + } + + /** + * PkgType: 套餐类型:2M-Entry、5M-Basic、10M-Enterprise + * + * @return string|null + */ + public function getPkgType() + { + return $this->get("PkgType"); + } + + /** + * PkgType: 套餐类型:2M-Entry、5M-Basic、10M-Enterprise + * + * @param string $pkgType + */ + public function setPkgType($pkgType) + { + $this->set("PkgType", $pkgType); + } + + /** + * Bandwidth: 带宽大小 + * + * @return integer|null + */ + public function getBandwidth() + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽大小 + * + * @param int $bandwidth + */ + public function setBandwidth($bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * Name: 资源名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 资源名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Tag: 业务组名称, 默认为 "Default" + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称, 默认为 "Default" + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * ChargeType: 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * + * @return integer|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * + * @param int $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * PayMode: 计费类型:fixed-bw,固定带宽;traffic,流量计费 + * + * @return string|null + */ + public function getPayMode() + { + return $this->get("PayMode"); + } + + /** + * PayMode: 计费类型:fixed-bw,固定带宽;traffic,流量计费 + * + * @param string $payMode + */ + public function setPayMode($payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * CouponId: 代金券ID。请登录用户中心查看 + * + * @return integer|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券ID。请登录用户中心查看 + * + * @param int $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UWSC/Apis/CreateExportLineResponse.php b/src/UWSC/Apis/CreateExportLineResponse.php new file mode 100644 index 00000000..156e6f9c --- /dev/null +++ b/src/UWSC/Apis/CreateExportLineResponse.php @@ -0,0 +1,44 @@ +get("ResourceId"); + } + + /** + * ResourceId: 资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UWSC/Apis/DeleteExportLineRequest.php b/src/UWSC/Apis/DeleteExportLineRequest.php new file mode 100644 index 00000000..ae7ebcdb --- /dev/null +++ b/src/UWSC/Apis/DeleteExportLineRequest.php @@ -0,0 +1,71 @@ + "DeleteExportLine"]); + $this->markRequired("ProjectId"); + $this->markRequired("ResourceId"); + } + + + + /** + * 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); + } + + /** + * ResourceId: UReach资源ID + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: UReach资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UWSC/Apis/DeleteExportLineResponse.php b/src/UWSC/Apis/DeleteExportLineResponse.php new file mode 100644 index 00000000..14c5245b --- /dev/null +++ b/src/UWSC/Apis/DeleteExportLineResponse.php @@ -0,0 +1,26 @@ + "DeleteExportLineRules"]); + $this->markRequired("ProjectId"); + $this->markRequired("ResourceId"); + $this->markRequired("RuleTypes"); + } + + + + /** + * 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); + } + + /** + * ResourceId: UReach资源ID + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: UReach资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * RuleTypes: 白名单类型:Developer、CrossBorder + * + * @return string[]|null + */ + public function getRuleTypes() + { + return $this->get("RuleTypes"); + } + + /** + * RuleTypes: 白名单类型:Developer、CrossBorder + * + * @param string[] $ruleTypes + */ + public function setRuleTypes(array $ruleTypes) + { + $this->set("RuleTypes", $ruleTypes); + } +} diff --git a/src/UWSC/Apis/DeleteExportLineRulesResponse.php b/src/UWSC/Apis/DeleteExportLineRulesResponse.php new file mode 100644 index 00000000..7d91d61e --- /dev/null +++ b/src/UWSC/Apis/DeleteExportLineRulesResponse.php @@ -0,0 +1,26 @@ + "DescribeCPE"]); + $this->markRequired("ProjectId"); + } + + + + /** + * 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); + } + + /** + * CPEId: cpe id + * + * @return string|null + */ + public function getCPEId() + { + return $this->get("CPEId"); + } + + /** + * CPEId: cpe id + * + * @param string $cpeId + */ + public function setCPEId($cpeId) + { + $this->set("CPEId", $cpeId); + } + + /** + * Label: 标签:Access、Network + * + * @return string|null + */ + public function getLabel() + { + return $this->get("Label"); + } + + /** + * Label: 标签:Access、Network + * + * @param string $label + */ + public function setLabel($label) + { + $this->set("Label", $label); + } +} diff --git a/src/UWSC/Apis/DescribeCPEResponse.php b/src/UWSC/Apis/DescribeCPEResponse.php new file mode 100644 index 00000000..f8075652 --- /dev/null +++ b/src/UWSC/Apis/DescribeCPEResponse.php @@ -0,0 +1,57 @@ +get("CPEInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CPEInfo($item)); + } + return $result; + } + + /** + * CPEInfos: cpe 详情 + * + * @param CPEInfo[] $cpeInfos + */ + public function setCPEInfos(array $cpeInfos) + { + $result = []; + foreach ($cpeInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UWSC/Apis/DescribeExportLineRequest.php b/src/UWSC/Apis/DescribeExportLineRequest.php new file mode 100644 index 00000000..ca6281e9 --- /dev/null +++ b/src/UWSC/Apis/DescribeExportLineRequest.php @@ -0,0 +1,89 @@ + "DescribeExportLine"]); + } + + + + /** + * 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); + } + + /** + * CPEId: CPE资源ID + * + * @return string|null + */ + public function getCPEId() + { + return $this->get("CPEId"); + } + + /** + * CPEId: CPE资源ID + * + * @param string $cpeId + */ + public function setCPEId($cpeId) + { + $this->set("CPEId", $cpeId); + } + + /** + * ResourceId: UReach资源ID + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: UReach资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UWSC/Apis/DescribeExportLineResponse.php b/src/UWSC/Apis/DescribeExportLineResponse.php new file mode 100644 index 00000000..e9bd224a --- /dev/null +++ b/src/UWSC/Apis/DescribeExportLineResponse.php @@ -0,0 +1,58 @@ +get("LineInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new LineInfo($item)); + } + return $result; + } + + /** + * LineInfos: 线路信息 + * + * @param LineInfo[] $lineInfos + */ + public function setLineInfos(array $lineInfos) + { + $result = []; + foreach ($lineInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UWSC/Apis/DescribeExportLineRulesRequest.php b/src/UWSC/Apis/DescribeExportLineRulesRequest.php new file mode 100644 index 00000000..57af642a --- /dev/null +++ b/src/UWSC/Apis/DescribeExportLineRulesRequest.php @@ -0,0 +1,89 @@ + "DescribeExportLineRules"]); + } + + + + /** + * 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); + } + + /** + * ResourceId: UReach资源ID + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: UReach资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * RuleType: 白名单类型 + * + * @return string|null + */ + public function getRuleType() + { + return $this->get("RuleType"); + } + + /** + * RuleType: 白名单类型 + * + * @param string $ruleType + */ + public function setRuleType($ruleType) + { + $this->set("RuleType", $ruleType); + } +} diff --git a/src/UWSC/Apis/DescribeExportLineRulesResponse.php b/src/UWSC/Apis/DescribeExportLineRulesResponse.php new file mode 100644 index 00000000..a5389004 --- /dev/null +++ b/src/UWSC/Apis/DescribeExportLineRulesResponse.php @@ -0,0 +1,57 @@ +get("WhiteListInfos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new WhiteListInfo($item)); + } + return $result; + } + + /** + * WhiteListInfos: 白名单信息 + * + * @param WhiteListInfo[] $whiteListInfos + */ + public function setWhiteListInfos(array $whiteListInfos) + { + $result = []; + foreach ($whiteListInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UWSC/Apis/UpdateExportLineRequest.php b/src/UWSC/Apis/UpdateExportLineRequest.php new file mode 100644 index 00000000..4253c0c1 --- /dev/null +++ b/src/UWSC/Apis/UpdateExportLineRequest.php @@ -0,0 +1,92 @@ + "UpdateExportLine"]); + $this->markRequired("ProjectId"); + $this->markRequired("ResourceId"); + $this->markRequired("Bandwidth"); + } + + + + /** + * 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); + } + + /** + * ResourceId: UReach资源ID + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: UReach资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * Bandwidth: 带宽大小(仅自定义套餐支持修改) + * + * @return string|null + */ + public function getBandwidth() + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽大小(仅自定义套餐支持修改) + * + * @param string $bandwidth + */ + public function setBandwidth($bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } +} diff --git a/src/UWSC/Apis/UpdateExportLineResponse.php b/src/UWSC/Apis/UpdateExportLineResponse.php new file mode 100644 index 00000000..ecb02902 --- /dev/null +++ b/src/UWSC/Apis/UpdateExportLineResponse.php @@ -0,0 +1,26 @@ + "UpgradeExportLine"]); + $this->markRequired("ProjectId"); + $this->markRequired("ResourceId"); + $this->markRequired("PkgType"); + $this->markRequired("IpType"); + } + + + + /** + * 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); + } + + /** + * ResourceId: UReach资源ID + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: UReach资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * PkgType: 目标套餐类型:2M-Entry、5M-Basic、10M-Enterprise + * + * @return string|null + */ + public function getPkgType() + { + return $this->get("PkgType"); + } + + /** + * PkgType: 目标套餐类型:2M-Entry、5M-Basic、10M-Enterprise + * + * @param string $pkgType + */ + public function setPkgType($pkgType) + { + $this->set("PkgType", $pkgType); + } + + /** + * IpType: 原IP类型:International、BGP、Native、Resident + * + * @return string|null + */ + public function getIpType() + { + return $this->get("IpType"); + } + + /** + * IpType: 原IP类型:International、BGP、Native、Resident + * + * @param string $ipType + */ + public function setIpType($ipType) + { + $this->set("IpType", $ipType); + } + + /** + * Bandwidth: 带宽大小 + * + * @return integer|null + */ + public function getBandwidth() + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽大小 + * + * @param int $bandwidth + */ + public function setBandwidth($bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * ChargeType: 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * + * @return integer|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * + * @param int $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * CouponId: 代金券ID。请登录用户中心查看 + * + * @return integer|null + */ + public function getCouponId() + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券ID。请登录用户中心查看 + * + * @param int $couponId + */ + public function setCouponId($couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UWSC/Apis/UpgradeExportLineResponse.php b/src/UWSC/Apis/UpgradeExportLineResponse.php new file mode 100644 index 00000000..b28d4e04 --- /dev/null +++ b/src/UWSC/Apis/UpgradeExportLineResponse.php @@ -0,0 +1,26 @@ +get("CPEId"); + } + + /** + * CPEId: 资源ID + * + * @param string $cpeId + */ + public function setCPEId($cpeId) + { + $this->set("CPEId", $cpeId); + } + + /** + * CPEName: 资源名称 + * + * @return string|null + */ + public function getCPEName() + { + return $this->get("CPEName"); + } + + /** + * CPEName: 资源名称 + * + * @param string $cpeName + */ + public function setCPEName($cpeName) + { + $this->set("CPEName", $cpeName); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * DeviceTypeName: 设备型号 + * + * @return string|null + */ + public function getDeviceTypeName() + { + return $this->get("DeviceTypeName"); + } + + /** + * DeviceTypeName: 设备型号 + * + * @param string $deviceTypeName + */ + public function setDeviceTypeName($deviceTypeName) + { + $this->set("DeviceTypeName", $deviceTypeName); + } + + /** + * Vendor: 供应商 + * + * @return string|null + */ + public function getVendor() + { + return $this->get("Vendor"); + } + + /** + * Vendor: 供应商 + * + * @param string $vendor + */ + public function setVendor($vendor) + { + $this->set("Vendor", $vendor); + } + + /** + * PopGwId: 绑定的UWAN资源ID + * + * @return string[]|null + */ + public function getPopGwId() + { + return $this->get("PopGwId"); + } + + /** + * PopGwId: 绑定的UWAN资源ID + * + * @param string[] $popGwId + */ + public function setPopGwId(array $popGwId) + { + $this->set("PopGwId", $popGwId); + } + + /** + * Sn: 设备SN + * + * @return string|null + */ + public function getSn() + { + return $this->get("Sn"); + } + + /** + * Sn: 设备SN + * + * @param string $sn + */ + public function setSn($sn) + { + $this->set("Sn", $sn); + } + + /** + * Status: 状态 + * + * @return integer|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 状态 + * + * @param int $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * ConfUpdateTime: 配置更新时间 + * + * @return integer|null + */ + public function getConfUpdateTime() + { + return $this->get("ConfUpdateTime"); + } + + /** + * ConfUpdateTime: 配置更新时间 + * + * @param int $confUpdateTime + */ + public function setConfUpdateTime($confUpdateTime) + { + $this->set("ConfUpdateTime", $confUpdateTime); + } + + /** + * Ports: 端口 + * + * @return string[]|null + */ + public function getPorts() + { + return $this->get("Ports"); + } + + /** + * Ports: 端口 + * + * @param string[] $ports + */ + public function setPorts(array $ports) + { + $this->set("Ports", $ports); + } + + /** + * LinkNum: 链路数量 + * + * @return integer|null + */ + public function getLinkNum() + { + return $this->get("LinkNum"); + } + + /** + * LinkNum: 链路数量 + * + * @param int $linkNum + */ + public function setLinkNum($linkNum) + { + $this->set("LinkNum", $linkNum); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * LineStatus: 是否与线路绑定 + * + * @return string|null + */ + public function getLineStatus() + { + return $this->get("LineStatus"); + } + + /** + * LineStatus: 是否与线路绑定 + * + * @param string $lineStatus + */ + public function setLineStatus($lineStatus) + { + $this->set("LineStatus", $lineStatus); + } + + /** + * ResourceIds: 绑定的UReach线路资源ID + * + * @return string[]|null + */ + public function getResourceIds() + { + return $this->get("ResourceIds"); + } + + /** + * ResourceIds: 绑定的UReach线路资源ID + * + * @param string[] $resourceIds + */ + public function setResourceIds(array $resourceIds) + { + $this->set("ResourceIds", $resourceIds); + } + + /** + * UseTime: 有效使用时间(天) + * + * @return integer|null + */ + public function getUseTime() + { + return $this->get("UseTime"); + } + + /** + * UseTime: 有效使用时间(天) + * + * @param int $useTime + */ + public function setUseTime($useTime) + { + $this->set("UseTime", $useTime); + } +} diff --git a/src/UWSC/Models/LineInfo.php b/src/UWSC/Models/LineInfo.php new file mode 100644 index 00000000..fd036522 --- /dev/null +++ b/src/UWSC/Models/LineInfo.php @@ -0,0 +1,444 @@ +get("Name"); + } + + /** + * Name: 名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * 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); + } + + /** + * InstanceId: 线路资源ID对应的加速线路ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 线路资源ID对应的加速线路ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * Bandwidth: 带宽大小(Mbps) + * + * @return integer|null + */ + public function getBandwidth() + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽大小(Mbps) + * + * @param int $bandwidth + */ + public function setBandwidth($bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * ChargeType: 付费方式(按月、按年等) + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式(按月、按年等) + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * PayMode: 计费方式(固定带宽: fixed-bw;流量计费:traffic) + * + * @return string|null + */ + public function getPayMode() + { + return $this->get("PayMode"); + } + + /** + * PayMode: 计费方式(固定带宽: fixed-bw;流量计费:traffic) + * + * @param string $payMode + */ + public function setPayMode($payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * FromRegion: 入口地域 + * + * @return string|null + */ + public function getFromRegion() + { + return $this->get("FromRegion"); + } + + /** + * FromRegion: 入口地域 + * + * @param string $fromRegion + */ + public function setFromRegion($fromRegion) + { + $this->set("FromRegion", $fromRegion); + } + + /** + * FromRegionName: 入口地域名称 + * + * @return string|null + */ + public function getFromRegionName() + { + return $this->get("FromRegionName"); + } + + /** + * FromRegionName: 入口地域名称 + * + * @param string $fromRegionName + */ + public function setFromRegionName($fromRegionName) + { + $this->set("FromRegionName", $fromRegionName); + } + + /** + * ToRegion: 出口地域 + * + * @return string|null + */ + public function getToRegion() + { + return $this->get("ToRegion"); + } + + /** + * ToRegion: 出口地域 + * + * @param string $toRegion + */ + public function setToRegion($toRegion) + { + $this->set("ToRegion", $toRegion); + } + + /** + * ToRegionName: 出口地域名称 + * + * @return string|null + */ + public function getToRegionName() + { + return $this->get("ToRegionName"); + } + + /** + * ToRegionName: 出口地域名称 + * + * @param string $toRegionName + */ + public function setToRegionName($toRegionName) + { + $this->set("ToRegionName", $toRegionName); + } + + /** + * IP: + * + * @return string[]|null + */ + public function getIP() + { + return $this->get("IP"); + } + + /** + * IP: + * + * @param string[] $ip + */ + public function setIP(array $ip) + { + $this->set("IP", $ip); + } + + /** + * Status: 线路是否绑定CPE;"1":已绑定;"0"未绑定 + * + * @return string|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 线路是否绑定CPE;"1":已绑定;"0"未绑定 + * + * @param string $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * 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); + } + + /** + * CPEIds: 线路绑定的CPE资源ID + * + * @return string[]|null + */ + public function getCPEIds() + { + return $this->get("CPEIds"); + } + + /** + * CPEIds: 线路绑定的CPE资源ID + * + * @param string[] $cpeIds + */ + public function setCPEIds(array $cpeIds) + { + $this->set("CPEIds", $cpeIds); + } + + /** + * PkgType: 套餐类型 + * + * @return string|null + */ + public function getPkgType() + { + return $this->get("PkgType"); + } + + /** + * PkgType: 套餐类型 + * + * @param string $pkgType + */ + public function setPkgType($pkgType) + { + $this->set("PkgType", $pkgType); + } + + /** + * IpType: IP类型 + * + * @return string|null + */ + public function getIpType() + { + return $this->get("IpType"); + } + + /** + * IpType: IP类型 + * + * @param string $ipType + */ + public function setIpType($ipType) + { + $this->set("IpType", $ipType); + } + + /** + * InstanceStatus: 是否过期(normal/expire) + * + * @return string|null + */ + public function getInstanceStatus() + { + return $this->get("InstanceStatus"); + } + + /** + * InstanceStatus: 是否过期(normal/expire) + * + * @param string $instanceStatus + */ + public function setInstanceStatus($instanceStatus) + { + $this->set("InstanceStatus", $instanceStatus); + } + + /** + * Socks: + * + * @return SocksInfo|null + */ + public function getSocks() + { + return new SocksInfo($this->get("Socks")); + } + + /** + * Socks: + * + * @param SocksInfo $socks + */ + public function setSocks(array $socks) + { + $this->set("Socks", $socks->getAll()); + } + + /** + * Source: 源IP地址 + * + * @return string[]|null + */ + public function getSource() + { + return $this->get("Source"); + } + + /** + * Source: 源IP地址 + * + * @param string[] $source + */ + public function setSource(array $source) + { + $this->set("Source", $source); + } +} diff --git a/src/UWSC/Models/SocksInfo.php b/src/UWSC/Models/SocksInfo.php new file mode 100644 index 00000000..f3042289 --- /dev/null +++ b/src/UWSC/Models/SocksInfo.php @@ -0,0 +1,84 @@ +get("Addr"); + } + + /** + * Addr: + * + * @param string $addr + */ + public function setAddr($addr) + { + $this->set("Addr", $addr); + } + + /** + * Port: + * + * @return integer|null + */ + public function getPort() + { + return $this->get("Port"); + } + + /** + * Port: + * + * @param int $port + */ + public function setPort($port) + { + $this->set("Port", $port); + } + + /** + * Account: + * + * @return string|null + */ + public function getAccount() + { + return $this->get("Account"); + } + + /** + * Account: + * + * @param string $account + */ + public function setAccount($account) + { + $this->set("Account", $account); + } +} diff --git a/src/UWSC/Models/WhiteListInfo.php b/src/UWSC/Models/WhiteListInfo.php new file mode 100644 index 00000000..ca707d4a --- /dev/null +++ b/src/UWSC/Models/WhiteListInfo.php @@ -0,0 +1,84 @@ +get("RuleType"); + } + + /** + * RuleType: + * + * @param string $ruleType + */ + public function setRuleType($ruleType) + { + $this->set("RuleType", $ruleType); + } + + /** + * Name: + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Remark: + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UWSC/UWSCClient.php b/src/UWSC/UWSCClient.php new file mode 100644 index 00000000..3ecd33f4 --- /dev/null +++ b/src/UWSC/UWSCClient.php @@ -0,0 +1,422 @@ + (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ResourceId" => (string) UReach资源ID + * "RuleTypes" => (array) 白名单类型:Developer、CrossBorder + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return AddExportLineRulesResponse + * @throws UCloudException + */ + public function addExportLineRules(AddExportLineRulesRequest $request = null) + { + $resp = $this->invoke($request); + return new AddExportLineRulesResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * BindCPE - 绑定 CPE + * + * See also: https://docs.ucloud.cn/api/uwsc-api/bind_cpe + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "CPEId" => (string) cpe id + * "Sn" => (string) sn id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return BindCPEResponse + * @throws UCloudException + */ + public function bindCPE(BindCPERequest $request = null) + { + $resp = $this->invoke($request); + return new BindCPEResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateCPE - 创建 CPE + * + * See also: https://docs.ucloud.cn/api/uwsc-api/create_cpe + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Name" => (string) cpe 名称 + * "Remark" => (string) cpe 备注 + * "DeviceType" => (string) 设备型号,枚举值: UCPE3600、UCPE3601 + * "Label" => (string) 标签:UReach智能网关:Access + * "UserInfo" => (string) 结构体,详见UserInfo模型 + * "Count" => (integer) 数量,默认为1 + * ] + * + * Outputs: + * + * $outputs = [ + * "CPEId" => (string) cpe id + * ] + * + * @return CreateCPEResponse + * @throws UCloudException + */ + public function createCPE(CreateCPERequest $request = null) + { + $resp = $this->invoke($request); + return new CreateCPEResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateExportLine - 创建加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/create_export_line + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "FromRegion" => (string) 本端地域 + * "ToRegion" => (string) 目标地域 + * "IpType" => (string) IP类型:International、BGP、Native、Resident + * "CPEId" => (string) CPE Id + * "PkgType" => (string) 套餐类型:2M-Entry、5M-Basic、10M-Enterprise + * "Bandwidth" => (integer) 带宽大小 + * "Name" => (string) 资源名称 + * "Tag" => (string) 业务组名称, 默认为 "Default" + * "ChargeType" => (string) 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付 + * "Quantity" => (integer) 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * "Remark" => (string) 备注 + * "PayMode" => (string) 计费类型:fixed-bw,固定带宽;traffic,流量计费 + * "CouponId" => (integer) 代金券ID。请登录用户中心查看 + * ] + * + * Outputs: + * + * $outputs = [ + * "ResourceId" => (string) 资源ID + * ] + * + * @return CreateExportLineResponse + * @throws UCloudException + */ + public function createExportLine(CreateExportLineRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateExportLineResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteExportLine - 删除加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/delete_export_line + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ResourceId" => (string) UReach资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteExportLineResponse + * @throws UCloudException + */ + public function deleteExportLine(DeleteExportLineRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteExportLineResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteExportLineRules - 删除加速规则 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/delete_export_line_rules + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ResourceId" => (string) UReach资源ID + * "RuleTypes" => (array) 白名单类型:Developer、CrossBorder + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteExportLineRulesResponse + * @throws UCloudException + */ + public function deleteExportLineRules(DeleteExportLineRulesRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteExportLineRulesResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeCPE - 查询 CPE 信息 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/describe_cpe + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "CPEId" => (string) cpe id + * "Label" => (string) 标签:Access、Network + * ] + * + * Outputs: + * + * $outputs = [ + * "CPEInfos" => (array) cpe 详情[ + * [ + * "CPEId" => (string) 资源ID + * "CPEName" => (string) 资源名称 + * "Remark" => (string) 备注 + * "DeviceTypeName" => (string) 设备型号 + * "Vendor" => (string) 供应商 + * "PopGwId" => (array) 绑定的UWAN资源ID + * "Sn" => (string) 设备SN + * "Status" => (integer) 状态 + * "ConfUpdateTime" => (integer) 配置更新时间 + * "Ports" => (array) 端口 + * "LinkNum" => (integer) 链路数量 + * "CreateTime" => (integer) 创建时间 + * "LineStatus" => (string) 是否与线路绑定 + * "ResourceIds" => (array) 绑定的UReach线路资源ID + * "UseTime" => (integer) 有效使用时间(天) + * ] + * ] + * ] + * + * @return DescribeCPEResponse + * @throws UCloudException + */ + public function describeCPE(DescribeCPERequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeCPEResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeExportLine - 查询CPE绑定的加速线路信息 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/describe_export_line + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "CPEId" => (string) CPE资源ID + * "ResourceId" => (string) UReach资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * "LineInfos" => (array) 线路信息[ + * [ + * "Name" => (string) 名称 + * "Remark" => (string) 备注 + * "ResourceId" => (string) 线路资源ID + * "InstanceId" => (string) 线路资源ID对应的加速线路ID + * "Bandwidth" => (integer) 带宽大小(Mbps) + * "ChargeType" => (string) 付费方式(按月、按年等) + * "PayMode" => (string) 计费方式(固定带宽: fixed-bw;流量计费:traffic) + * "FromRegion" => (string) 入口地域 + * "FromRegionName" => (string) 入口地域名称 + * "ToRegion" => (string) 出口地域 + * "ToRegionName" => (string) 出口地域名称 + * "IP" => (array) + * "Status" => (string) 线路是否绑定CPE;"1":已绑定;"0"未绑定 + * "CreateTime" => (integer) 创建时间 + * "ExpireTime" => (integer) 到期时间 + * "CPEIds" => (array) 线路绑定的CPE资源ID + * "PkgType" => (string) 套餐类型 + * "IpType" => (string) IP类型 + * "InstanceStatus" => (string) 是否过期(normal/expire) + * "Socks" => (object) [ + * "Addr" => (string) + * "Port" => (integer) + * "Account" => (string) + * ] + * "Source" => (array) 源IP地址 + * ] + * ] + * ] + * + * @return DescribeExportLineResponse + * @throws UCloudException + */ + public function describeExportLine(DescribeExportLineRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeExportLineResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeExportLineRules - 查询白名单 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/describe_export_line_rules + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ResourceId" => (string) UReach资源ID + * "RuleType" => (string) 白名单类型 + * ] + * + * Outputs: + * + * $outputs = [ + * "WhiteListInfos" => (array) 白名单信息[ + * [ + * "RuleType" => (string) + * "Name" => (string) + * "Remark" => (string) + * ] + * ] + * ] + * + * @return DescribeExportLineRulesResponse + * @throws UCloudException + */ + public function describeExportLineRules(DescribeExportLineRulesRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeExportLineRulesResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateExportLine - 修改加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/update_export_line + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ResourceId" => (string) UReach资源ID + * "Bandwidth" => (string) 带宽大小(仅自定义套餐支持修改) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateExportLineResponse + * @throws UCloudException + */ + public function updateExportLine(UpdateExportLineRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateExportLineResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpgradeExportLine - 升级加速线路 + * + * See also: https://docs.ucloud.cn/api/uwsc-api/upgrade_export_line + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ResourceId" => (string) UReach资源ID + * "PkgType" => (string) 目标套餐类型:2M-Entry、5M-Basic、10M-Enterprise + * "IpType" => (string) 原IP类型:International、BGP、Native、Resident + * "Bandwidth" => (integer) 带宽大小 + * "ChargeType" => (string) 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付 + * "Quantity" => (integer) 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * "CouponId" => (integer) 代金券ID。请登录用户中心查看 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpgradeExportLineResponse + * @throws UCloudException + */ + public function upgradeExportLine(UpgradeExportLineRequest $request = null) + { + $resp = $this->invoke($request); + return new UpgradeExportLineResponse($resp->toArray(), $resp->getRequestId()); + } +}