# 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__ = [
    'GetAccountNetworkPolicyResult',
    'AwaitableGetAccountNetworkPolicyResult',
    'get_account_network_policy',
    'get_account_network_policy_output',
]

@pulumi.output_type
class GetAccountNetworkPolicyResult:
    """
    A collection of values returned by getAccountNetworkPolicy.
    """
    def __init__(__self__, account_id=None, egress=None, id=None, network_policy_id=None):
        if account_id and not isinstance(account_id, str):
            raise TypeError("Expected argument 'account_id' to be a str")
        pulumi.set(__self__, "account_id", account_id)
        if egress and not isinstance(egress, dict):
            raise TypeError("Expected argument 'egress' to be a dict")
        pulumi.set(__self__, "egress", egress)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if network_policy_id and not isinstance(network_policy_id, str):
            raise TypeError("Expected argument 'network_policy_id' to be a str")
        pulumi.set(__self__, "network_policy_id", network_policy_id)

    @_builtins.property
    @pulumi.getter(name="accountId")
    def account_id(self) -> _builtins.str:
        """
        (string) - The associated account ID for this Network Policy object
        """
        return pulumi.get(self, "account_id")

    @_builtins.property
    @pulumi.getter
    def egress(self) -> 'outputs.GetAccountNetworkPolicyEgressResult':
        """
        (NetworkPolicyEgress) - The network policies applying for egress traffic
        """
        return pulumi.get(self, "egress")

    @_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="networkPolicyId")
    def network_policy_id(self) -> _builtins.str:
        """
        (string) - The unique identifier for the network policy
        """
        return pulumi.get(self, "network_policy_id")


class AwaitableGetAccountNetworkPolicyResult(GetAccountNetworkPolicyResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetAccountNetworkPolicyResult(
            account_id=self.account_id,
            egress=self.egress,
            id=self.id,
            network_policy_id=self.network_policy_id)


def get_account_network_policy(network_policy_id: Optional[_builtins.str] = None,
                               opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAccountNetworkPolicyResult:
    """
    [![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 get a single network policy.

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

    ## Example Usage

    Referring to a network policy by id:


    :param _builtins.str network_policy_id: The unique identifier for the network policy
    """
    __args__ = dict()
    __args__['networkPolicyId'] = network_policy_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getAccountNetworkPolicy:getAccountNetworkPolicy', __args__, opts=opts, typ=GetAccountNetworkPolicyResult).value

    return AwaitableGetAccountNetworkPolicyResult(
        account_id=pulumi.get(__ret__, 'account_id'),
        egress=pulumi.get(__ret__, 'egress'),
        id=pulumi.get(__ret__, 'id'),
        network_policy_id=pulumi.get(__ret__, 'network_policy_id'))
def get_account_network_policy_output(network_policy_id: Optional[pulumi.Input[_builtins.str]] = None,
                                      opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAccountNetworkPolicyResult]:
    """
    [![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 get a single network policy.

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

    ## Example Usage

    Referring to a network policy by id:


    :param _builtins.str network_policy_id: The unique identifier for the network policy
    """
    __args__ = dict()
    __args__['networkPolicyId'] = network_policy_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getAccountNetworkPolicy:getAccountNetworkPolicy', __args__, opts=opts, typ=GetAccountNetworkPolicyResult)
    return __ret__.apply(lambda __response__: GetAccountNetworkPolicyResult(
        account_id=pulumi.get(__response__, 'account_id'),
        egress=pulumi.get(__response__, 'egress'),
        id=pulumi.get(__response__, 'id'),
        network_policy_id=pulumi.get(__response__, 'network_policy_id')))
