All Products
Search
Document Center

Data Management:GetTableTopology

Last Updated:Nov 28, 2024

Queries the topology of a table.

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

Request parameters

ParameterTypeRequiredDescriptionExample
TableGuidstringYes

The GUID of the table in Data Management (DMS).

Note
  • You can call the ListLogicTables operation with ReturnGuid set to true to query the GUIDs of logical tables in a specific logical database.
  • You can call the ListTables operation with ReturnGuid set to true to query the GUIDs of tables in a specific physical database.
  • IDB_L_308302.yuyang_test.test_ch
    TidlongNo

    The ID of the tenant.

    Note To view the ID of the tenant, move the pointer over the profile picture in the upper-right corner of the DMS console. For more information, see the "View information about the current tenant" section of the Tenant information topic.
    3***

    Response parameters

    ParameterTypeDescriptionExample
    object

    Schema of Response

    RequestIdstring

    The ID of the request.

    F5ED6A40-F344-4C7D-A8F0-5685CA584CA7
    Successboolean

    Indicates whether the request is successful.

    true
    ErrorMessagestring

    The error message.

    UnknownError
    ErrorCodestring

    The error code.

    UnknownError
    TableTopologyobject

    The topology information.

    TableGuidstring

    The GUID of the table in DMS.

    IDB_L_308302.yuyang_test.test_ch
    TableNamestring

    The name of the table.

    test_ch
    TableTopologyInfoListarray<object>

    Information of the topology of the table.

    TableTopologyInfoobject

    Information of the topology of the table.

    TableNameListstring

    The names of tables.

    Note The table names are separated by commas (,).
    test_ch_0000,test_ch_0001,test_ch_0002,test_ch_0003,test_ch_0004,test_ch_0005
    TableNameExprstring

    The expression of the names of logical tables.

    **

    Description This parameter is not returned for physical tables.

    test_ch_[0000-0005]
    TableCountlong

    The number of tables.

    6
    DbIdlong

    The ID of the physical database.

    43215
    DbSearchNamestring

    The name that is used to search for the database.

    Note We recommend that you do not use this parameter for business development. The format of the parameter value may be modified in later versions.
    yuyang_test@localhost:3306 [yuyang_test_dev]
    InstanceIdlong

    The ID of the instance to which the physical database belongs.

    4325325
    RegionIdstring

    The region ID of the instance.

    cn-hangzhou
    InstanceResourceIdstring

    The ID of the resource related to the instance. The resource corresponds with the database instance type returned in the InstanceSource parameter.

    • RDS:The ID of the ApsaraDB RDS instance.
    • ECS_OWN: The ID of the Elastic Compute Service (ECS) instance.
    • PUBLIC_OWN: This parameter is left empty for self-managed database instances that are connected over the Internet.
    • VPC_ID:The ID of the virtual private cloud (VPC).
    • GATEWAY: The ID of the database gateway.
    rm-xxx
    InstanceSourcestring

    The type of the database instance. Valid values:

    • RDS: an ApsaraDB RDS instance.
    • ECS_OWN: a self-managed database that is deployed on an ECS instance
    • PUBLIC_OWN: a self-managed database instance that is connected over the Internet.
    • VPC_ID: a self-managed database instance in a VPC that is connected over Express Connect circuits.
    • GATEWAY: a database instance connected by using a database gateway.
    RDS
    DbNamestring

    The name of the database.

    yuyang_test
    DbTypestring

    The database engine.

    mysql
    Logicboolean

    Indicates whether the table is a logical table. Valid values:

    • true
    • false
    true

    Examples

    Sample success responses

    JSONformat

    {
      "RequestId": "F5ED6A40-F344-4C7D-A8F0-5685CA584CA7",
      "Success": true,
      "ErrorMessage": "UnknownError",
      "ErrorCode": "UnknownError",
      "TableTopology": {
        "TableGuid": "IDB_L_308302.yuyang_test.test_ch",
        "TableName": "test_ch",
        "TableTopologyInfoList": [
          {
            "TableNameList": "test_ch_0000,test_ch_0001,test_ch_0002,test_ch_0003,test_ch_0004,test_ch_0005",
            "TableNameExpr": "test_ch_[0000-0005]",
            "TableCount": 6,
            "DbId": 43215,
            "DbSearchName": "yuyang_test@localhost:3306\n[yuyang_test_dev]",
            "InstanceId": 4325325,
            "RegionId": "cn-hangzhou",
            "InstanceResourceId": "rm-xxx",
            "InstanceSource": "RDS",
            "DbName": "yuyang_test",
            "DbType": "mysql"
          }
        ],
        "Logic": true
      }
    }

    Error codes

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

    Change history

    Change timeSummary of changesOperation
    No change history