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

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.eventhub.getConsumeGroup

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 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,
    });
    
    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"])
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: azure:eventhub:getConsumeGroup
          Arguments:
            name: ${testAzurermEventhubConsumerGroup.name}
            namespaceName: ${testAzurermEventhubNamespace.name}
            eventhubName: ${testAzurermEventhub.name}
            resourceGroupName: ${testAzurermResourceGroup.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.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi