Queries the details of dedicated hosts, including the physical performance specifications, machine codes, and service states of the dedicated hosts, and Elastic Compute Service (ECS) instances that are created on the dedicated hosts.

Usage notes

You can use one of the following methods to query the details of dedicated hosts:

  • Specify DedicatedHostIds to query the details of dedicated hosts.
  • Specify DedicatedHostClusterId to query the details of the dedicated hosts in a dedicated host cluster.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeDedicatedHosts

The operation that you want to perform. Set the value to DescribeDedicatedHosts.

RegionIdStringYescn-hangzhou

The region ID of the dedicated host. You can call the DescribeRegions operation to query the most recent region list.

ZoneIdStringNocn-hangzhou-g

The zone ID of the dedicated host. You can call the DescribeZones operation to query the most recent zone list.

DedicatedHostIdsStringNo["dh-bp165p6xk2tlw61e****", "dh-bp1f9vxmno7emy96****"]

The IDs of dedicated hosts. You can specify up to 100 dedicated host IDs in a single request. Separate the IDs with commas (,).

DedicatedHostNameStringNoMyDDHTestName

The name of the dedicated host.

StatusStringNoAvailable

The service state of the dedicated host. Valid values:

  • Available: The dedicated host is running normally.
  • UnderAssessment: The dedicated host is available but has potential risks that may cause the ECS instances on the dedicated host to fail.
  • PermanentFailure: The dedicated host encounters permanent failures and is unavailable.
  • TempUnavailable: The dedicated host is temporarily unavailable.
  • Redeploying: The dedicated host is being restored.

Default value: Available.

DedicatedHostTypeStringNoddh.g5

The dedicated host type. You can call the DescribeDedicatedHostTypes operation to obtain the most recent list of dedicated host types.

LockReasonStringNofinancial

The reason why the dedicated host is locked. Valid values:

  • financial
  • security
PageNumberIntegerNo1

The number of entries per page.

Default value: 1.

PageSizeIntegerNo10

The page number.

Valid values: 1 to 100.

Default value: 10.

ResourceGroupIdStringNorg-aek3b6jzp66****

The ID of the resource group to which the dedicated host belongs. When this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.

Note Resources in the default resource group are displayed in the response regardless of how this parameter is set.
Tag.N.KeyStringNoTestKey

The key of tag N of the dedicated host. Valid values of N: 1 to 20. The tag key cannot be an empty string. It can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

Tag.N.ValueStringNoTestValue

The value of tag N of the dedicated host. Valid values of N: 1 to 20. The tag value can be an empty string. It can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

DedicatedHostClusterIdStringNodc-bp12wlf6am0vz9v2****

The ID of the dedicated host cluster to which the dedicated host belongs.

SocketDetailsStringNotrue

Specifies whether to display socket information. Valid values:

  • true
  • false

Response parameters

ParameterTypeExampleDescription
PageSizeInteger1

The number of entries per page.

RequestIdString7654525A-9964-4ABB-8BCD-98F8835E809A

The request ID.

PageNumberInteger5

The page number.

TotalCountInteger3

The total number of dedicated hosts.

DedicatedHostsArray of DedicatedHost

The queried dedicated hosts.

DedicatedHost
CreationTimeString2018-01-01T12:00Z

The time when the dedicated host was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

SchedulerOptions.ManagedPrivateSpaceIdStringmps-iq81z6pkbqjx61php46e

The ID of the managed private space to which the dedicated host belongs.

StatusStringAvailable

The service state of the dedicated host. Valid values:

  • Available: The dedicated host is running normally.
  • UnderAssessment: The dedicated host is available but has potential risks that may cause the ECS instances on the dedicated host to fail.
  • PermanentFailure: The dedicated host encounters permanent failures and is unavailable.
CoresInteger3

The number of physical cores per CPU.

AutoPlacementStringon

Indicates whether the dedicated host was added to the resource pool for automatic deployment. Valid values:

  • on: The dedicated host was added to the resource pool for automatic deployment.
  • off: The dedicated host was not added to the resource pool for automatic deployment.

For more information about automatic deployment, see the "Automatic deployment" section in the Functions and features topic.

GPUSpecStringgpu

The GPU model.

AutoReleaseTimeString2017-01-01T12:00Z

The automatic release time of the dedicated host. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

ChargeTypeStringPrepaid

The billing method of the dedicated host.

CpuOverCommitRatioFloat1

The CPU overcommit ratio.

ActionOnMaintenanceStringMigrate

The policy used to migrate the instances deployed on the dedicated host when the dedicated host fails. Valid values:

  • Migrate: The instances are migrated to another physical server. Instances that are not in the Stopped state when the dedicated host fails are restarted.
  • Stop: The instances are stopped. If the dedicated host cannot be restored, the instances are migrated to another physical server and restarted.

If the dedicated host has cloud disks attached, the default value is Migrate. If the dedicated host has local disks attached, the default value is Stop.

SaleCycleStringMonth

The unit of the subscription period. Valid values:

  • Month
  • Year
PhysicalGpusInteger10

The number of physical GPUs.

RegionIdStringcn-hangzhou

The region ID of the dedicated host.

DedicatedHostNameStringMyDDHTestName

The name of the dedicated host.

DescriptionStringthis-is-my-DDH

The description of the dedicated host.

DedicatedHostClusterIdStringdc-bp12wlf6am0vz9v2****

The ID of the dedicated host cluster to which the dedicated host belongs.

ExpiredTimeString2019-01-01T12:00Z

The expiration time of the subscription dedicated host. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

DedicatedHostTypeStringddh.g5

The type of the dedicated host.

ResourceGroupIdStringrg-aek3b6jzp66****

The ID of the resource group to which the dedicated host belongs.

ZoneIdStringcn-hangzhou-g

The zone ID of the dedicated host.

DedicatedHostIdStringdh-bp165p6xk2tlw61e****

The ID of the dedicated host.

SocketsInteger5

The number of physical CPUs.

MachineIdString12aaa123456ff19dec12345d3026e****

The machine code of the dedicated host.

InstancesArray of Instance

The ECS instances that were created on the dedicated host.

Instance
InstanceTypeStringecs.g5.large

The instance type of the ECS instance.

InstanceIdStringi-bp14ot0ykf8w13a1****

The ID of the ECS instance.

SocketIdString0,1

The ID of the socket to which the ECS instance belongs.

InstanceOwnerIdLong128************0

The ID of the ECS instance owner.

OperationLocksArray of OperationLock

The reasons why the resources of the dedicated host were locked.

OperationLock
LockReasonStringfinancial

The reason why the dedicated host was locked. Valid values:

  • financial
  • security
TagsArray of Tag

The tags of the dedicated host.

Tag
TagValueStringTestValue

The tag value of the dedicated host.

TagKeyStringTestKey

The tag key of the dedicated host.

SupportedInstanceTypeFamiliesArray of Stringecs.g5

The ECS instance families supported by the dedicated host.

SupportedCustomInstanceTypeFamiliesArray of Stringecs.ddh6s.custom

The custom ECS instance families supported by the dedicated host.

SupportedInstanceTypesListArray of Stringecs.g5.large

The ECS instance types supported by the dedicated host.

CapacityObject

The performance specifications of the dedicated host.

AvailableMemoryFloat25

The amount of available memory. Unit: GiB.

LocalStorageCategoryStringi2

The instance family that uses local disks.

TotalMemoryFloat1024

The total capacity of the memory. Unit: GiB.

TotalLocalStorageInteger512

The total capacity of local disks. Unit: GiB.

TotalVcpusInteger56

The total number of vCPUs.

TotalVgpusInteger10

The total number of vGPUs.

AvailableLocalStorageInteger65

The amount of available capacity on the local disks. Unit: GiB.

AvailableVcpusInteger5

The number of available vCPUs.

AvailableVgpusInteger2

The number of available vGPUs.

SocketCapacitiesArray of SocketCapacity

The socket capacities.

SocketCapacity
SocketIdInteger1

The socket ID.

AvailableMemoryFloat65

The remaining capacity of the memory. Unit: GiB.

TotalMemoryFloat128

The total capacity of the memory. Unit: GiB.

AvailableVcpuInteger64

The total number of vCPUs.

TotalVcpuInteger128

The number of available vCPUs.

NetworkAttributesObject

The network attributes of the dedicated host.

UdpTimeoutInteger60

The timeout period of the UDP session that is established between a user and an Alibaba Cloud service on the dedicated host. Unit: seconds. Valid value: 60.

SlbUdpTimeoutInteger60

The timeout period of the UDP session that was established between Server Load Balancer (SLB) and the dedicated host. Unit: seconds. Valid value: 60.

HostDetailInfoObject

This parameter will be removed in the future. We recommend that you use other parameters to ensure future compatibility.

SerialNumberStringnull

This parameter will be removed in the future. We recommend that you use other parameters to ensure future compatibility.

DedicatedHostOwnerIdLong100************7

The ID of the dedicated host owner.

Examples

Sample requests

http(s)://ecs.aliyuncs.com/?Action=DescribeDedicatedHosts
&RegionId=cn-hangzhou
&ZoneId=cn-hangzhou-g
&DedicatedHostIds=["dh-bp165p6xk2tlw61e****", "dh-bp1f9vxmno7emy96****"]
&DedicatedHostName=MyDDHTestName
&Status=Available
&DedicatedHostType=ddh.g5
&LockReason=financial
&PageNumber=1
&PageSize=10
&ResourceGroupId=rg-aek3b6jzp66****
&Tag=[{"Key":"TestKey","Value":"TestValue"}]
&DedicatedHostClusterId=dc-bp12wlf6am0vz9v2****
&SocketDetails=true
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDedicatedHostsResponse>
    <PageSize>1</PageSize>
    <RequestId>7654525A-9964-4ABB-8BCD-98F8835E809A</RequestId>
    <PageNumber>5</PageNumber>
    <TotalCount>3</TotalCount>
    <DedicatedHosts>
        <CreationTime>2018-01-01T12:00Z</CreationTime>
        <SchedulerOptions.ManagedPrivateSpaceId>mps-iq81z6pkbqjx61php46e</SchedulerOptions.ManagedPrivateSpaceId>
        <Status>Available</Status>
        <Cores>3</Cores>
        <AutoPlacement>on</AutoPlacement>
        <GPUSpec>gpu</GPUSpec>
        <AutoReleaseTime>2017-01-01T12:00Z</AutoReleaseTime>
        <ChargeType>Prepaid</ChargeType>
        <CpuOverCommitRatio>1</CpuOverCommitRatio>
        <ActionOnMaintenance>Migrate</ActionOnMaintenance>
        <SaleCycle>Month</SaleCycle>
        <PhysicalGpus>10</PhysicalGpus>
        <RegionId>cn-hangzhou</RegionId>
        <DedicatedHostName>MyDDHTestName</DedicatedHostName>
        <Description>this-is-my-DDH</Description>
        <DedicatedHostClusterId>dc-bp12wlf6am0vz9v2****</DedicatedHostClusterId>
        <ExpiredTime>2019-01-01T12:00Z</ExpiredTime>
        <DedicatedHostType>ddh.g5</DedicatedHostType>
        <ResourceGroupId>rg-aek3b6jzp66****</ResourceGroupId>
        <ZoneId>cn-hangzhou-g</ZoneId>
        <DedicatedHostId>dh-bp165p6xk2tlw61e****</DedicatedHostId>
        <Sockets>5</Sockets>
        <MachineId>12aaa123456ff19dec12345d3026e****</MachineId>
        <Instances>
            <InstanceType>ecs.g5.large</InstanceType>
            <InstanceId>i-bp14ot0ykf8w13a1****</InstanceId>
            <SocketId>0,1</SocketId>
        </Instances>
        <OperationLocks>
            <LockReason>financial</LockReason>
        </OperationLocks>
        <Tags>
            <TagValue>TestValue</TagValue>
            <TagKey>TestKey</TagKey>
        </Tags>
        <SupportedInstanceTypeFamilies>ecs.g5</SupportedInstanceTypeFamilies>
        <SupportedCustomInstanceTypeFamilies>ecs.ddh6s.custom</SupportedCustomInstanceTypeFamilies>
        <SupportedInstanceTypesList>ecs.g5.large</SupportedInstanceTypesList>
        <Capacity>
            <AvailableMemory>25</AvailableMemory>
            <LocalStorageCategory>i2</LocalStorageCategory>
            <TotalMemory>1024</TotalMemory>
            <TotalLocalStorage>512</TotalLocalStorage>
            <TotalVcpus>56</TotalVcpus>
            <TotalVgpus>10</TotalVgpus>
            <AvailableLocalStorage>65</AvailableLocalStorage>
            <AvailableVcpus>5</AvailableVcpus>
            <AvailableVgpus>2</AvailableVgpus>
            <SocketCapacities>
                <SocketId>1</SocketId>
                <AvailableMemory>65</AvailableMemory>
                <TotalMemory>128</TotalMemory>
                <AvailableVcpu>64</AvailableVcpu>
                <TotalVcpu>128</TotalVcpu>
            </SocketCapacities>
        </Capacity>
        <NetworkAttributes>
            <UdpTimeout>60</UdpTimeout>
            <SlbUdpTimeout>60</SlbUdpTimeout>
        </NetworkAttributes>
        <HostDetailInfo>
            <SerialNumber>null</SerialNumber>
        </HostDetailInfo>
    </DedicatedHosts>
</DescribeDedicatedHostsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "PageSize" : 1,
  "RequestId" : "7654525A-9964-4ABB-8BCD-98F8835E809A",
  "PageNumber" : 5,
  "TotalCount" : 3,
  "DedicatedHosts" : [ {
    "CreationTime" : "2018-01-01T12:00Z",
    "SchedulerOptions.ManagedPrivateSpaceId" : "mps-iq81z6pkbqjx61php46e",
    "Status" : "Available",
    "Cores" : 3,
    "AutoPlacement" : "on",
    "GPUSpec" : "gpu",
    "AutoReleaseTime" : "2017-01-01T12:00Z",
    "ChargeType" : "Prepaid",
    "CpuOverCommitRatio" : 1,
    "ActionOnMaintenance" : "Migrate",
    "SaleCycle" : "Month",
    "PhysicalGpus" : 10,
    "RegionId" : "cn-hangzhou",
    "DedicatedHostName" : "MyDDHTestName",
    "Description" : "this-is-my-DDH",
    "DedicatedHostClusterId" : "dc-bp12wlf6am0vz9v2****",
    "ExpiredTime" : "2019-01-01T12:00Z",
    "DedicatedHostType" : "ddh.g5",
    "ResourceGroupId" : "rg-aek3b6jzp66****",
    "ZoneId" : "cn-hangzhou-g",
    "DedicatedHostId" : "dh-bp165p6xk2tlw61e****",
    "Sockets" : 5,
    "MachineId" : "12aaa123456ff19dec12345d3026e****",
    "Instances" : [ {
      "InstanceType" : "ecs.g5.large",
      "InstanceId" : "i-bp14ot0ykf8w13a1****",
      "SocketId" : "0,1"
    } ],
    "OperationLocks" : [ {
      "LockReason" : "financial"
    } ],
    "Tags" : [ {
      "TagValue" : "TestValue",
      "TagKey" : "TestKey"
    } ],
    "SupportedInstanceTypeFamilies" : [ "ecs.g5" ],
    "SupportedCustomInstanceTypeFamilies" : [ "ecs.ddh6s.custom" ],
    "SupportedInstanceTypesList" : [ "ecs.g5.large" ],
    "Capacity" : {
      "AvailableMemory" : 25,
      "LocalStorageCategory" : "i2",
      "TotalMemory" : 1024,
      "TotalLocalStorage" : 512,
      "TotalVcpus" : 56,
      "TotalVgpus" : 10,
      "AvailableLocalStorage" : 65,
      "AvailableVcpus" : 5,
      "AvailableVgpus" : 2,
      "SocketCapacities" : [ {
        "SocketId" : 1,
        "AvailableMemory" : 65,
        "TotalMemory" : 128,
        "AvailableVcpu" : 64,
        "TotalVcpu" : 128
      } ]
    },
    "NetworkAttributes" : {
      "UdpTimeout" : 60,
      "SlbUdpTimeout" : 60
    },
    "HostDetailInfo" : {
      "SerialNumber" : "null"
    }
  } ]
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidStatus.ValueNotSupportedThe pecified dedicated host status is not supported.This operation cannot be performed on the dedicated host in the current state.
400MissingParamter.RegionIdThe regionId should not be null.RegionId is required.
400InvalidParameter.DedicatedHostIdsThe specified parameter dedicatedHostIds is not valid.Invalid DedicatedHostIds value.
400InvalidRegion.NotFoundThe specified parameter RegionId is not valid.Invalid RegionId value.
400InvalidZone.NotFoundThe specified parameter ZoneId is not valid.Invalid ZoneId value.
403InvalidDedicatedHostIds.MalformedThe amount of specified dedicatedHostIds exceeds the limit.More than 100 dedicated host IDs are specified in the DedicatedHostIds value.
404InvalidLockReason.NotFoundThe specified LockReason is not found.The specified LockReason value is not found.

For a list of error codes, see Service error codes.