All Products
Search
Document Center

ApsaraDB RDS:GetDBInstanceTopology

Last Updated:Jul 05, 2024

Queries the topology of an instance.

Operation description

Supported database engines

  • RDS MySQL
  • RDS PostgreSQL
  • RDS SQL Server
  • RDS MariaDB

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID. You can call the DescribeDBInstances operation to query the instance ID.

rm-uf6wjk5*******

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Codestring

An internal parameter. You can ignore this parameter.

None
Messagestring

An internal parameter. You can ignore this parameter.

None
RequestIdstring

The ID of the request.

7430AB1A-6D49-5B6D-B9E5-920250076074
Dataobject

The details about the topology.

DBInstanceNamestring

The instance ID.

rm-m5ezban**********
Connectionsarray<object>

The network connection information of the instance.

object
ZoneIdstring

The zone ID of the instance.

cn-qingdao-c
DBInstanceNamestring

The instance ID.

rm-m5ezban**********
ConnectionStringstring

The endpoint that is used to connect to the database instance.

rm-m5ezban**********.mysql.rds.aliyuncs.com
NetTypestring

The network type of the endpoint. Valid values:

  • vpc
  • public
vpc
Nodesarray<object>

The queried nodes.

object
DBInstanceNamestring

The ID of the instance.

rm-m5ezban**********
ZoneIdstring

The zone ID of the instance.

cn-qingdao-c
DedicatedHostIdstring

The host ID of the instance in the dedicated cluster.

Note : If the instance does not reside in the specified dedicated cluster, no value is returned.
i-bpxxxxxxx
Rolestring

The type of the node. The following result is returned:

  • Master: a primary node
  • Slave: a secondary node
master
NodeIdstring

The ID of the instance.

Note : The value **-1** is returned for an instance that does not reside in a dedicated cluster.
349054
DedicatedHostGroupIdstring

The ID of the dedicated cluster.

Note : If the instance does not reside in the specified dedicated cluster, no value is returned.
dhg-4n*****

Examples

Sample success responses

JSONformat

{
  "Code": "None",
  "Message": "None",
  "RequestId": "7430AB1A-6D49-5B6D-B9E5-920250076074",
  "Data": {
    "DBInstanceName": "rm-m5ezban**********",
    "Connections": [
      {
        "ZoneId": "cn-qingdao-c",
        "DBInstanceName": "rm-m5ezban**********",
        "ConnectionString": "rm-m5ezban**********.mysql.rds.aliyuncs.com",
        "NetType": "vpc"
      }
    ],
    "Nodes": [
      {
        "DBInstanceName": "rm-m5ezban**********",
        "ZoneId": "cn-qingdao-c",
        "DedicatedHostId": "i-bpxxxxxxx",
        "Role": "master",
        "NodeId": "349054",
        "DedicatedHostGroupId": "dhg-4n*****"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidActionSpecified action is not valid.-
403DBInstanceStatusNotActiveThe status of the current instance is not active.The operation failed. Check the status of the RDS instance.
403DBTypeNotSupportedThe database type is not supported.The database engine is not supported.
403IncorrectDBInstanceTypeCurrent DB instance type does not support this operation.The operation failed. The RDS instance is not in a ready state.
404InvalidDBInstance.NotFoundThe specified instance does not exist or is not supported.The RDS instance cannot be found. Check the ID or name of the RDS instance.

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

Change history

Change timeSummary of changesOperation
2022-10-28The Error code has changedView Change Details
2022-06-13Add OperationView Change Details