Updated on 2025-08-22 GMT+08:00

Adding Nodes to a Replica Set Instance

API Description

This API is used to add nodes to a specified replica set instance.

Restrictions

  • This API supports both yearly/monthly and pay-per-use DB instances.

URI

  • URI format

    POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/replicaset-node

  • URI example
    https://dds.cn-north-1.myhuaweicloud.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/e73893ef73754465a8bd2e0857bbf13ein02/replicaset-node
    Table 1 Path parameters

    Name

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Definition

    Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    instance_id

    Yes

    String

    Definition

    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

    Range

    N/A

    Default Value

    N/A

    Table 2 Request header parameters

    Name

    Mandatory

    Type

    Description

    X-Auth-Token

    Yes

    String

    Definition

    User token obtained from IAM. For details, see Authentication.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

Request Parameters

  • Parameter description
    Table 3 Request body parameters

    Name

    Mandatory

    Type

    Description

    num

    Yes

    Integer

    Definition

    Number of nodes to be added to a replica set instance.

    Constraints

    • If a replica set instance has three nodes, two or four nodes can be added.
    • If a replica set instance has five nodes, two nodes can be added.
    • Nodes cannot be added to a replica set instance with seven nodes.

    Range

    N/A

    Default Value

    N/A

    is_auto_pay

    No

    Boolean

    Definition

    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

    Range

    • true: The order is automatically paid from the account.
    • false: The order is manually paid from the account.

    Default Value

    false

Example Request

Adding two nodes to a specified replica set instance
POST https://dds.cn-north-1.myhuaweicloud.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/e73893ef73754465a8bd2e0857bbf13ein02/replicaset-node 
 
{ 
  "num" : 2 
}

Response Parameters

  • Parameter description
    Table 4 Response body parameters

    Name

    Type

    Description

    job_id

    String

    Definition

    Task ID. This parameter is returned only for pay-per-use DB instances.

    Range

    N/A

    order_id

    String

    Definition

    Order ID. This parameter is returned only when yearly/monthly DB instances are created.

    Range

    N/A

  • Example response
    { 
      "job_id" : "6ad4eb1f-73bd-4876-aa31-aa9a1e41c4bc" 
    }

Status Code

For details, see Status Code.

Error Code

For details, see Error Code.