You can call this operation to create shards or mongos for ApsaraDB for MongoDB sharded cluster instances.

Make sure that you fully understand the billing methods and pricing of ApsaraDB for MongoDB before calling this operation.

This operation can be performed only on 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
NodeClass String Yes dds.shard.mid

The specification of the shard or mongos. For more information, seeInstance specifications.

NodeType String Yes shard

The type of the node. Valid values:

  • shard
  • mongos
DBInstanceId String Yes dds-bpxxxxxxxx

The ID of the sharded cluster instance.

Action String Yes CreateNode

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

NodeStorage Integer No 10

The storage space of the node. You must specify this parameter if the value of theNodeTypeparameter isShard.

  • Valid values:10to2000. Unit: GB.
  • You can only specify this value in 10 GB increments.
FromApp String No OpenApi

The request source. Valid values:

  • OpenApi: The request is sent from an API.
  • mongo_buy: The request is sent from the console.
AutoPay Boolean No true

Indicates whether automatic payment is enabled for the instance. Valid values:

  • true: Automatic payment is enabled. Make sure that your account has sufficient balance.
  • false: Automatic payment is not enabled. You must make payments in the console. Payment instructions: Log on to the console. In the upper-right corner, clickBilling Managementand select Billing Managementfrom the drop-down list. The Billing Management page appears. In the left-side navigation pane, clickBills. On the Unpaid tab, click Make a Payment in the Actions column corresponding to the bill you want to pay.

Default value:true.

Note This parameter is only applicable to Subscription-based instances.
AccessKeyId String No LTAIgbTGpxxxxxx

The AccessKey ID provided by Alibaba Cloud.

ClientToken String No ETnLKlblzczshOTUbOCzxxxxxxxxxx

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

Response parameters

Parameter Type Sample response Description
OrderId String 2034xxxxxxxx

The ID of the order.

RequestId String 7D48FB19-20CA-4725-A870-3D8F5CE69F14

The ID of the request.

Examples

Sample requests


http(s)://mongodb.aliyuncs.com/? Action=CreateNode
&NodeClass=dds.shard.mid
&NodeType=shard
&DBInstanceId=dds-bpxxxxxxxx
&<Common request parameters>

Successful response examples

XML format

<CreateNodeResponse>
	  <OrderId>2034xxxxxxxx</OrderId>
	  <RequestId>7D48FB19-20CA-4725-A870-3D8F5CE69F14</RequestId>
</CreateNodeResponse>

JSON format

{
	"RequestId":"7D48FB19-20CA-4725-A870-3D8F5CE69F14",
	"OrderId":"2034xxxxxxxx"
}

Error codes

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