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 (aliyun.com).
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.
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 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. Note
|
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:
|
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
China site (aliyun.com).
|
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: |
EffectiveTime | String | No | Immediately |
The time when the changed configurations take effect. Valid values:
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. |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/?Action=ModifyDBInstanceSpec
&DBInstanceId=dds-bp1ea17b41ab****
&DBInstanceStorage=50
&<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.