DescribeDBInstances

Last updated: 2020-09-10 18:03:59

1. API Description

Domain name for API request: mariadb.tencentcloudapi.com.

This API is used to query the TencentDB instance list. It supports filtering instances by project ID, instance ID, private address, and instance name.
If no filter is specified, 20 instances will be returned by default. Up to 100 instances can be returned for a single request.

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: mariadb.ap-shanghai-fsi.tencentcloudapi.com

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: 2017-03-12.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
InstanceIds.N No Array of String Queries by instance ID or IDs. Instance ID is in the format of tdsql-ow728lmc. Up to 100 instances can be queried in one request.
SearchName No String Search field name. Valid values: instancename (search by instance name), vip (search by private IP), all (search by instance ID, instance name, and private IP).
SearchKey No String Search keyword. Fuzzy search is supported. Multiple keywords should be separated by line breaks (\n).
ProjectIds.N No Array of Integer Queries by project ID
IsFilterVpc No Boolean Whether to search by VPC
VpcId No String VPC ID, which is valid when IsFilterVpc is 1
SubnetId No String VPC subnet ID, which is valid when IsFilterVpc is 1
OrderBy No String Sort by field. Valid values: projectId, createtime, instancename
OrderByType No String Sorting order. Valid values: desc, asc
Offset No Integer Offset. Default value: 0
Limit No Integer Number of results to be returned. Default value: 20. Maximum value: 100.
OriginSerialIds.N No Array of String Queries by OriginSerialId
IsFilterExcluster No Boolean Identifies whether to use the ExclusterType field. false: no, true: yes
ExclusterType No Integer Instance cluster type. 1: non-dedicated cluster, 2: dedicated cluster, 0: all
ExclusterIds.N No Array of String Filters instances by dedicated cluster ID in the format of dbdc-4ih6uct9

3. Output Parameters

Parameter Name Type Description
TotalCount Integer Number of eligible instances
Instances Array of DBInstance Instance details 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 by instance ID

Input Example

https://mariadb.tencentcloudapi.com/?Action=DescribeDBInstances
&InstanceIds.0=tdsql-722d255z
&<Common request parameters>

Output Example

{
  "Response": {
    "RequestId": "6838d283-fdd9-419c-aabe-df6ee5cf42a7",
    "TotalCount": 1,
    "Instances": [
      {
        "InstanceId": "tdsql-722d255z",
        "InstanceName": "tdsql-722d255z",
        "AppId": 1251006373,
        "OriginSerialId": "set_1524577391_54095887",
        "ProjectId": 0,
        "Region": "ap-guangzhou",
        "Zone": "ap-guangzhou-1",
        "VpcId": 75203,
        "SubnetId": 45109,
        "UniqueVpcId": "vpc-5rkcp0wb",
        "UniqueSubnetId": "subnet-6ffate6q",
        "Status": 2,
        "Vip": "172.17.0.8",
        "Vport": 3306,
        "WanDomain": "",
        "WanVip": "",
        "WanPort": 0,
        "CreateTime": "2018-04-24 21:40:59",
        "UpdateTime": "2018-04-24 22:25:59",
        "AutoRenewFlag": 0,
        "NodeCount": 2,
        "Id": 40964,
        "IsTmp": 0,
        "ExclusterId": "",
        "Memory": 2,
        "Storage": 30,
        "Qps": 2100,
        "Pid": 10890,
        "PeriodEndTime": "2018-05-02 21:40:59",
        "Uin": "20548499",
        "TdsqlVersion": "Designed based on MariaDB 10.1.9 (compatible with MySQL 5.6)"
      }
    ]
  }
}

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.

SDK

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
InternalError.CamAuthFailed CAM authentication request failed.
InternalError.DbOperationFailed Failed to query the database.
InternalError.FenceError Failed to query the information of a dedicated cluster.
InternalError.GetVpcFailed Failed to query the VPC information.
InvalidParameter.GenericParameterError An error occurred while verifying parameter validity.
InvalidParameterValue.IllegalExclusterID The dedicated cluster to which the database instance belongs was not found.
InvalidParameterValue.SpecIdIllegal The specification information of the database instance was not found.
UnauthorizedOperation.PermissionDenied You have no permission to manipulate this API or resource.

Was this page helpful?

Was this page helpful?

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