azure logo
Azure Classic v5.43.0, May 6 23

azure.eventhub.getConsumeGroup

Explore with Pulumi AI

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

Example Usage

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 = azurerm_eventhub_consumer_group.Test.Name,
        NamespaceName = azurerm_eventhub_namespace.Test.Name,
        EventhubName = azurerm_eventhub.Test.Name,
        ResourceGroupName = azurerm_resource_group.Test.Name,
    });

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/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:              azurerm_eventhub_consumer_group.Test.Name,
			NamespaceName:     azurerm_eventhub_namespace.Test.Name,
			EventhubName:      azurerm_eventhub.Test.Name,
			ResourceGroupName: azurerm_resource_group.Test.Name,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(azurerm_eventhub_consumer_group.test().name())
            .namespaceName(azurerm_eventhub_namespace.test().name())
            .eventhubName(azurerm_eventhub.test().name())
            .resourceGroupName(azurerm_resource_group.test().name())
            .build());

    }
}
import pulumi
import pulumi_azure as azure

test = azure.eventhub.get_consume_group(name=azurerm_eventhub_consumer_group["test"]["name"],
    namespace_name=azurerm_eventhub_namespace["test"]["name"],
    eventhub_name=azurerm_eventhub["test"]["name"],
    resource_group_name=azurerm_resource_group["test"]["name"])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const test = azure.eventhub.getConsumeGroup({
    name: azurerm_eventhub_consumer_group.test.name,
    namespaceName: azurerm_eventhub_namespace.test.name,
    eventhubName: azurerm_eventhub.test.name,
    resourceGroupName: azurerm_resource_group.test.name,
});
variables:
  test:
    fn::invoke:
      Function: azure:eventhub:getConsumeGroup
      Arguments:
        name: ${azurerm_eventhub_consumer_group.test.name}
        namespaceName: ${azurerm_eventhub_namespace.test.name}
        eventhubName: ${azurerm_eventhub.test.name}
        resourceGroupName: ${azurerm_resource_group.test.name}

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>
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]
func GetConsumeGroup(ctx *Context, args *GetConsumeGroupArgs, opts ...InvokeOption) (*GetConsumeGroupResult, error)
func GetConsumeGroupOutput(ctx *Context, args *GetConsumeGroupOutputArgs, opts ...InvokeOption) GetConsumeGroupResultOutput

> 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)
}
public static CompletableFuture<GetConsumeGroupResult> getConsumeGroup(GetConsumeGroupArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azure:eventhub/getConsumeGroup:getConsumeGroup
  arguments:
    # arguments dictionary

The following arguments are supported:

EventhubName string

Specifies the name of the EventHub.

Name string

Specifies the name of the EventHub Consumer Group resource.

NamespaceName string

Specifies the name of the grandparent EventHub Namespace.

ResourceGroupName string

The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.

EventhubName string

Specifies the name of the EventHub.

Name string

Specifies the name of the EventHub Consumer Group resource.

NamespaceName string

Specifies the name of the grandparent EventHub Namespace.

ResourceGroupName string

The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.

eventhubName String

Specifies the name of the EventHub.

name String

Specifies the name of the EventHub Consumer Group resource.

namespaceName String

Specifies the name of the grandparent EventHub Namespace.

resourceGroupName String

The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.

eventhubName string

Specifies the name of the EventHub.

name string

Specifies the name of the EventHub Consumer Group resource.

namespaceName string

Specifies the name of the grandparent EventHub Namespace.

resourceGroupName string

The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.

eventhub_name str

Specifies the name of the EventHub.

name str

Specifies the name of the EventHub Consumer Group resource.

namespace_name str

Specifies the name of the grandparent EventHub Namespace.

resource_group_name str

The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.

eventhubName String

Specifies the name of the EventHub.

name String

Specifies the name of the EventHub Consumer Group resource.

namespaceName String

Specifies the name of the grandparent EventHub Namespace.

resourceGroupName 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.