All Products
Search
Document Center

Data Management:ListInstances

Last Updated:Oct 21, 2024

Queries the information about database instances.

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

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TidlongNo

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

3***
SearchKeystringNo

The keyword that is used to search for database instances.

test
DbTypestringNo

The type of the database. For more information about the valid values of this parameter, see DbType parameter.

MySQL
EnvTypestringNo

The type of the environment to which the database 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: stress testing environment
  • stag: staging environment
product
InstanceSourcestringNo

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
NetTypestringNo

The network type of the database instance. Valid values:

  • CLASSIC: classic network
  • VPC: VPC
VPC
InstanceStatestringNo

The status of the database instance. Valid values:

  • NORMAL
  • DISABLE
NORMAL
PageNumberintegerNo

The number of the page to return.

1
PageSizeintegerNo

The number of entries to return on each page. The number cannot exceed 100.

50

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

TotalCountlong

The total number of database instances that are returned.

1
RequestIdstring

The request ID.

B4B07137-F6AE-4756-8474-7F92BB6C4E04
ErrorCodestring

The error code that is returned.

UnknownError
ErrorMessagestring

The error message that is returned.

UnknownError
InstanceListarray<object>

The information about the database instances that are returned.

Instanceobject
VpcIdstring

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

vpc-o6wrloqsdqc9io3mg****
DatabaseUserstring

The account that is used to log on to the database.

dbUser
DbaIdstring

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

31****
UseDsqlinteger

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

  • 0: disabled
  • 1:: enabled
1
Portinteger

The port number that is used to connect to the database instance.

3306
EcsInstanceIdstring

The ID of the ECS instance on which the database instance is deployed.

150****
EnvTypestring

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

  • product: production environment
  • dev: development environment
  • pre: pre-release environment
  • test: test environment
  • sit: SIT environment
  • uat: UAT environment
  • pet: stress testing environment
  • stag: staging environment
product
Sidstring

The system ID (SID) of the database instance.

test
OwnerIdListarray

The IDs of the owners of the database instance.

OwnerIdsstring

The ID of the owner of the database instance.

123453
SafeRuleIdstring

The ID of the security rule set of the database instance.

1
OwnerNameListarray

The nicknames of the owners of the database instance.

OwnerNamesstring

The nickname of the owner of the database instance.

yuyang_test
DbaNickNamestring

The nickname of the DBA of the instance.

dbaName
QueryTimeoutinteger

The timeout period for querying data in the database instance.

60
InstanceSourcestring

The source of the database instance.

RDS
Hoststring

The host address that is used to connect to the database instance.

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

The status of the database instance.

NORMAL
DataLinkNamestring

The name of the database link for the database instance.

dblink_test
ExportTimeoutinteger

The timeout period for exporting data from the database instance.

86400
InstanceIdstring

The ID of the instance.

150***
InstanceTypestring

The type of the database instance.

mysql
DatabasePasswordstring

The password that is used to log on to the database instance.

******
InstanceAliasstring

The alias of the database instance.

test
DdlOnlineinteger

Indicates whether the lock-free schema change feature is enabled for the database instance.

1
EcsRegionstring

The ID of the region in which the database instance resides.

cn-hangzhou
StandardGroupobject

The control mode of the database instance.

GroupNamestring

The name of the security rule corresponding to the control mode.

test
GroupModestring

The type of the control mode. Valid values:

  • COMMON: Security Collaboration
  • NONE_CONTROL: Flexible Management
  • STABLE: Stable Change
COMMON
SellSitdboolean

Indicates whether the sensitive data protection feature is enabled. Valid values:

  • true
  • false
true
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true

Examples

Sample success responses

JSONformat

{
  "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": [
            "123453"
          ]
        },
        "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
      }
    ]
  },
  "Success": true
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history