1. Registry
  2. Packages
  3. Databricks Provider
  4. API Docs
  5. getSandbox
Viewing docs for Databricks v1.112.0
published on Thursday, Sep 24, 2026 by Pulumi
databricks logo databricks logo
Viewing docs for Databricks v1.112.0
published on Thursday, Sep 24, 2026 by Pulumi

    Public Beta

    API Documentation

    Retrieves the configuration and runtime status of a single Sandbox by its resource name. Use this data source to read an existing sandbox’s spec and its current lifecycle state.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const _this = databricks.getSandbox({
        name: "sandboxes/my-sandbox",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.get_sandbox(name="sandboxes/my-sandbox")
    
    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.GetSandbox(ctx, &databricks.LookupSandboxArgs{
    			Name: "sandboxes/my-sandbox",
    		}, nil)
    		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 @this = Databricks.GetSandbox.Invoke(new()
        {
            Name = "sandboxes/my-sandbox",
        });
    
    });
    
    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.GetSandboxArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 this = DatabricksFunctions.getSandbox(GetSandboxArgs.builder()
                .name("sandboxes/my-sandbox")
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          function: databricks:getSandbox
          arguments:
            name: sandboxes/my-sandbox
    
    pulumi {
      required_providers {
        databricks = {
          source = "pulumi/databricks"
        }
      }
    }
    
    data "databricks_getsandbox" "this" {
      name = "sandboxes/my-sandbox"
    }
    

    Using getSandbox

    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 getSandbox(args: GetSandboxArgs, opts?: InvokeOptions): Promise<GetSandboxResult>
    function getSandboxOutput(args: GetSandboxOutputArgs, opts?: InvokeOutputOptions): Output<GetSandboxResult>
    def get_sandbox(name: Optional[str] = None,
                    provider_config: Optional[GetSandboxProviderConfig] = None,
                    opts: Optional[InvokeOptions] = None) -> GetSandboxResult
    def get_sandbox_output(name: pulumi.Input[Optional[str]] = None,
                    provider_config: pulumi.Input[Optional[GetSandboxProviderConfigArgs]] = None,
                    opts: Optional[InvokeOutputOptions] = None) -> Output[GetSandboxResult]
    func LookupSandbox(ctx *Context, args *LookupSandboxArgs, opts ...InvokeOption) (*LookupSandboxResult, error)
    func LookupSandboxOutput(ctx *Context, args *LookupSandboxOutputArgs, opts ...InvokeOption) LookupSandboxResultOutput

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

    public static class GetSandbox 
    {
        public static Task<GetSandboxResult> InvokeAsync(GetSandboxArgs args, InvokeOptions? opts = null)
        public static Output<GetSandboxResult> Invoke(GetSandboxInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetSandboxResult> Invoke(GetSandboxInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetSandboxResult> getSandbox(GetSandboxArgs args, InvokeOptions options)
    public static Output<GetSandboxResult> getSandbox(GetSandboxArgs args, InvokeOptions options)
    public static Output<GetSandboxResult> getSandbox(GetSandboxArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: databricks:index/getSandbox:getSandbox
      arguments:
        # arguments dictionary
    data "databricks_get_sandbox" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    ProviderConfig GetSandboxProviderConfig
    Configure the provider for management through account provider.
    Name string
    The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    ProviderConfig GetSandboxProviderConfig
    Configure the provider for management through account provider.
    name string
    The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    provider_config object
    Configure the provider for management through account provider.
    name String
    The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    providerConfig GetSandboxProviderConfig
    Configure the provider for management through account provider.
    name string
    The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    providerConfig GetSandboxProviderConfig
    Configure the provider for management through account provider.
    name str
    The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    provider_config GetSandboxProviderConfig
    Configure the provider for management through account provider.
    name String
    The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    providerConfig Property Map
    Configure the provider for management through account provider.

    getSandbox Result

    The following output properties are available:

    CreateTime string
    (string) - Output only. The creation time of the sandbox
    DisplayName string
    (string) - Human-readable display label for the sandbox. At most 256 characters
    Name string
    (string) - The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    Spec GetSandboxSpec
    (SandboxSpec) - The desired configuration of the sandbox, supplied by the caller at creation time
    Status GetSandboxStatus
    (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
    UpdateTime string
    (string) - Output only. The last update time of the sandbox metadata and spec
    ProviderConfig GetSandboxProviderConfig
    CreateTime string
    (string) - Output only. The creation time of the sandbox
    DisplayName string
    (string) - Human-readable display label for the sandbox. At most 256 characters
    Name string
    (string) - The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    Spec GetSandboxSpec
    (SandboxSpec) - The desired configuration of the sandbox, supplied by the caller at creation time
    Status GetSandboxStatus
    (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
    UpdateTime string
    (string) - Output only. The last update time of the sandbox metadata and spec
    ProviderConfig GetSandboxProviderConfig
    create_time string
    (string) - Output only. The creation time of the sandbox
    display_name string
    (string) - Human-readable display label for the sandbox. At most 256 characters
    name string
    (string) - The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    spec object
    (SandboxSpec) - The desired configuration of the sandbox, supplied by the caller at creation time
    status object
    (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
    update_time string
    (string) - Output only. The last update time of the sandbox metadata and spec
    provider_config object
    createTime String
    (string) - Output only. The creation time of the sandbox
    displayName String
    (string) - Human-readable display label for the sandbox. At most 256 characters
    name String
    (string) - The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    spec GetSandboxSpec
    (SandboxSpec) - The desired configuration of the sandbox, supplied by the caller at creation time
    status GetSandboxStatus
    (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
    updateTime String
    (string) - Output only. The last update time of the sandbox metadata and spec
    providerConfig GetSandboxProviderConfig
    createTime string
    (string) - Output only. The creation time of the sandbox
    displayName string
    (string) - Human-readable display label for the sandbox. At most 256 characters
    name string
    (string) - The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    spec GetSandboxSpec
    (SandboxSpec) - The desired configuration of the sandbox, supplied by the caller at creation time
    status GetSandboxStatus
    (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
    updateTime string
    (string) - Output only. The last update time of the sandbox metadata and spec
    providerConfig GetSandboxProviderConfig
    create_time str
    (string) - Output only. The creation time of the sandbox
    display_name str
    (string) - Human-readable display label for the sandbox. At most 256 characters
    name str
    (string) - The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    spec GetSandboxSpec
    (SandboxSpec) - The desired configuration of the sandbox, supplied by the caller at creation time
    status GetSandboxStatus
    (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
    update_time str
    (string) - Output only. The last update time of the sandbox metadata and spec
    provider_config GetSandboxProviderConfig
    createTime String
    (string) - Output only. The creation time of the sandbox
    displayName String
    (string) - Human-readable display label for the sandbox. At most 256 characters
    name String
    (string) - The sandbox resource name, in the form sandboxes/{sandbox_id}. Derived from sandboxId; any value supplied in a create or update request body is ignored
    spec Property Map
    (SandboxSpec) - The desired configuration of the sandbox, supplied by the caller at creation time
    status Property Map
    (SandboxStatus) - The observed runtime state of the sandbox, populated by the server
    updateTime String
    (string) - Output only. The last update time of the sandbox metadata and spec
    providerConfig Property Map

    Supporting Types

    GetSandboxProviderConfig

    WorkspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    WorkspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspace_id string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId String
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspace_id str
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId String
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.

    GetSandboxSpec

    Compute GetSandboxSpecCompute
    (ComputeSpec) - Compute configuration (size, inactivity timeout) requested for the sandbox
    Compute GetSandboxSpecCompute
    (ComputeSpec) - Compute configuration (size, inactivity timeout) requested for the sandbox
    compute object
    (ComputeSpec) - Compute configuration (size, inactivity timeout) requested for the sandbox
    compute GetSandboxSpecCompute
    (ComputeSpec) - Compute configuration (size, inactivity timeout) requested for the sandbox
    compute GetSandboxSpecCompute
    (ComputeSpec) - Compute configuration (size, inactivity timeout) requested for the sandbox
    compute GetSandboxSpecCompute
    (ComputeSpec) - Compute configuration (size, inactivity timeout) requested for the sandbox
    compute Property Map
    (ComputeSpec) - Compute configuration (size, inactivity timeout) requested for the sandbox

    GetSandboxSpecCompute

    InactivityTimeout string
    (string) - Idle duration after which the sandbox is automatically terminated
    InactivityTimeout string
    (string) - Idle duration after which the sandbox is automatically terminated
    inactivity_timeout string
    (string) - Idle duration after which the sandbox is automatically terminated
    inactivityTimeout String
    (string) - Idle duration after which the sandbox is automatically terminated
    inactivityTimeout string
    (string) - Idle duration after which the sandbox is automatically terminated
    inactivity_timeout str
    (string) - Idle duration after which the sandbox is automatically terminated
    inactivityTimeout String
    (string) - Idle duration after which the sandbox is automatically terminated

    GetSandboxStatus

    State string
    (string) - Lifecycle state of the sandbox. Possible values are: SANDBOX_STATE_PENDING, SANDBOX_STATE_RUNNING, SANDBOX_STATE_STOPPED, SANDBOX_STATE_STOPPING
    State string
    (string) - Lifecycle state of the sandbox. Possible values are: SANDBOX_STATE_PENDING, SANDBOX_STATE_RUNNING, SANDBOX_STATE_STOPPED, SANDBOX_STATE_STOPPING
    state string
    (string) - Lifecycle state of the sandbox. Possible values are: SANDBOX_STATE_PENDING, SANDBOX_STATE_RUNNING, SANDBOX_STATE_STOPPED, SANDBOX_STATE_STOPPING
    state String
    (string) - Lifecycle state of the sandbox. Possible values are: SANDBOX_STATE_PENDING, SANDBOX_STATE_RUNNING, SANDBOX_STATE_STOPPED, SANDBOX_STATE_STOPPING
    state string
    (string) - Lifecycle state of the sandbox. Possible values are: SANDBOX_STATE_PENDING, SANDBOX_STATE_RUNNING, SANDBOX_STATE_STOPPED, SANDBOX_STATE_STOPPING
    state str
    (string) - Lifecycle state of the sandbox. Possible values are: SANDBOX_STATE_PENDING, SANDBOX_STATE_RUNNING, SANDBOX_STATE_STOPPED, SANDBOX_STATE_STOPPING
    state String
    (string) - Lifecycle state of the sandbox. Possible values are: SANDBOX_STATE_PENDING, SANDBOX_STATE_RUNNING, SANDBOX_STATE_STOPPED, SANDBOX_STATE_STOPPING

    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 logo
    Viewing docs for Databricks v1.112.0
    published on Thursday, Sep 24, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial