Changes the instance type or storage space for ApsaraDB for MongoDB standalone, replica set, or serverless instances. Serverless instances are exclusive to the Alibaba Cloud China website.
Operation description
Before calling this operation, make sure you understand the billing method and pricing of ApsaraDB for MongoDB.
This operation applies only to ApsaraDB for MongoDB standalone instances and replica set instances. To change the configuration of a sharded cluster instance, call the ModifyNodeSpec, CreateNode, DeleteNode, or ModifyNodeSpecBatch operations.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:ModifyDBInstanceSpec |
update |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBInstanceId |
string |
Yes |
The instance ID. |
dds-bp1ea17b41ab**** |
| DBInstanceClass |
string |
No |
The instance type. For more information, see Instance types. You can also call the DescribeAvailableResource operation to query instance types.
Note
You must configure one of the DBInstanceStorage and DBInstanceClass parameters. |
dds.sn4.xlarge.1 |
| DBInstanceStorage |
string |
No |
The storage capacity of the instance. The value must be an integer that is greater than or equal to 10. The value increases in increments of 10. Unit: GB. The values that can be specified for this parameter are subject to the instance type. For more information, see Instance types. Note
|
50 |
| OrderType |
string |
No |
The specification change type. Valid values:
Note
This parameter is available only for subscription instances. |
UPGRADE |
| AutoPay |
boolean |
No |
Specifies whether to enable automatic payment for the instance. Valid values:
|
true |
| BusinessInfo |
string |
No |
The business information. |
{“ActivityId":"000000000"} |
| ReplicationFactor |
string |
No |
The number of nodes in the instance. Default value: 3.
Note
This parameter is not required for serverless instances (available only in the China site). |
3 |
| ReadonlyReplicas |
string |
No |
The number of read-only nodes. Valid values: 0 to 5. If the network type of the instance is set to only classic network and VPC, you need to enable public access or release the classic network endpoint before you can change the number of read-only nodes. Note
You can log on to the ApsaraDB for MongoDB console and go to the Database Connections page to view the network types that have been enabled. |
1 |
| CouponNo |
string |
No |
Specifies whether to use a coupon. Valid values:
|
default |
| EffectiveTime |
string |
No |
The effective time of the configuration change. Valid values:
|
Immediately |
| ExtraParam |
string |
No |
Additional parameters. Valid values:
Valid values:
|
async |
| TargetZoneId |
string |
No |
The destination zone to which you want to migrate the instance when you change the specifications and migrate the instance across zones. Important This parameter applies only to cloud disk instances. Important The value of this parameter cannot be the same as the value of the TargetSecondaryZoneId or TargetHiddenZoneId parameter. Note
|
cn-hangzhou-j |
| TargetSecondaryZoneId |
string |
No |
The destination secondary zone for the secondary node when you change the specifications and migrate the instance across zones. Important This parameter applies only to cloud disk instances. Important The value of this parameter cannot be the same as the value of the TargetZoneId or TargetHiddenZoneId parameter. Note
|
cn-hangzhou-h |
| TargetHiddenZoneId |
string |
No |
The destination zone for the hidden node when you change the specifications and migrate the instance across zones. Important This parameter applies only to cloud disk instances. Important The value of this parameter cannot be the same as the value of the TargetZoneId or TargetSecondaryZoneId parameter. Note
|
cn-hangzhou-i |
| TargetVswitchId |
string |
No |
The destination vSwitch ID when you change the specifications and migrate the instance across zones. Important This parameter applies only to cloud disk instances. Note
|
vsw-bp1buy0h9myt5i9e7**** |
| SearchNodeClass |
string |
No |
The specifications of the Search node to be changed. |
mdb.shard.2x.xlarge.d |
| SearchNodeStorage |
integer |
No |
The capacity of the Search node to be changed. |
20 |
| SearchNodeCount |
integer |
No |
The number of Search nodes to be changed. |
2 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
1E9F1104-19E7-59F0-AB7F-F4EBFDEA**** |
| OrderId |
string |
The order ID. |
21012408824**** |
Examples
Success response
JSON format
{
"RequestId": "1E9F1104-19E7-59F0-AB7F-F4EBFDEA****",
"OrderId": "21012408824****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter | The input parameters DBInstanceClass and DBInstanceStorage all blank or no change. | |
| 400 | InvalidDBInstanceClass.ValueNotSupported | The specified parameter DBInstanceClass is not valid. | |
| 400 | InvalidDBInstanceStorage.ValueNotSupported | The specified parameter DBInstanceStorage is not valid. | |
| 400 | LX_REQUEST_TOKEN_CONFLICT | The request token is conflict. | |
| 400 | TradeConfirmPayError | BIZ_ERROR - degrade refund error | |
| 400 | PRICE.ORIGIN_PRICE_ERROR | Origin lingxiao price request error. | |
| 400 | ErrorInsufficientResource | There is not enough resource for your operation, requestId: %s. | There is not enough resource for your operation, requestId: %s. |
| 403 | OperationDenied | The resource is out of usage. | |
| 403 | InvaildDBInstanceClassInRegion.NotAvailable | The DBInstanceClass in the Region is not available. | |
| 404 | InvalidDBInstanceId.NotFound | The DBInstanceId provided does not exist in our records. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.