目录
获取物理机信息-DescribePHost
获取物理机详细信息
Request Parameters
Parameter name | Type | Description | Required |
Region | string | 地域。 参见 地域和可用区列表 | Yes |
Zone | string | 可用区。参见 可用区列表 | No |
ProjectId | string | 项目ID。不填写为默认项目,子帐号必须填写。 请参考GetProjectList接口 | No |
PHostId.n | string | PHost资源ID,若为空,则返回当前Region所有PHost。 | No |
Offset | int | 数据偏移量,默认为0 | No |
Limit | int | 返回数据长度,默认为20 | No |
Response Elements
Parameter name | Type | Description | Required |
RetCode | int | 操作返回码 | Yes |
Action | string | 操作名称 | Yes |
TotalCount | int | 满足条件的PHost总数 | No |
PHostSet | array | PHost资源列表,参见 PHostSet | No |
PHostSet
Parameter name | Type | Description | Required |
Zone | string | 可用区,参见 可用区列表 | No |
PHostId | string | PHost资源ID | No |
SN | string | 物理机序列号 | No |
PMStatus | string | 物理云主机状态,初始化:Initializing; 启动中:Starting; 运行中:Running;关机中:Stopping; 安装失败:InstallFailed; 重启中:Rebooting;关机:Stopped; 已删除:Terminated;冻结: Locked; | No |
Name | string | 物理机名称 | No |
Remark | string | 物理机备注 | No |
Tag | string | 业务组 | No |
ImageName | string | 镜像名称 | No |
OSname | string | 操作系统名称 | No |
CreateTime | int | 创建时间 | No |
ExpireTime | int | 到期时间 | No |
ChargeType | string | 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限); Trial,试用(需开启权限)默认为月付 | No |
PowerState | string | 电源状态,on 或 off | No |
PHostType | string | 物理机类型,DB或SSD | No |
Memory | int | 内存大小,单位:MB | No |
CPUSet | array | CPU信息,见 PHostCPUSet | No |
DiskSet | array | 磁盘信息,见 PHostDiskSet | No |
IPSet | array | IP信息,见 PHostIPSet | No |
Cluster | string | 网络环境,千兆:1G ,万兆:10G | No |
AutoRenew | string | 自动续费 | No |
IsSupportKVM | string | 是否支持紧急登录 | No |
OSType | string | 操作系统类型 | No |
Components | string | 组件信息(暂不支持) | No |
PHostCPUSet
Parameter name | Type | Description | Required |
Model | string | CPU型号 | No |
Frequence | float | CPU主频 | No |
Count | int | CPU个数 | No |
CoreCount | int | CPU核数 | No |
PHostDiskSet
Parameter name | Type | Description | Required |
Space | int | 单盘大小 单位GB | No |
Count | int | 磁盘数量 | No |
Type | string | 磁盘属性 | No |
Name | string | 磁盘名称,sys/data | No |
IOCap | int | 磁盘IO性能,单位MB/s(待废弃) | No |
PHostIPSet
Parameter name | Type | Description | Required |
OperatorName | string | 国际: Internation, BGP: Bgp, 内网: Private | No |
IPId | string | IP资源ID(内网IP无资源ID)(待废弃) | No |
IPAddr | string | IP地址, | No |
MACAddr | string | MAC地址 | No |
Bandwidth | int | IP对应带宽,单位Mb,内网IP不显示带宽信息 | No |
SubnetId | string | 子网ID | No |
VPCId | string | VPC ID | No |
Request Example
https://api.auto-ai.com.cn/?Action=DescribePHost &Region=cn-bj2 &Zone=cn-bj2-04 &ProjectId=org-xxx &Offset=0 &Limit=20 &PHostId.0=upm-xxx
Response Example
{ "RetCode": 0, "PHostSet": [ { "PHostId": "upm-xxx", "SN": "817336542", "PMStatus": "Running", "Name": "apyapy", "Remark": "", "Tag": "Default", "Zone": "cn-bj2-04", "ImageName": "CentOS 6.7 64Bit", "OSname": "CentOS 6.7 64Bit", "OSType": "CentOS", "CreateTime": 1529905686, "ExpireTime": 1530374400, "ChargeType": "Month", "AutoRenew": "On", "PowerState": "On", "PHostType": "DB-2", "IsSupportKVM": "Yes", "Memory": 65536, "CPUSet": { "Model": "Intel E5-2630 v3", "Frequence": 2.4000000953674316, "Count": 2, "CoreCount": 32 }, "DiskSet": [ { "Name": "sys", "IOCap": 1000, "Space": 1000, "Raid": "Raid1", "Type": "SATA" }, { "Name": "data", "IOCap": 1000, "Space": 1800, "Raid": "Raid10", "Type": "SAS" } ], "IPSet": [ { "OperatorName": "Bgp", "IPId": "eip-xxx", "IPAddr": "106.75.xxx.xxx", "Bandwidth": 2 }, { "OperatorName": "Private", "IPAddr": "10.10.xxx.xxx", "MACAddr": "xxx", "VPCId": "uvnet-xxx", "SubnetId": "subnet-xxx" } ] } ], "TotalCount": 1, "Action": "DescribePHostResponse" }