You need to enable JavaScript to run this app.
导航
DescribeDBInstances
最近更新时间:2025.10.23 21:19:41首次发布时间:2023.11.15 22:39:52
复制全文
我的收藏
有用
有用
无用
无用

调用 DescribeDBInstances 接口查询实例列表。

请求类型

异步请求。

注意事项

本接口的请求参数均无默认值。在不传入某个参数时,表示不对该参数进行过滤,按照其他参数限定的查询条件下进行查询。

调试

请求参数

参数
类型
是否必选
示例值
描述
InstanceId
String
postgres-21a3333b****
实例 ID。
InstanceName
String
测试实例
实例名称。
InstanceStatus
String
Running

实例状态,取值:

  • Running:运行中。
  • Creating:创建中。
  • Deleting:删除中。
  • Restarting:重启中。
  • Restoring:恢复中。
  • Updating:变更中。
  • Upgrading:升级中。
  • Error:错误。
  • Released:已释放。
  • CreateError:创建错误。
  • MasterChanging:主节点切换中。
  • Deleted:已删除。
  • Recycled:已回收。
DBEngineVersion
String
PostgreSQL_12

兼容版本。取值:

  • PostgreSQL_11:PostgreSQL 11。
  • PostgreSQL_12:PostgreSQL 12。
  • PostgreSQL_13:PostgreSQL 13。
  • PostgreSQL_14:PostgreSQL 14。
  • PostgreSQL_15:PostgreSQL 15。
  • PostgreSQL_16:PostgreSQL 16。
  • PostgreSQL_17:PostgreSQL 17。
CreateTimeStart
String
2022-01-01T10:10:10.000Z
查询创建实例创建时间范围。
CreateTimeEnd
String
2022-01-01T10:10:10.000Z
查询创建实例创建时间范围。
ZoneId
String
cn-beijing-a
实例所属可用区。
ChargeType
String
PostPaid

付费类型。取值:

  • PostPaid:按量付费。
  • PrePaid:包年包月
ProjectName
String
testProject
项目名称。
TagFilters
Object[]
请参见请求示例。
标签查询数组对象。单次最多支持同时传入 10 组标签键值对进行查询筛选。
PageNumber
Integer
1
当前页查询偏移量,默认值为 1。
PageSize
Integer
10
每页记录数,取值应大于 0 且不超过 1000,默认值为 10。
StorageType
String
LocalSSD
实例存储类型。取固定值 LocalSSD(本地 SSD 盘)。

返回参数

参数
类型
示例值
描述
Total
Integer
1
实例总数。
Instances
Object[]
请参见返回示例。
实例列表。

示例

请求示例

POST /?Action=DescribeDBInstances&Version=2022-01-01 HTTP/1.1
Content-Type: application/json
Host: rds-postgresql.cn-beijing.volcengineapi.com
X-Date: 20231002T101010Z
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****
{
    "PageSize": 10,
    "PageNumber": 1,
    "ChargeType": "PostPaid",
    "InstanceStatus": "Running",
    "CreateTimeStart": "2024-07-24T09:05:36.000Z",
    "TagFilters": [
        {
            "Key": "project",
            "Value": "default"
        }
    ]
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20251014123704ABBB743EDFA13A979A78-62ee28",
        "Action": "DescribeDBInstances",
        "Version": "2022-01-01",
        "Service": "rds_postgresql",
        "Region": "cn-beijing"
    },
    "Result": {
        "Instances": [
            {
                "AddressObject": [
                    {
                        "DNSVisibility": false,
                        "Domain": "postgres-d9ace5c3****-public.rds-pg.cn-beijing.volces.com",
                        "EipId": "eip-1a1k0eh4m8mio8nvepkxv****",
                        "IPAddress": "101.126.28.254",
                        "IPv6Address": "",
                        "InternetProtocol": "IPv4",
                        "NetworkType": "Public",
                        "Port": "5432",
                        "SubnetId": "subnet-rrnkvy55npc0v0x57x8****"
                    },
                    {
                        "CrossRegionDomain": "postgres-d9ace5c3****-private.rds-pg.cn-beijing.ivolces.com",
                        "DNSVisibility": false,
                        "Domain": "postgresd9ace5c3****.rds-pg.ivolces.com",
                        "DomainVisibilitySetting": "LocalDomain",
                        "EipId": "",
                        "IPAddress": "192.168.24.0",
                        "IPv6Address": "",
                        "InternetProtocol": "IPv4",
                        "NetworkType": "Private",
                        "Port": "5432",
                        "SubnetId": "subnet-rrnkvy55npc0v0x57x8****"
                    }
                ],
                "AllowListVersion": "v1",
                "ChargeDetail": {
                    "AutoRenew": true,
                    "ChargeEndTime": "2025-11-17T15:59:59.000Z",
                    "ChargeStartTime": "2023-04-06T01:26:57.000Z",
                    "ChargeStatus": "Normal",
                    "ChargeType": "PrePaid",
                    "Number": 1,
                    "OverdueReclaimTime": "2025-11-24T15:59:59.000Z",
                    "OverdueTime": "2025-11-18T04:00:00.000Z",
                    "Period": 1,
                    "PeriodUnit": "Month"
                },
                "CreateTime": "2023-04-06T01:26:57.000Z",
                "DBEngineVersion": "PostgreSQL_11",
                "Endpoints": [
                    {
                        "Address": [
                            {
                                "DNSVisibility": false,
                                "Domain": "postgres-d9ace5c3****-public.rds-pg.cn-beijing.volces.com",
                                "EipId": "eip-1a1k0eh4m8mio8nvepkxv****",
                                "IPAddress": "101.126.28.254",
                                "IPv6Address": "",
                                "InternetProtocol": "IPv4",
                                "NetworkType": "Public",
                                "Port": "5432",
                                "SubnetId": "subnet-rrnkvy55npc0v0x57x8****"
                            },
                            {
                                "CrossRegionDomain": "postgres-d9ace5c3****-private.rds-pg.cn-beijing.ivolces.com",
                                "DNSVisibility": false,
                                "Domain": "postgresd9ace5c3****.rds-pg.ivolces.com",
                                "DomainVisibilitySetting": "LocalDomain",
                                "EipId": "",
                                "IPAddress": "192.168.24.0",
                                "IPv6Address": "",
                                "InternetProtocol": "IPv4",
                                "NetworkType": "Private",
                                "Port": "5432",
                                "SubnetId": "subnet-rrnkvy55npc0v0x57x8****"
                            }
                        ],
                        "AutoAddNewNodes": "Enable",
                        "Description": "",
                        "EnableReadOnly": "Disable",
                        "EnableReadWriteSplitting": "Disable",
                        "EndpointId": "postgres-d9ace5c3****",
                        "EndpointName": "",
                        "EndpointType": "Cluster",
                        "ReadOnlyNodeDistributionType": "Default",
                        "ReadOnlyNodeMaxDelayTime": 30,
                        "ReadOnlyNodeWeight": [
                            {
                                "NodeType": "Primary",
                                "Weight": 300
                            },
                            {
                                "NodeId": "postgres-ro-41d8643f4e17",
                                "NodeType": "ReadOnly",
                                "Weight": 0
                            }
                        ],
                        "ReadWriteMode": "ReadWrite",
                        "ReadWriteProxyConnection": 200,
                        "WriteNodeHaltWriting": false
                    },
                    {
                        "Address": [
                            {
                                "DNSVisibility": false,
                                "Domain": "postgres-ro-41d8643f4e17-public.rds-pg.cn-beijing.volces.com",
                                "EipId": "eip-3pt0ad8yolqm86csxyv4oroxb",
                                "IPAddress": "180.184.36.160",
                                "IPv6Address": "",
                                "InternetProtocol": "IPv4",
                                "NetworkType": "Public",
                                "Port": "5432",
                                "SubnetId": "subnet-rrnkvy55npc0v0x57x8****"
                            },
                            {
                                "DNSVisibility": false,
                                "Domain": "postgresro41d8643f4e17.rds-pg.ivolces.com",
                                "DomainVisibilitySetting": "LocalDomain",
                                "EipId": "",
                                "IPAddress": "192.168.23.255",
                                "IPv6Address": "",
                                "InternetProtocol": "IPv4",
                                "NetworkType": "Private",
                                "Port": "5432",
                                "SubnetId": "subnet-rrnkvy55npc0v0x57x8****"
                            }
                        ],
                        "AutoAddNewNodes": "Enable",
                        "Description": "",
                        "EnableReadOnly": "Disable",
                        "EnableReadWriteSplitting": "Disable",
                        "EndpointId": "postgres-ro-41d8643f4e17",
                        "EndpointName": "",
                        "EndpointType": "Custom",
                        "ReadOnlyNodeDistributionType": "Default",
                        "ReadOnlyNodeWeight": [
                            {
                                "NodeId": "postgres-ro-41d8643f4e17",
                                "NodeType": "ReadOnly",
                                "Weight": 300
                            }
                        ],
                        "ReadWriteMode": "ReadOnly",
                        "ReadWriteProxyConnection": 200,
                        "WriteNodeHaltWriting": false
                    },
                    {
                        "Address": [
                            {
                                "DNSVisibility": false,
                                "Domain": "postgres-d9ace5c3****-custom-911a-private.rds-pg.ivolces.com",
                                "DomainVisibilitySetting": "LocalDomain",
                                "EipId": "",
                                "IPAddress": "192.168.16.4",
                                "IPv6Address": "",
                                "InternetProtocol": "IPv4",
                                "NetworkType": "Private",
                                "Port": "5432",
                                "SubnetId": "subnet-rrnkvy55npc0v0x57x8****"
                            }
                        ],
                        "AutoAddNewNodes": "Disable",
                        "Description": "",
                        "EnableReadOnly": "Disable",
                        "EnableReadWriteSplitting": "Disable",
                        "EndpointId": "postgres-d9ace5c3****-custom-911a",
                        "EndpointName": "自定义终端",
                        "EndpointType": "Custom",
                        "ReadOnlyNodeDistributionType": "Default",
                        "ReadOnlyNodeMaxDelayTime": 30,
                        "ReadOnlyNodeWeight": [
                            {
                                "NodeType": "Primary",
                                "Weight": 300
                            }
                        ],
                        "ReadWriteMode": "ReadWrite",
                        "ReadWriteProxyConnection": 200,
                        "WriteNodeHaltWriting": false
                    }
                ],
                "InstanceId": "postgres-d9ace5c3****",
                "InstanceName": "测试实例",
                "InstanceStatus": "Running",
                "InstanceType": "HA",
                "NodeNumber": 3,
                "NodeSpec": "rds.postgres.1c2g",
                "ProjectName": "default",
                "RegionId": "cn-beijing",
                "StorageSpace": 100,
                "StorageType": "LocalSSD",
                "SubnetId": "subnet-rrnkvy55npc0v0x57x8****",
                "Tags": [
                    {
                        "Key": "city",
                        "Value": "chengdu"
                    },
                    {
                        "Key": "owner",
                        "Value": "hechunxiong"
                    },
                    {
                        "Key": "分账TAG",
                        "Value": "测试分账功能"
                    }
                ],
                "VpcId": "vpc-miswzgsgy77k5smt1ar9****",
                "ZoneId": "cn-beijing-a",
                "ZoneIds": [
                    "cn-beijing-a"
                ]
            }
        ],
        "Total": 1
    }
}