1. Packages
  2. Databricks Provider
  3. API Docs
  4. getWorkspaceEntityTagAssignment
Viewing docs for Databricks v1.90.0
published on Thursday, Mar 19, 2026 by Pulumi
databricks logo
Viewing docs for Databricks v1.90.0
published on Thursday, Mar 19, 2026 by Pulumi

    Public Beta

    This data source allows you to get information about a tag assignment for a specific workspace scoped entity using the entity type, entity id, and tag key.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const notebookTag = databricks.getWorkspaceEntityTagAssignment({
        entityType: "notebooks",
        entityId: "2807324866692453",
        tagKey: "sensitivity_level",
    });
    const appTag = databricks.getWorkspaceEntityTagAssignment({
        entityType: "apps",
        entityId: "myapp",
        tagKey: "sensitivity_level",
    });
    const dashboardTag = databricks.getWorkspaceEntityTagAssignment({
        entityType: "dashboards",
        entityId: "2807324866692453",
        tagKey: "sensitivity_level",
    });
    const geniespaceTag = databricks.getWorkspaceEntityTagAssignment({
        entityType: "geniespaces",
        entityId: "2807324866692453",
        tagKey: "sensitivity_level",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    notebook_tag = databricks.get_workspace_entity_tag_assignment(entity_type="notebooks",
        entity_id="2807324866692453",
        tag_key="sensitivity_level")
    app_tag = databricks.get_workspace_entity_tag_assignment(entity_type="apps",
        entity_id="myapp",
        tag_key="sensitivity_level")
    dashboard_tag = databricks.get_workspace_entity_tag_assignment(entity_type="dashboards",
        entity_id="2807324866692453",
        tag_key="sensitivity_level")
    geniespace_tag = databricks.get_workspace_entity_tag_assignment(entity_type="geniespaces",
        entity_id="2807324866692453",
        tag_key="sensitivity_level")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := databricks.LookupWorkspaceEntityTagAssignment(ctx, &databricks.LookupWorkspaceEntityTagAssignmentArgs{
    			EntityType: "notebooks",
    			EntityId:   "2807324866692453",
    			TagKey:     "sensitivity_level",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = databricks.LookupWorkspaceEntityTagAssignment(ctx, &databricks.LookupWorkspaceEntityTagAssignmentArgs{
    			EntityType: "apps",
    			EntityId:   "myapp",
    			TagKey:     "sensitivity_level",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = databricks.LookupWorkspaceEntityTagAssignment(ctx, &databricks.LookupWorkspaceEntityTagAssignmentArgs{
    			EntityType: "dashboards",
    			EntityId:   "2807324866692453",
    			TagKey:     "sensitivity_level",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = databricks.LookupWorkspaceEntityTagAssignment(ctx, &databricks.LookupWorkspaceEntityTagAssignmentArgs{
    			EntityType: "geniespaces",
    			EntityId:   "2807324866692453",
    			TagKey:     "sensitivity_level",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var notebookTag = Databricks.GetWorkspaceEntityTagAssignment.Invoke(new()
        {
            EntityType = "notebooks",
            EntityId = "2807324866692453",
            TagKey = "sensitivity_level",
        });
    
        var appTag = Databricks.GetWorkspaceEntityTagAssignment.Invoke(new()
        {
            EntityType = "apps",
            EntityId = "myapp",
            TagKey = "sensitivity_level",
        });
    
        var dashboardTag = Databricks.GetWorkspaceEntityTagAssignment.Invoke(new()
        {
            EntityType = "dashboards",
            EntityId = "2807324866692453",
            TagKey = "sensitivity_level",
        });
    
        var geniespaceTag = Databricks.GetWorkspaceEntityTagAssignment.Invoke(new()
        {
            EntityType = "geniespaces",
            EntityId = "2807324866692453",
            TagKey = "sensitivity_level",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.DatabricksFunctions;
    import com.pulumi.databricks.inputs.GetWorkspaceEntityTagAssignmentArgs;
    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 notebookTag = DatabricksFunctions.getWorkspaceEntityTagAssignment(GetWorkspaceEntityTagAssignmentArgs.builder()
                .entityType("notebooks")
                .entityId("2807324866692453")
                .tagKey("sensitivity_level")
                .build());
    
            final var appTag = DatabricksFunctions.getWorkspaceEntityTagAssignment(GetWorkspaceEntityTagAssignmentArgs.builder()
                .entityType("apps")
                .entityId("myapp")
                .tagKey("sensitivity_level")
                .build());
    
            final var dashboardTag = DatabricksFunctions.getWorkspaceEntityTagAssignment(GetWorkspaceEntityTagAssignmentArgs.builder()
                .entityType("dashboards")
                .entityId("2807324866692453")
                .tagKey("sensitivity_level")
                .build());
    
            final var geniespaceTag = DatabricksFunctions.getWorkspaceEntityTagAssignment(GetWorkspaceEntityTagAssignmentArgs.builder()
                .entityType("geniespaces")
                .entityId("2807324866692453")
                .tagKey("sensitivity_level")
                .build());
    
        }
    }
    
    variables:
      notebookTag:
        fn::invoke:
          function: databricks:getWorkspaceEntityTagAssignment
          arguments:
            entityType: notebooks
            entityId: '2807324866692453'
            tagKey: sensitivity_level
      appTag:
        fn::invoke:
          function: databricks:getWorkspaceEntityTagAssignment
          arguments:
            entityType: apps
            entityId: myapp
            tagKey: sensitivity_level
      dashboardTag:
        fn::invoke:
          function: databricks:getWorkspaceEntityTagAssignment
          arguments:
            entityType: dashboards
            entityId: '2807324866692453'
            tagKey: sensitivity_level
      geniespaceTag:
        fn::invoke:
          function: databricks:getWorkspaceEntityTagAssignment
          arguments:
            entityType: geniespaces
            entityId: '2807324866692453'
            tagKey: sensitivity_level
    

    Using getWorkspaceEntityTagAssignment

    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 getWorkspaceEntityTagAssignment(args: GetWorkspaceEntityTagAssignmentArgs, opts?: InvokeOptions): Promise<GetWorkspaceEntityTagAssignmentResult>
    function getWorkspaceEntityTagAssignmentOutput(args: GetWorkspaceEntityTagAssignmentOutputArgs, opts?: InvokeOptions): Output<GetWorkspaceEntityTagAssignmentResult>
    def get_workspace_entity_tag_assignment(entity_id: Optional[str] = None,
                                            entity_type: Optional[str] = None,
                                            provider_config: Optional[GetWorkspaceEntityTagAssignmentProviderConfig] = None,
                                            tag_key: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetWorkspaceEntityTagAssignmentResult
    def get_workspace_entity_tag_assignment_output(entity_id: Optional[pulumi.Input[str]] = None,
                                            entity_type: Optional[pulumi.Input[str]] = None,
                                            provider_config: Optional[pulumi.Input[GetWorkspaceEntityTagAssignmentProviderConfigArgs]] = None,
                                            tag_key: Optional[pulumi.Input[str]] = None,
                                            opts: Optional[InvokeOptions] = None) -> Output[GetWorkspaceEntityTagAssignmentResult]
    func LookupWorkspaceEntityTagAssignment(ctx *Context, args *LookupWorkspaceEntityTagAssignmentArgs, opts ...InvokeOption) (*LookupWorkspaceEntityTagAssignmentResult, error)
    func LookupWorkspaceEntityTagAssignmentOutput(ctx *Context, args *LookupWorkspaceEntityTagAssignmentOutputArgs, opts ...InvokeOption) LookupWorkspaceEntityTagAssignmentResultOutput

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

    public static class GetWorkspaceEntityTagAssignment 
    {
        public static Task<GetWorkspaceEntityTagAssignmentResult> InvokeAsync(GetWorkspaceEntityTagAssignmentArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkspaceEntityTagAssignmentResult> Invoke(GetWorkspaceEntityTagAssignmentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWorkspaceEntityTagAssignmentResult> getWorkspaceEntityTagAssignment(GetWorkspaceEntityTagAssignmentArgs args, InvokeOptions options)
    public static Output<GetWorkspaceEntityTagAssignmentResult> getWorkspaceEntityTagAssignment(GetWorkspaceEntityTagAssignmentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: databricks:index/getWorkspaceEntityTagAssignment:getWorkspaceEntityTagAssignment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EntityId string
    The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name
    EntityType string
    The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks
    TagKey string
    The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    ProviderConfig GetWorkspaceEntityTagAssignmentProviderConfig
    Configure the provider for management through account provider.
    EntityId string
    The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name
    EntityType string
    The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks
    TagKey string
    The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    ProviderConfig GetWorkspaceEntityTagAssignmentProviderConfig
    Configure the provider for management through account provider.
    entityId String
    The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name
    entityType String
    The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks
    tagKey String
    The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    providerConfig GetWorkspaceEntityTagAssignmentProviderConfig
    Configure the provider for management through account provider.
    entityId string
    The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name
    entityType string
    The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks
    tagKey string
    The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    providerConfig GetWorkspaceEntityTagAssignmentProviderConfig
    Configure the provider for management through account provider.
    entity_id str
    The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name
    entity_type str
    The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks
    tag_key str
    The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    provider_config GetWorkspaceEntityTagAssignmentProviderConfig
    Configure the provider for management through account provider.
    entityId String
    The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name
    entityType String
    The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks
    tagKey String
    The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    providerConfig Property Map
    Configure the provider for management through account provider.

    getWorkspaceEntityTagAssignment Result

    The following output properties are available:

    EntityId string
    (string) - The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name
    EntityType string
    (string) - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks
    Id string
    The provider-assigned unique ID for this managed resource.
    TagKey string
    (string) - The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    TagValue string
    (string) - The value of the tag
    ProviderConfig GetWorkspaceEntityTagAssignmentProviderConfig
    EntityId string
    (string) - The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name
    EntityType string
    (string) - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks
    Id string
    The provider-assigned unique ID for this managed resource.
    TagKey string
    (string) - The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    TagValue string
    (string) - The value of the tag
    ProviderConfig GetWorkspaceEntityTagAssignmentProviderConfig
    entityId String
    (string) - The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name
    entityType String
    (string) - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks
    id String
    The provider-assigned unique ID for this managed resource.
    tagKey String
    (string) - The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    tagValue String
    (string) - The value of the tag
    providerConfig GetWorkspaceEntityTagAssignmentProviderConfig
    entityId string
    (string) - The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name
    entityType string
    (string) - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks
    id string
    The provider-assigned unique ID for this managed resource.
    tagKey string
    (string) - The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    tagValue string
    (string) - The value of the tag
    providerConfig GetWorkspaceEntityTagAssignmentProviderConfig
    entity_id str
    (string) - The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name
    entity_type str
    (string) - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks
    id str
    The provider-assigned unique ID for this managed resource.
    tag_key str
    (string) - The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    tag_value str
    (string) - The value of the tag
    provider_config GetWorkspaceEntityTagAssignmentProviderConfig
    entityId String
    (string) - The identifier of the entity to which the tag is assigned. For apps, the entity_id is the app name
    entityType String
    (string) - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces, notebooks
    id String
    The provider-assigned unique ID for this managed resource.
    tagKey String
    (string) - The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    tagValue String
    (string) - The value of the tag
    providerConfig Property Map

    Supporting Types

    GetWorkspaceEntityTagAssignmentProviderConfig

    WorkspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    WorkspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId String
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId string
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspace_id str
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
    workspaceId String
    Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Viewing docs for Databricks v1.90.0
    published on Thursday, Mar 19, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.