All Products
Search
Document Center

ApsaraDB for MongoDB:ModifyDBInstanceSpec

Last Updated:Mar 15, 2024

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).

Operation 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.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • 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 Key: the condition key that is defined by the cloud service.
  • 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.
OperationAccess levelResource typeCondition keyAssociated operation
dds:ModifyDBInstanceSpecWRITE
  • dbinstance
    acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The ID of the instance.

dds-bp1ea17b41ab****
DBInstanceClassstringNo

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.
dds.sn4.xlarge.1
DBInstanceStoragestringNo

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
  • You must specify at least one of the DBInstanceStorage and DBInstanceClass parameters.

  • Storage capacity can be scaled down only for pay-as-you-go replica set instances. The new storage capacity you specify must be greater than the used storage capacity.

50
OrderTypestringNo

The type of the configuration change. Valid values:

  • UPGRADE
  • DOWNGRADE (default)
Note This parameter can be configured only when the billing method of the instance is subscription.
UPGRADE
AutoPaybooleanNo

Specifies whether to enable automatic payment. Valid values:

  • true (default): enables automatic payment. Make sure that your Alibaba Cloud account has a sufficient balance.
  • 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, choose Expenses > User Center. In the left-side navigation pane, choose Order Management > Order. On the Orders for Services tab, find the order and pay for the order.
true
BusinessInfostringNo

The business information.

{“ActivityId":"000000000"}
ReplicationFactorstringNo

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 the China site (aliyun.com).
3
ReadonlyReplicasstringNo

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.
1
CouponNostringNo

The coupon code. Default value: youhuiquan_promotion_option_id_for_blank.

youhuiquan_promotion_option_id_for_blank
EffectiveTimestringNo

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

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

The additional parameter.

Valid values:

  • async

  • sync

async

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

1E9F1104-19E7-59F0-AB7F-F4EBFDEA****
OrderIdstring

The ID of the order.

21012408824****

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError message
400MissingParameterThe input parameters DBInstanceClass and DBInstanceStorage all blank or no change.
400InvalidDBInstanceClass.ValueNotSupportedThe specified parameter DBInstanceClass is not valid.
400InvalidDBInstanceStorage.ValueNotSupportedThe specified parameter DBInstanceStorage is not valid.
400LX_REQUEST_TOKEN_CONFLICTThe request token is conflict.
400TradeConfirmPayErrorBIZ_ERROR - degrade refund error
400PRICE.ORIGIN_PRICE_ERROROrigin lingxiao price request error.
403OperationDeniedThe resource is out of usage.
403InvaildDBInstanceClassInRegion.NotAvailableThe DBInstanceClass in the Region is not available.
404InvalidDBInstanceId.NotFoundThe DBInstanceId provided does not exist in our records.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-01-12The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404