You can call the DescribeDBInstanceAttribute operation to query details about one or more ApsaraDB 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 Type Required Example Description
Action String Yes DescribeDBInstanceAttribute

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

DBInstanceId String Yes rm-uf6wjk5xxxxxxxxxx

The IDs of the instances. You can specify up to 30 instance IDs. You must separate the instance IDs with commas (,).

Expired String No False

Specifies whether to query the instances that have expired. Valid values:

  • True: specifies to query the instances that have expired.
  • False: specifies to query the instances that have not expired.

Response parameters

Parameter Type Example Description
Items Array of DBInstanceAttribute

An array that consists of the attributes of the instances returned.

DBInstanceAttribute
DBInstanceId String rm-uf6wjk5xxxxxxxxxx

The ID of the instance.

PayType String Postpaid

The billing method of the instance. Valid values:

  • Postpaid: pay-as-you-go
  • Prepaid: subscription
DBInstanceType String Primary

The role of the instance. Valid values:

  • Primary: The instance is a primary instance.
  • Readonly: The instance is a read-only instance.
  • Guard: The instance is a disaster recovery instance.
  • Temp: The instance is a temporary instance.
Category String Basic

The RDS edition of the instance. Valid values:

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

The network type of the instance. Valid values:

  • Classic
  • VPC
RegionId String cn-hangzhou

The region ID of the instance.

ZoneId String cn-hangzhou-a

The zone ID of the instance.

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

The internal endpoint of the instance.

Port String 3306

The internal port number of the instance.

Engine String MySQL

The database engine that is run on the instance.

EngineVersion String 5.5

The database engine version that is run on the instance.

DBInstanceClassType String s

The family to which the instance belongs. Valid values:

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

The instance type of the instance. For more information, see Primary ApsaraDB RDS 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 state table.

DBInstanceDescription String Test database

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 after it expires.
  • LockByRestoration: The instance is automatically locked before a rollback is performed.
  • LockByDiskQuota: The instance is automatically locked after its storage 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 can be created on the instance.

AccountMaxQuantity Integer 50

The maximum number of accounts that can be created 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 instances never expire.
MaintainTime String 00:00Z-02:00Z

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

AvailabilityValue String 100.0%

The availability status 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 instance 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 that is attached to the instance if a disaster recovery instance is deployed.

TempDBInstanceId String rm-uf64zsuxxxxxxxxxx

The ID of the temporary instance that is attached to the instance if a temporary instance is deployed.

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 RDS instance.

AdvancedFeatures String LinkedServer

An array that consists of advanced features, which are separated by commas (,). This parameter is supported only by 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: When a later minor engine version is released, ApsaraDB RDS updates the minor engine version of the instance.
  • Manual: In normal cases, you must manually update the minor engine version of the instance. ApsaraDB RDS updates the minor engine version of the instance only 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: standard mode
  • Safe: database proxy mode
ConsoleVersion String 2

The type of proxy that is enabled on the instance. Valid values:

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

The minor engine version of the instance.

DBInstanceCPU String 2

The number of cores that are configured for the instance.

DBInstanceStorageType String local_ssd

The type of storage media that is used for the instance. Valid values:

  • local_ssd or ephemeral_ssd: local SSD
  • cloud_ssd: standard SSD
  • cloud_essd: enhanced SSD (ESSD)
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 the IDs of the instances returned.

GeneralGroupName String TestGroup

The name of the group to which the instance belongs if the instance runs MySQL on RDS Standard Edition and is created in a dedicated cluster.

LatestKernelVersion String rds_20201031

The latest minor engine version that is supported by the instance.

MasterZone String 5454284

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

ProxyType Integer 1

The type of proxy that is supported by the instance. Valid values:

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

The latency of data replication to the read-only instances that are attached to the instance. The read-only instances replicate data from the instance at the latency that is 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: standard whitelist mode
  • safety: 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.

SuperPermissionMode String Disabled

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

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

The time zone of the instance.

Tips String everything is fine.

The information about the exception that is found on the instance if the instance runs MySQL on RDS Standard Edition and is created in a dedicated cluster.

TipsLevel Integer 1

The level of the exception that is found on the instance if the instance runs MySQL on RDS Standard Edition and is created in a dedicated cluster. Valid values:

  • 1: The instance is normal.
  • 2: The specifications of the read-only instances do not match the specifications of the primary instance. You must adjust the specifications of these instances.
VSwitchId String vsw-xxxxxx

The ID of the vSwitch to which the instance is connected.

VpcCloudInstanceId String vpc-23rsxdfxxxxxxx

The ID of the cloud instance on which the specified VPC is deployed.

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>
  <RequestId>BD3A30D8-32E7-40CF-AAEA-6BFD4E3DC55E</RequestId>
  <Items>
        <DBInstanceAttribute>
              <DBInstanceMemory>8192</DBInstanceMemory>
              <ResourceGroupId>rg-acfmyxxxxxxxxxx</ResourceGroupId>
              <Port>3306</Port>
              <MasterZone>cn-hangzhou-h</MasterZone>
              <LatestKernelVersion>rds_20201031</LatestKernelVersion>
              <DBInstanceType>Primary</DBInstanceType>
              <ConsoleVersion>2</ConsoleVersion>
              <InstanceNetworkType>VPC</InstanceNetworkType>
              <DBInstanceClassType>x</DBInstanceClassType>
              <DBInstanceId>rm-uf6wjk5xxxxxxxxxx</DBInstanceId>
              <AutoUpgradeMinorVersion>Auto</AutoUpgradeMinorVersion>
              <DBInstanceStorage>150</DBInstanceStorage>
              <AvailabilityValue>100.0%</AvailabilityValue>
              <Engine>MySQL</Engine>
              <DBInstanceDescription>test1</DBInstanceDescription>
              <IPType>IPv4</IPType>
              <EngineVersion>8.0</EngineVersion>
              <DBInstanceStatus>Running</DBInstanceStatus>
              <MaxConnections>2000</MaxConnections>
              <DBInstanceClass>rds.mysql.s3.large</DBInstanceClass>
              <AccountMaxQuantity>99999</AccountMaxQuantity>
              <VSwitchId>vsw-xxxxxx</VSwitchId>
              <PayType>Prepaid</PayType>
              <LockMode>Unlock</LockMode>
              <GuardDBInstanceId>rm-uf64zsuxxxxxxxxxx</GuardDBInstanceId>
              <SupportCreateSuperAccount>No</SupportCreateSuperAccount>
              <InsId>1</InsId>
              <VpcId>vpc-xxxxxxxxx</VpcId>
              <CurrentKernelVersion>rds_20200831</CurrentKernelVersion>
              <TempUpgradeTimeStart>2021-01-10 00:00:00</TempUpgradeTimeStart>
              <TempUpgradeTimeEnd>2021-06-18 00:00:00</TempUpgradeTimeEnd>
              <CreationTime>2020-06-17T09:03:57Z</CreationTime>
              <ConnectionMode>Standard</ConnectionMode>
              <VpcCloudInstanceId>vpc-23rsxdfxxxxxxx</VpcCloudInstanceId>
              <ProxyType>2</ProxyType>
              <ConnectionString>rm-uf6wjk5xxxxxxxxxx.mysql.rds.aliyuncs.com</ConnectionString>
              <ExpireTime>2021-06-17T16:00:00Z</ExpireTime>
              <DBMaxQuantity>99999</DBMaxQuantity>
              <Category>HighAvailability</Category>
              <DBInstanceNetType>Intranet</DBInstanceNetType>
              <SuperPermissionMode></SuperPermissionMode>
              <DedicatedHostGroupId></DedicatedHostGroupId>
              <DBInstanceCPU>4</DBInstanceCPU>
              <GuardDBInstanceName>rm-m5xxxxx</GuardDBInstanceName>
              <SecurityIPList>42.xx.xx.xx</SecurityIPList>
              <OriginConfiguration></OriginConfiguration>
              <ReadOnlyDBInstanceIds>
        </ReadOnlyDBInstanceIds>
              <SecurityIPMode>normal</SecurityIPMode>
              <MaintainTime>23:00Z-00:00Z</MaintainTime>
              <DispenseMode>MultiAVZDispenseMode</DispenseMode>
              <ZoneId>cn-hangzhou-h</ZoneId>
              <DBInstanceStorageType>local_ssd</DBInstanceStorageType>
              <AccountType>Mix</AccountType>
              <MaxIOPS>5000</MaxIOPS>
              <SupportUpgradeAccountType>No</SupportUpgradeAccountType>
              <SlaveZones>
                    <SlaveZone>
                          <ZoneId>cn-hangzhou-h</ZoneId>
                    </SlaveZone>
              </SlaveZones>
              <Extra>
                    <DBInstanceIds>
            </DBInstanceIds>
              </Extra>
              <CanTempUpgrade>true</CanTempUpgrade>
              <RegionId>cn-hangzhou</RegionId>
        </DBInstanceAttribute>
  </Items>
</DescribeDBInstanceAttributeResponse>

JSON format

{
	"RequestId": "BD3A30D8-32E7-40CF-AAEA-6BFD4E3DC55E",
	"Items": {
		"DBInstanceAttribute": [
			{
				"DBInstanceMemory": 8192,
				"ResourceGroupId": "rg-acfmyxxxxxxxxxx",
				"Port": "3306",
				"MasterZone": "cn-hangzhou-h",
				"LatestKernelVersion": "rds_20201031",
				"DBInstanceType": "Primary",
				"ConsoleVersion": "2",
				"InstanceNetworkType": "VPC",
				"DBInstanceClassType": "x",
				"DBInstanceId": "rm-uf6wjk5xxxxxxxxxx",
				"AutoUpgradeMinorVersion": "Auto",
				"DBInstanceStorage": 150,
				"AvailabilityValue": "100.0%",
				"Engine": "MySQL",
				"DBInstanceDescription": "test1",
				"IPType": "IPv4",
				"EngineVersion": "8.0",
				"DBInstanceStatus": "Running",
				"MaxConnections": 2000,
				"DBInstanceClass": "rds.mysql.s3.large",
				"AccountMaxQuantity": 99999,
				"VSwitchId": "vsw-xxxxxx",
				"PayType": "Prepaid",
				"LockMode": "Unlock",
				"GuardDBInstanceId": "rm-uf64zsuxxxxxxxxxx",
				"SupportCreateSuperAccount": "No",
				"InsId": 1,
				"VpcId": "vpc-xxxxxxxxx",
				"CurrentKernelVersion": "rds_20200831",
				"TempUpgradeTimeStart": "2021-01-10 00:00:00",
				"TempUpgradeTimeEnd": "2021-06-18 00:00:00",
				"CreationTime": "2020-06-17T09:03:57Z",
				"ConnectionMode": "Standard",
				"VpcCloudInstanceId": "vpc-23rsxdfxxxxxxx",
				"ProxyType": 2,
				"ConnectionString": "rm-uf6wjk5xxxxxxxxxx.mysql.rds.aliyuncs.com",
				"ExpireTime": "2021-06-17T16:00:00Z",
				"DBMaxQuantity": 99999,
				"Category": "HighAvailability",
				"DBInstanceNetType": "Intranet",
				"SuperPermissionMode": "",
				"DedicatedHostGroupId": "",
				"DBInstanceCPU": "4",
				"GuardDBInstanceName": "rm-m5xxxxx",
				"SecurityIPList": "42.xx.xx.xx",
				"OriginConfiguration": "",
				"ReadOnlyDBInstanceIds": {
					"ReadOnlyDBInstanceId": []
				},
				"SecurityIPMode": "normal",
				"MaintainTime": "23:00Z-00:00Z",
				"DispenseMode": "MultiAVZDispenseMode",
				"ZoneId": "cn-hangzhou-h",
				"DBInstanceStorageType": "local_ssd",
				"AccountType": "Mix",
				"MaxIOPS": 5000,
				"SupportUpgradeAccountType": "No",
				"SlaveZones": {
					"SlaveZone": [
						{
							"ZoneId": "cn-hangzhou-h"
						}
					]
				},
				"Extra": {
					"DBInstanceIds": {
						"DBInstanceId": []
					}
				},
				"CanTempUpgrade": true,
				"RegionId": "cn-hangzhou"
			}
		]
	}
}

Error codes

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