Creates an instance.
Operation Description
Before you call this operation, make sure that you understand the billing methods and pricing of ApsaraDB RDS. For more information, see Billable items, billing methods, and pricing.
For more information about ApsaraDB RDS instance types, see Primary ApsaraDB RDS instance types.
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
rds:CreateDBInstance | WRITE |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
Engine | string | Yes | The database engine of the instance. Valid values:
| MySQL |
EngineVersion | string | Yes | The database engine version of the instance.
Serverless instances
NoteApsaraDB RDS for MariaDB does not support serverless instances. | 5.6 |
DBInstanceClass | string | Yes | The instance type of the instance. For more information, see Primary ApsaraDB RDS instance types. You can also call the DescribeAvailableResource operation to query the available instance types in a region. To create a serverless instance, set this parameter to one of the following values:
| rds.mysql.s1.small |
DBInstanceStorage | integer | Yes | The storage capacity of the instance. Unit: GB. The storage capacity increases in increments of 5 GB. For more information, see Primary ApsaraDB RDS instance types. You can also call the DescribeAvailableResource operation to query the storage capacity range that is supported for a specified instance type in a region. | 100 |
SystemDBCharset | string | No | The character set that is used by the instance. This parameter is no longer used. | gbk |
DBInstanceNetType | string | Yes | The network connection type of the instance. Set the value to Intranet. | Internet |
DBInstanceDescription | string | No | The name of the instance. The name must be 2 to 255 characters in length and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter. NoteThe value cannot start with http:// or https://. | Test database |
SecurityIPList | string | Yes | The IP address whitelist of the instance. For more information, see Use a database client or the CLI to connect to an ApsaraDB RDS for MySQL instance. If the IP address whitelist contains more than one entry, separate the entries with commas (,). Each entry must be unique. The IP address whitelist can contain up to 1,000 entries. The entries in the IP address whitelist must be in one of the following formats:
| 10.10.XX.XX/24 |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. | ETnLKlblzczshOTUbOCz***** |
PayType | string | Yes | The billing method of the instance. Valid values:
NoteApsaraDB RDS automatically generates a purchase order and completes the payment. | Postpaid |
ZoneId | string | No | The zone ID of the primary instance.
| cn-hangzhou-b |
ZoneIdSlave1 | string | No | The ID of the zone in which the secondary instance resides. If you set the ZoneIdSlave1 parameter and the ZoneId parameter to the same value, the single-zone deployment method is used. If you set the ZoneIdSlave1 parameter and the ZoneId parameter to different values, the multi-zone deployment method is used. | cn-hangzhou-c |
ZoneIdSlave2 | string | No | The ID of the zone in which the logger instance resides. If you set the ZoneIdSlave2 parameter and the ZoneId parameter to the same value, the single-zone deployment method is used. If you set the ZoneIdSlave2 parameter and the ZoneId parameter to different values, the multi-zone deployment method is used. | cn-hangzhou-d |
InstanceNetworkType | string | No | The network type of the instance. Valid values:
Note
| Classic |
ConnectionMode | string | No | The connection mode of the instance. Valid values:
ApsaraDB RDS automatically assigns a connection mode to the instance. NoteIf the RDS instance runs SQL Server 2012, SQL Server 2016, or SQL Server 2017, you must set this parameter to Standard. | Standard |
VPCId | string | No | The ID of the VPC to which the instance belongs. NoteThis parameter is available when you set the InstanceNetworkType parameter to VPC. | vpc-***** |
VSwitchId | string | No | The ID of the vSwitch. The vSwitch must belong to the zone that is specified by ZoneId.
| vsw-***** |
PrivateIpAddress | string | No | The private IP address of the instance. The private IP address must be within the CIDR block that is supported by the specified vSwitch. ApsaraDB RDS automatically assigns a private IP address to the instance based on the values of the VPCId and vSwitchId parameters. | 172.16.XX.XX |
UsedTime | string | No | The subscription duration of the instance.
NoteIf you set the PayType parameter to Prepaid, you must specify the UsedTime parameter. | 2 |
Period | string | No | Specifies whether to use yearly subscription or monthly subscription for the instance. Valid values:
NoteIf you set PayType to Prepaid, you must specify this parameter. | Year |
ResourceGroupId | string | No | The ID of the resource group. | rg-acfmy***** |
DBInstanceStorageType | string | Yes | The storage type that is used by the instance. Valid values:
The default value of this parameter is determined by the instance type specified by the DBInstanceClass parameter.
NoteServerless instances support only ESSDs of PL 1. For a serverless instance, you must set this parameter to cloud_essd. | cloud_essd |
BusinessInfo | string | No | The additional business information about the instance. | 121436975448952 |
EncryptionKey | string | No | The ID of the key that is used for disk encryption in the region in which the instance resides. If you specify the EncryptionKey parameter, disk encryption is automatically enabled. In this case, you must also specify the RoleARN parameter. Disk encryption cannot be disabled after it is enabled. You can obtain the ID of the key from the Key Management Service (KMS) console. You can also create a key. For more information, see Create a CMK. | 0d24*****-da7b-4786-b981-9a164dxxxxxx |
RoleARN | string | No | The Alibaba Cloud Resource Name (ARN) that is provided by your Alibaba Cloud account for RAM users. RAM users can use the ARN to connect ApsaraDB RDS to KMS. You can call the CheckCloudResourceAuthorized operation to query the ARN. | acs:ram::1406xxxxxx:role/aliyunrdsinstanceencryptiondefaultrole |
AutoRenew | string | No | Specifies whether to enable auto-renewal for the instance. You must specify this parameter only when the instance uses the subscription billing method. Valid values:
| true |
Category | string | No | The RDS edition of the instance. Valid values:
Serverless instances
NoteIf you want to create a serverless instance, you must specify this parameter. | HighAvailability |
DedicatedHostGroupId | string | No | The ID of the dedicated cluster to which the instance belongs. If you create the instance in a dedicated cluster, you must specify this parameter.
| dhg-4n***** |
TargetDedicatedHostIdForMaster | string | No | The ID of the host to which the instance belongs in the specified dedicated cluster. If you create the instance in a dedicated cluster, you must specify this parameter. If you do not specify this parameter, the system automatically assigns a host.
| i-bp*****1 |
TargetDedicatedHostIdForSlave | string | No | The ID of the host to which the secondary instance belongs in the specified dedicated cluster. If the instance runs RDS High-availability Edition or RDS Enterprise Edition and you create the instance in a dedicated cluster, you must specify this parameter. If you do not specify this parameter, the system automatically assigns a host.
| i-bp*****2 |
TargetDedicatedHostIdForLog | string | No | The ID of the host to which the logger instance belongs in the specified dedicated cluster. If the instance runs RDS Enterprise Edition and you create the instance in a dedicated cluster, you must specify this parameter. If you do not specify this parameter, the system automatically assigns a host.
| i-bp*****3 |
DBParamGroupId | string | No | The ID of the parameter template that is used for the instance. You can call the DescribeParameterGroups operation to query the ID of the parameter template.
| rpg-sys-***** |
DBTimeZone | string | No | The time zone of the instance. This parameter takes effect only when you set Engine to MySQL or PostgreSQL.
Note
| +08:00 |
DBIsIgnoreCase | string | No | Specifies whether the table name is case-sensitive. Valid values:
| true |
TargetMinorVersion | string | No | The minor engine version of the instance. This parameter is required only when you create an instance that runs MySQL or PostgreSQL. The value format varies based on the database engine of the instance.
NoteYou can call the DescribeDBMiniEngineVersions operation to query the minor engine version. For more information about minor engine versions, see Release notes of minor AliSQL versions.
NoteIf you configure the BabelfishConfig parameter for your instance that runs PostgreSQL and set the babelfishEnabled field to true, the value of this parameter is in the following format: rds_postgres_Major engine version00_AliPG version_babelfish . | rds_20200229 |
StorageAutoScale | string | No | Specifies whether to enable automatic storage expansion for the instance. Valid values:
NoteAfter the instance is created, you can call the ModifyDasInstanceConfig operation to adjust the settings of automatic storage expansion for the instance. For more information, see Configure automatic storage expansion for an ApsaraDB RDS for MySQL instance. | Disable |
StorageThreshold | integer | No | The threshold based on which automatic storage expansion is triggered. Unit: percent. Valid values:
NoteIf you set StorageAutoScale to Enable, you must specify this parameter. | 50 |
StorageUpperBound | integer | No | The maximum storage capacity that is allowed for automatic storage expansion. The storage capacity of the instance cannot exceed the maximum storage capacity. Unit: GB.
| 2000 |
DryRun | boolean | No | Specifies whether to perform a dry run. Valid values:
| false |
UserBackupId | string | No | The ID of the backup file. You can call the ListUserBackupFiles operation to query backup files. If you want to create an instance by using the data of a backup file, you must specify this parameter. This parameter is supported only when the following requirements are met:
| 67798***** |
Amount | integer | No | The number of ApsaraDB RDS for MySQL instances that you want to create. The parameter takes effect only when you create multiple ApsaraDB RDS for MySQL instances at a time by using a single request. Valid values: 1 to 20. Default value: 1.
| 2 |
CreateStrategy | string | No | The policy based on which multiple instances are created. The parameter takes effect only when the value of the Amount parameter is greater than 1.
NoteThe default value of this parameter is Atomicity. | Atomicity |
Tag | object [] | No | The list of tags. | |
Key | string | No | The key of the tag. You can use this parameter to add tags to the instance.
| testkey1 |
Value | string | No | The tag value that is associated with the specified tag key. You can use this parameter to add tags to the instance.
| testvalue1 |
DeletionProtection | boolean | No | Specifies whether to enable the release protection feature for the instance.
| true |
BabelfishConfig | string | No | The configuration of the Babelfish feature for the instance that runs PostgreSQL. Format:{"babelfishEnabled":"true","migrationMode":"xxxxxxx","masterUsername":"xxxxxxx","masterUserPassword":"xxxxxxxx"} The following list describes the fields in the format:
NoteThis parameter applies only to instances that run PostgreSQL. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see Introduction to Babelfish. | {"babelfishEnabled":"true","migrationMode":"single-db","masterUsername":"babelfish_user","masterUserPassword":"Babelfish123!"} |
ServerlessConfig | object | No | The settings of the serverless instance. This parameter is required when you create a serverless instance. NoteApsaraDB RDS for MariaDB does not support serverless instances. | |
MaxCapacity | double | No | The maximum number of RDS Capacity Units (RCUs). Valid values:
NoteThe value of this parameter must be greater than or equal to the value of MinCapacity and can be specified only to an integer. | 8 |
MinCapacity | double | No | The minimum number of RCUs. Valid values:
NoteThe value of this parameter must be less than or equal to the value of MaxCapacity. | 0.5 |
AutoPause | boolean | No | Specifies whether to enable the automatic start and stop feature for the serverless instance. Valid values:
NoteThis parameter is required only for serverless ApsaraDB RDS for MySQL instances. After the automatic start and stop feature is enabled, if no connections to the instance are established within 10 minutes, the instance is suspended. After a connection to the instance is established, the instance is resumed. | true |
SwitchForce | boolean | No | Specifies whether to enable the forced scaling feature for the serverless instance. Valid values:
Note
| false |
ConnectionString | string | No | The endpoint of the instance. NoteThe DBInstanceNetType parameter specifies whether the endpoint is internal or public. | rm-uf6wjk5*****.mysql.rds.aliyuncs.com |
Port | string | No | The port. You can initialize the port when you create the instance. Valid values: 1000 to 5999. | 3306 |
Response parameters

Examples
Sample success responses
JSON
format
{
"DryRunResult": true,
"TagResult": true,
"RequestId": "1E43AAE0-BEE8-43DA-860D-EAF2AA0724DC",
"ConnectionString": "rm-uf6wjk5*****.mysql.rds.aliyuncs.com",
"Message": "Batch Create DBInstance Task Is In Process.",
"DBInstanceId": "rm-uf6wjk5*****",
"Port": "3306",
"TaskId": "s2365879-a9d0-55af-fgae-f2*****",
"DryRun": true,
"OrderId": "1007893702*****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidInstanceLevel.DiskType | Specified instance level not support request disk type | The current instance type does not support the specified storage type. |
400 | RR309 | We have detected a security risk with your payment method. Please proceed with verification via the link in your email or console message and re-submit your order after verification. | We have detected a security risk with your payment method. Please proceed with verification via the link in your email or console message and re-submit your order after verification. |
400 | InvalidZoneId.NotSupported | The Specified vpc Zone not supported. | VPC-hosted RDS instances cannot be created in the zone. Specify a different zone. |
400 | InvalidZone.NotSupportedForStorageType | The specified zone is closed or invalid for Specified DBInstanceStorageType. | - |
400 | InvalidNetworkTypeClassicWhenCloudStorage | The Specified InstanceNetworkType value Classic is not valid when choose cloud storage type. | - |
400 | InvalidZone.NotSupported | The Specified Zone not supported. | The zone is invalid. |
400 | InvalidEssdStorageSize | invalid cloud essd storage size. | The storage size of cloud disks is invalid. Check the storage size. |
400 | InvalidParameter | Some Reuquest Parameters Is Invalid. Check or Try It Again Later. | - |
400 | Pay.AmountLimitExceeded | Pay amount limit exceeded. | - |
400 | IncompleteAccountInfo | Your information is incomplete. Complete your information before the operation. | The operation failed. Items that are marked with an asterisk (*) in the account information must be specified. Make sure that you specify these items on the Basic Information page in Account Center. |
400 | IncompleteTaxInfo | Your tax information is incomplete. Complete your information before the operation. | The operation failed. Your tax information is incomplete. Complete your tax information. |
400 | InvalidPaymentMethod.Incomplete | No payment method is specified for your account. We recommend that you add a payment method. | No valid payment method is specified for your Alibaba Cloud account. Add a valid payment method. |
400 | InvalidPaymentMethod.Missing | No payment method is specified for your account. We recommend that you add a payment method. | No valid payment method is specified for your Alibaba Cloud account. Add a valid payment method. |
400 | InsuffcientBalanceOrBankAccount | Add a payment method or add funds to the prepayment balance. Get started by creating an instance. | No valid payment method is specified within your Alibaba Cloud account. Add a valid payment method or add funds to your Alibaba Cloud account. |
400 | InvalidPaymentMethod.NoAccess | No payment method is specified for your account. We recommend that you add a payment method. | - |
400 | InvalidPaymentMethod.InsufficientBalance | No payment method is specified for your account. We recommend that you add a payment method or add funds to the prepayment balance. | - |
400 | Pay.LowFunds | The balance of the advance payment is insufficient or there is no balance of the advance payment. | - |
400 | Pay.ChargeChannelNotFound | Failure to obtain the first external payment channel if the advance balance is insufficient. | - |
400 | VswitchIpExhausted | Vswitch IP exhausted. | The operation failed. No vSwitch IP addresses are available. |
400 | InvalidPrivateIpAddress.AlreadyUsed | The specified IP is already used. | The IP address has been used. |
400 | InvalidEcsImage.NotFound | Sepcified ecs image does not exist | - |
400 | InvalidMinorVersion.NotFound | Sepcified minor version does not exists. | - |
400 | InvalidConcurrentOperate | Concurrent operation is detected. | Concurrent operations exist. Wait until the previous operation is complete and try again. |
400 | ZoneId.NotMatchWithCategory | The number of ZoneId specified does not match with category. | The number of zones is not supported for the database engine or the RDS edition of the RDS instance. Modify the zone settings. |
400 | InvalidSecurityIPList.Format | The specified parameter securityIPList is not valid. | The format of the IP address whitelist does not meet the requirements. Check the IP address whitelist. |
400 | InvalidDBParamGroupId.Format | The specified parameter dbParamGroupId is not valid. | - |
400 | InvalidTargetMinorVersion.Format | The specified parameter targetMinorVersion is not valid. | - |
400 | InvalidDedicatedHostGroupId.Format | The specified parameter dedicatedHostGroupId is not valid. | - |
400 | InvalidDBInstanceClass.Malformed | The specified parameter DBInstanceClass is not valid. | - |
400 | InvalidEngineVersion.Malformed | The specified parameter EngineVersion is not valid. | The database engine version is invalid. Check the database engine version and try again. |
400 | CreditPayInsufficientBalance | Insufficient credit pay limit. Please contact your channel partner to increase the limit. | The quota runs out. Contact your customer service representatives to increase the quota. |
400 | InvalidTagKey.Malformed | The Tag.N.Key parameter is empty. | The Tag.N.Key parameter is left unspecified. |
400 | InvalidTagValue.Malformed | The Tag.N.Value parameter is empty. | The Tag.N.Value parameter is left unspecified. |
400 | Duplicate.TagKey | The Tag.N.Key contains duplicate keys. | The values of two Tag.N.Key parameters are duplicate. |
400 | NumberExceed.Tags | The maximum number of Tags is exceeded. The maximum is 20. | The number of tags exceeds 20. |
400 | MissingParameter.ResourceIds | The parameter ResourceIds.N must not be null. | The ResourceIds.N parameter cannot be empty. |
400 | InvalidParameter.TagKey | The Tag.N.Key parameter is invalid. | The value of the Tag.N.Key parameter is invalid. |
400 | InvalidParameter.TagValue | The Tag.N.Value parameter is invalid. | The Tag.N.Value parameter is invalid. |
400 | NoPermission.SystemTag | You have no permission to use system tags. | You have no permission to use the system tag. |
400 | InvalidParam.Amount | Amount is allowed from 1 to 20. | Amount is allowed from 1 to 20. |
400 | InvalidParam.CreateStrategy | Only Atomicity and Partial are allowed. | Only the Atomicity and Partial parameters are supported. |
400 | InvalidParam.Engine | Only MySQL is allowed when Amount > 1. | - |
400 | InvalidMultiZoneInfoList | The Specified Zone Info List is Invaild. | - |
400 | InvalidKmsConfigStatus | The Kms Service Config is Invalid. | - |
400 | InvalidConnectionString.Duplicate | Specified connection string already exists in the Aliyun RDS. | The endpoint is duplicate. Specify a different endpoint. |
400 | InvalidPort.Malformed | Specified port is not valid. | The port number is invalid. |
400 | InvalidUsedTime | UsedTime can not Less than or equal to zero. | The value of the UsedTime parameter must be greater than 0. |
400 | Kms.Unauthorized | KMS has not been authorized. | KMS is not authorized. |
400 | InvalidDBInstanceClass.Offline | The specified instance type is no longer provided. Please specify another instance type. | The instance type that you select is no longer available. Select another instance type. |
400 | SystemParamGroupCode.Format | Specific DBParamGroupId is not valid. | - |
400 | InvalidDBInstanceName.Duplicate | Specified DB instance name already exists in the Aliyun RDS. | The operation failed. The instance name already exists. Specify a different name and try again. |
401 | CannotDecreaseEssdPerfLevel | cannot decrease cloud essd performance level. | The storage type change failed the verification check. The storage type of an RDS instance that runs SQL Server with standard SSDs or ESSDs cannot be changed to local SSDs. |
403 | RISK.RISK_CONTROL_REJECTION | Risk control rejection. | - |
403 | AliCroup2CloudUserCannotBuyNotInnerCommodity | There is no group cloud commodity label, and users within the group are not allowed to purchase. | - |
403 | GroupReplicationNotSupport.InvalidEngineVersion | Group Replication requires the instance engine version to be 8.0. | - |
403 | GroupReplicationNotSupport.InvalidNodeClassCode | Group Replication requires the ClassCode of each node to be consistent. | - |
403 | GroupReplicationNotSupport.InvalidNodeNum | Group Replication is not supported, the number of nodes must be an odd number greater than or equal to 3. | - |
403 | GroupReplicationNotSupport.InvalidXengine | Group Replication is not supported because the instance has xengine tables. | - |
403 | GroupReplicationNotSupport.MemoryTooSmall | Group Replication is not supported because the memory is too small. | - |
403 | IncorrectMinorVersion | Current engine minor version does not support operations. | This operation is not supported for the current minor engine version. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-04-18 | The error codes of the API operation change. | |||||||||||||
| ||||||||||||||
2023-04-11 | The error codes of the API operation change. | |||||||||||||
| ||||||||||||||
2023-03-30 | The error codes of the API operation change. | |||||||||||||
| ||||||||||||||
2023-03-15 | The error codes of the API operation change. | |||||||||||||
| ||||||||||||||
2022-12-22 | The error codes of the API operation change. | |||||||||||||
| ||||||||||||||
2022-09-13 | The error codes of the API operation change. | |||||||||||||
| ||||||||||||||
2022-09-13 | The error codes of the API operation change. | |||||||||||||
| ||||||||||||||
2022-08-31 | The error codes of the API operation change.,The input parameters of the API operation change. | |||||||||||||
| ||||||||||||||
2022-06-22 | The error codes of the API operation change. | |||||||||||||
| ||||||||||||||
2022-03-01 | The error codes of the API operation change.,The input parameters of the API operation change. | |||||||||||||
| ||||||||||||||
2022-03-01 | The error codes of the API operation change.,The input parameters of the API operation change. | |||||||||||||
|