You can call the DescribeDBInstanceAttribute operation to query details about one or more ApsaraDB for RDS instances.

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

Parameter Position Type Required Example Description
Action Query String Yes DescribeDBInstanceAttribute

The operation that you want to perform. Set the value to DescribeDBInstanceAttribute.

DBInstanceId Query String Yes rm-uf6wjk5xxxxxxxxxx

The ID of the instance. You can enter up to 30 instance IDs and separate them with commas (,).

Expired Query String No False

Specifies whether the instance has expired. Valid values:

  • True: The instance has expired.
  • False: The instance has not expired.

Response parameters

Parameter Type Example Description
Items Array of DBInstanceAttribute

An array that consists of the attributes of the instance.

DBInstanceAttribute
DBInstanceId String rm-uf6wjk5xxxxxxxxxx

The ID of the instance.

PayType String Postpaid

The billing method of the instance. Valid values:

  • Postpaid: the pay-as-you-go billing method.
  • Prepaid: the subscription billing method.
DBInstanceType String Primary

The role of the instance. Valid values:

  • Primary: the primary instance role.
  • Readonly: the read-only instance role.
  • Guard: the disaster recovery instance role.
  • Temp: the temporary instance role.
Category String Basic

The RDS edition of the instance. Valid values:

  • Basic: the Basic Edition.
  • HighAvailability: the High-availability Edition.
  • AlwaysOn: the Cluster Edition.
  • Finance: the Enterprise Edition.
InstanceNetworkType String Classic

The network type of the instance. Valid values:

  • Classic
  • VPC
RegionId String cn-hangzhou

The ID of the region to which the instance belongs.

ZoneId String cn-hangzhou-a

The ID of the zone to which the instance belongs.

ConnectionString String rm-uf6wjk5xxxxxxxxxx.mysql.rds.aliyuncs.com

The internal endpoint of the instance.

Port String 3306

The internal port of the instance.

Engine String MySQL

The database engine that the instance runs.

EngineVersion String 5.5

The version of the database engine that the instance runs.

DBInstanceClassType String s

The family to which the instance belongs. Valid values:

  • s: the shared instance family.
  • x: the general-purpose instance family.
  • d: the dedicated instance family.
  • h: the dedicated host instance family.
DBInstanceClass String rds.mys2.small

The type of the instance. For more information, see Primary instance types.

DBInstanceMemory Long 4096

The memory capacity of the instance. Unit: MB.

DBInstanceStorage Integer 10

The storage capacity of the instance. Unit: GB.

DBInstanceNetType String Internet

Indicates whether the instance is connected over the Internet or an internal network. Valid values:

  • Internet: The instance is connected over the Internet.
  • Intranet: The instance is connected over an internal network.
DBInstanceStatus String Running

The status of the instance. For more information, see Instance status table.

DBInstanceDescription String testdatabase

The description of the instance.

LockMode String Unlock

The lock mode of the instance. Valid values:

  • Unlock: The instance is not locked.
  • ManualLock: The instance is manually locked.
  • LockByExpiration: The instance is automatically locked upon expiration.
  • LockByRestoration: The instance is automatically locked before a rollback.
  • LockByDiskQuota: The instance is locked automatically because its capacity is exhausted.
  • LockReadInstanceByDiskQuota: The instance is a read-only instance and is automatically locked because its storage capacity is exhausted.
LockReason String instance_expired

The reason why the instance is locked.

DBMaxQuantity Integer 200

The maximum number of databases that are allowed on the instance.

AccountMaxQuantity Integer 50

The maximum number of accounts that are allowed on the instance.

CreationTime String 2011-05-30T12:11:04Z

The time when the instance was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

ExpireTime String 2019-03-27T16:00:00Z

The expiration time of the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Note Pay-as-you-go-billed instances never expire.
MaintainTime String 00:00Z-02:00Z

The maintenance window of the instance. The time is displayed in UTC+8 in the ApsaraDB for RDS console.

AvailabilityValue String 100.0%

The availability of the instance. Unit: %.

MaxIOPS Integer 150

The maximum number of I/O requests that the instance can process per second.

MaxConnections Integer 60

The maximum number of concurrent connections that are allowed by the instance.

MasterInstanceId String rm-uf6wjk5xxxxxxxxxx

The ID of the primary instance to which the instance is attached. If this parameter is not returned, the instance is a primary instance.

IncrementSourceDBInstanceId String rm-uf6wjk5xxxxxxxxxx

The ID of the instance from which incremental data comes. The incremental data of a disaster recovery or read-only instance comes from its primary instance. If this parameter is not returned, the instance is a primary instance.

GuardDBInstanceId String rm-uf64zsuxxxxxxxxxx

The ID of the disaster recovery instance attached to the instance.

TempDBInstanceId String rm-uf64zsuxxxxxxxxxx

The ID of the temporary instance attached to the instance.

ReadOnlyDBInstanceIds Array of ReadOnlyDBInstanceId

An array that consists of the IDs of the read-only instances attached to the primary instance.

ReadOnlyDBInstanceId
DBInstanceId String rm-bpxxxxxxxxx

The ID of the read-only instance.

AdvancedFeatures String LinkedServer

An array that consists of advanced features that are separated with commas (,). This parameter is supported only for instances that run SQL Server. Valid values:

  • LinkedServer
  • DistributeTransaction
AutoUpgradeMinorVersion String Auto

The method that is used to update the minor engine version of the instance. Valid values:

  • Auto: The system automatically updates the minor engine version of the instance when a later minor engine version is released.
  • Manual: The system only forcibly updates the minor engine version of the instance when the used minor engine version is deprecated.
Collation String Chinese_PRC_CI_AS

The character set collation of the instance.

ConnectionMode String Standard

The connection mode of the instance. Valid values:

  • Standard: the standard mode.
  • Safe: the database proxy mode.
ConsoleVersion String 2

The type of proxy used by the instance. Valid values:

  • 1: shared proxy.
  • 2: dedicated proxy.
Note We recommend that you do not use this parameter. Use the ProxyType parameter instead.
CurrentKernelVersion String rds_20181010

The minor engine version of the instance.

DBInstanceCPU String 2

The number of CPUs configured for the instance.

DBInstanceStorageType String local_ssd

The type of storage media used by the instance. Valid values:

  • local_ssd or ephemeral_ssd: local SSD.
  • cloud_ssd: standard SSD.
  • cloud_essd: enhanced SSD.
DedicatedHostGroupId String dhg-7a9xxxxxxxx

The ID of the dedicated cluster to which the instance belongs.

Extra Struct

The extended information of the instance.

DBInstanceIds List rm-uf6wjk5xxxxxxxxxx

An array that consists of instance IDs.

MasterZone String 5454284

The ID of the primary zone to which the instance belongs.

ProxyType Integer 1

The type of proxy used by the instance. Valid values:

  • 0: The instance does not support proxies.
  • 1: The instance supports shared proxies. This is known as the multi-tenant mode.
  • 2: The instance supports dedicated proxies. This is known as the single-tenant mode.
ReadonlyInstanceSQLDelayedTime String 30

The latency of data replication to the read-only instance. The read-only instance replicates data from its primary instance based on the latency specified by the ReadonlyInstanceSQLDelayedTime parameter. Unit: seconds.

ResourceGroupId String rg-acfmyxxxxxxxxxx

The ID of the resource group to which the instance belongs.

SecurityIPMode String normal

The network isolation mode of the instance. Valid values:

  • normal: the standard whitelist mode.
  • safety: the enhanced whitelist mode.
SlaveZones Array of SlaveZone

An array that consists of secondary zones.

SlaveZone
ZoneId String cn-hangzhou-a

The ID of the zone to which the instance belongs.

SuperPermissionMode String Disabled

Indicates whether the instance allows superuser accounts, such as the system administrator (SA) account, Active Directory (AD) account, and host account. Valid values:

  • Enable: Superuser accounts are allowed.
  • Disabled: Superuser accounts are not allowed.
TimeZone String Central Standard Time

The time zone of the instance.

VSwitchId String vsw-xxxxxx

The ID of the VSwitch associated with the specified VPC.

VpcCloudInstanceId String vpc-23rsxdfxxxxxxx

The ID of the instance that resides in a VPC.

VpcId String vpc-xxxxxxxxx

The ID of the VPC to which the instance belongs.

RequestId String 1AD222E9-E606-4A42-BF6D-8A4442913CEF

The ID of the request.

Examples

Sample requests

http(s)://rds.aliyuncs.com/? Action=DescribeDBInstanceAttribute
&DBInstanceId=rm-uf6wjk5xxxxxxxxxx
&<Common request parameters>

Sample success responses

XML format

<DescribeDBInstanceAttributeResponse>
  <Items>
        <DBInstanceAttribute>
              <Extra>
                    <DBInstanceIds>
            </DBInstanceIds>
              </Extra>
              <ConnectionString>rm-uf6wjk5xxxxxxxxxx.mysql.rds.aliyuncs.com</ConnectionString>
              <AccountMaxQuantity>99999</AccountMaxQuantity>
              <CurrentKernelVersion>rds_20170714</CurrentKernelVersion>
              <DBInstanceCPU>2</DBInstanceCPU>
              <ZoneId>cn-hangzhou-f</ZoneId>
              <ReadOnlyDBInstanceIds>
        </ReadOnlyDBInstanceIds>
              <ConnectionMode>Standard</ConnectionMode>
              <VSwitchId>vsw-bp1w9oueixxxxx</VSwitchId>
              <VpcId>vpc-bp1opxu1zkhxxxxx</VpcId>
              <Engine>MySQL</Engine>
              <MaintainTime>18:00Z-22:00Z</MaintainTime>
              <MaxConnections>4000</MaxConnections>
              <DBInstanceType>Primary</DBInstanceType>
              <DBInstanceMemory>4096</DBInstanceMemory>
              <EngineVersion>5.7</EngineVersion>
              <ConsoleVersion>2</ConsoleVersion>
              <DBInstanceStorageType>cloud_ssd</DBInstanceStorageType>
              <DBInstanceStatus>Running</DBInstanceStatus>
              <SecurityIPMode>normal</SecurityIPMode>
              <PayType>Prepaid</PayType>
              <SupportUpgradeAccountType>No</SupportUpgradeAccountType>
              <AccountType>Mix</AccountType>
              <LockMode>Unlock</LockMode>
              <DBInstanceNetType>Intranet</DBInstanceNetType>
              <MaxIOPS>600</MaxIOPS>
              <DBInstanceClass>mysql.n2.medium.1</DBInstanceClass>
              <DBMaxQuantity>99999</DBMaxQuantity>
              <ResourceGroupId>rg-acfmyxxxxx</ResourceGroupId>
              <DBInstanceId>rm-bp176xxxxx</DBInstanceId>
              <VpcCloudInstanceId>rm-bp176gz7xxxxx</VpcCloudInstanceId>
              <DBInstanceClassType>x</DBInstanceClassType>
              <LatestKernelVersion></LatestKernelVersion>
              <InstanceNetworkType>VPC</InstanceNetworkType>
              <DBInstanceStorage>20</DBInstanceStorage>
              <SupportCreateSuperAccount>No</SupportCreateSuperAccount>
              <CreationTime>2018-11-28T01:32:08Z</CreationTime>
              <Category>Basic</Category>
              <Port>3306</Port>
              <InsId>1</InsId>
              <ExpireTime>2018-12-28T16:00:00Z</ExpireTime>
              <RegionId>cn-hangzhou</RegionId>
              <AvailabilityValue>100.0%</AvailabilityValue>
              <SecurityIPList>1.1.1.1</SecurityIPList>
        </DBInstanceAttribute>
  </Items>
  <RequestId>CFE76192-2F85-4D18-975E-465B77C129C4</RequestId>
</DescribeDBInstanceAttributeResponse>

JSON format

{
    "Items": {
        "DBInstanceAttribute": [
            {
                "Extra": {
                    "DBInstanceIds": {
                        "DBInstanceId": []
                    }
                },
                "ConnectionString": "rm-uf6wjk5xxxxxxxxxx.mysql.rds.aliyuncs.com",
                "AccountMaxQuantity": 99999,
                "CurrentKernelVersion": "rds_20170714",
                "DBInstanceCPU": "2",
                "ZoneId": "cn-hangzhou-f",
                "ReadOnlyDBInstanceIds": {
                    "ReadOnlyDBInstanceId": []
                },
                "ConnectionMode": "Standard",
                "VSwitchId": "vsw-bp1w9oueixxxxx",
                "VpcId": "vpc-bp1opxu1zkhxxxxx",
                "Engine": "MySQL",
                "MaintainTime": "18:00Z-22:00Z",
                "MaxConnections": 4000,
                "DBInstanceType": "Primary",
                "DBInstanceMemory": 4096,
                "EngineVersion": "5.7",
                "ConsoleVersion":"2",
                "DBInstanceStorageType": "cloud_ssd",
                "DBInstanceStatus": "Running",
                "SecurityIPMode": "normal",
                "PayType": "Prepaid",
                "SupportUpgradeAccountType": "No",
                "AccountType": "Mix",
                "LockMode": "Unlock",
                "DBInstanceNetType": "Intranet",
                "MaxIOPS": 600,
                "DBInstanceClass": "mysql.n2.medium.1",
                "DBMaxQuantity": 99999,
                "ResourceGroupId": "rg-acfmyxxxxx",
                "DBInstanceId": "rm-bp176xxxxx",
                "VpcCloudInstanceId": "rm-bp176gz7xxxxx",
                "DBInstanceClassType": "x",
                "LatestKernelVersion": "",
                "InstanceNetworkType": "VPC",
                "DBInstanceStorage": 20,
                "SupportCreateSuperAccount": "No",
                "CreationTime": "2018-11-28T01:32:08Z",
                "Category": "Basic",
                "Port": "3306",
                "InsId": 1,
                "ExpireTime": "2018-12-28T16:00:00Z",
                "RegionId": "cn-hangzhou",
                "AvailabilityValue": "100.0%",
                "SecurityIPList": "1.1.1.1"
            }
        ]
    },
    "RequestId": "CFE76192-2F85-4D18-975E-465B77C129C4"
}

Errors

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