# 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__ = [
    'GetAccountNetworkPoliciesResult',
    'AwaitableGetAccountNetworkPoliciesResult',
    'get_account_network_policies',
    'get_account_network_policies_output',
]

@pulumi.output_type
class GetAccountNetworkPoliciesResult:
    """
    A collection of values returned by getAccountNetworkPolicies.
    """
    def __init__(__self__, id=None, items=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if items and not isinstance(items, list):
            raise TypeError("Expected argument 'items' to be a list")
        pulumi.set(__self__, "items", items)

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


class AwaitableGetAccountNetworkPoliciesResult(GetAccountNetworkPoliciesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAccountNetworkPoliciesResult(
            id=self.id,
            items=self.items)


def get_account_network_policies(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAccountNetworkPoliciesResult:
    """
    [![GA](https://img.shields.io/badge/Release_Stage-GA-green)](https://docs.databricks.com/aws/en/release-notes/release-types)

    This data source can be used to fetch the list of network policies.

    > **Note** This data source can only be used with an account-level provider!

    ## Example Usage

    Getting a list of all network policies:

    ```python
    import pulumi
    import pulumi_databricks as databricks

    all = databricks.get_account_network_policies()
    ```
    """
    __args__ = dict()
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getAccountNetworkPolicies:getAccountNetworkPolicies', __args__, opts=opts, typ=GetAccountNetworkPoliciesResult).value

    return AwaitableGetAccountNetworkPoliciesResult(
        id=pulumi.get(__ret__, 'id'),
        items=pulumi.get(__ret__, 'items'))
def get_account_network_policies_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAccountNetworkPoliciesResult]:
    """
    [![GA](https://img.shields.io/badge/Release_Stage-GA-green)](https://docs.databricks.com/aws/en/release-notes/release-types)

    This data source can be used to fetch the list of network policies.

    > **Note** This data source can only be used with an account-level provider!

    ## Example Usage

    Getting a list of all network policies:

    ```python
    import pulumi
    import pulumi_databricks as databricks

    all = databricks.get_account_network_policies()
    ```
    """
    __args__ = dict()
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getAccountNetworkPolicies:getAccountNetworkPolicies', __args__, opts=opts, typ=GetAccountNetworkPoliciesResult)
    return __ret__.apply(lambda __response__: GetAccountNetworkPoliciesResult(
        id=pulumi.get(__response__, 'id'),
        items=pulumi.get(__response__, 'items')))
