snowflake.core.compute_pool.ComputePool

class snowflake.core.compute_pool.ComputePool(name: str, min_nodes: int, max_nodes: int, instance_family: str, auto_resume: bool | None = None, comment: str | None = None, state: str | None = None, num_services: int | None = None, num_jobs: int | None = None, auto_suspend_secs: int | None = None, active_nodes: int | None = None, idle_nodes: int | None = None, target_nodes: int | None = None, created_on: datetime | None = None, resumed_on: datetime | None = None, updated_on: datetime | None = None, owner: str | None = None, is_exclusive: bool | None = None, application: str | None = None, budget: str | None = None, error_code: str | None = None, status_message: str | None = None)

Bases: object

A model object representing the ComputePool resource.

Constructs an object of type ComputePool with the provided properties.

Parameters:
  • name (str) – A Snowflake object identifier.

  • min_nodes (int) – Minimum number of nodes for the compute pool.

  • max_nodes (int) – Maximum number of nodes for the compute pool.

  • instance_family (str) – Instance family for the compute pool.

  • auto_resume (bool, optional) – Whether Snowflake automatically resumes the compute pool when any statement that requires the compute pool is submitted.

  • comment (str, optional) – Comment describing the compute pool.

  • state (str, optional) – Current state of the compute pool. Possible values include UNKNOWN, STARTING, IDLE, ACTIVE, STOPPING, SUSPENDED, and RESIZING.

  • num_services (int, optional) – Number of services on the compute pool.

  • num_jobs (int, optional) – Number of jobs on the compute pool.

  • auto_suspend_secs (int, optional) – Number of seconds until the compute pool automatically suspends.

  • active_nodes (int, optional) – Number of currently active nodes on the compute pool.

  • idle_nodes (int, optional) – Number of currently idle nodes on the compute pool.

  • target_nodes (int, optional) – Number of target nodes on the compute pool.

  • created_on (datetime, optional) – Time the compute pool was created.

  • resumed_on (datetime, optional) – Time the compute pool was last resumed.

  • updated_on (datetime, optional) – Time the compute pool was last updated.

  • owner (str, optional) – Identifier for the current owner of the compute pool.

  • is_exclusive (bool, optional) – Whether a compute pool is created exclusively for a Snowflake Native App.

  • application (str, optional) – Name of the Snowflake Native App if the compute pool is created exclusively for the app.

  • budget (str, optional) – The name of the budget monitoring the credit usage of the compute pool.

  • error_code (str, optional) – Current error the compute pool hit if any.

  • status_message (str, optional) – Current status of the compute pool if any.

Methods

classmethod from_dict(obj: dict) ComputePoolModel

Creates an instance of ComputePool from a dict.

This method constructs a ComputePool object from a dictionary with the key-value pairs of its properties.

Parameters:

obj (dict) – A dictionary whose keys and values correspond to the properties of the resource object.

Returns:

A ComputePool object created using the input dictionary; this will fail if the required properties are missing.

Return type:

ComputePool

to_dict()

Creates a dictionary of the properties from a ComputePool.

This method constructs a dictionary with the key-value entries corresponding to the properties of the ComputePool object.

Returns:

A dictionary object created using the input model.

Return type:

dict

Language: English