1. Packages
  2. Azure Classic
  3. API Docs
  4. databricks
  5. getWorkspace

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

azure.databricks.getWorkspace

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

    Use this data source to access information about an existing Databricks workspace.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.databricks.getWorkspace({
        name: "example-workspace",
        resourceGroupName: "example-rg",
    });
    export const databricksWorkspaceId = example.then(example => example.workspaceId);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.databricks.get_workspace(name="example-workspace",
        resource_group_name="example-rg")
    pulumi.export("databricksWorkspaceId", example.workspace_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := databricks.LookupWorkspace(ctx, &databricks.LookupWorkspaceArgs{
    			Name:              "example-workspace",
    			ResourceGroupName: "example-rg",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("databricksWorkspaceId", example.WorkspaceId)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.DataBricks.GetWorkspace.Invoke(new()
        {
            Name = "example-workspace",
            ResourceGroupName = "example-rg",
        });
    
        return new Dictionary<string, object?>
        {
            ["databricksWorkspaceId"] = example.Apply(getWorkspaceResult => getWorkspaceResult.WorkspaceId),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.databricks.DatabricksFunctions;
    import com.pulumi.azure.databricks.inputs.GetWorkspaceArgs;
    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) {
            final var example = DatabricksFunctions.getWorkspace(GetWorkspaceArgs.builder()
                .name("example-workspace")
                .resourceGroupName("example-rg")
                .build());
    
            ctx.export("databricksWorkspaceId", example.applyValue(getWorkspaceResult -> getWorkspaceResult.workspaceId()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:databricks:getWorkspace
          Arguments:
            name: example-workspace
            resourceGroupName: example-rg
    outputs:
      databricksWorkspaceId: ${example.workspaceId}
    

    Using getWorkspace

    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 getWorkspace(args: GetWorkspaceArgs, opts?: InvokeOptions): Promise<GetWorkspaceResult>
    function getWorkspaceOutput(args: GetWorkspaceOutputArgs, opts?: InvokeOptions): Output<GetWorkspaceResult>
    def get_workspace(name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      tags: Optional[Mapping[str, str]] = None,
                      opts: Optional[InvokeOptions] = None) -> GetWorkspaceResult
    def get_workspace_output(name: Optional[pulumi.Input[str]] = None,
                      resource_group_name: Optional[pulumi.Input[str]] = None,
                      tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetWorkspaceResult]
    func LookupWorkspace(ctx *Context, args *LookupWorkspaceArgs, opts ...InvokeOption) (*LookupWorkspaceResult, error)
    func LookupWorkspaceOutput(ctx *Context, args *LookupWorkspaceOutputArgs, opts ...InvokeOption) LookupWorkspaceResultOutput

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

    public static class GetWorkspace 
    {
        public static Task<GetWorkspaceResult> InvokeAsync(GetWorkspaceArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkspaceResult> Invoke(GetWorkspaceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWorkspaceResult> getWorkspace(GetWorkspaceArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:databricks/getWorkspace:getWorkspace
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Databricks Workspace.
    ResourceGroupName string
    The Name of the Resource Group where the Databricks Workspace exists.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the Databricks Workspace.
    Name string
    The name of the Databricks Workspace.
    ResourceGroupName string
    The Name of the Resource Group where the Databricks Workspace exists.
    Tags map[string]string
    A mapping of tags to assign to the Databricks Workspace.
    name String
    The name of the Databricks Workspace.
    resourceGroupName String
    The Name of the Resource Group where the Databricks Workspace exists.
    tags Map<String,String>
    A mapping of tags to assign to the Databricks Workspace.
    name string
    The name of the Databricks Workspace.
    resourceGroupName string
    The Name of the Resource Group where the Databricks Workspace exists.
    tags {[key: string]: string}
    A mapping of tags to assign to the Databricks Workspace.
    name str
    The name of the Databricks Workspace.
    resource_group_name str
    The Name of the Resource Group where the Databricks Workspace exists.
    tags Mapping[str, str]
    A mapping of tags to assign to the Databricks Workspace.
    name String
    The name of the Databricks Workspace.
    resourceGroupName String
    The Name of the Resource Group where the Databricks Workspace exists.
    tags Map<String>
    A mapping of tags to assign to the Databricks Workspace.

    getWorkspace Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure location where the Databricks Workspace exists.
    ManagedDiskIdentities List<Pulumi.Azure.DataBricks.Outputs.GetWorkspaceManagedDiskIdentity>
    A managed_disk_identity block as documented below.
    Name string
    ResourceGroupName string
    Sku string
    SKU of this Databricks Workspace.
    StorageAccountIdentities List<Pulumi.Azure.DataBricks.Outputs.GetWorkspaceStorageAccountIdentity>
    A storage_account_identity block as documented below.
    WorkspaceId string
    Unique ID of this Databricks Workspace in Databricks management plane.
    WorkspaceUrl string
    URL this Databricks Workspace is accessible on.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the Databricks Workspace.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure location where the Databricks Workspace exists.
    ManagedDiskIdentities []GetWorkspaceManagedDiskIdentity
    A managed_disk_identity block as documented below.
    Name string
    ResourceGroupName string
    Sku string
    SKU of this Databricks Workspace.
    StorageAccountIdentities []GetWorkspaceStorageAccountIdentity
    A storage_account_identity block as documented below.
    WorkspaceId string
    Unique ID of this Databricks Workspace in Databricks management plane.
    WorkspaceUrl string
    URL this Databricks Workspace is accessible on.
    Tags map[string]string
    A mapping of tags to assign to the Databricks Workspace.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure location where the Databricks Workspace exists.
    managedDiskIdentities List<GetWorkspaceManagedDiskIdentity>
    A managed_disk_identity block as documented below.
    name String
    resourceGroupName String
    sku String
    SKU of this Databricks Workspace.
    storageAccountIdentities List<GetWorkspaceStorageAccountIdentity>
    A storage_account_identity block as documented below.
    workspaceId String
    Unique ID of this Databricks Workspace in Databricks management plane.
    workspaceUrl String
    URL this Databricks Workspace is accessible on.
    tags Map<String,String>
    A mapping of tags to assign to the Databricks Workspace.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    The Azure location where the Databricks Workspace exists.
    managedDiskIdentities GetWorkspaceManagedDiskIdentity[]
    A managed_disk_identity block as documented below.
    name string
    resourceGroupName string
    sku string
    SKU of this Databricks Workspace.
    storageAccountIdentities GetWorkspaceStorageAccountIdentity[]
    A storage_account_identity block as documented below.
    workspaceId string
    Unique ID of this Databricks Workspace in Databricks management plane.
    workspaceUrl string
    URL this Databricks Workspace is accessible on.
    tags {[key: string]: string}
    A mapping of tags to assign to the Databricks Workspace.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    The Azure location where the Databricks Workspace exists.
    managed_disk_identities Sequence[GetWorkspaceManagedDiskIdentity]
    A managed_disk_identity block as documented below.
    name str
    resource_group_name str
    sku str
    SKU of this Databricks Workspace.
    storage_account_identities Sequence[GetWorkspaceStorageAccountIdentity]
    A storage_account_identity block as documented below.
    workspace_id str
    Unique ID of this Databricks Workspace in Databricks management plane.
    workspace_url str
    URL this Databricks Workspace is accessible on.
    tags Mapping[str, str]
    A mapping of tags to assign to the Databricks Workspace.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure location where the Databricks Workspace exists.
    managedDiskIdentities List<Property Map>
    A managed_disk_identity block as documented below.
    name String
    resourceGroupName String
    sku String
    SKU of this Databricks Workspace.
    storageAccountIdentities List<Property Map>
    A storage_account_identity block as documented below.
    workspaceId String
    Unique ID of this Databricks Workspace in Databricks management plane.
    workspaceUrl String
    URL this Databricks Workspace is accessible on.
    tags Map<String>
    A mapping of tags to assign to the Databricks Workspace.

    Supporting Types

    GetWorkspaceManagedDiskIdentity

    PrincipalId string
    The principal UUID for the internal databricks storage account needed to provide access to the workspace for enabling Customer Managed Keys.
    TenantId string
    The UUID of the tenant where the internal databricks storage account was created.
    Type string
    The type of the internal databricks storage account.
    PrincipalId string
    The principal UUID for the internal databricks storage account needed to provide access to the workspace for enabling Customer Managed Keys.
    TenantId string
    The UUID of the tenant where the internal databricks storage account was created.
    Type string
    The type of the internal databricks storage account.
    principalId String
    The principal UUID for the internal databricks storage account needed to provide access to the workspace for enabling Customer Managed Keys.
    tenantId String
    The UUID of the tenant where the internal databricks storage account was created.
    type String
    The type of the internal databricks storage account.
    principalId string
    The principal UUID for the internal databricks storage account needed to provide access to the workspace for enabling Customer Managed Keys.
    tenantId string
    The UUID of the tenant where the internal databricks storage account was created.
    type string
    The type of the internal databricks storage account.
    principal_id str
    The principal UUID for the internal databricks storage account needed to provide access to the workspace for enabling Customer Managed Keys.
    tenant_id str
    The UUID of the tenant where the internal databricks storage account was created.
    type str
    The type of the internal databricks storage account.
    principalId String
    The principal UUID for the internal databricks storage account needed to provide access to the workspace for enabling Customer Managed Keys.
    tenantId String
    The UUID of the tenant where the internal databricks storage account was created.
    type String
    The type of the internal databricks storage account.

    GetWorkspaceStorageAccountIdentity

    PrincipalId string
    The principal UUID for the internal databricks storage account needed to provide access to the workspace for enabling Customer Managed Keys.
    TenantId string
    The UUID of the tenant where the internal databricks storage account was created.
    Type string
    The type of the internal databricks storage account.
    PrincipalId string
    The principal UUID for the internal databricks storage account needed to provide access to the workspace for enabling Customer Managed Keys.
    TenantId string
    The UUID of the tenant where the internal databricks storage account was created.
    Type string
    The type of the internal databricks storage account.
    principalId String
    The principal UUID for the internal databricks storage account needed to provide access to the workspace for enabling Customer Managed Keys.
    tenantId String
    The UUID of the tenant where the internal databricks storage account was created.
    type String
    The type of the internal databricks storage account.
    principalId string
    The principal UUID for the internal databricks storage account needed to provide access to the workspace for enabling Customer Managed Keys.
    tenantId string
    The UUID of the tenant where the internal databricks storage account was created.
    type string
    The type of the internal databricks storage account.
    principal_id str
    The principal UUID for the internal databricks storage account needed to provide access to the workspace for enabling Customer Managed Keys.
    tenant_id str
    The UUID of the tenant where the internal databricks storage account was created.
    type str
    The type of the internal databricks storage account.
    principalId String
    The principal UUID for the internal databricks storage account needed to provide access to the workspace for enabling Customer Managed Keys.
    tenantId String
    The UUID of the tenant where the internal databricks storage account was created.
    type String
    The type of the internal databricks storage account.

    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.73.0 published on Monday, Apr 22, 2024 by Pulumi