All Products
Search
Document Center

Data Management:ListInstances

Last Updated:Mar 21, 2026

Call ListInstances to retrieve a list of instances.

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:ListInstances

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Tid

integer

No

The tenant ID. You can call the GetUserActiveTenant API to obtain this ID.

3***

SearchKey

string

No

The keyword to search for instances.

test

DbType

string

No

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

MySQL

EnvType

string

No

The environment type. Valid values:

  • product: Production Environment

  • dev: Development Environment

  • pre: Staging Environment

  • test: Test Environment

  • sit: SIT Environment

  • uat: UAT Environment

  • pet: Performance Testing Environment

  • stag: STAG Environment

product

InstanceSource

string

No

The instance source. Valid values:

  • PUBLIC_OWN: A self-managed instance that is connected over the internet.

  • RDS: An ApsaraDB RDS instance.

  • ECS_OWN: A self-managed instance that is deployed on an Elastic Compute Service (ECS) instance.

  • VPC_IDC: A self-managed instance in an on-premises data center that is connected to a Virtual Private Cloud (VPC).

RDS

NetType

string

No

The network type. Valid values:

  • CLASSIC: Classic Network

  • VPC: Virtual Private Cloud (VPC)

VPC

InstanceState

string

No

The instance status. Valid values:

  • NORMAL: Normal

  • DISABLE: Disabled

NORMAL

PageNumber

integer

No

The page number.

1

PageSize

integer

No

The number of entries per page. The maximum value is 100.

50

Region

string

No

RealLoginUserUid

string

No

Response elements

Element

Type

Description

Example

object

The response body.

TotalCount

integer

The total number of instances that meet the specified criteria.

1

RequestId

string

The request ID.

B4B07137-F6AE-4756-8474-7F92BB6C4E04

ErrorCode

string

The error code.

UnknownError

ErrorMessage

string

The error message.

UnknownError

InstanceList

object

The instances.

Instance

array<object>

The details of the instances.

array<object>

The details of the instance.

VpcId

string

The ID of the virtual private cloud (VPC) to which the instance belongs.

vpc-o6wrloqsdqc9io3mg****

DatabaseUser

string

The username of the database account.

dbUser

DbaId

string

The ID of the database administrator (DBA) of the instance.

31****

UseDsql

integer

Indicates whether cross-database query is enabled for the instance. Valid values:

  • 0: disabled

  • 1: enabled

1

Port

integer

The port used to connect to the instance.

3306

EcsInstanceId

string

The ID of the Elastic Compute Service (ECS) instance.

150****

EnvType

string

The type of the environment to which the instance belongs. 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: performance testing environment

  • stag: staging environment

product

Sid

string

The system ID (SID) of the instance.

test

OwnerIdList

object

The IDs of the owners of the instance.

OwnerIds

array

The user IDs of the owners of the instance.

string

The ID of the owner.

12****

SafeRuleId

string

The ID of the security rule for the instance.

1

OwnerNameList

object

The nicknames of the owners of the instance.

OwnerNames

array

The nicknames of the owners.

string

The nickname of the owner.

yuyang_test

DbaNickName

string

The nickname of the DBA.

dbaName

QueryTimeout

integer

The timeout period for queries. Unit: seconds.

60

InstanceSource

string

The source of the instance.

RDS

Host

string

The endpoint of the instance.

****.mysql.rds.aliyuncs.com

State

string

The status of the instance.

NORMAL

DataLinkName

string

The name of the database link.

dblink_test

ExportTimeout

integer

The timeout period for exporting data. Unit: seconds.

86400

InstanceId

string

The ID of the instance.

150***

InstanceType

string

The type of the database.

mysql

DatabasePassword

string

The password that corresponds to the username of the database account.

******

InstanceAlias

string

The alias of the instance.

test

DdlOnline

integer

The lock-free schema change settings of the instance.

1

EcsRegion

string

The region in which the instance resides.

cn-hangzhou

StandardGroup

object

The control mode of the instance.

GroupName

string

The name of the security rule that corresponds to the control mode.

test

GroupMode

string

The control mode. Valid values:

  • COMMON: Security Collaboration

  • NONE_CONTROL: Flexible Management

  • STABLE: Stable Change

COMMON

SellSitd

boolean

Indicates whether sensitive data protection is enabled. Valid values:

  • true: enabled

  • false: disabled

true

SellTrust

string

Success

boolean

Indicates whether the request was successful. Valid values:

  • true

  • false

true

Examples

Success response

JSON format

{
  "TotalCount": 1,
  "RequestId": "B4B07137-F6AE-4756-8474-7F92BB6C4E04",
  "ErrorCode": "UnknownError",
  "ErrorMessage": "UnknownError",
  "InstanceList": {
    "Instance": [
      {
        "VpcId": "vpc-o6wrloqsdqc9io3mg****",
        "DatabaseUser": "dbUser",
        "DbaId": "31****",
        "UseDsql": 1,
        "Port": 3306,
        "EcsInstanceId": "150****",
        "EnvType": "product",
        "Sid": "test",
        "OwnerIdList": {
          "OwnerIds": [
            "12****"
          ]
        },
        "SafeRuleId": "1",
        "OwnerNameList": {
          "OwnerNames": [
            "yuyang_test"
          ]
        },
        "DbaNickName": "dbaName",
        "QueryTimeout": 60,
        "InstanceSource": "RDS",
        "Host": "****.mysql.rds.aliyuncs.com",
        "State": "NORMAL",
        "DataLinkName": "dblink_test",
        "ExportTimeout": 86400,
        "InstanceId": "150***",
        "InstanceType": "mysql",
        "DatabasePassword": "******",
        "InstanceAlias": "test",
        "DdlOnline": 1,
        "EcsRegion": "cn-hangzhou",
        "StandardGroup": {
          "GroupName": "test",
          "GroupMode": "COMMON"
        },
        "SellSitd": true,
        "SellTrust": ""
      }
    ]
  },
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.