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",
});
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")
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
})
}
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",
});
});
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());
}
}
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
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 string
- The unique name of the resource.
- args DashboardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args DashboardArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DashboardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
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",
});
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
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
The Dashboard resource accepts the following input properties:
- Display
Name string - The display name of the dashboard.
- Parent
Path 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.
- Warehouse
Id string - The warehouse ID used to run the dashboard.
- Create
Time string - Dashboard
Change boolDetected - Dashboard
Id string - Embed
Credentials bool - Whether to embed credentials in the dashboard. Default is
true
. - Etag string
- File
Path string - The path to the dashboard JSON file. Conflicts with
serialized_dashboard
. - Lifecycle
State string - Md5 string
- Path string
- Serialized
Dashboard string - The contents of the dashboard in serialized string form. Conflicts with
file_path
. - Update
Time string
- Display
Name string - The display name of the dashboard.
- Parent
Path 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.
- Warehouse
Id string - The warehouse ID used to run the dashboard.
- Create
Time string - Dashboard
Change boolDetected - Dashboard
Id string - Embed
Credentials bool - Whether to embed credentials in the dashboard. Default is
true
. - Etag string
- File
Path string - The path to the dashboard JSON file. Conflicts with
serialized_dashboard
. - Lifecycle
State string - Md5 string
- Path string
- Serialized
Dashboard string - The contents of the dashboard in serialized string form. Conflicts with
file_path
. - Update
Time string
- display
Name String - The display name of the dashboard.
- parent
Path 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.
- warehouse
Id String - The warehouse ID used to run the dashboard.
- create
Time String - dashboard
Change BooleanDetected - dashboard
Id String - embed
Credentials Boolean - Whether to embed credentials in the dashboard. Default is
true
. - etag String
- file
Path String - The path to the dashboard JSON file. Conflicts with
serialized_dashboard
. - lifecycle
State String - md5 String
- path String
- serialized
Dashboard String - The contents of the dashboard in serialized string form. Conflicts with
file_path
. - update
Time String
- display
Name string - The display name of the dashboard.
- parent
Path 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.
- warehouse
Id string - The warehouse ID used to run the dashboard.
- create
Time string - dashboard
Change booleanDetected - dashboard
Id string - embed
Credentials boolean - Whether to embed credentials in the dashboard. Default is
true
. - etag string
- file
Path string - The path to the dashboard JSON file. Conflicts with
serialized_dashboard
. - lifecycle
State string - md5 string
- path string
- serialized
Dashboard string - The contents of the dashboard in serialized string form. Conflicts with
file_path
. - update
Time string
- display_
name str - The display name of the dashboard.
- parent_
path 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 str - The warehouse ID used to run the dashboard.
- create_
time str - dashboard_
change_ booldetected - 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
- display
Name String - The display name of the dashboard.
- parent
Path 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.
- warehouse
Id String - The warehouse ID used to run the dashboard.
- create
Time String - dashboard
Change BooleanDetected - dashboard
Id String - embed
Credentials Boolean - Whether to embed credentials in the dashboard. Default is
true
. - etag String
- file
Path String - The path to the dashboard JSON file. Conflicts with
serialized_dashboard
. - lifecycle
State String - md5 String
- path String
- serialized
Dashboard String - The contents of the dashboard in serialized string form. Conflicts with
file_path
. - update
Time 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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Create
Time string - Dashboard
Change boolDetected - Dashboard
Id string - Display
Name string - The display name of the dashboard.
- Embed
Credentials bool - Whether to embed credentials in the dashboard. Default is
true
. - Etag string
- File
Path string - The path to the dashboard JSON file. Conflicts with
serialized_dashboard
. - Lifecycle
State string - Md5 string
- Parent
Path 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
- Serialized
Dashboard string - The contents of the dashboard in serialized string form. Conflicts with
file_path
. - Update
Time string - Warehouse
Id string - The warehouse ID used to run the dashboard.
- Create
Time string - Dashboard
Change boolDetected - Dashboard
Id string - Display
Name string - The display name of the dashboard.
- Embed
Credentials bool - Whether to embed credentials in the dashboard. Default is
true
. - Etag string
- File
Path string - The path to the dashboard JSON file. Conflicts with
serialized_dashboard
. - Lifecycle
State string - Md5 string
- Parent
Path 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
- Serialized
Dashboard string - The contents of the dashboard in serialized string form. Conflicts with
file_path
. - Update
Time string - Warehouse
Id string - The warehouse ID used to run the dashboard.
- create
Time String - dashboard
Change BooleanDetected - dashboard
Id String - display
Name String - The display name of the dashboard.
- embed
Credentials Boolean - Whether to embed credentials in the dashboard. Default is
true
. - etag String
- file
Path String - The path to the dashboard JSON file. Conflicts with
serialized_dashboard
. - lifecycle
State String - md5 String
- parent
Path 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
- serialized
Dashboard String - The contents of the dashboard in serialized string form. Conflicts with
file_path
. - update
Time String - warehouse
Id String - The warehouse ID used to run the dashboard.
- create
Time string - dashboard
Change booleanDetected - dashboard
Id string - display
Name string - The display name of the dashboard.
- embed
Credentials boolean - Whether to embed credentials in the dashboard. Default is
true
. - etag string
- file
Path string - The path to the dashboard JSON file. Conflicts with
serialized_dashboard
. - lifecycle
State string - md5 string
- parent
Path 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
- serialized
Dashboard string - The contents of the dashboard in serialized string form. Conflicts with
file_path
. - update
Time string - warehouse
Id string - The warehouse ID used to run the dashboard.
- create_
time str - dashboard_
change_ booldetected - 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 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.
- create
Time String - dashboard
Change BooleanDetected - dashboard
Id String - display
Name String - The display name of the dashboard.
- embed
Credentials Boolean - Whether to embed credentials in the dashboard. Default is
true
. - etag String
- file
Path String - The path to the dashboard JSON file. Conflicts with
serialized_dashboard
. - lifecycle
State String - md5 String
- parent
Path 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
- serialized
Dashboard String - The contents of the dashboard in serialized string form. Conflicts with
file_path
. - update
Time String - warehouse
Id 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>
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.