Modifies the instance type and storage capacity of a node in an ApsaraDB for MongoDB sharded cluster instance.

Before you call this operation, make sure that you understand the billing methods and pricing of ApsaraDB for MongoDB.

This operation applies only to sharded cluster instances.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyNodeSpec

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

RegionId String No cn-hangzhou

The region ID of the instance. You can call the DescribeRegions operation to query the region ID of the instance.

DBInstanceId String Yes dds-bpxxxxxxxx

The ID of the instance.

NodeId String Yes d-bpxxxxxxxx

The ID of the shard or mongos node in the sharded cluster instance. You can call the DescribeDBInstanceAttribute operation to query the ID.

Note If you set this parameter to the ID of the shard node, you must also specify the NodeStorage parameter.
NodeClass String No dds.shard.standard

The instance type of the shard or mongos node. For more information, see Instance types.

Note You must specify one of the NodeClass and NodeStorage parameters.
NodeStorage Integer No 20

The storage capacity of the shard node.

  • Valid values: 10 to 2000. Unit: GB.
  • The value must be a multiple of 10.
Note
  • You must specify one of the NodeClass and NodeStorage parameters.
  • This parameter takes effect only when the NodeId parameter is set to the ID of the shard node.
ClientToken String No ETnLKlblzczshOTUbOCzxxxxxxxxxx

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

FromApp String No OpenApi

The source of the request. Valid values:

  • OpenApi: the ApsaraDB for MongoDB API
  • mongo_buy: the ApsaraDB for MongoDB console
AutoPay Boolean No true

Specifies whether to enable automatic payment. Valid values:

  • true: enables automatic payment. Make sure that you have sufficient balance within your account.
  • false: disables automatic payment. You must perform the following operations to pay for the instance: Log on to the ApsaraDB for MongoDB console. In the top navigation bar, click Expenses to go to the Billing Management console. In the left-side navigation pane, click Orders. On the page that appears, find the order and complete the payment.

Default value: true.

EffectiveTime String No Immediately

The time when the modified settings take effect. Valid values:

  • Immediately: The settings immediately take effect.
  • MaintainTime: The settings take effect during the maintenance window of the instance.

Default value: Immediately.

OrderType String No UPGRADE

The type of the order. Valid values:

  • UPGRADE
  • DOWNGRADE
ReadonlyReplicas Integer No 5

The number of read-only nodes in the shard node. Valid values: 0 to 5. Default value: 0.

Note This parameter is available only for ApsaraDB for MongoDB instances that are purchased on the China site (aliyun.com).
BusinessInfo String No {"ActivityId":"000000000"}

The business information. This is an additional parameter.

CouponNo String No 1111111111111111

The coupon code. Default value: youhuiquan_promotion_option_id_for_blank.

Response parameters

Parameter Type Example Description
RequestId String EFFC5788-8BB5-41B5-9F15-9CFC5A0E8FCC

The ID of the request.

OrderId String 2033xxxxxxxxx

The ID of the order.

Examples

Sample requests

http(s)://mongodb.aliyuncs.com/?Action=ModifyNodeSpec
&NodeId=d-bpxxxxxxxx
&DBInstanceId=dds-bpxxxxxxxx
&NodeClass=dds.shard.standard
&NodeStorage=20
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8" ?>
<ModifyNodeSpecResponse>
    <OrderId>2033xxxxxxxxx</OrderId>
    <RequestId>EFFC5788-8BB5-41B5-9F15-9CFC5A0E8FCC</RequestId>
</ModifyNodeSpecResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "OrderId" : "2033xxxxxxxx",
  "RequestId" : "EFFC5788-8BB5-41B5-9F15-9CFC5A0E8FCC"
}

Error codes

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