Modifies the specifications or storage space of an ApsaraDB for MongoDB standalone instance, replica set instance, or serverless instance which is only available on China site (

Before you call this operation, make sure that you understand the billing methods and pricing.

This operation applies only to standalone and replica set instances. To modify the specifications of sharded cluster instances, you can call the ModifyNodeSpec, CreateNode, DeleteNode, or ModifyNodeSpecBatch operation.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyDBInstanceSpec

The operation that you want to perform. Set the value to ModifyDBInstanceSpec.

RegionId String No cn-hangzhou

The region ID of the instance. You can call the DescribeDBInstanceAttribute operation to query the region ID of the instance.

DBInstanceId String Yes dds-bp1ea17b41ab****

The ID of the instance.

DBInstanceClass String No dds.sn4.xlarge.1

The instance type. For more information, see Instance types. You can also call the DescribeAvailableResource operation to view instance types.

Note You must specify at least one of the DBInstanceClass and DBInstanceStorage parameters.
DBInstanceStorage String No 50

The storage capacity of the instance. Valid values: 10 to 3000. The value must be a multiple of 10. Unit: GB. The values that can be specified for this parameter are subject to the instance types. For more information, see Instance types.

  • You must specify at least one of the DBInstanceStorage and DBInstanceClass parameters.
  • Storage capacity can be scaled down only on subscription replica set instances. The new storage capacity you specify must be greater than the used storage space.
OrderType String No UPGRADE

The type of configuration changes. Valid values:


Default value: DOWNGRADE.

Note This parameter can be configured only when the billing method of the instance is subscription.
AutoPay Boolean No true

Specifies whether to enable automatic payment for the instance. Valid values:

  • true: enables automatic payment. Make sure that you have sufficient balance within your account.
  • false: disables automatic payment. You can perform the following operations to pay for the instance: Log on to the ApsaraDB for MongoDB console. In the upper-right corner of the page, click Expenses to go to the Billing Management console. In the left-side navigation pane, click Orders. On the Orders page, find the order and complete the payment.

    Default value: true.

BusinessInfo String No {“ActivityId":"000000000"}

The business information.

ReplicationFactor String No 3

The number of nodes in the instance.

  • Valid values for replica set instances: 3, 5, and 7
  • Valid values for standalone instances: 1
Note This parameter is not required for a serverless instance which is only available on China site (
ReadonlyReplicas String No 1

The number of read-only nodes. Valid values: 1 to 5.

CouponNo String No youhuiquan_promotion_option_id_for_blank

The coupon code. Default value: youhuiquan_promotion_option_id_for_blank.

EffectiveTime String No Immediately

The time when the changed configurations take effect. Valid values:

  • Immediately: The configurations immediately take effect.
  • MaintainTime: The configurations take effect during the maintenance window of the instance.

Default value: Immediately.

Response parameters

Parameter Type Example Description
RequestId String 1E9F1104-19E7-59F0-AB7F-F4EBFDEA****

The ID of the request.

OrderId String 21012408824****

The ID of the order.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "1E9F1104-19E7-59F0-AB7F-F4EBFDEA****",
  "OrderId" : "21012408824****"

Error codes

For a list of error codes, visit the API Error Center.