databricks.Notebook
Explore with Pulumi AI
This resource allows you to manage Databricks Notebooks. You can also work with databricks.Notebook and databricks.getNotebookPaths data sources.
Create Notebook Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Notebook(name: string, args: NotebookArgs, opts?: CustomResourceOptions);@overload
def Notebook(resource_name: str,
             args: NotebookArgs,
             opts: Optional[ResourceOptions] = None)
@overload
def Notebook(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             path: Optional[str] = None,
             content_base64: Optional[str] = None,
             format: Optional[str] = None,
             language: Optional[str] = None,
             md5: Optional[str] = None,
             object_id: Optional[int] = None,
             object_type: Optional[str] = None,
             source: Optional[str] = None)func NewNotebook(ctx *Context, name string, args NotebookArgs, opts ...ResourceOption) (*Notebook, error)public Notebook(string name, NotebookArgs args, CustomResourceOptions? opts = null)
public Notebook(String name, NotebookArgs args)
public Notebook(String name, NotebookArgs args, CustomResourceOptions options)
type: databricks:Notebook
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args NotebookArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NotebookArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NotebookArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotebookArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotebookArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var notebookResource = new Databricks.Notebook("notebookResource", new()
{
    Path = "string",
    ContentBase64 = "string",
    Format = "string",
    Language = "string",
    Md5 = "string",
    ObjectId = 0,
    Source = "string",
});
example, err := databricks.NewNotebook(ctx, "notebookResource", &databricks.NotebookArgs{
	Path:          pulumi.String("string"),
	ContentBase64: pulumi.String("string"),
	Format:        pulumi.String("string"),
	Language:      pulumi.String("string"),
	Md5:           pulumi.String("string"),
	ObjectId:      pulumi.Int(0),
	Source:        pulumi.String("string"),
})
var notebookResource = new Notebook("notebookResource", NotebookArgs.builder()
    .path("string")
    .contentBase64("string")
    .format("string")
    .language("string")
    .md5("string")
    .objectId(0)
    .source("string")
    .build());
notebook_resource = databricks.Notebook("notebookResource",
    path="string",
    content_base64="string",
    format="string",
    language="string",
    md5="string",
    object_id=0,
    source="string")
const notebookResource = new databricks.Notebook("notebookResource", {
    path: "string",
    contentBase64: "string",
    format: "string",
    language: "string",
    md5: "string",
    objectId: 0,
    source: "string",
});
type: databricks:Notebook
properties:
    contentBase64: string
    format: string
    language: string
    md5: string
    objectId: 0
    path: string
    source: string
Notebook Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Notebook resource accepts the following input properties:
- Path string
- The absolute path of the notebook or directory, beginning with "/", e.g. "/Demo".
- ContentBase64 string
- The base64-encoded notebook source code. Conflicts with source. Use ofcontent_base64is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a notebook with configuration properties for a data pipeline.
- Format string
- Language string
- One of SCALA,PYTHON,SQL,R.
- Md5 string
- ObjectId int
- Unique identifier for a NOTEBOOK
- ObjectType string
- Source string
- Path to notebook in source code format on local filesystem. Conflicts with content_base64.
- Path string
- The absolute path of the notebook or directory, beginning with "/", e.g. "/Demo".
- ContentBase64 string
- The base64-encoded notebook source code. Conflicts with source. Use ofcontent_base64is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a notebook with configuration properties for a data pipeline.
- Format string
- Language string
- One of SCALA,PYTHON,SQL,R.
- Md5 string
- ObjectId int
- Unique identifier for a NOTEBOOK
- ObjectType string
- Source string
- Path to notebook in source code format on local filesystem. Conflicts with content_base64.
- path String
- The absolute path of the notebook or directory, beginning with "/", e.g. "/Demo".
- contentBase64 String
- The base64-encoded notebook source code. Conflicts with source. Use ofcontent_base64is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a notebook with configuration properties for a data pipeline.
- format String
- language String
- One of SCALA,PYTHON,SQL,R.
- md5 String
- objectId Integer
- Unique identifier for a NOTEBOOK
- objectType String
- source String
- Path to notebook in source code format on local filesystem. Conflicts with content_base64.
- path string
- The absolute path of the notebook or directory, beginning with "/", e.g. "/Demo".
- contentBase64 string
- The base64-encoded notebook source code. Conflicts with source. Use ofcontent_base64is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a notebook with configuration properties for a data pipeline.
- format string
- language string
- One of SCALA,PYTHON,SQL,R.
- md5 string
- objectId number
- Unique identifier for a NOTEBOOK
- objectType string
- source string
- Path to notebook in source code format on local filesystem. Conflicts with content_base64.
- path str
- The absolute path of the notebook or directory, beginning with "/", e.g. "/Demo".
- content_base64 str
- The base64-encoded notebook source code. Conflicts with source. Use ofcontent_base64is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a notebook with configuration properties for a data pipeline.
- format str
- language str
- One of SCALA,PYTHON,SQL,R.
- md5 str
- object_id int
- Unique identifier for a NOTEBOOK
- object_type str
- source str
- Path to notebook in source code format on local filesystem. Conflicts with content_base64.
- path String
- The absolute path of the notebook or directory, beginning with "/", e.g. "/Demo".
- contentBase64 String
- The base64-encoded notebook source code. Conflicts with source. Use ofcontent_base64is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a notebook with configuration properties for a data pipeline.
- format String
- language String
- One of SCALA,PYTHON,SQL,R.
- md5 String
- objectId Number
- Unique identifier for a NOTEBOOK
- objectType String
- source String
- Path to notebook in source code format on local filesystem. Conflicts with content_base64.
Outputs
All input properties are implicitly available as output properties. Additionally, the Notebook resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Url string
- Routable URL of the notebook
- WorkspacePath string
- path on Workspace File System (WSFS) in form of /Workspace+path
- Id string
- The provider-assigned unique ID for this managed resource.
- Url string
- Routable URL of the notebook
- WorkspacePath string
- path on Workspace File System (WSFS) in form of /Workspace+path
- id String
- The provider-assigned unique ID for this managed resource.
- url String
- Routable URL of the notebook
- workspacePath String
- path on Workspace File System (WSFS) in form of /Workspace+path
- id string
- The provider-assigned unique ID for this managed resource.
- url string
- Routable URL of the notebook
- workspacePath string
- path on Workspace File System (WSFS) in form of /Workspace+path
- id str
- The provider-assigned unique ID for this managed resource.
- url str
- Routable URL of the notebook
- workspace_path str
- path on Workspace File System (WSFS) in form of /Workspace+path
- id String
- The provider-assigned unique ID for this managed resource.
- url String
- Routable URL of the notebook
- workspacePath String
- path on Workspace File System (WSFS) in form of /Workspace+path
Look up Existing Notebook Resource
Get an existing Notebook resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NotebookState, opts?: CustomResourceOptions): Notebook@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        content_base64: Optional[str] = None,
        format: Optional[str] = None,
        language: Optional[str] = None,
        md5: Optional[str] = None,
        object_id: Optional[int] = None,
        object_type: Optional[str] = None,
        path: Optional[str] = None,
        source: Optional[str] = None,
        url: Optional[str] = None,
        workspace_path: Optional[str] = None) -> Notebookfunc GetNotebook(ctx *Context, name string, id IDInput, state *NotebookState, opts ...ResourceOption) (*Notebook, error)public static Notebook Get(string name, Input<string> id, NotebookState? state, CustomResourceOptions? opts = null)public static Notebook get(String name, Output<String> id, NotebookState state, CustomResourceOptions options)resources:  _:    type: databricks:Notebook    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- ContentBase64 string
- The base64-encoded notebook source code. Conflicts with source. Use ofcontent_base64is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a notebook with configuration properties for a data pipeline.
- Format string
- Language string
- One of SCALA,PYTHON,SQL,R.
- Md5 string
- ObjectId int
- Unique identifier for a NOTEBOOK
- ObjectType string
- Path string
- The absolute path of the notebook or directory, beginning with "/", e.g. "/Demo".
- Source string
- Path to notebook in source code format on local filesystem. Conflicts with content_base64.
- Url string
- Routable URL of the notebook
- WorkspacePath string
- path on Workspace File System (WSFS) in form of /Workspace+path
- ContentBase64 string
- The base64-encoded notebook source code. Conflicts with source. Use ofcontent_base64is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a notebook with configuration properties for a data pipeline.
- Format string
- Language string
- One of SCALA,PYTHON,SQL,R.
- Md5 string
- ObjectId int
- Unique identifier for a NOTEBOOK
- ObjectType string
- Path string
- The absolute path of the notebook or directory, beginning with "/", e.g. "/Demo".
- Source string
- Path to notebook in source code format on local filesystem. Conflicts with content_base64.
- Url string
- Routable URL of the notebook
- WorkspacePath string
- path on Workspace File System (WSFS) in form of /Workspace+path
- contentBase64 String
- The base64-encoded notebook source code. Conflicts with source. Use ofcontent_base64is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a notebook with configuration properties for a data pipeline.
- format String
- language String
- One of SCALA,PYTHON,SQL,R.
- md5 String
- objectId Integer
- Unique identifier for a NOTEBOOK
- objectType String
- path String
- The absolute path of the notebook or directory, beginning with "/", e.g. "/Demo".
- source String
- Path to notebook in source code format on local filesystem. Conflicts with content_base64.
- url String
- Routable URL of the notebook
- workspacePath String
- path on Workspace File System (WSFS) in form of /Workspace+path
- contentBase64 string
- The base64-encoded notebook source code. Conflicts with source. Use ofcontent_base64is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a notebook with configuration properties for a data pipeline.
- format string
- language string
- One of SCALA,PYTHON,SQL,R.
- md5 string
- objectId number
- Unique identifier for a NOTEBOOK
- objectType string
- path string
- The absolute path of the notebook or directory, beginning with "/", e.g. "/Demo".
- source string
- Path to notebook in source code format on local filesystem. Conflicts with content_base64.
- url string
- Routable URL of the notebook
- workspacePath string
- path on Workspace File System (WSFS) in form of /Workspace+path
- content_base64 str
- The base64-encoded notebook source code. Conflicts with source. Use ofcontent_base64is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a notebook with configuration properties for a data pipeline.
- format str
- language str
- One of SCALA,PYTHON,SQL,R.
- md5 str
- object_id int
- Unique identifier for a NOTEBOOK
- object_type str
- path str
- The absolute path of the notebook or directory, beginning with "/", e.g. "/Demo".
- source str
- Path to notebook in source code format on local filesystem. Conflicts with content_base64.
- url str
- Routable URL of the notebook
- workspace_path str
- path on Workspace File System (WSFS) in form of /Workspace+path
- contentBase64 String
- The base64-encoded notebook source code. Conflicts with source. Use ofcontent_base64is discouraged, as it's increasing memory footprint of Pulumi state and should only be used in exceptional circumstances, like creating a notebook with configuration properties for a data pipeline.
- format String
- language String
- One of SCALA,PYTHON,SQL,R.
- md5 String
- objectId Number
- Unique identifier for a NOTEBOOK
- objectType String
- path String
- The absolute path of the notebook or directory, beginning with "/", e.g. "/Demo".
- source String
- Path to notebook in source code format on local filesystem. Conflicts with content_base64.
- url String
- Routable URL of the notebook
- workspacePath String
- path on Workspace File System (WSFS) in form of /Workspace+path
Import
The resource notebook can be imported using notebook path
bash
$ pulumi import databricks:index/notebook:Notebook this /path/to/notebook
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the databricksTerraform Provider.