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).
Description
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.
Authorization information
The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action
Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All resources
is used in the Resource type column of the operation.
- Condition keyword: refers to the condition keyword defined by the cloud product itself.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operate | Access level | Resource type | Condition keyword | Association operation |
---|---|---|---|---|
dds:ModifyDBInstanceSpec | WRITE |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The ID of the instance. | dds-bp1ea17b41ab**** |
DBInstanceClass | string | No | The instance type. For more information, see Instance types. You can also call the DescribeAvailableResource operation to view instance types. NoteYou must specify at least one of the DBInstanceClass and DBInstanceStorage parameters. | dds.sn4.xlarge.1 |
DBInstanceStorage | string | No | 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
| 50 |
OrderType | string | No | The type of the configuration change. Default value: DOWNGRADE. Valid values:
NoteThis parameter can be configured only when the billing method of the instance is subscription. | UPGRADE |
AutoPay | boolean | No | Specifies whether to enable automatic payment. Default value: true. Valid values:
| true |
BusinessInfo | string | No | The business information. | {“ActivityId":"000000000"} |
ReplicationFactor | string | No | The number of nodes in the instance.
NoteThis parameter is not required for a serverless instance which is only available on the China site (aliyun.com). | 3 |
ReadonlyReplicas | string | No | 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. NoteYou can go to the Database Connections page to view the types of networks that are enabled. | 1 |
CouponNo | string | No | The coupon code. Default value: | youhuiquan_promotion_option_id_for_blank |
EffectiveTime | string | No | The time when the changed configurations take effect. Default value: Immediately. Valid values:
| Immediately |
ExtraParam | string | No | Additional parameter | async |
Response parameters
Example
Normal return example
JSON
Format
{
"RequestId": "1E9F1104-19E7-59F0-AB7F-F4EBFDEA****",
"OrderId": "21012408824****"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
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. |
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. |
For a list of error codes, visit the API error center.