UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

121 lines 5.4 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.SqlDashboard = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * > Please switch to databricks.Dashboard to author new AI/BI dashboards using the latest tooling. * * This resource is used to manage [Legacy dashboards](https://docs.databricks.com/sql/user/dashboards/index.html). To manage [SQL resources](https://docs.databricks.com/sql/get-started/concepts.html) you must have `databricksSqlAccess` on your databricks.Group or databricks_user. * * > documentation for this resource is a work in progress. * * A dashboard may have one or more widgets. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const sharedDir = new databricks.Directory("shared_dir", {path: "/Shared/Dashboards"}); * const d1 = new databricks.SqlDashboard("d1", { * name: "My Dashboard Name", * parent: pulumi.interpolate`folders/${sharedDir.objectId}`, * tags: [ * "some-tag", * "another-tag", * ], * }); * ``` * * Example permission to share dashboard with all users: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const d1 = new databricks.Permissions("d1", { * sqlDashboardId: d1DatabricksSqlDashboard.id, * accessControls: [{ * groupName: users.displayName, * permissionLevel: "CAN_RUN", * }], * }); * ``` * * ## Related Resources * * The following resources are often used in the same context: * * * End to end workspace management guide. * * databricks.SqlEndpoint to manage Databricks SQL [Endpoints](https://docs.databricks.com/sql/admin/sql-endpoints.html). * * databricks.SqlGlobalConfig to configure the security policy, databricks_instance_profile, and [data access properties](https://docs.databricks.com/sql/admin/data-access-configuration.html) for all databricks.SqlEndpoint of workspace. * * databricks.SqlPermissions to manage data object access control lists in Databricks workspaces for things like tables, views, databases, and [more](https://docs.databricks.com/security/access-control/table-acls/object-privileges.html). * * ## Import * * You can import a `databricks_sql_dashboard` resource with ID like the following: * * bash * * ```sh * $ pulumi import databricks:index/sqlDashboard:SqlDashboard this <dashboard-id> * ``` */ class SqlDashboard extends pulumi.CustomResource { /** * Get an existing SqlDashboard resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new SqlDashboard(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of SqlDashboard. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === SqlDashboard.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["dashboardFiltersEnabled"] = state ? state.dashboardFiltersEnabled : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["parent"] = state ? state.parent : undefined; resourceInputs["runAsRole"] = state ? state.runAsRole : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; } else { const args = argsOrState; resourceInputs["createdAt"] = args ? args.createdAt : undefined; resourceInputs["dashboardFiltersEnabled"] = args ? args.dashboardFiltersEnabled : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["parent"] = args ? args.parent : undefined; resourceInputs["runAsRole"] = args ? args.runAsRole : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["updatedAt"] = args ? args.updatedAt : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(SqlDashboard.__pulumiType, name, resourceInputs, opts); } } exports.SqlDashboard = SqlDashboard; /** @internal */ SqlDashboard.__pulumiType = 'databricks:index/sqlDashboard:SqlDashboard'; //# sourceMappingURL=sqlDashboard.js.map