All Products
Search
Document Center

Data Management:SearchDatabase

Last Updated:Oct 19, 2026

Queries the details of search databases.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dms:SearchDatabase

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Tid

integer

No

The tenant ID. You can call the GetUserActiveTenant operation to obtain the value of this parameter.

3***

SearchKey

string

No

The keyword used to search for database names.

testdb

PageNumber

integer

No

The page number.

1

PageSize

integer

No

The number of entries per page.

10

EnvType

string

No

The environment type of the database. For more information, see Instance environments.

test

SearchRange

string

No

The permission scope. Valid values:

  • HAS_PERMSSION: Databases on which you have permissions.

  • OWNER: Databases that you own.

  • MY_FOCUS: Databases that you follow.

  • UNKNOWN: No limit.

HAS_PERMSSION

SearchTarget

string

No

The search target. Valid values:

  • DB: No limit. Physical and logical databases are not distinguished.

  • SINGLE_DB: Physical databases.

  • LOGIC_DB: Logical databases.

SINGLE_DB

DbType

string

No

The type of the database. For valid values, see DbType parameter description.

MYSQL

RealLoginUserUid

string

No

The Alibaba Cloud account UID of the user who actually calls the API operation.

21400447956867****

Response elements

Element

Type

Description

Example

object

TotalCount

integer

The total number of entries that meet the specified conditions.

1

RequestId

string

The request ID.

E0D21075-CD3E-4D98-8264-FD8AD04A63B6

SearchDatabaseList

object

SearchDatabase

array<object>

The list of search database details.

array<object>

The list of search database details.

DatabaseId

string

The database ID.

2528****

Host

string

The endpoint of the instance where the database resides.

rm-xxxx.mysql.rds.aliyuncs.com

DbaId

string

The user ID of the DBA role for the instance.

10****

SchemaName

string

The name of the database.

test

Logic

boolean

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

  • true: Yes.

  • false: No.

false

DatalinkName

string

The name of the datalink used for cross-database queries.

datalink_name

Port

integer

The port of the instance where the database resides.

3306

EnvType

string

The environment type of the database. For more information, see Instance environments.

test

Sid

string

The SID of the instance where the database resides.

testSid

OwnerIdList

object

OwnerIds

array

The user IDs of the database owners.

string

The list of user IDs of the database owners.

1

Encoding

string

The encoding format of the database.

utf8

DbType

string

The type of the database.

mysql

OwnerNameList

object

OwnerNames

array

The nicknames of the database owners.

string

The list of nicknames of the database owners.

user1

SearchName

string

The search name of the database.

test@xxx.xxx.xxx.xxx:3306

Alias

string

The alias of the database.

test_rds

CatalogName

string

The catalog name of the database.

Note

For PostgreSQL databases, the database name is displayed.

dmstest

ErrorCode

string

The error code.

UnknownError

ErrorMessage

string

The error message.

UnknownError

Success

boolean

Indicates whether the request is successful. Valid values:

  • true: The request is successful.

  • false: The request fails.

true

Examples

Success response

JSON format

{
  "TotalCount": 1,
  "RequestId": "E0D21075-CD3E-4D98-8264-FD8AD04A63B6",
  "SearchDatabaseList": {
    "SearchDatabase": [
      {
        "DatabaseId": "2528****",
        "Host": "rm-xxxx.mysql.rds.aliyuncs.com",
        "DbaId": "10****",
        "SchemaName": "test",
        "Logic": false,
        "DatalinkName": "datalink_name",
        "Port": 3306,
        "EnvType": "test",
        "Sid": "testSid",
        "OwnerIdList": {
          "OwnerIds": [
            "1"
          ]
        },
        "Encoding": "utf8",
        "DbType": "mysql",
        "OwnerNameList": {
          "OwnerNames": [
            "user1"
          ]
        },
        "SearchName": "test@xxx.xxx.xxx.xxx:3306",
        "Alias": "test_rds",
        "CatalogName": "dmstest"
      }
    ]
  },
  "ErrorCode": "UnknownError",
  "ErrorMessage": "UnknownError",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.