doc-exports/docs/opengauss/api-ref/opengauss_api_1019.html
Ru, Li Yi d97aea4dd2 opengauss_api
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-09-06 09:04:21 +00:00

19 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 of a DB instance cannot exceed 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

    AZs to which CNs are to be added.

  • Example request (adding a single CN)
    {
    	"expand_cluster": {
                    "coordinators": [
                            {
                                   "az_code":"eu-de-01"
                            }
                    ]
    	}
    }
  • Example request (adding multiple CNs)
    {
    	"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

    Task ID.

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

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.