snowflake.core.warehouse.WarehouseResource¶
- class snowflake.core.warehouse.WarehouseResource(name: str, collection: WarehouseCollection)¶
Bases:
ObjectReferenceMixin[WarehouseCollection]A reference to a Warehouse in Snowflake.
Attributes
- root¶
Methods
- __init__(name: str, collection: WarehouseCollection)¶
- abort_all_queries() None¶
Abort all queries running or queueing on this warehouse.
Example
Use warehouse reference to abort all queries:
- create_or_update(warehouse: WarehouseModel) None¶
Create a warehouse in Snowflake or update one if it already exists.
- Parameters:
warehouse – an instance of
Warehouse.
Example
Create a warehouse on Snowflake server and get the reference to it:
- delete() None¶
Delete this warehouse.
Example
Use warehouse reference to delete a warehouse:
- fetch() WarehouseModel¶
Retrieve the warehouse resource.
Example
Use warehouse reference to fetch a warehouse:
- rename(new_name: str) None¶
Rename this warehouse.
This function will ignore other parameters in warehous instance, use create_or_update() to udpate parameters.
- Parameters:
new_name – an instance of
Warehouse.
Example
Use warehouse reference to renane a warehouse:
- resume() None¶
Resume the warehouse.
Example
Use warehouse reference to resume a warehouse:
- suspend() None¶
Suspend the warehouse.
Example
Use warehouse reference to suspend a warehouse: