# 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

__all__ = [
    'GetWorkspaceEntityTagAssignmentsResult',
    'AwaitableGetWorkspaceEntityTagAssignmentsResult',
    'get_workspace_entity_tag_assignments',
    'get_workspace_entity_tag_assignments_output',
]

@pulumi.output_type
class GetWorkspaceEntityTagAssignmentsResult:
    """
    A collection of values returned by getWorkspaceEntityTagAssignments.
    """
    def __init__(__self__, entity_id=None, entity_type=None, id=None, page_size=None, tag_assignments=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 page_size and not isinstance(page_size, int):
            raise TypeError("Expected argument 'page_size' to be a int")
        pulumi.set(__self__, "page_size", page_size)
        if tag_assignments and not isinstance(tag_assignments, list):
            raise TypeError("Expected argument 'tag_assignments' to be a list")
        pulumi.set(__self__, "tag_assignments", tag_assignments)

    @_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 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="pageSize")
    def page_size(self) -> Optional[_builtins.int]:
        return pulumi.get(self, "page_size")

    @_builtins.property
    @pulumi.getter(name="tagAssignments")
    def tag_assignments(self) -> Sequence['outputs.GetWorkspaceEntityTagAssignmentsTagAssignmentResult']:
        return pulumi.get(self, "tag_assignments")


class AwaitableGetWorkspaceEntityTagAssignmentsResult(GetWorkspaceEntityTagAssignmentsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetWorkspaceEntityTagAssignmentsResult(
            entity_id=self.entity_id,
            entity_type=self.entity_type,
            id=self.id,
            page_size=self.page_size,
            tag_assignments=self.tag_assignments)


def get_workspace_entity_tag_assignments(entity_id: Optional[_builtins.str] = None,
                                         entity_type: Optional[_builtins.str] = None,
                                         page_size: Optional[_builtins.int] = None,
                                         opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetWorkspaceEntityTagAssignmentsResult:
    """
    [![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 retrieve tag assignments that have been applied to a particular workspace scoped entity.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_databricks as databricks

    dashboard_tags = databricks.get_workspace_entity_tag_assignments(entity_type="dashboards",
        entity_id="2807324866692453")
    geniespace_tags = databricks.get_workspace_entity_tag_assignments(entity_type="geniespaces",
        entity_id="2807324866692453")
    ```


    :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 dashboards, geniespaces
    :param _builtins.int page_size: Optional. Maximum number of tag assignments to return in a single page
    """
    __args__ = dict()
    __args__['entityId'] = entity_id
    __args__['entityType'] = entity_type
    __args__['pageSize'] = page_size
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getWorkspaceEntityTagAssignments:getWorkspaceEntityTagAssignments', __args__, opts=opts, typ=GetWorkspaceEntityTagAssignmentsResult).value

    return AwaitableGetWorkspaceEntityTagAssignmentsResult(
        entity_id=pulumi.get(__ret__, 'entity_id'),
        entity_type=pulumi.get(__ret__, 'entity_type'),
        id=pulumi.get(__ret__, 'id'),
        page_size=pulumi.get(__ret__, 'page_size'),
        tag_assignments=pulumi.get(__ret__, 'tag_assignments'))
def get_workspace_entity_tag_assignments_output(entity_id: Optional[pulumi.Input[_builtins.str]] = None,
                                                entity_type: Optional[pulumi.Input[_builtins.str]] = None,
                                                page_size: Optional[pulumi.Input[Optional[_builtins.int]]] = None,
                                                opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetWorkspaceEntityTagAssignmentsResult]:
    """
    [![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 retrieve tag assignments that have been applied to a particular workspace scoped entity.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_databricks as databricks

    dashboard_tags = databricks.get_workspace_entity_tag_assignments(entity_type="dashboards",
        entity_id="2807324866692453")
    geniespace_tags = databricks.get_workspace_entity_tag_assignments(entity_type="geniespaces",
        entity_id="2807324866692453")
    ```


    :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 dashboards, geniespaces
    :param _builtins.int page_size: Optional. Maximum number of tag assignments to return in a single page
    """
    __args__ = dict()
    __args__['entityId'] = entity_id
    __args__['entityType'] = entity_type
    __args__['pageSize'] = page_size
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getWorkspaceEntityTagAssignments:getWorkspaceEntityTagAssignments', __args__, opts=opts, typ=GetWorkspaceEntityTagAssignmentsResult)
    return __ret__.apply(lambda __response__: GetWorkspaceEntityTagAssignmentsResult(
        entity_id=pulumi.get(__response__, 'entity_id'),
        entity_type=pulumi.get(__response__, 'entity_type'),
        id=pulumi.get(__response__, 'id'),
        page_size=pulumi.get(__response__, 'page_size'),
        tag_assignments=pulumi.get(__response__, 'tag_assignments')))
