class Databricks::Resources::InstancePools

Provide the Instance Pools API cf. docs.databricks.com/dev-tools/api/latest/instance-pools.html

Public Instance Methods

create(**properties) click to toggle source

Create a new instance pool.

Parameters
  • properties (Hash<Symbol,Object>): Properties to create the instance pool

Result
  • InstancePool: The new instance pool created

# File lib/databricks/resources/instance_pools.rb, line 33
def create(**properties)
  instance_pool = new_resource(:instance_pool, post_json('instance-pools/create', properties))
  instance_pool.add_properties(properties)
  instance_pool
end
get(instance_pool_id) click to toggle source

Get an instance pool based on its instance_pool_id

Parameters
  • instance_pool_id (String): The instance pool id to get

Result
  • InstancePool: The instance pool

# File lib/databricks/resources/instance_pools.rb, line 23
def get(instance_pool_id)
  new_resource(:instance_pool, get_json('instance-pools/get', { instance_pool_id: instance_pool_id }))
end
list() click to toggle source

List instance pools

Result
  • Array<InstancePool>: List of instance pools

# File lib/databricks/resources/instance_pools.rb, line 13
def list
  (get_json('instance-pools/list')['instance_pools'] || []).map { |properties| new_resource(:instance_pool, properties) }
end