1. Packages
  2. Azure Classic
  3. API Docs
  4. cosmosdb
  5. NotebookWorkspace

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.cosmosdb.NotebookWorkspace

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Manages an SQL Notebook Workspace.

    !> Note: CosmosDb Notebook Workspace is now Deprecated - as such the azure.cosmosdb.NotebookWorkspace resource is deprecated and will be removed in v4.0 of the AzureRM Provider.

    NOTE: CosmosDb Notebook (the feature itself) is not deprecated and will return: https://learn.microsoft.com/en-us/azure/cosmos-db/notebooks-faq.

    NOTE: However, CosmosDb Notebook feature no longer uses the permanent notebook workspace being referred to the public surface in the RP (have since moved to temporary notebooks workspaces which are short-lived <1 hour).

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleAccount = new azure.cosmosdb.Account("example", {
        name: "example-cosmosdb-account",
        location: example.location,
        resourceGroupName: example.name,
        offerType: "Standard",
        kind: "GlobalDocumentDB",
        consistencyPolicy: {
            consistencyLevel: "BoundedStaleness",
        },
        geoLocations: [{
            location: example.location,
            failoverPriority: 0,
        }],
    });
    const exampleNotebookWorkspace = new azure.cosmosdb.NotebookWorkspace("example", {
        name: "default",
        resourceGroupName: exampleAccount.resourceGroupName,
        accountName: exampleAccount.name,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_account = azure.cosmosdb.Account("example",
        name="example-cosmosdb-account",
        location=example.location,
        resource_group_name=example.name,
        offer_type="Standard",
        kind="GlobalDocumentDB",
        consistency_policy=azure.cosmosdb.AccountConsistencyPolicyArgs(
            consistency_level="BoundedStaleness",
        ),
        geo_locations=[azure.cosmosdb.AccountGeoLocationArgs(
            location=example.location,
            failover_priority=0,
        )])
    example_notebook_workspace = azure.cosmosdb.NotebookWorkspace("example",
        name="default",
        resource_group_name=example_account.resource_group_name,
        account_name=example_account.name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/cosmosdb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleAccount, err := cosmosdb.NewAccount(ctx, "example", &cosmosdb.AccountArgs{
    			Name:              pulumi.String("example-cosmosdb-account"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			OfferType:         pulumi.String("Standard"),
    			Kind:              pulumi.String("GlobalDocumentDB"),
    			ConsistencyPolicy: &cosmosdb.AccountConsistencyPolicyArgs{
    				ConsistencyLevel: pulumi.String("BoundedStaleness"),
    			},
    			GeoLocations: cosmosdb.AccountGeoLocationArray{
    				&cosmosdb.AccountGeoLocationArgs{
    					Location:         example.Location,
    					FailoverPriority: pulumi.Int(0),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cosmosdb.NewNotebookWorkspace(ctx, "example", &cosmosdb.NotebookWorkspaceArgs{
    			Name:              pulumi.String("default"),
    			ResourceGroupName: exampleAccount.ResourceGroupName,
    			AccountName:       exampleAccount.Name,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleAccount = new Azure.CosmosDB.Account("example", new()
        {
            Name = "example-cosmosdb-account",
            Location = example.Location,
            ResourceGroupName = example.Name,
            OfferType = "Standard",
            Kind = "GlobalDocumentDB",
            ConsistencyPolicy = new Azure.CosmosDB.Inputs.AccountConsistencyPolicyArgs
            {
                ConsistencyLevel = "BoundedStaleness",
            },
            GeoLocations = new[]
            {
                new Azure.CosmosDB.Inputs.AccountGeoLocationArgs
                {
                    Location = example.Location,
                    FailoverPriority = 0,
                },
            },
        });
    
        var exampleNotebookWorkspace = new Azure.CosmosDB.NotebookWorkspace("example", new()
        {
            Name = "default",
            ResourceGroupName = exampleAccount.ResourceGroupName,
            AccountName = exampleAccount.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.cosmosdb.Account;
    import com.pulumi.azure.cosmosdb.AccountArgs;
    import com.pulumi.azure.cosmosdb.inputs.AccountConsistencyPolicyArgs;
    import com.pulumi.azure.cosmosdb.inputs.AccountGeoLocationArgs;
    import com.pulumi.azure.cosmosdb.NotebookWorkspace;
    import com.pulumi.azure.cosmosdb.NotebookWorkspaceArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
                .name("example-cosmosdb-account")
                .location(example.location())
                .resourceGroupName(example.name())
                .offerType("Standard")
                .kind("GlobalDocumentDB")
                .consistencyPolicy(AccountConsistencyPolicyArgs.builder()
                    .consistencyLevel("BoundedStaleness")
                    .build())
                .geoLocations(AccountGeoLocationArgs.builder()
                    .location(example.location())
                    .failoverPriority(0)
                    .build())
                .build());
    
            var exampleNotebookWorkspace = new NotebookWorkspace("exampleNotebookWorkspace", NotebookWorkspaceArgs.builder()
                .name("default")
                .resourceGroupName(exampleAccount.resourceGroupName())
                .accountName(exampleAccount.name())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleAccount:
        type: azure:cosmosdb:Account
        name: example
        properties:
          name: example-cosmosdb-account
          location: ${example.location}
          resourceGroupName: ${example.name}
          offerType: Standard
          kind: GlobalDocumentDB
          consistencyPolicy:
            consistencyLevel: BoundedStaleness
          geoLocations:
            - location: ${example.location}
              failoverPriority: 0
      exampleNotebookWorkspace:
        type: azure:cosmosdb:NotebookWorkspace
        name: example
        properties:
          name: default
          resourceGroupName: ${exampleAccount.resourceGroupName}
          accountName: ${exampleAccount.name}
    

    Create NotebookWorkspace Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NotebookWorkspace(name: string, args: NotebookWorkspaceArgs, opts?: CustomResourceOptions);
    @overload
    def NotebookWorkspace(resource_name: str,
                          args: NotebookWorkspaceArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def NotebookWorkspace(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          account_name: Optional[str] = None,
                          resource_group_name: Optional[str] = None,
                          name: Optional[str] = None)
    func NewNotebookWorkspace(ctx *Context, name string, args NotebookWorkspaceArgs, opts ...ResourceOption) (*NotebookWorkspace, error)
    public NotebookWorkspace(string name, NotebookWorkspaceArgs args, CustomResourceOptions? opts = null)
    public NotebookWorkspace(String name, NotebookWorkspaceArgs args)
    public NotebookWorkspace(String name, NotebookWorkspaceArgs args, CustomResourceOptions options)
    
    type: azure:cosmosdb:NotebookWorkspace
    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 NotebookWorkspaceArgs
    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 NotebookWorkspaceArgs
    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 NotebookWorkspaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NotebookWorkspaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NotebookWorkspaceArgs
    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 notebookWorkspaceResource = new Azure.CosmosDB.NotebookWorkspace("notebookWorkspaceResource", new()
    {
        AccountName = "string",
        ResourceGroupName = "string",
        Name = "string",
    });
    
    example, err := cosmosdb.NewNotebookWorkspace(ctx, "notebookWorkspaceResource", &cosmosdb.NotebookWorkspaceArgs{
    	AccountName:       pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	Name:              pulumi.String("string"),
    })
    
    var notebookWorkspaceResource = new NotebookWorkspace("notebookWorkspaceResource", NotebookWorkspaceArgs.builder()
        .accountName("string")
        .resourceGroupName("string")
        .name("string")
        .build());
    
    notebook_workspace_resource = azure.cosmosdb.NotebookWorkspace("notebookWorkspaceResource",
        account_name="string",
        resource_group_name="string",
        name="string")
    
    const notebookWorkspaceResource = new azure.cosmosdb.NotebookWorkspace("notebookWorkspaceResource", {
        accountName: "string",
        resourceGroupName: "string",
        name: "string",
    });
    
    type: azure:cosmosdb:NotebookWorkspace
    properties:
        accountName: string
        name: string
        resourceGroupName: string
    

    NotebookWorkspace Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The NotebookWorkspace resource accepts the following input properties:

    AccountName string
    The name of the Cosmos DB Account to create the SQL Notebook Workspace within. Changing this forces a new SQL Notebook Workspace to be created.
    ResourceGroupName string
    The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
    Name string
    The name which should be used for this SQL Notebook Workspace. Possible value is default. Changing this forces a new SQL Notebook Workspace to be created.
    AccountName string
    The name of the Cosmos DB Account to create the SQL Notebook Workspace within. Changing this forces a new SQL Notebook Workspace to be created.
    ResourceGroupName string
    The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
    Name string
    The name which should be used for this SQL Notebook Workspace. Possible value is default. Changing this forces a new SQL Notebook Workspace to be created.
    accountName String
    The name of the Cosmos DB Account to create the SQL Notebook Workspace within. Changing this forces a new SQL Notebook Workspace to be created.
    resourceGroupName String
    The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
    name String
    The name which should be used for this SQL Notebook Workspace. Possible value is default. Changing this forces a new SQL Notebook Workspace to be created.
    accountName string
    The name of the Cosmos DB Account to create the SQL Notebook Workspace within. Changing this forces a new SQL Notebook Workspace to be created.
    resourceGroupName string
    The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
    name string
    The name which should be used for this SQL Notebook Workspace. Possible value is default. Changing this forces a new SQL Notebook Workspace to be created.
    account_name str
    The name of the Cosmos DB Account to create the SQL Notebook Workspace within. Changing this forces a new SQL Notebook Workspace to be created.
    resource_group_name str
    The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
    name str
    The name which should be used for this SQL Notebook Workspace. Possible value is default. Changing this forces a new SQL Notebook Workspace to be created.
    accountName String
    The name of the Cosmos DB Account to create the SQL Notebook Workspace within. Changing this forces a new SQL Notebook Workspace to be created.
    resourceGroupName String
    The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
    name String
    The name which should be used for this SQL Notebook Workspace. Possible value is default. Changing this forces a new SQL Notebook Workspace to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NotebookWorkspace resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    ServerEndpoint string
    Specifies the endpoint of Notebook server.
    Id string
    The provider-assigned unique ID for this managed resource.
    ServerEndpoint string
    Specifies the endpoint of Notebook server.
    id String
    The provider-assigned unique ID for this managed resource.
    serverEndpoint String
    Specifies the endpoint of Notebook server.
    id string
    The provider-assigned unique ID for this managed resource.
    serverEndpoint string
    Specifies the endpoint of Notebook server.
    id str
    The provider-assigned unique ID for this managed resource.
    server_endpoint str
    Specifies the endpoint of Notebook server.
    id String
    The provider-assigned unique ID for this managed resource.
    serverEndpoint String
    Specifies the endpoint of Notebook server.

    Look up Existing NotebookWorkspace Resource

    Get an existing NotebookWorkspace 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?: NotebookWorkspaceState, opts?: CustomResourceOptions): NotebookWorkspace
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_name: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            server_endpoint: Optional[str] = None) -> NotebookWorkspace
    func GetNotebookWorkspace(ctx *Context, name string, id IDInput, state *NotebookWorkspaceState, opts ...ResourceOption) (*NotebookWorkspace, error)
    public static NotebookWorkspace Get(string name, Input<string> id, NotebookWorkspaceState? state, CustomResourceOptions? opts = null)
    public static NotebookWorkspace get(String name, Output<String> id, NotebookWorkspaceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AccountName string
    The name of the Cosmos DB Account to create the SQL Notebook Workspace within. Changing this forces a new SQL Notebook Workspace to be created.
    Name string
    The name which should be used for this SQL Notebook Workspace. Possible value is default. Changing this forces a new SQL Notebook Workspace to be created.
    ResourceGroupName string
    The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
    ServerEndpoint string
    Specifies the endpoint of Notebook server.
    AccountName string
    The name of the Cosmos DB Account to create the SQL Notebook Workspace within. Changing this forces a new SQL Notebook Workspace to be created.
    Name string
    The name which should be used for this SQL Notebook Workspace. Possible value is default. Changing this forces a new SQL Notebook Workspace to be created.
    ResourceGroupName string
    The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
    ServerEndpoint string
    Specifies the endpoint of Notebook server.
    accountName String
    The name of the Cosmos DB Account to create the SQL Notebook Workspace within. Changing this forces a new SQL Notebook Workspace to be created.
    name String
    The name which should be used for this SQL Notebook Workspace. Possible value is default. Changing this forces a new SQL Notebook Workspace to be created.
    resourceGroupName String
    The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
    serverEndpoint String
    Specifies the endpoint of Notebook server.
    accountName string
    The name of the Cosmos DB Account to create the SQL Notebook Workspace within. Changing this forces a new SQL Notebook Workspace to be created.
    name string
    The name which should be used for this SQL Notebook Workspace. Possible value is default. Changing this forces a new SQL Notebook Workspace to be created.
    resourceGroupName string
    The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
    serverEndpoint string
    Specifies the endpoint of Notebook server.
    account_name str
    The name of the Cosmos DB Account to create the SQL Notebook Workspace within. Changing this forces a new SQL Notebook Workspace to be created.
    name str
    The name which should be used for this SQL Notebook Workspace. Possible value is default. Changing this forces a new SQL Notebook Workspace to be created.
    resource_group_name str
    The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
    server_endpoint str
    Specifies the endpoint of Notebook server.
    accountName String
    The name of the Cosmos DB Account to create the SQL Notebook Workspace within. Changing this forces a new SQL Notebook Workspace to be created.
    name String
    The name which should be used for this SQL Notebook Workspace. Possible value is default. Changing this forces a new SQL Notebook Workspace to be created.
    resourceGroupName String
    The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
    serverEndpoint String
    Specifies the endpoint of Notebook server.

    Import

    =SQL Notebook Workspaces can be imported using the resource id, e.g.

    $ pulumi import azure:cosmosdb/notebookWorkspace:NotebookWorkspace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/databaseAccounts/account1/notebookWorkspaces/notebookWorkspace1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi