Warehouse

Create or replace warehouse

POST/api/v2/warehouses
Create a virtual warehouse. Equivalent to CREATE WAREHOUSE in SQL.

查询参数

参数描述
createMode string
Query parameter allowing support for different modes of resource creation. Possible values include:
  • errorIfExists: Throws an error if you try to create a resource that already exists.
  • orReplace: Automatically replaces the existing resource with the current one.
  • ifNotExists: Creates a new resource when an alter is requested for a non-existent resource.

响应

代码描述
200
Successful request.
202

List warehouse

GET/api/v2/warehouses
Show a list of warehouse filtered by pattern. Equivalent to SHOW WAREHOUSE in SQL.

查询参数

参数描述
like string
Query parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters.

响应

代码描述
200
successful
202
Successfully accepted the request, but it is not completed yet.

Describe warehouse

GET/api/v2/warehouses/{name}
Describes the warehouse, show information of the chosen warehouse. Equivalent to DESCRIBE WAREHOUSE in SQL.

路径参数

参数描述
name 
Identifier (i.e. name) for the resource.

响应

代码描述
200
successful
202

Drop warehouse

DELETE/api/v2/warehouses/{name}
Removes the specified virtual warehouse from the system. Equivalent to DROP WAREHOUSE in SQL.

查询参数

参数描述
ifExists boolean
Query parameter that specifies how to handle the request for a resource that does not exist:
  • true: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource.
  • false: The endpoint throws an error if the resource doesn't exist.

响应

代码描述
200
202

Create a (or alter an existing) warehouse

PUT/api/v2/warehouses/{name}
Create a (or alter an existing) warehouse. Even if the operation is just an alter, the full property set must be provided.

响应

代码描述
200
202

Resume warehouse

POST/api/v2/warehouses/{name}:resume
Bring current warehouse to a usable ‘Running’ state by provisioning compute resources if current warehouse is suspended.

响应

代码描述
200
202

Suspend warehouse

POST/api/v2/warehouses/{name}:suspend
Remove all compute nodes from a warehouse and put the warehouse into a ‘Suspended’ state if current warehouse is not suspended.

响应

代码描述
200
202

Update and rename warehouse

POST/api/v2/warehouses/{name}:rename
Specifies a new identifier for the warehouse; must be unique for current account.

响应

代码描述
200
202

Abort all queries

POST/api/v2/warehouses/{name}:abort
Aborts all the queries currently running or queued on the warehouse.

响应

代码描述
200
202

Use current warehouse for session (Deprecated)

POST/api/v2/warehouses/{name}:use
[Deprecated] Specifies the active/current warehouse for the session.

响应

代码描述
200
202

enable adaptive warehouse

POST/api/v2/warehouses/{name}:enable
Enable an adaptive warehouse and put the warehouse into a ‘enabled’ state, if the warehouse is not enabled.

响应

代码描述
200
202

disable adaptive warehouse

POST/api/v2/warehouses/{name}:disable
Disable an adaptive warehouse and put the warehouse into a ‘disabled’ state, if the warehouse is not disabled.

响应

代码描述
200
202
语言: 中文