Skip to main content

instance_pools

Creates, updates, deletes, gets or lists an instance_pools resource.

Overview

Nameinstance_pools
TypeResource
Iddatabricks_workspace.compute.instance_pools

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
instance_pool_idstring
node_type_idstring
instance_pool_namestring
aws_attributesobject
default_tagsobject
disk_specobject
enable_elastic_diskboolean
idle_instance_autotermination_minutesinteger
min_idle_instancesinteger
preloaded_spark_versionsarray
statestring
statsobject
statusobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectdeployment_nameGets a list of instance pools with their statistics.
getselectdeployment_nameRetrieve the information for an instance pool based on its identifier.
createinsertdeployment_nameCreates a new instance pool using idle and ready-to-use cloud instances.
editreplacedeployment_nameModifies the configuration of an existing instance pool.
deletedeletedeployment_nameDeletes the instance pool permanently. The idle instances in the pool are terminated asynchronously.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

SELECT examples

Gets a list of instance pools with their statistics.

SELECT
instance_pool_id,
node_type_id,
instance_pool_name,
aws_attributes,
default_tags,
disk_spec,
enable_elastic_disk,
idle_instance_autotermination_minutes,
min_idle_instances,
preloaded_spark_versions,
state,
stats,
status
FROM databricks_workspace.compute.instance_pools
WHERE deployment_name = '{{ deployment_name }}' -- required;

INSERT examples

Creates a new instance pool using idle and ready-to-use cloud instances.

INSERT INTO databricks_workspace.compute.instance_pools (
data__instance_pool_name,
data__min_idle_instances,
data__max_capacity,
data__node_type_id,
data__idle_instance_autotermination_minutes,
data__enable_elastic_disk,
data__preloaded_spark_versions,
data__aws_attributes,
data__custom_tags,
data__disk_spec,
data__preloaded_docker_images,
deployment_name
)
SELECT
'{{ instance_pool_name }}',
'{{ min_idle_instances }}',
'{{ max_capacity }}',
'{{ node_type_id }}',
'{{ idle_instance_autotermination_minutes }}',
'{{ enable_elastic_disk }}',
'{{ preloaded_spark_versions }}',
'{{ aws_attributes }}',
'{{ custom_tags }}',
'{{ disk_spec }}',
'{{ preloaded_docker_images }}',
'{{ deployment_name }}'
RETURNING
instance_pool_id
;

REPLACE examples

Modifies the configuration of an existing instance pool.

REPLACE databricks_workspace.compute.instance_pools
SET
data__instance_pool_name = '{{ instance_pool_name }}',
data__min_idle_instances = '{{ min_idle_instances }}',
data__max_capacity = '{{ max_capacity }}',
data__idle_instance_autotermination_minutes = '{{ idle_instance_autotermination_minutes }}',
data__instance_pool_id = '{{ instance_pool_id }}',
data__node_type_id = '{{ node_type_id }}',
data__custom_tags = '{{ custom_tags }}'
WHERE
deployment_name = '{{ deployment_name }}' --required;

DELETE examples

Deletes the instance pool permanently. The idle instances in the pool are terminated asynchronously.

DELETE FROM databricks_workspace.compute.instance_pools
WHERE deployment_name = '{{ deployment_name }}' --required;