Call GetDBTopology to obtain the topology information of the logical library and its corresponding physical sub-library.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request Parameter

Parameter Type Required Example Description
LogicDbId Long Yes 134325

The logical library ID.

Note You can call ListLogicDatabases The interface obtains the parameter.
Tid Long No 43215

The ID of the tenant.

Note Take the tenant ID information displayed in the upper right corner of the system. For details, see Tenant ID and Tenant .
RegionId String No cn-hangzhou

Select the service region of DMS to call the interface. For the value, see RegionID parameter .

Note Set the value to the ID of the region to which your applications are close.

Response parameters

Parameter Type Example Description
RequestId String C5B8E84B-42B6-4374-AD5A-6264E1753378

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

ErrorMessage String UnknownError

The error message returned.

ErrorCode String UnknownError

The error code returned.

DBTopology object

Topology information

LogicDbId Long 1234

The logical library ID.

LogicDbName String logic_db_test

The logical library name.

SearchName String logic_db_test

The logical library search name.

Alias String logic_db_test

The logical library alias.

DbType String polardb

Database type, please refer to the value. DbType parameter .

EnvType String dev

The environment type, value and description of the logical library are as follows:

  • product : production environment
  • dev : development environment
  • pre : staging environment
  • test : test environment
  • sit : SIT environment
  • uat : UAT environment
  • pet : pressure measurement environment
  • stag : STAG environment
Note For more information, see Instance environment description .
DBTopologyInfoList Array of DBTopologyInfo

The list of database shards topology information.

DbId Long 423532

The ID of the database.

SchemaName String db_test@rm-xxx:3306

The schema of the PolarDB-X database.

Note If the database type is PG series, here is the PG mode name.
CatalogName String def

The database directory name.

Note If the database type is PG series, this indicates the PG database name.
SearchName String db_test

The library search name.

DbType String polardb

Database type, please refer to the value. DbType parameter .

EnvType String dev

The environment type, value and description of the logical library are as follows:

  • product : production environment
  • dev : development environment
  • pre : staging environment
  • test : test environment
  • sit : SIT environment
  • uat : UAT environment
  • pet : pressure measurement environment
  • stag : STAG environment
Note For more information, see Instance environment description .
InstanceId Long 4325325

The ID of the Message Queue for Apache Kafka instance that contains the consumer group.

RegionId String cn-hangzhou

The region to which the instance belongs.

InstanceResourceId String rm-xxx

The instance resource ID. The value is as follows:

  • RDS: Alibaba Cloud database instance ID
  • ECS_OWN: ECS instance ID
  • PUBLIC_OWN: empty
  • VPC_ID:VPC ID
  • GATEWAY: the database gateway instance ID
InstanceSource String RDS

The source of the instance. The value is as follows:

  • RDS : an Alibaba Cloud database instance
  • ECS_OWN : ECS a self-built library instance
  • PUBLIC_OWN : public network self-built database instance
  • VPC_ID : VPC leased line IDC database instance
  • GATEWAY : the database gateway instance

Examples

Sample requests


     http(s)://[Endpoint]/?LogicDbId=134325 &Tid=43215&Public request parameters 
   

Sample success responses

XML format


     HTTP/1.1 200 OK Content-Type:application/xml <RequestId>C5B8E84B-42B6-4374-AD5A-6264E1753378</RequestId> <Success>true</Success> <ErrorMessage>UnknownError</ErrorMessage> <ErrorCode>UnknownError</ErrorCode> <DBTopology> <LogicDbId>1234</LogicDbId> <LogicDbName>logic_db_test</LogicDbName> <SearchName>logic_db_test</SearchName> <Alias>logic_db_test</Alias> <DbType>polardb</DbType> <EnvType>dev</EnvType> <DBTopologyInfoList> <DbId>423532</DbId> <SchemaName>db_test@rm-xxx:3306</SchemaName> <CatalogName>def</CatalogName> <SearchName>db_test</SearchName> <DbType>polardb</DbType> <EnvType>dev</EnvType> <InstanceId>4325325</InstanceId> <RegionId>cn-hangzhou</RegionId> <InstanceResourceId>rm-xxx</InstanceResourceId> <InstanceSource>RDS</InstanceSource> </DBTopologyInfoList> </DBTopology> 
   

JSON Address format


     HTTP/1.1 200 OK Content-Type:application/json { "RequestId" : "C5B8E84B-42B6-4374-AD5A-6264E1753378", "Success" : true, "ErrorMessage" : "UnknownError", "ErrorCode" : "UnknownError", "DBTopology" : { "LogicDbId" : 1234, "LogicDbName" : "logic_db_test", "SearchName" : "logic_db_test", "Alias" : "logic_db_test", "DbType" : "polardb", "EnvType" : "dev", "DBTopologyInfoList" : [ { "DbId" : 423532, "SchemaName" : "db_test@rm-xxx:3306", "CatalogName" : "def", "SearchName" : "db_test", "DbType" : "polardb", "EnvType" : "dev", "InstanceId" : 4325325, "RegionId" : "cn-hangzhou", "InstanceResourceId" : "rm-xxx", "InstanceSource" : "RDS" } ] } } 
   

Error code

Go to the Error Center See more error codes.