# 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__ = [
    'GetConsumeGroupResult',
    'AwaitableGetConsumeGroupResult',
    'get_consume_group',
    'get_consume_group_output',
]

@pulumi.output_type
class GetConsumeGroupResult:
    """
    A collection of values returned by getConsumeGroup.
    """
    def __init__(__self__, eventhub_name=None, id=None, name=None, namespace_name=None, resource_group_name=None, user_metadata=None):
        if eventhub_name and not isinstance(eventhub_name, str):
            raise TypeError("Expected argument 'eventhub_name' to be a str")
        pulumi.set(__self__, "eventhub_name", eventhub_name)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if namespace_name and not isinstance(namespace_name, str):
            raise TypeError("Expected argument 'namespace_name' to be a str")
        pulumi.set(__self__, "namespace_name", namespace_name)
        if resource_group_name and not isinstance(resource_group_name, str):
            raise TypeError("Expected argument 'resource_group_name' to be a str")
        pulumi.set(__self__, "resource_group_name", resource_group_name)
        if user_metadata and not isinstance(user_metadata, str):
            raise TypeError("Expected argument 'user_metadata' to be a str")
        pulumi.set(__self__, "user_metadata", user_metadata)

    @property
    @pulumi.getter(name="eventhubName")
    def eventhub_name(self) -> str:
        return pulumi.get(self, "eventhub_name")

    @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 name(self) -> str:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="namespaceName")
    def namespace_name(self) -> str:
        return pulumi.get(self, "namespace_name")

    @property
    @pulumi.getter(name="resourceGroupName")
    def resource_group_name(self) -> str:
        return pulumi.get(self, "resource_group_name")

    @property
    @pulumi.getter(name="userMetadata")
    def user_metadata(self) -> str:
        """
        Specifies the user metadata.
        """
        return pulumi.get(self, "user_metadata")


class AwaitableGetConsumeGroupResult(GetConsumeGroupResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetConsumeGroupResult(
            eventhub_name=self.eventhub_name,
            id=self.id,
            name=self.name,
            namespace_name=self.namespace_name,
            resource_group_name=self.resource_group_name,
            user_metadata=self.user_metadata)


def get_consume_group(eventhub_name: Optional[str] = None,
                      name: Optional[str] = None,
                      namespace_name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetConsumeGroupResult:
    """
    Use this data source to access information about an existing Event Hubs Consumer Group within an Event Hub.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_azure as azure

    test = azure.eventhub.get_consume_group(name=test_azurerm_eventhub_consumer_group["name"],
        namespace_name=test_azurerm_eventhub_namespace["name"],
        eventhub_name=test_azurerm_eventhub["name"],
        resource_group_name=test_azurerm_resource_group["name"])
    ```


    :param str eventhub_name: Specifies the name of the EventHub.
    :param str name: Specifies the name of the EventHub Consumer Group resource.
    :param str namespace_name: Specifies the name of the grandparent EventHub Namespace.
    :param str resource_group_name: The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.
    """
    __args__ = dict()
    __args__['eventhubName'] = eventhub_name
    __args__['name'] = name
    __args__['namespaceName'] = namespace_name
    __args__['resourceGroupName'] = resource_group_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure:eventhub/getConsumeGroup:getConsumeGroup', __args__, opts=opts, typ=GetConsumeGroupResult).value

    return AwaitableGetConsumeGroupResult(
        eventhub_name=pulumi.get(__ret__, 'eventhub_name'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        namespace_name=pulumi.get(__ret__, 'namespace_name'),
        resource_group_name=pulumi.get(__ret__, 'resource_group_name'),
        user_metadata=pulumi.get(__ret__, 'user_metadata'))
def get_consume_group_output(eventhub_name: Optional[pulumi.Input[str]] = None,
                             name: Optional[pulumi.Input[str]] = None,
                             namespace_name: Optional[pulumi.Input[str]] = None,
                             resource_group_name: Optional[pulumi.Input[str]] = None,
                             opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetConsumeGroupResult]:
    """
    Use this data source to access information about an existing Event Hubs Consumer Group within an Event Hub.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_azure as azure

    test = azure.eventhub.get_consume_group(name=test_azurerm_eventhub_consumer_group["name"],
        namespace_name=test_azurerm_eventhub_namespace["name"],
        eventhub_name=test_azurerm_eventhub["name"],
        resource_group_name=test_azurerm_resource_group["name"])
    ```


    :param str eventhub_name: Specifies the name of the EventHub.
    :param str name: Specifies the name of the EventHub Consumer Group resource.
    :param str namespace_name: Specifies the name of the grandparent EventHub Namespace.
    :param str resource_group_name: The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.
    """
    __args__ = dict()
    __args__['eventhubName'] = eventhub_name
    __args__['name'] = name
    __args__['namespaceName'] = namespace_name
    __args__['resourceGroupName'] = resource_group_name
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('azure:eventhub/getConsumeGroup:getConsumeGroup', __args__, opts=opts, typ=GetConsumeGroupResult)
    return __ret__.apply(lambda __response__: GetConsumeGroupResult(
        eventhub_name=pulumi.get(__response__, 'eventhub_name'),
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name'),
        namespace_name=pulumi.get(__response__, 'namespace_name'),
        resource_group_name=pulumi.get(__response__, 'resource_group_name'),
        user_metadata=pulumi.get(__response__, 'user_metadata')))
