edit-icon download-icon

Create an RDS read-only instance

Last Updated: Dec 06, 2017


Create a read-only instance for an RDS instance. The following conditions must be met, otherwise the creation will fail:

  • The master instance is running and not in switchover status.

  • The read-only instance and master instance must be in the same region.

  • The database version of the read-only instance must be the same as or later than that of the master instance. The master instance must have a version of at least MySQL 5.6.

  • The read-only instance must have a version of at least MySQL 5.6.

  • A single RDS instance can have up to five read-only instances.

Request parameters

Name Type Required? Description
Action String Yes Required parameter. Value: CreateReadOnlyDBInstance.
RegionId String Yes Data center. The length cannot exceed 50 characters. The DescribeRegions function can be used to view available data centers.
ZoneId String Yes Zone ID. The DescribeRegions function can be used to view available zones.
DBInstanceId String Yes ID of a master instance.
EngineVersion String Yes Database version number. Only value supported: 5.6.
DBInstanceClass String Yes Instance type. For more information, see the Appendix.
DBInstanceStorage Integer Yes User-defined storage space. Value range: [5, 1000], 5 GB increments. Unit: GB.
DBInstanceDescription String No Instance description or remarks, no more than 256 bytes.
Note: It cannot begin with http:// or https://. It must start with a Chinese character or an English letter. It may contain Chinese and English characters/letters, “_”, “-“, and numbers. The length may be 2-256 characters.
PayType String Yes Pay-As-You-Go.
ClientToken String Yes Used to guarantee idempotence.
InstanceNetworkType String No VPC: VPC instance. Classic: classic instance. If no value is specified, a classic instance is created by default.
VPCId String No VPC ID.
VSwitchId String No VSwitch ID.
PrivateIpAddress String No IP address of an VPC under VSwitchId. If no value is specified, the system automatically assigns a VPC IP address based on VPCId and VSwitchId.

Return parameters

Name Type Description
<Public Return Parameters> - For more information, see Public parameters.
DBInstanceId String Instance ID.
OrderId String Order ID.
ConnectionString String Database connection address.
Port String Port connecting to the database.


  • Request example

    1. https://rds.aliyuncs.com/?Action=CreateReadOnlyDBInstance
    2. &RegionId=cn-hangzhou
    3. &ZoneId=cn-hangzhou-b
    4. &DBInstanceId=rdsaiiabnaiiabn
    5. &EngineVersion=5.6
    6. &DBInstanceClass=rds.mys2.small
    7. &DBInstanceStorage=10
    8. &PayType=Postpaid
    9. &ClientToken=ETnLKlblzczshOTUbOCziJZNwHlYBQ
    10. &<[Public Request Parameters]>
  • Return example

    XML format:

    1. <CreateDBInstanceResponse>
    2. <OrderId>100789370230206</OrderId>
    3. <ConnectionString>rdsaiiabnaiiabn.mysql.rds.aliyuncs.com </ConnectionString>
    4. <DBInstanceId>rdsaiiabnaiiabn</DBInstanceId>
    5. <port>3306</port>
    6. <RequestId>1E43AAE0-BEE8-43DA-860D-EAF2AA0724DC</RequestId>
    7. </CreateDBInstanceResponse>

    JSON format:

    1. {
    2. "OrderId": "100789370230206",
    3. "ConnectionString": "rdsaiiabnaiiabn.mysql.rds.aliyuncs.com",
    4. "DBInstanceId": "rdsaiiabnaiiabn",
    5. "Port": "3306",
    6. "RequestId": "1E43AAE0-BEE8-43DA-860D-EAF2AA0724DC"
    7. }
Thank you! We've received your feedback.