Queries the details of hosts in an ApsaraDB for MyBase 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.

DedicatedHostGroupId String Yes dhg-h5i4p331f509****

The ID of the dedicated cluster.

Note You can view the ID of the dedicated cluster on the Dedicated Clusters page in the ApsaraDB for MyBase console.
RegionId String Yes cn-hangzhou

The ID of the region. For more information, see Region IDs.

OrderId Long No 123456789

The ID of the order. To view the order ID, log on to the ApsaraDB for MyBase console, choose Expenses > Orders in the top navigation bar, and then find the order ID that you want to view on the Orders page.

HostType String No dhg_cloud_ssd

The storage type of the host. Valid values:

  • dhg_ssd: the local SSD type
  • dhg_cloud_ssd: the enhanced SSD type
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.
HostStatus String No 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 ready for deactivation.
  • 4: The host is being maintained.
  • 5: The host is deactivated.
  • 6: The host is restarting.
  • 7: The host is locked.
Note When a host fails, the host is deactivated. Before the host is deactivated, instances that are created on the host are migrated to another host.
ZoneId String No ap-southeast-1a

The ID of the zone. You can call the DescribeRegions operation to query the zone ID. For more information, see DescribeRegions.

DedicatedHostId String No ch-bp10a5id3boqi****

The ID of the host in the dedicated cluster. You can view the host ID on the Hosts page in the ApsaraDB for MyBase console.

PageNumbers Integer No 50

The total number of pages to return.

PageSize Integer No 20

The number of entries to return on each page.

Response parameters

Parameter Type Example Description
DedicatedHostGroupId String dhg-6w7q18iwt5jo****

The ID of the dedicated cluster.

DedicatedHosts Array of DedicatedHosts

Details about hosts.

DedicatedHosts
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.
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.
BastionInstanceId String bastionhost-cn-xxxxxxxxxxx

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

CPUAllocationRatio String 10

The CPU utilization of the host.

CpuUsed String 10

The number of CPU cores used by the host. Unit: core.

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.

DedicatedHostGroupId String dhg-6w7q18iwt5jo****

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

DedicatedHostId String ch-bp10a5id3boqi****

The ID of the host.

DeployType String Basic

The method of deployment. This parameter is returned only if the host is created in the MyBase for MySQL dedicated cluster. Valid values: High-availability and Basic.

DiskAllocationRatio String 10

The disk usage in percentage.

EcsClassCode String ecs.r5.16xlarge

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

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.

Engine String mysql

The type of the database engine that is used by the host.

HostCPU String 16

The number of CPU cores configured for the host.

HostClass String rds.g6.4xlarge

The specification code of the host.

HostMem String 65536

The memory of the host.

HostName String ch-bp15xfnp706tlxxxx

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 ready for deactivation.
  • 4: The host is being maintained.
  • 5: The host is deactivated.
  • 6: The host is restarting.
  • 7: The host is locked.
Note When a host fails, the host is deactivated. Before the host is deactivated, instances that are created on the host are migrated to another host.
HostStorage String 1234

The total storage of the host. Unit: GB.

HostType String dhg_cloud_ssd

The storage type of the host.

IPAddress String 192.168.0.56

The IP address of the host.

ImageCategory String ALinux

The image type of the host.

InstanceNumber String 1

The number of instances on the host.

MemAllocationRatio String 90

The memory usage in percentage.

MemoryUsed String 24576

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

OpenPermission String 0

Indicates whether the host OS permissions can be granted.

StorageUsed String 588800

The amount of used storage. Unit: GB. You can view the amount of used storage on the Host Information tab in the ApsaraDB for MyBase console.

VPCId String vpc-bp1roz55mrbj3ka1s****

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

VSwitchId String vsw-bp133c8ifzxd3iv6qxxxx

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

ZoneId String ap-southeast-1a

The zone where the host is deployed.

PageNumbers Integer 2

The total number of the returned pages.

PageSize Integer 20

The number of entries returned on each page.

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

The ID of the request.

TotalRecords Integer 40

The total number of returned hosts.

Example

Sample requests

http(s)://cddc.aliyuncs.com/?Action=DescribeDedicatedHosts
&DedicatedHostGroupId=dhg-h5i4p331f509****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<DescribeDedicatedHostsReponse>
  <DedicatedHosts>
        <DedicatedHosts>
              <DeployType>Basic</DeployType>
              <CPUAllocationRatio>10</CPUAllocationRatio>
              <DiskAllocationRatio>10</DiskAllocationRatio>
              <InstanceNumber>1</InstanceNumber>
              <DedicatedHostId>ch-bp10a5id3boqi****</DedicatedHostId>
              <CreatedTime>2020-10-16 16:30:19</CreatedTime>
              <EndTime>2021-10-16 16:30:19</EndTime>
              <DedicatedHostGroupId> dhg-6w7q18iwt5jo****</DedicatedHostGroupId>
              <BastionInstanceId>bastionhost-cn-xxxxxxxxxxx</BastionInstanceId>
              <ImageCategory>ALinux</ImageCategory>
              <HostStorage>1234</HostStorage>
              <OpenPermission>0</OpenPermission>
              <HostType>dhg_cloud_ssd</HostType>
              <HostMem>65536</HostMem>
              <MemoryUsed>24576</MemoryUsed>
              <HostStatus>1</HostStatus>
              <CpuUsed>10</CpuUsed>
              <Engine>mysql</Engine>
              <HostName>ch-bp15xfnp706tlxxxx</HostName>
              <AllocationStatus>Suspended</AllocationStatus>
              <ZoneId>ap-southeast-1a</ZoneId>
              <MemAllocationRatio>90</MemAllocationRatio>
              <VPCId>vpc-bp1roz55mrbj3ka1s****</VPCId>
              <VSwitchId> vsw-bp133c8ifzxd3iv6qxxxx</VSwitchId>
              <StorageUsed>588800</StorageUsed>
              <HostClass>rds.g6.4xlarge</HostClass>
              <HostCPU>16</HostCPU>
              <EcsClassCode>ecs.r5.16xlarge</EcsClassCode>
              <IPAddress>192.168.0.56</IPAddress>
              <AccountName>test</AccountName>
        </DedicatedHosts>
  </DedicatedHosts>
  <PageSize>20</PageSize>
  <RequestId>D6E068C3-25BC-455A-85FE-45F0B22EASER</RequestId>
  <DedicatedHostGroupId> dhg-6w7q18iwt5jo****</DedicatedHostGroupId>
  <TotalRecords>40</TotalRecords>
  <PageNumbers>2</PageNumbers>
</DescribeDedicatedHostsReponse>

JSON format

{
    "DedicatedHosts": {
        "DedicatedHosts": [
            {
                "DeployType": "Basic",
                "CPUAllocationRatio": "10",
                "DiskAllocationRatio": "10",
                "InstanceNumber": "1",
                "DedicatedHostId": "ch-bp10a5id3boqi****",
                "CreatedTime": "2020-10-16 16:30:19",
                "EndTime": "2021-10-16 16:30:19",
                "DedicatedHostGroupId": " dhg-6w7q18iwt5jo****",
                "BastionInstanceId": "bastionhost-cn-xxxxxxxxxxx",
                "ImageCategory": "ALinux",
                "HostStorage": "1234",
                "OpenPermission": "0",
                "HostType": "dhg_cloud_ssd",
                "HostMem": "65536",
                "MemoryUsed": "24576",
                "HostStatus": "1",
                "CpuUsed": "10",
                "Engine": "mysql",
                "HostName": "ch-bp15xfnp706tlxxxx",
                "AllocationStatus": "Suspended",
                "ZoneId": "ap-southeast-1a",
                "MemAllocationRatio": "90",
                "VPCId": "vpc-bp1roz55mrbj3ka1s****",
                "VSwitchId": " vsw-bp133c8ifzxd3iv6qxxxx",
                "StorageUsed": "588800",
                "HostClass": "rds.g6.4xlarge",
                "HostCPU": "16",
                "EcsClassCode": "ecs.r5.16xlarge",
                "IPAddress": "192.168.0.56",
                "AccountName": "test"
            }
        ]
    },
    "PageSize": "20",
    "RequestId": "D6E068C3-25BC-455A-85FE-45F0B22EASER",
    "DedicatedHostGroupId": " dhg-6w7q18iwt5jo****",
    "TotalRecords": "40",
    "PageNumbers": "2"
}

Error codes

HttpCode 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 forbidden.

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