Help Center> Cloud Search Service> API Reference> APIs Related to Cluster Management> Adding Instances and Expanding Instance Storage Capacity

Adding Instances and Expanding Instance Storage Capacity

Function

This API is used to add instances of different types and expand instance storage capacity in a cluster. If the cluster has master, client, or cold data nodes, this API is used for capacity expansion.

URI

POST /v1.0/{project_id}/clusters/{cluster_id}/role_extend
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining the Project ID and Account ID.

cluster_id

Yes

String

ID of the cluster where instances are to be added.

Request

Table 2 describes the request parameters.

Table 2 Parameter description

Parameter

Mandatory

Type

Description

grow

Yes

Object

Detailed description about the cluster capacity expansion request. For details, see Table 3.

Table 3 grow field description

Parameter

Mandatory

Type

Description

type

Yes

String

Type of the instance to be added. Select at least one from ess, ess-cold, ess-master, and ess-client.

You can only add instances, rather than increase storage capacity, on nodes of the ess-master and ess-client types.

nodesize

Yes

Integer

Number of instances to be added. The total number of existing instances and newly added instances in a cluster cannot exceed 32.

disksize

Yes

Integer

Storage capacity of the instance to be added. The total storage capacity of existing instances and newly added instances in a cluster cannot exceed the maximum instance storage capacity allowed during cluster creation. In addition, you can expand the instance storage capacity for a cluster for up to six times.

Unit: GB

Response

Table 4 describes the response parameters.

Table 4 Parameter description

Parameter

Type

Description

id

String

Cluster ID.

Examples

Example request

POST v1.0/458d905f22da49c39f609e3347d65723/clusters/4f3deec3-efa8-4598-bf91-560aad1377a3/role_extend
{
    "grow": [
        {
            "type": "ess-master",
            "nodesize": 2,
            "disksize": 0
        },
        {
            "type": "ess",
            "nodesize": 0,
            "disksize": 50
        },
        {
            "type": "ess-client",
            "nodesize": 1,
            "disksize": 0
        }
    ]
}

Example response

{
    "id": "4f3deec3-efa8-4598-bf91-560aad1377a3"
}

Status Code

Table 5 describes the status code.

Table 5 Status code

Status Code

Code

Status Code Description

400

BadRequest

Invalid request.

The client should not repeat the request without modifications.

404

NotFound

The requested resource cannot be found.

The client should not repeat the request without modifications.

200

OK

The request is processed successfully.