You can call the DescribeDedicatedHosts operation to query the information about one or more hosts in a dedicated cluster.

Dedicated clusters allow you to manage a number of instances at a time. You can create multiple dedicated clusters in a single region. Each dedicated cluster consists of multiple hosts. You can create multiple instances on each host. For more information, see What is ApsaraDB MyBase?

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes Query hosts in dedicated cluster

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

DedicatedHostGroupId String Yes dhg-7a9xxxxxxxx

The ID of the dedicated cluster. You can call the DescribeDedicatedHostGroups operation to query the IDs of dedicated clusters.

RegionId String No cn-hangzhou

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

OrderId Long No 102565235

The ID of the order.

HostType String No dhg_cloud_ssd

The type of storage media that is used for the hosts. Valid values:

  • dhg_cloud_ssd: enhanced solid-state drive (SSD)
  • dhg_local_ssd: local SSD
HostStatus String No 1

The status of the hosts. Valid values:

  • 0: queries the hosts that are being created
  • 1: queries the hosts that are running
  • 2: queries the hosts that are faulty
  • 3: queries the hosts that are being replaced
  • 4: queries the hosts that are deprecated
  • 5: queries the hosts that are being deleted
  • 6: queries the hosts that are restarting
AllocationStatus String No 1

Specifies whether to query the hosts on which you can create instances or those on which you cannot create instances. Valid values:

  • 0: queries the hosts on which you cannot create instances
  • 1: queries the hosts on which you can create instances
ZoneId String No cn-hangzhou-i

The zone ID of the hosts.

DedicatedHostId String No ch-t4nn100ddxxxxxxxx

The ID of the host.

Response parameters

Parameter Type Example Description
DedicatedHostGroupId String dhg-7a9xxxxxxxx

The ID of the dedicated cluster.

DedicatedHosts Array of DedicatedHosts

An array that consists of hosts returned.

DedicatedHosts
AccountName String test123

The account of the host. You can call the CreateDedicatedHostAccount operation to create a host account.

AllocationStatus String 1

Indicates whether the system allows you to create instances on the host. Valid values:

  • 0: The system does not allow you to create instances on the host.
  • 1: The system allows you to create instances on the host.
BastionInstanceId String bastionhost-cn-m7xxxxxxxx

The ID of the bastion host.

CPUAllocationRatio String 200

The core overcommitment ratio of the dedicated cluster. Unit: %. For more information about the core overcommitment ratio, see Manage a dedicated cluster.

CpuUsed String 4

The number of used cores on the host.

CreatedTime String 2021-03-25 17:29:06.0

The time when the host was created.

DedicatedHostGroupId String dhg-7a9xxxxxxxx

The ID of the dedicated cluster.

DedicatedHostId String i-bpxxxxxxx

The ID of the host.

DiskAllocationRatio String 200

The disk overcommitment ratio of the dedicated cluster. Unit: %. For more information about the disk overcommitment ratio, see Manage a dedicated cluster.

EndTime String 2021-04-25T16:00:00Z

The time when the host expires.

Engine String mysql

The database engine of instances that are created on the host.

HostCPU String 8

The total number of cores that are configured for the host.

HostClass String ecs.i2.16xlarge

The specifications of the host.

HostMem String 32238

The total memory space of the host. Unit: MB.

HostName String testHost1

The name of the host.

HostStatus String 1

The status of the host. Valid values:

  • 0: The host is being created.
  • 1: The host is running.
  • 2: The host is faulty.
  • 3: The host is being replaced.
  • 4: The host is deprecated.
  • 5: The host is being deleted.
  • 6: The host is restarting.
HostStorage String 2097152

The storage capacity of the host. Unit: MB.

HostType String dhg_cloud_ssd

The type of storage media that is used for the host. Valid values:

  • dhg_cloud_ssd: enhanced SSD
  • dhg_local_ssd: local SSD
IPAddress String 192.xx.xx.xx

The internal IP address of the host.

ImageCategory String WindowsWithMssqlStdLicense

The image of the host. This parameter is returned only when the Engine parameter is set to mssql. Valid values:

  • WindowsWithMssqlStdLicense: a Windows image, which contains the licenses of the SQL Server Standard Edition
  • WindowsWithMssqlEntLisence: a Windows image, which contains the licenses of the SQL Server Enterprise Edition
  • WindowsWithMssqlWebLisence: a Windows image, which contains the licenses of the SQL Server Web Edition
InstanceNumber String 4

The total number of instances that are created on the host.

MemAllocationRatio String 90

The maximum memory usage per host in the dedicated cluster.

MemoryUsed String 16384

The amount of used memory space on the host. Unit: MB.

OpenPermission String 3

Indicates whether the operating system permissions of the host can be granted. Valid values:

  • 0 or null: The permissions cannot be granted.
  • 1: The permissions can be granted.
  • 3: The permissions have been granted.
StorageUsed String 0

The amount of used storage space on the host.

VPCId String vpc-bpxxxxxxx

The ID of the virtual private cloud (VPC) to which the host belongs.

VSwitchId String vsw-bpxxxxxxx

The ID of the vSwitch associated with the specified VPC.

ZoneId String cn-hangzhou-i

The zone ID of the host.

RequestId String C860658E-68A6-46C1-AF6E-3AE7C4D3CACF

The ID of the request.

Examples

Sample requests

http(s)://rds.aliyuncs.com/?Action=DescribeDedicatedHosts
&DedicatedHostGroupId=dhg-7a9xxxxxxxx
&<Common request parameters>

Sample success responses

XML format

<DescribeDedicatedHostsResponse>
      <DedicatedHosts>
            <DedicatedHosts>
                  <CPUAllocationRatio>200</CPUAllocationRatio>
                  <DiskAllocationRatio>200</DiskAllocationRatio>
                  <DedicatedHostId>i-bpxxxxxxx</DedicatedHostId>
                  <InstanceNumber>4</InstanceNumber>
                  <CreatedTime>2021-03-25 17:29:06.0</CreatedTime>
                  <EndTime>2021-04-25T16:00:00Z</EndTime>
                  <DedicatedHostGroupId>dhg-7a9xxxxxxxx</DedicatedHostGroupId>
                  <BastionInstanceId>bastionhost-cn-m7xxxxxxxx</BastionInstanceId>
                  <ImageCategory>WindowsWithMssqlStdLicense</ImageCategory>
                  <HostStorage>2097152</HostStorage>
                  <OpenPermission>3</OpenPermission>
                  <HostType>dhg_cloud_ssd</HostType>
                  <HostMem>32238</HostMem>
                  <MemoryUsed>16384</MemoryUsed>
                  <HostStatus>1</HostStatus>
                  <CpuUsed>4</CpuUsed>
                  <Engine>mysql</Engine>
                  <HostName>testHost1</HostName>
                  <AllocationStatus>1</AllocationStatus>
                  <ZoneId>cn-hangzhou-i</ZoneId>
                  <MemAllocationRatio>90</MemAllocationRatio>
                  <VPCId>vpc-bpxxxxxxx</VPCId>
                  <VSwitchId>vsw-bpxxxxxxx</VSwitchId>
                  <StorageUsed>0</StorageUsed>
                  <HostClass>ecs.i2.16xlarge</HostClass>
                  <HostCPU>8</HostCPU>
                  <IPAddress>192.xx.xx.xx</IPAddress>
                  <AccountName>test123</AccountName>
            </DedicatedHosts>
      </DedicatedHosts>
      <RequestId>C860658E-68A6-46C1-AF6E-3AE7C4D3CACF</RequestId>
      <DedicatedHostGroupId>dhg-7a9xxxxxxxx</DedicatedHostGroupId>
</DescribeDedicatedHostsResponse>
            <DedicatedHosts>
                  <CPUAllocationRatio>200</CPUAllocationRatio>
                  <DiskAllocationRatio>200</DiskAllocationRatio>
                  <DedicatedHostId>i-bpxxxxxxx</DedicatedHostId>
                  <InstanceNumber>4</InstanceNumber>
                  <CreatedTime>2021-03-25 17:29:06.0</CreatedTime>
                  <EndTime>2021-04-25T16:00:00Z</EndTime>
                  <DedicatedHostGroupId>dhg-7a9xxxxxxxx</DedicatedHostGroupId>
                  <BastionInstanceId>bastionhost-cn-m7xxxxxxxx</BastionInstanceId>
                  <ImageCategory>WindowsWithMssqlStdLicense</ImageCategory>
                  <HostStorage>2097152</HostStorage>
                  <OpenPermission>3</OpenPermission>
                  <HostType>dhg_cloud_ssd</HostType>
                  <HostMem>32238</HostMem>
                  <MemoryUsed>16384</MemoryUsed>
                  <HostStatus>1</HostStatus>
                  <CpuUsed>4</CpuUsed>
                  <Engine>mysql</Engine>
                  <HostName>testHost1</HostName>
                  <AllocationStatus>1</AllocationStatus>
                  <ZoneId>cn-hangzhou-i</ZoneId>
                  <MemAllocationRatio>90</MemAllocationRatio>
                  <VPCId>vpc-bpxxxxxxx</VPCId>
                  <VSwitchId>vsw-bpxxxxxxx</VSwitchId>
                  <StorageUsed>0</StorageUsed>
                  <HostClass>ecs.i2.16xlarge</HostClass>
                  <HostCPU>8</HostCPU>
                  <IPAddress>192.xx.xx.xx</IPAddress>
                  <AccountName>test123</AccountName>
            </DedicatedHosts>
      </DedicatedHosts>
      <RequestId>C860658E-68A6-46C1-AF6E-3AE7C4D3CACF</RequestId>
      <DedicatedHostGroupId>dhg-7a9xxxxxxxx</DedicatedHostGroupId>
</DescribeDedicatedHostsResponse>

JSON format

{
    "DedicatedHosts": {
        "DedicatedHosts": [{
            "CPUAllocationRatio": "200",
            "DiskAllocationRatio": "200",
            "DedicatedHostId": "i-bpxxxxxxx",
            "InstanceNumber": "4",
            "CreatedTime": "2021-03-25 17:29:06.0",
            "EndTime": "2021-04-25T16:00:00Z",
            "DedicatedHostGroupId": "dhg-7a9xxxxxxxx",
            "BastionInstanceId": "bastionhost-cn-m7xxxxxxxx",
            "ImageCategory": "WindowsWithMssqlStdLicense",
            "HostStorage": "2097152",
            "OpenPermission": "3",
            "HostType": "dhg_cloud_ssd",
            "HostMem": "32238",
            "MemoryUsed": "16384",
            "HostStatus": "1",
            "CpuUsed": "4",
            "Engine": "mysql",
            "HostName": "testHost1",
            "AllocationStatus": "1",
            "ZoneId": "cn-hangzhou-i",
            "MemAllocationRatio": "90",
            "VPCId": "vpc-bpxxxxxxx",
            "VSwitchId": "vsw-bpxxxxxxx",
            "StorageUsed": "0",
            "HostClass": "ecs.i2.16xlarge",
            "HostCPU": "8",
            "IPAddress": "192.xx.xx.xx",
            "AccountName": "test123"
        }]
    },
    "RequestId": "C860658E-68A6-46C1-AF6E-3AE7C4D3CACF",
    "DedicatedHostGroupId": "dhg-7a9xxxxxxxx"
}

Error codes

For a list of error codes, visit the API Error Center.