Adds a shard or mongos node for an ApsaraDB for MongoDB sharded cluster instance.
Before you call this operation, make sure that you fully understand the billing methods and pricing of ApsaraDB for MongoDB.
This operation is applicable only to sharded cluster instances.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | CreateNode |
The operation that you want to perform. Set the value to CreateNode. |
| DBInstanceId | String | Yes | dds-bp11501cd7b5**** |
The ID of the sharded cluster instance. |
| NodeClass | String | Yes | dds.shard.mid |
The specifications of the shard or mongos node. For more information, see Instance types. |
| NodeStorage | Integer | No | 10 |
The disk capacity of the node. Unit: GB. Valid values: 10 to 2000. The value must be a multiple of 10. Unit: GB. Note This parameter is required if the NodeType parameter is set to shard.
|
| NodeType | String | Yes | shard |
The type of the node. Valid values:
|
| ClientToken | String | No | ETnLKlblzczshOTUbOCz**** |
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. |
| AutoPay | Boolean | No | true |
Specifies whether to enable automatic payment. Default value: true. Valid values:
Note This parameter is required when the billing method of the instance is subscription.
|
| ReadonlyReplicas | Integer | No | 5 |
The number of read-only nodes in the shard node. Valid values: 0 to 5. The value must be an integer. 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 | youhuiquan_promotion_option_id_for_blank |
The coupon code. Default value: youhuiquan_promotion_option_id_for_blank. |
| ShardDirect | Boolean | No | false |
Specifies whether to apply for an endpoint for the shard node. Default value: false. Valid values:
|
| AccountName | String | No | ceshi |
The username of the account. The username must meet the following requirements:
Note
|
| AccountPassword | String | No | 123+abc |
The password of the account. The password must meet the following requirements:
Note The account password of the shard node cannot be reset.
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 7D48FB19-20CA-4725-A870-3D8F5CE6**** |
The ID of the request. |
| NodeId | String | d-bp1b234bf7a4**** |
The ID of the node. |
| OrderId | String | 20951063702**** |
The ID of the order. |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/?Action=CreateNode
&DBInstanceId=dds-bp11501cd7b5****
&NodeClass=dds.shard.mid
&NodeStorage=10
&NodeType=shard
&ClientToken=ETnLKlblzczshOTUbOCz****
&FromApp=mongo_buy
&AutoPay=true
&ReadonlyReplicas=5
&BusinessInfo={"ActivityId":"000000000"}
&CouponNo=youhuiquan_promotion_option_id_for_blank
&<Common request parameters>
Sample responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateNodeResponse>
<RequestId>7D48FB19-20CA-4725-A870-3D8F5CE6****</RequestId>
<NodeId>d-bp1b234bf7a4****</NodeId>
<OrderId>20951063702****</OrderId>
</CreateNodeResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "7D48FB19-20CA-4725-A870-3D8F5CE6****",
"NodeId" : "d-bp1b234bf7a4****",
"OrderId" : "20951063702****"
}
Error codes
For a list of error codes, visit the API Error Center.