UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

98 lines 4.32 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.Directory = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * This resource allows you to manage directories in [Databricks Workpace](https://docs.databricks.com/workspace/workspace-objects.html). * * ## Example Usage * * You can declare a Pulumi-managed directory by specifying the `path` attribute of the corresponding directory. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const myCustomDirectory = new databricks.Directory("my_custom_directory", {path: "/my_custom_directory"}); * ``` * * ## Access Control * * - databricks.Permissions can control which groups or individual users can access folders. * * ## Related Resources * * The following resources are often used in the same context: * * - End to end workspace management guide. * - databricks.Notebook to manage [Databricks Notebooks](https://docs.databricks.com/notebooks/index.html). * - databricks.Notebook data to export a notebook from Databricks Workspace. * - databricks.getNotebookPaths data to list notebooks in Databricks Workspace. * - databricks.Repo to manage [Databricks Repos](https://docs.databricks.com/repos.html). * - databricks.getSparkVersion data to get [Databricks Runtime (DBR)](https://docs.databricks.com/runtime/dbr.html) version that could be used for `sparkVersion` parameter in databricks.Cluster and other resources. * - databricks.WorkspaceConf to manage workspace configuration for expert usage. * * ## Import * * The resource directory can be imported using directory path: * * bash * * ```sh * $ pulumi import databricks:index/directory:Directory this /path/to/directory * ``` */ class Directory extends pulumi.CustomResource { /** * Get an existing Directory 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 Directory(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Directory. 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'] === Directory.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["deleteRecursive"] = state ? state.deleteRecursive : undefined; resourceInputs["objectId"] = state ? state.objectId : undefined; resourceInputs["path"] = state ? state.path : undefined; resourceInputs["workspacePath"] = state ? state.workspacePath : undefined; } else { const args = argsOrState; if ((!args || args.path === undefined) && !opts.urn) { throw new Error("Missing required property 'path'"); } resourceInputs["deleteRecursive"] = args ? args.deleteRecursive : undefined; resourceInputs["objectId"] = args ? args.objectId : undefined; resourceInputs["path"] = args ? args.path : undefined; resourceInputs["workspacePath"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Directory.__pulumiType, name, resourceInputs, opts); } } exports.Directory = Directory; /** @internal */ Directory.__pulumiType = 'databricks:index/directory:Directory'; //# sourceMappingURL=directory.js.map