1. Packages
  2. Databricks
  3. API Docs
  4. getDirectory
Databricks v1.46.1 published on Friday, Jun 28, 2024 by Pulumi

databricks.getDirectory

Explore with Pulumi AI

databricks logo
Databricks v1.46.1 published on Friday, Jun 28, 2024 by Pulumi

    Note If you have a fully automated setup with workspaces created by databricks_mws_workspaces, please make sure to add depends_on attribute in order to prevent default auth: cannot configure default credentials errors.

    This data source allows to get information about a directory in a Databricks Workspace.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const prod = databricks.getDirectory({
        path: "/Production",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    prod = databricks.get_directory(path="/Production")
    
    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.LookupDirectory(ctx, &databricks.LookupDirectoryArgs{
    			Path: "/Production",
    		}, 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 prod = Databricks.GetDirectory.Invoke(new()
        {
            Path = "/Production",
        });
    
    });
    
    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.GetDirectoryArgs;
    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 prod = DatabricksFunctions.getDirectory(GetDirectoryArgs.builder()
                .path("/Production")
                .build());
    
        }
    }
    
    variables:
      prod:
        fn::invoke:
          Function: databricks:getDirectory
          Arguments:
            path: /Production
    

    Using getDirectory

    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 getDirectory(args: GetDirectoryArgs, opts?: InvokeOptions): Promise<GetDirectoryResult>
    function getDirectoryOutput(args: GetDirectoryOutputArgs, opts?: InvokeOptions): Output<GetDirectoryResult>
    def get_directory(id: Optional[str] = None,
                      object_id: Optional[int] = None,
                      path: Optional[str] = None,
                      workspace_path: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetDirectoryResult
    def get_directory_output(id: Optional[pulumi.Input[str]] = None,
                      object_id: Optional[pulumi.Input[int]] = None,
                      path: Optional[pulumi.Input[str]] = None,
                      workspace_path: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetDirectoryResult]
    func LookupDirectory(ctx *Context, args *LookupDirectoryArgs, opts ...InvokeOption) (*LookupDirectoryResult, error)
    func LookupDirectoryOutput(ctx *Context, args *LookupDirectoryOutputArgs, opts ...InvokeOption) LookupDirectoryResultOutput

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

    public static class GetDirectory 
    {
        public static Task<GetDirectoryResult> InvokeAsync(GetDirectoryArgs args, InvokeOptions? opts = null)
        public static Output<GetDirectoryResult> Invoke(GetDirectoryInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDirectoryResult> getDirectory(GetDirectoryArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: databricks:index/getDirectory:getDirectory
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Path string
    Path to a directory in the workspace
    Id string
    ObjectId int
    directory object ID
    WorkspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    Path string
    Path to a directory in the workspace
    Id string
    ObjectId int
    directory object ID
    WorkspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    path String
    Path to a directory in the workspace
    id String
    objectId Integer
    directory object ID
    workspacePath String
    path on Workspace File System (WSFS) in form of /Workspace + path
    path string
    Path to a directory in the workspace
    id string
    objectId number
    directory object ID
    workspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    path str
    Path to a directory in the workspace
    id str
    object_id int
    directory object ID
    workspace_path str
    path on Workspace File System (WSFS) in form of /Workspace + path
    path String
    Path to a directory in the workspace
    id String
    objectId Number
    directory object ID
    workspacePath String
    path on Workspace File System (WSFS) in form of /Workspace + path

    getDirectory Result

    The following output properties are available:

    Id string
    ObjectId int
    directory object ID
    Path string
    WorkspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    Id string
    ObjectId int
    directory object ID
    Path string
    WorkspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    id String
    objectId Integer
    directory object ID
    path String
    workspacePath String
    path on Workspace File System (WSFS) in form of /Workspace + path
    id string
    objectId number
    directory object ID
    path string
    workspacePath string
    path on Workspace File System (WSFS) in form of /Workspace + path
    id str
    object_id int
    directory object ID
    path str
    workspace_path str
    path on Workspace File System (WSFS) in form of /Workspace + path
    id String
    objectId Number
    directory object ID
    path String
    workspacePath String
    path on Workspace File System (WSFS) in form of /Workspace + path

    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 v1.46.1 published on Friday, Jun 28, 2024 by Pulumi