# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
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__ = [
    'GetPrivateDataSourceConnectNetworksResult',
    'AwaitableGetPrivateDataSourceConnectNetworksResult',
    'get_private_data_source_connect_networks',
    'get_private_data_source_connect_networks_output',
]

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

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The ID of this datasource. This is an internal identifier used by the provider to track this datasource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="nameFilter")
    def name_filter(self) -> Optional[str]:
        return pulumi.get(self, "name_filter")

    @property
    @pulumi.getter(name="privateDataSourceConnectNetworks")
    def private_data_source_connect_networks(self) -> Sequence['outputs.GetPrivateDataSourceConnectNetworksPrivateDataSourceConnectNetworkResult']:
        return pulumi.get(self, "private_data_source_connect_networks")

    @property
    @pulumi.getter(name="regionFilter")
    def region_filter(self) -> Optional[str]:
        return pulumi.get(self, "region_filter")


class AwaitableGetPrivateDataSourceConnectNetworksResult(GetPrivateDataSourceConnectNetworksResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetPrivateDataSourceConnectNetworksResult(
            id=self.id,
            name_filter=self.name_filter,
            private_data_source_connect_networks=self.private_data_source_connect_networks,
            region_filter=self.region_filter)


def get_private_data_source_connect_networks(name_filter: Optional[str] = None,
                                             region_filter: Optional[str] = None,
                                             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPrivateDataSourceConnectNetworksResult:
    """
    Fetches Private Data source Connect networks from Grafana Cloud.

    * [Official documentation](https://grafana.com/docs/grafana-cloud/security-and-account-management/authentication-and-permissions/access-policies/)
    * [API documentation](https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-access-policies)

    Required access policy scopes:

    * accesspolicies:read
    """
    __args__ = dict()
    __args__['nameFilter'] = name_filter
    __args__['regionFilter'] = region_filter
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('grafana:cloud/getPrivateDataSourceConnectNetworks:getPrivateDataSourceConnectNetworks', __args__, opts=opts, typ=GetPrivateDataSourceConnectNetworksResult).value

    return AwaitableGetPrivateDataSourceConnectNetworksResult(
        id=pulumi.get(__ret__, 'id'),
        name_filter=pulumi.get(__ret__, 'name_filter'),
        private_data_source_connect_networks=pulumi.get(__ret__, 'private_data_source_connect_networks'),
        region_filter=pulumi.get(__ret__, 'region_filter'))
def get_private_data_source_connect_networks_output(name_filter: Optional[pulumi.Input[Optional[str]]] = None,
                                                    region_filter: Optional[pulumi.Input[Optional[str]]] = None,
                                                    opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPrivateDataSourceConnectNetworksResult]:
    """
    Fetches Private Data source Connect networks from Grafana Cloud.

    * [Official documentation](https://grafana.com/docs/grafana-cloud/security-and-account-management/authentication-and-permissions/access-policies/)
    * [API documentation](https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/#list-access-policies)

    Required access policy scopes:

    * accesspolicies:read
    """
    __args__ = dict()
    __args__['nameFilter'] = name_filter
    __args__['regionFilter'] = region_filter
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('grafana:cloud/getPrivateDataSourceConnectNetworks:getPrivateDataSourceConnectNetworks', __args__, opts=opts, typ=GetPrivateDataSourceConnectNetworksResult)
    return __ret__.apply(lambda __response__: GetPrivateDataSourceConnectNetworksResult(
        id=pulumi.get(__response__, 'id'),
        name_filter=pulumi.get(__response__, 'name_filter'),
        private_data_source_connect_networks=pulumi.get(__response__, 'private_data_source_connect_networks'),
        region_filter=pulumi.get(__response__, 'region_filter')))
