Queries DescribeDbInstances of the storage layer, such as RDS or PolarDB.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionString RequiredDescribeDbInstancesThe operation that you want to perform. The value is DescribeDbInstances.
DrdsInstanceIdString Requireddrds************The ID of a DRDS instance.
SearchString Nopc-***************The ID of the storage or cluster.
DbInstTypeString NoApsara PolarDBStorage layer type. Valid values: POLARDB or RDS.
PageNumberIntegerOptional1The page number of the returned page.
PageSizeIntegerOptional10The number of entries to return on each page.
RegionIdStringNocn-hangzhouThe ID of the region.

Response parameters

ParameterTypeExampleDescription
ItemsArrayThe details of the instance.
DBInstance
DBInstanceDescriptionStringtestThe description of the storage instance.
DBInstanceIdStringrm-****************The ID of the storage instance.
DBInstanceStatusInteger 1Storage layer instance status. Valid values:
  • 0: creating
  • 1: In use
  • 3: Deleting
  • 5: restarting
  • 6: upgrading /Downgrading
  • 7: Recovering
  • 8: switching the Internet and intranet
DBInstanceTypeStringPrimaryThe storage layer instance type.
EngineStringMySQLThe engine of the storage instance.
EngineVersionString5.7The version of the engine for the storage instance.
InstanceNetworkTypeStringVPCThe network type of the storage layer. Valid values:
  • VPC: VPC
  • CLASSIC : Classic Network
ReadOnlyDBInstanceIdList[]The details about a read-only storage instance.
RegionIdBooleancn-hangzhouThe ID of the region where the storage instance resides.
ZoneIdStringcn-hangzhou-aThe ID of the zone where the storage instance resides.
RequestIdStringConfigure Internal Audit alarm rules *The ID of the request

Examples

Sample requests

http(s)://[drds.aliyuncs.com]/?Action=DescribeDbInstances
&DrdsInstanceId=drds************
&Search=pc-***************
&DbInstType=POLARDB
&PageNumber=1
&PageSize=10
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<RequestId>293275B3-8FC0-4619-A26E-6F062F******</RequestId>
<Items>
    <DBInstance>
        <EngineVersion>5.7</EngineVersion>
        <DBInstanceStatus>1</DBInstanceStatus>
        <ZoneId>cn-hangzhou-e</ZoneId>
        <DBInstanceId>rm-**************</DBInstanceId>
        <ReadOnlyDBInstanceId>
        </ReadOnlyDBInstanceId>
        <DBInstanceType>Primary</DBInstanceType>
        <RegionId>cn-hangzhou</RegionId>
        <Engine>MySQL</Engine>
        <DBInstanceDescription>test</DBInstanceDescription>
        <InstanceNetworkType>Classic</InstanceNetworkType>
    </DBInstance>
    <DBInstance>
        <EngineVersion>5.7</EngineVersion>
        <DBInstanceStatus>1</DBInstanceStatus>
        <ZoneId>cn-hangzhou-e</ZoneId>
        <DBInstanceId>rm-**************</DBInstanceId>
        <ReadOnlyDBInstanceId>
        </ReadOnlyDBInstanceId>
        <DBInstanceType>Primary</DBInstanceType>
        <RegionId>cn-hangzhou</RegionId>
        <Engine>MySQL</Engine>
        <DBInstanceDescription>test</DBInstanceDescription>
        <InstanceNetworkType>Classic</InstanceNetworkType>
    </DBInstance>
</Items>

JSON format

{
    "RequestId": "293275B3-8FC0-4619-A26E-6F062F******",
    "Items": {
        "DBInstance": [
            {
                "EngineVersion": "5.7",
                "DBInstanceStatus": 1,
                "ZoneId": "cn-hangzhou-e",
                "DBInstanceId": "rm-**************",
                "ReadOnlyDBInstanceId": {
                    "ReadOnlyDBInstanceId": []
                },
                "DBInstanceType": "Primary",
                "RegionId": "cn-hangzhou",
                "Engine": "MySQL",
                "DBInstanceDescription": "test",
                "InstanceNetworkType": "Classic"
            },
            {
                "EngineVersion": "5.7",
                "DBInstanceStatus": 1,
                "ZoneId": "cn-hangzhou-e",
                "DBInstanceId": "rm-**************",
                "ReadOnlyDBInstanceId": {
                    "ReadOnlyDBInstanceId": []
                },
                "DBInstanceType": "Primary",
                "RegionId": "cn-hangzhou",
                "Engine": "MySQL",
                "DBInstanceDescription": "test",
                "InstanceNetworkType": "Classic"
            }
        ]
    }
}

Errors

HttpCodeError codeError messageDescription
400ActionUnauthorizedThe specified action is not available for youThe error message returned because you are not authorized to perform this action. Perform RAM authorization first.

For a list of error codes, visit the API Error Center.