获取物理机信息-DescribePHost

获取物理机详细信息

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
Zonestring可用区。参见 可用区列表No
ProjectIdstring项目ID。不填写为默认项目,子帐号必须填写。 请参考GetProjectList接口No
PHostId.nstringPHost资源ID,若为空,则返回当前Region所有PHost。No
Offsetint数据偏移量,默认为0No
Limitint返回数据长度,默认为20No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
TotalCountint满足条件的PHost总数No
PHostSetarrayPHost资源列表,参见 PHostSetNo

PHostSet

Parameter nameTypeDescriptionRequired
Zonestring可用区,参见 可用区列表No
PHostIdstringPHost资源IDNo
SNstring物理机序列号No
PMStatusstring物理云主机状态,初始化:Initializing; 启动中:Starting; 运行中:Running;关机中:Stopping; 安装失败:InstallFailed; 重启中:Rebooting;关机:Stopped; 已删除:Terminated;冻结: Locked;No
Namestring物理机名称No
Remarkstring物理机备注No
Tagstring业务组No
ImageNamestring镜像名称No
OSnamestring操作系统名称No
CreateTimeint创建时间No
ExpireTimeint到期时间No
ChargeTypestring计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限); Trial,试用(需开启权限)默认为月付No
PowerStatestring电源状态,on 或 offNo
PHostTypestring物理机类型,DB或SSDNo
Memoryint内存大小,单位:MBNo
CPUSetarrayCPU信息,见 PHostCPUSetNo
DiskSetarray磁盘信息,见 PHostDiskSetNo
IPSetarrayIP信息,见 PHostIPSetNo
Clusterstring网络环境,千兆:1G ,万兆:10GNo
AutoRenewstring自动续费No
IsSupportKVMstring是否支持紧急登录No
OSTypestring操作系统类型No
Componentsstring组件信息(暂不支持)No

PHostCPUSet

Parameter nameTypeDescriptionRequired
ModelstringCPU型号No
FrequencefloatCPU主频No
CountintCPU个数No
CoreCountintCPU核数No

PHostDiskSet

Parameter nameTypeDescriptionRequired
Spaceint单盘大小 单位GBNo
Countint磁盘数量No
Typestring磁盘属性No
Namestring磁盘名称,sys/dataNo
IOCapint磁盘IO性能,单位MB/s(待废弃)No

PHostIPSet

Parameter nameTypeDescriptionRequired
OperatorNamestring 国际: Internation, BGP: Bgp, 内网: Private No
IPIdstringIP资源ID(内网IP无资源ID)(待废弃)No
IPAddrstringIP地址,No
MACAddrstringMAC地址No
BandwidthintIP对应带宽,单位Mb,内网IP不显示带宽信息No
SubnetIdstring子网IDNo
VPCIdstringVPC IDNo

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"
}