Last updated: 2019-09-09 14:59:27


1. API Description

API domain name:

This API (DescribeDBInstances) describes the database instance list.

API request rate limit: 20 requests/sec.

2. Input Parameters

The following parameters are required for requesting this API, including action-specific parameters and common parameters. For more information about common parameters for all requests, see Common Request Parameters.

Parameter name Required Type Description
Action Yes String Common parameter. The name of this API: DescribeDBInstances
Version Yes String Common parameter. The version of this API: 2018-03-28
Region Yes String Common parameter. For more information, see the list of regions supported by the product.
ProjectId No Integer Project ID
Status No Integer Instance status. Value range:
  • 1: applying
  • 2: running
  • 3: restrictedly running (master/slave switching)
  • 4: isolated
  • 5: repossessing
  • 6: repossessed
  • 7: task running (e.g., backing up or rolling back the instance)
  • 8: decommissioned
  • 9: scaling
  • 10: migrating
  • 11: read-only
  • 12: restarting
  • Offset No Integer Offset. 0 by default
    Limit No Integer Number of results returned; 50 by default
    InstanceIdSet.N No Array of String One or more instance IDs in the format of mssql-si2823jyl

    3. Output Parameters

    Parameter name Type Description
    TotalCount Integer Total number of eligible instances. If the results are returned in multiple pages, this value is 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 ID of the request. Each request returns a unique ID. The RequestId is required to troubleshoot issues.

    4. Samples

    Sample 1. Querying the Instance List

    Input Sample Code
    &<Common request parameter>

    Output Sample Code

      "Response": {
        "RequestId": "e4d6e59c-fdca-4694-bfc3-890f2eadc109",
        "TotalCount": 1,
        "DBInstances": [
            "InstanceId": "mssql-njj2mtpl",
            "Region": "ap-guangzhou",
            "Zone": "ap-guangzhou-2",
            "Name": "8b0d6a95-4453-4a39-b484-ba94765a081b",
            "ProjectId": 0,
            "RegionId": 1,
            "ZoneId": 100002,
            "VpcId": 0,
            "SubnetId": 0,
            "Status": 2,
            "Vip": "",
            "Vport": 1433,
            "CreateTime": "2018-01-29 11:45:57",
            "UpdateTime": "2018-04-10 16:35:07",
            "Memory": 2000,
            "Storage": 10,
            "Model": 1,
            "VersionName": "SQL Server 2008 R2",
            "StartTime": "2018-01-29 11:45:57",
            "EndTime": "2018-05-29 11:45:57",
            "IsolateTime": "",
            "RenewFlag": 0,
            "UsedStorage": 8

    5. Developer Resources

    API Explorer

    This tool provides various capabilities such as online call, signature verification, SDK code generation, and quick API retrieval that significantly reduce the difficulty of using TencentCloud API.

    6. Error Codes

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

    Error Code Description
    InternalError Internal error.
    InternalError.DBError Database error.
    InternalError.GcsError GCS API error.
    InternalError.SystemError System error.
    InternalError.UnknownError Unknown error.
    InvalidParameter Incorrect parameter.
    InvalidParameter.InputIllegal Invalid input.
    InvalidParameter.ParamsAssertFailed Parameter assertion conversion error.