instance_pools
Creates, updates, deletes, gets or lists an instance_pools
resource.
Overview
Name | instance_pools |
Type | Resource |
Id | databricks_workspace.compute.instance_pools |
Fields
The following fields are returned by SELECT
queries:
- list
- get
Name | Datatype | Description |
---|---|---|
instance_pool_id | string | |
node_type_id | string | |
instance_pool_name | string | |
aws_attributes | object | |
default_tags | object | |
disk_spec | object | |
enable_elastic_disk | boolean | |
idle_instance_autotermination_minutes | integer | |
min_idle_instances | integer | |
preloaded_spark_versions | array | |
state | string | |
stats | object | |
status | object |
Name | Datatype | Description |
---|---|---|
instance_pool_id | string | |
node_type_id | string | |
instance_pool_name | string | |
aws_attributes | object | |
custom_tags | object | |
default_tags | object | |
disk_spec | object | |
enable_elastic_disk | boolean | |
idle_instance_autotermination_minutes | integer | |
min_idle_instances | integer | |
preloaded_spark_versions | array | |
state | string | |
stats | object | |
status | object |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | deployment_name | Gets a list of instance pools with their statistics. | |
get | select | deployment_name | Retrieve the information for an instance pool based on its identifier. | |
create | insert | deployment_name | Creates a new instance pool using idle and ready-to-use cloud instances. | |
edit | replace | deployment_name | Modifies the configuration of an existing instance pool. | |
delete | delete | deployment_name | Deletes 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.
Name | Datatype | Description |
---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
SELECT
examples
- list
- get
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;
Retrieve the information for an instance pool based on its identifier.
SELECT
instance_pool_id,
node_type_id,
instance_pool_name,
aws_attributes,
custom_tags,
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
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: instance_pools
props:
- name: deployment_name
value: string
description: Required parameter for the instance_pools resource.
- name: instance_pool_name
value: required
- name: min_idle_instances
value: string
- name: max_capacity
value: int32
- name: node_type_id
value: int32
- name: idle_instance_autotermination_minutes
value: required
- name: enable_elastic_disk
value: string
- name: preloaded_spark_versions
value: int32
- name: aws_attributes
value: object
- name: custom_tags
value: object
- name: disk_spec
value: object
- name: preloaded_docker_images
value: Array of object
REPLACE
examples
- edit
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
- delete
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;