1. Packages
  2. Databricks Provider
  3. API Docs
  4. Dashboard
Databricks v1.63.0 published on Thursday, Mar 13, 2025 by Pulumi

databricks.Dashboard

Explore with Pulumi AI

This resource allows you to manage Databricks Dashboards. To manage Dashboards you must have a warehouse access on your databricks workspace.

Example Usage

Dashboard using serialized_dashboard attribute:

import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";

const starter = databricks.getSqlWarehouse({
    name: "Starter Warehouse",
});
const dashboard = new databricks.Dashboard("dashboard", {
    displayName: "New Dashboard",
    warehouseId: starter.then(starter => starter.id),
    serializedDashboard: "{\"pages\":[{\"name\":\"new_name\",\"displayName\":\"New Page\"}]}",
    embedCredentials: false,
    parentPath: "/Shared/provider-test",
});
Copy
import pulumi
import pulumi_databricks as databricks

starter = databricks.get_sql_warehouse(name="Starter Warehouse")
dashboard = databricks.Dashboard("dashboard",
    display_name="New Dashboard",
    warehouse_id=starter.id,
    serialized_dashboard="{\"pages\":[{\"name\":\"new_name\",\"displayName\":\"New Page\"}]}",
    embed_credentials=False,
    parent_path="/Shared/provider-test")
Copy
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 {
		starter, err := databricks.GetSqlWarehouse(ctx, &databricks.GetSqlWarehouseArgs{
			Name: pulumi.StringRef("Starter Warehouse"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = databricks.NewDashboard(ctx, "dashboard", &databricks.DashboardArgs{
			DisplayName:         pulumi.String("New Dashboard"),
			WarehouseId:         pulumi.String(starter.Id),
			SerializedDashboard: pulumi.String("{\"pages\":[{\"name\":\"new_name\",\"displayName\":\"New Page\"}]}"),
			EmbedCredentials:    pulumi.Bool(false),
			ParentPath:          pulumi.String("/Shared/provider-test"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;

return await Deployment.RunAsync(() => 
{
    var starter = Databricks.GetSqlWarehouse.Invoke(new()
    {
        Name = "Starter Warehouse",
    });

    var dashboard = new Databricks.Dashboard("dashboard", new()
    {
        DisplayName = "New Dashboard",
        WarehouseId = starter.Apply(getSqlWarehouseResult => getSqlWarehouseResult.Id),
        SerializedDashboard = "{\"pages\":[{\"name\":\"new_name\",\"displayName\":\"New Page\"}]}",
        EmbedCredentials = false,
        ParentPath = "/Shared/provider-test",
    });

});
Copy
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.GetSqlWarehouseArgs;
import com.pulumi.databricks.Dashboard;
import com.pulumi.databricks.DashboardArgs;
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 starter = DatabricksFunctions.getSqlWarehouse(GetSqlWarehouseArgs.builder()
            .name("Starter Warehouse")
            .build());

        var dashboard = new Dashboard("dashboard", DashboardArgs.builder()
            .displayName("New Dashboard")
            .warehouseId(starter.applyValue(getSqlWarehouseResult -> getSqlWarehouseResult.id()))
            .serializedDashboard("{\"pages\":[{\"name\":\"new_name\",\"displayName\":\"New Page\"}]}")
            .embedCredentials(false)
            .parentPath("/Shared/provider-test")
            .build());

    }
}
Copy
resources:
  dashboard:
    type: databricks:Dashboard
    properties:
      displayName: New Dashboard
      warehouseId: ${starter.id}
      serializedDashboard: '{"pages":[{"name":"new_name","displayName":"New Page"}]}'
      embedCredentials: false # Optional
      parentPath: /Shared/provider-test
variables:
  starter:
    fn::invoke:
      function: databricks:getSqlWarehouse
      arguments:
        name: Starter Warehouse
Copy

Dashboard using file_path attribute:

Create Dashboard Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Dashboard(name: string, args: DashboardArgs, opts?: CustomResourceOptions);
@overload
def Dashboard(resource_name: str,
              args: DashboardArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def Dashboard(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              parent_path: Optional[str] = None,
              display_name: Optional[str] = None,
              warehouse_id: Optional[str] = None,
              file_path: Optional[str] = None,
              embed_credentials: Optional[bool] = None,
              etag: Optional[str] = None,
              dashboard_change_detected: Optional[bool] = None,
              lifecycle_state: Optional[str] = None,
              path: Optional[str] = None,
              create_time: Optional[str] = None,
              md5: Optional[str] = None,
              serialized_dashboard: Optional[str] = None,
              update_time: Optional[str] = None,
              dashboard_id: Optional[str] = None)
func NewDashboard(ctx *Context, name string, args DashboardArgs, opts ...ResourceOption) (*Dashboard, error)
public Dashboard(string name, DashboardArgs args, CustomResourceOptions? opts = null)
public Dashboard(String name, DashboardArgs args)
public Dashboard(String name, DashboardArgs args, CustomResourceOptions options)
type: databricks:Dashboard
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DashboardArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DashboardArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DashboardArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DashboardArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DashboardArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var dashboardResource = new Databricks.Dashboard("dashboardResource", new()
{
    ParentPath = "string",
    DisplayName = "string",
    WarehouseId = "string",
    FilePath = "string",
    EmbedCredentials = false,
    Etag = "string",
    DashboardChangeDetected = false,
    LifecycleState = "string",
    Path = "string",
    CreateTime = "string",
    Md5 = "string",
    SerializedDashboard = "string",
    UpdateTime = "string",
    DashboardId = "string",
});
Copy
example, err := databricks.NewDashboard(ctx, "dashboardResource", &databricks.DashboardArgs{
	ParentPath:              pulumi.String("string"),
	DisplayName:             pulumi.String("string"),
	WarehouseId:             pulumi.String("string"),
	FilePath:                pulumi.String("string"),
	EmbedCredentials:        pulumi.Bool(false),
	Etag:                    pulumi.String("string"),
	DashboardChangeDetected: pulumi.Bool(false),
	LifecycleState:          pulumi.String("string"),
	Path:                    pulumi.String("string"),
	CreateTime:              pulumi.String("string"),
	Md5:                     pulumi.String("string"),
	SerializedDashboard:     pulumi.String("string"),
	UpdateTime:              pulumi.String("string"),
	DashboardId:             pulumi.String("string"),
})
Copy
var dashboardResource = new Dashboard("dashboardResource", DashboardArgs.builder()
    .parentPath("string")
    .displayName("string")
    .warehouseId("string")
    .filePath("string")
    .embedCredentials(false)
    .etag("string")
    .dashboardChangeDetected(false)
    .lifecycleState("string")
    .path("string")
    .createTime("string")
    .md5("string")
    .serializedDashboard("string")
    .updateTime("string")
    .dashboardId("string")
    .build());
Copy
dashboard_resource = databricks.Dashboard("dashboardResource",
    parent_path="string",
    display_name="string",
    warehouse_id="string",
    file_path="string",
    embed_credentials=False,
    etag="string",
    dashboard_change_detected=False,
    lifecycle_state="string",
    path="string",
    create_time="string",
    md5="string",
    serialized_dashboard="string",
    update_time="string",
    dashboard_id="string")
Copy
const dashboardResource = new databricks.Dashboard("dashboardResource", {
    parentPath: "string",
    displayName: "string",
    warehouseId: "string",
    filePath: "string",
    embedCredentials: false,
    etag: "string",
    dashboardChangeDetected: false,
    lifecycleState: "string",
    path: "string",
    createTime: "string",
    md5: "string",
    serializedDashboard: "string",
    updateTime: "string",
    dashboardId: "string",
});
Copy
type: databricks:Dashboard
properties:
    createTime: string
    dashboardChangeDetected: false
    dashboardId: string
    displayName: string
    embedCredentials: false
    etag: string
    filePath: string
    lifecycleState: string
    md5: string
    parentPath: string
    path: string
    serializedDashboard: string
    updateTime: string
    warehouseId: string
Copy

Dashboard Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Dashboard resource accepts the following input properties:

DisplayName This property is required. string
The display name of the dashboard.
ParentPath
This property is required.
Changes to this property will trigger replacement.
string
The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. If folder doesn't exist, it will be created.
WarehouseId This property is required. string
The warehouse ID used to run the dashboard.
CreateTime string
DashboardChangeDetected bool
DashboardId string
EmbedCredentials bool
Whether to embed credentials in the dashboard. Default is true.
Etag string
FilePath string
The path to the dashboard JSON file. Conflicts with serialized_dashboard.
LifecycleState string
Md5 string
Path string
SerializedDashboard string
The contents of the dashboard in serialized string form. Conflicts with file_path.
UpdateTime string
DisplayName This property is required. string
The display name of the dashboard.
ParentPath
This property is required.
Changes to this property will trigger replacement.
string
The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. If folder doesn't exist, it will be created.
WarehouseId This property is required. string
The warehouse ID used to run the dashboard.
CreateTime string
DashboardChangeDetected bool
DashboardId string
EmbedCredentials bool
Whether to embed credentials in the dashboard. Default is true.
Etag string
FilePath string
The path to the dashboard JSON file. Conflicts with serialized_dashboard.
LifecycleState string
Md5 string
Path string
SerializedDashboard string
The contents of the dashboard in serialized string form. Conflicts with file_path.
UpdateTime string
displayName This property is required. String
The display name of the dashboard.
parentPath
This property is required.
Changes to this property will trigger replacement.
String
The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. If folder doesn't exist, it will be created.
warehouseId This property is required. String
The warehouse ID used to run the dashboard.
createTime String
dashboardChangeDetected Boolean
dashboardId String
embedCredentials Boolean
Whether to embed credentials in the dashboard. Default is true.
etag String
filePath String
The path to the dashboard JSON file. Conflicts with serialized_dashboard.
lifecycleState String
md5 String
path String
serializedDashboard String
The contents of the dashboard in serialized string form. Conflicts with file_path.
updateTime String
displayName This property is required. string
The display name of the dashboard.
parentPath
This property is required.
Changes to this property will trigger replacement.
string
The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. If folder doesn't exist, it will be created.
warehouseId This property is required. string
The warehouse ID used to run the dashboard.
createTime string
dashboardChangeDetected boolean
dashboardId string
embedCredentials boolean
Whether to embed credentials in the dashboard. Default is true.
etag string
filePath string
The path to the dashboard JSON file. Conflicts with serialized_dashboard.
lifecycleState string
md5 string
path string
serializedDashboard string
The contents of the dashboard in serialized string form. Conflicts with file_path.
updateTime string
display_name This property is required. str
The display name of the dashboard.
parent_path
This property is required.
Changes to this property will trigger replacement.
str
The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. If folder doesn't exist, it will be created.
warehouse_id This property is required. str
The warehouse ID used to run the dashboard.
create_time str
dashboard_change_detected bool
dashboard_id str
embed_credentials bool
Whether to embed credentials in the dashboard. Default is true.
etag str
file_path str
The path to the dashboard JSON file. Conflicts with serialized_dashboard.
lifecycle_state str
md5 str
path str
serialized_dashboard str
The contents of the dashboard in serialized string form. Conflicts with file_path.
update_time str
displayName This property is required. String
The display name of the dashboard.
parentPath
This property is required.
Changes to this property will trigger replacement.
String
The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. If folder doesn't exist, it will be created.
warehouseId This property is required. String
The warehouse ID used to run the dashboard.
createTime String
dashboardChangeDetected Boolean
dashboardId String
embedCredentials Boolean
Whether to embed credentials in the dashboard. Default is true.
etag String
filePath String
The path to the dashboard JSON file. Conflicts with serialized_dashboard.
lifecycleState String
md5 String
path String
serializedDashboard String
The contents of the dashboard in serialized string form. Conflicts with file_path.
updateTime String

Outputs

All input properties are implicitly available as output properties. Additionally, the Dashboard resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Dashboard Resource

Get an existing Dashboard resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DashboardState, opts?: CustomResourceOptions): Dashboard
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        create_time: Optional[str] = None,
        dashboard_change_detected: Optional[bool] = None,
        dashboard_id: Optional[str] = None,
        display_name: Optional[str] = None,
        embed_credentials: Optional[bool] = None,
        etag: Optional[str] = None,
        file_path: Optional[str] = None,
        lifecycle_state: Optional[str] = None,
        md5: Optional[str] = None,
        parent_path: Optional[str] = None,
        path: Optional[str] = None,
        serialized_dashboard: Optional[str] = None,
        update_time: Optional[str] = None,
        warehouse_id: Optional[str] = None) -> Dashboard
func GetDashboard(ctx *Context, name string, id IDInput, state *DashboardState, opts ...ResourceOption) (*Dashboard, error)
public static Dashboard Get(string name, Input<string> id, DashboardState? state, CustomResourceOptions? opts = null)
public static Dashboard get(String name, Output<String> id, DashboardState state, CustomResourceOptions options)
resources:  _:    type: databricks:Dashboard    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CreateTime string
DashboardChangeDetected bool
DashboardId string
DisplayName string
The display name of the dashboard.
EmbedCredentials bool
Whether to embed credentials in the dashboard. Default is true.
Etag string
FilePath string
The path to the dashboard JSON file. Conflicts with serialized_dashboard.
LifecycleState string
Md5 string
ParentPath Changes to this property will trigger replacement. string
The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. If folder doesn't exist, it will be created.
Path string
SerializedDashboard string
The contents of the dashboard in serialized string form. Conflicts with file_path.
UpdateTime string
WarehouseId string
The warehouse ID used to run the dashboard.
CreateTime string
DashboardChangeDetected bool
DashboardId string
DisplayName string
The display name of the dashboard.
EmbedCredentials bool
Whether to embed credentials in the dashboard. Default is true.
Etag string
FilePath string
The path to the dashboard JSON file. Conflicts with serialized_dashboard.
LifecycleState string
Md5 string
ParentPath Changes to this property will trigger replacement. string
The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. If folder doesn't exist, it will be created.
Path string
SerializedDashboard string
The contents of the dashboard in serialized string form. Conflicts with file_path.
UpdateTime string
WarehouseId string
The warehouse ID used to run the dashboard.
createTime String
dashboardChangeDetected Boolean
dashboardId String
displayName String
The display name of the dashboard.
embedCredentials Boolean
Whether to embed credentials in the dashboard. Default is true.
etag String
filePath String
The path to the dashboard JSON file. Conflicts with serialized_dashboard.
lifecycleState String
md5 String
parentPath Changes to this property will trigger replacement. String
The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. If folder doesn't exist, it will be created.
path String
serializedDashboard String
The contents of the dashboard in serialized string form. Conflicts with file_path.
updateTime String
warehouseId String
The warehouse ID used to run the dashboard.
createTime string
dashboardChangeDetected boolean
dashboardId string
displayName string
The display name of the dashboard.
embedCredentials boolean
Whether to embed credentials in the dashboard. Default is true.
etag string
filePath string
The path to the dashboard JSON file. Conflicts with serialized_dashboard.
lifecycleState string
md5 string
parentPath Changes to this property will trigger replacement. string
The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. If folder doesn't exist, it will be created.
path string
serializedDashboard string
The contents of the dashboard in serialized string form. Conflicts with file_path.
updateTime string
warehouseId string
The warehouse ID used to run the dashboard.
create_time str
dashboard_change_detected bool
dashboard_id str
display_name str
The display name of the dashboard.
embed_credentials bool
Whether to embed credentials in the dashboard. Default is true.
etag str
file_path str
The path to the dashboard JSON file. Conflicts with serialized_dashboard.
lifecycle_state str
md5 str
parent_path Changes to this property will trigger replacement. str
The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. If folder doesn't exist, it will be created.
path str
serialized_dashboard str
The contents of the dashboard in serialized string form. Conflicts with file_path.
update_time str
warehouse_id str
The warehouse ID used to run the dashboard.
createTime String
dashboardChangeDetected Boolean
dashboardId String
displayName String
The display name of the dashboard.
embedCredentials Boolean
Whether to embed credentials in the dashboard. Default is true.
etag String
filePath String
The path to the dashboard JSON file. Conflicts with serialized_dashboard.
lifecycleState String
md5 String
parentPath Changes to this property will trigger replacement. String
The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. If folder doesn't exist, it will be created.
path String
serializedDashboard String
The contents of the dashboard in serialized string form. Conflicts with file_path.
updateTime String
warehouseId String
The warehouse ID used to run the dashboard.

Import

You can import a databricks_dashboard resource with ID like the following:

bash

$ pulumi import databricks:index/dashboard:Dashboard this <dashboard-id>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
databricks pulumi/pulumi-databricks
License
Apache-2.0
Notes
This Pulumi package is based on the databricks Terraform Provider.