全部文档
当前文档

暂无内容

如果没有找到您期望的内容,请尝试其他搜索词

文档中心

查看数据库实例

最近更新时间:2021-10-14 10:42:11

DescribeDBInstances 查看数据库实例

获取账户下的实例列表,或者获取某一实例的详情(指定DBInstanceIdentifier的情况下)。在获取实例列表时可通过DBInstanceType、DBInstanceStatus、Keyword条件进行过滤。若所有列表无法一次全返回,可通过设置Marker来分页返回。

请求参数

英文名称 中文名称 类型 是否必须 备注
Action 调用接口名称 String 取固定值:DescribeDBInstances
Version API版本号 String 取固定值:2016-07-01
DBInstanceIdentifier 实例ID String 实例ID(传入实例ID,获取的是该实例的详情,否则则获取list)
DBInstanceType 实例类型 String HRDS(高可用),RR(只读实例),TRDS(临时实例),SINGLERDS(单机版),ERDS(三节点企业版),CDS_HRDS(高可用_云盘版)、CDS_TRDS(临时云盘版)
DBInstanceStatus 按实例状态过滤 String ACTIVE(运行中)/INVALID(请续费)
Keyword 按名称/VIP模糊过滤 String
Order 排序方式 String 区分大小写,取值范围:DEFAULT(默认排序方式),GROUP(按复制组排序,会把只读实例排在所属主实例的后面)
ProjectId 项目制Id String 默认值为所有项目
Marker 记录开始偏移量 Integer
MaxRecords 每页结果中包含的最大条数 Integer 取值范围:1-100
DBInstanceIdentifierIn 实例ids List<String> 实例id多选筛选 例如:DBInstanceIdentifierIn.0=xxx&DBInstanceIdentifierIn.1=xxx
DBInstanceNameIn 按实例名称过滤 String 示例(DBInstanceNameIn.1=test1,DBInstanceNameIn.2=test2)
VipIn 按vip过滤 String 示例(VipIn.1=10.9.2.3,VipIn.2=10.9.2.4)
EIPIn 按eip过滤 String 示例(EIPIn.1=10.9.2.5,EIPIn.2=10.9.2.6)
ExpiryDateLessThan 按照实例过期时间过滤 Integer 取值范围:>0

返回值

英文名称 中文名称 类型 备注
RequestId 请求ID String
DBInstance RDS实例列表 List
Marker 下次获取记录开始偏移量 Integer
MaxRecords 每页结果中包含的最大条数 Integer
TotalCount 记录总数 Integer

请求示例

http://krds.api.ksyun.com/?Action=DescribeDBInstances&Marker=1&MaxRecords=10&Version=2016-07-01&DBInstanceNameIn.1=test&DBInstanceNameIn.2=r&DBInstanceType=RR

示例返回

{
    "Data": {
        "Instances": [
            {
                "DBInstanceClass": {
                    "Id": "RDSOpenAPI_43e19b9291d6b519",
                    "Vcpus": 1,
                    "Disk": 5,
                    "Ram": 1
                },
                "DBInstanceIdentifier": "c76d46ee-fe4e-42e2-be70-2ddd3123eac5",
                "DBSource": {
                    "DBInstanceName": "Deleted"
                },
                "DBInstanceName": "testrr",
                "DBInstanceStatus": "ACTIVE",
                "DBInstanceType": "RR",
                "GroupId": "0b5aa180-e884-4fd6-8bed-04b4abb09f59",
                "Vip": "10.0.0.191",
                "Port": 3306,
                "Engine": "mysql",
                "EngineVersion": "5.7",
                "InstanceCreateTime": "2021-07-28T17:29:32+0800",
                "MasterUserName": "admin",
                "VpcId": "3c12ccdf-9b8f-4d9b-8aa6-a523897e97a1",
                "SubnetId": "293c16a5-c757-405c-a693-3b2a3adead50",
                "PubliclyAccessible": true,
                "ReadReplicaDBInstanceIdentifiers": [],
                "BillType": "DAY",
                "OrderType": "REGULAR",
                "OrderSource": "OPCENTER",
                "MultiAvailabilityZone": false,
                "AvailabilityZone": "cn-shanghai-3c",
                "ProductId": "25b5ac9c-b7e4-4d80-9d33-2af1d5585d7c",
                "OrderUse": "BUY",
                "ProjectId": 0,
                "ProjectName": "默认项目",
                "Region": "cn-shanghai-3",
                "BillTypeId": 5,
                "Tags": []
            },
            {
                "DBInstanceClass": {
                    "Id": "RDSOpenAPI_a691003b190faf1e",
                    "Vcpus": 1,
                    "Disk": 10,
                    "Ram": 1
                },
                "DBInstanceIdentifier": "8b00e1da-0864-4e40-b3f5-7e6ece8895d8",
                "DBSource": {
                    "DBInstanceName": "Deleted"
                },
                "DBInstanceName": "rds_mysql_rr_20210721203039",
                "DBInstanceStatus": "ACTIVE",
                "DBInstanceType": "RR",
                "GroupId": "f95db845-d441-4a62-bd9c-d9e8f85d051a",
                "SecurityGroupId": "760",
                "Vip": "10.0.1.100",
                "Port": 3306,
                "Engine": "mysql",
                "EngineVersion": "5.7",
                "InstanceCreateTime": "2021-07-21T20:31:13+0800",
                "MasterUserName": "admin",
                "VpcId": "076cfd7e-f2c3-44b8-91a9-b8d4d01fb304",
                "SubnetId": "386c5c5b-e5cd-4e3f-8bbd-3cbc24d5d5f2",
                "PubliclyAccessible": true,
                "ReadReplicaDBInstanceIdentifiers": [],
                "BillType": "DAY",
                "OrderType": "REGULAR",
                "OrderSource": "CONSOLE",
                "MultiAvailabilityZone": false,
                "AvailabilityZone": "cn-shanghai-3a",
                "ProductId": "5e64e0a9-f79d-43d4-afbd-6d6de97dc52f",
                "OrderUse": "BUY",
                "ProjectId": 0,
                "ProjectName": "默认项目",
                "Region": "cn-shanghai-3",
                "BillTypeId": 5,
                "Tags": []
            },
            {
                "DBInstanceClass": {
                    "Id": "RDSOpenAPI_a691003b190faf1e",
                    "Vcpus": 1,
                    "Disk": 10,
                    "Ram": 1
                },
                "DBInstanceIdentifier": "33299da6-a987-46e2-88cc-ce605efe38da",
                "DBSource": {
                    "DBInstanceName": "Deleted"
                },
                "DBInstanceName": "刘荣-迁移可用区_1-RR",
                "DBInstanceStatus": "ACTIVE",
                "DBInstanceType": "RR",
                "GroupId": "f95db845-d441-4a62-bd9c-d9e8f85d051a",
                "SecurityGroupId": "760",
                "Vip": "10.0.1.211",
                "Port": 3306,
                "Engine": "mysql",
                "EngineVersion": "5.7",
                "InstanceCreateTime": "2021-07-21T19:39:18+0800",
                "MasterUserName": "admin",
                "VpcId": "076cfd7e-f2c3-44b8-91a9-b8d4d01fb304",
                "SubnetId": "386c5c5b-e5cd-4e3f-8bbd-3cbc24d5d5f2",
                "PubliclyAccessible": true,
                "ReadReplicaDBInstanceIdentifiers": [],
                "BillType": "DAY",
                "OrderType": "REGULAR",
                "OrderSource": "CONSOLE",
                "MultiAvailabilityZone": false,
                "AvailabilityZone": "cn-shanghai-3c",
                "ProductId": "c731ad09-a71a-4d41-8d47-bfc1151fff9b",
                "OrderUse": "BUY",
                "ProjectId": 0,
                "ProjectName": "默认项目",
                "Region": "cn-shanghai-3",
                "BillTypeId": 5,
                "Tags": []
            }
        ],
        "TotalCount": 3,
        "MaxRecords": 10,
        "Marker": 3
    },
    "RequestId": "87d11e62-4519-4cc9-96c0-d4d39b319e78"
}
文档导读
纯净模式常规模式

纯净模式

点击可全屏预览文档内容
文档反馈