Queries the details of hosts in a dedicated cluster.

After hosts are created in a dedicated cluster, you can view the details of the hosts. The details include performance metrics, the total number of CPU cores, the total memory, and the total storage.

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 DescribeDedicatedHosts

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

RegionId String Yes cn-hangzhou

The ID of the region.

DedicatedHostGroupId String Yes dhg-h5i4p331f509****

The ID of the dedicated cluster. You can log on to the ApsaraDB MyBase console and go to the Dedicated Clusters page to view the dedicated cluster ID.

OrderId Long No 123456789

The ID of the order. You can log on to the Billing Management console and go to the Orders page to view the order ID.

HostType String No dhg_cloud_ssd

The storage type of the host. Valid values:

  • dhg_local_ssd: local SSD
  • dhg_cloud_ssd or dhg_cloud_essd: enhanced SSD (ESSD)
HostStatus String No 1

The state 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 ready for disabling.
  • 4: The host is being maintained.
  • 5: The host is disabled.
  • 6: The host is restarting.
  • 7: The host is locked.
Note When a host fails, the host is disabled. Before the host is disabled, the data of the instances that run on the host is migrated to another host.
AllocationStatus String No Allocatable

Specifies whether instances can be created on the host. Valid values:

  • Allocatable: Instances can be created on the host.
  • Suspended: Instances cannot be created on the host.
ZoneId String No ap-southeast-1a

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

DedicatedHostId String No ch-bp10a5id3boqi****

The ID of the host in the dedicated cluster. You can log on to the ApsaraDB MyBase console and go to the Hosts page to view the host ID.

PageNumbers Integer No 50

The total number of pages to return.

PageSize Integer No 20

The number of entries to return on each page.

Tags String No {"key1":"value1"}

The tags that are added to the host. Each tag is a key-value pair that consists of TagKey and TagValue. You can specify a maximum of five tags in the following format for each request: {"key1":"value1","key2":"value2"...}.

Note If you want to filter hosts by tag, do not specify the DedicatedHostId parameter. Otherwise, the DedicatedHostId parameter is used as the filter condition.

Response parameters

Parameter Type Example Description
TotalRecords Integer 40

The total number of entries returned.

PageSize Integer 20

The number of entries returned per page.

RequestId String D6E068C3-25BC-455A-85FE-45F0B22EASER

The ID of the request.

PageNumbers Integer 2

The total number of returned pages.

DedicatedHostGroupId String dhg-6w7q18iwt5jo****

The ID of the dedicated cluster.

DedicatedHosts Array of DedicatedHosts

Details of the hosts.

DedicatedHosts
HostType String dhg_cloud_ssd

The storage type of the host.

HostStorage String 1234

The total storage of the host. Unit: GB.

MemoryUsed String 24576

The amount of memory used by the host. Unit: GB.

DedicatedHostGroupId String dhg-6w7q18iwt5jo****

The ID of the dedicated cluster in which the host is created.

AllocationStatus String Suspended

Indicates whether instances can be created on the host. Valid values:

  • Allocatable: Instances can be created on the host.
  • Suspended: Instances cannot be created on the host.
StorageUsed String 588800

The amount of storage used by the host. Unit: GB.

EcsClassCode String ecs.r5.16xlarge

The instance type of the Elastic Compute Service (ECS) instance. For more information, see Overview of instance families.

DedicatedHostId String ch-bp10a5id3boqi****

The ID of the host.

MemAllocationRatio String 90

The memory usage of the host. Unit: %.

CreatedTime String 2020-10-16 16:30:19

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

IPAddress String 192.168.XX.XX

The IP address of the host.

HostStatus String 1

The state 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 ready for disabling.
  • 4: The host is being maintained.
  • 5: The host is disabled.
  • 6: The host is restarting.
  • 7: The host is locked.
Note When a host fails, the host is disabled. Before the host is disabled, the data of the instances that run on the host is migrated to another host.
HostName String ch-bp15xfnp706tl****

The name of the host.

HostCPU String 16

The number of CPU cores of the host.

CpuUsed String 10

The number of used CPU cores.

InstanceNumber String 1

The number of instances created on the host.

OpenPermission String 1

Indicates whether the feature that allows you to have the OS permissions on the host is enabled. Default value: 1. Valid values:

  • 0: The feature is disabled.
  • 1: The feature is enabled.
DistributionSymbol String 0

The distribution symbol of the host.

Note This parameter is returned only if the host is created in an ApsaraDB MyBase for Redis dedicated cluster of the Enhanced Edition (Tair).
VPCId String vpc-bp1roz55mrbj3ka1s****

The ID of the virtual private cloud (VPC) in which the dedicated cluster is deployed. The host is created in the dedicated cluster.

HostClass String rds.g6.4xlarge

The instance type of the host.

EndTime String 2021-10-16 16:30:19

The time when the host expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

VSwitchId String vsw-bp133c8ifzxd3iv6q****

The ID of the vSwitch to which the host is connected.

ZoneId String ap-southeast-1a

The ID of the zone in which the host resides.

CPUAllocationRatio String 10

The CPU utilization of the host.

ImageCategory String ALinux

The image type of the host.

Engine String mysql

The database engine of the host.

DiskAllocationRatio String 10

The disk usage of the host. Unit: %.

HostMem String 65536

The amount of memory of the host. Unit: GB.

BastionInstanceId String bastionhost-cn-i7m2fgw****

The ID of the bastion host with which the host is associated.

AccountName String test

The custom name of the host account.

  • The name can contain lowercase letters, digits, and underscores (_).
  • The name must start with a lowercase letter and end with a lowercase letter or a digit.
  • The name must be 2 to 16 characters in length.
AccountType String Normal

The type of the host account. Valid values:

Normal: standard account

Admin: an administrator account

DistributionTag String t4n9uz07h3r1tmcejtxf:1

The distribution tag of the host.

Category String Standard

The type of the dedicated cluster. Valid values:

  • Pro: Proprietary MyBase
  • Standard: Managed MyBase
Note This parameter is returned only for the China site (aliyun.com).
EcsId String i-2zec7l031p0jtru3pn7a

The ID of the ECS instance.

Note This parameter is returned only when the dedicated cluster type is Proprietary MyBase for the China site (aliyun.com).
DiskInfo String {\"SystemDiskSize\":20,\"DataDiskCount\":0,\"DataDiskSize\":0,\"DataDiskCategory\":[\"\"],\"SystemDiskCategory\":\"cloud_essd\"}

The disk information of the ECS instance.

Note This parameter is returned only when the dedicated cluster type is Proprietary MyBase for the China site (aliyun.com).
ChargeType String PREPAY

The billing method of the host.

MssqlSupportVersion String 2012_std_ha,2012_std,2016_std_ha,2016_std,2017_std_ha,2017_std,2019_std_ha,2019_std

The versions supported by hosts in ApsaraDB MyBase for SQL Server.

MaxAutoScaleHostStorage Long 3661824

The maximum storage capacity of local SSDs for auto scaling. Unit: GB.

Examples

Sample requests

http(s)://cddc.aliyuncs.com/?Action=DescribeDedicatedHosts
&RegionId=cn-hangzhou
&DedicatedHostGroupId=dhg-h5i4p331f509****
&OrderId=123456789
&HostType=dhg_cloud_ssd
&HostStatus=1
&AllocationStatus=Allocatable
&ZoneId=ap-southeast-1a
&DedicatedHostId=ch-bp10a5id3boqi****
&PageNumbers=50
&PageSize=20
&<Common request parameters>

Sample success responses

XML format

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

<DescribeDedicatedHostsResponse>
    <TotalRecords>40</TotalRecords>
    <PageSize>20</PageSize>
    <RequestId>D6E068C3-25BC-455A-85FE-45F0B22EASER</RequestId>
    <PageNumbers>2</PageNumbers>
    <DedicatedHostGroupId>dhg-6w7q18iwt5jo****</DedicatedHostGroupId>
    <DedicatedHosts>
        <HostType>dhg_cloud_ssd</HostType>
        <HostStorage>1234</HostStorage>
        <MemoryUsed>24576</MemoryUsed>
        <DedicatedHostGroupId>dhg-6w7q18iwt5jo****</DedicatedHostGroupId>
        <AllocationStatus>Suspended</AllocationStatus>
        <StorageUsed>588800</StorageUsed>
        <EcsClassCode>ecs.r5.16xlarge</EcsClassCode>
        <DedicatedHostId>ch-bp10a5id3boqi****</DedicatedHostId>
        <MemAllocationRatio>90</MemAllocationRatio>
        <CreatedTime>2020-10-16 16:30:19</CreatedTime>
        <IPAddress>192.168.XX.XX</IPAddress>
        <HostStatus>1</HostStatus>
        <HostName>ch-bp15xfnp706tl****</HostName>
        <HostCPU>16</HostCPU>
        <CpuUsed>10</CpuUsed>
        <InstanceNumber>1</InstanceNumber>
        <OpenPermission>1</OpenPermission>
        <DistributionSymbol>0</DistributionSymbol>
        <VPCId>vpc-bp1roz55mrbj3ka1s****</VPCId>
        <HostClass>rds.g6.4xlarge</HostClass>
        <EndTime>2021-10-16 16:30:19</EndTime>
        <VSwitchId>vsw-bp133c8ifzxd3iv6q****</VSwitchId>
        <ZoneId>ap-southeast-1a</ZoneId>
        <CPUAllocationRatio>10</CPUAllocationRatio>
        <ImageCategory>ALinux</ImageCategory>
        <Engine>mysql</Engine>
        <DiskAllocationRatio>10</DiskAllocationRatio>
        <HostMem>65536</HostMem>
        <BastionInstanceId>bastionhost-cn-i7m2fgw****</BastionInstanceId>
        <AccountName>test</AccountName>
        <AccountType>Normal</AccountType>
        <DistributionTag>t4n9uz07h3r1tmcejtxf:1</DistributionTag>
        <Category>Standard</Category>
        <EcsId>i-2zec7l031p0jtru3pn7a</EcsId>
        <DiskInfo>{\"SystemDiskSize\":20,\"DataDiskCount\":0,\"DataDiskSize\":0,\"DataDiskCategory\":[\"\"],\"SystemDiskCategory\":\"cloud_essd\"}</DiskInfo>
        <ChargeType>PREPAY</ChargeType>
    </DedicatedHosts>
    <MaxAutoScaleHostStorage>3661824</MaxAutoScaleHostStorage>
</DescribeDedicatedHostsResponse>

JSON format

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

{
  "TotalRecords" : 40,
  "PageSize" : 20,
  "RequestId" : "D6E068C3-25BC-455A-85FE-45F0B22EASER",
  "PageNumbers" : 2,
  "DedicatedHostGroupId" : "dhg-6w7q18iwt5jo****",
  "DedicatedHosts" : [ {
    "HostType" : "dhg_cloud_ssd",
    "HostStorage" : "1234",
    "MemoryUsed" : "24576",
    "DedicatedHostGroupId" : "dhg-6w7q18iwt5jo****",
    "AllocationStatus" : "Suspended",
    "StorageUsed" : "588800",
    "EcsClassCode" : "ecs.r5.16xlarge",
    "DedicatedHostId" : "ch-bp10a5id3boqi****",
    "MemAllocationRatio" : "90",
    "CreatedTime" : "2020-10-16 16:30:19",
    "IPAddress" : "192.168.XX.XX",
    "HostStatus" : "1",
    "HostName" : "ch-bp15xfnp706tl****",
    "HostCPU" : "16",
    "CpuUsed" : "10",
    "InstanceNumber" : "1",
    "OpenPermission" : "1",
    "DistributionSymbol" : "0",
    "VPCId" : "vpc-bp1roz55mrbj3ka1s****",
    "HostClass" : "rds.g6.4xlarge",
    "EndTime" : "2021-10-16 16:30:19",
    "VSwitchId" : "vsw-bp133c8ifzxd3iv6q****",
    "ZoneId" : "ap-southeast-1a",
    "CPUAllocationRatio" : "10",
    "ImageCategory" : "ALinux",
    "Engine" : "mysql",
    "DiskAllocationRatio" : "10",
    "HostMem" : "65536",
    "BastionInstanceId" : "bastionhost-cn-i7m2fgw****",
    "AccountName" : "test",
    "AccountType" : "Normal",
    "DistributionTag" : "t4n9uz07h3r1tmcejtxf:1",
    "Category" : "Standard",
    "EcsId" : "i-2zec7l031p0jtru3pn7a",
    "DiskInfo" : "{\\\"SystemDiskSize\\\":20,\\\"DataDiskCount\\\":0,\\\"DataDiskSize\\\":0,\\\"DataDiskCategory\\\":[\\\"\\\"],\\\"SystemDiskCategory\\\":\\\"cloud_essd\\\"}",
    "ChargeType" : "PREPAY"
  } ],
  "MaxAutoScaleHostStorage" : 3661824
}

Error codes

HTTP status code Error code Error message Description
403 Forbidden.RAM User not authorized to operate on the specified resource, or this API does not support RAM. The error message returned because the specified operation is prohibited.

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