1. Packages
  2. Databricks Provider
  3. API Docs
  4. getNotebookPaths
Databricks v1.65.0 published on Wednesday, Apr 9, 2025 by Pulumi

databricks.getNotebookPaths

Explore with Pulumi AI

Databricks v1.65.0 published on Wednesday, Apr 9, 2025 by Pulumi

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

This data source allows to list notebooks in the Databricks Workspace.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";

const prod = databricks.getNotebookPaths({
    path: "/Production",
    recursive: true,
});
Copy
import pulumi
import pulumi_databricks as databricks

prod = databricks.get_notebook_paths(path="/Production",
    recursive=True)
Copy
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.GetNotebookPaths(ctx, &databricks.GetNotebookPathsArgs{
			Path:      "/Production",
			Recursive: true,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;

return await Deployment.RunAsync(() => 
{
    var prod = Databricks.GetNotebookPaths.Invoke(new()
    {
        Path = "/Production",
        Recursive = true,
    });

});
Copy
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.GetNotebookPathsArgs;
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.getNotebookPaths(GetNotebookPathsArgs.builder()
            .path("/Production")
            .recursive(true)
            .build());

    }
}
Copy
variables:
  prod:
    fn::invoke:
      function: databricks:getNotebookPaths
      arguments:
        path: /Production
        recursive: true
Copy

Using getNotebookPaths

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 getNotebookPaths(args: GetNotebookPathsArgs, opts?: InvokeOptions): Promise<GetNotebookPathsResult>
function getNotebookPathsOutput(args: GetNotebookPathsOutputArgs, opts?: InvokeOptions): Output<GetNotebookPathsResult>
Copy
def get_notebook_paths(path: Optional[str] = None,
                       recursive: Optional[bool] = None,
                       opts: Optional[InvokeOptions] = None) -> GetNotebookPathsResult
def get_notebook_paths_output(path: Optional[pulumi.Input[str]] = None,
                       recursive: Optional[pulumi.Input[bool]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetNotebookPathsResult]
Copy
func GetNotebookPaths(ctx *Context, args *GetNotebookPathsArgs, opts ...InvokeOption) (*GetNotebookPathsResult, error)
func GetNotebookPathsOutput(ctx *Context, args *GetNotebookPathsOutputArgs, opts ...InvokeOption) GetNotebookPathsResultOutput
Copy

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

public static class GetNotebookPaths 
{
    public static Task<GetNotebookPathsResult> InvokeAsync(GetNotebookPathsArgs args, InvokeOptions? opts = null)
    public static Output<GetNotebookPathsResult> Invoke(GetNotebookPathsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNotebookPathsResult> getNotebookPaths(GetNotebookPathsArgs args, InvokeOptions options)
public static Output<GetNotebookPathsResult> getNotebookPaths(GetNotebookPathsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: databricks:index/getNotebookPaths:getNotebookPaths
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Path
This property is required.
Changes to this property will trigger replacement.
string
Path to workspace directory
Recursive
This property is required.
Changes to this property will trigger replacement.
bool
Either or recursively walk given path
Path
This property is required.
Changes to this property will trigger replacement.
string
Path to workspace directory
Recursive
This property is required.
Changes to this property will trigger replacement.
bool
Either or recursively walk given path
path
This property is required.
Changes to this property will trigger replacement.
String
Path to workspace directory
recursive
This property is required.
Changes to this property will trigger replacement.
Boolean
Either or recursively walk given path
path
This property is required.
Changes to this property will trigger replacement.
string
Path to workspace directory
recursive
This property is required.
Changes to this property will trigger replacement.
boolean
Either or recursively walk given path
path
This property is required.
Changes to this property will trigger replacement.
str
Path to workspace directory
recursive
This property is required.
Changes to this property will trigger replacement.
bool
Either or recursively walk given path
path
This property is required.
Changes to this property will trigger replacement.
String
Path to workspace directory
recursive
This property is required.
Changes to this property will trigger replacement.
Boolean
Either or recursively walk given path

getNotebookPaths Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
NotebookPathLists List<GetNotebookPathsNotebookPathList>
list of objects with path and language attributes
Path string
Recursive bool
Id string
The provider-assigned unique ID for this managed resource.
NotebookPathLists []GetNotebookPathsNotebookPathList
list of objects with path and language attributes
Path string
Recursive bool
id String
The provider-assigned unique ID for this managed resource.
notebookPathLists List<GetNotebookPathsNotebookPathList>
list of objects with path and language attributes
path String
recursive Boolean
id string
The provider-assigned unique ID for this managed resource.
notebookPathLists GetNotebookPathsNotebookPathList[]
list of objects with path and language attributes
path string
recursive boolean
id str
The provider-assigned unique ID for this managed resource.
notebook_path_lists Sequence[GetNotebookPathsNotebookPathList]
list of objects with path and language attributes
path str
recursive bool
id String
The provider-assigned unique ID for this managed resource.
notebookPathLists List<Property Map>
list of objects with path and language attributes
path String
recursive Boolean

Supporting Types

GetNotebookPathsNotebookPathList

Language string
Path string
Path to workspace directory
Language string
Path string
Path to workspace directory
language String
path String
Path to workspace directory
language string
path string
Path to workspace directory
language str
path str
Path to workspace directory
language String
path String
Path to workspace directory

Package Details

Repository
databricks pulumi/pulumi-databricks
License
Apache-2.0
Notes
This Pulumi package is based on the databricks Terraform Provider.
Databricks v1.65.0 published on Wednesday, Apr 9, 2025 by Pulumi