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 ID of the instance. You can enter a maximum of 30 instance IDs and 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 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 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 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 instance 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 has been manually locked.
  • LockByExpiration: The instance has been automatically locked upon expiration.
  • LockByRestoration: The instance has been automatically locked before a rollback.
  • LockByDiskQuota: The instance has been automatically locked because the storage capacity is exhausted.
  • LockReadInstanceByDiskQuota: The instance is a read-only instance and has been automatically locked because the 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 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 instance.

AdvancedFeatures String LinkedServer

An array that consists of advanced features. The advanced features are separated by commas (,). This parameter is supported only for instances that run SQL Server. Example 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 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: the standard mode
  • Safe: the 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 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 that are configured for the instance.

DBInstanceStorageType String local_ssd

The type of storage media that is 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 if the instance is created in a dedicated cluster.

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 that is enabled on the instance. Valid values:

  • 0: The instance does not support database 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 instances that are attached to the instance. The read-only instances replicate data from the instance based on 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: 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.

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.

VSwitchId String vsw-xxxxxx

The ID of the vSwitch associated with the specified VPC.

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.