# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetWorkspaceEntityTagAssignmentResult',
    'AwaitableGetWorkspaceEntityTagAssignmentResult',
    'get_workspace_entity_tag_assignment',
    'get_workspace_entity_tag_assignment_output',
]

@pulumi.output_type
class GetWorkspaceEntityTagAssignmentResult:
    """
    A collection of values returned by getWorkspaceEntityTagAssignment.
    """
    def __init__(__self__, entity_id=None, entity_type=None, id=None, provider_config=None, tag_key=None, tag_value=None):
        if entity_id and not isinstance(entity_id, str):
            raise TypeError("Expected argument 'entity_id' to be a str")
        pulumi.set(__self__, "entity_id", entity_id)
        if entity_type and not isinstance(entity_type, str):
            raise TypeError("Expected argument 'entity_type' to be a str")
        pulumi.set(__self__, "entity_type", entity_type)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if provider_config and not isinstance(provider_config, dict):
            raise TypeError("Expected argument 'provider_config' to be a dict")
        pulumi.set(__self__, "provider_config", provider_config)
        if tag_key and not isinstance(tag_key, str):
            raise TypeError("Expected argument 'tag_key' to be a str")
        pulumi.set(__self__, "tag_key", tag_key)
        if tag_value and not isinstance(tag_value, str):
            raise TypeError("Expected argument 'tag_value' to be a str")
        pulumi.set(__self__, "tag_value", tag_value)

    @_builtins.property
    @pulumi.getter(name="entityId")
    def entity_id(self) -> _builtins.str:
        """
        (string) - The identifier of the entity to which the tag is assigned
        """
        return pulumi.get(self, "entity_id")

    @_builtins.property
    @pulumi.getter(name="entityType")
    def entity_type(self) -> _builtins.str:
        """
        (string) - The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces
        """
        return pulumi.get(self, "entity_type")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> Optional['outputs.GetWorkspaceEntityTagAssignmentProviderConfigResult']:
        return pulumi.get(self, "provider_config")

    @_builtins.property
    @pulumi.getter(name="tagKey")
    def tag_key(self) -> _builtins.str:
        """
        (string) - The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
        """
        return pulumi.get(self, "tag_key")

    @_builtins.property
    @pulumi.getter(name="tagValue")
    def tag_value(self) -> _builtins.str:
        """
        (string) - The value of the tag
        """
        return pulumi.get(self, "tag_value")


class AwaitableGetWorkspaceEntityTagAssignmentResult(GetWorkspaceEntityTagAssignmentResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetWorkspaceEntityTagAssignmentResult(
            entity_id=self.entity_id,
            entity_type=self.entity_type,
            id=self.id,
            provider_config=self.provider_config,
            tag_key=self.tag_key,
            tag_value=self.tag_value)


def get_workspace_entity_tag_assignment(entity_id: Optional[_builtins.str] = None,
                                        entity_type: Optional[_builtins.str] = None,
                                        provider_config: Optional[Union['GetWorkspaceEntityTagAssignmentProviderConfigArgs', 'GetWorkspaceEntityTagAssignmentProviderConfigArgsDict']] = None,
                                        tag_key: Optional[_builtins.str] = None,
                                        opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetWorkspaceEntityTagAssignmentResult:
    """
    [![Public Beta](https://img.shields.io/badge/Release_Stage-Public_Beta-orange)](https://docs.databricks.com/aws/en/release-notes/release-types)

    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

    ```python
    import pulumi
    import pulumi_databricks as databricks

    app_tag = databricks.get_workspace_entity_tag_assignment(entity_type="apps",
        entity_id="2807324866692453",
        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")
    ```


    :param _builtins.str entity_id: The identifier of the entity to which the tag is assigned
    :param _builtins.str entity_type: The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces
    :param Union['GetWorkspaceEntityTagAssignmentProviderConfigArgs', 'GetWorkspaceEntityTagAssignmentProviderConfigArgsDict'] provider_config: Configure the provider for management through account provider.
    :param _builtins.str tag_key: The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    """
    __args__ = dict()
    __args__['entityId'] = entity_id
    __args__['entityType'] = entity_type
    __args__['providerConfig'] = provider_config
    __args__['tagKey'] = tag_key
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getWorkspaceEntityTagAssignment:getWorkspaceEntityTagAssignment', __args__, opts=opts, typ=GetWorkspaceEntityTagAssignmentResult).value

    return AwaitableGetWorkspaceEntityTagAssignmentResult(
        entity_id=pulumi.get(__ret__, 'entity_id'),
        entity_type=pulumi.get(__ret__, 'entity_type'),
        id=pulumi.get(__ret__, 'id'),
        provider_config=pulumi.get(__ret__, 'provider_config'),
        tag_key=pulumi.get(__ret__, 'tag_key'),
        tag_value=pulumi.get(__ret__, 'tag_value'))
def get_workspace_entity_tag_assignment_output(entity_id: Optional[pulumi.Input[_builtins.str]] = None,
                                               entity_type: Optional[pulumi.Input[_builtins.str]] = None,
                                               provider_config: Optional[pulumi.Input[Optional[Union['GetWorkspaceEntityTagAssignmentProviderConfigArgs', 'GetWorkspaceEntityTagAssignmentProviderConfigArgsDict']]]] = None,
                                               tag_key: Optional[pulumi.Input[_builtins.str]] = None,
                                               opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetWorkspaceEntityTagAssignmentResult]:
    """
    [![Public Beta](https://img.shields.io/badge/Release_Stage-Public_Beta-orange)](https://docs.databricks.com/aws/en/release-notes/release-types)

    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

    ```python
    import pulumi
    import pulumi_databricks as databricks

    app_tag = databricks.get_workspace_entity_tag_assignment(entity_type="apps",
        entity_id="2807324866692453",
        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")
    ```


    :param _builtins.str entity_id: The identifier of the entity to which the tag is assigned
    :param _builtins.str entity_type: The type of entity to which the tag is assigned. Allowed values are apps, dashboards, geniespaces
    :param Union['GetWorkspaceEntityTagAssignmentProviderConfigArgs', 'GetWorkspaceEntityTagAssignmentProviderConfigArgsDict'] provider_config: Configure the provider for management through account provider.
    :param _builtins.str tag_key: The key of the tag. The characters , . : / - = and leading/trailing spaces are not allowed
    """
    __args__ = dict()
    __args__['entityId'] = entity_id
    __args__['entityType'] = entity_type
    __args__['providerConfig'] = provider_config
    __args__['tagKey'] = tag_key
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getWorkspaceEntityTagAssignment:getWorkspaceEntityTagAssignment', __args__, opts=opts, typ=GetWorkspaceEntityTagAssignmentResult)
    return __ret__.apply(lambda __response__: GetWorkspaceEntityTagAssignmentResult(
        entity_id=pulumi.get(__response__, 'entity_id'),
        entity_type=pulumi.get(__response__, 'entity_type'),
        id=pulumi.get(__response__, 'id'),
        provider_config=pulumi.get(__response__, 'provider_config'),
        tag_key=pulumi.get(__response__, 'tag_key'),
        tag_value=pulumi.get(__response__, 'tag_value')))
