Queries the information about hosts in a dedicated cluster.
Operation description
After hosts are created in a dedicated cluster, you can query the information about the hosts such as performance metrics, total number of CPU cores, total memory size, and total storage.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| cddc:DescribeDedicatedHosts | get | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| RegionId | string | Yes | cn-hangzhou | |
| DedicatedHostGroupId | string | Yes | The dedicated cluster ID. You can log on to the ApsaraDB for MyBase console and go to the Dedicated Clusters page to view the dedicated cluster ID. | dhg-h5i4p331f509**** |
| OrderId | long | No | The order ID. You can log on to the Billing Management console and go to the Orders page to view the order ID. | 123456789 |
| HostType | string | No | The storage type of the host. Valid values:
| dhg_cloud_ssd |
| HostStatus | string | No | The state of the host. Valid values:
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.
| 1 |
| AllocationStatus | string | No | Specifies whether instances can be deployed on the host. Valid values:
| Allocatable |
| ZoneId | string | No | The zone ID. You can call the DescribeRegions operation to query the most recent zone list. | ap-southeast-1a |
| DedicatedHostId | string | No | The ID of the host in the dedicated cluster. You can log on to the ApsaraDB for MyBase console and go to the Hosts page to view the host ID. | ch-bp10a5id3boqi**** |
| PageNumbers | integer | No | The page number. | 50 |
| PageSize | integer | No | The number of entries per page. | 20 |
| Tags | string | No | 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 based on tags, do not specify the DedicatedHostId parameter. Otherwise, the DedicatedHostId parameter is used to filter hosts.
| {"key1":"value1"} |
Response parameters
Examples
Sample success responses
JSONformat
{
"TotalRecords": 40,
"PageSize": 20,
"RequestId": "D6E068C3-25BC-455A-85FE-45F0B22EASER",
"PageNumbers": 2,
"DedicatedHostGroupId": "dhg-6w7q18iwt5jo****",
"DedicatedHosts": {
"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": 3,
"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",
"MssqlSupportVersion": "2012_std_ha,2012_std,2016_std_ha,2016_std,2017_std_ha,2017_std,2019_std_ha,2019_std"
}
]
},
"MaxAutoScaleHostStorage": 3661824
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | Tag.InvalidTagsParameter | tags parameter is invalid | - |
| 400 | InvalidUserId.NotSupport | The userid have no permission. | - |
| 403 | Forbidden.RAM | User not authorized to operate on the specified resource, or this API does not support RAM. | The user is not authorized to operate on the specified resource. |
| 404 | InvalidDedicatedHostGroup.NotFound | Specified DedicatedHostGroup does not exists. | - |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|
