All Products
Search
Document Center

Data Management:GetDBTopology

Last Updated:Apr 18, 2024

Queries the topologies of a logical database and its physical database shards.

Debugging

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

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
dms:GetDBTopologyRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
LogicDbIdlongYes

The ID of the logical database. You can call the ListLogicDatabases or SearchDatabase operation to query the ID of the logical database.

134***
TidlongNo

The ID of the tenant.

Note To view the tenant ID, move the pointer over the profile picture in the upper-right corner of the Data Management (DMS) console. For more information, see Manage DMS tenants.
43***

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

C5B8E84B-42B6-4374-AD5A-6264E1753378
Successboolean

Indicates whether the request is successful. Valid values:

  • true: The request is successful.
  • false: The request fails.
true
ErrorMessagestring

The error message returned if the request failed.

UnknownError
ErrorCodestring

The error code.

UnknownError
DBTopologyobject

The topology of the data table.

LogicDbIdlong

The ID of the logical database.

1234
LogicDbNamestring

Logical database name.

logic_db_test
SearchNamestring

The name of the saved search.

logic_db_test
Aliasstring

The alias of the access point.

logic_db_test
DbTypestring

The type of the database engine.

polardb
EnvTypestring

The type of the environment in which the database instance is deployed. Valid values:

  • product: production environment
  • dev: development environment
  • pre: pre-release environment
  • test: test environment
  • sit: system integration testing (SIT) environment
  • uat: user acceptance testing (UAT) environment
  • pet: stress testing environment
  • stag: staging environment
dev
DBTopologyInfoListobject []

The list of database splitting topology information.

DbIdlong

The ID of the database for which the schema design is executed.

423532
SchemaNamestring

The name of the logical database.

Note If the database is a PostgreSQL database, the value of this parameter is the name of the database schema.
db_test@rm-xxx:3306
CatalogNamestring

The name of the catalog to which the database belongs.

Note If the database is a PostgreSQL database, the value of this parameter is the name of the database.
def
SearchNamestring

The name of the saved search.

db_test
DbTypestring

The type of the database engine.

polardb
EnvTypestring

The type of the environment to which the database belongs. Valid values:

  • product: production environment
  • dev: development environment
  • pre: staging environment
  • test: test environment
  • sit: SIT environment
  • uat: user acceptance testing (UAT) environment
  • pet: stress testing environment
  • stag: STAG environment
dev
InstanceIdlong

The ID of the instance. The valid value is returned if you call the ListInstances operation. The instance ID is not the ID of the RDS instance.

4325325
RegionIdstring

The ID of the region in which the instance resides.

cn-hangzhou
InstanceResourceIdstring

Instance resource ID.

rm-xxx
InstanceSourcestring

The source of the database instance. Valid values:

  • PUBLIC_OWN: a self-managed database instance that is deployed on the Internet
  • RDS: an ApsaraDB RDS instance
  • ECS_OWN: a self-managed database that is deployed on an Elastic Compute Service (ECS) instance
  • VPC_IDC: a self-managed database instance that is deployed in a data center connected over a virtual private cloud (VPC)
RDS

Examples

Sample success responses

JSONformat

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

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

Change history

Change timeSummary of changesOperation
No change history