databricks logo
Databricks v1.15.0, Jun 2 23

databricks.getDirectory

Explore with Pulumi AI

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

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 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
	})
}
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());

    }
}
import pulumi
import pulumi_databricks as databricks

prod = databricks.get_directory(path="/Production")
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";

const prod = databricks.getDirectory({
    path: "/Production",
});
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(object_id: Optional[int] = None,
                  path: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetDirectoryResult
def get_directory_output(object_id: Optional[pulumi.Input[int]] = None,
                  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

ObjectId int

directory object ID

Path string

Path to a directory in the workspace

ObjectId int

directory object ID

path String

Path to a directory in the workspace

objectId Integer

directory object ID

path string

Path to a directory in the workspace

objectId number

directory object ID

path str

Path to a directory in the workspace

object_id int

directory object ID

path String

Path to a directory in the workspace

objectId Number

directory object ID

getDirectory Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

ObjectId int

directory object ID

Path string
Id string

The provider-assigned unique ID for this managed resource.

ObjectId int

directory object ID

Path string
id String

The provider-assigned unique ID for this managed resource.

objectId Integer

directory object ID

path String
id string

The provider-assigned unique ID for this managed resource.

objectId number

directory object ID

path string
id str

The provider-assigned unique ID for this managed resource.

object_id int

directory object ID

path str
id String

The provider-assigned unique ID for this managed resource.

objectId Number

directory object ID

path String

Package Details

Repository
databricks pulumi/pulumi-databricks
License
Apache-2.0
Notes

This Pulumi package is based on the databricks Terraform Provider.