databricks logo
Databricks v1.6.0, Jan 25 23

databricks.getInstancePool

Example Usage

Referring to an instance pool by name

using System.Collections.Generic;
using Pulumi;
using Databricks = Pulumi.Databricks;

return await Deployment.RunAsync(() => 
{
    var pool = Databricks.GetInstancePool.Invoke(new()
    {
        Name = "All spot",
    });

    var myCluster = new Databricks.Cluster("myCluster", new()
    {
        InstancePoolId = data.Databricks_instance_pool.Pool.Id,
    });

    // ...
});
package main

import (
	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := databricks.LookupInstancePool(ctx, &databricks.LookupInstancePoolArgs{
			Name: "All spot",
		}, nil)
		if err != nil {
			return err
		}
		_, err = databricks.NewCluster(ctx, "myCluster", &databricks.ClusterArgs{
			InstancePoolId: pulumi.Any(data.Databricks_instance_pool.Pool.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.DatabricksFunctions;
import com.pulumi.databricks.inputs.GetInstancePoolArgs;
import com.pulumi.databricks.Cluster;
import com.pulumi.databricks.ClusterArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var pool = DatabricksFunctions.getInstancePool(GetInstancePoolArgs.builder()
            .name("All spot")
            .build());

        var myCluster = new Cluster("myCluster", ClusterArgs.builder()        
            .instancePoolId(data.databricks_instance_pool().pool().id())
            .build());

    }
}
import pulumi
import pulumi_databricks as databricks

pool = databricks.get_instance_pool(name="All spot")
my_cluster = databricks.Cluster("myCluster", instance_pool_id=data["databricks_instance_pool"]["pool"]["id"])
# ...
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";

const pool = databricks.getInstancePool({
    name: "All spot",
});
const myCluster = new databricks.Cluster("myCluster", {instancePoolId: data.databricks_instance_pool.pool.id});
// ...
resources:
  myCluster:
    type: databricks:Cluster
    properties:
      instancePoolId: ${data.databricks_instance_pool.pool.id}
variables:
  pool:
    fn::invoke:
      Function: databricks:getInstancePool
      Arguments:
        name: All spot

Using getInstancePool

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getInstancePool(args: GetInstancePoolArgs, opts?: InvokeOptions): Promise<GetInstancePoolResult>
function getInstancePoolOutput(args: GetInstancePoolOutputArgs, opts?: InvokeOptions): Output<GetInstancePoolResult>
def get_instance_pool(name: Optional[str] = None,
                      pool_info: Optional[GetInstancePoolPoolInfo] = None,
                      opts: Optional[InvokeOptions] = None) -> GetInstancePoolResult
def get_instance_pool_output(name: Optional[pulumi.Input[str]] = None,
                      pool_info: Optional[pulumi.Input[GetInstancePoolPoolInfoArgs]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetInstancePoolResult]
func LookupInstancePool(ctx *Context, args *LookupInstancePoolArgs, opts ...InvokeOption) (*LookupInstancePoolResult, error)
func LookupInstancePoolOutput(ctx *Context, args *LookupInstancePoolOutputArgs, opts ...InvokeOption) LookupInstancePoolResultOutput

> Note: This function is named LookupInstancePool in the Go SDK.

public static class GetInstancePool 
{
    public static Task<GetInstancePoolResult> InvokeAsync(GetInstancePoolArgs args, InvokeOptions? opts = null)
    public static Output<GetInstancePoolResult> Invoke(GetInstancePoolInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstancePoolResult> getInstancePool(GetInstancePoolArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: databricks:index/getInstancePool:getInstancePool
  arguments:
    # arguments dictionary

The following arguments are supported:

Name string

Name of the instance pool. The instance pool must exist before this resource can be planned.

PoolInfo GetInstancePoolPoolInfo

block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.

Name string

Name of the instance pool. The instance pool must exist before this resource can be planned.

PoolInfo GetInstancePoolPoolInfo

block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.

name String

Name of the instance pool. The instance pool must exist before this resource can be planned.

poolInfo GetInstancePoolPoolInfo

block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.

name string

Name of the instance pool. The instance pool must exist before this resource can be planned.

poolInfo GetInstancePoolPoolInfo

block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.

name str

Name of the instance pool. The instance pool must exist before this resource can be planned.

pool_info GetInstancePoolPoolInfo

block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.

name String

Name of the instance pool. The instance pool must exist before this resource can be planned.

poolInfo Property Map

block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.

getInstancePool Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Name string
PoolInfo GetInstancePoolPoolInfo

block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.

Id string

The provider-assigned unique ID for this managed resource.

Name string
PoolInfo GetInstancePoolPoolInfo

block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.

id String

The provider-assigned unique ID for this managed resource.

name String
poolInfo GetInstancePoolPoolInfo

block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.

id string

The provider-assigned unique ID for this managed resource.

name string
poolInfo GetInstancePoolPoolInfo

block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.

id str

The provider-assigned unique ID for this managed resource.

name str
pool_info GetInstancePoolPoolInfo

block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.

id String

The provider-assigned unique ID for this managed resource.

name String
poolInfo Property Map

block describing instance pool and its state. Check documentation for databricks.InstancePool for a list of exposed attributes.

Supporting Types

GetInstancePoolPoolInfo

GetInstancePoolPoolInfoAwsAttributes

GetInstancePoolPoolInfoAzureAttributes

GetInstancePoolPoolInfoDiskSpec

GetInstancePoolPoolInfoDiskSpecDiskType

GetInstancePoolPoolInfoGcpAttributes

GetInstancePoolPoolInfoInstancePoolFleetAttribute

GetInstancePoolPoolInfoInstancePoolFleetAttributeFleetOnDemandOption

GetInstancePoolPoolInfoInstancePoolFleetAttributeFleetSpotOption

GetInstancePoolPoolInfoInstancePoolFleetAttributeLaunchTemplateOverride

GetInstancePoolPoolInfoPreloadedDockerImage

GetInstancePoolPoolInfoPreloadedDockerImageBasicAuth

Password string
Username string
Password string
Username string
password String
username String
password string
username string
password String
username String

GetInstancePoolPoolInfoStats

Package Details

Repository
databricks pulumi/pulumi-databricks
License
Apache-2.0
Notes

This Pulumi package is based on the databricks Terraform Provider.