datarobot.Notebook
Explore with Pulumi AI

Notebook resource for importing and managing Jupyter notebooks in DataRobot.
NOTE
The synchronization of the file hash is one way. The provider will track changes of the Notebook file on disk and update only when that changes. If the remote Notebook changes, the provider will not update the local file.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datarobot from "@datarobot/pulumi-datarobot";
const exampleUseCase = new datarobot.UseCase("exampleUseCase", {});
const exampleNotebook = new datarobot.Notebook("exampleNotebook", {
filePath: "/path/to/your/notebook.ipynb",
useCaseId: exampleUseCase.id,
});
import pulumi
import pulumi_datarobot as datarobot
example_use_case = datarobot.UseCase("exampleUseCase")
example_notebook = datarobot.Notebook("exampleNotebook",
file_path="/path/to/your/notebook.ipynb",
use_case_id=example_use_case.id)
package main
import (
"github.com/datarobot-community/pulumi-datarobot/sdk/go/datarobot"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleUseCase, err := datarobot.NewUseCase(ctx, "exampleUseCase", nil)
if err != nil {
return err
}
_, err = datarobot.NewNotebook(ctx, "exampleNotebook", &datarobot.NotebookArgs{
FilePath: pulumi.String("/path/to/your/notebook.ipynb"),
UseCaseId: exampleUseCase.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datarobot = DataRobotPulumi.Datarobot;
return await Deployment.RunAsync(() =>
{
var exampleUseCase = new Datarobot.UseCase("exampleUseCase");
var exampleNotebook = new Datarobot.Notebook("exampleNotebook", new()
{
FilePath = "/path/to/your/notebook.ipynb",
UseCaseId = exampleUseCase.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datarobot.UseCase;
import com.pulumi.datarobot.Notebook;
import com.pulumi.datarobot.NotebookArgs;
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) {
var exampleUseCase = new UseCase("exampleUseCase");
var exampleNotebook = new Notebook("exampleNotebook", NotebookArgs.builder()
.filePath("/path/to/your/notebook.ipynb")
.useCaseId(exampleUseCase.id())
.build());
}
}
resources:
exampleUseCase:
type: datarobot:UseCase
exampleNotebook:
type: datarobot:Notebook
properties:
filePath: /path/to/your/notebook.ipynb
useCaseId: ${exampleUseCase.id}
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,
file_path: Optional[str] = None,
use_case_id: 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: datarobot: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 Datarobot.Notebook("notebookResource", new()
{
FilePath = "string",
UseCaseId = "string",
});
example, err := datarobot.NewNotebook(ctx, "notebookResource", &datarobot.NotebookArgs{
FilePath: pulumi.String("string"),
UseCaseId: pulumi.String("string"),
})
var notebookResource = new Notebook("notebookResource", NotebookArgs.builder()
.filePath("string")
.useCaseId("string")
.build());
notebook_resource = datarobot.Notebook("notebookResource",
file_path="string",
use_case_id="string")
const notebookResource = new datarobot.Notebook("notebookResource", {
filePath: "string",
useCaseId: "string",
});
type: datarobot:Notebook
properties:
filePath: string
useCaseId: 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:
- file_
path str - The path to the .ipynb file to import.
- use_
case_ strid - The Use Case ID to add the Notebook to.
Outputs
All input properties are implicitly available as output properties. Additionally, the Notebook resource produces the following output properties:
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,
file_hash: Optional[str] = None,
file_path: Optional[str] = None,
name: Optional[str] = None,
url: Optional[str] = None,
use_case_id: Optional[str] = None) -> Notebook
func 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: datarobot: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.
- file_
hash str - The SHA-256 hash of the file contents.
- file_
path str - The path to the .ipynb file to import.
- name str
- The name of the Notebook.
- url str
- The URL to the Notebook.
- use_
case_ strid - The Use Case ID to add the Notebook to.
Package Details
- Repository
- datarobot datarobot-community/pulumi-datarobot
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datarobot
Terraform Provider.
