本文中含有需要您注意的重要提示信息,忽略该信息可能对您的业务造成影响,请务必仔细阅读。
创建或克隆云数据库MongoDB版副本集实例。
接口说明
请确保在使用该接口前,已充分了解云数据库 MongoDB 产品的收费方式和价格。
关于云数据库 MongoDB 实例的规格,请参见实例规格表。
如需创建分片集群实例,您可以通过调用 CreateShardingDBInstance 接口进行创建。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
dds:CreateDBInstance |
create |
*Instance
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
RegionId |
string |
是 |
地域 ID,您可以通过调用 DescribeRegions 接口查询地域 ID。 说明
调用本接口克隆实例或者回收站恢复实例时,该参数值需和源实例保持一致。 |
cn-hangzhou |
ClientToken |
string |
否 |
用于保证请求的幂等性,防止重复提交请求。由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过 64 个 ASCII 字符,且该参数值中不能包含非 ASCII 字符。 |
ETnLKlblzczshOTUbOCz**** |
ZoneId |
string |
否 |
可用区 ID,您可以通过调用 DescribeRegions 接口查询可用区 ID。 |
cn-hangzhou-g |
EngineVersion |
string |
是 |
数据库版本号,取值:
说明
调用本接口克隆实例或者回收站恢复实例时,该参数值需和源实例保持一致。 警告
3.4 及以下版本已停售。 |
4.4 |
DBInstanceClass |
string |
是 |
实例规格,您可以通过调用 DescribeAvailableResource 接口查询实例规格。 |
dds.mongo.standard |
DBInstanceStorage |
integer |
是 |
实例存储空间,单位:GB。 具体取值受实例规格约束,详情请参见副本集实例规格表。 |
10 |
DBInstanceDescription |
string |
否 |
实例名称,取值说明:
|
test |
SecurityIPList |
string |
否 |
实例的 IP 白名单,多个 IP 地址请用英文逗号(,)分隔,不可重复。支持如下三种格式:
说明
|
192.168.xx.xx,192.168.xx.xx |
AccountPassword |
string |
否 |
root 账号的密码,取值说明:
说明
关于特殊字符导致数据库连接失败的问题请参见如何解决连接串中账号密码包含特殊字符导致连接失败的问题?。 |
123456Aa |
Period |
integer |
否 |
实例的购买时长,单位为月。 取值范围:1~9(整数)、12、24、36、60。 说明
当 ChargeType 参数值为 PrePaid 时,该参数可用且为必填参数。 |
1 |
ChargeType |
string |
否 |
实例的付费类型,取值说明:
说明
当该参数的值为 PrePaid 时,您还需要配置 Period 参数。 |
PrePaid |
NetworkType |
string |
否 |
实例的网络类型,取值说明: VPC:专有网络。 |
VPC |
VpcId |
string |
否 |
专有网络(VPC)ID。 |
vpc-bp175iuvg8nxqraf2**** |
VSwitchId |
string |
否 |
虚拟交换机 ID。 |
vsw-bp1gzt31twhlo0sa5**** |
SrcDBInstanceId |
string |
否 |
源实例 ID。 说明
调用本接口克隆实例时,您需要配置该参数,同时还需要配置 BackupId 或 RestoreTime 参数。调用本接口进行回收站恢复时,只需要传入该参数,无需配置 BackupId 或 RestoreTime。 |
dds-bp1ee12ad351**** |
BackupId |
string |
否 |
备份点 ID,您可以通过调用 DescribeBackups 接口查询备份点 ID。 说明
只有调用本接口按备份点克隆实例时,您需要配置该参数,同时还需要配置 SrcDBInstanceId 参数。 |
32994**** |
RestoreTime |
string |
否 |
选择要恢复的时间点,您可以配置 7 天内的任意时间点。格式为yyyy-MM-ddTHH:mm:ssZ(UTC 时间)。 说明
只有调用本接口按时间点克隆实例时,您需要配置该参数,同时还需要配置 SrcDBInstanceId 参数。 |
2022-03-13T12:11:14Z |
BusinessInfo |
string |
否 |
附加参数,业务信息。 |
{“ActivityId":"000000000"} |
AutoRenew |
string |
否 |
实例是否自动续费,取值说明:
说明
当 ChargeType 参数值为 PrePaid 时,该参数可用且为可选参数。 |
true |
DatabaseNames |
string |
否 |
数据库名。 说明
调用本接口克隆实例时,您可以通过配置该参数指定需要克隆的数据库,如果不配置该参数,则克隆实例的所有数据库。 |
mongodbtest |
CouponNo |
string |
否 |
是否使用优惠券,取值说明:
|
default |
StorageEngine |
string |
否 |
实例的存储引擎,取值固定为 WiredTiger。 说明
|
WiredTiger |
ReplicationFactor |
string |
否 |
副本集实例的主备节点数,取值:
重要
单节点实例可不传该参数 |
3 |
ReadonlyReplicas |
string |
否 |
副本集实例的只读节点数,取值范围:0~5(整数),默认值为 0。 |
0 |
ResourceGroupId |
string |
否 |
资源组 ID。 |
rg-acfmyiu4ekp**** |
ClusterId |
string |
否 |
专属集群 ID。 |
dhg-2x78**** |
Engine |
string |
否 |
数据库引擎,固定取值:MongoDB。 |
MongoDB |
StorageType |
string |
否 |
存储类型,取值说明:
说明
|
cloud_essd1 |
SecondaryZoneId |
string |
否 |
配置从节点(Secondary 节点)所在的可用区,实现多可用区部署。取值说明:
说明
|
cn-hangzhou-h |
HiddenZoneId |
string |
否 |
配置隐藏节点(Hidden 节点)所在的可用区,实现多可用区部署。取值说明:
说明
|
cn-hangzhou-i |
Tag |
array<object> |
否 |
用户自定义标签。 |
|
object |
否 |
|||
Key |
string |
否 |
标签的键。 说明
|
testdatabase |
Value |
string |
否 |
标签的值。 说明
N 表示传入第几个标签的值。例如:Tag.1.Value表示传入第一个标签的值;Tag.2.Value表示传入第二个标签的值。 |
apitest |
GlobalSecurityGroupIds |
string |
否 |
实例的全局 IP 白名单模板,多个 IP 白名单模板请用英文逗号(,)分隔,不可重复。(功能灰度中) |
g-qxieqf40xjst1ngpr3jz |
Encrypted |
boolean |
否 |
是否开启云盘加密 |
true |
EncryptionKey |
string |
否 |
自定义密钥 ID。 |
2axxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
ProvisionedIops |
integer |
否 |
预配置性能(IOPS)。取值范围为 0~50000。 |
1960 |
RestoreType |
string |
否 |
备份恢复实例。
|
0 |
SrcRegion |
string |
否 |
源实例所在区域。 说明
|
2 |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
|||
RequestId |
string |
请求 ID。 |
D8F1D721-6439-4257-A89C-F1E8E9C9**** |
DBInstanceId |
string |
实例 ID。 |
dds-bp144a7f2db8**** |
OrderId |
string |
订单 ID。 |
21077576248**** |
示例
正常返回示例
JSON
格式
{
"RequestId": "D8F1D721-6439-4257-A89C-F1E8E9C9****",
"DBInstanceId": "dds-bp144a7f2db8****",
"OrderId": "21077576248****"
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | SecurityRisk.AuthVerification | we have detected a risk with your default payment method. An email and notification has been sent to you. Please re-submit your order before after verificaiton. | |
400 | MissingParameter | Period is mandatory for this action. | |
400 | ORDER.ACCOUNT_INFORMATION_INCOMPLETE | Your information is incomplete. Complete your information before ordering. | |
400 | InvalidClientToken.Malformed | Specified parameter ClientToken is not valid. | |
400 | InvalidDBInstanceDescription.Malformed | Specified parameter DBInstanceDescription is not valid. | 节点名称不合法 |
400 | InvalidSecurityIPListLength.Malformed | The quota of security ip exceeds. | |
400 | InsufficientBalance | Your account does not have enough balance. | |
400 | QuotaExceed.AfterpayInstance | Living afterpay instances quota exceeded. | |
400 | InvalidCapacity.NotFound | The Capacity provided does not exist in our records. | |
400 | ResourceNotAvailable | Resource you requested is not available for finance user. | |
400 | IdempotentParameterMismatch | Request uses a client token in a previous request but is not identical to that request. | |
400 | InvalidSecurityIPList.Malformed | The specified parameter "SecurityIPList" is not valid. | |
400 | InvalidSecurityIPList.Duplicate | The Security IP address is not in the available range or occupied. | |
400 | InvalidDBInstanceStorage.ValueNotSupported | The specified parameter DBInstanceStorage is not valid. | |
400 | InvalidAccountPassword.Malformed | Specified parameter AccountPassword is not valid. | |
400 | TokenServiceError | Duplicate ClientToken request. | |
400 | Zone.Closed | The specified zone is closed. | |
400 | PRICE.ORIGIN_PRICE_ERROR | The origin price error. | |
400 | NO_AVAILABLE_PAYMENT_METHOD | No payment method is specified for your account. We recommend that you add a payment method. | |
400 | InvalidEcsImage.NotFound | Specified ecs image does not exist. | |
400 | SaleValidateNoSpecificCodeFailed | Specified Storage or Version or InstanceClass is invalid. | Storage 或 Version 或 InstanceClass 为空。 |
400 | Trade_Not_Support_Async_Pay | Trade not support async pay. | |
400 | InvalidZoneld | The specified primary zone, secondary zone and hidden zone cannot be the same. | 选择的主可用区、备可用区1和备可用区2参数不能完全相同。 |
400 | SameZoneId | The specified primary zone, secondary zone require two different zones. | 选择的主可用区、备可用区参数要求不同。 |
403 | RealNameAuthenticationError | Your account has not passed the real-name authentication yet. | |
403 | RegionUnauthorized | There is no authority to create instance in the specified region. | |
403 | OperationDenied | The resource is out of usage. | The resource is out of usage. |
403 | InvalidEngineVersionInRegion.NotAvailable | The EngineVersion in the Region is not available. | |
403 | InvalidBackupLogStatus | Current backup log enable status does not support this operation. | |
403 | IncorrectBackupSetState | Current backup set state does not support operations. | |
404 | InvalidBackup.NotFound | The available backup does not exist in recovery time. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。