Scaling In a Cluster
Function
This API is used to scale in a cluster.
Calling Method
For details, see Calling APIs.
URI
POST /v1.0/{project_id}/clusters/{cluster_id}/cluster-shrink
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
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 |
cluster_id |
Yes |
String |
Definition Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID. Constraints The value must be a valid DWS cluster ID. Range It is a 36-digit UUID. Default Value N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
shrink_number |
No |
Integer |
Definition Number of nodes to be scaled in. Constraints This parameter cannot be left blank. Range An integer greater than 0 Default Value N/A |
online |
No |
Boolean |
Definition Whether the scale-in is online. Constraints N/A Range false or true Default Value false |
retry |
No |
Boolean |
Definition Whether to retry after a scale-in failure. Constraints N/A Range false or true Default Value false |
need_agency |
No |
Boolean |
Definition Whether an agency is required. Constraints N/A Range false or true Default Value false |
parallel_jobs |
No |
Integer |
Definition Number of concurrent redistribution tasks. Constraints N/A Range 1 to 200 Default Value 4 |
type |
No |
String |
Definition Type. This field has been deprecated and does not take effect. Constraints N/A Range N/A Default Value N/A |
force_backup |
No |
Boolean |
Definition Whether to back up data before the operation. This parameter has been deprecated and does not take effect. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
job_id |
String |
Definition ID of a scale-in task. Range N/A |
Example Requests
Scale in three nodes in the standard data warehouse cluster whose ID is 4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba90 offline and create an agency.
POST https://{Endpoint} /v1.0/89cd04f168b84af6be287f71730fdb4b/clusters/4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba90/shrink { "shrink_number" : 3, "online" : false, "retry" : false, "need_agency" : true, "parallel_jobs" : 2 }
Example Responses
Status code: 200
The scale-in request is submitted successfully.
{ "job_id" : "2c9081c88418ed420184197c8bc80001" }
Status Codes
Status Code |
Description |
---|---|
200 |
The scale-in request is submitted successfully. |
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.