diff --git a/VERSION b/VERSION index 88dbf46f..e23fb32d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.25 +0.3.26 diff --git a/src/UHost/Apis/CheckUHostResourceCapacityRequest.php b/src/UHost/Apis/CheckUHostResourceCapacityRequest.php new file mode 100644 index 00000000..7004b65b --- /dev/null +++ b/src/UHost/Apis/CheckUHostResourceCapacityRequest.php @@ -0,0 +1,447 @@ + "CheckUHostResourceCapacity"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ImageId"); + } + + + + /** + * 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); + } + + /** + * 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); + } + + /** + * Disks: + * + * @return CheckUHostResourceCapacityParamDisks[]|null + */ + public function getDisks() + { + $items = $this->get("Disks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CheckUHostResourceCapacityParamDisks($item)); + } + return $result; + } + + /** + * Disks: + * + * @param CheckUHostResourceCapacityParamDisks[] $disks + */ + public function setDisks(array $disks) + { + $result = []; + foreach ($disks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ > Spot计费为抢占式实例(内测阶段) \\ 默认为月付 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ > Spot计费为抢占式实例(内测阶段) \\ 默认为月付 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * CPU: 虚拟CPU核数。可选参数:1-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: 虚拟CPU核数。可选参数:1-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 + * + * @return integer|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S",2080","2080TiS","2080TiPro","3090","A100", "4090", "4090Pro", "4090_48G", "5090"],MachineType为G时必填 + * + * @return string|null + */ + public function getGpuType() + { + return $this->get("GpuType"); + } + + /** + * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S",2080","2080TiS","2080TiPro","3090","A100", "4090", "4090Pro", "4090_48G", "5090"],MachineType为G时必填 + * + * @param string $gpuType + */ + public function setGpuType($gpuType) + { + $this->set("GpuType", $gpuType); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * + * @return integer|null + */ + public function getGPU() + { + return $this->get("GPU"); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * + * @param int $gpu + */ + public function setGPU($gpu) + { + $this->set("GPU", $gpu); + } + + /** + * NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(详情参考官网文档) + * + * @return string|null + */ + public function getNetCapability() + { + return $this->get("NetCapability"); + } + + /** + * NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(详情参考官网文档) + * + * @param string $netCapability + */ + public function setNetCapability($netCapability) + { + $this->set("NetCapability", $netCapability); + } + + /** + * HotplugFeature: 热升级特性。True为开启,False为未开启,默认False。 + * + * @return boolean|null + */ + public function getHotplugFeature() + { + return $this->get("HotplugFeature"); + } + + /** + * HotplugFeature: 热升级特性。True为开启,False为未开启,默认False。 + * + * @param boolean $hotplugFeature + */ + public function setHotplugFeature($hotplugFeature) + { + $this->set("HotplugFeature", $hotplugFeature); + } + + /** + * IsolationGroup: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @return string|null + */ + public function getIsolationGroup() + { + return $this->get("IsolationGroup"); + } + + /** + * IsolationGroup: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @param string $isolationGroup + */ + public function setIsolationGroup($isolationGroup) + { + $this->set("IsolationGroup", $isolationGroup); + } + + /** + * MachineType: 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OM", "OPRO", "OMAX", "O.BM", "O.EPC"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OM", "OPRO", "OMAX", "O.BM", "O.EPC"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake", "Intel/CascadelakeR", "Intel/IceLake", "Amd/Epyc2", "Amd/Auto","Ampere/Auto","Ampere/Altra"],默认值是"Intel/Auto"。 + * + * @return string|null + */ + public function getMinimalCpuPlatform() + { + return $this->get("MinimalCpuPlatform"); + } + + /** + * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake", "Intel/CascadelakeR", "Intel/IceLake", "Amd/Epyc2", "Amd/Auto","Ampere/Auto","Ampere/Altra"],默认值是"Intel/Auto"。 + * + * @param string $minimalCpuPlatform + */ + public function setMinimalCpuPlatform($minimalCpuPlatform) + { + $this->set("MinimalCpuPlatform", $minimalCpuPlatform); + } + + /** + * MaxCount: 本次最大创建主机数量,取值范围是[1,100],默认值为1。 + * + * @return integer|null + */ + public function getMaxCount() + { + return $this->get("MaxCount"); + } + + /** + * MaxCount: 本次最大创建主机数量,取值范围是[1,100],默认值为1。 + * + * @param int $maxCount + */ + public function setMaxCount($maxCount) + { + $this->set("MaxCount", $maxCount); + } + + /** + * Features: + * + * @return CheckUHostResourceCapacityParamFeatures|null + */ + public function getFeatures() + { + return new CheckUHostResourceCapacityParamFeatures($this->get("Features")); + } + + /** + * Features: + * + * @param CheckUHostResourceCapacityParamFeatures $features + */ + public function setFeatures(array $features) + { + $this->set("Features", $features->getAll()); + } + + /** + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * + * @return string|null + */ + public function getSecurityMode() + { + return $this->get("SecurityMode"); + } + + /** + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * + * @param string $securityMode + */ + public function setSecurityMode($securityMode) + { + $this->set("SecurityMode", $securityMode); + } + + /** + * UHostFamily: 规格族。由机型代号和 CPU 平台组成,用于指定云主机的硬件类型与处理器平台。当 MachineType 为 "O"(快杰型)时,支持以下取值:o1i:快杰型 O1 代,Intel 平台o1a:快杰型 O1 代,AMD 平台o1r:快杰型 O1 代,ARM 平台o2i:快杰型 O2 代,Intel 平台默认值:o1i 或 o1a(系统将根据资源情况自动选择)当 MachineType 为 "OM"(快杰共享型)时,支持以下取值:om1i:快杰内存增强型 OM1 代,Intel 平台om2i:快杰内存增强型 OM2 代,Intel 平台⚠️ 注意:规格族必须与 MachineType 匹配,否则请求将被拒绝。 + * + * @return string|null + */ + public function getUHostFamily() + { + return $this->get("UHostFamily"); + } + + /** + * UHostFamily: 规格族。由机型代号和 CPU 平台组成,用于指定云主机的硬件类型与处理器平台。当 MachineType 为 "O"(快杰型)时,支持以下取值:o1i:快杰型 O1 代,Intel 平台o1a:快杰型 O1 代,AMD 平台o1r:快杰型 O1 代,ARM 平台o2i:快杰型 O2 代,Intel 平台默认值:o1i 或 o1a(系统将根据资源情况自动选择)当 MachineType 为 "OM"(快杰共享型)时,支持以下取值:om1i:快杰内存增强型 OM1 代,Intel 平台om2i:快杰内存增强型 OM2 代,Intel 平台⚠️ 注意:规格族必须与 MachineType 匹配,否则请求将被拒绝。 + * + * @param string $uHostFamily + */ + public function setUHostFamily($uHostFamily) + { + $this->set("UHostFamily", $uHostFamily); + } + + /** + * MinCount: 本次最小创建主机数量,取值范围是[1,100],默认值为1。 + * + * @return integer|null + */ + public function getMinCount() + { + return $this->get("MinCount"); + } + + /** + * MinCount: 本次最小创建主机数量,取值范围是[1,100],默认值为1。 + * + * @param int $minCount + */ + public function setMinCount($minCount) + { + $this->set("MinCount", $minCount); + } +} diff --git a/src/UHost/Apis/CheckUHostResourceCapacityResponse.php b/src/UHost/Apis/CheckUHostResourceCapacityResponse.php new file mode 100644 index 00000000..b53b6390 --- /dev/null +++ b/src/UHost/Apis/CheckUHostResourceCapacityResponse.php @@ -0,0 +1,64 @@ +get("ResourceEnough"); + } + + /** + * ResourceEnough: 资源是否充足 + * + * @param boolean $resourceEnough + */ + public function setResourceEnough($resourceEnough) + { + $this->set("ResourceEnough", $resourceEnough); + } + + /** + * RdmaClusterIds: 随机的资源对应的RdmaClusterId数组,若资源不足则为空,只有快杰系列机型,以及A800才可能有此字段 + * + * @return string[]|null + */ + public function getRdmaClusterIds() + { + return $this->get("RdmaClusterIds"); + } + + /** + * RdmaClusterIds: 随机的资源对应的RdmaClusterId数组,若资源不足则为空,只有快杰系列机型,以及A800才可能有此字段 + * + * @param string[] $rdmaClusterIds + */ + public function setRdmaClusterIds(array $rdmaClusterIds) + { + $this->set("RdmaClusterIds", $rdmaClusterIds); + } +} diff --git a/src/UHost/Apis/CopyCustomImageRequest.php b/src/UHost/Apis/CopyCustomImageRequest.php index 78e8ce49..5e80ec84 100644 --- a/src/UHost/Apis/CopyCustomImageRequest.php +++ b/src/UHost/Apis/CopyCustomImageRequest.php @@ -1,6 +1,6 @@ set("TargetImageDescription", $targetImageDescription); } + + /** + * TargetImageTag: 目标镜像业务组 + * + * @return string|null + */ + public function getTargetImageTag() + { + return $this->get("TargetImageTag"); + } + + /** + * TargetImageTag: 目标镜像业务组 + * + * @param string $targetImageTag + */ + public function setTargetImageTag($targetImageTag) + { + $this->set("TargetImageTag", $targetImageTag); + } + + /** + * TargetRegionList: 目标地域的集合,批量复制时填写 + * + * @return string[]|null + */ + public function getTargetRegionList() + { + return $this->get("TargetRegionList"); + } + + /** + * TargetRegionList: 目标地域的集合,批量复制时填写 + * + * @param string[] $targetRegionList + */ + public function setTargetRegionList(array $targetRegionList) + { + $this->set("TargetRegionList", $targetRegionList); + } } diff --git a/src/UHost/Apis/CopyCustomImageResponse.php b/src/UHost/Apis/CopyCustomImageResponse.php index 00becc05..a806ef4e 100644 --- a/src/UHost/Apis/CopyCustomImageResponse.php +++ b/src/UHost/Apis/CopyCustomImageResponse.php @@ -1,6 +1,6 @@ set("TargetImageId", $targetImageId); } + + /** + * TaskId: 目标镜像复制的任务Id,只有非批量复制的时候该字段才存在 + * + * @return string|null + */ + public function getTaskId() + { + return $this->get("TaskId"); + } + + /** + * TaskId: 目标镜像复制的任务Id,只有非批量复制的时候该字段才存在 + * + * @param string $taskId + */ + public function setTaskId($taskId) + { + $this->set("TaskId", $taskId); + } + + /** + * Infos: 批量复制时的任务信息,参考下方的CopyImageTaskInfo + * + * @return CopyImageTaskInfo[]|null + */ + public function getInfos() + { + $items = $this->get("Infos"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CopyImageTaskInfo($item)); + } + return $result; + } + + /** + * Infos: 批量复制时的任务信息,参考下方的CopyImageTaskInfo + * + * @param CopyImageTaskInfo[] $infos + */ + public function setInfos(array $infos) + { + $result = []; + foreach ($infos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } } diff --git a/src/UHost/Apis/CreateCustomImageRequest.php b/src/UHost/Apis/CreateCustomImageRequest.php index dfe4a3b5..1d536afc 100644 --- a/src/UHost/Apis/CreateCustomImageRequest.php +++ b/src/UHost/Apis/CreateCustomImageRequest.php @@ -1,6 +1,6 @@ set("ImageDescription", $imageDescription); } + + /** + * 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); + } + + /** + * DataUDiskIds: 【数组】关联的云盘数据盘id列表。注意: 云盘数据盘需要开启快照服务 + * + * @return string[]|null + */ + public function getDataUDiskIds() + { + return $this->get("DataUDiskIds"); + } + + /** + * DataUDiskIds: 【数组】关联的云盘数据盘id列表。注意: 云盘数据盘需要开启快照服务 + * + * @param string[] $dataUDiskIds + */ + public function setDataUDiskIds(array $dataUDiskIds) + { + $this->set("DataUDiskIds", $dataUDiskIds); + } } diff --git a/src/UHost/Apis/CreateCustomImageResponse.php b/src/UHost/Apis/CreateCustomImageResponse.php index 3f110e7f..a8bff452 100644 --- a/src/UHost/Apis/CreateCustomImageResponse.php +++ b/src/UHost/Apis/CreateCustomImageResponse.php @@ -1,6 +1,6 @@ set("ImageId", $imageId); } + + /** + * DataSnapshotIds: 云盘数据盘快照id列表 + * + * @return string[]|null + */ + public function getDataSnapshotIds() + { + return $this->get("DataSnapshotIds"); + } + + /** + * DataSnapshotIds: 云盘数据盘快照id列表 + * + * @param string[] $dataSnapshotIds + */ + public function setDataSnapshotIds(array $dataSnapshotIds) + { + $this->set("DataSnapshotIds", $dataSnapshotIds); + } } diff --git a/src/UHost/Apis/CreateIsolationGroupRequest.php b/src/UHost/Apis/CreateIsolationGroupRequest.php index ef04df8f..5ac4181e 100644 --- a/src/UHost/Apis/CreateIsolationGroupRequest.php +++ b/src/UHost/Apis/CreateIsolationGroupRequest.php @@ -1,6 +1,6 @@ Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\Preemptive计费为抢占式实例(内测阶段) \\ 默认为月付 + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ > Spot计费为抢占式实例(内测阶段) \\ 默认为月付 * * @return string|null */ @@ -242,7 +243,7 @@ public function getChargeType() } /** - * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\Preemptive计费为抢占式实例(内测阶段) \\ 默认为月付 + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ > Spot计费为抢占式实例(内测阶段) \\ 默认为月付 * * @param string $chargeType */ @@ -332,7 +333,7 @@ public function setMemory($memory) } /** - * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S"],MachineType为G时必填 + * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "V100S",2080","2080TiS","2080TiPro","3090","4090","4090Pro","4090_48G","A100","A800","H20"]。MachineType为G时必填 * * @return string|null */ @@ -342,7 +343,7 @@ public function getGpuType() } /** - * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S"],MachineType为G时必填 + * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "V100S",2080","2080TiS","2080TiPro","3090","4090","4090Pro","4090_48G","A100","A800","H20"]。MachineType为G时必填 * * @param string $gpuType */ @@ -372,7 +373,7 @@ public function setGPU($gpu) } /** - * NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(详情参考官网文档) + * NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0;Extreme,开启网络增强3.0(详情参考官网文档) * * @return string|null */ @@ -382,7 +383,7 @@ public function getNetCapability() } /** - * NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(详情参考官网文档) + * NetCapability: 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0;Extreme,开启网络增强3.0(详情参考官网文档) * * @param string $netCapability */ @@ -512,7 +513,7 @@ public function setIsolationGroup($isolationGroup) } /** - * AlarmTemplateId: 告警模板id,如果传了告警模板id,且告警模板id正确,则绑定告警模板。绑定告警模板失败只会在后台有日志,不会影响创建主机流程,也不会在前端报错。 + * AlarmTemplateId: 告警模板id,如果传了告警模板id,且告警模板id正确,则绑定告警模板。绑定告警模板失败不会影响创建主机流程。 * * @return integer|null */ @@ -522,7 +523,7 @@ public function getAlarmTemplateId() } /** - * AlarmTemplateId: 告警模板id,如果传了告警模板id,且告警模板id正确,则绑定告警模板。绑定告警模板失败只会在后台有日志,不会影响创建主机流程,也不会在前端报错。 + * AlarmTemplateId: 告警模板id,如果传了告警模板id,且告警模板id正确,则绑定告警模板。绑定告警模板失败不会影响创建主机流程。 * * @param int $alarmTemplateId */ @@ -532,7 +533,7 @@ public function setAlarmTemplateId($alarmTemplateId) } /** - * MachineType: 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OM", "OPRO", "OMAX", "O.BM", "O.EPC"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * MachineType: 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OM", "OMEM", "OPRO", "OPROG"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 * * @return string|null */ @@ -542,7 +543,7 @@ public function getMachineType() } /** - * MachineType: 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OM", "OPRO", "OMAX", "O.BM", "O.EPC"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * MachineType: 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OM", "OMEM", "OPRO", "OPROG"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 * * @param string $machineType */ @@ -552,7 +553,7 @@ public function setMachineType($machineType) } /** - * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake", "Intel/CascadelakeR", "Intel/IceLake", "Amd/Epyc2", "Amd/Auto"],默认值是"Intel/Auto"。 + * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake", "Intel/CascadelakeR", "Intel/IceLake", "Intel/SapphireRapids", "Amd/Epyc2", "Amd/Auto","Ampere/Auto","Ampere/Altra"],默认值是"Intel/Auto"。 * * @return string|null */ @@ -562,7 +563,7 @@ public function getMinimalCpuPlatform() } /** - * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake", "Intel/CascadelakeR", "Intel/IceLake", "Amd/Epyc2", "Amd/Auto"],默认值是"Intel/Auto"。 + * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake", "Intel/CascadelakeR", "Intel/IceLake", "Intel/SapphireRapids", "Amd/Epyc2", "Amd/Auto","Ampere/Auto","Ampere/Altra"],默认值是"Intel/Auto"。 * * @param string $minimalCpuPlatform */ @@ -572,7 +573,7 @@ public function setMinimalCpuPlatform($minimalCpuPlatform) } /** - * MaxCount: 本次最大创建主机数量,取值范围是[1,100],默认值为1。 + * MaxCount: 本次最大创建主机数量,取值范围是[1,100],默认值为1。- 库存数量不足时,按库存数量创建。- 配额不足时,返回错误。- 使用隔离组时,以隔离组可用数量为准。 * * @return integer|null */ @@ -582,7 +583,7 @@ public function getMaxCount() } /** - * MaxCount: 本次最大创建主机数量,取值范围是[1,100],默认值为1。 + * MaxCount: 本次最大创建主机数量,取值范围是[1,100],默认值为1。- 库存数量不足时,按库存数量创建。- 配额不足时,返回错误。- 使用隔离组时,以隔离组可用数量为准。 * * @param int $maxCount */ @@ -767,6 +768,178 @@ public function setSecGroupId(array $secGroupId) return $result; } + /** + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * + * @return string|null + */ + public function getSecurityMode() + { + return $this->get("SecurityMode"); + } + + /** + * SecurityMode: 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * + * @param string $securityMode + */ + public function setSecurityMode($securityMode) + { + $this->set("SecurityMode", $securityMode); + } + + /** + * UDSetId: 【私有专区属性】专区id + * + * @return string|null + */ + public function getUDSetId() + { + return $this->get("UDSetId"); + } + + /** + * UDSetId: 【私有专区属性】专区id + * + * @param string $udSetId + */ + public function setUDSetId($udSetId) + { + $this->set("UDSetId", $udSetId); + } + + /** + * UDHostId: 【私有专区属性】专区宿主机id + * + * @return string|null + */ + public function getUDHostId() + { + return $this->get("UDHostId"); + } + + /** + * UDHostId: 【私有专区属性】专区宿主机id + * + * @param string $udHostId + */ + public function setUDHostId($udHostId) + { + $this->set("UDHostId", $udHostId); + } + + /** + * HostBinding: 【私有专区属性】专区云主机开启宿住关联属性 + * + * @return boolean|null + */ + public function getHostBinding() + { + return $this->get("HostBinding"); + } + + /** + * HostBinding: 【私有专区属性】专区云主机开启宿住关联属性 + * + * @param boolean $hostBinding + */ + public function setHostBinding($hostBinding) + { + $this->set("HostBinding", $hostBinding); + } + + /** + * MinCount: 本次最小创建主机数量,取值范围是[1,100],默认值为1。- 配额不足时,返回错误。 + * + * @return integer|null + */ + public function getMinCount() + { + return $this->get("MinCount"); + } + + /** + * MinCount: 本次最小创建主机数量,取值范围是[1,100],默认值为1。- 配额不足时,返回错误。 + * + * @param int $minCount + */ + public function setMinCount($minCount) + { + $this->set("MinCount", $minCount); + } + + /** + * Labels: + * + * @return CreateUHostInstanceParamLabels[]|null + */ + public function getLabels() + { + $items = $this->get("Labels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUHostInstanceParamLabels($item)); + } + return $result; + } + + /** + * Labels: + * + * @param CreateUHostInstanceParamLabels[] $labels + */ + public function setLabels(array $labels) + { + $result = []; + foreach ($labels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DeletionProtection: 删除保护,设置删除保护参数,true表示不允许控制台删除 + * + * @return boolean|null + */ + public function getDeletionProtection() + { + return $this->get("DeletionProtection"); + } + + /** + * DeletionProtection: 删除保护,设置删除保护参数,true表示不允许控制台删除 + * + * @param boolean $deletionProtection + */ + public function setDeletionProtection($deletionProtection) + { + $this->set("DeletionProtection", $deletionProtection); + } + + /** + * UHostFamily: 规格族。 由机型代号和 CPU 平台组成,用于指定云主机的硬件类型与处理器平台。 当 MachineType 为 "O"(快杰型)时,支持以下取值:- o1i:快杰型 O1 代,Intel 平台 - o1a:快杰型 O1 代,AMD 平台- o1r:快杰型 O1 代,ARM 平台 - o2i:快杰型 O2 代,Intel 平台 默认值:o1i 或 o1a当 MachineType 为 "OM"(快杰共享型)时,支持以下取值: - om1i:快杰内存增强型 OM1 代,Intel 平台 - om2i:快杰内存增强型 OM2 代,Intel 平台注意:规格族必须与 MachineType 匹配,否则请求将被拒绝。 + * + * @return string|null + */ + public function getUHostFamily() + { + return $this->get("UHostFamily"); + } + + /** + * UHostFamily: 规格族。 由机型代号和 CPU 平台组成,用于指定云主机的硬件类型与处理器平台。 当 MachineType 为 "O"(快杰型)时,支持以下取值:- o1i:快杰型 O1 代,Intel 平台 - o1a:快杰型 O1 代,AMD 平台- o1r:快杰型 O1 代,ARM 平台 - o2i:快杰型 O2 代,Intel 平台 默认值:o1i 或 o1a当 MachineType 为 "OM"(快杰共享型)时,支持以下取值: - om1i:快杰内存增强型 OM1 代,Intel 平台 - om2i:快杰内存增强型 OM2 代,Intel 平台注意:规格族必须与 MachineType 匹配,否则请求将被拒绝。 + * + * @param string $uHostFamily + */ + public function setUHostFamily($uHostFamily) + { + $this->set("UHostFamily", $uHostFamily); + } + /** * CouponId: 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 * diff --git a/src/UHost/Apis/CreateUHostInstanceResponse.php b/src/UHost/Apis/CreateUHostInstanceResponse.php index d9e367d6..05431568 100644 --- a/src/UHost/Apis/CreateUHostInstanceResponse.php +++ b/src/UHost/Apis/CreateUHostInstanceResponse.php @@ -1,6 +1,6 @@ "DescribeAvailableInstanceTypes"]); - $this->markRequired("Region"); - $this->markRequired("Zone"); } @@ -88,4 +86,24 @@ public function setProjectId($projectId) { $this->set("ProjectId", $projectId); } + + /** + * MachineTypes: 指定机型列表 + * + * @return string[]|null + */ + public function getMachineTypes() + { + return $this->get("MachineTypes"); + } + + /** + * MachineTypes: 指定机型列表 + * + * @param string[] $machineTypes + */ + public function setMachineTypes(array $machineTypes) + { + $this->set("MachineTypes", $machineTypes); + } } diff --git a/src/UHost/Apis/DescribeAvailableInstanceTypesResponse.php b/src/UHost/Apis/DescribeAvailableInstanceTypesResponse.php index 0acc1bf8..d1d6add2 100644 --- a/src/UHost/Apis/DescribeAvailableInstanceTypesResponse.php +++ b/src/UHost/Apis/DescribeAvailableInstanceTypesResponse.php @@ -1,6 +1,6 @@ get("Status"); + } + + /** + * Status: 当前区域是否可售 + * + * @param string $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } } diff --git a/src/UHost/Apis/DescribeHostMachineTypeFamiliesRequest.php b/src/UHost/Apis/DescribeHostMachineTypeFamiliesRequest.php new file mode 100644 index 00000000..24214442 --- /dev/null +++ b/src/UHost/Apis/DescribeHostMachineTypeFamiliesRequest.php @@ -0,0 +1,50 @@ + "DescribeHostMachineTypeFamilies"]); + $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); + } +} diff --git a/src/UHost/Apis/DescribeHostMachineTypeFamiliesResponse.php b/src/UHost/Apis/DescribeHostMachineTypeFamiliesResponse.php new file mode 100644 index 00000000..e3e2d376 --- /dev/null +++ b/src/UHost/Apis/DescribeHostMachineTypeFamiliesResponse.php @@ -0,0 +1,76 @@ +get("MachineTypes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MachineTypes($item)); + } + return $result; + } + + /** + * MachineTypes: 机型配置列表 + * + * @param MachineTypes[] $machineTypes + */ + public function setMachineTypes(array $machineTypes) + { + $result = []; + foreach ($machineTypes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHost/Apis/DescribeImageRequest.php b/src/UHost/Apis/DescribeImageRequest.php index 55f5ca73..56eccc4b 100644 --- a/src/UHost/Apis/DescribeImageRequest.php +++ b/src/UHost/Apis/DescribeImageRequest.php @@ -1,6 +1,6 @@ set("ImageType", $imageType); } + /** + * FuncType: 镜像归属,枚举值:["gpu","app","uhost"]。"gpu": 对gpu进行处理过的行业镜像;"app":轻量云主机专用的镜像;"uhost":云主机镜像市场的行业镜像。FuncType传参错误会被忽略 + * + * @return string|null + */ + public function getFuncType() + { + return $this->get("FuncType"); + } + + /** + * FuncType: 镜像归属,枚举值:["gpu","app","uhost"]。"gpu": 对gpu进行处理过的行业镜像;"app":轻量云主机专用的镜像;"uhost":云主机镜像市场的行业镜像。FuncType传参错误会被忽略 + * + * @param string $funcType + */ + public function setFuncType($funcType) + { + $this->set("FuncType", $funcType); + } + /** * OsType: 操作系统类型:Linux, Windows 默认返回所有类型 * @@ -148,6 +168,46 @@ 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 * diff --git a/src/UHost/Apis/DescribeImageResponse.php b/src/UHost/Apis/DescribeImageResponse.php index 6f27248c..8c607b74 100644 --- a/src/UHost/Apis/DescribeImageResponse.php +++ b/src/UHost/Apis/DescribeImageResponse.php @@ -1,6 +1,6 @@ "DescribeUHostAvailableDiskTypes"]); + $this->markRequired("Region"); + $this->markRequired("UHostIds"); + } + + + + /** + * 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); + } + + /** + * UHostIds: 实例Id列表。最多100个 + * + * @return string[]|null + */ + public function getUHostIds() + { + return $this->get("UHostIds"); + } + + /** + * UHostIds: 实例Id列表。最多100个 + * + * @param string[] $uHostIds + */ + public function setUHostIds(array $uHostIds) + { + $this->set("UHostIds", $uHostIds); + } +} diff --git a/src/UHost/Apis/DescribeUHostAvailableDiskTypesResponse.php b/src/UHost/Apis/DescribeUHostAvailableDiskTypesResponse.php new file mode 100644 index 00000000..b699f20c --- /dev/null +++ b/src/UHost/Apis/DescribeUHostAvailableDiskTypesResponse.php @@ -0,0 +1,60 @@ +get("DiskTypeSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AvailableDiskTypes($item)); + } + return $result; + } + + /** + * DiskTypeSet: 可挂载的磁盘信息列表 + * + * @param AvailableDiskTypes[] $diskTypeSet + */ + public function setDiskTypeSet(array $diskTypeSet) + { + $result = []; + foreach ($diskTypeSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHost/Apis/DescribeUHostInstanceRequest.php b/src/UHost/Apis/DescribeUHostInstanceRequest.php index 5e3be32f..eaa06841 100644 --- a/src/UHost/Apis/DescribeUHostInstanceRequest.php +++ b/src/UHost/Apis/DescribeUHostInstanceRequest.php @@ -1,6 +1,6 @@ set("Price", $price); } + + /** + * OriginalPrice: 用户折后价。精度为小数点后2位。 + * + * @return float|null + */ + public function getOriginalPrice() + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 用户折后价。精度为小数点后2位。 + * + * @param float $originalPrice + */ + public function setOriginalPrice($originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } + + /** + * ListPrice: 原价。精度为小数点后2位。 + * + * @return float|null + */ + public function getListPrice() + { + return $this->get("ListPrice"); + } + + /** + * ListPrice: 原价。精度为小数点后2位。 + * + * @param float $listPrice + */ + public function setListPrice($listPrice) + { + $this->set("ListPrice", $listPrice); + } + + /** + * PriceDetail: 升级价格详情,精度为小数点后2位。 + * + * @return DiskUpgradePriceDetail|null + */ + public function getPriceDetail() + { + return new DiskUpgradePriceDetail($this->get("PriceDetail")); + } + + /** + * PriceDetail: 升级价格详情,精度为小数点后2位。 + * + * @param DiskUpgradePriceDetail $priceDetail + */ + public function setPriceDetail(array $priceDetail) + { + $this->set("PriceDetail", $priceDetail->getAll()); + } + + /** + * OriginalPriceDetail: 用户折后价详情,精度为小数点后2位。 + * + * @return DiskUpgradePriceDetail|null + */ + public function getOriginalPriceDetail() + { + return new DiskUpgradePriceDetail($this->get("OriginalPriceDetail")); + } + + /** + * OriginalPriceDetail: 用户折后价详情,精度为小数点后2位。 + * + * @param DiskUpgradePriceDetail $originalPriceDetail + */ + public function setOriginalPriceDetail(array $originalPriceDetail) + { + $this->set("OriginalPriceDetail", $originalPriceDetail->getAll()); + } + + /** + * ListPriceDetail: 原价详情,精度为小数点后2位。 + * + * @return DiskUpgradePriceDetail|null + */ + public function getListPriceDetail() + { + return new DiskUpgradePriceDetail($this->get("ListPriceDetail")); + } + + /** + * ListPriceDetail: 原价详情,精度为小数点后2位。 + * + * @param DiskUpgradePriceDetail $listPriceDetail + */ + public function setListPriceDetail(array $listPriceDetail) + { + $this->set("ListPriceDetail", $listPriceDetail->getAll()); + } } diff --git a/src/UHost/Apis/GetUHostInstancePriceRequest.php b/src/UHost/Apis/GetUHostInstancePriceRequest.php index 584234f2..29f1c650 100644 --- a/src/UHost/Apis/GetUHostInstancePriceRequest.php +++ b/src/UHost/Apis/GetUHostInstancePriceRequest.php @@ -1,6 +1,6 @@ Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时付费 // >Preemptive 抢占式实例 \\ 如果不传某个枚举值,默认返回年付、月付、时付的价格组合集。 + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时付费 // >Spot 抢占式实例 \\ 如果不传某个枚举值,默认返回年付、月付、时付的价格组合集。 * * @return string|null */ @@ -237,7 +236,7 @@ public function getChargeType() } /** - * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时付费 // >Preemptive 抢占式实例 \\ 如果不传某个枚举值,默认返回年付、月付、时付的价格组合集。 + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时付费 // >Spot 抢占式实例 \\ 如果不传某个枚举值,默认返回年付、月付、时付的价格组合集。 * * @param string $chargeType */ @@ -287,7 +286,7 @@ public function setUHostType($uHostType) } /** - * MachineType: 云主机机型(V2版本概念)。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * MachineType: 云主机机型(V2版本概念)。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM", "O.EPC"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 * * @return string|null */ @@ -297,7 +296,7 @@ public function getMachineType() } /** - * MachineType: 云主机机型(V2版本概念)。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * MachineType: 云主机机型(V2版本概念)。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM", "O.EPC"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 * * @param string $machineType */ @@ -307,7 +306,7 @@ public function setMachineType($machineType) } /** - * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4","T4S","2080Ti","2080Ti-4C","1080Ti"] + * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S",2080","2080TiS","2080TiPro","3090","4090","4090Pro","A100","A800"] * * @return string|null */ @@ -317,7 +316,7 @@ public function getGpuType() } /** - * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4","T4S","2080Ti","2080Ti-4C","1080Ti"] + * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S",2080","2080TiS","2080TiPro","3090","4090","4090Pro","A100","A800"] * * @param string $gpuType */ @@ -399,22 +398,62 @@ public function setVolumes(array $volumes) } /** - * VirtualGpu: + * UDSetUHostInstance: 专区云主机。如果要在专区宿主机上创建云主机,该参数可以填写为true * - * @return GetUHostInstancePriceParamVirtualGpu|null + * @return boolean|null */ - public function getVirtualGpu() + public function getUDSetUHostInstance() { - return new GetUHostInstancePriceParamVirtualGpu($this->get("VirtualGpu")); + return $this->get("UDSetUHostInstance"); } /** - * VirtualGpu: + * UDSetUHostInstance: 专区云主机。如果要在专区宿主机上创建云主机,该参数可以填写为true * - * @param GetUHostInstancePriceParamVirtualGpu $virtualGpu + * @param boolean $udSetUHostInstance */ - public function setVirtualGpu(array $virtualGpu) + public function setUDSetUHostInstance($udSetUHostInstance) { - $this->set("VirtualGpu", $virtualGpu->getAll()); + $this->set("UDSetUHostInstance", $udSetUHostInstance); + } + + /** + * ShowPriceDetails: 返回价格详细信息 + * + * @return boolean|null + */ + public function getShowPriceDetails() + { + return $this->get("ShowPriceDetails"); + } + + /** + * ShowPriceDetails: 返回价格详细信息 + * + * @param boolean $showPriceDetails + */ + public function setShowPriceDetails($showPriceDetails) + { + $this->set("ShowPriceDetails", $showPriceDetails); + } + + /** + * UHostFamily: 规格族。 由机型代号和 CPU 平台组成,用于指定云主机的硬件类型与处理器平台。当 MachineType 为 "O"(快杰型)时,支持以下取值: - o1i:快杰型 O1 代,Intel 平台 - o1a:快杰型 O1 代,AMD 平台- o1r:快杰型 O1 代,ARM 平台 - o2i:快杰型 O2 代,Intel 平台 默认值:o1i 或 o1a或o1r当 MachineType 为 "OM"(快杰共享型)时,支持以下取值: - om1i:快杰内存增强型 OM1 代,Intel 平台 - om2i:快杰内存增强型 OM2 代,Intel 平台注意:规格族必须与 MachineType 匹配,否则请求将被拒绝。 + * + * @return string|null + */ + public function getUHostFamily() + { + return $this->get("UHostFamily"); + } + + /** + * UHostFamily: 规格族。 由机型代号和 CPU 平台组成,用于指定云主机的硬件类型与处理器平台。当 MachineType 为 "O"(快杰型)时,支持以下取值: - o1i:快杰型 O1 代,Intel 平台 - o1a:快杰型 O1 代,AMD 平台- o1r:快杰型 O1 代,ARM 平台 - o2i:快杰型 O2 代,Intel 平台 默认值:o1i 或 o1a或o1r当 MachineType 为 "OM"(快杰共享型)时,支持以下取值: - om1i:快杰内存增强型 OM1 代,Intel 平台 - om2i:快杰内存增强型 OM2 代,Intel 平台注意:规格族必须与 MachineType 匹配,否则请求将被拒绝。 + * + * @param string $uHostFamily + */ + public function setUHostFamily($uHostFamily) + { + $this->set("UHostFamily", $uHostFamily); } } diff --git a/src/UHost/Apis/GetUHostInstancePriceResponse.php b/src/UHost/Apis/GetUHostInstancePriceResponse.php index bf364b62..4661494c 100644 --- a/src/UHost/Apis/GetUHostInstancePriceResponse.php +++ b/src/UHost/Apis/GetUHostInstancePriceResponse.php @@ -1,6 +1,6 @@ "GetUHostRefundPrice"]); + $this->markRequired("Region"); + $this->markRequired("UHostIds"); + } + + + + /** + * 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); + } + + /** + * UHostIds: 【数组】UHost实例ID。参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @return string[]|null + */ + public function getUHostIds() + { + return $this->get("UHostIds"); + } + + /** + * UHostIds: 【数组】UHost实例ID。参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @param string[] $uHostIds + */ + public function setUHostIds(array $uHostIds) + { + $this->set("UHostIds", $uHostIds); + } +} diff --git a/src/UHost/Apis/GetUHostRefundPriceResponse.php b/src/UHost/Apis/GetUHostRefundPriceResponse.php new file mode 100644 index 00000000..f523c167 --- /dev/null +++ b/src/UHost/Apis/GetUHostRefundPriceResponse.php @@ -0,0 +1,57 @@ +get("RefundPriceSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UHostRefundPriceSet($item)); + } + return $result; + } + + /** + * RefundPriceSet: 主机删除扣除费用详情 + * + * @param UHostRefundPriceSet[] $refundPriceSet + */ + public function setRefundPriceSet(array $refundPriceSet) + { + $result = []; + foreach ($refundPriceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHost/Apis/GetUHostRenewPriceRequest.php b/src/UHost/Apis/GetUHostRenewPriceRequest.php new file mode 100644 index 00000000..2f98c4f1 --- /dev/null +++ b/src/UHost/Apis/GetUHostRenewPriceRequest.php @@ -0,0 +1,112 @@ + "GetUHostRenewPrice"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + $this->markRequired("ChargeType"); + } + + + + /** + * 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); + } + + /** + * UHostId: UHost实例ID + * + * @return string|null + */ + public function getUHostId() + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID + * + * @param string $uHostId + */ + public function setUHostId($uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * 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); + } +} diff --git a/src/UHost/Apis/GetUHostRenewPriceResponse.php b/src/UHost/Apis/GetUHostRenewPriceResponse.php new file mode 100644 index 00000000..262129c1 --- /dev/null +++ b/src/UHost/Apis/GetUHostRenewPriceResponse.php @@ -0,0 +1,57 @@ +get("PriceSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BasePriceSet($item)); + } + return $result; + } + + /** + * PriceSet: 价格列表 + * + * @param BasePriceSet[] $priceSet + */ + public function setPriceSet(array $priceSet) + { + $result = []; + foreach ($priceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHost/Apis/GetUHostUpgradePriceRequest.php b/src/UHost/Apis/GetUHostUpgradePriceRequest.php index 26ac9abd..90f4fc63 100644 --- a/src/UHost/Apis/GetUHostUpgradePriceRequest.php +++ b/src/UHost/Apis/GetUHostUpgradePriceRequest.php @@ -1,6 +1,6 @@ get("GPU"); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * + * @param int $gpu + */ + public function setGPU($gpu) + { + $this->set("GPU", $gpu); + } + + /** + * NetCapValue: 网卡升降级(1,表示升级,2表示降级,0表示不变)。仅支持网络增强1.0和网络增强2.0的开启和关闭,不支持网络增强特性互相转换,如网络增强1.0升级到网络增强2.0是不被支持的。 * * @return integer|null */ @@ -160,7 +180,7 @@ public function getNetCapValue() } /** - * NetCapValue: 网卡升降级(1,表示升级,2表示降级,0表示不变) + * NetCapValue: 网卡升降级(1,表示升级,2表示降级,0表示不变)。仅支持网络增强1.0和网络增强2.0的开启和关闭,不支持网络增强特性互相转换,如网络增强1.0升级到网络增强2.0是不被支持的。 * * @param int $netCapValue */ diff --git a/src/UHost/Apis/GetUHostUpgradePriceResponse.php b/src/UHost/Apis/GetUHostUpgradePriceResponse.php index 0162fc13..938d1db7 100644 --- a/src/UHost/Apis/GetUHostUpgradePriceResponse.php +++ b/src/UHost/Apis/GetUHostUpgradePriceResponse.php @@ -1,6 +1,6 @@ set("Auth", $auth); } + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + /** * ImageDescription: 镜像描述 * diff --git a/src/UHost/Apis/ImportCustomImageResponse.php b/src/UHost/Apis/ImportCustomImageResponse.php index 9e232656..96cf1882 100644 --- a/src/UHost/Apis/ImportCustomImageResponse.php +++ b/src/UHost/Apis/ImportCustomImageResponse.php @@ -1,6 +1,6 @@ set("KeyPairId", $keyPairId); } + + /** + * HostName: 操作系统主机名 + * + * @return string|null + */ + public function getHostName() + { + return $this->get("HostName"); + } + + /** + * HostName: 操作系统主机名 + * + * @param string $hostName + */ + public function setHostName($hostName) + { + $this->set("HostName", $hostName); + } } diff --git a/src/UHost/Apis/ReinstallUHostInstanceResponse.php b/src/UHost/Apis/ReinstallUHostInstanceResponse.php index 2ef6da06..ef86bd1c 100644 --- a/src/UHost/Apis/ReinstallUHostInstanceResponse.php +++ b/src/UHost/Apis/ReinstallUHostInstanceResponse.php @@ -1,6 +1,6 @@ "ResetUHostInstancePassword"]); $this->markRequired("Region"); $this->markRequired("UHostId"); - $this->markRequired("Password"); } @@ -129,4 +128,64 @@ public function setPassword($password) { $this->set("Password", $password); } + + /** + * LoginMode: 主机登陆模式。密码(默认选项): Password,密钥 KeyPair。 + * + * @return string|null + */ + public function getLoginMode() + { + return $this->get("LoginMode"); + } + + /** + * LoginMode: 主机登陆模式。密码(默认选项): Password,密钥 KeyPair。 + * + * @param string $loginMode + */ + public function setLoginMode($loginMode) + { + $this->set("LoginMode", $loginMode); + } + + /** + * KeyPairId: KeypairId 密钥对ID,LoginMode为KeyPair时此项必须。 + * + * @return string|null + */ + public function getKeyPairId() + { + return $this->get("KeyPairId"); + } + + /** + * KeyPairId: KeypairId 密钥对ID,LoginMode为KeyPair时此项必须。 + * + * @param string $keyPairId + */ + public function setKeyPairId($keyPairId) + { + $this->set("KeyPairId", $keyPairId); + } + + /** + * AutoStart: 修改密码结束后是否立即开机,默认为false, 如果设置为true,则修改密码成功后立即开机; 抢占式和后付费云主机暂不支持当前功能; + * + * @return boolean|null + */ + public function getAutoStart() + { + return $this->get("AutoStart"); + } + + /** + * AutoStart: 修改密码结束后是否立即开机,默认为false, 如果设置为true,则修改密码成功后立即开机; 抢占式和后付费云主机暂不支持当前功能; + * + * @param boolean $autoStart + */ + public function setAutoStart($autoStart) + { + $this->set("AutoStart", $autoStart); + } } diff --git a/src/UHost/Apis/ResetUHostInstancePasswordResponse.php b/src/UHost/Apis/ResetUHostInstancePasswordResponse.php index e138e48f..173884b6 100644 --- a/src/UHost/Apis/ResetUHostInstancePasswordResponse.php +++ b/src/UHost/Apis/ResetUHostInstancePasswordResponse.php @@ -1,6 +1,6 @@ set("Memory", $memory); } + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * + * @return integer|null + */ + public function getGPU() + { + return $this->get("GPU"); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * + * @param int $gpu + */ + public function setGPU($gpu) + { + $this->set("GPU", $gpu); + } + /** * NetCapValue: 网卡升降级(1,表示升级,2表示降级,0表示不变) * @@ -168,4 +188,24 @@ public function setNetCapValue($netCapValue) { $this->set("NetCapValue", $netCapValue); } + + /** + * AutoStart: 扩容结束后是否立即开机,默认为false,如果设置为true,则扩容成功后立即开机;抢占式和后付费云主机暂不支持当前功能; + * + * @return boolean|null + */ + public function getAutoStart() + { + return $this->get("AutoStart"); + } + + /** + * AutoStart: 扩容结束后是否立即开机,默认为false,如果设置为true,则扩容成功后立即开机;抢占式和后付费云主机暂不支持当前功能; + * + * @param boolean $autoStart + */ + public function setAutoStart($autoStart) + { + $this->set("AutoStart", $autoStart); + } } diff --git a/src/UHost/Apis/ResizeUHostInstanceResponse.php b/src/UHost/Apis/ResizeUHostInstanceResponse.php index 33dcc849..a931587d 100644 --- a/src/UHost/Apis/ResizeUHostInstanceResponse.php +++ b/src/UHost/Apis/ResizeUHostInstanceResponse.php @@ -1,6 +1,6 @@ get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * 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); + } + + /** + * AvailableDisks: 可用磁盘信息 + * + * @return Disks[]|null + */ + public function getAvailableDisks() + { + $items = $this->get("AvailableDisks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Disks($item)); + } + return $result; + } + + /** + * AvailableDisks: 可用磁盘信息 + * + * @param Disks[] $availableDisks + */ + public function setAvailableDisks(array $availableDisks) + { + $result = []; + foreach ($availableDisks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHost/Models/AvailableInstanceTypes.php b/src/UHost/Models/AvailableInstanceTypes.php index df0bd1ab..ffc6e54f 100644 --- a/src/UHost/Models/AvailableInstanceTypes.php +++ b/src/UHost/Models/AvailableInstanceTypes.php @@ -1,6 +1,6 @@ get("Zone"); + } + + /** + * Zone: 可用区信息 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * InstanceType: 实例类型,枚举值["uhost", "spot"] + * + * @return string|null + */ + public function getInstanceType() + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: 实例类型,枚举值["uhost", "spot"] + * + * @param string $instanceType + */ + public function setInstanceType($instanceType) + { + $this->set("InstanceType", $instanceType); + } + /** * Name: 机型名称:快杰O型|O 、快杰共享型|OM 、快杰内存型|OMEM 、 快杰PRO型|OPRO、通用N型|N、高主频C型|C和GPU G型|G等 * @@ -82,6 +122,38 @@ public function setCpuPlatforms(array $cpuPlatforms) $this->set("CpuPlatforms", $cpuPlatforms->getAll()); } + /** + * UHostFamilies: 规格族信息 + * + * @return UHostFamily[]|null + */ + public function getUHostFamilies() + { + $items = $this->get("UHostFamilies"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UHostFamily($item)); + } + return $result; + } + + /** + * UHostFamilies: 规格族信息 + * + * @param UHostFamily[] $uHostFamilies + */ + public function setUHostFamilies(array $uHostFamilies) + { + $result = []; + foreach ($uHostFamilies as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + /** * Disks: 磁盘信息。磁盘主要分类如下:云盘|cloudDisk、普通本地盘|normalLocalDisk和SSD本地盘|ssdLocalDisk。其中云盘主要包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。MinimalSize为磁盘最小值,如果没有该字段,最小值取基础镜像Size值即可(linux为20G,windows为40G)。MaximalSize为磁盘最大值。InstantResize表示系统盘是否允许扩容,如果是本地盘,则不允许扩容,InstantResize为false。Features为磁盘可支持的服务:数据方舟|DATAARK,快照服务|SNAPSHOT,加密盘|Encrypted。 * @@ -237,4 +309,44 @@ public function setPerformance(array $performance) { $this->set("Performance", $performance->getAll()); } + + /** + * ParentType: 父机型 + * + * @return string|null + */ + public function getParentType() + { + return $this->get("ParentType"); + } + + /** + * ParentType: 父机型 + * + * @param string $parentType + */ + public function setParentType($parentType) + { + $this->set("ParentType", $parentType); + } + + /** + * 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/UHost/Models/BasePriceSet.php b/src/UHost/Models/BasePriceSet.php new file mode 100644 index 00000000..183a6dbc --- /dev/null +++ b/src/UHost/Models/BasePriceSet.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/UHost/Models/BootDiskInfo.php b/src/UHost/Models/BootDiskInfo.php index b00fce83..de9d1bbd 100644 --- a/src/UHost/Models/BootDiskInfo.php +++ b/src/UHost/Models/BootDiskInfo.php @@ -1,6 +1,6 @@ get("TaskId"); + } + + /** + * TaskId: 目标镜像复制的任务Id + * + * @param string $taskId + */ + public function setTaskId($taskId) + { + $this->set("TaskId", $taskId); + } + + /** + * TargetImageId: 目标镜像Id + * + * @return string|null + */ + public function getTargetImageId() + { + return $this->get("TargetImageId"); + } + + /** + * TargetImageId: 目标镜像Id + * + * @param string $targetImageId + */ + public function setTargetImageId($targetImageId) + { + $this->set("TargetImageId", $targetImageId); + } + + /** + * TargetRegion: 目标地域 + * + * @return string|null + */ + public function getTargetRegion() + { + return $this->get("TargetRegion"); + } + + /** + * TargetRegion: 目标地域 + * + * @param string $targetRegion + */ + public function setTargetRegion($targetRegion) + { + $this->set("TargetRegion", $targetRegion); + } +} diff --git a/src/UHost/Models/CpuPlatformStatus.php b/src/UHost/Models/CpuPlatformStatus.php new file mode 100644 index 00000000..60f2079b --- /dev/null +++ b/src/UHost/Models/CpuPlatformStatus.php @@ -0,0 +1,64 @@ +get("Name"); + } + + /** + * Name: CPU平台 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * OperationStatus: 运营Commpont Code + * + * @return string|null + */ + public function getOperationStatus() + { + return $this->get("OperationStatus"); + } + + /** + * OperationStatus: 运营Commpont Code + * + * @param string $operationStatus + */ + public function setOperationStatus($operationStatus) + { + $this->set("OperationStatus", $operationStatus); + } +} diff --git a/src/UHost/Models/CpuPlatformWithModels.php b/src/UHost/Models/CpuPlatformWithModels.php new file mode 100644 index 00000000..86b51ca1 --- /dev/null +++ b/src/UHost/Models/CpuPlatformWithModels.php @@ -0,0 +1,84 @@ +get("Name"); + } + + /** + * Name: CPU平台 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * CpuModels: CPU Model列表 + * + * @return string[]|null + */ + public function getCpuModels() + { + return $this->get("CpuModels"); + } + + /** + * CpuModels: CPU Model列表 + * + * @param string[] $cpuModels + */ + public function setCpuModels(array $cpuModels) + { + $this->set("CpuModels", $cpuModels); + } + + /** + * CpuFrequency: CPU频率 + * + * @return string|null + */ + public function getCpuFrequency() + { + return $this->get("CpuFrequency"); + } + + /** + * CpuFrequency: CPU频率 + * + * @param string $cpuFrequency + */ + public function setCpuFrequency($cpuFrequency) + { + $this->set("CpuFrequency", $cpuFrequency); + } +} diff --git a/src/UHost/Models/CpuPlatforms.php b/src/UHost/Models/CpuPlatforms.php index d59f9c2a..dd9d1532 100644 --- a/src/UHost/Models/CpuPlatforms.php +++ b/src/UHost/Models/CpuPlatforms.php @@ -1,6 +1,6 @@ set("Features", $features); } + + /** + * BackupMode: 支持的快照备份策略 + * + * @return string[]|null + */ + public function getBackupMode() + { + return $this->get("BackupMode"); + } + + /** + * BackupMode: 支持的快照备份策略 + * + * @param string[] $backupMode + */ + public function setBackupMode(array $backupMode) + { + $this->set("BackupMode", $backupMode); + } } diff --git a/src/UHost/Models/DiskFeature.php b/src/UHost/Models/DiskFeature.php new file mode 100644 index 00000000..8c54c817 --- /dev/null +++ b/src/UHost/Models/DiskFeature.php @@ -0,0 +1,76 @@ +get("Name"); + } + + /** + * Name: 特性名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Modes: 特性详情 + * + * @return NameOperationStatus[]|null + */ + public function getModes() + { + $items = $this->get("Modes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NameOperationStatus($item)); + } + return $result; + } + + /** + * Modes: 特性详情 + * + * @param NameOperationStatus[] $modes + */ + public function setModes(array $modes) + { + $result = []; + foreach ($modes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHost/Models/DiskUpgradePriceDetail.php b/src/UHost/Models/DiskUpgradePriceDetail.php new file mode 100644 index 00000000..c99f8e38 --- /dev/null +++ b/src/UHost/Models/DiskUpgradePriceDetail.php @@ -0,0 +1,64 @@ +get("UDisk"); + } + + /** + * UDisk: 磁盘的价格 + * + * @param float $uDisk + */ + public function setUDisk($uDisk) + { + $this->set("UDisk", $uDisk); + } + + /** + * Snapshot: 快照的价格 + * + * @return float|null + */ + public function getSnapshot() + { + return $this->get("Snapshot"); + } + + /** + * Snapshot: 快照的价格 + * + * @param float $snapshot + */ + public function setSnapshot($snapshot) + { + $this->set("Snapshot", $snapshot); + } +} diff --git a/src/UHost/Models/Disks.php b/src/UHost/Models/Disks.php index 5ba04a1a..5035976b 100644 --- a/src/UHost/Models/Disks.php +++ b/src/UHost/Models/Disks.php @@ -1,6 +1,6 @@ get("Name"); + } + + /** + * Name: 系统盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * InstantResize: 系统盘是否允许扩容,如果是本地盘,则不允许扩容,InstantResize为false。 + * + * @return boolean|null + */ + public function getInstantResize() + { + return $this->get("InstantResize"); + } + + /** + * InstantResize: 系统盘是否允许扩容,如果是本地盘,则不允许扩容,InstantResize为false。 + * + * @param boolean $instantResize + */ + public function setInstantResize($instantResize) + { + $this->set("InstantResize", $instantResize); + } + + /** + * MaximalSize: MaximalSize为磁盘最大值 + * + * @return integer|null + */ + public function getMaximalSize() + { + return $this->get("MaximalSize"); + } + + /** + * MaximalSize: MaximalSize为磁盘最大值 + * + * @param int $maximalSize + */ + public function setMaximalSize($maximalSize) + { + $this->set("MaximalSize", $maximalSize); + } + + /** + * Features: 磁盘可支持的服务 + * + * @return DiskFeature[]|null + */ + public function getFeatures() + { + $items = $this->get("Features"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new DiskFeature($item)); + } + return $result; + } + + /** + * Features: 磁盘可支持的服务 + * + * @param DiskFeature[] $features + */ + public function setFeatures(array $features) + { + $result = []; + foreach ($features as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHost/Models/FamiliesDataDiskInfo.php b/src/UHost/Models/FamiliesDataDiskInfo.php new file mode 100644 index 00000000..630b5847 --- /dev/null +++ b/src/UHost/Models/FamiliesDataDiskInfo.php @@ -0,0 +1,116 @@ +get("MinimalSize"); + } + + /** + * MinimalSize: 磁盘最小值,如果没有该字段,最小值取基础镜像Size值即可(linux为20G,windows为40G)。 + * + * @param int $minimalSize + */ + public function setMinimalSize($minimalSize) + { + $this->set("MinimalSize", $minimalSize); + } + + /** + * Name: 数据盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 数据盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * MaximalSize: MaximalSize为磁盘最大值 + * + * @return integer|null + */ + public function getMaximalSize() + { + return $this->get("MaximalSize"); + } + + /** + * MaximalSize: MaximalSize为磁盘最大值 + * + * @param int $maximalSize + */ + public function setMaximalSize($maximalSize) + { + $this->set("MaximalSize", $maximalSize); + } + + /** + * Features: 数据盘可支持的服务 + * + * @return DiskFeature[]|null + */ + public function getFeatures() + { + $items = $this->get("Features"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new DiskFeature($item)); + } + return $result; + } + + /** + * Features: 数据盘可支持的服务 + * + * @param DiskFeature[] $features + */ + public function setFeatures(array $features) + { + $result = []; + foreach ($features as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHost/Models/FamiliesDisks.php b/src/UHost/Models/FamiliesDisks.php new file mode 100644 index 00000000..bbe8bd04 --- /dev/null +++ b/src/UHost/Models/FamiliesDisks.php @@ -0,0 +1,128 @@ +get("Name"); + } + + /** + * Name: 磁盘介质类别信息,磁盘主要分类如下:云盘|cloudDisk、普通本地盘|normalLocalDisk和SSD本地盘|ssdLocalDisk。 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * BootDisk: 系统盘信息 + * + * @return FamiliesBootDiskInfo[]|null + */ + public function getBootDisk() + { + $items = $this->get("BootDisk"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new FamiliesBootDiskInfo($item)); + } + return $result; + } + + /** + * BootDisk: 系统盘信息 + * + * @param FamiliesBootDiskInfo[] $bootDisk + */ + public function setBootDisk(array $bootDisk) + { + $result = []; + foreach ($bootDisk as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DataDisk: 数据盘信息 + * + * @return FamiliesDataDiskInfo[]|null + */ + public function getDataDisk() + { + $items = $this->get("DataDisk"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new FamiliesDataDiskInfo($item)); + } + return $result; + } + + /** + * DataDisk: 数据盘信息 + * + * @param FamiliesDataDiskInfo[] $dataDisk + */ + public function setDataDisk(array $dataDisk) + { + $result = []; + foreach ($dataDisk as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * OperationStatus: 权限位 + * + * @return string|null + */ + public function getOperationStatus() + { + return $this->get("OperationStatus"); + } + + /** + * OperationStatus: 权限位 + * + * @param string $operationStatus + */ + public function setOperationStatus($operationStatus) + { + $this->set("OperationStatus", $operationStatus); + } +} diff --git a/src/UHost/Models/FamiliesGpuType.php b/src/UHost/Models/FamiliesGpuType.php new file mode 100644 index 00000000..766ec7b1 --- /dev/null +++ b/src/UHost/Models/FamiliesGpuType.php @@ -0,0 +1,84 @@ +get("Name"); + } + + /** + * Name: 机型名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * GraphicsMemory: 显存信息 + * + * @return GraphicsMemory|null + */ + public function getGraphicsMemory() + { + return new GraphicsMemory($this->get("GraphicsMemory")); + } + + /** + * GraphicsMemory: 显存信息 + * + * @param GraphicsMemory $graphicsMemory + */ + public function setGraphicsMemory(array $graphicsMemory) + { + $this->set("GraphicsMemory", $graphicsMemory->getAll()); + } + + /** + * Performance: 性能信息 + * + * @return Performance|null + */ + public function getPerformance() + { + return new Performance($this->get("Performance")); + } + + /** + * Performance: 性能信息 + * + * @param Performance $performance + */ + public function setPerformance(array $performance) + { + $this->set("Performance", $performance->getAll()); + } +} diff --git a/src/UHost/Models/FeatureModes.php b/src/UHost/Models/FeatureModes.php index 6e01e011..36b38c46 100644 --- a/src/UHost/Models/FeatureModes.php +++ b/src/UHost/Models/FeatureModes.php @@ -1,6 +1,6 @@ get("Value"); + } + + /** + * Value: 值 + * + * @param float $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UHost/Models/GraphicsMemory.php b/src/UHost/Models/GraphicsMemory.php index e5008af0..bae6f9aa 100644 --- a/src/UHost/Models/GraphicsMemory.php +++ b/src/UHost/Models/GraphicsMemory.php @@ -1,6 +1,6 @@ get("Name"); + } + + /** + * Name: 机型名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Description: 机型中文名称 + * + * @return string|null + */ + public function getDescription() + { + return $this->get("Description"); + } + + /** + * Description: 机型中文名称 + * + * @param string $description + */ + public function setDescription($description) + { + $this->set("Description", $description); + } + + /** + * OperationStatus: 机型ComponentCode + * + * @return string|null + */ + public function getOperationStatus() + { + return $this->get("OperationStatus"); + } + + /** + * OperationStatus: 机型ComponentCode + * + * @param string $operationStatus + */ + public function setOperationStatus($operationStatus) + { + $this->set("OperationStatus", $operationStatus); + } + + /** + * CpuPlatforms: CPU平台列表 + * + * @return CpuPlatformStatus[]|null + */ + public function getCpuPlatforms() + { + $items = $this->get("CpuPlatforms"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CpuPlatformStatus($item)); + } + return $result; + } + + /** + * CpuPlatforms: CPU平台列表 + * + * @param CpuPlatformStatus[] $cpuPlatforms + */ + public function setCpuPlatforms(array $cpuPlatforms) + { + $result = []; + foreach ($cpuPlatforms as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Disks: 磁盘信息 + * + * @return FamiliesDisks[]|null + */ + public function getDisks() + { + $items = $this->get("Disks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new FamiliesDisks($item)); + } + return $result; + } + + /** + * Disks: 磁盘信息 + * + * @param FamiliesDisks[] $disks + */ + public function setDisks(array $disks) + { + $result = []; + foreach ($disks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * MachineSizes: 规格信息 + * + * @return MachineSizes[]|null + */ + public function getMachineSizes() + { + $items = $this->get("MachineSizes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MachineSizes($item)); + } + return $result; + } + + /** + * MachineSizes: 规格信息 + * + * @param MachineSizes[] $machineSizes + */ + public function setMachineSizes(array $machineSizes) + { + $result = []; + foreach ($machineSizes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Features: 特性信息 + * + * @return Features[]|null + */ + public function getFeatures() + { + $items = $this->get("Features"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Features($item)); + } + return $result; + } + + /** + * Features: 特性信息 + * + * @param Features[] $features + */ + public function setFeatures(array $features) + { + $result = []; + foreach ($features as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ParentType: 父类型。如GPU机型的父类型为"G" + * + * @return string|null + */ + public function getParentType() + { + return $this->get("ParentType"); + } + + /** + * ParentType: 父类型。如GPU机型的父类型为"G" + * + * @param string $parentType + */ + public function setParentType($parentType) + { + $this->set("ParentType", $parentType); + } + + /** + * GpuType: GPU信息 + * + * @return FamiliesGpuType|null + */ + public function getGpuType() + { + return new FamiliesGpuType($this->get("GpuType")); + } + + /** + * GpuType: GPU信息 + * + * @param FamiliesGpuType $gpuType + */ + public function setGpuType(array $gpuType) + { + $this->set("GpuType", $gpuType->getAll()); + } + + /** + * SceneCategories: 场景分类 + * + * @return string[]|null + */ + public function getSceneCategories() + { + return $this->get("SceneCategories"); + } + + /** + * SceneCategories: 场景分类 + * + * @param string[] $sceneCategories + */ + public function setSceneCategories(array $sceneCategories) + { + $this->set("SceneCategories", $sceneCategories); + } + + /** + * GpuSeries: GPU系列 + * + * @return string|null + */ + public function getGpuSeries() + { + return $this->get("GpuSeries"); + } + + /** + * GpuSeries: GPU系列 + * + * @param string $gpuSeries + */ + public function setGpuSeries($gpuSeries) + { + $this->set("GpuSeries", $gpuSeries); + } + + /** + * UHostFamilies: 规格族信息 + * + * @return UHostFamily[]|null + */ + public function getUHostFamilies() + { + $items = $this->get("UHostFamilies"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UHostFamily($item)); + } + return $result; + } + + /** + * UHostFamilies: 规格族信息 + * + * @param UHostFamily[] $uHostFamilies + */ + public function setUHostFamilies(array $uHostFamilies) + { + $result = []; + foreach ($uHostFamilies as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Virtual: 是否为非真实机型 + * + * @return boolean|null + */ + public function getVirtual() + { + return $this->get("Virtual"); + } + + /** + * Virtual: 是否为非真实机型 + * + * @param boolean $virtual + */ + public function setVirtual($virtual) + { + $this->set("Virtual", $virtual); + } + + /** + * ProType: 仅OPROG\OPRO机型返回 + * + * @return NameFrequency|null + */ + public function getProType() + { + return new NameFrequency($this->get("ProType")); + } + + /** + * ProType: 仅OPROG\OPRO机型返回 + * + * @param NameFrequency $proType + */ + public function setProType(array $proType) + { + $this->set("ProType", $proType->getAll()); + } +} diff --git a/src/UHost/Models/NameFrequency.php b/src/UHost/Models/NameFrequency.php new file mode 100644 index 00000000..d51e540c --- /dev/null +++ b/src/UHost/Models/NameFrequency.php @@ -0,0 +1,64 @@ +get("Name"); + } + + /** + * Name: 机型名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Frequency: 频率 + * + * @return Frequency|null + */ + public function getFrequency() + { + return new Frequency($this->get("Frequency")); + } + + /** + * Frequency: 频率 + * + * @param Frequency $frequency + */ + public function setFrequency(array $frequency) + { + $this->set("Frequency", $frequency->getAll()); + } +} diff --git a/src/UHost/Models/NameOperationStatus.php b/src/UHost/Models/NameOperationStatus.php new file mode 100644 index 00000000..25a92cb4 --- /dev/null +++ b/src/UHost/Models/NameOperationStatus.php @@ -0,0 +1,64 @@ +get("Name"); + } + + /** + * Name: 名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * OperationStatus: 标记 + * + * @return string|null + */ + public function getOperationStatus() + { + return $this->get("OperationStatus"); + } + + /** + * OperationStatus: 标记 + * + * @param string $operationStatus + */ + public function setOperationStatus($operationStatus) + { + $this->set("OperationStatus", $operationStatus); + } +} diff --git a/src/UHost/Models/Performance.php b/src/UHost/Models/Performance.php index d3156c38..f6bc3e19 100644 --- a/src/UHost/Models/Performance.php +++ b/src/UHost/Models/Performance.php @@ -1,6 +1,6 @@ get("UHost"); + } + + /** + * UHost: 主机价格 + * + * @param float $uHost + */ + public function setUHost($uHost) + { + $this->set("UHost", $uHost); + } + + /** + * UDisk: 云盘价格 + * + * @return float|null + */ + public function getUDisk() + { + return $this->get("UDisk"); + } + + /** + * UDisk: 云盘价格 + * + * @param float $uDisk + */ + public function setUDisk($uDisk) + { + $this->set("UDisk", $uDisk); + } + + /** + * Snapshot: 快照价格 + * + * @return float|null + */ + public function getSnapshot() + { + return $this->get("Snapshot"); + } + + /** + * Snapshot: 快照价格 + * + * @param float $snapshot + */ + public function setSnapshot($snapshot) + { + $this->set("Snapshot", $snapshot); + } + + /** + * Volume: 数据卷价格 + * + * @return float|null + */ + public function getVolume() + { + return $this->get("Volume"); + } + + /** + * Volume: 数据卷价格 + * + * @param float $volume + */ + public function setVolume($volume) + { + $this->set("Volume", $volume); + } +} diff --git a/src/UHost/Models/SpotAttribute.php b/src/UHost/Models/SpotAttribute.php new file mode 100644 index 00000000..a60c490c --- /dev/null +++ b/src/UHost/Models/SpotAttribute.php @@ -0,0 +1,44 @@ +get("RecycleTime"); + } + + /** + * RecycleTime: 回收时间 + * + * @param int $recycleTime + */ + public function setRecycleTime($recycleTime) + { + $this->set("RecycleTime", $recycleTime); + } +} diff --git a/src/UHost/Models/SpreadInfo.php b/src/UHost/Models/SpreadInfo.php index 32ba4e39..2a38f11a 100644 --- a/src/UHost/Models/SpreadInfo.php +++ b/src/UHost/Models/SpreadInfo.php @@ -1,6 +1,6 @@ get("UDHostId"); + } + + /** + * UDHostId: 私有专区宿主机 + * + * @param string $udHostId + */ + public function setUDHostId($udHostId) + { + $this->set("UDHostId", $udHostId); + } + + /** + * UDSetId: 私有专区 + * + * @return string|null + */ + public function getUDSetId() + { + return $this->get("UDSetId"); + } + + /** + * UDSetId: 私有专区 + * + * @param string $udSetId + */ + public function setUDSetId($udSetId) + { + $this->set("UDSetId", $udSetId); + } + + /** + * HostBinding: 是否绑定私有专区宿主机 + * + * @return boolean|null + */ + public function getHostBinding() + { + return $this->get("HostBinding"); + } + + /** + * HostBinding: 是否绑定私有专区宿主机 + * + * @param boolean $hostBinding + */ + public function setHostBinding($hostBinding) + { + $this->set("HostBinding", $hostBinding); + } +} diff --git a/src/UHost/Models/UHostDiskSet.php b/src/UHost/Models/UHostDiskSet.php index 8ff0cf6c..78e57553 100644 --- a/src/UHost/Models/UHostDiskSet.php +++ b/src/UHost/Models/UHostDiskSet.php @@ -1,6 +1,6 @@ get("Name"); + } + + /** + * Name: 规格族 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * CpuFrequency: CPU频率信息 + * + * @return string|null + */ + public function getCpuFrequency() + { + return $this->get("CpuFrequency"); + } + + /** + * CpuFrequency: CPU频率信息 + * + * @param string $cpuFrequency + */ + public function setCpuFrequency($cpuFrequency) + { + $this->set("CpuFrequency", $cpuFrequency); + } + + /** + * CpuPlatforms: CPU平台信息 + * + * @return CpuPlatformWithModels[]|null + */ + public function getCpuPlatforms() + { + $items = $this->get("CpuPlatforms"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CpuPlatformWithModels($item)); + } + return $result; + } + + /** + * CpuPlatforms: CPU平台信息 + * + * @param CpuPlatformWithModels[] $cpuPlatforms + */ + public function setCpuPlatforms(array $cpuPlatforms) + { + $result = []; + foreach ($cpuPlatforms as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHost/Models/UHostIPSet.php b/src/UHost/Models/UHostIPSet.php index 2936c2fb..7bf42411 100644 --- a/src/UHost/Models/UHostIPSet.php +++ b/src/UHost/Models/UHostIPSet.php @@ -1,6 +1,6 @@ set("ImageName", $imageName); } + /** + * 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 * @@ -143,7 +163,7 @@ public function setImageType($imageType) } /** - * Features: 特殊状态标识, 目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra](网络增强2.0), HotPlug(热升级), CloudInit, IPv6 + * 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 */ @@ -153,7 +173,7 @@ public function getFeatures() } /** - * Features: 特殊状态标识, 目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra](网络增强2.0), HotPlug(热升级), CloudInit, IPv6 + * 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 */ @@ -163,7 +183,7 @@ public function setFeatures(array $features) } /** - * FuncType: 行业镜像类型(仅行业镜像将返回这个值) + * FuncType: 镜像归属,枚举值:["gpu","app","uhost"]。"gpu": 对gpu进行处理过的行业镜像;"app":轻量云主机专用的镜像;"uhost":云主机镜像市场的行业镜像 * * @return string|null */ @@ -173,7 +193,7 @@ public function getFuncType() } /** - * FuncType: 行业镜像类型(仅行业镜像将返回这个值) + * FuncType: 镜像归属,枚举值:["gpu","app","uhost"]。"gpu": 对gpu进行处理过的行业镜像;"app":轻量云主机专用的镜像;"uhost":云主机镜像市场的行业镜像 * * @param string $funcType */ @@ -243,7 +263,7 @@ public function setLinks($links) } /** - * State: 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable + * State: 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable,复制中:Copying * * @return string|null */ @@ -253,7 +273,7 @@ public function getState() } /** - * State: 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable + * State: 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable,复制中:Copying * * @param string $state */ @@ -341,4 +361,136 @@ 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); + } + + /** + * DataSnapshotIds: 关联的云盘数据盘快照Id列表 + * + * @return string[]|null + */ + public function getDataSnapshotIds() + { + return $this->get("DataSnapshotIds"); + } + + /** + * DataSnapshotIds: 关联的云盘数据盘快照Id列表 + * + * @param string[] $dataSnapshotIds + */ + public function setDataSnapshotIds(array $dataSnapshotIds) + { + $this->set("DataSnapshotIds", $dataSnapshotIds); + } + + /** + * SupportedGPUTypes: 支持的GPU机型 + * + * @return string[]|null + */ + public function getSupportedGPUTypes() + { + return $this->get("SupportedGPUTypes"); + } + + /** + * SupportedGPUTypes: 支持的GPU机型 + * + * @param string[] $supportedGPUTypes + */ + public function setSupportedGPUTypes(array $supportedGPUTypes) + { + $this->set("SupportedGPUTypes", $supportedGPUTypes); + } + + /** + * 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); + } + + /** + * PrimarySoftware: 主要安装软件 + * + * @return string|null + */ + public function getPrimarySoftware() + { + return $this->get("PrimarySoftware"); + } + + /** + * PrimarySoftware: 主要安装软件 + * + * @param string $primarySoftware + */ + public function setPrimarySoftware($primarySoftware) + { + $this->set("PrimarySoftware", $primarySoftware); + } + + /** + * PriceSet: 镜像的价格信息 + * + * @return BasePriceSet[]|null + */ + public function getPriceSet() + { + $items = $this->get("PriceSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BasePriceSet($item)); + } + return $result; + } + + /** + * PriceSet: 镜像的价格信息 + * + * @param BasePriceSet[] $priceSet + */ + public function setPriceSet(array $priceSet) + { + $result = []; + foreach ($priceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } } diff --git a/src/UHost/Models/UHostInstanceSet.php b/src/UHost/Models/UHostInstanceSet.php index e8e2b70f..1c6aa806 100644 --- a/src/UHost/Models/UHostInstanceSet.php +++ b/src/UHost/Models/UHostInstanceSet.php @@ -1,6 +1,6 @@ set("Zone", $zone); } - /** - * IPv6Feature: true:有ipv6特性;false,没有ipv6特性 - * - * @return boolean|null - */ - public function getIPv6Feature() - { - return $this->get("IPv6Feature"); - } - - /** - * IPv6Feature: true:有ipv6特性;false,没有ipv6特性 - * - * @param boolean $iPv6Feature - */ - public function setIPv6Feature($iPv6Feature) - { - $this->set("IPv6Feature", $iPv6Feature); - } - /** * UHostId: UHost实例ID * @@ -142,6 +122,26 @@ public function setCpuPlatform($cpuPlatform) $this->set("CpuPlatform", $cpuPlatform); } + /** + * UHostFamily: 规格族。 由机型代号和 CPU 平台组成,用于指定云主机的硬件类型与处理器平台。 当 MachineType 为 "O"(快杰型)时,支持以下取值: - o1i:快杰型 O1 代,Intel 平台 - o1a:快杰型 O1 代,AMD 平台 - o1r:快杰型 O1 代,ARM 平台 - o2i:快杰型 O2 代,Intel 平台 默认值:o1i 或 o1a或o1r(系统将根据资源情况自动选择) 当 MachineType 为 "OM"(快杰共享型)时,支持以下取值: - om1i:快杰内存增强型 OM1 代,Intel 平台 - om2i:快杰内存增强型 OM2 代,Intel 平台 + * + * @return string|null + */ + public function getUHostFamily() + { + return $this->get("UHostFamily"); + } + + /** + * UHostFamily: 规格族。 由机型代号和 CPU 平台组成,用于指定云主机的硬件类型与处理器平台。 当 MachineType 为 "O"(快杰型)时,支持以下取值: - o1i:快杰型 O1 代,Intel 平台 - o1a:快杰型 O1 代,AMD 平台 - o1r:快杰型 O1 代,ARM 平台 - o2i:快杰型 O2 代,Intel 平台 默认值:o1i 或 o1a或o1r(系统将根据资源情况自动选择) 当 MachineType 为 "OM"(快杰共享型)时,支持以下取值: - om1i:快杰内存增强型 OM1 代,Intel 平台 - om2i:快杰内存增强型 OM2 代,Intel 平台 + * + * @param string $uHostFamily + */ + public function setUHostFamily($uHostFamily) + { + $this->set("UHostFamily", $uHostFamily); + } + /** * StorageType: 【建议不再使用】主机磁盘类型。 枚举值为:\\ > LocalDisk,本地磁盘; \\ > UDisk 云盘。\\只要有一块磁盘为本地盘,即返回LocalDisk。 * @@ -546,26 +546,6 @@ public function setTimemachineFeature($timemachineFeature) $this->set("TimemachineFeature", $timemachineFeature); } - /** - * HotplugFeature: true: 开启热升级; false,未开启热升级 - * - * @return boolean|null - */ - public function getHotplugFeature() - { - return $this->get("HotplugFeature"); - } - - /** - * HotplugFeature: true: 开启热升级; false,未开启热升级 - * - * @param boolean $hotplugFeature - */ - public function setHotplugFeature($hotplugFeature) - { - $this->set("HotplugFeature", $hotplugFeature); - } - /** * SubnetType: 【建议不再使用】仅北京A的云主机会返回此字段。基础网络模式:Default;子网模式:Private * @@ -686,6 +666,46 @@ public function setGPU($gpu) $this->set("GPU", $gpu); } + /** + * GpuType: GPU类型;枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S",2080","2080TiS","2080TiPro","3090","4090","4090Pro","A100","A800","H20"] + * + * @return string|null + */ + public function getGpuType() + { + return $this->get("GpuType"); + } + + /** + * GpuType: GPU类型;枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S",2080","2080TiS","2080TiPro","3090","4090","4090Pro","A100","A800","H20"] + * + * @param string $gpuType + */ + public function setGpuType($gpuType) + { + $this->set("GpuType", $gpuType); + } + + /** + * HotPlugMaxCpu: 热升级支持的最大CPU个数 + * + * @return integer|null + */ + public function getHotPlugMaxCpu() + { + return $this->get("HotPlugMaxCpu"); + } + + /** + * HotPlugMaxCpu: 热升级支持的最大CPU个数 + * + * @param int $hotPlugMaxCpu + */ + public function setHotPlugMaxCpu($hotPlugMaxCpu) + { + $this->set("HotPlugMaxCpu", $hotPlugMaxCpu); + } + /** * BootDiskState: 系统盘状态 Normal表示初始化完成;Initializing表示在初始化。仍在初始化的系统盘无法制作镜像。 * @@ -746,26 +766,6 @@ public function setIsolationGroup($isolationGroup) $this->set("IsolationGroup", $isolationGroup); } - /** - * CloudInitFeature: true,支持cloutinit方式初始化;false,不支持 - * - * @return boolean|null - */ - public function getCloudInitFeature() - { - return $this->get("CloudInitFeature"); - } - - /** - * CloudInitFeature: true,支持cloutinit方式初始化;false,不支持 - * - * @param boolean $cloudInitFeature - */ - public function setCloudInitFeature($cloudInitFeature) - { - $this->set("CloudInitFeature", $cloudInitFeature); - } - /** * RdmaClusterId: RDMA集群id,仅快杰云主机返回该值;其他类型云主机返回""。当云主机的此值与RSSD云盘的RdmaClusterId相同时,RSSD可以挂载到这台云主机。 * @@ -806,6 +806,66 @@ public function setRestrictMode($restrictMode) $this->set("RestrictMode", $restrictMode); } + /** + * HotplugFeature: true: 开启热升级; false,未开启热升级 + * + * @return boolean|null + */ + public function getHotplugFeature() + { + return $this->get("HotplugFeature"); + } + + /** + * HotplugFeature: true: 开启热升级; false,未开启热升级 + * + * @param boolean $hotplugFeature + */ + public function setHotplugFeature($hotplugFeature) + { + $this->set("HotplugFeature", $hotplugFeature); + } + + /** + * CloudInitFeature: true: 支持cloutinit方式初始化;false: 不支持 + * + * @return boolean|null + */ + public function getCloudInitFeature() + { + return $this->get("CloudInitFeature"); + } + + /** + * CloudInitFeature: true: 支持cloutinit方式初始化;false: 不支持 + * + * @param boolean $cloudInitFeature + */ + public function setCloudInitFeature($cloudInitFeature) + { + $this->set("CloudInitFeature", $cloudInitFeature); + } + + /** + * IPv6Feature: true: 有ipv6特性;false,没有ipv6特性 + * + * @return boolean|null + */ + public function getIPv6Feature() + { + return $this->get("IPv6Feature"); + } + + /** + * IPv6Feature: true: 有ipv6特性;false,没有ipv6特性 + * + * @param boolean $iPv6Feature + */ + public function setIPv6Feature($iPv6Feature) + { + $this->set("IPv6Feature", $iPv6Feature); + } + /** * HpcFeature: true: 开启 hpc 系列功能;false: 未开启 * @@ -826,6 +886,86 @@ public function setHpcFeature($hpcFeature) $this->set("HpcFeature", $hpcFeature); } + /** + * EpcInstance: true: 高性能计算主机;false: 不是 + * + * @return boolean|null + */ + public function getEpcInstance() + { + return $this->get("EpcInstance"); + } + + /** + * EpcInstance: true: 高性能计算主机;false: 不是 + * + * @param boolean $epcInstance + */ + public function setEpcInstance($epcInstance) + { + $this->set("EpcInstance", $epcInstance); + } + + /** + * SecGroupInstance: 【待废弃】true: 绑定了安全组的主机;false: 不是 + * + * @return boolean|null + */ + public function getSecGroupInstance() + { + return $this->get("SecGroupInstance"); + } + + /** + * SecGroupInstance: 【待废弃】true: 绑定了安全组的主机;false: 不是 + * + * @param boolean $secGroupInstance + */ + public function setSecGroupInstance($secGroupInstance) + { + $this->set("SecGroupInstance", $secGroupInstance); + } + + /** + * NetFeatureTag: Firewall:防火墙,SecGroup:安全组,Acl:acl + * + * @return string|null + */ + public function getNetFeatureTag() + { + return $this->get("NetFeatureTag"); + } + + /** + * NetFeatureTag: Firewall:防火墙,SecGroup:安全组,Acl:acl + * + * @param string $netFeatureTag + */ + public function setNetFeatureTag($netFeatureTag) + { + $this->set("NetFeatureTag", $netFeatureTag); + } + + /** + * HiddenKvm: true: 开启 hidden kvm 功能;false: 不是 + * + * @return boolean|null + */ + public function getHiddenKvm() + { + return $this->get("HiddenKvm"); + } + + /** + * HiddenKvm: true: 开启 hidden kvm 功能;false: 不是 + * + * @param boolean $hiddenKvm + */ + public function setHiddenKvm($hiddenKvm) + { + $this->set("HiddenKvm", $hiddenKvm); + } + /** * KeyPair: 密钥信息见 UHostKeyPair * @@ -845,4 +985,44 @@ public function setKeyPair(array $keyPair) { $this->set("KeyPair", $keyPair->getAll()); } + + /** + * UDHostAttribute: 私有专区宿主机属性 + * + * @return UDSetUDHostAttribute|null + */ + public function getUDHostAttribute() + { + return new UDSetUDHostAttribute($this->get("UDHostAttribute")); + } + + /** + * UDHostAttribute: 私有专区宿主机属性 + * + * @param UDSetUDHostAttribute $udHostAttribute + */ + public function setUDHostAttribute(array $udHostAttribute) + { + $this->set("UDHostAttribute", $udHostAttribute->getAll()); + } + + /** + * SpotAttribute: 竞价实例信息 + * + * @return SpotAttribute|null + */ + public function getSpotAttribute() + { + return new SpotAttribute($this->get("SpotAttribute")); + } + + /** + * SpotAttribute: 竞价实例信息 + * + * @param SpotAttribute $spotAttribute + */ + public function setSpotAttribute(array $spotAttribute) + { + $this->set("SpotAttribute", $spotAttribute->getAll()); + } } diff --git a/src/UHost/Models/UHostKeyPair.php b/src/UHost/Models/UHostKeyPair.php index ea36f5ff..de5aacdf 100644 --- a/src/UHost/Models/UHostKeyPair.php +++ b/src/UHost/Models/UHostKeyPair.php @@ -1,6 +1,6 @@ get("PriceDetail")); + } + + /** + * PriceDetail: 价格详细信息(只有询价接口返回)。 + * + * @param PriceDetail $priceDetail + */ + public function setPriceDetail(array $priceDetail) + { + $this->set("PriceDetail", $priceDetail->getAll()); + } + + /** + * OriginalPriceDetail: 原价详细信息(只有询价接口返回)。 + * + * @return PriceDetail|null */ - public function getListPrice() + public function getOriginalPriceDetail() { - return $this->get("ListPrice"); + return new PriceDetail($this->get("OriginalPriceDetail")); } /** - * ListPrice: 产品列表价。 + * OriginalPriceDetail: 原价详细信息(只有询价接口返回)。 * - * @param float $listPrice + * @param PriceDetail $originalPriceDetail */ - public function setListPrice($listPrice) + public function setOriginalPriceDetail(array $originalPriceDetail) { - $this->set("ListPrice", $listPrice); + $this->set("OriginalPriceDetail", $originalPriceDetail->getAll()); } } diff --git a/src/UHost/Models/UHostRefundPriceSet.php b/src/UHost/Models/UHostRefundPriceSet.php new file mode 100644 index 00000000..f8684506 --- /dev/null +++ b/src/UHost/Models/UHostRefundPriceSet.php @@ -0,0 +1,84 @@ +get("UHostId"); + } + + /** + * UHostId: UHost实例ID + * + * @param string $uHostId + */ + public function setUHostId($uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * Code: 实例操作结果的错误码。0为成功 + * + * @return integer|null + */ + public function getCode() + { + return $this->get("Code"); + } + + /** + * Code: 实例操作结果的错误码。0为成功 + * + * @param int $code + */ + public function setCode($code) + { + $this->set("Code", $code); + } + + /** + * RefundPrice: 实例的删除退费金额 + * + * @return float|null + */ + public function getRefundPrice() + { + return $this->get("RefundPrice"); + } + + /** + * RefundPrice: 实例的删除退费金额 + * + * @param float $refundPrice + */ + public function setRefundPrice($refundPrice) + { + $this->set("RefundPrice", $refundPrice); + } +} diff --git a/src/UHost/Models/UHostTagSet.php b/src/UHost/Models/UHostTagSet.php index 884e27ed..29ee3be8 100644 --- a/src/UHost/Models/UHostTagSet.php +++ b/src/UHost/Models/UHostTagSet.php @@ -1,6 +1,6 @@ True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * + * @return string|null + */ + public function getIsBoot() + { + return $this->get("IsBoot"); + } + + /** + * IsBoot: 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * + * @param string $isBoot + */ + public function setIsBoot($isBoot) + { + $this->set("IsBoot", $isBoot); + } + + /** + * Type: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Size: 磁盘大小,单位GB。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @return integer|null + */ + public function getSize() + { + return $this->get("Size"); + } + + /** + * Size: 磁盘大小,单位GB。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @param int $size + */ + public function setSize($size) + { + $this->set("Size", $size); + } + + /** + * BackupType: 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT,快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE + * + * @return string|null + */ + public function getBackupType() + { + return $this->get("BackupType"); + } + + /** + * BackupType: 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT,快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE + * + * @param string $backupType + */ + public function setBackupType($backupType) + { + $this->set("BackupType", $backupType); + } + + /** + * 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); + } + + /** + * BackupMode: 指定快照备份策略。当Disks.N.BackupType为"SNAPSHOT"时此参数生效。枚举值:"Lite":轻量版,"Base":基础版,"Ultimate":旗舰版,"Custom":自定义备份链;默认值:"Base" + * + * @return string|null + */ + public function getBackupMode() + { + return $this->get("BackupMode"); + } + + /** + * BackupMode: 指定快照备份策略。当Disks.N.BackupType为"SNAPSHOT"时此参数生效。枚举值:"Lite":轻量版,"Base":基础版,"Ultimate":旗舰版,"Custom":自定义备份链;默认值:"Base" + * + * @param string $backupMode + */ + public function setBackupMode($backupMode) + { + $this->set("BackupMode", $backupMode); + } + + /** + * CustomBackup: + * + * @return CheckUHostResourceCapacityParamDisksCustomBackup|null + */ + public function getCustomBackup() + { + return new CheckUHostResourceCapacityParamDisksCustomBackup($this->get("CustomBackup")); + } + + /** + * CustomBackup: + * + * @param CheckUHostResourceCapacityParamDisksCustomBackup $customBackup + */ + public function setCustomBackup(array $customBackup) + { + $this->set("CustomBackup", $customBackup->getAll()); + } + + /** + * SnapshotId: 从快照创建盘时所用快照id,目前仅支持数据盘 + * + * @return string|null + */ + public function getSnapshotId() + { + return $this->get("SnapshotId"); + } + + /** + * SnapshotId: 从快照创建盘时所用快照id,目前仅支持数据盘 + * + * @param string $snapshotId + */ + public function setSnapshotId($snapshotId) + { + $this->set("SnapshotId", $snapshotId); + } +} diff --git a/src/UHost/Params/CheckUHostResourceCapacityParamDisksCustomBackup.php b/src/UHost/Params/CheckUHostResourceCapacityParamDisksCustomBackup.php new file mode 100644 index 00000000..317657df --- /dev/null +++ b/src/UHost/Params/CheckUHostResourceCapacityParamDisksCustomBackup.php @@ -0,0 +1,84 @@ +get("Journal"); + } + + /** + * Journal: Disks.N.BackupMode为"Custom"时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48。 + * + * @param string $journal + */ + public function setJournal($journal) + { + $this->set("Journal", $journal); + } + + /** + * Hour: Disks.N.BackupMode为"Custom"时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96。 + * + * @return string|null + */ + public function getHour() + { + return $this->get("Hour"); + } + + /** + * Hour: Disks.N.BackupMode为"Custom"时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96。 + * + * @param string $hour + */ + public function setHour($hour) + { + $this->set("Hour", $hour); + } + + /** + * Day: Disks.N.BackupMode为"Custom"时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30。 + * + * @return string|null + */ + public function getDay() + { + return $this->get("Day"); + } + + /** + * Day: Disks.N.BackupMode为"Custom"时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30。 + * + * @param string $day + */ + public function setDay($day) + { + $this->set("Day", $day); + } +} diff --git a/src/UHost/Params/CheckUHostResourceCapacityParamFeatures.php b/src/UHost/Params/CheckUHostResourceCapacityParamFeatures.php new file mode 100644 index 00000000..2582a6f7 --- /dev/null +++ b/src/UHost/Params/CheckUHostResourceCapacityParamFeatures.php @@ -0,0 +1,44 @@ +get("UNI"); + } + + /** + * UNI: 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启,仅与 NetCapability Normal 兼容。 + * + * @param boolean $uni + */ + public function setUNI($uni) + { + $this->set("UNI", $uni); + } +} diff --git a/src/UHost/Params/CreateUHostInstanceParamDisks.php b/src/UHost/Params/CreateUHostInstanceParamDisks.php index 8878a61f..a838f7f5 100644 --- a/src/UHost/Params/CreateUHostInstanceParamDisks.php +++ b/src/UHost/Params/CreateUHostInstanceParamDisks.php @@ -1,6 +1,6 @@ NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT,快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE + * BackupType: 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > SNAPSHOT,快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE * * @return string|null */ @@ -93,7 +93,7 @@ public function getBackupType() } /** - * BackupType: 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT,快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE + * BackupType: 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > SNAPSHOT,快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE * * @param string $backupType */ @@ -162,6 +162,26 @@ public function setCouponId($couponId) $this->set("CouponId", $couponId); } + /** + * BackupMode: 指定快照备份策略。当Disks.N.BackupType为"SNAPSHOT"时此参数生效。枚举值:"Base":标准版,"Ultimate":旗舰版,"Custom":自定义备份链;默认值:"Base"。 + * + * @return string|null + */ + public function getBackupMode() + { + return $this->get("BackupMode"); + } + + /** + * BackupMode: 指定快照备份策略。当Disks.N.BackupType为"SNAPSHOT"时此参数生效。枚举值:"Base":标准版,"Ultimate":旗舰版,"Custom":自定义备份链;默认值:"Base"。 + * + * @param string $backupMode + */ + public function setBackupMode($backupMode) + { + $this->set("BackupMode", $backupMode); + } + /** * CustomBackup: * @@ -181,4 +201,24 @@ public function setCustomBackup(array $customBackup) { $this->set("CustomBackup", $customBackup->getAll()); } + + /** + * SnapshotId: 从快照创建盘时所用快照id,目前仅支持数据盘 + * + * @return string|null + */ + public function getSnapshotId() + { + return $this->get("SnapshotId"); + } + + /** + * SnapshotId: 从快照创建盘时所用快照id,目前仅支持数据盘 + * + * @param string $snapshotId + */ + public function setSnapshotId($snapshotId) + { + $this->set("SnapshotId", $snapshotId); + } } diff --git a/src/UHost/Params/CreateUHostInstanceParamDisksCustomBackup.php b/src/UHost/Params/CreateUHostInstanceParamDisksCustomBackup.php index 5c56ef3f..869e4f5b 100644 --- a/src/UHost/Params/CreateUHostInstanceParamDisksCustomBackup.php +++ b/src/UHost/Params/CreateUHostInstanceParamDisksCustomBackup.php @@ -1,6 +1,6 @@ get("Journal"); + } + /** + * Journal: Disks.N.BackupMode为"Custom"时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48。 + * + * @param string $journal + */ + public function setJournal($journal) + { + $this->set("Journal", $journal); + } + + /** + * Hour: Disks.N.BackupMode为"Custom"时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96。 + * + * @return string|null + */ + public function getHour() + { + return $this->get("Hour"); + } + + /** + * Hour: Disks.N.BackupMode为"Custom"时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96。 + * + * @param string $hour + */ + public function setHour($hour) + { + $this->set("Hour", $hour); + } + + /** + * Day: Disks.N.BackupMode为"Custom"时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30。 + * + * @return string|null + */ + public function getDay() + { + return $this->get("Day"); + } + + /** + * Day: Disks.N.BackupMode为"Custom"时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30。 + * + * @param string $day + */ + public function setDay($day) + { + $this->set("Day", $day); + } } diff --git a/src/UHost/Params/CreateUHostInstanceParamFeatures.php b/src/UHost/Params/CreateUHostInstanceParamFeatures.php index 1422c187..6015c27a 100644 --- a/src/UHost/Params/CreateUHostInstanceParamFeatures.php +++ b/src/UHost/Params/CreateUHostInstanceParamFeatures.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/UHost/Params/CreateUHostInstanceParamNetworkInterface.php b/src/UHost/Params/CreateUHostInstanceParamNetworkInterface.php index ae2fccc4..9d4cc514 100644 --- a/src/UHost/Params/CreateUHostInstanceParamNetworkInterface.php +++ b/src/UHost/Params/CreateUHostInstanceParamNetworkInterface.php @@ -1,6 +1,6 @@ get("Address"); + } + /** + * Address: 第N个网卡对应的IPv6地址,默认不分配IPv6,“Auto”自动分配,不为空的其他字符串为实际要分配的IPv6地址。当前仅支持分配一个IPv6地址 + * + * @param string $address + */ + public function setAddress($address) + { + $this->set("Address", $address); + } } diff --git a/src/UHost/Params/CreateUHostInstanceParamSecGroupId.php b/src/UHost/Params/CreateUHostInstanceParamSecGroupId.php index 466fe95f..fdf77b5c 100644 --- a/src/UHost/Params/CreateUHostInstanceParamSecGroupId.php +++ b/src/UHost/Params/CreateUHostInstanceParamSecGroupId.php @@ -1,6 +1,6 @@ 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/UHost/Params/CreateUHostInstanceParamVolumes.php b/src/UHost/Params/CreateUHostInstanceParamVolumes.php index ae0be4cb..0a5ab0f2 100644 --- a/src/UHost/Params/CreateUHostInstanceParamVolumes.php +++ b/src/UHost/Params/CreateUHostInstanceParamVolumes.php @@ -1,6 +1,6 @@ (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) + * "ImageId" => (string) 镜像ID。 请通过 [DescribeImage](describe_image.html)获取 + * "Disks" => (array) [ + * [ + * "IsBoot" => (string) 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * "Type" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * "Size" => (integer) 磁盘大小,单位GB。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * "BackupType" => (string) 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT,快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE + * "CouponId" => (string) 云盘代金券id。不适用于系统盘/本地盘。请通过DescribeCoupon接口查询,或登录用户中心查看 + * "BackupMode" => (string) 指定快照备份策略。当Disks.N.BackupType为"SNAPSHOT"时此参数生效。枚举值:"Lite":轻量版,"Base":基础版,"Ultimate":旗舰版,"Custom":自定义备份链;默认值:"Base" + * "CustomBackup" => (object) [ + * "Journal" => (string) Disks.N.BackupMode为"Custom"时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48。 + * "Hour" => (string) Disks.N.BackupMode为"Custom"时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96。 + * "Day" => (string) Disks.N.BackupMode为"Custom"时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30。 + * ] + * "SnapshotId" => (string) 从快照创建盘时所用快照id,目前仅支持数据盘 + * ] + * ] + * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ > Spot计费为抢占式实例(内测阶段) \\ 默认为月付 + * "CPU" => (integer) 虚拟CPU核数。可选参数:1-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 + * "Memory" => (integer) 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 + * "GpuType" => (string) GPU类型,枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S",2080","2080TiS","2080TiPro","3090","A100", "4090", "4090Pro", "4090_48G", "5090"],MachineType为G时必填 + * "GPU" => (integer) GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * "NetCapability" => (string) 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(详情参考官网文档) + * "HotplugFeature" => (boolean) 热升级特性。True为开启,False为未开启,默认False。 + * "IsolationGroup" => (string) 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * "MachineType" => (string) 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OM", "OPRO", "OMAX", "O.BM", "O.EPC"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * "MinimalCpuPlatform" => (string) 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake", "Intel/CascadelakeR", "Intel/IceLake", "Amd/Epyc2", "Amd/Auto","Ampere/Auto","Ampere/Altra"],默认值是"Intel/Auto"。 + * "MaxCount" => (integer) 本次最大创建主机数量,取值范围是[1,100],默认值为1。 + * "Features" => (object) [ + * "UNI" => (boolean) 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启,仅与 NetCapability Normal 兼容。 + * ] + * "SecurityMode" => (string) 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * "UHostFamily" => (string) 规格族。由机型代号和 CPU 平台组成,用于指定云主机的硬件类型与处理器平台。当 MachineType 为 "O"(快杰型)时,支持以下取值:o1i:快杰型 O1 代,Intel 平台o1a:快杰型 O1 代,AMD 平台o1r:快杰型 O1 代,ARM 平台o2i:快杰型 O2 代,Intel 平台默认值:o1i 或 o1a(系统将根据资源情况自动选择)当 MachineType 为 "OM"(快杰共享型)时,支持以下取值:om1i:快杰内存增强型 OM1 代,Intel 平台om2i:快杰内存增强型 OM2 代,Intel 平台⚠️ 注意:规格族必须与 MachineType 匹配,否则请求将被拒绝。 + * "MinCount" => (integer) 本次最小创建主机数量,取值范围是[1,100],默认值为1。 + * ] + * + * Outputs: + * + * $outputs = [ + * "ResourceEnough" => (boolean) 资源是否充足 + * "RdmaClusterIds" => (array) 随机的资源对应的RdmaClusterId数组,若资源不足则为空,只有快杰系列机型,以及A800才可能有此字段 + * ] + * + * @return CheckUHostResourceCapacityResponse + * @throws UCloudException + */ + public function checkUHostResourceCapacity(CheckUHostResourceCapacityRequest $request = null) + { + $resp = $this->invoke($request); + return new CheckUHostResourceCapacityResponse($resp->toArray(), $resp->getRequestId()); + } + /** * CopyCustomImage - 复制自制镜像 * @@ -108,15 +179,25 @@ class UHostClient extends Client * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "SourceImageId" => (string) 源镜像Id, 参见 DescribeImage * "TargetProjectId" => (string) 目标项目Id, 参见 GetProjectList - * "TargetRegion" => (string) 目标地域,不跨地域不用填 + * "TargetRegion" => (string) 目标地域,不跨地域可不填 * "TargetImageName" => (string) 目标镜像名称 * "TargetImageDescription" => (string) 目标镜像描述 + * "TargetImageTag" => (string) 目标镜像业务组 + * "TargetRegionList" => (array) 目标地域的集合,批量复制时填写 * ] * * Outputs: * * $outputs = [ - * "TargetImageId" => (string) 目标镜像Id + * "TargetImageId" => (string) 目标镜像Id,只有非批量复制的时候该字段才存在 + * "TaskId" => (string) 目标镜像复制的任务Id,只有非批量复制的时候该字段才存在 + * "Infos" => (array) 批量复制时的任务信息,参考下方的CopyImageTaskInfo[ + * [ + * "TaskId" => (string) 目标镜像复制的任务Id + * "TargetImageId" => (string) 目标镜像Id + * "TargetRegion" => (string) 目标地域 + * ] + * ] * ] * * @return CopyCustomImageResponse @@ -142,12 +223,15 @@ public function copyCustomImage(CopyCustomImageRequest $request = null) * "UHostId" => (string) UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) * "ImageName" => (string) 镜像名称 * "ImageDescription" => (string) 镜像描述 + * "Tag" => (string) 镜像业务组。默认:Default + * "DataUDiskIds" => (array) 【数组】关联的云盘数据盘id列表。注意: 云盘数据盘需要开启快照服务 * ] * * Outputs: * * $outputs = [ * "ImageId" => (string) 镜像Id + * "DataSnapshotIds" => (array) 云盘数据盘快照id列表 * ] * * @return CreateCustomImageResponse @@ -205,45 +289,53 @@ public function createIsolationGroup(CreateIsolationGroupRequest $request = null * "IsBoot" => (string) 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 * "Type" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 * "Size" => (integer) 磁盘大小,单位GB。请参考[[api:uhost-api:disk_type|磁盘类型]]。 - * "BackupType" => (string) 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT,快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE + * "BackupType" => (string) 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > SNAPSHOT,快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE * "Encrypted" => (boolean) 【功能仅部分可用区开放,详询技术支持】磁盘是否加密。加密:true, 不加密: false加密必须传入对应的的KmsKeyId,默认值false * "KmsKeyId" => (string) 【功能仅部分可用区开放,详询技术支持】kms key id。选择加密盘时必填。 * "CouponId" => (string) 云盘代金券id。不适用于系统盘/本地盘。请通过DescribeCoupon接口查询,或登录用户中心查看 - * "CustomBackup" => (object) + * "BackupMode" => (string) 指定快照备份策略。当Disks.N.BackupType为"SNAPSHOT"时此参数生效。枚举值:"Base":标准版,"Ultimate":旗舰版,"Custom":自定义备份链;默认值:"Base"。 + * "CustomBackup" => (object) [ + * "Journal" => (string) Disks.N.BackupMode为"Custom"时,进行设置, 以12小时秒级为基础进行倍数扩增,如12、24、36、48。 + * "Hour" => (string) Disks.N.BackupMode为"Custom"时,进行设置, 以24小时级为基础进行倍数扩增,如24、48、72、96。 + * "Day" => (string) Disks.N.BackupMode为"Custom"时,进行设置, 以5天级为基础进行倍数扩增,如5、10、15、20、25、30。 + * ] + * "SnapshotId" => (string) 从快照创建盘时所用快照id,目前仅支持数据盘 * ] * ] - * "LoginMode" => (string) 主机登陆模式。密码(默认选项): Password,密钥:KeyPair。 - * "Password" => (string) UHost密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。 + * "LoginMode" => (string) 主机登陆模式。密码(默认选项): Password,密钥:KeyPair,Password,自制镜像密码:ImagePasswd。 + * "Password" => (string) UHost密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64 UGFzc3dvcmQx。 * "Name" => (string) UHost实例名称。默认:UHost。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。 * "Tag" => (string) 业务组。默认:Default(Default即为未分组)。请遵照[[api:uhost-api:specification|字段规范]]设定业务组。 - * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\Preemptive计费为抢占式实例(内测阶段) \\ 默认为月付 + * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ > Spot计费为抢占式实例(内测阶段) \\ 默认为月付 * "Quantity" => (integer) 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。 * "UHostType" => (string) 【建议后续不再使用】云主机机型(V1.0),在本字段和字段MachineType中,仅需要其中1个字段即可。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 * "CPU" => (integer) 虚拟CPU核数。可选参数:1-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 * "Memory" => (integer) 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 - * "GpuType" => (string) GPU类型,枚举值["K80", "P40", "V100", "T4", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S"],MachineType为G时必填 + * "GpuType" => (string) GPU类型,枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "V100S",2080","2080TiS","2080TiPro","3090","4090","4090Pro","4090_48G","A100","A800","H20"]。MachineType为G时必填 * "GPU" => (integer) GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) - * "NetCapability" => (string) 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(详情参考官网文档) + * "NetCapability" => (string) 网络增强特性。枚举值:Normal,不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0;Extreme,开启网络增强3.0(详情参考官网文档) * "HotplugFeature" => (boolean) 热升级特性。True为开启,False为未开启,默认False。 * "VPCId" => (string) VPC ID。默认为当前地域的默认VPC。 * "SubnetId" => (string) 子网 ID。默认为当前地域的默认子网。 * "PrivateIp" => (array) 【数组】创建云主机时指定内网IP。若不传值,则随机分配当前子网下的IP。调用方式举例:PrivateIp.0=x.x.x.x。当前只支持一个内网IP。 * "SecurityGroupId" => (string) 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 * "IsolationGroup" => (string) 硬件隔离组id。可通过DescribeIsolationGroup获取。 - * "AlarmTemplateId" => (integer) 告警模板id,如果传了告警模板id,且告警模板id正确,则绑定告警模板。绑定告警模板失败只会在后台有日志,不会影响创建主机流程,也不会在前端报错。 - * "MachineType" => (string) 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OM", "OPRO", "OMAX", "O.BM", "O.EPC"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 - * "MinimalCpuPlatform" => (string) 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake", "Intel/CascadelakeR", "Intel/IceLake", "Amd/Epyc2", "Amd/Auto"],默认值是"Intel/Auto"。 - * "MaxCount" => (integer) 本次最大创建主机数量,取值范围是[1,100],默认值为1。 + * "AlarmTemplateId" => (integer) 告警模板id,如果传了告警模板id,且告警模板id正确,则绑定告警模板。绑定告警模板失败不会影响创建主机流程。 + * "MachineType" => (string) 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OM", "OMEM", "OPRO", "OPROG"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * "MinimalCpuPlatform" => (string) 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake", "Intel/CascadelakeR", "Intel/IceLake", "Intel/SapphireRapids", "Amd/Epyc2", "Amd/Auto","Ampere/Auto","Ampere/Altra"],默认值是"Intel/Auto"。 + * "MaxCount" => (integer) 本次最大创建主机数量,取值范围是[1,100],默认值为1。- 库存数量不足时,按库存数量创建。- 配额不足时,返回错误。- 使用隔离组时,以隔离组可用数量为准。 * "NetworkInterface" => (array) [ * [ * "EIP" => (object) [ - * "Bandwidth" => (integer) 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式必须指定0M带宽, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + * "Bandwidth" => (integer) 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] * "PayMode" => (string) 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" * "ShareBandwidthId" => (string) 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 * "OperatorName" => (string) 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International * "CouponId" => (string) 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 * ] - * "IPv6" => (object) + * "IPv6" => (object) [ + * "Address" => (string) 第N个网卡对应的IPv6地址,默认不分配IPv6,“Auto”自动分配,不为空的其他字符串为实际要分配的IPv6地址。当前仅支持分配一个IPv6地址 + * ] * "CreateCernetIp" => (boolean) 申请并绑定一个教育网EIP。True为申请并绑定,False为不会申请绑定,默认False。当前只支持具有HPC特性的机型。 * ] * ] @@ -252,9 +344,27 @@ public function createIsolationGroup(CreateIsolationGroupRequest $request = null * "Volumes" => (array) * "KeyPairId" => (string) KeypairId 密钥对ID,LoginMode为KeyPair时此项必须。 * "Features" => (object) [ - * "UNI" => (boolean) 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启,仅与 NetCapability Normal 兼容。 + * "UNI" => (boolean) 弹性网卡特性。开启了弹性网卡权限位,此特性才生效,默认 false 未开启,true 开启。 * ] - * "SecGroupId" => (array) + * "SecGroupId" => (array) [ + * [ + * "Id" => (string) 安全组 ID。至多可以同时绑定5个安全组。 + * "Priority" => (integer) 安全组优先级。取值范围[1, 5] + * ] + * ] + * "SecurityMode" => (string) 主机安全模式。Firewall:防火墙;SecGroup:安全组;默认值:Firewall。 + * "UDSetId" => (string) 【私有专区属性】专区id + * "UDHostId" => (string) 【私有专区属性】专区宿主机id + * "HostBinding" => (boolean) 【私有专区属性】专区云主机开启宿住关联属性 + * "MinCount" => (integer) 本次最小创建主机数量,取值范围是[1,100],默认值为1。- 配额不足时,返回错误。 + * "Labels" => (array) [ + * [ + * "Key" => (string) 用户资源标签的键值 + * "Value" => (string) 用户资源标签的值 + * ] + * ] + * "DeletionProtection" => (boolean) 删除保护,设置删除保护参数,true表示不允许控制台删除 + * "UHostFamily" => (string) 规格族。 由机型代号和 CPU 平台组成,用于指定云主机的硬件类型与处理器平台。 当 MachineType 为 "O"(快杰型)时,支持以下取值:- o1i:快杰型 O1 代,Intel 平台 - o1a:快杰型 O1 代,AMD 平台- o1r:快杰型 O1 代,ARM 平台 - o2i:快杰型 O2 代,Intel 平台 默认值:o1i 或 o1a当 MachineType 为 "OM"(快杰共享型)时,支持以下取值: - om1i:快杰内存增强型 OM1 代,Intel 平台 - om2i:快杰内存增强型 OM2 代,Intel 平台注意:规格族必须与 MachineType 匹配,否则请求将被拒绝。 * "CouponId" => (string) 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 * ] * @@ -377,6 +487,7 @@ public function deleteUHostKeyPairs(DeleteUHostKeyPairsRequest $request = null) * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 + * "MachineTypes" => (array) 指定机型列表 * ] * * Outputs: @@ -384,6 +495,8 @@ public function deleteUHostKeyPairs(DeleteUHostKeyPairsRequest $request = null) * $outputs = [ * "AvailableInstanceTypes" => (array) AvailableInstanceTypes[ * [ + * "Zone" => (string) 可用区信息 + * "InstanceType" => (string) 实例类型,枚举值["uhost", "spot"] * "Name" => (string) 机型名称:快杰O型|O 、快杰共享型|OM 、快杰内存型|OMEM 、 快杰PRO型|OPRO、通用N型|N、高主频C型|C和GPU G型|G等 * "Status" => (string) 机型状态:可售|Normal 、 公测|Beta、售罄|Soldout、隐藏|Hidden * "CpuPlatforms" => (object) 支持的CPU平台,并且按照Intel、AMD和Ampere分类返回[ @@ -391,6 +504,19 @@ public function deleteUHostKeyPairs(DeleteUHostKeyPairsRequest $request = null) * "Amd" => (array) 返回AMD的CPU平台信息,例如:AMD: ['Amd/Epyc2'] * "Ampere" => (array) 返回Arm的CPU平台信息,例如:Ampere: ['Ampere/Altra'] * ] + * "UHostFamilies" => (array) 规格族信息[ + * [ + * "Name" => (string) 规格族 + * "CpuFrequency" => (string) CPU频率信息 + * "CpuPlatforms" => (array) CPU平台信息[ + * [ + * "Name" => (string) CPU平台 + * "CpuModels" => (array) CPU Model列表 + * "CpuFrequency" => (string) CPU频率 + * ] + * ] + * ] + * ] * "Disks" => (array) 磁盘信息。磁盘主要分类如下:云盘|cloudDisk、普通本地盘|normalLocalDisk和SSD本地盘|ssdLocalDisk。其中云盘主要包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。MinimalSize为磁盘最小值,如果没有该字段,最小值取基础镜像Size值即可(linux为20G,windows为40G)。MaximalSize为磁盘最大值。InstantResize表示系统盘是否允许扩容,如果是本地盘,则不允许扩容,InstantResize为false。Features为磁盘可支持的服务:数据方舟|DATAARK,快照服务|SNAPSHOT,加密盘|Encrypted。[ * [ * "Name" => (string) 磁盘介质类别信息,磁盘主要分类如下:云盘|cloudDisk、普通本地盘|normalLocalDisk和SSD本地盘|ssdLocalDisk。 @@ -408,6 +534,7 @@ public function deleteUHostKeyPairs(DeleteUHostKeyPairsRequest $request = null) * "Name" => (string) 数据盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 * "MaximalSize" => (integer) MaximalSize为磁盘最大值 * "Features" => (array) 数据盘可支持的服务 + * "BackupMode" => (array) 支持的快照备份策略 * ] * ] * ] @@ -442,11 +569,14 @@ public function deleteUHostKeyPairs(DeleteUHostKeyPairsRequest $request = null) * "Rate" => (integer) 交互展示参数,可忽略 * ] * "Performance" => (object) GPU的性能指标,value为值,单位是TFlops。[ - * "Value" => (integer) 值,单位是TFlops + * "Value" => (number) 值,单位是TFlops * "Rate" => (integer) 交互展示参数,可忽略 * ] + * "ParentType" => (string) 父机型 + * "Description" => (string) 机型描述 * ] * ] + * "Status" => (string) 当前区域是否可售 * ] * * @return DescribeAvailableInstanceTypesResponse @@ -458,6 +588,144 @@ public function describeAvailableInstanceTypes(DescribeAvailableInstanceTypesReq return new DescribeAvailableInstanceTypesResponse($resp->toArray(), $resp->getRequestId()); } + /** + * DescribeHostMachineTypeFamilies - 获取实例规格族列表(所有机型的信息) + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_host_machine_type_families + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。如果不填写,则使用默认项目,子账户必须填写。请参阅[GetProjectList界面](https://docs.ucloud.cn/api/summary/get_project_list). + * ] + * + * Outputs: + * + * $outputs = [ + * "MachineTypes" => (array) 机型配置列表[ + * [ + * "Name" => (string) 机型名称 + * "Description" => (string) 机型中文名称 + * "OperationStatus" => (string) 机型ComponentCode + * "CpuPlatforms" => (array) CPU平台列表[ + * [ + * "Name" => (string) CPU平台 + * "OperationStatus" => (string) 运营Commpont Code + * ] + * ] + * "Disks" => (array) 磁盘信息[ + * [ + * "Name" => (string) 磁盘介质类别信息,磁盘主要分类如下:云盘|cloudDisk、普通本地盘|normalLocalDisk和SSD本地盘|ssdLocalDisk。 + * "BootDisk" => (array) 系统盘信息[ + * [ + * "Name" => (string) 系统盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 + * "InstantResize" => (boolean) 系统盘是否允许扩容,如果是本地盘,则不允许扩容,InstantResize为false。 + * "MaximalSize" => (integer) MaximalSize为磁盘最大值 + * "Features" => (array) 磁盘可支持的服务[ + * [ + * "Name" => (string) 特性名称 + * "Modes" => (array) 特性详情[ + * [ + * "Name" => (string) 名称 + * "OperationStatus" => (string) 标记 + * ] + * ] + * ] + * ] + * ] + * ] + * "DataDisk" => (array) 数据盘信息[ + * [ + * "MinimalSize" => (integer) 磁盘最小值,如果没有该字段,最小值取基础镜像Size值即可(linux为20G,windows为40G)。 + * "Name" => (string) 数据盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 + * "MaximalSize" => (integer) MaximalSize为磁盘最大值 + * "Features" => (array) 数据盘可支持的服务[ + * [ + * "Name" => (string) 特性名称 + * "Modes" => (array) 特性详情[ + * [ + * "Name" => (string) 名称 + * "OperationStatus" => (string) 标记 + * ] + * ] + * ] + * ] + * ] + * ] + * "OperationStatus" => (string) 权限位 + * ] + * ] + * "MachineSizes" => (array) 规格信息[ + * [ + * "Gpu" => (integer) Gpu为GPU可支持的规格即GPU颗数,非GPU机型,Gpu为0 + * "Collection" => (array) CPU和内存可支持的规格[ + * [ + * "Cpu" => (integer) CPU规格 + * "Memory" => (array) 内存规格 + * "MinimalCpuPlatform" => (array) CPU和内存规格只能在列出来的CPU平台支持 + * ] + * ] + * ] + * ] + * "Features" => (array) 特性信息[ + * [ + * "Name" => (string) 可支持的特性名称。目前支持的特性网络增强|NetCapability、热升级|Hotplug + * "Modes" => (array) 可以提供的模式类别[ + * [ + * "Name" => (string) 模式|特性名称 + * "RelatedToImageFeature" => (array) 为镜像上支持这个特性的标签。例如DescribeImage返回的字段Features包含HotPlug,说明该镜像支持热升级。 + * "MinimalCpuPlatform" => (array) 这个特性必须是列出来的CPU平台及以上的CPU才支持 + * ] + * ] + * ] + * ] + * "ParentType" => (string) 父类型。如GPU机型的父类型为"G" + * "GpuType" => (object) GPU信息[ + * "Name" => (string) 机型名称 + * "GraphicsMemory" => (object) 显存信息[ + * "Value" => (integer) 值,单位是GB + * "Rate" => (integer) 交互展示参数,可忽略 + * ] + * "Performance" => (object) 性能信息[ + * "Value" => (number) 值,单位是TFlops + * "Rate" => (integer) 交互展示参数,可忽略 + * ] + * ] + * "SceneCategories" => (array) 场景分类 + * "GpuSeries" => (string) GPU系列 + * "UHostFamilies" => (array) 规格族信息[ + * [ + * "Name" => (string) 规格族 + * "CpuFrequency" => (string) CPU频率信息 + * "CpuPlatforms" => (array) CPU平台信息[ + * [ + * "Name" => (string) CPU平台 + * "CpuModels" => (array) CPU Model列表 + * "CpuFrequency" => (string) CPU频率 + * ] + * ] + * ] + * ] + * "Virtual" => (boolean) 是否为非真实机型 + * "ProType" => (object) 仅OPROG\OPRO机型返回[ + * "Name" => (string) 机型名称 + * "Frequency" => (object) 频率[ + * "Value" => (number) 值 + * ] + * ] + * ] + * ] + * ] + * + * @return DescribeHostMachineTypeFamiliesResponse + * @throws UCloudException + */ + public function describeHostMachineTypeFamilies(DescribeHostMachineTypeFamiliesRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeHostMachineTypeFamiliesResponse($resp->toArray(), $resp->getRequestId()); + } + /** * DescribeImage - 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。 * @@ -470,8 +738,11 @@ public function describeAvailableInstanceTypes(DescribeAvailableInstanceTypesReq * "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,镜像市场:Business, 自定义镜像:Custom,默认返回所有类型 + * "FuncType" => (string) 镜像归属,枚举值:["gpu","app","uhost"]。"gpu": 对gpu进行处理过的行业镜像;"app":轻量云主机专用的镜像;"uhost":云主机镜像市场的行业镜像。FuncType传参错误会被忽略 * "OsType" => (string) 操作系统类型:Linux, Windows 默认返回所有类型 * "ImageId" => (string) 镜像Id + * "ImageIds" => (array) 镜像Id列表 + * "Tag" => (string) 业务组Id。默认:Default * "Offset" => (integer) 列表起始位置偏移量,默认为0 * "Limit" => (integer) 返回数据长度,默认为20 * "PriceSet" => (integer) 是否返回价格:1返回,0不返回;默认不返回 @@ -486,19 +757,32 @@ public function describeAvailableInstanceTypes(DescribeAvailableInstanceTypesReq * "Zone" => (string) 可用区,参见 [可用区列表](../summary/regionlist.html) * "ImageId" => (string) 镜像ID * "ImageName" => (string) 镜像名称 + * "Tag" => (string) 业务组 * "OsType" => (string) 操作系统类型:Linux,Windows * "OsName" => (string) 操作系统名称 * "ImageType" => (string) 镜像类型 标准镜像:Base, 行业镜像:Business,自定义镜像:Custom - * "Features" => (array) 特殊状态标识, 目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra](网络增强2.0), HotPlug(热升级), CloudInit, IPv6 - * "FuncType" => (string) 行业镜像类型(仅行业镜像将返回这个值) + * "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架构) + * "FuncType" => (string) 镜像归属,枚举值:["gpu","app","uhost"]。"gpu": 对gpu进行处理过的行业镜像;"app":轻量云主机专用的镜像;"uhost":云主机镜像市场的行业镜像 * "IntegratedSoftware" => (string) 集成软件名称(仅行业镜像将返回这个值) * "Vendor" => (string) 供应商(仅行业镜像将返回这个值) * "Links" => (string) 介绍链接(仅行业镜像将返回这个值) - * "State" => (string) 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable + * "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 + * "DataSnapshotIds" => (array) 关联的云盘数据盘快照Id列表 + * "SupportedGPUTypes" => (array) 支持的GPU机型 + * "SceneCategories" => (array) 场景分类,目前包含Featured(精选),PreInstalledDrivers(预装驱动),AIPainting(AI绘画),AIModels(AI模型),HPC(高性能计算) + * "PrimarySoftware" => (string) 主要安装软件 + * "PriceSet" => (array) 镜像的价格信息[ + * [ + * "ChargeType" => (string) 计费类型 + * "Price" => (number) 价格,单位: 元,保留小数点后两位有效数字 + * "OriginalPrice" => (number) 限时优惠的折前原价(即列表价乘以商务折扣后的单价)。 + * ] + * ] * ] * ] * ] @@ -555,6 +839,62 @@ public function describeIsolationGroup(DescribeIsolationGroupRequest $request = return new DescribeIsolationGroupResponse($resp->toArray(), $resp->getRequestId()); } + /** + * DescribeUHostAvailableDiskTypes - 获取主机可挂载的磁盘信息 + * + * See also: https://docs.ucloud.cn/api/uhost-api/describe_uhost_available_disk_types + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostIds" => (array) 实例Id列表。最多100个 + * ] + * + * Outputs: + * + * $outputs = [ + * "DiskTypeSet" => (array) 可挂载的磁盘信息列表[ + * [ + * "Zone" => (string) 可用区 + * "UHostId" => (string) 实例Id + * "AvailableDisks" => (array) 可用磁盘信息[ + * [ + * "Name" => (string) 磁盘介质类别信息,磁盘主要分类如下:云盘|cloudDisk、普通本地盘|normalLocalDisk和SSD本地盘|ssdLocalDisk。 + * "BootDisk" => (array) 系统盘信息[ + * [ + * "Name" => (string) 系统盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 + * "InstantResize" => (boolean) 系统盘是否允许扩容,如果是本地盘,则不允许扩容,InstantResize为false。 + * "MaximalSize" => (integer) MaximalSize为磁盘最大值 + * "Features" => (array) 磁盘可支持的服务 + * ] + * ] + * "DataDisk" => (array) 数据盘信息[ + * [ + * "MinimalSize" => (integer) 磁盘最小值,如果没有该字段,最小值取基础镜像Size值即可(linux为20G,windows为40G)。 + * "Name" => (string) 数据盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 + * "MaximalSize" => (integer) MaximalSize为磁盘最大值 + * "Features" => (array) 数据盘可支持的服务 + * "BackupMode" => (array) 支持的快照备份策略 + * ] + * ] + * ] + * ] + * ] + * ] + * ] + * + * @return DescribeUHostAvailableDiskTypesResponse + * @throws UCloudException + */ + public function describeUHostAvailableDiskTypes(DescribeUHostAvailableDiskTypesRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUHostAvailableDiskTypesResponse($resp->toArray(), $resp->getRequestId()); + } + /** * DescribeUHostInstance - 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 * @@ -583,11 +923,11 @@ public function describeIsolationGroup(DescribeIsolationGroupRequest $request = * "UHostSet" => (array) 云主机实例列表,每项参数可见下面 UHostInstanceSet[ * [ * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) - * "IPv6Feature" => (boolean) true:有ipv6特性;false,没有ipv6特性 * "UHostId" => (string) UHost实例ID * "UHostType" => (string) 【建议不再使用】云主机机型(旧)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 * "MachineType" => (string) 云主机机型(新)。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。 * "CpuPlatform" => (string) 云主机CPU平台。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。 + * "UHostFamily" => (string) 规格族。 由机型代号和 CPU 平台组成,用于指定云主机的硬件类型与处理器平台。 当 MachineType 为 "O"(快杰型)时,支持以下取值: - o1i:快杰型 O1 代,Intel 平台 - o1a:快杰型 O1 代,AMD 平台 - o1r:快杰型 O1 代,ARM 平台 - o2i:快杰型 O2 代,Intel 平台 默认值:o1i 或 o1a或o1r(系统将根据资源情况自动选择) 当 MachineType 为 "OM"(快杰共享型)时,支持以下取值: - om1i:快杰内存增强型 OM1 代,Intel 平台 - om2i:快杰内存增强型 OM2 代,Intel 平台 * "StorageType" => (string) 【建议不再使用】主机磁盘类型。 枚举值为:\\ > LocalDisk,本地磁盘; \\ > UDisk 云盘。\\只要有一块磁盘为本地盘,即返回LocalDisk。 * "ImageId" => (string) 【建议不再使用】主机的系统盘ID。 * "BasicImageId" => (string) 基础镜像ID(指当前自定义镜像的来源镜像) @@ -633,24 +973,39 @@ public function describeIsolationGroup(DescribeIsolationGroupRequest $request = * "NetCapability" => (string) 网络增强。Normal: 无;Super: 网络增强1.0; Ultra: 网络增强2.0 * "NetworkState" => (string) 【建议不再使用】网络状态。 连接:Connected, 断开:NotConnected * "TimemachineFeature" => (string) 【建议不再使用】数据方舟模式。枚举值:\\ > Yes: 开启方舟; \\ > no,未开启方舟 - * "HotplugFeature" => (boolean) true: 开启热升级; false,未开启热升级 * "SubnetType" => (string) 【建议不再使用】仅北京A的云主机会返回此字段。基础网络模式:Default;子网模式:Private * "OsName" => (string) 创建主机的最初来源镜像的操作系统名称(若直接通过基础镜像创建,此处返回和BasicImageName一致) * "OsType" => (string) 操作系统类别。返回"Linux"或者"Windows" * "HostType" => (string) 【建议不再使用】主机系列:N2,表示系列2;N1,表示系列1 * "LifeCycle" => (string) 主机的生命周期类型。目前仅支持Normal:普通; * "GPU" => (integer) GPU个数 + * "GpuType" => (string) GPU类型;枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S",2080","2080TiS","2080TiPro","3090","4090","4090Pro","A100","A800","H20"] + * "HotPlugMaxCpu" => (integer) 热升级支持的最大CPU个数 * "BootDiskState" => (string) 系统盘状态 Normal表示初始化完成;Initializing表示在初始化。仍在初始化的系统盘无法制作镜像。 * "TotalDiskSpace" => (integer) 总的数据盘存储空间。 * "IsolationGroup" => (string) 隔离组id,不在隔离组则返回"" - * "CloudInitFeature" => (boolean) true,支持cloutinit方式初始化;false,不支持 * "RdmaClusterId" => (string) RDMA集群id,仅快杰云主机返回该值;其他类型云主机返回""。当云主机的此值与RSSD云盘的RdmaClusterId相同时,RSSD可以挂载到这台云主机。 * "RestrictMode" => (string) 仅抢占式实例返回,LowSpeed为低速模式,PowerOff为关机模式 + * "HotplugFeature" => (boolean) true: 开启热升级; false,未开启热升级 + * "CloudInitFeature" => (boolean) true: 支持cloutinit方式初始化;false: 不支持 + * "IPv6Feature" => (boolean) true: 有ipv6特性;false,没有ipv6特性 * "HpcFeature" => (boolean) true: 开启 hpc 系列功能;false: 未开启 + * "EpcInstance" => (boolean) true: 高性能计算主机;false: 不是 + * "SecGroupInstance" => (boolean) 【待废弃】true: 绑定了安全组的主机;false: 不是 + * "NetFeatureTag" => (string) Firewall:防火墙,SecGroup:安全组,Acl:acl + * "HiddenKvm" => (boolean) true: 开启 hidden kvm 功能;false: 不是 * "KeyPair" => (object) 密钥信息见 UHostKeyPair[ * "KeyPairId" => (string) 密钥对ID * "KeyPairState" => (string) 主机密钥对状态,Normal 正常,Deleted 删除 * ] + * "UDHostAttribute" => (object) 私有专区宿主机属性[ + * "UDHostId" => (string) 私有专区宿主机 + * "UDSetId" => (string) 私有专区 + * "HostBinding" => (boolean) 是否绑定私有专区宿主机 + * ] + * "SpotAttribute" => (object) 竞价实例信息[ + * "RecycleTime" => (integer) 回收时间 + * ] * ] * ] * ] @@ -751,7 +1106,7 @@ public function describeUHostTags(DescribeUHostTagsRequest $request = null) * "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) - * "DiskSpace" => (integer) 磁盘大小,单位GB,步长为10。取值范围需大于当前磁盘大小,最大值请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * "DiskSpace" => (integer) 磁盘大小,单位GB。取值范围需大于当前磁盘大小,最大值请参考[[api:uhost-api:disk_type|磁盘类型]]。 * "DiskId" => (string) 磁盘ID。参见 [DescribeUHostInstance](describe_uhost_instance.html)返回值中的DiskSet。 * "UHostId" => (string) UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 * "BackupMode" => (string) 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\> SNAPSHOT(SNAPSHOT模式目前仅在上海C支持),快照 \\ 当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]]。默认值为当前的备份模式。 @@ -761,6 +1116,20 @@ public function describeUHostTags(DescribeUHostTagsRequest $request = null) * * $outputs = [ * "Price" => (number) 升级差价。精度为小数点后2位。 + * "OriginalPrice" => (number) 用户折后价。精度为小数点后2位。 + * "ListPrice" => (number) 原价。精度为小数点后2位。 + * "PriceDetail" => (object) 升级价格详情,精度为小数点后2位。[ + * "UDisk" => (number) 磁盘的价格 + * "Snapshot" => (number) 快照的价格 + * ] + * "OriginalPriceDetail" => (object) 用户折后价详情,精度为小数点后2位。[ + * "UDisk" => (number) 磁盘的价格 + * "Snapshot" => (number) 快照的价格 + * ] + * "ListPriceDetail" => (object) 原价详情,精度为小数点后2位。[ + * "UDisk" => (number) 磁盘的价格 + * "Snapshot" => (number) 快照的价格 + * ] * ] * * @return GetAttachedDiskUpgradePriceResponse @@ -796,15 +1165,17 @@ public function getAttachedDiskUpgradePrice(GetAttachedDiskUpgradePriceRequest $ * ] * "ImageId" => (string) 镜像Id,可通过 [DescribeImage](describe_image.html) 获取镜像ID, 如果镜像ID不传,系统盘大小必传 * "GPU" => (integer) GPU卡核心数。仅GPU机型支持此字段。 - * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时付费 // >Preemptive 抢占式实例 \\ 如果不传某个枚举值,默认返回年付、月付、时付的价格组合集。 + * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时付费 // >Spot 抢占式实例 \\ 如果不传某个枚举值,默认返回年付、月付、时付的价格组合集。 * "NetCapability" => (string) 网络增强。枚举值:Normal,不开启; Super,开启网络增强1.0。 默认值为Normal。 * "UHostType" => (string) 【待废弃】云主机机型(V1版本概念)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 - * "MachineType" => (string) 云主机机型(V2版本概念)。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 - * "GpuType" => (string) GPU类型,枚举值["K80", "P40", "V100", "T4","T4S","2080Ti","2080Ti-4C","1080Ti"] + * "MachineType" => (string) 云主机机型(V2版本概念)。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM", "O.EPC"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * "GpuType" => (string) GPU类型,枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S",2080","2080TiS","2080TiPro","3090","4090","4090Pro","A100","A800"] * "Quantity" => (integer) 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 * "CpuPlatform" => (string) 取值"Intel" "Amd",默认值“Intel” * "Volumes" => (array) - * "VirtualGpu" => (object) + * "UDSetUHostInstance" => (boolean) 专区云主机。如果要在专区宿主机上创建云主机,该参数可以填写为true + * "ShowPriceDetails" => (boolean) 返回价格详细信息 + * "UHostFamily" => (string) 规格族。 由机型代号和 CPU 平台组成,用于指定云主机的硬件类型与处理器平台。当 MachineType 为 "O"(快杰型)时,支持以下取值: - o1i:快杰型 O1 代,Intel 平台 - o1a:快杰型 O1 代,AMD 平台- o1r:快杰型 O1 代,ARM 平台 - o2i:快杰型 O2 代,Intel 平台 默认值:o1i 或 o1a或o1r当 MachineType 为 "OM"(快杰共享型)时,支持以下取值: - om1i:快杰内存增强型 OM1 代,Intel 平台 - om2i:快杰内存增强型 OM2 代,Intel 平台注意:规格族必须与 MachineType 匹配,否则请求将被拒绝。 * ] * * Outputs: @@ -814,8 +1185,19 @@ public function getAttachedDiskUpgradePrice(GetAttachedDiskUpgradePriceRequest $ * [ * "ChargeType" => (string) 计费类型。Year,Month,Dynamic * "Price" => (number) 价格,单位: 元,保留小数点后两位有效数字 - * "OriginalPrice" => (number) 限时优惠的折前原价(即列表价乘以商务折扣后的单价)。 - * "ListPrice" => (number) 产品列表价。 + * "OriginalPrice" => (number) 限时优惠的折前原价。 + * "PriceDetail" => (object) 价格详细信息(只有询价接口返回)。[ + * "UHost" => (number) 主机价格 + * "UDisk" => (number) 云盘价格 + * "Snapshot" => (number) 快照价格 + * "Volume" => (number) 数据卷价格 + * ] + * "OriginalPriceDetail" => (object) 原价详细信息(只有询价接口返回)。[ + * "UHost" => (number) 主机价格 + * "UDisk" => (number) 云盘价格 + * "Snapshot" => (number) 快照价格 + * "Volume" => (number) 数据卷价格 + * ] * ] * ] * ] @@ -861,6 +1243,75 @@ public function getUHostInstanceVncInfo(GetUHostInstanceVncInfoRequest $request return new GetUHostInstanceVncInfoResponse($resp->toArray(), $resp->getRequestId()); } + /** + * GetUHostRefundPrice - 获取主机删除扣除费用。包括主机、磁盘、快照服务、EIP等资源的费用 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_uhost_refund_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) + * "UHostIds" => (array) 【数组】UHost实例ID。参见 [DescribeUHostInstance](describe_uhost_instance.html) + * ] + * + * Outputs: + * + * $outputs = [ + * "RefundPriceSet" => (array) 主机删除扣除费用详情[ + * [ + * "UHostId" => (string) UHost实例ID + * "Code" => (integer) 实例操作结果的错误码。0为成功 + * "RefundPrice" => (number) 实例的删除退费金额 + * ] + * ] + * ] + * + * @return GetUHostRefundPriceResponse + * @throws UCloudException + */ + public function getUHostRefundPrice(GetUHostRefundPriceRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUHostRefundPriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUHostRenewPrice - 获取主机续费价格 + * + * See also: https://docs.ucloud.cn/api/uhost-api/get_uhost_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) + * "UHostId" => (string) UHost实例ID + * "ChargeType" => (string) 计费类型。Year,Month,Dynamic,默认返回全部计费方式对应的价格 + * ] + * + * Outputs: + * + * $outputs = [ + * "PriceSet" => (array) 价格列表[ + * [ + * "ChargeType" => (string) 计费类型 + * "Price" => (number) 价格,单位: 元,保留小数点后两位有效数字 + * "OriginalPrice" => (number) 限时优惠的折前原价(即列表价乘以商务折扣后的单价)。 + * ] + * ] + * ] + * + * @return GetUHostRenewPriceResponse + * @throws UCloudException + */ + public function getUHostRenewPrice(GetUHostRenewPriceRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUHostRenewPriceResponse($resp->toArray(), $resp->getRequestId()); + } + /** * GetUHostUpgradePrice - 获取UHost实例升级配置的价格。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 * @@ -875,7 +1326,8 @@ public function getUHostInstanceVncInfo(GetUHostInstanceVncInfoRequest $request * "UHostId" => (string) UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 * "CPU" => (integer) 虚拟CPU核数。可选参数:1-64(可选范围参考控制台)。默认值为当前实例的CPU核数。 * "Memory" => (integer) 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值为当前实例的内存大小。 - * "NetCapValue" => (integer) 网卡升降级(1,表示升级,2表示降级,0表示不变) + * "GPU" => (integer) GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * "NetCapValue" => (integer) 网卡升降级(1,表示升级,2表示降级,0表示不变)。仅支持网络增强1.0和网络增强2.0的开启和关闭,不支持网络增强特性互相转换,如网络增强1.0升级到网络增强2.0是不被支持的。 * ] * * Outputs: @@ -910,6 +1362,7 @@ public function getUHostUpgradePrice(GetUHostUpgradePriceRequest $request = null * "OsName" => (string) 操作系统详细版本,请参考控制台的镜像版本;OsType为Other时,输入参数为Other * "Format" => (string) 镜像格式,可选RAW、VHD、VMDK、qcow2 * "Auth" => (boolean) 是否授权。必须填true + * "Tag" => (string) 业务组 * "ImageDescription" => (string) 镜像描述 * ] * @@ -1184,12 +1637,13 @@ public function rebootUHostInstance(RebootUHostInstanceRequest $request = null) * "UHostId" => (string) UHost实例资源ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) * "Password" => (string) 如果重装UHost实例时LoginMode为Password,则必须填写,如果LoginMode为KeyPair,不需要填写 (密码格式使用BASE64编码;举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。) * "ImageId" => (string) 镜像Id,默认使用原镜像 参见 [DescribeImage](describe_image.html) - * "ReserveDisk" => (string) 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes;如果是从Windows重装为Linux或反之,则无法保留数据盘(该参数目前仅对本地数据盘起作用) - * "BootDiskSpace" => (integer) 系统盘大小。 单位:GB, 范围[20,100], 步长:10 + * "ReserveDisk" => (string) 是否保留数据盘,保留:Yes,不保留:No, 默认:Yes;如果是从Windows重装为Linux或反之,则无法保留数据盘(该参数目前仅对本地数据盘起作用) + * "BootDiskSpace" => (integer) 系统盘大小。 单位:GB, 范围[20,100]。 * "UserData" => (string) cloudinit初始化使用。注意:1、总数据量大小不超多16K 2、使用base64编码 * "AutoDataDiskInit" => (string) 数据盘是否需要自动分区挂载。当镜像支持Cloud-init Feature时可填写此字段。取值“On”(默认值), “Off” - * "LoginMode" => (string) 主机登陆模式。密码(默认选项): Password,密钥 KeyPair。 + * "LoginMode" => (string) 主机登陆模式。密码(默认选项): Password,密钥 KeyPair,自制镜像密码: ImagePasswd。 * "KeyPairId" => (string) KeypairId 密钥对ID,LoginMode为KeyPair时此项必须。 + * "HostName" => (string) 操作系统主机名 * ] * * Outputs: @@ -1220,6 +1674,9 @@ public function reinstallUHostInstance(ReinstallUHostInstanceRequest $request = * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) * "UHostId" => (string) UHost实例ID * "Password" => (string) UHost新密码(密码格式使用BASE64编码) + * "LoginMode" => (string) 主机登陆模式。密码(默认选项): Password,密钥 KeyPair。 + * "KeyPairId" => (string) KeypairId 密钥对ID,LoginMode为KeyPair时此项必须。 + * "AutoStart" => (boolean) 修改密码结束后是否立即开机,默认为false, 如果设置为true,则修改密码成功后立即开机; 抢占式和后付费云主机暂不支持当前功能; * ] * * Outputs: @@ -1284,7 +1741,9 @@ public function resizeAttachedDisk(ResizeAttachedDiskRequest $request = null) * "UHostId" => (string) UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) * "CPU" => (integer) 虚拟CPU核数。可选参数:1-240(可选范围与UHostType相关)。默认值为当前实例的CPU核数 * "Memory" => (integer) 内存大小。单位:MB。范围 :[1024, 1966080],取值为1024的倍数(可选范围与UHostType相关)。默认值为当前实例的内存大小。 + * "GPU" => (integer) GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) * "NetCapValue" => (integer) 网卡升降级(1,表示升级,2表示降级,0表示不变) + * "AutoStart" => (boolean) 扩容结束后是否立即开机,默认为false,如果设置为true,则扩容成功后立即开机;抢占式和后付费云主机暂不支持当前功能; * ] * * Outputs: @@ -1420,33 +1879,4 @@ public function terminateUHostInstance(TerminateUHostInstanceRequest $request = $resp = $this->invoke($request); return new TerminateUHostInstanceResponse($resp->toArray(), $resp->getRequestId()); } - - /** - * UpgradeToArkUHostInstance - 普通升级为方舟机型 - * - * See also: https://docs.ucloud.cn/api/uhost-api/upgrade_to_ark_uhost_instance - * - * Arguments: - * - * $args = [ - * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) - * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) - * "UHostIds" => (array) UHost主机的资源ID,例如UHostIds.0代表希望升级的主机1,UHostIds.1代表主机2。 - * "CouponId" => (string) 代金券ID 请参考DescribeCoupon接口 - * ] - * - * Outputs: - * - * $outputs = [ - * "UHostSet" => (array) UHost主机的资源ID数组 - * ] - * - * @return UpgradeToArkUHostInstanceResponse - * @throws UCloudException - */ - public function upgradeToArkUHostInstance(UpgradeToArkUHostInstanceRequest $request = null) - { - $resp = $this->invoke($request); - return new UpgradeToArkUHostInstanceResponse($resp->toArray(), $resp->getRequestId()); - } }