Reconfigure Sharded Cluster Instance Node
Last Updated:2021-12-20
Reconfigure the Sharded Cluster Instance Node
For the reconfiguration of the specified sharding cluster instance node, you can only perform the capacity expansion.
Description
- Reconfiguration can be operated only when the node is RUNNING.
- This interface currently supports the reconfiguration of Mongos and Shard nodes of the sharded cluster Instance.
- Asynchronous interface, view the node status by calling the instance details interface.
Request structure
PUT /v{version}/instance/{dbInstanceId}/{nodeId}?resize&clientToken={clientToken} HTTP/1.1
HOST: mongodb.bj.baidubce.com
Authorization: authorization string
{
"nodeCpuCount": nodeCpuCount,
"nodeMemoryCapacity": nodeMemoryCapacity,
"nodeStorage": nodeStorage
}
Request header field
No other special header fields are available except for the common header fields.
Request parameter
Parameter Name | Type | Required? | Parameter Position | Description |
---|---|---|---|---|
version | string | Yes | URL parameter | API version number |
clientToken | string | Yes | Query parameters | It is an idempotent Token, which is an ASCII character string with a length of no more than 64 bits. |
dbInstanceId | string | Yes | URL parameters | Designated instance Id |
nodeId | string | Yes | URL parameters | Designated node Id |
nodeCpuCount | Int | Yes | RequestBody parameters | The number of CPU cores. Value Reference |
nodeMemoryCapacity | Int | Yes | RequestBody parameters | Memory size expressed in GB Value Reference |
nodeStorage | Int | No | RequestBody parameters | The disk size, which is in GB and increases by 1 GB. When the node type is Shard, this parameter needs to be input. When the node type is Mongos, this parameter needs not to be input. Value Reference |
Return header field
There are no other special header fields except for the common header field.
Return parameter
No special return parameters are available.
Request example
PUT /v1/instance/m-qNlWTz/node/shd-FI071n?resize&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
HOST: mongodb.bj.baidubce.com
ContentType: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
{
"nodeCpuCount": 2,
"nodeMemoryCapacity": 4
}
Return example
HTTP/1.1 200 OK
x-bce-request-id: 7869616F-7A68-6977-656E-406261696475
Content-Type: application/json
Content-Length: 0