List warehouses
Lists all warehouses in an elastic cluster.
NOTE
This operation requires the View cluster privilege.
Request
Basic information | |
---|---|
HTTP URL | https://cloud-api.celerdata.com/api/1.0/clusters/:cluster_id/warehouses |
HTTP method | GET |
Frequency | 600/minute |
Path variables
Parameter | Example value | Required | Type | Description |
---|---|---|---|---|
cluster_id | 9d71aae6-a35d-40d5-b213-27bb1f583be5 | Yes | String | The ID of the cluster. |
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.
Response
Sample response
{
"code": 20000,
"data": {
"total": 2,
"list": [
{
"warehouse_id": "ecace730-9d53-4f56-ac9d-7d034c662082",
"warehouse_name": "default_warehouse",
"node_count": 2,
"state": "SUSPENDED",
"is_default": true
},
{
"warehouse_id": "ff09d6ac-b821-447d-b4c1-59167d022c8b",
"warehouse_name": "test",
"node_count": 2,
"state": "SUSPENDED",
"is_default": false
}
]
}
}
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 returns the object of warehouse information. |
data.total | - | Integer | The total number of warehouses in the cluster. |
data.list | - | Array | The array of information for a specific warehouse. |
data.list.warehouse_id | - | String | The ID of the warehouse. |
data.list.warehouse_name | - | String | The name of the warehouse. |
data.list.node_count | - | Integer | The number of Compute Nodes in the warehouse. |
data.list.state | - | String | The status of the warehouse. Valid values:
|
data.list.is_default | true | Boolean | Whether the warehouse is the default warehouse. |
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 . |