Modifies the specifications or storage space of an ApsaraDB for MongoDB standalone, replica set, or serverless instance. Serverless instances are available only on the China site (aliyun.com).
Before you call this operation, make sure that you understand the billing methods and pricing of ApsaraDB for MongoDB.
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.
Debugging
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 DescribeRegions operation to query the most recent region list. |
| 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. Note
|
| OrderType | String | No | UPGRADE |
The type of the modification. Valid values:
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. Default value: true. Valid values:
|
| BusinessInfo | String | No | {“ActivityId":"000000000"} |
The business information. |
| ReplicationFactor | String | No | 3 |
The number of nodes in the instance.
Note This parameter is not required for a serverless instance which is only available on
the China site (aliyun.com).
|
| ReadonlyReplicas | String | No | 1 |
The number of read-only nodes. Valid values: 0 to 5. If your instance has only Classic Network and VPC endpoints, you must apply for a public endpoint or release the classic network endpoint for the instance before you can change the Read-only Nodes value. Note You can go to the Database Connections page to view the types of networks that are enabled.
|
| CouponNo | String | No | youhuiquan_promotion_option_id_for_blank |
The coupon code. Default value: |
| EffectiveTime | String | No | Immediately |
The time when the changed configurations take effect. Default value: Immediately. Valid values:
|
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. |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/?Action=ModifyDBInstanceSpec
&DBInstanceId=dds-bp1ea17b41ab****
&DBInstanceClass=dds.sn4.xlarge.1
&DBInstanceStorage=50
&OrderType=UPGRADE
&AutoPay=true
&BusinessInfo={“ActivityId":"000000000"}
&ReplicationFactor=3
&ReadonlyReplicas=1
&CouponNo=youhuiquan_promotion_option_id_for_blank
&EffectiveTime=Immediately
&Common request parameters
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyDBInstanceSpecResponse>
<RequestId>1E9F1104-19E7-59F0-AB7F-F4EBFDEA****</RequestId>
<OrderId>21012408824****</OrderId>
</ModifyDBInstanceSpecResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "1E9F1104-19E7-59F0-AB7F-F4EBFDEA****",
"OrderId" : "21012408824****"
}
Error codes
For a list of error codes, visit the API Error Center.