You can call this operation to create shards or mongos for 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 to sharded cluster instances only.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateNode |
The operation that you want to perform. Set the value to CreateNode. |
NodeClass | String | Yes | dds.shard.mid |
The specification of the shard or mongos. For more information, see Instance types. |
NodeType | String | Yes | shard |
The type of the node. Valid values:
|
DBInstanceId | String | Yes | dds-bpxxxxxxxx |
The ID of the sharded cluster instance. |
NodeStorage | Integer | No | 10 |
The storage space of the node. You must specify this parameter if the value of the NodeType parameter is Shard.
|
FromApp | String | No | OpenApi |
The source of the request. Valid values:
|
AutoPay | Boolean | No | true |
Specifies whether to enable automatic payment. Valid values:
Default value: true. Note This parameter is only applicable to subscription instances.
|
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 ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length. |
RegionId | String | No | cn-hangzhou |
The ID of the region where the instance is deployed. You can call the DescribeRegions operation to query the region ID. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
NodeId | String | d-bpxxxxxxxxxxxxxx |
The ID of the node. |
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>
Sample success responses
XML
format
<CreateNodeResponse>
<OrderId>2034xxxxxxxx</OrderId>
<RequestId>7D48FB19-20CA-4725-A870-3D8F5CE69F14</RequestId>
</CreateNodeResponse>
JSON
format
{
"OrderId": "2034xxxxxxxx",
"RequestId": "7D48FB19-20CA-4725-A870-3D8F5CE69F14"
}
Error codes
For a list of error codes, visit the API Error Center.