Creates or clones an ApsaraDB for MongoDB replica set instance.
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.
Authorization information
The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action
Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:
- 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 keyword: refers to the condition keyword defined by the cloud product itself.
- 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.
Operate | Access level | Resource type | Condition keyword | Association operation |
---|---|---|---|---|
dds:CreateDBInstance | WRITE |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. NoteIf you call this operation to clone an instance or restore an instance from the recycle bin, set the value to the engine of the source instance. | cn-hangzhou |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the generated token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. | ETnLKlblzczshOTUbOCz**** |
ZoneId | string | No | The zone ID of the instance. You can call the DescribeRegions operation to query the most recent zone list. | cn-hangzhou-g |
Engine | string | Yes | The database engine of the instance. Set the value to MongoDB. | MongoDB |
EngineVersion | string | Yes | The database engine version of the instance.
NoteIf you call this operation to clone an instance or restore an instance from the recycle bin, set the value to the engine of the source instance. | 4.4 |
DBInstanceClass | string | Yes | The instance type. You can also call the DescribeAvailableResource operation to view instance types. | dds.mongo.standard |
DBInstanceStorage | integer | Yes | The storage capacity of the instance. Unit: GB. The values that can be specified for this parameter are subject to the instance types. For more information, see Replica set instance types. | 10 |
DBInstanceDescription | string | No | The name of the instance. Valid values:
| test |
SecurityIPList | string | No | The IP addresses in an IP address whitelist. Separate multiple IP addresses with commas (,). Each IP address in the IP address whitelist must be unique. The following types of IP addresses are supported:
Note
| 192.168.xx.xx,192.168.xx.xx |
AccountPassword | string | No | The password of the root account. The password must meet the following requirements:
| 123456Aa |
ChargeType | string | No | The billing method of the instance. Valid values:
NoteIf you specify this parameter to PrePaid, you must also specify the Period parameter. | PrePaid |
Period | integer | No | The subscription period of the instance. Unit: months. Valid values: 1 to 9, 12, 24, 36, and 60. NoteIf you specify the ChargeType parameter to PrePaid, this parameter is valid and required. | 1 |
NetworkType | string | No | The network type of the instance. Valid values: VPC | VPC |
VpcId | string | Yes | The VPC ID of the instance. | vpc-bp175iuvg8nxqraf2**** |
VSwitchId | string | Yes | The vSwitch ID of the instance. | vsw-bp1gzt31twhlo0sa5**** |
SrcDBInstanceId | string | No | The ID of the source instance. NoteThis parameter can only be specified when this operation is called to clone instances. You must also specify the BackupId parameter or RestoreTime parameter. If you call this operation to restore an instance from the recycle bin, only this parameter is required. The BackupId and RestoreTime parameters are not required. | dds-bp1ee12ad351**** |
BackupId | string | No | The ID of the backup set. You can call the DescribeBackups operation to query the backup set ID. NoteThis parameter is required only when you call this operation to clone an instance. If you specify this parameter, you must also specify the SrcDBInstanceId parameter. | 32994**** |
RestoreTime | string | No | The point in time to clone the instance, which must be within seven days. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. NoteThis parameter is required only when you call this operation to clone an instance. If you specify this parameter, you must also specify the SrcDBInstanceId parameter. | 2022-03-13T12:11:14Z |
BusinessInfo | string | No | The business information. This is an additional parameter. | {“ActivityId":"000000000"} |
AutoRenew | string | No | Specifies whether to enable auto-renewal for the instance. Default value: false. Valid values:
NoteIf you set the ChargeType parameter to PrePaid, this parameter is valid and optional. | true |
DatabaseNames | string | No | The name of the database. NoteWhen you call this operation to clone an instance, you can set the databases that are specified by this parameter for cloning. Otherwise, all databases of the instance are cloned. | mongodbtest |
CouponNo | string | No | The coupon code. Default value: | youhuiquan_promotion_option_id_for_blank |
StorageEngine | string | No | The storage engine used by the instance. Set the value to WiredTiger. Note
| WiredTiger |
ReplicationFactor | string | No | The number of nodes in the replica set instance. Default value: 3. Valid values:
| 3 |
ReadonlyReplicas | string | No | The number of read-only nodes in the replica set instance. Default value: 0. Valid values: 0 to 5. | 0 |
ResourceGroupId | string | No | The ID of the resource group to which the instances you want to query belong. | rg-acfmyiu4ekp**** |
ClusterId | string | No | The ID of the dedicated cluster to which the instance belongs. | dhg-2x78**** |
StorageType | string | No | The storage type of the instance. Valid values:
| cloud_essd1 |
SecondaryZoneId | string | No | The zone where the secondary node is deployed for multi-zone deployment. Valid values:
Note
| cn-hangzhou-h |
HiddenZoneId | string | No | The zone where the hidden node is deployed for multi-zone deployment. Valid values:
Note
| cn-hangzhou-i |
Response parameters
Example
Normal return example
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 API error center.