# 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__ = [
    'GetTagPoliciesResult',
    'AwaitableGetTagPoliciesResult',
    'get_tag_policies',
    'get_tag_policies_output',
]

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

    @_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="tagPolicies")
    def tag_policies(self) -> Sequence['outputs.GetTagPoliciesTagPolicyResult']:
        return pulumi.get(self, "tag_policies")


class AwaitableGetTagPoliciesResult(GetTagPoliciesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetTagPoliciesResult(
            id=self.id,
            page_size=self.page_size,
            tag_policies=self.tag_policies)


def get_tag_policies(page_size: Optional[_builtins.int] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetTagPoliciesResult:
    """
    [![Public Preview](https://img.shields.io/badge/Release_Stage-Public_Preview-yellowgreen)](https://docs.databricks.com/aws/en/release-notes/release-types)

    This data source can be used to list all tag policies in the account.

    > **Note** This resource can only be used with a workspace-level provider!

    ## Example Usage

    Getting a list of all tag policies:

    ```python
    import pulumi
    import pulumi_databricks as databricks

    all = databricks.get_tag_policies()
    pulumi.export("allTagPolicies", all.tag_policies)
    ```


    :param _builtins.int page_size: The maximum number of results to return in this request. Fewer results may be returned than requested. If
           unspecified or set to 0, this defaults to 1000. The maximum value is 1000; values above 1000 will be coerced down
           to 1000
    """
    __args__ = dict()
    __args__['pageSize'] = page_size
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getTagPolicies:getTagPolicies', __args__, opts=opts, typ=GetTagPoliciesResult).value

    return AwaitableGetTagPoliciesResult(
        id=pulumi.get(__ret__, 'id'),
        page_size=pulumi.get(__ret__, 'page_size'),
        tag_policies=pulumi.get(__ret__, 'tag_policies'))
def get_tag_policies_output(page_size: Optional[pulumi.Input[Optional[_builtins.int]]] = None,
                            opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetTagPoliciesResult]:
    """
    [![Public Preview](https://img.shields.io/badge/Release_Stage-Public_Preview-yellowgreen)](https://docs.databricks.com/aws/en/release-notes/release-types)

    This data source can be used to list all tag policies in the account.

    > **Note** This resource can only be used with a workspace-level provider!

    ## Example Usage

    Getting a list of all tag policies:

    ```python
    import pulumi
    import pulumi_databricks as databricks

    all = databricks.get_tag_policies()
    pulumi.export("allTagPolicies", all.tag_policies)
    ```


    :param _builtins.int page_size: The maximum number of results to return in this request. Fewer results may be returned than requested. If
           unspecified or set to 0, this defaults to 1000. The maximum value is 1000; values above 1000 will be coerced down
           to 1000
    """
    __args__ = dict()
    __args__['pageSize'] = page_size
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getTagPolicies:getTagPolicies', __args__, opts=opts, typ=GetTagPoliciesResult)
    return __ret__.apply(lambda __response__: GetTagPoliciesResult(
        id=pulumi.get(__response__, 'id'),
        page_size=pulumi.get(__response__, 'page_size'),
        tag_policies=pulumi.get(__response__, 'tag_policies')))
