# 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

__all__ = [
    'GetConfigEntryV2ExportedServicesResult',
    'AwaitableGetConfigEntryV2ExportedServicesResult',
    'get_config_entry_v2_exported_services',
    'get_config_entry_v2_exported_services_output',
]

@pulumi.output_type
class GetConfigEntryV2ExportedServicesResult:
    """
    A collection of values returned by getConfigEntryV2ExportedServices.
    """
    def __init__(__self__, id=None, kind=None, name=None, namespace=None, partition=None, partition_consumers=None, peer_consumers=None, sameness_group_consumers=None, services=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if kind and not isinstance(kind, str):
            raise TypeError("Expected argument 'kind' to be a str")
        pulumi.set(__self__, "kind", kind)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if namespace and not isinstance(namespace, str):
            raise TypeError("Expected argument 'namespace' to be a str")
        pulumi.set(__self__, "namespace", namespace)
        if partition and not isinstance(partition, str):
            raise TypeError("Expected argument 'partition' to be a str")
        pulumi.set(__self__, "partition", partition)
        if partition_consumers and not isinstance(partition_consumers, list):
            raise TypeError("Expected argument 'partition_consumers' to be a list")
        pulumi.set(__self__, "partition_consumers", partition_consumers)
        if peer_consumers and not isinstance(peer_consumers, list):
            raise TypeError("Expected argument 'peer_consumers' to be a list")
        pulumi.set(__self__, "peer_consumers", peer_consumers)
        if sameness_group_consumers and not isinstance(sameness_group_consumers, list):
            raise TypeError("Expected argument 'sameness_group_consumers' to be a list")
        pulumi.set(__self__, "sameness_group_consumers", sameness_group_consumers)
        if services and not isinstance(services, list):
            raise TypeError("Expected argument 'services' to be a list")
        pulumi.set(__self__, "services", services)

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def kind(self) -> str:
        """
        The kind of exported services config (ExportedServices, NamespaceExportedServices, PartitionExportedServices).
        """
        return pulumi.get(self, "kind")

    @property
    @pulumi.getter
    def name(self) -> str:
        """
        The name of the config entry to read.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def namespace(self) -> Optional[str]:
        """
        The namespace the config entry is associated with.
        """
        return pulumi.get(self, "namespace")

    @property
    @pulumi.getter
    def partition(self) -> Optional[str]:
        """
        The partition the config entry is associated with.
        """
        return pulumi.get(self, "partition")

    @property
    @pulumi.getter(name="partitionConsumers")
    def partition_consumers(self) -> Optional[Sequence[str]]:
        """
        The exported service partition consumers.
        """
        return pulumi.get(self, "partition_consumers")

    @property
    @pulumi.getter(name="peerConsumers")
    def peer_consumers(self) -> Optional[Sequence[str]]:
        """
        The exported service peer consumers.
        """
        return pulumi.get(self, "peer_consumers")

    @property
    @pulumi.getter(name="samenessGroupConsumers")
    def sameness_group_consumers(self) -> Optional[Sequence[str]]:
        """
        The exported service sameness group consumers.
        """
        return pulumi.get(self, "sameness_group_consumers")

    @property
    @pulumi.getter
    def services(self) -> Optional[Sequence[str]]:
        """
        The exported services.
        """
        return pulumi.get(self, "services")


class AwaitableGetConfigEntryV2ExportedServicesResult(GetConfigEntryV2ExportedServicesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetConfigEntryV2ExportedServicesResult(
            id=self.id,
            kind=self.kind,
            name=self.name,
            namespace=self.namespace,
            partition=self.partition,
            partition_consumers=self.partition_consumers,
            peer_consumers=self.peer_consumers,
            sameness_group_consumers=self.sameness_group_consumers,
            services=self.services)


def get_config_entry_v2_exported_services(kind: Optional[str] = None,
                                          name: Optional[str] = None,
                                          namespace: Optional[str] = None,
                                          partition: Optional[str] = None,
                                          partition_consumers: Optional[Sequence[str]] = None,
                                          peer_consumers: Optional[Sequence[str]] = None,
                                          sameness_group_consumers: Optional[Sequence[str]] = None,
                                          services: Optional[Sequence[str]] = None,
                                          opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetConfigEntryV2ExportedServicesResult:
    """
    Use this data source to access information about an existing resource.

    :param str kind: The kind of exported services config (ExportedServices, NamespaceExportedServices, PartitionExportedServices).
    :param str name: The name of the config entry to read.
    :param str namespace: The namespace the config entry is associated with.
    :param str partition: The partition the config entry is associated with.
    :param Sequence[str] partition_consumers: The exported service partition consumers.
    :param Sequence[str] peer_consumers: The exported service peer consumers.
    :param Sequence[str] sameness_group_consumers: The exported service sameness group consumers.
    :param Sequence[str] services: The exported services.
    """
    __args__ = dict()
    __args__['kind'] = kind
    __args__['name'] = name
    __args__['namespace'] = namespace
    __args__['partition'] = partition
    __args__['partitionConsumers'] = partition_consumers
    __args__['peerConsumers'] = peer_consumers
    __args__['samenessGroupConsumers'] = sameness_group_consumers
    __args__['services'] = services
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('consul:index/getConfigEntryV2ExportedServices:getConfigEntryV2ExportedServices', __args__, opts=opts, typ=GetConfigEntryV2ExportedServicesResult).value

    return AwaitableGetConfigEntryV2ExportedServicesResult(
        id=pulumi.get(__ret__, 'id'),
        kind=pulumi.get(__ret__, 'kind'),
        name=pulumi.get(__ret__, 'name'),
        namespace=pulumi.get(__ret__, 'namespace'),
        partition=pulumi.get(__ret__, 'partition'),
        partition_consumers=pulumi.get(__ret__, 'partition_consumers'),
        peer_consumers=pulumi.get(__ret__, 'peer_consumers'),
        sameness_group_consumers=pulumi.get(__ret__, 'sameness_group_consumers'),
        services=pulumi.get(__ret__, 'services'))
def get_config_entry_v2_exported_services_output(kind: Optional[pulumi.Input[str]] = None,
                                                 name: Optional[pulumi.Input[str]] = None,
                                                 namespace: Optional[pulumi.Input[Optional[str]]] = None,
                                                 partition: Optional[pulumi.Input[Optional[str]]] = None,
                                                 partition_consumers: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                                                 peer_consumers: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                                                 sameness_group_consumers: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                                                 services: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
                                                 opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetConfigEntryV2ExportedServicesResult]:
    """
    Use this data source to access information about an existing resource.

    :param str kind: The kind of exported services config (ExportedServices, NamespaceExportedServices, PartitionExportedServices).
    :param str name: The name of the config entry to read.
    :param str namespace: The namespace the config entry is associated with.
    :param str partition: The partition the config entry is associated with.
    :param Sequence[str] partition_consumers: The exported service partition consumers.
    :param Sequence[str] peer_consumers: The exported service peer consumers.
    :param Sequence[str] sameness_group_consumers: The exported service sameness group consumers.
    :param Sequence[str] services: The exported services.
    """
    __args__ = dict()
    __args__['kind'] = kind
    __args__['name'] = name
    __args__['namespace'] = namespace
    __args__['partition'] = partition
    __args__['partitionConsumers'] = partition_consumers
    __args__['peerConsumers'] = peer_consumers
    __args__['samenessGroupConsumers'] = sameness_group_consumers
    __args__['services'] = services
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('consul:index/getConfigEntryV2ExportedServices:getConfigEntryV2ExportedServices', __args__, opts=opts, typ=GetConfigEntryV2ExportedServicesResult)
    return __ret__.apply(lambda __response__: GetConfigEntryV2ExportedServicesResult(
        id=pulumi.get(__response__, 'id'),
        kind=pulumi.get(__response__, 'kind'),
        name=pulumi.get(__response__, 'name'),
        namespace=pulumi.get(__response__, 'namespace'),
        partition=pulumi.get(__response__, 'partition'),
        partition_consumers=pulumi.get(__response__, 'partition_consumers'),
        peer_consumers=pulumi.get(__response__, 'peer_consumers'),
        sameness_group_consumers=pulumi.get(__response__, 'sameness_group_consumers'),
        services=pulumi.get(__response__, 'services')))
