CreateDBInstance

更新时间:
复制 MD 格式

Use this API to create an RDS instance.

Operation description

Supported engines

  • RDS MySQL

  • RDS PostgreSQL

  • RDS SQL Server

  • RDS MariaDB

Related documentation

Warning This API operation incurs charges. Review the related documentation carefully before you use this API. If you receive an error message, search for the message to identify the cause.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

rds:CreateDBInstance

create

*All Resource

*

  • rds:ResourceTag
  • rds:Engine
  • rds:EngineVersion
  • rds:DBInstanceClass
  • rds:DBInstanceStorage
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 latest list of regions.

cn-hangzhou

Engine

string

Yes

The database engine. Valid values:

  • MySQL

  • SQLServer

  • PostgreSQL

  • MariaDB

MySQL

EngineVersion

string

Yes

The database engine version. Valid values:

  • Regular instances
    • MySQL: 5.5, 5.6, 5.7, and 8.0

    • SQL Server: 08r2_ent_ha (cloud disk, discontinued), 2008r2 (local SSD, discontinued), 2012 (Enterprise Edition Single-node), 2012_ent_ha, 2012_std_ha, 2012_web, 2014_ent_ha, 2014_std_ha, 2016_ent_ha, 2016_std_ha, 2016_web, 2017_ent, 2017_std_ha, 2017_web, 2019_ent, 2019_std_ha, 2019_web, 2022_ent, 2022_std_ha, and 2022_web

    • PostgreSQL: 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, and 18.0

    • MariaDB: 10.3 and 10.6

  • Serverless instances
    • MySQL: 5.7 and 8.0

    • SQL Server: 2016_std_sl, 2017_std_sl, and 2019_std_sl

    • PostgreSQL: 14.0, 15.0, 16.0, 17.0, and 18.0

Note
  • MariaDB does not support serverless instances.

  • For SQL Server instances, _ent indicates Enterprise Cluster Edition, _ent_ha indicates High-Availability Edition, _std_ha indicates Standard Edition, and _web indicates Web Edition.

  • SQL Server 2014 instances are not available on Alibaba Cloud International.

  • Babelfish for RDS PostgreSQL instances support only major version 15.0.

8.0

DBInstanceClass

string

Yes

The instance type. You can specify a standard or Yitian instance type. For more information, see Primary instance types.

To create a serverless instance, specify one of the following values:

  • MySQL Basic family: mysql.n2.serverless.1c

  • MySQL High-availability family: mysql.n2.serverless.2c

  • SQL Server: mssql.mem2.serverless.s2

  • PostgreSQL Basic family: pg.n2.serverless.1c

  • PostgreSQL High-availability family: pg.n2.serverless.2c

mysql.n2.medium.2c

DBInstanceStorage

integer

Yes

The storage capacity of the instance, in GB. The value must be a multiple of 5. For more information about the value range, see Primary instance types.

100

SystemDBCharset

string

No

This parameter is deprecated. You do not need to configure this parameter.

gbk

DBInstanceNetType

string

Yes

The network connection type of the instance. Set the value to Intranet for an internal connection.

Intranet

DBInstanceDescription

string

No

The instance description. It must be 2 to 255 characters long, start with a letter or a Chinese character, and contain letters, digits, underscores (_), and hyphens (-).

Note

The description cannot start with http:// or https://.

testInstance

SecurityIPList

string

Yes

The IP whitelist of the instance. Separate multiple IP addresses or CIDR blocks with commas. You can add up to 1,000 unique IP addresses or CIDR blocks. The following formats are supported:

  • IP addresses, for example, 10.10.XX.XX.

  • CIDR blocks, for example, 10.10.XX.XX/24. The number (24) that follows the slash (/) indicates the prefix length. Valid values: 1 to 32.

10.10.XX.XX/24

ClientToken

string

No

A client-generated token to ensure request idempotence. The token must be globally unique, consist of only ASCII characters, and be no more than 64 characters long.

ETnLKlblzczshOTUbOCz****

PayType

string

Yes

The billing method of the instance. Valid values:

Note

The system automatically creates and pays for the order. No manual payment confirmation is required.

Postpaid

ZoneId

string

No

The ID of the availability zone for the primary instance.

  • If you specify a VPC and a VSwitch, you must set this parameter to the ID of the availability zone where the VSwitch is located. Otherwise, the instance cannot be created.

  • For an instance of the High-availability Edition, you must also specify the ZoneIdSlave1 parameter to determine whether the instance is deployed in a single availability zone or across multiple availability zones.

  • For an instance of the Enterprise Edition with three nodes, you must also specify the ZoneIdSlave1 and ZoneIdSlave2 parameters to determine whether the instance is deployed in a single availability zone or across multiple availability zones.

  • For an instance of the Cluster Edition with two nodes, you must also specify the ZoneIdSlave1 parameter. For an instance of the Cluster Edition with three nodes, you must also specify the ZoneIdSlave1 and ZoneIdSlave2 parameters.

cn-hangzhou-b

ZoneIdSlave1

string

No

The ID of the availability zone for the secondary instance.

  • If you set this parameter to Auto, the instance is deployed across multiple availability zones, and the system automatically selects an availability zone for the secondary node.

  • If this value matches the value of the ZoneId parameter, the instance is deployed in a single availability zone.

  • If the value of this parameter is different from the value of the ZoneId parameter, the instance is deployed across multiple availability zones.

cn-hangzhou-c

ZoneIdSlave2

string

No

When you create a MySQL Cluster Edition instance, you can create one or two secondary instances. Use this parameter to specify the availability zone for the second secondary instance.

cn-hangzhou-d

InstanceNetworkType

string

No

The network type of the instance. Valid values:

  • VPC: VPC.

  • Classic: Classic Network.

Note
  • ApsaraDB RDS for MySQL instances that use cloud disks support only VPCs. You must set this parameter to VPC.

  • ApsaraDB RDS for PostgreSQL and ApsaraDB RDS for MariaDB instances support only VPCs. You must set this parameter to VPC.

  • ApsaraDB RDS for SQL Server instances of Single-node Edition and Web Edition support both Classic Network and VPCs. Other editions of ApsaraDB RDS for SQL Server instances support only VPCs. You must set this parameter to VPC.

VPC

ConnectionMode

string

No

The access mode of the instance. Valid values:

  • Standard: standard access mode.

  • Safe: database proxy mode.

By default, the system automatically assigns a connection mode.

Note

ApsaraDB RDS for SQL Server 2012, 2016, and 2017 instances support only the standard access mode.

Standard

VPCId

string

No

The ID of the VPC.

Note

This parameter takes effect only when InstanceNetworkType is set to VPC.

vpc-****

VSwitchId

string

No

The ID of the VSwitch.

  • Availability zone mapping: The availability zone of the VSwitch must be the same as the availability zones of the primary instance (ZoneId) and secondary instance (ZoneIdSlave1). If you specify two VSwitch IDs, their order must correspond to the order of the ZoneId and ZoneIdSlave1 values.

  • Network type restriction: The InstanceNetworkType parameter must be set to VPC.

  • Multiple VSwitch requirement: If you specify ZoneIdSlave1 (ID of the secondary availability zone) and its value is not Auto, you must specify two VSwitch IDs separated by a comma (,).

  • Character restrictions: The VSwitchId cannot contain special characters such as a space, !, #, $, &, or %.

vsw-****

PrivateIpAddress

string

No

The private IP address of the instance. The IP address must be within the CIDR block of the specified VSwitch. By default, the system automatically assigns a private IP address based on the VPCId and VSwitchId parameters.

172.16.XX.XX

UsedTime

string

No

The subscription duration. Valid values:

  • If Period is set to Year, the valid values of UsedTime are 1 to 5.

  • If Period is set to Month, the valid values of UsedTime are 1 to 11.

Note

This parameter is required if PayType is set to Prepaid.

2

Period

string

No

The unit of the subscription duration for the subscription instance. Valid values:

  • Year

  • Month

Note

This parameter is required if PayType is set to Prepaid.

Year

ResourceGroupId

string

No

The ID of the resource group.

rg-acfmy****

DBInstanceStorageType

string

No

The storage type of the instance. Valid values:

  • local_ssd: local SSD (recommended).

  • general_essd: general-purpose ESSD (recommended).

  • cloud_essd: ESSD PL1.

  • cloud_essd2: ESSD PL2.

  • cloud_essd3: ESSD PL3.

  • cloud_ssd: standard SSD (not recommended, discontinued in some regions).

The default value of this parameter is determined by the instance type specified in the DBInstanceClass parameter:

  • If the instance type uses local SSDs, the default value is local_ssd.

  • If the instance type uses cloud disks, the default value is cloud_essd.

Note

Serverless instances support only ESSD PL1 and general-purpose ESSDs.

general_essd

BusinessInfo

string

No

Extended business information.

121436975448952

EncryptionKey

string

No

The ID of the customer master key (CMK) that is used for disk encryption in the same region. If you specify this parameter, you enable disk encryption. Once enabled, disk encryption cannot be disabled. You must also specify the RoleARN parameter.

You can view the key ID in the KMS console or call the CreateKey operation to create a CMK.

Note
  • For ApsaraDB RDS for MySQL, ApsaraDB RDS for PostgreSQL, and ApsaraDB RDS for SQL Server instances, you can leave this parameter unspecified and specify only the RoleARN parameter to create an instance that has disk encryption enabled with a service key.

  • You can authorize a RAM user to ensure that disk encryption is enabled when the RAM user creates an instance. If disk encryption is not enabled, the instance cannot be created. The following RAM authorization policy is used: {"Version":"1","Statement":[{"Effect":"Deny","Action":"rds:CreateDBInstance","Resource":"*","Condition":{"StringEquals":{"rds:DiskEncryptionRequired":"false"}}}]}
    Warning This policy also affects the CreateOrder call that is used to create instances in the ApsaraDB RDS console.

0d24*****-da7b-4786-b981-9a164dxxxxxx

RoleARN

string

No

The Alibaba Cloud Resource Name (ARN) of a RAM role that is assumed by the ApsaraDB RDS service account to access KMS. You can call the CheckCloudResourceAuthorized operation to query the ARN.

Important If you enable disk encryption, you must specify the RoleARN parameter.

acs:ram::1406****:role/aliyunrdsinstanceencryptiondefaultrole

AutoRenew

string

No

Specifies whether to enable auto-renewal for the subscription instance. This parameter is valid only for subscription instances. Valid values:

  • true

  • false

Note
  • For a monthly subscription, the auto-renewal period is one month.

  • For a yearly subscription, the auto-renewal period is one year.

true

Category

string

No

The instance family. Valid values:

  • Regular instances

    • Basic: Basic Edition.

    • HighAvailability: High-availability Edition.

    • cluster: MySQL or PostgreSQL Cluster Edition.

    • AlwaysOn: SQL Server Cluster Edition.

    • Finance: Enterprise Edition with three nodes.

    Note

    This parameter is required when you create a SQL Server instance of Enterprise Cluster Edition, Basic Edition with Standard architecture, or Basic Edition with Enterprise architecture. For example, if you create a Basic Edition instance of the 2022 Enterprise Cluster Edition (2022_ent), you must set this parameter to Basic.

  • Serverless instances

    • serverless_basic: Serverless Basic Edition (for MySQL and PostgreSQL only).

    • serverless_standard: Serverless High-availability Edition (for MySQL and PostgreSQL only).

    • serverless_ha: SQL Server Serverless High-availability Edition.

    Note

    This parameter is required when the PayType parameter is set to Serverless.

HighAvailability

DedicatedHostGroupId

string

No

The ID of the dedicated host group.

This parameter is required when you create an ApsaraDB RDS instance in a dedicated host group.

  • You can call the DescribeDedicatedHostGroups operation to query the information about dedicated host groups.

  • If you have not created a dedicated host group, you can call the CreateDedicatedHostGroup operation to create one.

dhg-4n****

TargetDedicatedHostIdForMaster

string

No

The ID of the host for the primary instance in the dedicated host group.

This parameter is required when you create an ApsaraDB RDS instance in a dedicated host group. If you do not specify this parameter, the system automatically assigns a host.

  • You can call the DescribeDedicatedHosts operation to query the information about hosts in a dedicated host group.

  • If you do not have a host, you can call the CreateDedicatedHost operation to add one.

i-bp****

TargetDedicatedHostIdForSlave

string

No

The ID of the host for the secondary instance in the dedicated host group.

This parameter is required when you create an ApsaraDB RDS instance of the High-availability or Enterprise Edition with three nodes in a dedicated host group. If you do not specify this parameter, the system automatically assigns a host.

  • You can call the DescribeDedicatedHosts operation to query the information about hosts in a dedicated host group.

  • If you do not have a host, you can call the CreateDedicatedHost operation to add one.

i-bp****

TargetDedicatedHostIdForLog

string

No

The ID of the host for the logger instance in the dedicated host group.

This parameter is required when you create an ApsaraDB RDS instance of the Enterprise Edition with three nodes in a dedicated host group. If you do not specify this parameter, the system automatically assigns a host.

  • You can call the DescribeDedicatedHosts operation to query the information about hosts in a dedicated host group.

  • If you do not have a host, you can call the CreateDedicatedHost operation to add one.

i-bp****

DBParamGroupId

string

No

The ID of the parameter group. You can call the DescribeParameterGroups operation to query the ID.

Note

This parameter is supported only for MySQL and PostgreSQL. If you do not specify this parameter, the system default parameter group is used. You can also create a custom parameter group and use its ID for this parameter.

rpg-sys-****

DBTimeZone

string

No

The time zone of the instance. This parameter takes effect only when Engine is set to MySQL or PostgreSQL.

  • If Engine is set to MySQL:
    • This parameter specifies a UTC time zone. The value must be in the range of -12:59 to +13:00.

    • Instances that use local SSDs can use named time zones, such as Asia/Hong_Kong. For more information about named time zones, see Named time zone reference.

  • If Engine is set to PostgreSQL:
    • This parameter specifies a named time zone. UTC time zones are not supported. For more information about named time zones, see Named time zone reference.

    • This parameter can be configured only for ApsaraDB RDS for PostgreSQL instances that use cloud disks.

Note
  • You can set the time zone when you create a primary instance. You cannot set the time zone for a read-only instance. A read-only instance inherits the time zone from its primary instance.

  • If you do not specify this parameter, the system selects a default time zone based on the region in which you create the instance.

+08:00

DBIsIgnoreCase

string

No

Specifies whether table names are case-sensitive. Valid values:

  • true: case-insensitive (default).

  • false: case-sensitive.

true

TargetMinorVersion

string

No

The minor engine version of the instance to be created. This parameter is required only when you create an ApsaraDB RDS for MySQL or ApsaraDB RDS for PostgreSQL instance. Format:

  • MySQL: <Instance version>_<Digital version number>. Example: rds_20200229, xcluster_20200229, or xcluster80_20200229. Description:

    • rds: High-availability or Basic Edition.

    • xcluster: MySQL 5.7 Enterprise Edition with three nodes.

    • xcluster80: MySQL 8.0 Enterprise Edition with three nodes.

    Note

    You can call the DescribeDBMiniEngineVersions operation to query the digital version number. For more information about the differences between versions, see AliSQL release notes.

  • PostgreSQL: rds_postgres_<Major version>00_<Minor version number>. Example: rds_postgres_1400_20220830. Description:

    • 1400: The major version of PostgreSQL is 14.

    • 20220830: The minor engine version of AliPG. You can call the DescribeDBMiniEngineVersions operation to query the minor engine version. For more information about the differences between versions, see PostgreSQL release notes.

    Note

    If Babelfish is enabled in BabelfishConfig, the minor version of the ApsaraDB RDS for PostgreSQL instance is in the following format: rds_postgres_<Major version>00_<AliPG minor engine version>_babelfish.

rds_20200229

StorageAutoScale

string

No

Specifies whether to enable storage auto-scaling. This feature is supported only for ApsaraDB RDS for MySQL and ApsaraDB RDS for PostgreSQL. Valid values:

  • Enable: enables storage auto-scaling.

  • Disable: disables storage auto-scaling (default).

Note

You can also call the ModifyDasInstanceConfig operation to adjust this setting after the instance is created. For more information, see Configure storage auto-scaling.

Disable

StorageThreshold

integer

No

The storage usage percentage that triggers storage auto-scaling. Valid values:

  • 10

  • 20

  • 30

  • 40

  • 50

Note

This parameter is required if StorageAutoScale is set to Enable.

50

StorageUpperBound

integer

No

The maximum storage capacity to which the instance can automatically scale, in GB.

Note
  • The value must be greater than or equal to 0.

  • This parameter is required if StorageAutoScale is set to Enable.

2000

DryRun

boolean

No

Specifies whether to perform a dry run. Valid values:

  • true: performs a dry run but does not create the instance. The system checks the request parameters, request format, business limits, and available resources.

  • false: sends a regular request. If the request passes the check, the instance is created. This is the default value.

false

UserBackupId

string

No

The ID of the user backup. You can call the ListUserBackupFiles operation to query the user backup ID. You can specify this parameter to create an instance from a user backup.

The following limits apply if you specify this parameter:

  • The PayType parameter must be set to Postpaid.

  • The Engine parameter must be set to MySQL.

  • The EngineVersion parameter must be set to 5.7.

  • The Category parameter must be set to Basic.

67798****

Amount

integer

No

The number of ApsaraDB RDS for MySQL instances that you want to create. This parameter is applicable only to the batch creation of ApsaraDB RDS for MySQL instances.

Valid values: 1 to 20. Default value: 1.

Note
  • When you create multiple ApsaraDB RDS for MySQL instances, you can use the Tag.Key and Tag.Value parameters to add tags to the instances in the same batch. This helps you manage these instances after they are created.

  • After multiple ApsaraDB RDS for MySQL instances are created, the operation returns only the TaskId, RequestId, and Message parameters. It does not return other detailed parameters. To query the details of an individual instance, you can call the DescribeDBInstanceAttribute operation.

  • If the Engine parameter is not set to MySQL and the value of this parameter is greater than 1, the call fails and the InvalidParam.Engine error code is returned.

2

CreateStrategy

string

No

The creation policy for batch instance creation. This parameter takes effect only when the Amount parameter is set to a value greater than 1. Valid values:

  • Atomicity (default): All instances in the same batch are created, or no instances are created if one fails.

  • Partial: The creation of an instance is not affected by other instances in the same batch.

Atomicity

Tag

array<object>

No

The list of tags.

object

No

The details of the tags.

Key

string

No

The tag key. You can specify this parameter to add a tag to the instance.

  • If the specified tag key already exists, the tag key is added to the instance. You can call the ListTagResources operation to query existing tags.

  • If the specified tag key does not exist, it is created and then added to the instance.

  • You cannot specify an empty string for this parameter.

  • This parameter must be used with the Tag.Value parameter.

testkey1

Value

string

No

The tag value corresponding to the tag key. You can specify this parameter to add a tag to the instance.

  • If the specified tag value exists for the corresponding tag key, the tag value is added to the instance. You can call the ListTagResources operation to query existing tags.

  • If the specified tag value does not exist for the corresponding tag key, it is created and then added to the instance.

  • This parameter must be used with the Tag.Key parameter.

testvalue1

DeletionProtection

boolean

No

Specifies whether to enable deletion protection for the instance. This feature is supported only for pay-as-you-go instances. Valid values:

  • true: enables deletion protection.

  • false: disables deletion protection (default).

true

BabelfishConfig

string

No

The Babelfish for ApsaraDB RDS for PostgreSQL configuration information.

Format: {"babelfishEnabled":"true","migrationMode":"xxxxxxx","masterUsername":"xxxxxxx","masterUserPassword":"xxxxxxxx"}

Parameter description:

  • babelfishEnabled: specifies whether to enable Babelfish. Set the value to true to enable Babelfish. If you do not specify this parameter, Babelfish is disabled by default.

  • migrationMode: The database mode. Set the value to single-db for single-database mode or multi-db for multi-database mode.

  • masterUsername: The administrator account. The account name must consist of lowercase letters, digits, and underscores (_), start with a letter, end with a letter or a digit, be up to 63 characters in length, and cannot start with pg.

  • masterUserPassword: The password of the administrator account. The password must be 8 to 32 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include ! @ # $ % ^ & * () _ + - =.

Note

This parameter is applicable only to ApsaraDB RDS for PostgreSQL instances. For more information about Babelfish for ApsaraDB RDS for PostgreSQL, see What is 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

number

No

The maximum number of RDS Capacity Units (RCUs) for auto-scaling. Valid values:

  • MySQL: 1 to 32

  • SQL Server: 2 to 16

  • PostgreSQL: 1 to 14

Note

The value of this parameter must be greater than or equal to the value of MinCapacity and must be an integer.

8

MinCapacity

number

No

The minimum number of RCUs for auto-scaling. Valid values:

  • MySQL: 0.5 to 32

  • SQL Server: 2 to 16 (only integers are supported)

  • PostgreSQL: 0.5 to 14

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 automatic pause and start for the serverless instance. Valid values:

  • true: enables the feature.

  • false: disables the feature (default).

Note

This parameter is applicable only to serverless instances that run MySQL or PostgreSQL. If the instance has no connections for 10 minutes, it is automatically suspended. It resumes automatically when a new connection is established.

true

SwitchForce

boolean

No

Specifies whether to enable forced scaling for the serverless instance. Valid values:

  • true: enables the feature.

  • false: disables the feature (default).

Note
  • This parameter is applicable only to serverless instances that run MySQL or PostgreSQL. If you enable this parameter, the service may be unavailable for 30 to 120 seconds during forced scaling. Use this feature with caution.

  • The auto-scaling of instance RCUs usually takes effect immediately. However, in special cases, such as when a large transaction is being executed, scaling may not be completed instantly. In such cases, you can enable this parameter to perform forced scaling.

false

ConnectionString

string

No

The internal endpoint of the instance.

The format of the endpoint is xxx.mysql.rds.aliyuncs.com, where xxx is the prefix of the instance ID, such as rm-uf6wjk5***.

rm-uf6wjk5****.mysql.rds.aliyuncs.com

Port

string

No

The port that can be initialized when you create an instance. Valid range:

  • MySQL: 1000 to 65534

  • PostgreSQL, SQL Server, and MariaDB: 1000 to 5999

3306

BurstingEnabled

boolean

No

This parameter is deprecated. No configuration is required.

false

AutoPay

boolean

No

Specifies whether to enable the I/O burst feature for general-purpose ESSDs. Valid values:

  • true: enables the feature.

  • false: disables the feature.

Note

For more information about the I/O burst feature for general-purpose ESSDs, see What is a general-purpose ESSD?

true

IoAccelerationEnabled

string

No

Specifies whether to enable automatic payment. Valid values:

  • true: enables automatic payment. Make sure that your account has a sufficient balance.

  • false: generates an order but does not complete the payment.

Note

Default value: true. If your account has an insufficient balance, you can set the AutoPay parameter to false to generate an unpaid order. You can then log on to the ApsaraDB RDS console to pay for the order.

0

ColdDataEnabled

boolean

No

Specifies whether to enable the Buffer Pool Extension (BPE) feature for general-purpose ESSDs. Valid values:

  • 1: enables the feature.

  • 0: disables the feature.

false

WhitelistTemplateList

string

No

Specifies whether to enable the data archiving feature for general-purpose ESSDs. Valid values:

  • true: enables the feature.

  • false: disables the feature.

192.168.0.1,172.16.213.9

AutoCreateProxy

boolean

No

The IP whitelist template. To specify multiple IP addresses, separate them with commas (,). Do not add spaces before or after the commas. Example: 192.168.0.1,172.16.213.9.

false

AutoUseCoupon

boolean

No

Specifies whether to automatically create a database proxy. Valid values:

  • true: enables automatic proxy creation. A general-purpose proxy is created by default.

  • false: disables automatic proxy creation.

true

PromotionCode

string

No

Specifies whether to use a coupon. Valid values:

  • true: uses a coupon.

  • false: does not use a coupon (default).

Note

If you apply a coupon and later downgrade the instance, the coupon's value is not refunded.

aliwood-1688-mobile-promotion

OptimizedWrites

string

No

The promotion code.

optimized

ExternalReplication

boolean

No

Specifies whether to enable the 16 KB atomic write feature. Valid values:

  • optimized: Enabled.

  • none (default): Disabled.

ON

CustomExtraInfo

string

No

Enable or disable RDS MySQL native replication. Valid values:

  • ON: Enabled.

  • OFF: Off.

Response elements

Element

Type

Description

Example

object

The response parameters.

DryRunResult

boolean

Indicates whether the request passes the dry run. Valid values:

  • true: The request passes the dry run.

  • false: The request fails the dry run.

Note
  • This parameter is returned only if you perform a dry run.

  • If the dry run fails, an error is returned.

true

TagResult

boolean

Indicates whether the tag was attached to the instance. Valid values:

  • true: The tag was attached.

  • false: The tag failed to be attached.

Note

This parameter is returned only if you attach a tag to the instance.

true

RequestId

string

The request ID.

1E43AAE0-BEE8-43DA-860D-EAF2AA0724DC

ConnectionString

string

The internal endpoint of the instance.

rm-uf6wjk5****.mysql.rds.aliyuncs.com

Message

string

The message that indicates the batch creation task.

Note

This parameter is returned only if the Amount parameter is greater than 1.

Batch Create DBInstance Task Is In Process.

DBInstanceId

string

The instance ID. If you set the Amount parameter to a value greater than 1, a corresponding number of instance IDs are returned. The instance IDs are separated by commas (,).

For example, if you set the Amount parameter to 3, three instance IDs are returned. Example: rm-uf6wjk5*****1,rm-uf6wjk5*****2,rm-uf6wjk5*****3.

rm-uf6wjk5****

Port

string

The port that is used to connect to the instance over an internal network.

3306

TaskId

string

The ID of the batch creation task.

  • This parameter is returned only if the Amount parameter is greater than 1.

  • You cannot query task details by TaskId.

s2365879-a9d0-55af-fgae-f2****

DryRun

boolean

Indicates that a dry run is performed before you create an instance.

  • The return value is fixed as true.

  • This parameter is returned only if you perform a dry run.

true

OrderId

string

The order ID.

1007893702****

Note

Calling this API with the new SDK package can cause a timeout error because the default client timeout does not match the server's. The API call succeeds despite this error. To prevent this, set the ReadTimeout parameter to 20000 before the call.设置调用超时时间

Examples

Success response

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 Invalid.ParamGroupDBVersion %s.%s
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. A security risk was detected in the default payment method. Please verify your payment method before placing your order. A verification link will be sent to you via email and internal message.
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. When selecting a cloud storage type, specifying a InstanceNetworkType value of Classic is not valid.
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.
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.
400 ServiceLinkedRole.NotExist Service linked role for RDS PostgreSQL not exist. Create the AliyunServiceRoleForRdsPgsqlOnEcs role for ApsaraDB RDS for PostgreSQL.
400 CommodityServiceCalling.Exception Failed to call commodity service. Failed to call commodity service return.
400 Commodity.InvalidComponent The module you purchased is not legal, please buy it again. The module you purchased is not legal, please buy it again.
400 Pay.InsufficientBalance Insufficient available balance. Insufficient available balance.
400 Price.CommoditySys Commodity system call exception. Commodity system call exception.
400 RegionEndTimeDissolvedAustralia Cloud services in the Australia (Sydney) region will be discontinued. Set the validity date to September 30, 2024 or earlier than September 30, 2024. Hello customer, this area has been abolished.
400 RegionEndTimeDissolvedIndia Cloud services in the India (Mumbai) region will be discontinued. Set the validity date to July 15, 2024 or earlier than July 15, 2024. Hello customer, this area has been abolished.
400 InvalidPrivateIpAddress.Format The specified private IP address format is incorrect. The specified IP address is not in the correct format.
400 InvalidPrivateIpAddress.Mismatch Specified private IP address is not in the CIDR block of virtual switch. The VPC endpoint is invalid.
400 TooManyWhitelistTemplateIds create dbinstance can support attach to up to 10 whitelist templates. Excessive number of incoming whitelist templates! You can associate up to 10 whitelist templates.
400 UnsupportExtendDisk.NotSupport Specified DB instance is unsupport extend disk. Disk expansion is not supported on the specified instance.
400 InvalidWhitelistTemplateId the template id list is invalid. The ID of the specified whitelist template is incorrect. Check the setting.
400 InvalidRequestId The request is copy, check your token. The request is copy, check your token.
400 InvalidParameter.MinCapacity The specified parameter 'MinCapacity' is not valid. The specified parameter 'MinCapacity' is not valid.
400 UnsupportedClassCode The specified DB instance class stops selling. The specified DB instance class stops selling.
400 InvalidParameter.NotSupportDBInstanceStorageType Parameter DBInstanceStorageType is invalid. Invalid DBInstanceStorageType parameter
400 InvalidParam.InstanceNetworkType Creation of classic network instances is not supported. Classic network offline, does not support the creation of classic network instances!
400 InvalidOrder.NotFound Specified order does not exist in RDS. The specified order does not exist in RDS.
400 InvalidVSwitchId.Format The specified vswitch Id format is incorrect.
400 Order.ComboInstanceNotAllowOperate A package instance is not allowed to operate independently. A package instance is not allowed to operate independently.
400 Price.PricingPlanResultNotFound Pricing plan price result not found. Pricing plan price result not found.
400 Order.NoRealNameAuthentication You have not passed the real-name authentication and do not meet the purchase conditions. Please log in to the user center for real-name authentication. You have not passed the real-name authentication and do not meet the purchase conditions. Please log in to the cost and cost for real-name authentication.
400 InsufficientAvailableQuota Your account quota limit is less than 0, please recharge before trying to purchase. Your account available limit is less than 0, please recharge before trying to purchase.
400 RegionDissolvedEOM Dear customer, Alibaba Cloud plans to optimize and adjust the current region. Cloud services in this region will cease operations. You are currently unable to operate new purchase orders. Thank you for your understanding and support. Hello, Alibaba Cloud plans to optimize and adjust the current region. Cloud services in this region will stop operating. In order to ensure your business continuity and smooth transition of data migration, you are currently unable to operate new purchase orders. Thank you for your understanding and support.
400 Order.PeriodInvalid There is a problem with the period you selected, please choose again. There is a problem with the period you selected, please choose again.
400 pay.noCreditCard Account not bound to credit card.
400 Order.InstHasUnpaidOrder There is an unpaid order for the service you have purchased. Please pay or void it before placing the order. There is an unpaid order for the service you have purchased. Please pay or void it before placing the order.
400 BasicInfoUncompleted Your information is incomplete. Complete your information before the operation. Your basic information is not complete, please complete your basic information before operation.
400 Risk.RiskControlRejection Your account is abnormal, please contact customer service for details. Your account is abnormal, please contact customer service for details.
400 Api.NotSupport Specified api is not supported. The current interface does not support.
400 ContainForbiddenLabelError There is a label that prohibits placing orders. Please contact your distributor for assistance. You cannot place the order because a tag indicates that order placement is prohibited. Contact your distributor.
400 InvalidDBInstanceId.NotFound The DBInstanceId provided does not exist in records. The DBInstanceId provided does not exist.
400 InvalidParam Sepcified wal level Parameter is invalid. There are still logical slots in instance, so it can not be set as replica. The specified wal_level parameter is invalid. There is still a copy slot in the instance, so it cannot be set to replica.
400 System.SaleValidateFailed Sales expression validation system error. A system error occurs when the sales expression is verified.
400 Abs.InvalidAccount.NotFound account is not found. The account does not exist.
400 SqlExecuteFailedOrTimeout sql command execution failed or timed out:%s. SQL command execution failed or timed out
400 ColdData.EngineVersionNotSupport The current instance engine version not support coldDataEnabled. The current instance engine version not support coldDataEnabled.
400 ColdData.MinorVersionNotSupport The current instance minor version not support coldDataEnabled. The current instance minor version not support coldDataEnabled.
400 IncorrectTargetClasscode The current instance type does not support this operation. This operation is not supported by the instance type.
400 RequiredParam.NotFound Required input param is not found.
400 Parameters.Invalid Parameter error, please check the parameters. Parameter error, please check the parameters.
400 BackupPolicyNotSupport Cold Data won't open with CrossBackup or Flash Backup, please check Backup Policy. Cold Data won't open with CrossBackup or Flash Backup, please check Backup Policy.
400 InvalideStatus.Format The instance status does not support this operation.
400 InvalidReleasedKeepPolicy.Format Specified Released Keep Policy is not valid. Specified Released Keep Policy is not valid.
400 InvalidDBInstanceEngineType.Format the DB instance engine type does not support this operation. This operation is not supported for the database engine of the instance.
400 Pay.NoCreditCard No credit cards. No credit cards.
400 VpcNetworkTypeNotSupport The vpc network type instance does not support this operation. The vpc network type instance does not support this operation.
400 MirrorInsExists Specified DB instance mirror ins already existed. Specified DB instance mirror ins already existed.
400 InvalidBackupSet The specified database does not exist in the backup set. The specified database does not exist in the backup set.
400 OrdTCommodityQueryError Failed to query for product. Failed to query product.
400 ProductInstanceReleased The instance has been released. Please check before placing the order. The instance has been released, please verify and place an order.
400 IncorrectTargetCategory Current target category does not support this operation. Current target category does not support this operation.
400 PurchaseDurationInsufficient The purchase duration does not meet the requirements, please choose again. The purchase duration does not meet the requirements, please select again.
400 NotFound.ParamGroupId Current ParamGroupId not found. The parameter template does not exist.
400 InvalidParamForXfs Xfs instance must be single tenant standard instance. Xfs instance must be single tenant standard instance.
400 UnsupportedColdData Current coldDataEnabled parameter can not support. The specified region does not support cold storage.
400 AtLeastThreeVSwitchAvailableIp The primary vswitch requires at least three available IP addresses. The master switch requires at least 3 available IPs.
400 AtLeastTwoVSwitchAvailableIp The primary vswitch requires at least two available IP addresses. The master switch requires at least 2 available IPs.
400 DuckDBOperationConflictBetweenPrimaryAndReadOnlyInstance Current instance is already attached to another duckdb instance, operation is conflict. The current instance is already associated with another DUCKDB instance, which conflicts with the current DUCKDB operation.
401 CannotDecreaseEssdPerfLevel cannot decrease cloud essd performance level.
500 ExternalFailure The request processing has failed due to external service failure. The request processing has failed due to external service failure.
500 RequestMetaDataFailed The service request failed. Please try again later or contact service personnel. The service request failed. Please try again later or contact service personnel.
500 InvokeProxyFailure The request processing has failed due to service failure of rds api. The request failed to be processed due to an RDS API failure.
403 ByokRoleArnNotFound The roleArn can not be null. The roleArn can not be null.
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.
403 CloudSSDNotSupport Cloud ssd does not support this operation, please upgrade to essd.
403 InvalidVswitchId Specified conn vswitch id is not valid.
403 BasicCategoryNotSupport The Basic category is not supported. Basic series not supported
403 OrderStatus.UnPaid The specified db instance has unpaid order. The instance has an unpaid order. Please pay first and try again.
403 InvalidReduceDiskSize The storage capacity after the scale-down must be larger than the used amount. The scale-in target capacity cannot be less than the current storage space usage
403 InvalidUserOperatorPermission The user permission does not support this operation. The user is not authorized to perform this operation.
403 OperationDenied.ZoneResource There is no available zone for inventory. There is no available zone for inventory.
403 NotInFlowController Sorry,no permission. Sorry,no permission.
403 InvalidKmsKey Kms key is disabled.
403 InvalidInstanceLevel.Malformed Current DB instance level does not support this operation. The specified database instance type does not support this operation.
403 IncorrectCharacterType Current DB instance character type does not support this operation. This operation is not supported for the character type of the instance.
404 InsufficientResourceCapacity The target availability zone does not have sufficient resources. The target Availability Zone does not have enough resources.
404 InvalidClusterKms The current instance does not authorized to access the Key Management Service. The instance does not have permissions to access Key Management Service (KMS).
404 Request.NotFound The requested resource is not available. The requested resources are unavailable.
404 HostInfo.NotFound The specified host info is not found.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.