Queries 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 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. Up to 30 instance IDs separated with commas (,) are allowed.

Expired String No False

Specifies whether the instance is expired. Valid values:

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

Response parameters

Parameter Type Example Description
RequestId String 1AD222E9-E606-4A42-BF6D-8A4442913CEF

The ID of the request.

Items Array

An array that consists of instance attributes.

DBInstanceId String rm-uf6wjk5xxxxxxxxxx

The ID of the instance.

PayType String Postpaid

The billing method of the instance. Valid values:

  • Postpaid: The instance uses pay-as-you-go billing.
  • Prepaid: The instance uses subscription billing.
DBInstanceClassType String s

The family of the instance. Valid values:

  • s: The instance belongs to the general-purpose 2 instance family.
  • x: The instance belongs to the general-purpose instance family.
  • d: The instance belongs to the dedicated instance family.
  • h: The instance belongs to the dedicated host instance family.
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.
RegionId String cn-hangzhou

The ID of the region to which the instance belongs.

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

The internal endpoint used to connect to the instance.

Port String 3306

The internal port used to connect to 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.

DBInstanceClass String rds.mys2.small

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

DBInstanceMemory Long 4096

The memory size of the instance. Unit: MB.

DBInstanceStorage Integer 10

The storage capacity of the instance. Unit: GB.

VpcCloudInstanceId String vpc-23rsxdfxxxxxxx

The ID of the VPC to which the instance belongs.

DBInstanceNetType String Internet

The network connection type of the instance. 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 locked upon expiration.
  • LockByRestoration: The instance is automatically locked before a rollback.
  • LockByDiskQuota: The instance is automatically locked because 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 time when the instance expires. 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 for RDS console.

AvailabilityValue String 100.0%

The availability of the instance. Unit: %.

MaxIOPS Integer 150

The maximum number of I/O requests processed by the instance per second.

MaxConnections Integer 60

The maximum number of concurrent connections allowed by the instance.

MasterInstanceId String rm-uf6wjk5xxxxxxxxxx

The ID of the instance. If no value is returned for this parameter (namely, the value of this parameter is null), the instance is a primary instance.

IncrementSourceDBInstanceId String rm-uf6wjk5xxxxxxxxxx

The instance ID of the incremental data source. The incremental data source of a disaster recovery instance or read-only instance is the primary instance. If no value is returned for this parameter (namely, the value of this parameter is null), 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.

ZoneId String cn-hangzhou-a

The ID of the zone to which the instance belongs.

InstanceNetworkType String Classic

The network type of the instance. Valid values:

  • Classic
  • VPC
DBInstanceStorageType String local_ssd

The storage type of the instance. Valid values:

  • local_ssd or ephemeral_ssd: The instance uses local SSDs.
  • cloud_ssd: The instance uses standard SSDs.
  • cloud_essd: The instance uses enhanced SSDs.
AdvancedFeatures String LinkedServer

An array that consists of advanced features that are separated with commas (,). This parameter is only available when the instance runs SQL Server. Valid values:

  • LinkedServer
  • DistributeTransaction
Category String Basic

The edition of the instance. Valid values:

  • Basic: The instance uses the Basic Edition.
  • HighAvailability: The instance uses the High-availability Edition.
  • AlwaysOn: The instance uses the Cluster Edition.
  • Finance: The instance uses the Enterprise Edition.
VpcId String vpc-xxxxxxxxx

The ID of the VPC to which the instance belongs.

VSwitchId String vsw-xxxxxx

The ID of the VSwitch associated with the specified VPC.

ConnectionMode String Standard

The connection mode of the instance. Valid values:

  • Standard: The instance uses the standard mode.
  • Safe: The instance uses the database proxy mode.
CurrentKernelVersion String rds_20181010

The kernel version of the database engine that the instance runs.

ResourceGroupId String rg-acfmyxxxxxxxxxx

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

ReadonlyInstanceSQLDelayedTime String 30

The latency for read-only instances that synchronize data from the primary instance. Read-only instances start to synchronize data from the primary instance after the time specified by the ReadonlyInstanceSQLDelayedTime parameter elapses. Unit: seconds.

SecurityIPMode String normal

The whitelist mode of the instance. Valid values:

  • normal: The instance uses the standard whitelist mode.
  • safety: The instance uses the enhanced whitelist mode.
TimeZone String Central Standard Time

The time zone of the instance.

Collation String Chinese_PRC_CI_AS

The character set collation of the instance.

MasterZone String 5454284

The ID of the primary zone.

AutoUpgradeMinorVersion String Auto

The method used to update the kernel version of the instance. Valid values:

  • Auto: The system automatically updates the kernel version of the instance.
  • Manual: The kernel version of the instance is only updated when the in-use kernel version is deprecated.
ProxyType Integer 1

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

  • 0 or null: The Database Proxy feature is disabled.
  • 1: The Shared Proxy feature is enabled.
  • 2: The Dedicated Proxy feature is enabled.
ConsoleVersion String 2

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

  • 1: The Shared Proxy feature is enabled.
  • 2: The Dedicated Proxy feature is enabled.
DedicatedHostGroupId String dhg-7a9xxxxxxxx

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

SlaveZones Array

An array that consists of secondary zones.

ZoneId String cn-hangzhou-a

The ID of the zone.

ReadOnlyDBInstanceIds Array

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

DBInstanceId String rm-bpxxxxxxxxx

The ID of the read-only instance.

Extra Struct

The extended information.

DBInstanceId List rm-uf6wjk5xxxxxxxxxx

An array that consists of instance IDs.

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>
                        <DBInstanceId></DBInstanceId>
                  </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>
                  <ConsoleVersion>2</ConsoleVersion>
                  <Engine>MySQL</Engine>
                  <MaintainTime>18:00Z-22:00Z</MaintainTime>
                  <MaxConnections>4000</MaxConnections>
                  <DBInstanceType>Primary</DBInstanceType>
                  <DBInstanceMemory>4096</DBInstanceMemory>
                  <EngineVersion>5.7</EngineVersion>
                  <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": {
                    "DBInstanceId": {
                        "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"
}

Error codes

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