Creates an instance.
Operation Description
Supported database engines
- RDS MySQL
- RDS PostgreSQL
- RDS SQL Server
- RDS MariaDB
References
- Create an ApsaraDB RDS for MySQL instance
- Create a serverless ApsaraDB RDS for MySQL instance
- Create an ApsaraDB RDS for PostgreSQL instance
- Create a serverless ApsaraDB RDS for PostgreSQL instance
- Enable Babelfish for an ApsaraDB RDS for PostgreSQL instance
- Create an ApsaraDB RDS for SQL Server instance
- Create a serverless ApsaraDB RDS for SQL Server instance
- Create an ApsaraDB RDS for MariaDB instance
debugging
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 region ID. 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.
Note
| 5.6 |
DBInstanceClass | string | Yes | The instance type of the instance. For more information, see Primary ApsaraDB RDS instance types. 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. | 100 |
SystemDBCharset | string | No | A deprecated parameter. You do not need to specify this parameter. | gbk |
DBInstanceNetType | string | Yes | The network connection type of the instance. The value of this parameter is fixed as Intranet, indicating an internal network connection. | Internet |
DBInstanceDescription | string | No | The instance name. 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. Note
: The name 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 token, but you must make sure that the token 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:
Note
: The system 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 zone ID of the secondary instance.
| cn-hangzhou-c |
ZoneIdSlave2 | string | No | This parameter is deprecated. | 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. Note
: SQL Server 2012, SQL Server 2016, and SQL Server 2017 support only the standard mode.
| Standard |
VPCId | string | No | The ID of the VPC to which the instance belongs. Note
: This 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.
Note
If you set the PayType parameter to Prepaid, you must specify the UsedTime parameter.
| 2 |
Period | string | No | The unit of the subscription duration. Valid values:
Note
If you set the PayType parameter to Prepaid, you must specify the UsedTime parameter.
| Year |
ResourceGroupId | string | No | The ID of the resource group. | rg-acfmy***** |
DBInstanceStorageType | string | Yes | The storage type of the instance. Valid values:
The default value of this parameter is determined by the instance type specified by the DBInstanceClass parameter.
Note
Serverless instances use only ESSDs of PL1. If you create 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 to encrypt data on standard SSDs or ESSDs in the region of the instance. If you specify the EncryptionKey parameter, cloud disk encryption is automatically enabled. In this case, you must also specify the RoleARN parameter. Cloud 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. Note
This parameter is optional when you create an ApsaraDB RDS for PostgreSQL instance. You need to only specify the RoleARN parameter to create an instance that has cloud disk encryption enabled by using the obtained key ID.
| 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 if the instance uses the subscription billing method. Valid values:
Note
| true |
Category | string | No | The RDS edition of the instance. Valid values:
| 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 you want to create an instance that runs RDS High-availability Edition or RDS Enterprise Edition 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 you want to create an instance that runs RDS Enterprise Edition 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. You can call the DescribeParameterGroups operation to query the ID of the parameter template. Note
: This parameter is available if you want to create an instance that runs MySQL or PostgreSQL . If you do not configure this parameter, the default parameter template is used. If you want to use a custom parameter template, you can customize a parameter template and set this parameter to the ID of the custom template.
| rpg-sys-***** |
DBTimeZone | string | No | The time zone of the instance. This parameter takes effect only when you set the Engine parameter 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.
| rds_20200229 |
StorageAutoScale | string | No | Specifies whether to enable the automatic storage expansion feature for the instance. This feature is supported if your RDS instance runs MySQL or PostgreSQL. Valid values:
Note
After 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 in percentage based on which automatic storage expansion is triggered.
Note
If you set the StorageAutoScale parameter 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. Note
| 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. Note
InvalidParam.Engine . | 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. Valid values:
| Atomicity |
Tag | object [] | No | The tags. | |
Key | string | No | The key of the tag that you want to add to the instance. 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. This feature is available only for pay-as-you-go instances. Valid values:
| 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:
Note
: This parameter applies only to ApsaraDB RDS for PostgreSQL instances. 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. Note
ApsaraDB RDS for MariaDB does not support serverless instances.
| |
MaxCapacity | double | No | The maximum number of RDS Capacity Units (RCUs). Valid values:
Note
The 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:
Note
The 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 startup and stop feature for the serverless instance. Valid values:
Note
This parameter is required only for serverless instances that run MySQL and PostgreSQL. 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 internal endpoint that is used to connect to the instance. | rm-uf6wjk5*****.mysql.rds.aliyuncs.com |
Port | string | No | The port. You can initialize the port when you create the instance.
| 3306 |
BpeEnabled | string | No | A reserved parameter. You do not need to specify this parameter. | false |
BurstingEnabled | boolean | No | A reserved parameter. You do not need to specify this parameter. | false |
AutoPay | boolean | No | Specifies whether to automatically complete the payment. Default value: true. Valid values:
Note
Default value: true. If your account balance is insufficient, you can set AutoPay to false to generate an unpaid order. Then, you can pay for the order in the ApsaraDB RDS console.
| true |
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. |
403 | CloudDiskEncryptionNotSupport | The encryption key is not allowed for general-purpose instance. | Universal instances do not support cloud disk encryption. |
404 | InsufficientResourceCapacity | The target availability zone does not have sufficient resources. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-11-06 | API Description Update,The error codes of the API operation change. | see changesets | ||||||||||||
| ||||||||||||||
2023-06-06 | The error codes of the API operation change. | see changesets | ||||||||||||
| ||||||||||||||
2023-06-02 | The error codes of the API operation change.,The input parameters of the API operation change. | see changesets | ||||||||||||
| ||||||||||||||
2023-04-18 | The error codes of the API operation change. | see changesets | ||||||||||||
| ||||||||||||||
2023-04-11 | The error codes of the API operation change. | see changesets | ||||||||||||
| ||||||||||||||
2023-03-30 | The error codes of the API operation change. | see changesets | ||||||||||||
| ||||||||||||||
2023-03-15 | The error codes of the API operation change. | see changesets | ||||||||||||
| ||||||||||||||
2022-12-22 | The error codes of the API operation change. | see changesets | ||||||||||||
| ||||||||||||||
2022-09-13 | The error codes of the API operation change. | see changesets | ||||||||||||
| ||||||||||||||
2022-09-13 | The error codes of the API operation change. | see changesets | ||||||||||||
| ||||||||||||||
2022-08-31 | The error codes of the API operation change.,The input parameters of the API operation change. | see changesets | ||||||||||||
| ||||||||||||||
2022-06-22 | The error codes of the API operation change. | see changesets | ||||||||||||
| ||||||||||||||
2022-03-01 | The error codes of the API operation change.,The input parameters of the API operation change. | see changesets | ||||||||||||
| ||||||||||||||
2022-03-01 | The error codes of the API operation change.,The input parameters of the API operation change. | see changesets | ||||||||||||
|