1. Packages
  2. Azure Classic
  3. API Docs
  4. eventhub
  5. getConsumeGroup

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.eventhub.getConsumeGroup

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

Use this data source to access information about an existing Event Hubs Consumer Group within an Event Hub.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const test = azure.eventhub.getConsumeGroup({
    name: testAzurermEventhubConsumerGroup.name,
    namespaceName: testAzurermEventhubNamespace.name,
    eventhubName: testAzurermEventhub.name,
    resourceGroupName: testAzurermResourceGroup.name,
});
Copy
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"])
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := eventhub.GetConsumeGroup(ctx, &eventhub.GetConsumeGroupArgs{
			Name:              testAzurermEventhubConsumerGroup.Name,
			NamespaceName:     testAzurermEventhubNamespace.Name,
			EventhubName:      testAzurermEventhub.Name,
			ResourceGroupName: testAzurermResourceGroup.Name,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var test = Azure.EventHub.GetConsumeGroup.Invoke(new()
    {
        Name = testAzurermEventhubConsumerGroup.Name,
        NamespaceName = testAzurermEventhubNamespace.Name,
        EventhubName = testAzurermEventhub.Name,
        ResourceGroupName = testAzurermResourceGroup.Name,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.eventhub.EventhubFunctions;
import com.pulumi.azure.eventhub.inputs.GetConsumeGroupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var test = EventhubFunctions.getConsumeGroup(GetConsumeGroupArgs.builder()
            .name(testAzurermEventhubConsumerGroup.name())
            .namespaceName(testAzurermEventhubNamespace.name())
            .eventhubName(testAzurermEventhub.name())
            .resourceGroupName(testAzurermResourceGroup.name())
            .build());

    }
}
Copy
variables:
  test:
    fn::invoke:
      function: azure:eventhub:getConsumeGroup
      arguments:
        name: ${testAzurermEventhubConsumerGroup.name}
        namespaceName: ${testAzurermEventhubNamespace.name}
        eventhubName: ${testAzurermEventhub.name}
        resourceGroupName: ${testAzurermResourceGroup.name}
Copy

Using getConsumeGroup

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getConsumeGroup(args: GetConsumeGroupArgs, opts?: InvokeOptions): Promise<GetConsumeGroupResult>
function getConsumeGroupOutput(args: GetConsumeGroupOutputArgs, opts?: InvokeOptions): Output<GetConsumeGroupResult>
Copy
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[InvokeOptions] = None) -> GetConsumeGroupResult
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[InvokeOptions] = None) -> Output[GetConsumeGroupResult]
Copy
func GetConsumeGroup(ctx *Context, args *GetConsumeGroupArgs, opts ...InvokeOption) (*GetConsumeGroupResult, error)
func GetConsumeGroupOutput(ctx *Context, args *GetConsumeGroupOutputArgs, opts ...InvokeOption) GetConsumeGroupResultOutput
Copy

> Note: This function is named GetConsumeGroup in the Go SDK.

public static class GetConsumeGroup 
{
    public static Task<GetConsumeGroupResult> InvokeAsync(GetConsumeGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetConsumeGroupResult> Invoke(GetConsumeGroupInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetConsumeGroupResult> getConsumeGroup(GetConsumeGroupArgs args, InvokeOptions options)
public static Output<GetConsumeGroupResult> getConsumeGroup(GetConsumeGroupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:eventhub/getConsumeGroup:getConsumeGroup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EventhubName This property is required. string
Specifies the name of the EventHub.
Name This property is required. string
Specifies the name of the EventHub Consumer Group resource.
NamespaceName This property is required. string
Specifies the name of the grandparent EventHub Namespace.
ResourceGroupName This property is required. string
The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.
EventhubName This property is required. string
Specifies the name of the EventHub.
Name This property is required. string
Specifies the name of the EventHub Consumer Group resource.
NamespaceName This property is required. string
Specifies the name of the grandparent EventHub Namespace.
ResourceGroupName This property is required. string
The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.
eventhubName This property is required. String
Specifies the name of the EventHub.
name This property is required. String
Specifies the name of the EventHub Consumer Group resource.
namespaceName This property is required. String
Specifies the name of the grandparent EventHub Namespace.
resourceGroupName This property is required. String
The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.
eventhubName This property is required. string
Specifies the name of the EventHub.
name This property is required. string
Specifies the name of the EventHub Consumer Group resource.
namespaceName This property is required. string
Specifies the name of the grandparent EventHub Namespace.
resourceGroupName This property is required. string
The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.
eventhub_name This property is required. str
Specifies the name of the EventHub.
name This property is required. str
Specifies the name of the EventHub Consumer Group resource.
namespace_name This property is required. str
Specifies the name of the grandparent EventHub Namespace.
resource_group_name This property is required. str
The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.
eventhubName This property is required. String
Specifies the name of the EventHub.
name This property is required. String
Specifies the name of the EventHub Consumer Group resource.
namespaceName This property is required. String
Specifies the name of the grandparent EventHub Namespace.
resourceGroupName This property is required. String
The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.

getConsumeGroup Result

The following output properties are available:

EventhubName string
Id string
The provider-assigned unique ID for this managed resource.
Name string
NamespaceName string
ResourceGroupName string
UserMetadata string
Specifies the user metadata.
EventhubName string
Id string
The provider-assigned unique ID for this managed resource.
Name string
NamespaceName string
ResourceGroupName string
UserMetadata string
Specifies the user metadata.
eventhubName String
id String
The provider-assigned unique ID for this managed resource.
name String
namespaceName String
resourceGroupName String
userMetadata String
Specifies the user metadata.
eventhubName string
id string
The provider-assigned unique ID for this managed resource.
name string
namespaceName string
resourceGroupName string
userMetadata string
Specifies the user metadata.
eventhub_name str
id str
The provider-assigned unique ID for this managed resource.
name str
namespace_name str
resource_group_name str
user_metadata str
Specifies the user metadata.
eventhubName String
id String
The provider-assigned unique ID for this managed resource.
name String
namespaceName String
resourceGroupName String
userMetadata String
Specifies the user metadata.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi