# 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__ = [
    'GetNetworkPoliciesResult',
    'AwaitableGetNetworkPoliciesResult',
    'get_network_policies',
    'get_network_policies_output',
]

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

    @_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="networkPolicies")
    def network_policies(self) -> Sequence['outputs.GetNetworkPoliciesNetworkPolicyResult']:
        """
        The network policies in the account
        """
        return pulumi.get(self, "network_policies")

    @_builtins.property
    @pulumi.getter
    def region(self) -> _builtins.str:
        """
        The region in which the resource is located.
        """
        return pulumi.get(self, "region")


class AwaitableGetNetworkPoliciesResult(GetNetworkPoliciesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetNetworkPoliciesResult(
            id=self.id,
            network_policies=self.network_policies,
            region=self.region)


def get_network_policies(region: Optional[_builtins.str] = None,
                         opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNetworkPoliciesResult:
    """
    A network policy data source. This can be used to get information about all network policies in Materialize.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_materialize as materialize

    all = materialize.get_network_policies()
    ```


    :param _builtins.str region: The region in which the resource is located.
    """
    __args__ = dict()
    __args__['region'] = region
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('materialize:index/getNetworkPolicies:GetNetworkPolicies', __args__, opts=opts, typ=GetNetworkPoliciesResult).value

    return AwaitableGetNetworkPoliciesResult(
        id=pulumi.get(__ret__, 'id'),
        network_policies=pulumi.get(__ret__, 'network_policies'),
        region=pulumi.get(__ret__, 'region'))
def get_network_policies_output(region: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                                opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNetworkPoliciesResult]:
    """
    A network policy data source. This can be used to get information about all network policies in Materialize.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_materialize as materialize

    all = materialize.get_network_policies()
    ```


    :param _builtins.str region: The region in which the resource is located.
    """
    __args__ = dict()
    __args__['region'] = region
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('materialize:index/getNetworkPolicies:GetNetworkPolicies', __args__, opts=opts, typ=GetNetworkPoliciesResult)
    return __ret__.apply(lambda __response__: GetNetworkPoliciesResult(
        id=pulumi.get(__response__, 'id'),
        network_policies=pulumi.get(__response__, 'network_policies'),
        region=pulumi.get(__response__, 'region')))
