You can call the DescribeDedicatedHosts operation to query the information about one or more hosts in a dedicated cluster.
Operation Description
The region ID of the hosts. You can call the DescribeRegions operation to query the most recent region list.
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:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is 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 |
---|---|---|---|---|
rds:DescribeDedicatedHosts | READ |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | No | The ID of the order. | cn-hangzhou |
DedicatedHostGroupId | string | No | The type of storage media that is used for the hosts. Valid values:
| dhg-7a9xxxxxxxx |
OrderId | long | No | The status of the hosts. Valid values:
| 102565235 |
HostType | string | No | Specifies whether to query the hosts on which you can create instances or those on which you cannot create instances. Valid values:
| dhg_cloud_ssd |
HostStatus | string | No | The zone ID of the hosts. | 1 |
AllocationStatus | string | No | The ID of the host. | 1 |
ZoneId | string | No | The ID of the dedicated cluster. | cn-hangzhou-i |
DedicatedHostId | string | No | The ID of the request. | ch-t4nn100ddxxxxxxxx |
Response parameters
Examples
Sample success responses
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"
}
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>
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidUserId.NotSupport | The userid have no permission. | The user does not have permissions. |
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 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
2022-06-23 | API Description Update,The error codes of the API operation change. | |||||||||
|