Docs
api
UHost(UHost)
DescribeUHostInstance

Retrieve Host Information - DescribeUHostInstance

Overview

Obtain information on the host or host list, and filter based on parameters such as data center, host ID, etc.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is DescribeUHostInstance.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ZonestringAvailability Zone. See Availability Zone ListNo
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
UHostIds.Nstring[Array] The resource ID of the UHost machine, for example, UHostIds.0 represents the host 1 you want to get information from, and UHostIds.1 represents host 2. If not passed in, it will return all UHost instances in the current Region that meet the conditions.No
TagstringThe name of the business group to be queriedNo
OffsetintList start position offset, default is 0No
LimitintReturn data length, default is 20, maximum 100No
IsolationGroupstringHardware isolation group id. Filter hosts through the hardware isolation group.No
VPCIdstringVPC ID. Filter hosts through VPC. Beijing 1 region is invalid.No
SubnetIdstringSubnet id. Filter hosts through subnet. Beijing Zone 1 is invalid.No
UDiskIdForAttachmentstringThe ID of the cloud disk to be mounted, filter and return the cloud host that can be mounted by UDiskId. Currently mainly used for rssd cloud disk.No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
TotalCountintTotal Number of UHost InstancesYes
UHostSetarray[UHostInstanceSet]List of cloud host instances, each parameter can be seen below in UHostInstanceSet.Yes

Data Model

UHostInstanceSet

Field NameTypeDescription InformationRequired
ZonestringAvailability Zone. See Availability Zone ListNo
UHostIdstringUHost Instance IDNo
UHostTypestring[Suggested not to use anymore] Cloud host machine type (old). Refer to Cloud host machine type description.No
MachineTypestringCloud Host Model (New). Refer to Cloud Host Model Description.No
CpuPlatformstringCloud Host CPU Platform. Refer to Cloud Host Type Description.No
StorageTypestring[Recommended not to use] Host disk type. Enumeration values are:

> LocalDisk, local disk;

> UDisk, cloud disk.

As long as there is a local disk, it returns LocalDisk.
No
ImageIdstring[Recommended not to use] The system disk ID of the host.No
BasicImageIdstringBase Image ID (refers to the source image of the current custom image)No
BasicImageNamestringBase Image Name (referring to the source image of the current custom image)No
TagstringBusiness Group NameNo
RemarkstringNoteNo
NamestringUHost Instance NameNo
StatestringInstance Status, enumeration values:

>Initializing: Initializing;

>Starting: Starting;

> Running: Running;

> Stopping: Stopping;

>Stopped: Stopped

>Install Fail: Install Fail;

>Rebooting: Rebooting;

> Unknown (empty string, status retrieval timed out or error):
No
CreateTimeintCreation time, in Unix timestamp formatNo
ChargeTypestringBilling mode, enumeration values are: Year, pay annually; Month, pay monthly; Dynamic, pay as you go (permission needs to be enabled); Preemptive is for preemptive instances;No
ExpireTimeintExpiration time, in Unix timestamp formatNo
CPUintNumber of virtual CPU cores, unit: piecesNo
MemoryintMemory size, unit: MBNo
AutoRenewstringWhether to renew automatically, automatic renewal: "Yes", no automatic renewal: "No".No
DiskSetarray[UHostDiskSet]See UHostDiskSet for disk information.No
IPSetarray[UHostIPSet]See details in UHostIPSetNo
NetCapabilitystringNetwork Enhancement. Normal: None; Super: Network Enhancement 1.0; Ultra: Network Enhancement 2.0No
NetworkStatestring[Recommended not to use] Network status. Connection: Connected, Disconnected: NotConnectedNo
TimemachineFeaturestring[Recommended not to use] UDataArk mode. Enumeration value:

> Yes: UDataArk enabled;

> No: UDataArk not enabled
No
SubnetTypestring[Recommended not to use] Only the cloud host in Beijing A will return this field. Basic network mode: Default; Subnet mode: PrivateNo
OsNamestringThe name of the operating system of the original source image when creating the host (if created directly through the basic image, the return here is consistent with BasicImageName)No
OsTypestringCategory of operating system. Returns 'Linux' or 'Windows'.No
HostTypestring[Recommended not to use] Host Series: N2, represents Series 2; N1, represents Series 1No
LifeCyclestringThe lifecycle type of the host. Currently, only Normal: Ordinary is supported.No
GPUintNumber of GPUsNo
GpuTypestringGPU Type; Enumeration Values ["K80", "P40", "V100", "T4", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S"]No
HotPlugMaxCpuintThe maximum number of CPUs supported by hot upgradeNo
BootDiskStatestringThe status of the system disk 'Normal' indicates initialization is complete; 'Initializing' indicates it is still initializing. System disks that are still initializing cannot create images.No
TotalDiskSpaceintTotal data disk storage space.No
IsolationGroupstringIsolation group id, return if not in the isolation group.No
RdmaClusterIdstringRDMA cluster id, only returned by outstanding cloud host; other types of cloud hosts return "". When the value of this cloud host is the same as the RdmaClusterId of the RSSD cloud disk, the RSSD can be mounted to this cloud host.No
RestrictModestringOnly preemptive instances are returned, LowSpeed is the slow mode, PowerOff is the shutdown mode.No
HotplugFeaturebooleantrue: Hot upgrade enabled; false, hot upgrade not enabledNo
CloudInitFeaturebooleantrue: Supports initialization via cloutinit; false: Does not supportNo
IPv6Featurebooleantrue: Has IPv6 feature; false, does not have IPv6 featureNo
HpcFeaturebooleantrue: HPC series function enabled; false: Not enabledNo
EpcInstancebooleantrue: High-performance computing host; false: NotNo
SecGroupInstancebooleantrue: Host bound to a security group; false: Not boundNo
HiddenKvmbooleantrue: Enable hidden KVM feature; false: NoNo
KeyPairUHostKeyPairSee UHostKeyPair for key informationNo
UDHostAttributeUDSetUDHostAttributeUDSet Host PropertiesNo
SpotAttributeSpotAttributeBidding Instance InformationNo

UHostDiskSet

Field NameTypeDescription InformationRequired
DiskTypestringDisk type. Please refer to Disk Type.Yes
IsBootstringIs it a system disk. Enumeration value:

> True, it is a system disk

> False, it is a data disk (default). There can only be one disk in the Disks array that is a system disk.
Yes
Encryptedstring"true": Encrypted Disk "false": Non-Encrypted DiskNo
Typestring[Recommended not to use] Disk type. System disk: Boot, Data disk: Data, Network disk: UdiskNo
DiskIdstringDisk IDNo
NamestringUDisk Name (only returned when the disk is UDisk)No
DrivestringDisk Drive LetterNo
SizeintDisk size, unit: GBNo
BackupTypestringBackup plan. If UDataArk is enabled, then it's DATAARK.No

UHostIPSet

Field NameTypeDescription InformationRequired
IPModestringIPv4/IPv6Yes
DefaultstringUnder the Private type of the internal network, it indicates whether it is the default network card. true: it is the default network card; other values: no.No
MacstringUnder the Private type of Intranet, the current network card's Mac.No
WeightintThe current weight of the EIP. The one with the highest weight is the current exit IP.No
TypestringInternational: International, BGP: Bgp, Private Network: PrivateNo
IPIdstringPublic IP Resource ID. (Internal IP does not have a corresponding Resource ID)No
IPstringIP AddressNo
BandwidthintBandwidth corresponding to the IP, unit: Mb (Bandwidth information is not displayed for internal IP)No
VPCIdstringThe VPC ID corresponding to the IP address. (Not supported in Beijing 1, the field returns empty)No
SubnetIdstringThe subnet ID corresponding to the IP address. (Not supported in Beijing 1, the field will return empty)No
NetworkInterfaceIdstringWhen the elastic network card is the default network card, return the corresponding ID value.No

UHostKeyPair

Field NameTypeDescription InformationRequired
KeyPairIdstringKey Pair IDNo
KeyPairStatestringHost Key Pair Status, Normal is Normal, Deleted is DeletedNo

UDSetUDHostAttribute

Field NameTypeDescription InformationRequired
UDHostIdstringUDSet HostNo
UDSetIdstringUDSetNo
HostBindingbooleanIs it bound to the UDSet host?No

SpotAttribute

Field NameTypeDescription InformationRequired
RecycleTimeintRecovery TimeNo

Example

Request Example

https://api.ucloud-global.com/?Action=DescribeUHostInstance
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=jrdYPkBQ
&UHostIds.N=AUNsCFMm
&Tag=DorQZLay
&LifeCycle=6
&Offset=6
&Limit=3
&IsolationGroup=nSNImHzi
&VPCId=FPnJyAyj
&SubnetId=HLhfwaFY
&NoEIP=false
&ResourceType=ghgUBbcV
&UDiskIdForAttachment=UQmrMUGU
&EpcInstance=true

Response Example

{
  "Action": "DescribeUHostInstanceResponse",
  "RetCode": 0,
  "TotalCount": 2,
  "UHostSet": [
    {
      "AutoRenew": "qSWETQza",
      "BasicImageId": "GCiPFJNV",
      "BasicImageName": "AilAICpK",
      "BootDiskState": "wvOqKxrL",
      "CPU": 1,
      "ChargeType": "eeXICSgb",
      "CloudInitFeature": true,
      "CpuPlatform": "aZLBvEiZ",
      "CreateTime": 2,
      "DiskSet": [
        {
          "BackupType": "wThaZMBG",
          "DiskId": "HGkYYGPC",
          "DiskType": "thFULWJN",
          "Drive": "eFKaOPGI",
          "Encrypted": "TTUcGitp",
          "IsBoot": "uYTOToOh",
          "Name": "AIFttSSZ",
          "Size": 9,
          "Type": "JJZViwCZ"
        }
      ],
      "EpcInstance": true,
      "ExpireTime": 4,
      "GPU": 4,
      "GpuType": "pJdSxKkv",
      "HiddenKvm": false,
      "HostType": "dQanjRcq",
      "HotplugFeature": true,
      "HpcFeature": false,
      "IPSet": [
        {
          "Bandwidth": 2,
          "Default": "PemrNWxq",
          "IP": "hGoWLqyN",
          "IPId": "qBthvXCJ",
          "SubnetId": "owZpgAju",
          "Type": "TBHMANhj",
          "VPCId": "KRvUYRsX"
        }
      ],
      "IPv6Feature": true,
      "ImageId": "laKdatME",
      "IsolationGroup": "uUbVSIFS",
      "KeyPair": {},
      "LifeCycle": "wtcCMMQT",
      "MachineType": "PyCWLFIG",
      "Memory": 9,
      "Name": "gsILwqks",
      "NetCapability": "txhhItss",
      "NetworkState": "jquNUNJz",
      "OsName": "QHGtNxIw",
      "OsType": "CnavCvrW",
      "RdmaClusterId": "TqrHYSXc",
      "Remark": "MxEcJQhA",
      "RestrictMode": "EeJHESCx",
      "SecGroupInstance": false,
      "State": "UtnhXfCa",
      "StorageType": "tEDwzsXb",
      "SubnetType": "ZSfByswJ",
      "Tag": "GbFHtrBQ",
      "TimemachineFeature": "tZqkqfws",
      "TotalDiskSpace": 3,
      "UHostId": "qPzuUUCE",
      "UHostType": "QaByhkja",
      "Zone": "CiMUTSzW"
    }
  ]
}