CreateDBInstance
Operation Description
Creates or clones an ApsaraDB for MongoDB replica set instance.
debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dds:CreateDBInstance | WRITE |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The database engine of the instance. The value is fixed as MongoDB. | cn-hangzhou |
ClientToken | string | No | The version of the database engine. Valid values:
Note
When you call this operation to clone an instance or restore an instance from the recycle bin, set the value of this parameter to the engine version of the source instance.
| ETnLKlblzczshOTUbOCz**** |
ZoneId | string | No | The instance type. You can also call the DescribeAvailableResource operation to query the instance type. | cn-hangzhou-g |
Engine | string | Yes | The storage capacity of the instance. Unit: GB. The values that can be specified for this parameter vary based on the instance types. For more information, see Replica set instance types. Enumeration Value:
| MongoDB |
EngineVersion | string | Yes | The name of the instance. The name of the instance must meet the following requirements:
Enumeration Value:
| 4.4 |
DBInstanceClass | string | Yes | 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:
Note
| dds.mongo.standard |
DBInstanceStorage | integer | Yes | The password of the root account. The password must meet the following requirements:
| 10 |
DBInstanceDescription | string | No | The billing method of the instance. Valid values:
Note
If you set this parameter to PrePaid, you must also specify the Period parameter.
| test |
SecurityIPList | string | No | The subscription period of the instance. Unit: months. Valid values: 1 to 9, 12, 24, 36, and 60. Note
When you set the ChargeType parameter to PrePaid, this parameter is valid and required.
| 192.168.xx.xx,192.168.xx.xx |
AccountPassword | string | No | The network type of the instance. Set the value to VPC. | 123456Aa |
ChargeType | string | No | The ID of the VPC. Enumeration Value:
| PrePaid |
Period | integer | No | The ID of the vSwitch to which the instance is connected. | 1 |
NetworkType | string | No | The ID of the source instance. Note
When you call this operation to clone an instance, this parameter is required. The BackupId or RestoreTime parameter is also required. When you call this operation to restore an instance from the recycle bin, this parameter is required. The BackupId or RestoreTime parameter is not required.
Enumeration Value:
| VPC |
VpcId | string | Yes | The ID of the backup set. You can call the DescribeBackups operation to query the backup set ID. Note
When you call this operation to clone an instance based on the backup set, this parameter is required. The SrcDBInstanceId parameter is also required.
| vpc-bp175iuvg8nxqraf2**** |
VSwitchId | string | Yes | 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). Note
When you call this operation to restore an instance to the specified time, this parameter is required. The SrcDBInstanceId parameter is also required.
| vsw-bp1gzt31twhlo0sa5**** |
SrcDBInstanceId | string | No | The business information. This is an additional parameter. | dds-bp1ee12ad351**** |
BackupId | string | No | Specifies whether to enable auto-renewal for the instance. Default value: false. Valid values:
Note
This parameter is valid and optional when the ChargeType parameter is set to PrePaid.
| 32994**** |
RestoreTime | string | No | The name of the database. Note
When you call this operation to clone an instance, you can set this parameter to specify the database to clone. Otherwise, all databases of the instance are cloned.
| 2022-03-13T12:11:14Z |
BusinessInfo | string | No | The coupon code. Default value: | {“ActivityId":"000000000"} |
AutoRenew | string | No | The storage engine of the instance. Default value: WiredTiger. Valid values:
Note
| true |
DatabaseNames | string | No | The number of nodes in the replica set instance. Default value: 3. Valid values:
| mongodbtest |
CouponNo | string | No | The number of read-only nodes in the replica set instance. Default value: 0. Valid values: 0 to 5. | youhuiquan_promotion_option_id_for_blank |
StorageEngine | string | No | The ID of the resource group to which the instance belongs. Enumeration Value:
| WiredTiger |
ReplicationFactor | string | No | The ID of the dedicated cluster to which the instance belongs. | 3 |
ReadonlyReplicas | string | No | The storage type of the instance. Valid values:
| 0 |
ResourceGroupId | string | No | The zone where the secondary node resides for multi-zone deployment. Valid values:
Note
| rg-acfmyiu4ekp**** |
ClusterId | string | No | cn | dhg-2x78**** |
StorageType | string | No | The zone where the hidden node resides for multi-zone deployment. Valid values:
Note
| cloud_essd1 |
SecondaryZoneId | string | No | cn | cn-hangzhou-h |
HiddenZoneId | string | No | Template for global IP whitelist of the instance, multiple IP whitelist templates should be separated by a comma (,) in English and cannot be repeated. (In function gray scale). | cn-hangzhou-i |
GlobalSecurityGroupIds | string | No | The ID of the request. | g-qxieqf40xjst1ngpr3jz |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "D8F1D721-6439-4257-A89C-F1E8E9C9****",
"DBInstanceId": "dds-bp144a7f2db8****",
"OrderId": "21077576248****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
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. | Invalid node name. |
400 | InvalidSecurityIPListLength.Malformed | The quota of security ip exceeds. | - |
400 | InsufficientBalance | Your account does not have enough balance. | The payment failed. Please add another payment method. You can also top up or add funds to your account. |
400 | QuotaExceed.AfterpayInstance | Living afterpay instances quota exceeded. | - |
400 | InvalidCapacity.NotFound | The Capacity provided does not exist in our records. | The specified storage capacity is invalid. Specify a storage capacity within a valid range. Unit: MB. |
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. | The specified ClientToken parameter is already in use. Specify a client token that has not been used. The ClientToken value is generated by the client and must be unique among different requests. The value can be up to 64 ASCII characters in length and cannot contain non-ASCII characters. |
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 | InvalidSecurityIPListLength.Malformed | The quota of security ip exceeds. | - |
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. | - |
403 | RealNameAuthenticationError | Your account has not passed the real-name authentication yet. | Real-name verification has not been completed for the Alibaba Cloud account. Complete real-name verification and try again. |
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. | The latest backup set is not ready. Please try again later. |
404 | InvalidBackup.NotFound | The available backup does not exist in recovery time. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-11-03 | The error codes of the API operation change. | see changesets | ||||||||||||||
| ||||||||||||||||
2023-08-24 | The error codes of the API operation change.,The input parameters of the API operation change. | see changesets | ||||||||||||||
| ||||||||||||||||
2023-08-01 | The error codes of the API operation change.,The input parameters of the API operation change. | see changesets | ||||||||||||||
| ||||||||||||||||
2023-06-05 | The error codes of the API operation change.,The input parameters of the API operation change. | see changesets | ||||||||||||||
|