CreateDBInstance_云数据库 MongoDB 版_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.

接口说明

请确保在使用该接口前,已充分了解云数据库 MongoDB 产品的收费方式和价格

关于云数据库 MongoDB 实例的规格,请参见实例规格表

如需创建分片集群实例,您可以通过调用 CreateShardingDBInstance 接口进行创建。

流控信息

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

授权信息

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

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
dds:CreateDBInstance
Create
Instance
acs:dds:{#regionId}:{#accountId}:dbinstance/*

请求参数

字段名称字段详情
RegionIdstring

地域 ID,您可以通过调用 DescribeRegions 接口查询地域 ID。展开详情

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

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

示例值:ETnLKlblzczshOTUbOCz****
ZoneIdstring

可用区 ID,您可以通过调用 DescribeRegions 接口查询可用区 ID。

示例值:cn-hangzhou-g
EngineVersionstring

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

示例值:4.4枚举值:4.04.24.45.06.07.03.4参考取值来源:
    DescribeAvailableEngineVersion
DBInstanceClassstring

实例规格,您可以通过调用 DescribeAvailableResource 接口查询实例规格。

示例值:dds.mongo.standard参考取值来源:
    DescribeDBInstances
DBInstanceStorageinteger<int32>

实例存储空间,单位:GB。展开详情

示例值:10
DBInstanceDescriptionstring

实例名称,取值说明:展开详情

示例值:test
SecurityIPListstring

实例的 IP 白名单,多个 IP 地址请用英文逗号(,)分隔,不可重复。支持如下三种格式:展开详情

示例值:192.168.xx.xx,192.168.xx.xx
AccountPasswordstring

root 账号的密码,取值说明:展开详情

示例值:123456Aa
Periodinteger<int32>

实例的购买时长,单位为月。展开详情

示例值:1
ChargeTypestring

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

示例值:PrePaid枚举值:PrePaidPostPaid
NetworkTypestring

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

示例值:VPC枚举值:VPC
VpcIdstring

专有网络(VPC)ID。

示例值:vpc-bp175iuvg8nxqraf2****
VSwitchIdstring

虚拟交换机 ID。

示例值:vsw-bp1gzt31twhlo0sa5****
SrcDBInstanceIdstring

源实例 ID。展开详情

示例值:dds-bp1ee12ad351****
BackupIdstring

备份点 ID,您可以通过调用 DescribeBackups 接口查询备份点 ID。展开详情

示例值:32994****参考取值来源:
    CreateBackup
    DescribeBackups
RestoreTimestring

选择要恢复的时间点,您可以配置 7 天内的任意时间点。格式为yyyy-MM-ddTHH:mm:ssZ(UTC 时间)。展开详情

示例值:2022-03-13T12:11:14Z
BusinessInfostring

附加参数,业务信息。

示例值:{“ActivityId":"000000000"}
AutoRenewstring

实例是否自动续费,取值说明:展开详情

示例值:true
DatabaseNamesstring

数据库名。展开详情

示例值:mongodbtest
CouponNostring

是否使用优惠券,取值说明:展开详情

示例值:default
StorageEnginestring

实例的存储引擎,取值固定为 WiredTiger展开详情

示例值:WiredTiger枚举值:WiredTiger
ReplicationFactorstring

副本集实例的主备节点数,取值:展开详情

示例值:3
ReadonlyReplicasstring

副本集实例的只读节点数,取值范围:0~5(整数),默认值为 0

示例值:0
ResourceGroupIdstring

资源组 ID。

示例值:rg-acfmyiu4ekp****
ClusterIdstring

专属集群 ID。

示例值:dhg-2x78****
Enginestring

数据库引擎,固定取值:MongoDB

示例值:MongoDB枚举值:MongoDB
StorageTypestring

存储类型,取值说明:展开详情

示例值:cloud_essd1
SecondaryZoneIdstring

配置从节点(Secondary 节点)所在的可用区,实现多可用区部署。取值说明:展开详情

示例值:cn-hangzhou-h
HiddenZoneIdstring

配置隐藏节点(Hidden 节点)所在的可用区,实现多可用区部署。取值说明:展开详情

示例值:cn-hangzhou-i
Tagarray<object>

用户自定义标签。

子级条数 <= 21
GlobalSecurityGroupIdsstring

实例的全局 IP 白名单模板,多个 IP 白名单模板请用英文逗号(,)分隔,不可重复。(功能灰度中)

示例值:g-qxieqf40xjst1ngpr3jz 参考取值来源:
    DescribeGlobalSecurityIPGroup
    CreateGlobalSecurityIPGroup
    ModifyGlobalSecurityIPGroupName
Encryptedboolean

是否开启云盘加密

示例值:true
EncryptionKeystring

自定义密钥 ID。

示例值:2axxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx参考取值来源:
    DescribeDBInstanceEncryptionKey
ProvisionedIopsinteger<int64>

预配置性能(IOPS)。取值范围为 0~50000。

注意 该字段类型为 Long,在序列化/反序列化的过程中可能导致精度丢失,请注意数值不得大于 9007199254740991。
示例值:1960
RestoreTypestring

备份恢复实例。展开详情

示例值:0枚举值:0123
SrcRegionstring

源实例所在区域。展开详情

示例值:2

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

示例值:D8F1D721-6439-4257-A89C-F1E8E9C9****
DBInstanceIdstring

实例 ID。

示例值:dds-bp144a7f2db8****
OrderIdstring

订单 ID。

示例值:21077576248****

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
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.诊断
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.诊断
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.诊断
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.诊断

变更历史

变更时间变更内容概要操作
2024-12-17
变更请求参数EngineVersion
2024-07-15
变更错误码400
变更请求参数Engine
变更请求参数StorageEngine
2024-04-18
变更请求参数EngineVersion
2024-03-13
变更请求参数EngineVersion
2024-01-12
变更请求参数CouponNo
2023-11-03
变更请求参数NetworkType

相关示例

mongo云数据库 创建或克隆实例
2021-11-22