CreateDBInstance_云数据库 RDS_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

适用引擎

  • RDS MySQL
  • RDS PostgreSQL
  • RDS SQL Server
  • RDS MariaDB

相关功能文档

警告 该 API 操作涉及费用,请仔细阅读相关功能文档后再进行操作。 调用 API 时,如有报错信息,可以通过搜索错误信息,查看报错原因。

流控信息

请求速率为50/1(s)。更多流控信息,请前往配额中心查看

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
rds:CreateDBInstance
Create
全部资源
*
rds:ResourceTag

请求参数

字段名称字段详情
RegionIdstring

地域 ID。可调用 DescribeRegions 获取。

示例值:cn-hangzhou参考取值来源:
    DescribeRegions
Enginestring

数据库类型,取值:展开详情

示例值:MySQL
EngineVersionstring

数据库版本,取值:展开详情

示例值:8.0参考取值来源:
    DescribeDBMiniEngineVersions
DBInstanceClassstring

实例规格。可以指定标准版或倚天版规格,详情请参见主实例规格表展开详情

示例值:mysql.n2.medium.2c参考取值来源:
    DescribeDBInstances
    CreateReadOnlyDBInstance
DBInstanceStorageinteger<int32>

实例存储空间,单位为 GB。每 5 GB 进行递增,取值范围请参见实例规格表

示例值:100
SystemDBCharsetstring

弃用参数,无需配置。

示例值:gbk
DBInstanceNetTypestring

实例的网络连接类型。固定配置 Intranet,表示内网连接。

示例值:Intranet枚举值:参考取值来源:
    CreateDdrInstance
    DescribeDBInstances
DBInstanceDescriptionstring

实例名称。长度为 2~255 个字符。以中文、英文字母开头,可以包含数字、中文、英文、下划线(_)、短横线(-)。展开详情

示例值:testInstance
SecurityIPListstring

该实例的 IP 白名单。多条记录请以半角逗号(,)隔开,不可重复,单个实例最多添加 1000 个 IP 地址或 IP 段。支持如下两种格式:展开详情

示例值:10.10.XX.XX/24参考取值来源:
    DescribeDBInstanceIPArrayList
    CreateDdrInstance
ClientTokenstring

用于保证请求的幂等性,防止重复提交请求。由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过 64 个 ASCII 字符,且该参数值中不能包含非 ASCII 字符。

示例值:ETnLKlblzczshOTUbOCz****
PayTypestring

实例的付费类型,取值:展开详情

示例值:Postpaid
ZoneIdstring

主节点可用区 ID。展开详情

示例值:cn-hangzhou-b
ZoneIdSlave1string

备节点可用区 ID。展开详情

示例值:cn-hangzhou-c
ZoneIdSlave2string

RDS MySQL 集群系列实例支持在新建实例时,同时创建 1~2 个备节点。有此需求时,您可通过本参数指定第 2 个备节点的可用区。

示例值:cn-hangzhou-d
InstanceNetworkTypestring

实例的网络类型,取值:展开详情

示例值:VPC参考取值来源:
    DescribeDBInstanceNetInfo
ConnectionModestring

实例的访问模式,取值:展开详情

示例值:Standard
VPCIdstring

专有网络(VPC) ID。展开详情

示例值:vpc-****
VSwitchIdstring

虚拟交换机 ID。展开详情

示例值:vsw-****参考取值来源:
    DescribeVSwitches
PrivateIpAddressstring

设置实例的内网 IP。需要在指定交换机的 IP 地址范围内。系统默认通过 VPCIdvSwitchId 自动分配。

示例值:172.16.XX.XX
UsedTimestring

指定购买时长,取值:展开详情

示例值:2枚举值:正则:^\d+$
Periodstring

指定预付费实例为包年或者包月类型,取值:展开详情

示例值:Year枚举值:YearMonthDay123
ResourceGroupIdstring

资源组 ID。

示例值:rg-acfmy****参考取值来源:
    DescribeResourceDetails
DBInstanceStorageTypestring

实例存储类型,取值:展开详情

示例值:general_essd参考取值来源:
    DescribeDBInstances
BusinessInfostring

业务扩展参数。

示例值:121436975448952
EncryptionKeystring

同地域内的云盘加密的密钥 ID。传入此参数表示开启云盘加密(开启后无法关闭),并且需要传入 RoleARN展开详情

示例值:0d24*****-da7b-4786-b981-9a164dxxxxxx参考取值来源:
    DescribeDBInstanceEncryptionKey
RoleARNstring

主账号授权 RDS 云服务账号访问 KMS 权限的全局资源描述符(ARN)。您可以通过 CheckCloudResourceAuthorized 接口查看 ARN 信息。展开详情

示例值:acs:ram::1406****:role/aliyunrdsinstanceencryptiondefaultrole
AutoRenewstring

实例是否自动续费,仅在创建包年包月实例时传入,取值:展开详情

示例值:true
Categorystring

实例系列,取值:展开详情

示例值:HighAvailability
DedicatedHostGroupIdstring

专属集群主机组 ID。展开详情

示例值:dhg-4n****参考取值来源:
    DescribeDedicatedHostGroups
TargetDedicatedHostIdForMasterstring

专属集群中主实例的主机 ID。展开详情

示例值:i-bp****
TargetDedicatedHostIdForSlavestring

专属集群中备实例的主机 ID。展开详情

示例值:i-bp****
TargetDedicatedHostIdForLogstring

专属集群中日志实例的主机 ID。展开详情

示例值:i-bp****
DBParamGroupIdstring

参数模板 ID。可调用 DescribeParameterGroups 查询。展开详情

示例值:rpg-sys-****
DBTimeZonestring

设置实例的时区,仅在 EngineMySQLPostgreSQL 时生效。展开详情

示例值:+08:00
DBIsIgnoreCasestring

表名是否区分大小写,取值:展开详情

示例值:true
TargetMinorVersionstring

指定创建的 RDS 实例的内核小版本,仅在创建 MySQL 或 PostgreSQL 实例时需要传入。展开详情

示例值:rds_20200229参考取值来源:
    UpgradeDBInstanceKernelVersion
StorageAutoScalestring

存储空间自动扩容开关,仅 MySQL 和 PostgreSQL 支持,取值:展开详情

示例值:Disable枚举值:EnableDisable
StorageThresholdinteger<int32>

存储空间自动扩容触发阈值(百分比),取值:展开详情

示例值:50枚举值:1020304050
StorageUpperBoundinteger<int32>

存储空间自动扩容的总存储空间上限值,即自动扩容不会导致实例总存储空间超过该值。单位:GB。展开详情

示例值:2000取值 >= 0
DryRunboolean

是否对本次创建实例的操作执行预检查,取值:展开详情

示例值:false
UserBackupIdstring

用户备份 ID。可调用 ListUserBackupFiles 接口查询。传入该参数,可基于用户备份创建实例。展开详情

示例值:67798****
Amountinteger<int32>

指定需要创建的 RDS MySQL 实例数量。本参数仅适用于批量创建 RDS MySQL 实例。展开详情

示例值:2
CreateStrategystring

批量创建实例策略。本参数仅在 Amount 参数大于 1 时生效,取值:展开详情

示例值:Atomicity
Tagarray<object>

标签列表。

子级条数 <= 21
DeletionProtectionboolean

是否开启 RDS 释放保护功能,仅按量付费实例支持,取值:展开详情

示例值:true
BabelfishConfigstring

Babelfish for RDS PostgreSQL 配置信息。展开详情

示例值:{"babelfishEnabled":"true","migrationMode":"single-db","masterUsername":"babelfish_user","masterUserPassword":"Babelfish123!"}
ServerlessConfigobject

RDS Serverless 实例的相关设置。创建 Serverless 实例时必传。展开详情

ConnectionStringstring

数据库内网连接地址。

示例值:rm-uf6wjk5****.mysql.rds.aliyuncs.com参考取值来源:
    AllocateInstancePublicConnection
Portstring

支持在创建 RDS 实例时初始化端口。取值范围:展开详情

示例值:3306
BpeEnabledstring

弃用参数,无需配置。

示例值:0
BurstingEnabledboolean

通用云盘 IO 突发功能开关。展开详情

示例值:false
AutoPayboolean

是否自动支付。取值范围:展开详情

示例值:true
IoAccelerationEnabledstring

是否开启通用云盘 IO 加速功能,参数取值含义如下:展开详情

示例值:0
ColdDataEnabledboolean

通用云盘数据归档功能开关。展开详情

示例值:false
WhitelistTemplateListstring

白名单列表。展开详情

示例值:192.168.0.1,172.16.213.9
AutoCreateProxyboolean

是否自动创建代理。取值范围:展开详情

示例值:false
AutoUseCouponboolean

是否使用代金券,取值:展开详情

示例值:true
PromotionCodestring

优惠券 code。

示例值:aliwood-1688-mobile-promotion
OptimizedWritesstring

写优化功能开关,取值:展开详情

示例值:optimized枚举值:optimizednone

返回参数

字段名称字段详情
DryRunResultboolean

创建实例预检查是否通过。返回值:展开详情

示例值:true
TagResultboolean

实例是否成功绑定标签。返回值:展开详情

示例值:true
RequestIdstring

请求 ID。

示例值:1E43AAE0-BEE8-43DA-860D-EAF2AA0724DC
ConnectionStringstring

实例内网连接地址。

示例值:rm-uf6wjk5****.mysql.rds.aliyuncs.com
Messagestring

批量创建任务的提示信息。展开详情

示例值:Batch Create DBInstance Task Is In Process.
DBInstanceIdstring

实例 ID。若给 Amount 参数指定大于 1 的值, 将返回与该值对应的实例 ID 个数,以逗号分隔。展开详情

示例值:rm-uf6wjk5****
Portstring

实例内网连接地址对应端口号。

示例值:3306
TaskIdstring

批量创建任务的任务 ID。展开详情

示例值:s2365879-a9d0-55af-fgae-f2****
DryRunboolean

表示当前请求需要在创建实例前执行预检查。展开详情

示例值:true
OrderIdstring

订单 ID。

示例值:1007893702****

返回说明

说明 使用新版 SDK 包调用本接口时,由于 SDK 内部的客户端默认超时时间和服务端的不一致,因此可能返回请求超时的错误,但实际上接口已调用成功。如需避免这个问题,您可以在调用前设置 ReadTimeout 参数为 20000。 设置调用超时时间

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
Invalid.ParamGroupDBVersion
%s.%s诊断
400
InvalidInstanceLevel.DiskType
Specified instance level not support request disk 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.诊断
400
InvalidZoneId.NotSupported
The Specified vpc Zone not supported.诊断
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.诊断
400
InvalidEssdStorageSize
invalid cloud essd 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.诊断
400
IncompleteTaxInfo
Your tax information is incomplete. Complete your information before the operation.诊断
400
InvalidPaymentMethod.Incomplete
No payment method is specified for your account. We recommend that you add a payment method.诊断
400
InvalidPaymentMethod.Missing
No payment method is specified for your account. We recommend that you add a payment method.诊断
400
InsuffcientBalanceOrBankAccount
Add a payment method or add funds to the prepayment balance. Get started by creating an instance.诊断
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.诊断
400
InvalidPrivateIpAddress.AlreadyUsed
The specified IP is already 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.诊断
400
ZoneId.NotMatchWithCategory
The number of ZoneId specified does not match with category.诊断
400
InvalidSecurityIPList.Format
The specified parameter securityIPList is not valid.诊断
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.诊断
400
CreditPayInsufficientBalance
Insufficient credit pay limit. Please contact your channel partner to increase the limit.诊断
400
InvalidTagKey.Malformed
The Tag.N.Key parameter is empty.诊断
400
InvalidTagValue.Malformed
The Tag.N.Value parameter is empty.诊断
400
Duplicate.TagKey
The Tag.N.Key contains duplicate keys.诊断
400
NumberExceed.Tags
The maximum number of Tags is exceeded. The maximum is 20.诊断
400
MissingParameter.ResourceIds
The parameter ResourceIds.N must not be null.诊断
400
InvalidParameter.TagKey
The Tag.N.Key parameter is invalid.诊断
400
InvalidParameter.TagValue
The Tag.N.Value parameter is invalid.诊断
400
NoPermission.SystemTag
You have no permission to use system tags.诊断
400
InvalidParam.Amount
Amount is allowed from 1 to 20.诊断
400
InvalidParam.CreateStrategy
Only Atomicity and Partial are allowed.诊断
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.诊断
400
InvalidUsedTime
UsedTime can not Less than or equal to zero.诊断
400
Kms.Unauthorized
KMS has not been authorized.诊断
400
InvalidDBInstanceClass.Offline
The specified instance type is no longer provided. Please specify another instance type.诊断
400
SystemParamGroupCode.Format
Specific DBParamGroupId is not valid.诊断
400
InvalidDBInstanceName.Duplicate
Specified DB instance name already exists in the Aliyun RDS.诊断
400
ServiceLinkedRole.NotExist
Service linked role for RDS PostgreSQL not exist.诊断
400
CommodityServiceCalling.Exception
Failed to call commodity service.诊断
400
Commodity.InvalidComponent
The module you purchased is not legal, please buy it again.诊断
400
Pay.InsufficientBalance
Insufficient available balance.诊断
400
Price.CommoditySys
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.诊断
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.诊断
400
InvalidPrivateIpAddress.Format
The specified private IP address format is incorrect.诊断
400
InvalidPrivateIpAddress.Mismatch
Specified private IP address is not in the CIDR block of virtual switch.诊断
400
TooManyWhitelistTemplateIds
create dbinstance can support attach to up to 10 whitelist templates.诊断
400
UnsupportExtendDisk.NotSupport
Specified DB instance is unsupport extend disk.诊断
400
InvalidWhitelistTemplateId
the template id list is invalid.诊断
400
InvalidRequestId
The request is copy, check your token.诊断
400
InvalidParameter.MinCapacity
The specified parameter 'MinCapacity' is not valid.诊断
400
UnsupportedClassCode
The specified DB instance class stops selling.诊断
400
InvalidParameter.NotSupportDBInstanceStorageType
Parameter DBInstanceStorageType is invalid.诊断
400
InvalidParam.InstanceNetworkType
Creation of classic network instances is not supported.诊断
400
InvalidOrder.NotFound
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.诊断
400
Price.PricingPlanResultNotFound
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.诊断
400
InsufficientAvailableQuota
Your account quota 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.诊断
400
Order.PeriodInvalid
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.诊断
400
BasicInfoUncompleted
Your information is incomplete. Complete your information before the operation.诊断
400
Risk.RiskControlRejection
Your account is abnormal, please contact customer service for details.诊断
400
Api.NotSupport
Specified api is not supported.诊断
400
ContainForbiddenLabelError
There is a label that prohibits placing orders. Please contact your distributor for assistance.诊断
400
InvalidDBInstanceId.NotFound
The DBInstanceId provided does not exist in records.诊断
400
InvalidParam
Sepcified wal level Parameter is invalid. There are still logical slots in instance, so it can not be set as replica.诊断
400
System.SaleValidateFailed
Sales expression validation system error.诊断
400
Abs.InvalidAccount.NotFound
account is not found.诊断
400
SqlExecuteFailedOrTimeout
sql command execution failed or timed out:%s.诊断
400
ColdData.EngineVersionNotSupport
The current instance engine version not support coldDataEnabled.诊断
400
ColdData.MinorVersionNotSupport
The current instance minor version not support coldDataEnabled.诊断
400
IncorrectTargetClasscode
The current instance type does not support this operation.诊断
400
RequiredParam.NotFound
Required input param is not found.诊断
400
Parameters.Invalid
Parameter error, please check the parameters.诊断
400
BackupPolicyNotSupport
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.诊断
400
InvalidDBInstanceEngineType.Format
the DB instance engine type does not support this operation.诊断
400
Pay.NoCreditCard
No credit cards.诊断
400
VpcNetworkTypeNotSupport
The vpc network type instance does not support this operation.诊断
400
MirrorInsExists
Specified DB instance mirror ins already existed.诊断
400
InvalidBackupSet
The specified database does not exist in the backup set.诊断
400
OrdTCommodityQueryError
Failed to query for product.诊断
400
ProductInstanceReleased
The instance has been released. Please check before placing the order.诊断
400
IncorrectTargetCategory
Current target category does not support this operation.诊断
400
PurchaseDurationInsufficient
The purchase duration does not meet the requirements, please choose again.诊断
401
CannotDecreaseEssdPerfLevel
cannot decrease cloud essd performance level.诊断
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.诊断
403
CloudDiskEncryptionNotSupport
The encryption key is not allowed for general-purpose instance.诊断
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.诊断
403
OrderStatus.UnPaid
The specified db instance has unpaid order.诊断
403
InvalidReduceDiskSize
The storage capacity after the scale-down must be larger than the used amount.诊断
403
InvalidUserOperatorPermission
The user permission does not support this operation.诊断
403
OperationDenied.ZoneResource
There is no available zone for inventory.诊断
403
NotInFlowController
Sorry,no permission.诊断
403
InvalidKmsKey
Kms key is disabled.诊断
403
InvalidInstanceLevel.Malformed
Current DB instance level does not support this operation.诊断
403
IncorrectCharacterType
Current DB instance character type does not support this operation.诊断
404
InsufficientResourceCapacity
The target availability zone does not have sufficient resources.诊断
404
InvalidClusterKms
The current instance does not authorized to access the Key Management Service.诊断
404
Request.NotFound
The requested resource is not available.诊断
404
HostInfo.NotFound
The specified host info is not found.诊断
500
ExternalFailure
The request processing has failed due to external service failure.诊断
500
RequestMetaDataFailed
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.诊断

变更历史

变更时间变更内容概要操作
2025-03-31
变更错误码400
2025-01-02
变更错误码400
2024-12-03
新增请求参数OptimizedWrites
2024-11-19
新增请求参数AutoUseCoupon
新增请求参数PromotionCode
2024-10-31
变更错误码403
2024-10-24
变更错误码400
2024-09-24
变更请求参数Period
2024-08-29
变更错误码400

相关示例

云数据库创建RDS实例
2021-01-14