1
0
forked from docs/doc-exports
doc-exports/docs/opengauss/api-ref/opengauss_api_0019.html
Wang , Deng Ke a96a12ecf1 openGauss API 20221109 version
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2022-11-14 16:40:26 +00:00

16 KiB

Adding CNs

Function

This API is used to add CNs.

Constraints

  • The CN growth increment ranges from 1 to 9.
  • The maximum number of CNs is 256.
  • If you choose the single-AZ deployment during instance creation, add CNs in the same AZ.
  • The number of CNs for a DB instance must be less than or equal to twice the number of shards.

URI

Request

  • Parameter description
    Table 2 Parameter description

    Name

    Mandatory

    Type

    Description

    expand_cluster

    Yes

    Object

    For details, see Table 3.

    Table 3 expand_cluster field data structure description

    Name

    Mandatory

    Type

    Description

    coordinators

    Yes

    Array

    For details, see Table 4.

    Table 4 azCode field data structure description

    Name

    Mandatory

    Type

    Description

    az_code

    Yes

    String

    Specifies the AZ to which CNs are to be added.

  • Example request (adding CNs for a single-CN instance)
    {
    	"expand_cluster": {
                    "coordinators": [
                            {
                                   "az_code":"eu-de-01"
                            }
                    ]
    	}
    }
  • Example request (adding CNs for a multi-CN instance)
    {
    	"expand_cluster": {
                    "coordinators": [
                            {
                                   "az_code":"eu-de-01"
                            },
                            {
                                   "az_code":"eu-de-01"
                            },
                            {
                                   "az_code":"eu-de-01"
                            }
                    ]
    	}
    }

Response

  • Normal response
    Table 5 Parameter description

    Name

    Type

    Description

    job_id

    String

    Specifies the task ID.

  • Example normal response
    {
    	"job_id": "2b414788a6004883a02390e2eb0ea227"
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.