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>
25 KiB
Adding CNs, Adding Shards, or Scaling Up Storage
Function
This API is used to add CNs, add shards, or scale up storage. Before calling this API:
- Learn how to authenticate this API.
- Understand the API in Using APIs.
- Obtain the required region and endpoint.
Constraints
- Adding CNs
- The maximum number of CNs is 256.
- If you choose the single-AZ deployment during instance creation, add CNs in the same AZ.
- Adding shards
- The shard growth increment ranges from 1 to 64.
- The maximum number of shards is 256.
- Scaling up Storage
- The storage space must be a multiple of (Number of shards x 40 GB).
- All nodes must be available.
URI
- URI format
POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/action
- Example
https://gaussdb.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in14/action
- Parameter description
Table 1 Parameter description Name
Mandatory
Description
project_id
Yes
Project ID of a tenant in a region.
To obtain this value, see Obtaining a Project ID.
instance_id
Yes
Instance ID.
Request
- Parameter description
Table 2 Parameter description Name
Mandatory
Type
Description
expand_cluster
No
Object
This parameter is mandatory when you add CNs or shards.
For details, see Table 3.
enlarge_volume
No
Object
New storage space after scaling up. This parameter is mandatory for scaling up storage.
For details, see Table 6.
Table 3 expand_cluster field data structure description Name
Mandatory
Type
Description
coordinators
No
Array of Coordinators objects
This parameter is mandatory for adding CNs. For details, see Table 4.
shard
No
Shard object
This parameter is mandatory for adding shards. For details, see Table 5.
Table 4 coordinators parameter description Name
Mandatory
Type
Description
az_code
Yes
string
AZs to which CNs are to be added. If multiple CNs need to be added, enter the AZ where each CN is located.
Example Request
- Adding a CN
{ "expand_cluster": { "coordinators": [ { "az_code": "eu-de-01" } ] } }
- Adding multiple CNs
{ "expand_cluster": { "coordinators": [ { "az_code": "eu-de-01" }, { "az_code": "eu-de-01" }, { "az_code": "eu-de-01" } ] } }
- Adding a DN shard
{ "expand_cluster": { "shard": { "count": 1 } } }
- Scaling up storage to 400 GB
{ "enlarge_volume": { "size": 400 } }
Response
- Normal response
Table 7 Parameter description Name
Type
Description
job_id
String
Task ID. This parameter is returned when your instance is billed at a pay-per-use basis.
- Example normal response
{ "job_id": "2b414788a6004883a02390e2eb0ea227" }
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.