CreateDBInstance_云数据库 MongoDB 版_API文档

Plugin DownloadLearn more
VS Code Plugin
Before installing the plugin, please install VS CodeBefore installing the plugin, please install VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains Plugin
Before installing the plugin, please install JetBrains IDEBefore installing the plugin, please install JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

Operation Description

Make sure that you fully understand the billing methods and pricing of ApsaraDB for MongoDB before you call this operation.

For more information about the instance types of ApsaraDB for MongoDB instances, see Instance types.

To create sharded cluster instances, you can call the CreateShardingDBInstance operation.

Quotas Info

The current API request rate is 1000/60(s).View More quotas information, please go to Quota Management View

Authorization Information

The following table shows the authorization information corresponding to this API, which can be used in the Action policy element to grant a RAM user or RAM role the permissions to call the API. Please use RAM to set up these permissions and refer to RAM documentation for more instructions.

Description:View Details...

ActionsAccess levelResource typeCondition keyAssociated operation
dds:CreateDBInstance
Create
Instance
acs:dds:{#regionId}:{#accountId}:dbinstance/*
NoneNone

Request Parameters

Field NameField Details
RegionIdstring

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

Example:cn-hangzhouReference Value Source:
    DescribeRegions
ClientTokenstring

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

Example:ETnLKlblzczshOTUbOCz****
ZoneIdstring

The zone ID of the instance. You can call the DescribeRegions operation to query the most recent zone list.

Example:cn-hangzhou-g
EngineVersionstring

The version of the database engine. Valid values:View Details...

Example:4.4Enumeration Value:4.04.24.45.06.07.0Reference Value Source:
    DescribeAvailableEngineVersion
DBInstanceClassstring

The instance type. You can also call the DescribeAvailableResource operation to query the instance type.

Example:dds.mongo.standardReference Value Source:
    DescribeDBInstances
DBInstanceStorageinteger<int32>

The storage capacity of the instance. Unit: GB.View Details...

Example:10
DBInstanceDescriptionstring

The name of the instance. The name of the instance must meet the following requirements:View Details...

Example:test
SecurityIPListstring

The IP addresses in an IP address whitelist. Multiple IP addresses are separated by commas (,), and each IP address in the IP address whitelist must be unique. The following types of values are supported:View Details...

Example:192.168.xx.xx,192.168.xx.xx
AccountPasswordstring

The password of the root account. The password must meet the following requirements:View Details...

Example:123456Aa
Periodinteger<int32>

The subscription period of the instance. Unit: months.View Details...

Example:1
ChargeTypestring

The billing method of the instance. Valid values:View Details...

Example:PrePaidEnumeration Value:PrePaidPostPaid
NetworkTypestring

The network type of the instance. Valid value:View Details...

Example:VPCEnumeration Value:VPC
VpcIdstring

The ID of the VPC.

Example:vpc-bp175iuvg8nxqraf2****
VSwitchIdstring

The ID of the vSwitch to which the instance is connected.

Example:vsw-bp1gzt31twhlo0sa5****
SrcDBInstanceIdstring

The ID of the source instance.View Details...

Example:dds-bp1ee12ad351****
BackupIdstring

The ID of the backup set. You can call the DescribeBackups operation to query the backup set ID.View Details...

Example:32994****Reference Value Source:
    CreateBackup
    DescribeBackups
RestoreTimestring

The point in time to which the instance is restored, which must be within seven days. The time is displayed in the yyyy-MM-ddTHH:mm:ssZ format (UTC time).View Details...

Example:2022-03-13T12:11:14Z
BusinessInfostring

The business information. This is an additional parameter.

Example:{“ActivityId":"000000000"}
AutoRenewstring

Specifies whether to enable auto-renewal for the instance. Default value: false. Valid values:View Details...

Example:true
DatabaseNamesstring

The name of the database.View Details...

Example:mongodbtest
CouponNostring

Specifies whether to use coupons. Default value: null. Valid values:View Details...

Example:youhuiquan_promotion_option_id_for_blank
StorageEnginestring

The storage engine of the instance. Set the value to WiredTiger.View Details...

Example:WiredTigerEnumeration Value:WiredTiger
ReplicationFactorstring

The number of nodes in the replica set instance. Default value: 3. Valid values:View Details...

Example:3
ReadonlyReplicasstring

The number of read-only nodes in the replica set instance. Default value: 0. Valid values: 0 to 5.

Example:0
Enginestring

The database engine of the instance. Set the value to MongoDB.

Example:MongoDBEnumeration Value:MongoDB
StorageTypestring

The storage type of the instance. Valid values:View Details...

Example:cloud_essd1
SecondaryZoneIdstring

The zone where the secondary node resides for multi-zone deployment. Valid values:View Details...

Example:cn-hangzhou-h
HiddenZoneIdstring

The zone where the hidden node resides for multi-zone deployment. Valid values:View Details...

Example:cn-hangzhou-i
Tagarray<object>

The custom tags added to the instance.

Count of Children <= 21
GlobalSecurityGroupIdsstring

The global IP address whitelist template name of the instance. Multiple IP address whitelist template names are separated by commas (,) and each template name must be unique. (The template feature is available only in canary release.)

Example:g-qxieqf40xjst1ngp**** Reference Value Source:
    DescribeGlobalSecurityIPGroup
    CreateGlobalSecurityIPGroup
    ModifyGlobalSecurityIPGroupName
Encryptedboolean

Specifies whether to enable disk encryption.

Example:true
EncryptionKeystring

The ID of the custom key.

Example:2axxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxReference Value Source:
    DescribeDBInstanceEncryptionKey
ProvisionedIopsinteger<int64>

The provisioned IOPS. Valid values: 0 to 50000.

Notice The field type is Long, and the precision may be lost during serialization/deserialization. Please note that the value must not be greater than 9007199254740991.
Example:1960
RestoreTypestring

The backup restore type of the instance.View Details...

Example:0Enumeration Value:0123
SrcRegionstring

The region ID of the instance.View Details...

Example:2

Response Parameters

Field NameField Details
RequestIdstring

The ID of the request.

Example:D8F1D721-6439-4257-A89C-F1E8E9C9****
DBInstanceIdstring

The ID of the instance.

Example:dds-bp144a7f2db8****
OrderIdstring

The ID of the order.

Example:21077576248****

Sample Response

Error Codes

Global Error Codes
HTTP Status CodeError CodesError MessageActions
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.Diagnose
400
MissingParameter
Period is mandatory for this action.Diagnose
400
ORDER.ACCOUNT_INFORMATION_INCOMPLETE
Your information is incomplete. Complete your information before ordering.Diagnose
400
InvalidClientToken.Malformed
Specified parameter ClientToken is not valid.Diagnose
400
InvalidDBInstanceDescription.Malformed
Specified parameter DBInstanceDescription is not valid.Diagnose
400
InvalidSecurityIPListLength.Malformed
The quota of security ip exceeds.Diagnose
400
InsufficientBalance
Your account does not have enough balance.Diagnose
400
QuotaExceed.AfterpayInstance
Living afterpay instances quota exceeded.Diagnose
400
InvalidCapacity.NotFound
The Capacity provided does not exist in our records.Diagnose
400
ResourceNotAvailable
Resource you requested is not available for finance user.Diagnose
400
IdempotentParameterMismatch
Request uses a client token in a previous request but is not identical to that request.Diagnose
400
InvalidSecurityIPList.Malformed
The specified parameter "SecurityIPList" is not valid.Diagnose
400
InvalidSecurityIPList.Duplicate
The Security IP address is not in the available range or occupied.Diagnose
400
InvalidDBInstanceStorage.ValueNotSupported
The specified parameter DBInstanceStorage is not valid.Diagnose
400
InvalidAccountPassword.Malformed
Specified parameter AccountPassword is not valid.Diagnose
400
TokenServiceError
Duplicate ClientToken request.Diagnose
400
Zone.Closed
The specified zone is closed.Diagnose
400
PRICE.ORIGIN_PRICE_ERROR
The origin price error.Diagnose
400
NO_AVAILABLE_PAYMENT_METHOD
No payment method is specified for your account. We recommend that you add a payment method.Diagnose
400
InvalidEcsImage.NotFound
Specified ecs image does not exist.Diagnose
400
SaleValidateNoSpecificCodeFailed
Specified Storage or Version or InstanceClass is invalid.Diagnose
400
Trade_Not_Support_Async_Pay
Trade not support async pay.Diagnose
400
InvalidZoneld
The specified primary zone, secondary zone and hidden zone cannot be the same.Diagnose
400
SameZoneId
The specified primary zone, secondary zone require two different zones.Diagnose
403
RealNameAuthenticationError
Your account has not passed the real-name authentication yet.Diagnose
403
RegionUnauthorized
There is no authority to create instance in the specified region.Diagnose
403
OperationDenied
The resource is out of usage.Diagnose
403
InvalidEngineVersionInRegion.NotAvailable
The EngineVersion in the Region is not available.Diagnose
403
InvalidBackupLogStatus
Current backup log enable status does not support this operation.Diagnose
403
IncorrectBackupSetState
Current backup set state does not support operations.Diagnose
404
InvalidBackup.NotFound
The available backup does not exist in recovery time.Diagnose

Change History

Change timeChange content summaryoperation
2024-12-17
changeRequest parameter EngineVersion
2024-07-15
changeError code 400
changeRequest parameter Engine
changeRequest parameter StorageEngine
2024-04-18
changeRequest parameter EngineVersion
2024-03-13
changeRequest parameter EngineVersion
2024-01-12
changeRequest parameter CouponNo
2023-11-03
changeRequest parameter NetworkType

Examples