fn create(name: string, warehouse_type: enum, auto_suspend_seconds?: number, auto_resume: boolean, min_cluster_count: number, max_cluster_count: number, scaling_policy: enum, initially_suspended: boolean, comment?: string)
Create a warehouse via CREATE WAREHOUSE. Defaults to
| Argument | Type | Required | Description |
|---|
| name | string | yes | |
| warehouse_type | enum | yes | |
| auto_suspend_seconds? | number | no | Seconds idle before auto-suspend. null disables auto-suspend. |
| auto_resume | boolean | yes | |
| min_cluster_count | number | yes | |
| max_cluster_count | number | yes | |
| scaling_policy | enum | yes | |
| initially_suspended | boolean | yes | If true (default), the warehouse is created in SUSPENDED state so |
| comment? | string | no | |
fn read(warehouse_ref: string)
Fetch live warehouse state via SHOW WAREHOUSES LIKE '<name>'.
| Argument | Type | Required | Description |
|---|
| warehouse_ref | string | yes | |
fn list()
List all warehouses on the account via SHOW WAREHOUSES. Returns the
fn adopt(name: string)
Register an existing warehouse as a Swamp 'warehouse' resource
| Argument | Type | Required | Description |
|---|
| name | string | yes | |
fn update(warehouse_ref: string)
Update warehouse settings via ALTER WAREHOUSE <name> SET ... .
| Argument | Type | Required | Description |
|---|
| warehouse_ref | string | yes | |
fn delete(warehouse_ref: string)
Drop the warehouse via DROP WAREHOUSE IF EXISTS <name>.
| Argument | Type | Required | Description |
|---|
| warehouse_ref | string | yes | |
fn resume(warehouse_ref: string)
Resume the warehouse via ALTER WAREHOUSE <name> RESUME IF SUSPENDED.
| Argument | Type | Required | Description |
|---|
| warehouse_ref | string | yes | |
fn suspend(warehouse_ref: string)
Suspend the warehouse via ALTER WAREHOUSE <name> SUSPEND.
| Argument | Type | Required | Description |
|---|
| warehouse_ref | string | yes | |
fn run_query(warehouse_ref: string, statement: string, database?: string, schema?: string, role?: string, server_timeout_seconds: number, async_exec: boolean)
Submit a SQL statement via POST /api/v2/statements bound to this
| Argument | Type | Required | Description |
|---|
| warehouse_ref | string | yes | |
| statement | string | yes | |
| database? | string | no | |
| schema? | string | no | |
| role? | string | no | |
| server_timeout_seconds | number | yes | Server-side execution timeout. Snowflake caps at 172800s (48h). |
| async_exec | boolean | yes | true = return immediately with statement_handle (state RUNNING); poll |
fn wait_statement(statement_handle: string, poll_seconds: number, timeout_seconds: number)
Poll GET /api/v2/statements/{handle} until the statement reaches a
| Argument | Type | Required | Description |
|---|
| statement_handle | string | yes | |
| poll_seconds | number | yes | |
| timeout_seconds | number | yes | |
fn cancel_statement(statement_handle: string)
Cancel a running statement via POST /api/v2/statements/{handle}/cancel.
| Argument | Type | Required | Description |
|---|
| statement_handle | string | yes | |
fn create_or_update(name: string, warehouse_type: enum, auto_suspend_seconds?: number, auto_resume: boolean, min_cluster_count: number, max_cluster_count: number, scaling_policy: enum, initially_suspended: boolean, comment?: string)
Reconcile via account state + Swamp data: SHOW WAREHOUSES for the
| Argument | Type | Required | Description |
|---|
| name | string | yes | |
| warehouse_type | enum | yes | |
| auto_suspend_seconds? | number | no | Seconds idle before auto-suspend. null disables auto-suspend. |
| auto_resume | boolean | yes | |
| min_cluster_count | number | yes | |
| max_cluster_count | number | yes | |
| scaling_policy | enum | yes | |
| initially_suspended | boolean | yes | If true (default), the warehouse is created in SUSPENDED state so |
| comment? | string | no | |