Last updated: 2020-07-31 11:21:27

1. API Description

Domain name for API request:

This API is used to query the list of instances.

A maximum of 20 requests can be initiated per second for this API.

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example:

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DescribeDBInstances.
Version Yes String Common parameter. The value used for this API: 2018-03-28.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
ProjectId No Integer Project ID
Status No Integer Instance status. Valid values:
  • 1: applying
  • 2: running
  • 3: running restrictedly (primary/secondary switching)
  • 4: isolated
  • 5: repossessing
  • 6: repossessed
  • 7: executing task (e.g., backing up or rolling back instance)
  • 8: deactivated
  • 9: scaling out instance
  • 10: migrating instance
  • 11: read-only
  • 12: restarting
  • Offset No Integer Page number. Default value: 0
    Limit No Integer Number of results per page. Value range: 1-100. Default value: 100
    InstanceIdSet.N No Array of String One or more instance IDs in the format of mssql-si2823jyl
    PayMode No Integer Retrieves billing type. 0: pay-as-you-go
    VpcId No String Unique string-type ID of instance VPC in the format of vpc-xxx. If an empty string ("") is passed in, filtering will be made by basic network.
    SubnetId No String Unique string-type ID of instance subnet in the format of subnet-xxx. If an empty string ("") is passed in, filtering will be made by basic network.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Total number of eligible instances. If the results are returned in multiple pages, this value will be the number of all eligible instances but not the number of instances returned according to the current values of Limit and Offset
    DBInstances Array of DBInstance Instance list
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying instance list

    Input Example
    &<Common request parameters>

    Output Example

      "Response": {
        "DBInstances": [
            "BackupTime": "",
            "Cpu": 1,
            "CreateTime": "2019-06-19 11:59:52",
            "EndTime": "2019-09-20 23:15:06",
            "InstanceId": "mssql-3l3fgqn7",
            "IsolateTime": "0000-00-00 00:00:00",
            "Memory": 4,
            "Model": 1,
            "Name": "String",
            "PayMode": 1,
            "Pid": 10908,
            "ProjectId": 0,
            "Region": "ap-guangzhou",
            "RegionId": 1,
            "RenewFlag": 1,
            "StartTime": "2019-06-19 12:00:05",
            "Status": 2,
            "Storage": 10,
            "SubnetId": 3344,
            "Type": "TS85",
            "Uid": "gamedb.gz152.cdb.db",
            "UpdateTime": "2019-09-02 14:30:58",
            "UsedStorage": 0,
            "Version": "2008R2",
            "VersionName": "SQL Server 2008 Enterprise",
            "Vip": "",
            "VpcId": 14,
            "Vport": 1433,
            "Zone": "ap-guangzhou-2",
            "ZoneId": 100002,
            "UniqVpcId": "vpc-mknbt351",
            "UniqSubnetId": "subnet-f72hylo6"
        "RequestId": "9c65fec1-8bce-4be9-b0fd-5f559553b546",
        "TotalCount": 1

    5. Developer Resources

    API Explorer

    This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.


    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    FailedOperation.GetVpcFailed Failed to get VPC information.
    InternalError Internal error.
    InternalError.DBError Database error
    InternalError.GcsError GCS API error.
    InternalError.SystemError System error.
    InternalError.UnknownError Unknown error.
    InvalidParameter Invalid parameter.
    InvalidParameter.InputIllegal Input error.
    InvalidParameter.ParamsAssertFailed An error occurred while converting parameter assertion.
    ResourceNotFound.VpcNotExist The VPC does not exist.
    UnauthorizedOperation.PermissionDenied CAM authentication error.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback