Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Instance Management/ Adding CNs and DN shards and Scaling up Storage
Updated on 2025-08-19 GMT+08:00

Adding CNs and DN shards and Scaling up Storage

Function

This API is used to add CNs, add DN shards, and scale up storage. Before calling this API:

Constraints

  • Scaling up storage
    • The storage space must be a multiple of (Number of shards x 4 GB).
    • All nodes must be available.

URI

POST /v3/{project_id}/instances/{instance_id}/action

Table 1 Parameter description

Name

Mandatory

Description

project_id

Yes

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

Definition

Instance ID, which uniquely identifies an instance.

Constraints

N/A

Range

The value can contain 36 characters. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Parameter description

Name

Mandatory

Type

Description

expand_cluster

No

Object

Definition

Configuration for adding CNs or shards.

For details, see Table 3.

Constraints

This parameter is mandatory when you add CNs or shards.

enlarge_volume

No

Object

Definition

Target storage space after scale-up.

For details, see Table 6.

Constraints

This parameter is mandatory for scaling up instance storage.

is_auto_pay

No

String

Definition

Whether the order will be automatically paid after yearly/monthly instances are created. 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

Table 3 expand_cluster field data structure description

Name

Mandatory

Type

Description

coordinators

No

Array of Coordinators objects

Definition

Configuration for adding CNs. For details, see Table 4.

Constraints

This parameter is mandatory for adding CNs. When the number of nodes reaches the maximum, new nodes cannot be added.

shard

No

Shard object

Definition

Configuration for adding shards. For details, see Table 5.

Constraints

This parameter is mandatory for adding shards. When the number of nodes reaches the maximum, new nodes cannot be added.

Table 4 coordinators parameter description

Name

Mandatory

Type

Description

az_code

Yes

String

Definition

AZs to which CNs are to be added. If multiple CNs need to be added, enter the AZ where each CN is located.

For details about AZs in different regions, see Regions and Endpoints.

Constraints

When the number of nodes reaches the maximum, new nodes cannot be added.

Range

N/A

Default Value

N/A

Table 5 shard parameter description

Name

Mandatory

Type

Description

count

Yes

Integer

Definition

Number of shards to be added.

Constraints

When the number of nodes reaches the maximum, new nodes cannot be added.

Range

[1,min(255 – number-of-current-shards,64)]

Default Value

N/A

Table 6 enlarge_volume field data structure description

Name

Mandatory

Type

Description

size

Yes

Integer

Definition

Storage space of a GaussDB instance.

Constraints

The storage space must be a multiple of the number of shards multiplied by 4 GB.

Range

(number_of_shards x 40 GB) to (number_of_shards x 24 TB)

Default Value

N/A

Response Parameters

Table 7 Response parameters

Name

Type

Description

job_id

String

Definition

Job ID. This parameter is returned when your instance is billed at a pay-per-use basis.

Range

N/A

order_id

String

Definition

Order ID. This parameter is returned only when your instance is billed at a yearly/monthly basis.

Range

N/A

Example Request

  • Adding a CN
    POST https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in14/action
    
    {
        "expand_cluster": {
            "coordinators": [
                {
                    "az_code": "az_code"
                }
            ]
        }
    }
  • Adding multiple CNs
    POST https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in14/action
    
    {
        "expand_cluster": {
            "coordinators": [
                {
                    "az_code": "az_code"
                },
                {
                    "az_code": "az_code"
                },
                {
                    "az_code": "az_code"
                }
            ]
        }
    }
  • Adding a DN shard
    POST https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in14/action
    
    {
        "expand_cluster": {
            "shard": {
                "count": 1
            }
        }
    }
  • Scaling up storage to 400 GB
    POST https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in14/action
    {
        "enlarge_volume": {
            "size": 400
        }
    }

Example Response

{
	"job_id": "2b414788a6004883a02390e2eb0ea227"
}

Status Code

Error Code

For details, see Error Codes.