All Products
Search
Document Center

ApsaraDB for MyBase:QueryHostBaseInfoByInstance

Last Updated:Jan 14, 2026

Queries the basic information about the host on which an instance is deployed.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
cddc:QueryHostBaseInfoByInstanceget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

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

cn-hangzhou
DBInstanceIdstringYes

The instance ID.

rm-bp15rszyxs4t3****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

D6E068C3-25BC-455A-85FE-45F0B22E12CV
HostInstanceConsoleInfosarray<object>

The queried host and instance information.

HostInstanceConsoleInfoobject
VpcIdstring

The virtual private cloud (VPC) ID of the host on which the instance is deployed.

vpc-bp1ov7as4yvz4kxei****
Statusstring

The state of the instance.

RUNNING
ExpiredTimestring

The expiration time of the instance.

2021.07.20
ClusterNamestring

The instance type of the instance.

rds.ebmr6.26xlarge
Ipstring

The IP address of the host on which the instance is deployed.

172.22.0.***
HostNamestring

The name of the host on which the instance is deployed.

ch-bp1fgj3kt7fsb****
Enginestring

The database engine of the instance.

mysql
Rolestring

The role of the instance.

master
Portstring

The port number of the host on which the instance is deployed.

3443
EngineVersionstring

The version of the database engine.

5.7

Examples

Sample success responses

JSONformat

{
  "RequestId": "D6E068C3-25BC-455A-85FE-45F0B22E12CV",
  "HostInstanceConsoleInfos": [
    {
      "VpcId": "vpc-bp1ov7as4yvz4kxei****",
      "Status": "RUNNING",
      "ExpiredTime": "2021.07.20",
      "ClusterName": "rds.ebmr6.26xlarge",
      "Ip": " 172.22.0.***",
      "HostName": "ch-bp1fgj3kt7fsb****",
      "Engine": "mysql",
      "Role": "master",
      "Port": 3443,
      "EngineVersion": 5.7
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
403Permission.NotSupportYou are not authorized to perform this action.You are not authorized to perform the action.
404InvalidDBInstance.NotFoundThe specified instance does not exist or is not supported.The specified instance does not exist or is not supported.

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

Change history

Change timeSummary of changesOperation
No change history