Adding Nodes for a Cluster Instance
API Description
This API is used to add nodes for a specified cluster instance.
Restrictions
- Only the mongos and shard nodes can be added.
- The specifications of the new node must be the same as those of the existing nodes in the instance.
The specification series includes general-purpose (s6), enhanced (c3), and enhanced II (c6).
Example:- dds.mongodb.s6.large.4.mongos and dds.mongodb.s6.medium.4.mongos have the same specifications.
- dds.mongodb.s6.large.4.mongos and dds.mongodb.c3.large.4.mongos are not of the same specifications.
|
Name |
Type |
IN |
Mandatory |
Description |
|---|---|---|---|---|
|
project_id |
string |
path |
Yes |
Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID. |
|
instance_id |
string |
path |
Yes |
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. |
Request Parameters
|
Parameter |
Type |
IN |
Mandatory |
Description |
|---|---|---|---|---|
|
X-Auth-Token |
string |
header |
Yes |
User token. |
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
type |
String |
Yes |
Type of the object to be scaled.
|
|
spec_code |
String |
Yes |
The resource specification code. For details about how to obtain the resource specification code, see the flavors.spec_code parameter in Querying All Instance Specifications. |
|
num |
String |
Yes |
The number of mongos or shard nodes to be added. A cluster instance supports up to 32 mongos nodes and 32 shard nodes. |
|
volume |
Object |
No |
The volume information. For more information, see Table 4.
|
|
is_auto_pay |
Boolean |
No |
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.
|
|
availability_zone_id |
String |
No |
AZ ID. For details, see the value of az_status returned by the API in Querying All Instance Specifications. You can add a mongos node in a specified AZ. The value cannot be empty. For details about how to obtain this parameter value, see Regions and Endpoints. |
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
size |
String |
Yes |
The disk capacity of all new shards. Value range: If a shard node has fewer than 8 vCPUs, the value ranges from 10 GB to 5,000 GB. If a shard node has 8 or more vCPUs, the value ranges from 10 GB to 10,000 GB. |
- Request example
Number of mongos nodes to be added:
{ "type": "mongos", "spec_code":"dds.mongodb.c6.medium.4.mongos", "num": 1 }Number of mongos nodes to be added with the AZ information.{ "type" : "mongos", "spec_code" : "dds.c3.medium.4.mongos", "num" : 1, "availability_zone_id" : "cn-southwest-288a" }Number of shard nodes to be added:{ "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
Indicates the task ID.
order_id
String
No
The order ID. This parameter is returned only when the nodes of a yearly/monthly DB instance are added.
- Example response
{ "job_id": "4008c8914b624785a02ab7966d4d" }
Status Code
For details, see Status Code.
Error Code
For details, see Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot