All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.cosmosdb.kotlin.NotebookWorkspaceArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.cosmosdb.kotlin

import com.pulumi.azure.cosmosdb.NotebookWorkspaceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * 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: .
 * > **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
 * 
 * ```typescript
 * 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,
 * });
 * ```
 * ```python
 * 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)
 * ```
 * ```csharp
 * 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,
 *     });
 * });
 * ```
 * ```go
 * 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
 * 	})
 * }
 * ```
 * ```java
 * 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());
 *     }
 * }
 * ```
 * ```yaml
 * 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}
 * ```
 * 
 * ## Import
 * =SQL Notebook Workspaces can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:cosmosdb/notebookWorkspace:NotebookWorkspace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/databaseAccounts/account1/notebookWorkspaces/notebookWorkspace1
 * ```
 * @property accountName 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.
 * @property name 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.
 * @property resourceGroupName The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
 */
public data class NotebookWorkspaceArgs(
    public val accountName: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.cosmosdb.NotebookWorkspaceArgs =
        com.pulumi.azure.cosmosdb.NotebookWorkspaceArgs.builder()
            .accountName(accountName?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [NotebookWorkspaceArgs].
 */
@PulumiTagMarker
public class NotebookWorkspaceArgsBuilder internal constructor() {
    private var accountName: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    /**
     * @param value 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.
     */
    @JvmName("kiybouafiookeyng")
    public suspend fun accountName(`value`: Output) {
        this.accountName = value
    }

    /**
     * @param value 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.
     */
    @JvmName("efauocwlelhsgsri")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
     */
    @JvmName("dkxflikjxhymdhpc")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value 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.
     */
    @JvmName("ppggfjxgkonaaeaa")
    public suspend fun accountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountName = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("iioepoqonkarvujo")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The name of the Resource Group where the SQL Notebook Workspace should exist. Changing this forces a new SQL Notebook Workspace to be created.
     */
    @JvmName("ckglyvyysfmibtvu")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    internal fun build(): NotebookWorkspaceArgs = NotebookWorkspaceArgs(
        accountName = accountName,
        name = name,
        resourceGroupName = resourceGroupName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy