Scaling Out a Cluster
Function
This API is used to scale out a cluster or add idle nodes. By default, scale-out is performed.
You can configure create_node_only to determine whether the current operation is to scale out a cluster or add idle nodes.
-
true: Add idle nodes.
-
false: Scale out a cluster.
Calling Method
For details, see Calling APIs.
URI
POST /v1.0/{project_id}/clusters/{cluster_id}/resize
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
cluster_id |
Yes |
String |
Definition Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID. Constraints N/A Range N/A Default Value N/A |
project_id |
Yes |
String |
Definition Project ID. To obtain the value, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
scale_out |
No |
ScaleOut object |
Definition Request body for adding an idle node or scaling out a cluster. Constraints N/A Range N/A Default Value N/A |
create_node_only |
No |
Boolean |
Definition Whether only idle nodes are added. Constraints N/A Range true: Only nodes are added. If scale-out is required, perform it separately. false: Nodes are added and the cluster is scaled out. Default Value false |
waiting_for_killing |
No |
Integer |
Definition Time before blocked job termination. Constraints This parameter is available only for GuestAgent 8.2.1 or later. Range 30 to 1200 Default Value 0 (not limited) |
auto_redistribute |
No |
Boolean |
Definition Whether to automatically start redistribution after scale-out. The default value is true. If this parameter is set to false, redistribution is not performed after scale-out. In this case, the cluster task information displays To be redistributed and other operations cannot be performed. Constraints N/A Range true: Redistribution is performed immediately after scale-out. false: Redistribution is not performed after scale-out. In this case, the cluster task information displays To be redistributed. Default Value true |
Response Parameters
Status code: 200
Request for scaling out a cluster is submitted.
None
Example Requests
-
Add three nodes to a cluster.
POST https://{Endpoint}/v1.0/89cd04f168b84af6be287f71730fdb4b/clusters/4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba90/resize { "scale_out" : { "count" : 3 } }
-
Add three idle nodes to a cluster for the scale-out operation in example 3.
POST https://{Endpoint}/v1.0/89cd04f168b84af6be287f71730fdb4b/clusters/4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba90/resize { "scale_out" : { "count" : 3 }, "create_node_only" : true }
Example Responses
Status code: 200
Request for scaling out a cluster is submitted.
{ }
Status Codes
Status Code |
Description |
---|---|
200 |
Request for scaling out a cluster is submitted. |
400 |
Request error. |
401 |
Authentication failed. |
403 |
You do not have required permissions. |
404 |
No resources found. |
500 |
Internal server error. |
503 |
Service unavailable. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.