Skip to main content

instance_pools

Operations on a instance_pools resource.

Overview

Nameinstance_pools
TypeResource
Iddatabricks_workspace.compute.instance_pools

Fields

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

Methods

NameAccessible byRequired ParamsDescription
getSELECTinstance_pool_id, deployment_nameRetrieve the information for an instance pool based on its identifier.
listSELECTdeployment_nameGets a list of instance pools with their statistics.
createINSERTdeployment_nameCreates a new instance pool using idle and ready-to-use cloud instances.
deleteDELETEdeployment_nameDeletes the instance pool permanently. The idle instances in the pool are terminated asynchronously.
editREPLACEdeployment_nameModifies the configuration of an existing instance pool.

SELECT examples

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

INSERT example

Use the following StackQL query and manifest file to create a new instance_pools resource.

/*+ create */
INSERT INTO databricks_workspace.compute.instance_pools (
deployment_name,
data__instance_pool_name,
data__node_type_id,
data__min_idle_instances,
data__aws_attributes,
data__custom_tags
)
SELECT
'{{ deployment_name }}',
'{{ instance_pool_name }}',
'{{ node_type_id }}',
'{{ min_idle_instances }}',
'{{ aws_attributes }}',
'{{ custom_tags }}'
;

REPLACE example

Replaces a instance_pools resource.

/*+ update */
-- replace field1, field2, etc. with the fields you want to update
REPLACE databricks_workspace.compute.instance_pools
SET field1 = '{ value1 }',
field2 = '{ value2 }', ...
WHERE deployment_name = '{{ deployment_name }}';

DELETE example

Deletes a instance_pools resource.

/*+ delete */
DELETE FROM databricks_workspace.compute.instance_pools
WHERE deployment_name = '{{ deployment_name }}';