tencent cloud

云数据库 SQL Server

动态与公告
产品动态
产品公告
新手指引
产品简介
产品概述
产品架构
产品优势
应用场景
地域和可用区
大版本生命周期说明
功能概览及差异
实例类型
实例规格
存储类型
常用概念
网络环境
许可声明
购买指南
计费概述
产品价格
购买方式
续费说明
欠费说明
退费说明
按量转包年包月
调整实例费用说明
本地备份空间收费说明
跨地域备份收费说明
查看账单明细
快速入门
创建 SQL Server 实例
连接 SQL Server 实例
管理 SQL Server 实例
操作指南
约束与限制
使用规范与建议
维护管理实例
调整实例配置
只读实例
网络管理
账号管理
数据库管理
数据安全
参数配置
监控与告警
备份与回档
日志管理
发布订阅
数据集成服务(SSIS)
数据迁移(新版)
数据迁移(旧版)
数据同步(DTS)
实践教程
云数据库 SQL Server 定期维护方法
云数据库 SQL Server 慢 SQL 优化
如何更好地使用 Tempdb
跨账号备份恢复
为云数据库 SQL Server 创建 VPC
金蝶K/3 WISE 接入云数据库 SQL Server
账号权限和权限控制
变更数据捕获功能的开启和关闭
收缩数据库
API 文档
History
Introduction
API Category
Making API Requests
Sales and fee related APIs
Instance Management related APIs
Operation and maintenance management related APIs
Network management related APIs
Account management related APIs
Database management related APIs
Security group management related APIs
Data security encryption related APIs
Parameter configuration related APIs
Extended Event related APIs
Log management related APIs
Read only instance management related APIs
Publish and subscribe related APIs
Backup related APIs
Rollback related APIs
Data migration (cold standby migration) related APIs
SQL Server Integration Services (SSIS) related APIs
Data migration (DTS old version) related APIs
Data Types
Error Codes
常见问题
常见问题概览
选购咨询
计费与选购
连接与网络
账号与权限
备份与回档
数据迁移
发布订阅
只读实例
版本架构升级
磁盘扩缩容与规格升降级
监控与告警
日志相关
参数修改
功能特性相关
性能空间内存相关
相关协议
服务等级协议
服务条款
性能测试
性能测试报告
词汇表
联系我们

DescribeDBInstances

PDF
聚焦模式
字号
最后更新时间: 2025-10-28 22:49:11

1. API Description

Domain name for API request: sqlserver.intl.tencentcloudapi.com.

This API is used to query the list of instances.

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

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 Params. The value used for this API: DescribeDBInstances.
Version Yes String Common Params. The value used for this API: 2018-03-28.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley, sa-saopaulo.
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.
    VipSet.N No Array of String The list of instance private IPs, such as 172.1.0.12
    InstanceNameSet.N No Array of String The list of instance names used for fuzzy match
    VersionSet.N No Array of String The list of instance version numbers, such as 2008R2, 2012SP3
    Zone No String Instance availability zone, such as ap-guangzhou-3
    TagKeys.N No Array of String The list of instance tags
    SearchKey No String Keyword used for fuzzy match, including instance ID, instance name, and instance private IP
    UidSet.N No Array of String Unique Uid of an instance
    InstanceType No String Instance type. HA: high-availability instance; RO: read-only instance; SI: basic edition instance; BI: business intelligence service instance; cvmHA: dual-server high-availability instance with cloud disk; cvmRO: read-only instance with cloud disk; MultiHA: multi-node instance; cvmMultiHA: multi-node instance with cloud disk.
    PaginationType No String Pagination query method. offset - pagination query by offset; pageNumber - pagination query by number of pages. The default value is pageNumber.

    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, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Querying the list of instances

    Input Example

    POST / HTTP/1.1
    Host: sqlserver.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeDBInstances
    <Common request parameters>
    
    {
        "Status": "2",
        "SearchKey": "172.17.0.12",
        "VpcId": "vpc-mknbt351",
        "Zone": "ap-guangzhou-3",
        "VersionSet": [
            "2008R2"
        ],
        "ProjectId": "0",
        "Offset": "0",
        "PayMode": "1",
        "Limit": "3",
        "InstanceIdSet": [
            "mssql-3l3fgqn7"
        ],
        "SubnetId": "subnet-f72hylo6",
        "TagKeys": [
            "Test tag"
        ],
        "VipSet": [
            "172.1.0.12"
        ],
        "InstanceNameSet": [
            "Data warehouse"
        ]
    }

    Output Example

    {
        "Response": {
            "DBInstances": [
                {
                    "BackupCycle": [
                        1
                    ],
                    "BackupCycleType": "daily",
                    "BackupModel": "master_pkg",
                    "BackupSaveDays": 7,
                    "BackupTime": "07:03:00",
                    "Collation": "Chinese_PRC_CI_AS",
                    "Cpu": 4,
                    "CreateTime": "2022-11-07 16:21:01",
                    "CrossBackupEnabled": "disable",
                    "CrossBackupSaveDays": 0,
                    "CrossRegions": [],
                    "DnsPodDomain": "",
                    "EndTime": "0000-00-00 00:00:00",
                    "HAFlag": "SINGLE",
                    "InstanceId": "mssql-fz80u7u1",
                    "InstanceNote": "",
                    "InstanceType": "SI",
                    "IsolateOperator": "",
                    "IsolateTime": "0000-00-00 00:00:00",
                    "Memory": 8,
                    "Model": 2,
                    "Name": "2008-2012-2016",
                    "PayMode": 0,
                    "Pid": 1003456,
                    "ProjectId": 0,
                    "ROFlag": "",
                    "Region": "ap-guangzhou",
                    "RegionId": 1,
                    "RenewFlag": 0,
                    "ResourceTags": null,
                    "IsDrZone": false,
                    "SlaveZones": {
                        "SlaveZone": "",
                        "SlaveZoneName": ""
                    },
                    "StartTime": "2022-11-07 16:21:01",
                    "Status": 2,
                    "Storage": 40,
                    "SubFlag": "",
                    "SubnetId": 2118677,
                    "TgwWanVPort": 0,
                    "TimeZone": "China Standard Time",
                    "Type": "CLOUD_PREMIUM",
                    "Uid": "gamedb.gz1208.cdb.db",
                    "UniqSubnetId": "subnet-ieianm0o",
                    "UniqVpcId": "vpc-o739nubl",
                    "UpdateTime": "2022-11-07 20:04:03",
                    "UsedStorage": 0,
                    "Version": "2019",
                    "VersionName": "SQL Server 2019 Enterprise",
                    "Vip": "10.24.12.28",
                    "VpcId": 5350471,
                    "Vport": 1433,
                    "Zone": "ap-guangzhou-1"
                    "ZoneId": 100003
                }
            ],
            "RequestId": "de641788-0565-4617-a7f4-639de128772b",
            "TotalCount": 1
        }
    }

    5. Developer Resources

    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
    FailedOperation.DBError Database error.
    FailedOperation.GcsError The operation failed or the network timed out.
    InternalError Internal 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.
    ResourceUnavailable.VpcNotExist VPC not found.
    UnauthorizedOperation.PermissionDenied CAM authentication error.

    帮助和支持

    本页内容是否解决了您的问题?

    填写满意度调查问卷,共创更好文档体验。

    文档反馈