All Products
Search
Document Center

ApsaraDB RDS:DescribeDedicatedHosts

Last Updated:May 29, 2023

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.
OperationAccess levelResource typeCondition keyAssociated operation
rds:DescribeDedicatedHostsREAD
  • RDS
    acs:rds:*:{#accountId}:dbinstance/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The ID of the order.

cn-hangzhou
DedicatedHostGroupIdstringNo

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
dhg-7a9xxxxxxxx
OrderIdlongNo

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
102565235
HostTypestringNo

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
dhg_cloud_ssd
HostStatusstringNo

The zone ID of the hosts.

1
AllocationStatusstringNo

The ID of the host.

1
ZoneIdstringNo

The ID of the dedicated cluster.

cn-hangzhou-i
DedicatedHostIdstringNo

The ID of the request.

ch-t4nn100ddxxxxxxxx

Response parameters

ParameterTypeDescriptionExample
object
DedicatedHostGroupIdstring

An array that consists of hosts returned.

dhg-7a9xxxxxxxx
RequestIdstring

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

  • dhg_cloud_ssd: enhanced SSD
  • dhg_local_ssd: local SSD
C860658E-68A6-46C1-AF6E-3AE7C4D3CACF
DedicatedHostsobject []

The storage capacity of the host. Unit: MB.

HostTypestring

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

dhg_cloud_ssd
HostStoragestring

The ID of the dedicated cluster.

2097152
MemoryUsedstring

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.
16384
DedicatedHostGroupIdstring

The amount of used storage space on the host.

dhg-7a9xxxxxxxx
AllocationStatusstring

The ID of the host.

1
StorageUsedstring

The maximum memory usage per host in the dedicated cluster.

0
DedicatedHostIdstring

The time when the host was created.

i-bpxxxxxxx
MemAllocationRatiostring

The internal IP address of the host.

90
CreatedTimestring

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.
2021-03-25 17:29:06.0
IPAddressstring

The name of the host.

192.xx.xx.xx
HostStatusstring

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

1
HostNamestring

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

testHost1
HostCPUstring

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.
8
InstanceNumberstring

The number of used cores on the host.

4
OpenPermissionstring

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

3
CpuUsedstring

The specifications of the host.

4
VPCIdstring

The time when the host expires.

vpc-bpxxxxxxx
HostClassstring

The ID of the vSwitch associated with the specified VPC.

ecs.i2.16xlarge
EndTimestring

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

2021-04-25T16:00:00Z
VSwitchIdstring

The zone ID of the host.

vsw-bpxxxxxxx
CPUAllocationRatiostring

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
200
ZoneIdstring

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

cn-hangzhou-i
ImageCategorystring

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

WindowsWithMssqlStdLicense
Enginestring

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

mysql
DiskAllocationRatiostring

The ID of the bastion host.

200
HostMemstring

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

32238
BastionInstanceIdstring

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?

bastionhost-cn-m7xxxxxxxx
AccountNamestring

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

test123

Examples

Sample success responses

JSONformat

{
	"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"
}

XMLformat

<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 codeError codeError messageDescription
400InvalidUserId.NotSupportThe userid have no permission.The user does not have permissions.
404InvalidDedicatedHostGroup.NotFoundSpecified DedicatedHostGroup does not exists.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-06-23API Description Update,The error codes of the API operation change.
Change itemChange content
API DescriptionAPI Description Update
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 404