Adding Nodes for a Cluster Instance
API Description
This API is used to add nodes for a specified cluster instance.
Constraints
- This API supports both yearly/monthly and pay-per-use DB instances.
- Only the mongos and shard nodes can be added.
URI
| Name | Mandatory | Type | IN | Description |
|---|---|---|---|---|
| project_id | Yes | string | path | Explanation: Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID. Constraints: N/A Value range: N/A Default value: N/A |
| instance_id | Yes | string | path | Explanation: Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one. Constraints: N/A Value range: N/A Default value: N/A |
Request Parameters
| Name | Mandatory | Type | IN | Description |
|---|---|---|---|---|
| X-Auth-Token | Yes | string | header | Definition User token obtained from IAM. For details, see Authentication. Constraints N/A Value range: N/A Default value: N/A |
| Name | Type | Mandatory | Description |
|---|---|---|---|
| type | String | Yes | Explanation: Type of the object to be scaled. Constraints: N/A Value range:
Default value: N/A |
| spec_code | String | Yes | Explanation: The resource specification code. For details about how to obtain the resource specification code, see the flavors.spec_code parameter in Querying Database Specifications. Constraints: N/A Value range: N/A Default value: N/A |
| num | String | Yes | Explanation: The number of mongos or shard nodes to be added. Constraints: A cluster instance supports up to 32 mongos nodes and 32 shard nodes. Value range: N/A Default value: N/A |
| volume | Object | No | Explanation: The volume information. For more information, see Table 4. Constraints:
Value range: N/A Default value: N/A |
| is_auto_pay | Boolean | No | Explanation: Whether the order is automatically paid from your account when you add nodes to a yearly/monthly DB instance. This parameter does not affect the payment mode of automatic renewal. Constraints: N/A Value range:
Default value: false |
| Name | Type | Mandatory | Description |
|---|---|---|---|
| size | String | Yes | Explanation: The disk capacity of all new shards. Constraints: N/A Value range:
Default value: N/A |
Example Requests
- Adding one mongos node whose spec_code is set to dds.mongodb.c6.medium.4.mongos
{ "type": "mongos", "spec_code":"dds.mongodb.c6.medium.4.mongos", "num": 1 } - Adding one shard group whose spec_code is set to dds.mongodb.c6.medium.4.mongos and storage space is 330 GB.
{ "type": "shard", "spec_code":"dds.mongodb.c6.medium.4.shard", "num": 1, "volume": { "size": 330 } }
Response Parameters
- Parameter description
Table 5 Parameter description Name
Type
Mandatory
Description
job_id
String
Yes
Explanation:
Indicates the task ID.
Value range:
N/A
order_id
String
No
Explanation:
The order ID. This parameter is returned only when the nodes of a yearly/monthly DB instance are added.
Value range:
N/A
- Example Responses
{ "job_id": "4008c8914b624785a02ab7966d4d" }
Status Code
For more information, see Status Code.
Error Code
For more information, see Error Code.