Help Center> GeminiDB> API Reference> API Description> DB Instance Management> Deleting Nodes from a Cluster Instance

Deleting Nodes from a Cluster Instance

Function

This API is used to delete nodes from a specified cluster instance.

Constraints

This API supports only pay-per-use GaussDB(for Cassandra) instances.

URI

  • URI format

    POST /v3/{project_id}/instances/{instance_id}/reduce-node

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    instance_id

    Yes

    Specifies the DB instance ID.

Requests

  • Parameter description

    Name

    Mandatory

    Type

    Description

    num

    No

    Integer

    Specifies the number of nodes that are reduced randomly.

    The value is 1.

    NOTE:

    If the client is directly connected to a node, you are not advised to delete nodes randomly.

    node_list

    No

    Array of strings

    Specifies the ID of the node to be deleted. The node must support scale-in. If this parameter is not transferred, the number of nodes to be deleted is specified based on the internal policy of the system.

    NOTE:
    • Either num or node_list must be set.
      • If num is transferred, the value must be 1.
      • If node_list is transferred, the value must be 1.
      • If the values of num and node_list are transferred at the same time, the value of node_list is used.
    • If the value of node_list is empty, scale-in is performed on random nodes. If the value of node_list is not empty, the scale-in is performed based on the specified node ID.
    • Before scale-in, do not directly connect a node to prevent service interruption caused by scale-in.
  • Request header
    POST https://GaussDB_NoSQL_Endpoint/v3/{project_id}/instances/{instance_id}/reduce-node
  • Example request

    Deleting Cassandra nodes:

    {  
        "num": 1 
    }

Responses

  • Parameter description
    Table 2 Parameter description

    Name

    Type

    Description

    job_id

    String

    Indicates the task ID.

  • Response example
    {
        "job_id": "3711e2ad-5787-49bc-a47f-3f0b066af9f5"
    }
    

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.