1. Packages
  2. Databricks
  3. API Docs
  4. getInstancePool
Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi

databricks.getInstancePool

Explore with Pulumi AI

databricks logo
Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi

    Note If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add depends_on attribute in order to prevent default auth: cannot configure default credentials errors.

    Retrieves information about databricks_instance_pool.

    Example Usage

    Referring to an instance pool by name:

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const pool = databricks.getInstancePool({
        name: "All spot",
    });
    const myCluster = new databricks.Cluster("my_cluster", {instancePoolId: pool.then(pool => pool.id)});
    
    import pulumi
    import pulumi_databricks as databricks
    
    pool = databricks.get_instance_pool(name="All spot")
    my_cluster = databricks.Cluster("my_cluster", instance_pool_id=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 {
    		pool, err := databricks.LookupInstancePool(ctx, &databricks.LookupInstancePoolArgs{
    			Name: "All spot",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = databricks.NewCluster(ctx, "my_cluster", &databricks.ClusterArgs{
    			InstancePoolId: pulumi.String(pool.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var pool = Databricks.GetInstancePool.Invoke(new()
        {
            Name = "All spot",
        });
    
        var myCluster = new Databricks.Cluster("my_cluster", new()
        {
            InstancePoolId = pool.Apply(getInstancePoolResult => getInstancePoolResult.Id),
        });
    
    });
    
    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(pool.applyValue(getInstancePoolResult -> getInstancePoolResult.id()))
                .build());
    
        }
    }
    
    resources:
      myCluster:
        type: databricks:Cluster
        name: my_cluster
        properties:
          instancePoolId: ${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.
    databricks logo
    Databricks v1.56.0 published on Tuesday, Nov 12, 2024 by Pulumi