Scale a warehouse up or down
Scales a warehouse up or down.
NOTE
This operation requires the Modify cluster privilege.
Request
| Basic information | |
|---|---|
| HTTP URL | https://cloud-api.celerdata.com/api/1.0/warehouses/:warehouse_id/scale-size |
| HTTP method | POST |
| Frequency | 600/minute |
Path variables
| Parameter | Example value | Required | Type | Description |
|---|---|---|---|---|
| warehouse_id | ff09d6ac-b821-447d-b4c1-59167d022c8b | Yes | String | The ID of the warehouse. |
Header parameters
| Parameter | Example value | Required | Type | Description |
|---|---|---|---|---|
| Authorization | Bearer OGQ5MDA4MZGTNJMWNS0ZY2Y2LWFJNZYTOTBINMZIYTGZZDUY | Yes | String | The access token used to access the CelerData Cloud BYOC API. Format: Bearer <access_token>. |
See Obtain access token.
Request Body
| Parameter | Example value | Required | Type | Description |
|---|---|---|---|---|
| vm_cate | 6 | Yes | INT | The type of the node (virtual machine) you want to scale to. For supported instance types, see Supported Instance Types. |
| iops | 5000 | No | INT | The IOPS of the cloud storage disk on the node (virtual machine) to be scaled to. This item is valid only when you scale the node from the instance with local storage to one with cloud storage. |
| throughput | 400 | No | INT | The throughput of the cloud storage disk on the node (virtual machine) to be scaled to. This item is valid only when you scale the node from the instance with local storage to one with cloud storage. |
| vm_vol_size | 100 | No | INT | The size of each cloud storage disk on the node (virtual machine) to be scaled to. Unit: GB. This item is valid only when you scale the node from the instance with local storage to one with cloud storage. |
| vm_vol_num | 2 | No | INT | The number of cloud storage disks on the node (virtual machine) to be scaled to. This item is valid only when you scale the node from the instance with local storage to one with cloud storage. |
Example:
{
"vm_cate": "m6i.4xlarge",
"iops": 5000,
"throughput": 400,
"vm_vol_size": 100,
"vm_vol_num": 2
}
Response
Sample response
{
"code": 20000,
"data": {
"action_id": "9d71aae6-a35da-40d5-b213-27bb1f57ifj5"
}
}
Response elements
| Parameter | Example value | Type | Description |
|---|---|---|---|
| code | 20000 | Integer | The error code. If the error code returned is 20000, the request succeeded. If any other error code is returned, the request failed. |
| data | - | Object | The result of the API call. The data object may not be returned for some API actions. It consists of the following element: action_id. |
| data.action_id | - | String | The ID of the action. |
| message | - | String | The error message. This element is returned only when the code returned is not 20000.NOTICE Do not conclude whether a request succeeded or failed based on the return value of message. |
See also
Scaling a warehouse may take a few minutes. After you make the preceding API call, you can query the status of the action by following the instructions provided in Query warehouse operation status.