All Products
Search
Document Center

ApsaraDB RDS:DescribeDedicatedHosts

Last Updated:Nov 22, 2024

Queries the information about the hosts in a dedicated cluster.

Operation description

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?

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:DescribeDedicatedHostsget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

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

cn-hangzhou
DedicatedHostGroupIdstringNo

The dedicated cluster ID. You can call the DescribeDedicatedHostGroups operation to query the dedicated cluster ID.

dhg-7a9xxxxxxxx
OrderIdlongNo

The order ID.

102565235
HostTypestringNo

The storage type of the host. Valid values:

  • dhg_cloud_ssd: enhanced SSD (ESSD)
  • dhg_local_ssd: local SSD
dhg_cloud_ssd
HostStatusstringNo

The status of the host. Valid values:

  • 0: creating
  • 1: running
  • 2: faulty
  • 3: being replaced
  • 4: deprecated
  • 5: deleting
  • 6: restarting
1
AllocationStatusstringNo

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

  • 0: Instances cannot be deployed on the host.
  • 1: Instances can be deployed on the host.
1
ZoneIdstringNo

The zone ID.

cn-hangzhou-i
DedicatedHostIdstringNo

The ID of the host in the dedicated cluster.

ch-t4nn100ddxxxxxxxx

Response parameters

ParameterTypeDescriptionExample
object
DedicatedHostGroupIdstring

The host group ID.

dhg-7a9xxxxxxxx
RequestIdstring

The request ID.

C860658E-68A6-46C1-AF6E-3AE7C4D3CACF
DedicatedHostsarray<object>

The host information.

DedicatedHostsobject
HostTypestring

The storage type of the host. Valid values:

  • dhg_cloud_ssd: ESSD
  • dhg_local_ssd: local SSD
dhg_cloud_ssd
HostStoragestring

The storage capacity of the host. Unit: MB.

2097152
MemoryUsedstring

The size of the used memory. Unit: MB.

16384
DedicatedHostGroupIdstring

The dedicated cluster ID.

dhg-7a9xxxxxxxx
AllocationStatusstring

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

  • 0: Instances cannot be deployed on the host.
  • 1: Instances can be deployed on the host.
1
StorageUsedstring

The amount of used storage space on the host.

0
DedicatedHostIdstring

The host ID.

i-bpxxxxxxx
MemAllocationRatiostring

The maximum memory usage per host in the dedicated cluster.

90
CreatedTimestring

The time when the host was created.

2021-03-25 17:29:06.0
IPAddressstring

The internal IP address of the host.

192.xx.xx.xx
HostStatusstring

The status of the host. Valid values:

  • 0: creating
  • 1: running
  • 2: faulty
  • 3: being replaced
  • 4: deprecated
  • 5: deleting
  • 6: restarting
1
HostNamestring

The host name.

testHost1
HostCPUstring

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

8
InstanceNumberstring

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

4
OpenPermissionstring

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

  • 0 or null: The permissions cannot be granted.
  • 1: The permissions can be granted.
  • 3: The permissions have been granted.
3
CpuUsedstring

The number of used CPU cores on the host. Unit: cores.

4
VPCIdstring

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

vpc-bpxxxxxxx
HostClassstring

The instance type of the host.

ecs.i2.16xlarge
EndTimestring

The time when the host expires.

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

The ID of the vSwitch associated with the specified VPC.

vsw-bpxxxxxxx
CPUAllocationRatiostring

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

200
ZoneIdstring

The zone ID of the host.

cn-hangzhou-i
ImageCategorystring

The host image. This parameter is returned only when the Engine parameter is set to mssql. Valid values:

  • WindowsWithMssqlStdLicense: a Windows image that contains the licenses of SQL Server Standard Edition
  • WindowsWithMssqlEntLisence: a Windows image that contains the licenses of SQL Server Enterprise Edition
  • WindowsWithMssqlWebLisence: a Windows image that contains the licenses of SQL Server Web Edition
WindowsWithMssqlStdLicense
Enginestring

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

mysql
DiskAllocationRatiostring

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

200
HostMemstring

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

32238
BastionInstanceIdstring

The bastion host ID.

bastionhost-cn-m7xxxxxxxx
AccountNamestring

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

test123

Examples

Sample success responses

JSONformat

{
  "DedicatedHostGroupId": "dhg-7a9xxxxxxxx",
  "RequestId": "C860658E-68A6-46C1-AF6E-3AE7C4D3CACF",
  "DedicatedHosts": {
    "DedicatedHosts": [
      {
        "HostType": "dhg_cloud_ssd",
        "HostStorage": "2097152",
        "MemoryUsed": "16384",
        "DedicatedHostGroupId": "dhg-7a9xxxxxxxx",
        "AllocationStatus": "1",
        "StorageUsed": "0",
        "DedicatedHostId": "i-bpxxxxxxx",
        "MemAllocationRatio": "90",
        "CreatedTime": "2021-03-25 17:29:06.0",
        "IPAddress": "192.xx.xx.xx",
        "HostStatus": "1",
        "HostName": "testHost1",
        "HostCPU": "8",
        "InstanceNumber": "4",
        "OpenPermission": "3",
        "CpuUsed": "4",
        "VPCId": "vpc-bpxxxxxxx",
        "HostClass": "ecs.i2.16xlarge",
        "EndTime": "2021-04-25T16:00:00Z",
        "VSwitchId": "vsw-bpxxxxxxx",
        "CPUAllocationRatio": "200",
        "ZoneId": "cn-hangzhou-i",
        "ImageCategory": "WindowsWithMssqlStdLicense",
        "Engine": "mysql",
        "DiskAllocationRatio": "200",
        "HostMem": "32238",
        "BastionInstanceId": "bastionhost-cn-m7xxxxxxxx",
        "AccountName": "test123"
      }
    ]
  }
}

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 code has changedView Change Details