You can call this operation to modify the specification or storage space of ApsaraDB for MongoDB replica set instances.

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

This operation is only applicable to standalone and replica set instances. You can call the ModifyNodeSpec,CreateNode or DeleteNode operations to modify the configurations of sharded cluster instances.


OpenAPI Explorer simplifies API usage. You can use OpenAPI Explorer to perform debugging operations, such as retrieve APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Name Type Required Example Description
DBInstanceId String Yes dds-bpxxxxxxxx

The ID of the instance.

Action String No ModifyDBInstanceSpec

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

DBInstanceClass String No dds.mongo.standard

The specification of the instance. For more information, see Instance specifications.

Note You must specify either this parameter or the DBInstanceStorage parameter.
DBInstanceStorage String No 50

The storage space of the instance.

  • Valid values: 10-3000 GB. The values that can be specified for this parameter are dependent on the instance specification. For more information, see instance specifications.
  • You can only specify this value in 10 GB increments.
  • You must specify either this parameter or the DBInstanceStorage parameter.
  • Storage space can be scaled down only on replica set instances whose billing method is Subscription. The storage space you scale down must be greater than the used storage space.
OrderType String No UPGRADE

The type of configuration changes performed. Valid values:

  • UPGRADE: The specifications are upgraded.
  • DOWNGRADE: The specifications are downgraded. This is the default value.
Note This parameter is only applicable to instances whose billing method is Subscription.
AutoPay Boolean No true

Indicates whether automatic payment is enabled for the instance. Valid values:

  • true: Automatic payment is enabled. Make sure that your account has sufficient balance.
  • false: Automatic payment is not enabled. You must make payments in the console. Payment instructions: Log on to the console. In the upper-right corner, click Billing Management and select Billing Management from the drop-down list. The Billing Management page appears. In the left-side navigation pane, click Bills. On the Unpaid tab, click Make a Payment in the Actions column corresponding to the bill you want to pay.

Default value: true.

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

The business information.

ReplicationFactor String No 3

The number of nodes in the instance. Valid values:

  • Replica Set instance 3,5, and 7.
  • The value for a single-node instance is fixed as 1.
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 modified configuration values take effect. Valid values:

  • Immediately: The configurations take effect immediately.
  • MaintainTime: The instance will be migrated during the maintenance period of the instance.

Default value: Immediately.

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.

ReadonlyReplicas String No 1

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

AccessKeyId String No LTAIgbTGpxxxxxx

The AccessKey ID that Alibaba Cloud provides for you to access services.

Response parameters

Parameter Type Example Description
OrderId String 2033xxxxxxxx

The ID of the order.

RequestId String C5662998-62BE-4C7F-961D-7DFE775DD813

The ID of the request.


Sample requests

http(s):// Action=ModifyDBInstanceSpec
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

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