1. Registry
  2. Packages
  3. Newrelic Provider
  4. API Docs
  5. getNotebook
Viewing docs for New Relic v5.77.0
published on Saturday, Sep 19, 2026 by Pulumi
newrelic logo newrelic logo
Viewing docs for New Relic v5.77.0
published on Saturday, Sep 19, 2026 by Pulumi

    Use this data source to look up an existing New Relic Notebook by its entity GUID.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const example = newrelic.getNotebook({
        guid: "MTIxOTEy...",
        fetchContent: true,
    });
    export const notebookContent = example.then(example => example.content);
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    example = newrelic.get_notebook(guid="MTIxOTEy...",
        fetch_content=True)
    pulumi.export("notebookContent", example.content)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := newrelic.GetNotebook(ctx, &newrelic.LookupNotebookArgs{
    			Guid:         "MTIxOTEy...",
    			FetchContent: pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("notebookContent", example.Content)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using NewRelic = Pulumi.NewRelic;
    
    return await Deployment.RunAsync(() => 
    {
        var example = NewRelic.GetNotebook.Invoke(new()
        {
            Guid = "MTIxOTEy...",
            FetchContent = true,
        });
    
        return new Dictionary<string, object?>
        {
            ["notebookContent"] = example.Apply(getNotebookResult => getNotebookResult.Content),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.newrelic.NewrelicFunctions;
    import com.pulumi.newrelic.inputs.GetNotebookArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = NewrelicFunctions.getNotebook(GetNotebookArgs.builder()
                .guid("MTIxOTEy...")
                .fetchContent(true)
                .build());
    
            ctx.export("notebookContent", example.content());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: newrelic:getNotebook
          arguments:
            guid: MTIxOTEy...
            fetchContent: true
    outputs:
      notebookContent: ${example.content}
    
    pulumi {
      required_providers {
        newrelic = {
          source = "pulumi/newrelic"
        }
      }
    }
    
    data "newrelic_getnotebook" "example" {
      guid          = "MTIxOTEy..."
      fetch_content = true
    }
    
    output "notebookContent" {
      value = data.newrelic_getnotebook.example.content
    }
    

    Using getNotebook

    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 getNotebook(args: GetNotebookArgs, opts?: InvokeOptions): Promise<GetNotebookResult>
    function getNotebookOutput(args: GetNotebookOutputArgs, opts?: InvokeOutputOptions): Output<GetNotebookResult>
    def get_notebook(fetch_content: Optional[bool] = None,
                     guid: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetNotebookResult
    def get_notebook_output(fetch_content: pulumi.Input[Optional[bool]] = None,
                     guid: pulumi.Input[Optional[str]] = None,
                     opts: Optional[InvokeOutputOptions] = None) -> Output[GetNotebookResult]
    func LookupNotebook(ctx *Context, args *LookupNotebookArgs, opts ...InvokeOption) (*LookupNotebookResult, error)
    func LookupNotebookOutput(ctx *Context, args *LookupNotebookOutputArgs, opts ...InvokeOption) LookupNotebookResultOutput

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

    public static class GetNotebook 
    {
        public static Task<GetNotebookResult> InvokeAsync(GetNotebookArgs args, InvokeOptions? opts = null)
        public static Output<GetNotebookResult> Invoke(GetNotebookInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetNotebookResult> Invoke(GetNotebookInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetNotebookResult> getNotebook(GetNotebookArgs args, InvokeOptions options)
    public static Output<GetNotebookResult> getNotebook(GetNotebookArgs args, InvokeOptions options)
    public static Output<GetNotebookResult> getNotebook(GetNotebookArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: newrelic:index/getNotebook:getNotebook
      arguments:
        # arguments dictionary
    data "newrelic_get_notebook" "name" {
        # arguments
    }

    The following arguments are supported:

    Guid string
    The entity GUID of the notebook to look up.
    FetchContent bool
    When true, fetches the full notebook body and populates content. Default: false.
    Guid string
    The entity GUID of the notebook to look up.
    FetchContent bool
    When true, fetches the full notebook body and populates content. Default: false.
    guid string
    The entity GUID of the notebook to look up.
    fetch_content bool
    When true, fetches the full notebook body and populates content. Default: false.
    guid String
    The entity GUID of the notebook to look up.
    fetchContent Boolean
    When true, fetches the full notebook body and populates content. Default: false.
    guid string
    The entity GUID of the notebook to look up.
    fetchContent boolean
    When true, fetches the full notebook body and populates content. Default: false.
    guid str
    The entity GUID of the notebook to look up.
    fetch_content bool
    When true, fetches the full notebook body and populates content. Default: false.
    guid String
    The entity GUID of the notebook to look up.
    fetchContent Boolean
    When true, fetches the full notebook body and populates content. Default: false.

    getNotebook Result

    The following output properties are available:

    BlobId string
    The blob identifier of the current notebook content.
    Content string
    The notebook body as a normalized JSON string. Only populated when fetchContent is true; empty string otherwise.
    Guid string
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The New Relic organization ID the notebook belongs to.
    Title string
    The title of the notebook.
    FetchContent bool
    BlobId string
    The blob identifier of the current notebook content.
    Content string
    The notebook body as a normalized JSON string. Only populated when fetchContent is true; empty string otherwise.
    Guid string
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The New Relic organization ID the notebook belongs to.
    Title string
    The title of the notebook.
    FetchContent bool
    blob_id string
    The blob identifier of the current notebook content.
    content string
    The notebook body as a normalized JSON string. Only populated when fetchContent is true; empty string otherwise.
    guid string
    id string
    The provider-assigned unique ID for this managed resource.
    organization_id string
    The New Relic organization ID the notebook belongs to.
    title string
    The title of the notebook.
    fetch_content bool
    blobId String
    The blob identifier of the current notebook content.
    content String
    The notebook body as a normalized JSON string. Only populated when fetchContent is true; empty string otherwise.
    guid String
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The New Relic organization ID the notebook belongs to.
    title String
    The title of the notebook.
    fetchContent Boolean
    blobId string
    The blob identifier of the current notebook content.
    content string
    The notebook body as a normalized JSON string. Only populated when fetchContent is true; empty string otherwise.
    guid string
    id string
    The provider-assigned unique ID for this managed resource.
    organizationId string
    The New Relic organization ID the notebook belongs to.
    title string
    The title of the notebook.
    fetchContent boolean
    blob_id str
    The blob identifier of the current notebook content.
    content str
    The notebook body as a normalized JSON string. Only populated when fetchContent is true; empty string otherwise.
    guid str
    id str
    The provider-assigned unique ID for this managed resource.
    organization_id str
    The New Relic organization ID the notebook belongs to.
    title str
    The title of the notebook.
    fetch_content bool
    blobId String
    The blob identifier of the current notebook content.
    content String
    The notebook body as a normalized JSON string. Only populated when fetchContent is true; empty string otherwise.
    guid String
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The New Relic organization ID the notebook belongs to.
    title String
    The title of the notebook.
    fetchContent Boolean

    Package Details

    Repository
    New Relic pulumi/pulumi-newrelic
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the newrelic Terraform Provider.
    newrelic logo newrelic logo
    Viewing docs for New Relic v5.77.0
    published on Saturday, Sep 19, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial