1. Packages
  2. Azure Native
  3. API Docs
  4. eventhub
  5. ConsumerGroup
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.eventhub.ConsumerGroup

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

Single item in List or Get Consumer group operation

Uses Azure REST API version 2024-01-01. In version 2.x of the Azure Native provider, it used API version 2022-10-01-preview.

Other available API versions: 2018-01-01-preview, 2021-01-01-preview, 2021-06-01-preview, 2021-11-01, 2022-01-01-preview, 2022-10-01-preview, 2023-01-01-preview, 2024-05-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native eventhub [ApiVersion]. See the version guide for details.

Example Usage

ConsumerGroupCreate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var consumerGroup = new AzureNative.EventHub.ConsumerGroup("consumerGroup", new()
    {
        ConsumerGroupName = "sdk-ConsumerGroup-5563",
        EventHubName = "sdk-EventHub-6681",
        NamespaceName = "sdk-Namespace-2661",
        ResourceGroupName = "ArunMonocle",
        UserMetadata = "New consumergroup",
    });

});
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := eventhub.NewConsumerGroup(ctx, "consumerGroup", &eventhub.ConsumerGroupArgs{
			ConsumerGroupName: pulumi.String("sdk-ConsumerGroup-5563"),
			EventHubName:      pulumi.String("sdk-EventHub-6681"),
			NamespaceName:     pulumi.String("sdk-Namespace-2661"),
			ResourceGroupName: pulumi.String("ArunMonocle"),
			UserMetadata:      pulumi.String("New consumergroup"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.eventhub.ConsumerGroup;
import com.pulumi.azurenative.eventhub.ConsumerGroupArgs;
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) {
        var consumerGroup = new ConsumerGroup("consumerGroup", ConsumerGroupArgs.builder()
            .consumerGroupName("sdk-ConsumerGroup-5563")
            .eventHubName("sdk-EventHub-6681")
            .namespaceName("sdk-Namespace-2661")
            .resourceGroupName("ArunMonocle")
            .userMetadata("New consumergroup")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const consumerGroup = new azure_native.eventhub.ConsumerGroup("consumerGroup", {
    consumerGroupName: "sdk-ConsumerGroup-5563",
    eventHubName: "sdk-EventHub-6681",
    namespaceName: "sdk-Namespace-2661",
    resourceGroupName: "ArunMonocle",
    userMetadata: "New consumergroup",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

consumer_group = azure_native.eventhub.ConsumerGroup("consumerGroup",
    consumer_group_name="sdk-ConsumerGroup-5563",
    event_hub_name="sdk-EventHub-6681",
    namespace_name="sdk-Namespace-2661",
    resource_group_name="ArunMonocle",
    user_metadata="New consumergroup")
Copy
resources:
  consumerGroup:
    type: azure-native:eventhub:ConsumerGroup
    properties:
      consumerGroupName: sdk-ConsumerGroup-5563
      eventHubName: sdk-EventHub-6681
      namespaceName: sdk-Namespace-2661
      resourceGroupName: ArunMonocle
      userMetadata: New consumergroup
Copy

Create ConsumerGroup Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ConsumerGroup(name: string, args: ConsumerGroupArgs, opts?: CustomResourceOptions);
@overload
def ConsumerGroup(resource_name: str,
                  args: ConsumerGroupArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def ConsumerGroup(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  event_hub_name: Optional[str] = None,
                  namespace_name: Optional[str] = None,
                  resource_group_name: Optional[str] = None,
                  consumer_group_name: Optional[str] = None,
                  user_metadata: Optional[str] = None)
func NewConsumerGroup(ctx *Context, name string, args ConsumerGroupArgs, opts ...ResourceOption) (*ConsumerGroup, error)
public ConsumerGroup(string name, ConsumerGroupArgs args, CustomResourceOptions? opts = null)
public ConsumerGroup(String name, ConsumerGroupArgs args)
public ConsumerGroup(String name, ConsumerGroupArgs args, CustomResourceOptions options)
type: azure-native:eventhub:ConsumerGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ConsumerGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ConsumerGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ConsumerGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ConsumerGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ConsumerGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var consumerGroupResource = new AzureNative.EventHub.ConsumerGroup("consumerGroupResource", new()
{
    EventHubName = "string",
    NamespaceName = "string",
    ResourceGroupName = "string",
    ConsumerGroupName = "string",
    UserMetadata = "string",
});
Copy
example, err := eventhub.NewConsumerGroup(ctx, "consumerGroupResource", &eventhub.ConsumerGroupArgs{
	EventHubName:      pulumi.String("string"),
	NamespaceName:     pulumi.String("string"),
	ResourceGroupName: pulumi.String("string"),
	ConsumerGroupName: pulumi.String("string"),
	UserMetadata:      pulumi.String("string"),
})
Copy
var consumerGroupResource = new ConsumerGroup("consumerGroupResource", ConsumerGroupArgs.builder()
    .eventHubName("string")
    .namespaceName("string")
    .resourceGroupName("string")
    .consumerGroupName("string")
    .userMetadata("string")
    .build());
Copy
consumer_group_resource = azure_native.eventhub.ConsumerGroup("consumerGroupResource",
    event_hub_name="string",
    namespace_name="string",
    resource_group_name="string",
    consumer_group_name="string",
    user_metadata="string")
Copy
const consumerGroupResource = new azure_native.eventhub.ConsumerGroup("consumerGroupResource", {
    eventHubName: "string",
    namespaceName: "string",
    resourceGroupName: "string",
    consumerGroupName: "string",
    userMetadata: "string",
});
Copy
type: azure-native:eventhub:ConsumerGroup
properties:
    consumerGroupName: string
    eventHubName: string
    namespaceName: string
    resourceGroupName: string
    userMetadata: string
Copy

ConsumerGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ConsumerGroup resource accepts the following input properties:

EventHubName
This property is required.
Changes to this property will trigger replacement.
string
The Event Hub name
NamespaceName
This property is required.
Changes to this property will trigger replacement.
string
The Namespace name
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the resource group within the azure subscription.
ConsumerGroupName Changes to this property will trigger replacement. string
The consumer group name
UserMetadata string
User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
EventHubName
This property is required.
Changes to this property will trigger replacement.
string
The Event Hub name
NamespaceName
This property is required.
Changes to this property will trigger replacement.
string
The Namespace name
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the resource group within the azure subscription.
ConsumerGroupName Changes to this property will trigger replacement. string
The consumer group name
UserMetadata string
User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
eventHubName
This property is required.
Changes to this property will trigger replacement.
String
The Event Hub name
namespaceName
This property is required.
Changes to this property will trigger replacement.
String
The Namespace name
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of the resource group within the azure subscription.
consumerGroupName Changes to this property will trigger replacement. String
The consumer group name
userMetadata String
User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
eventHubName
This property is required.
Changes to this property will trigger replacement.
string
The Event Hub name
namespaceName
This property is required.
Changes to this property will trigger replacement.
string
The Namespace name
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Name of the resource group within the azure subscription.
consumerGroupName Changes to this property will trigger replacement. string
The consumer group name
userMetadata string
User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
event_hub_name
This property is required.
Changes to this property will trigger replacement.
str
The Event Hub name
namespace_name
This property is required.
Changes to this property will trigger replacement.
str
The Namespace name
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
Name of the resource group within the azure subscription.
consumer_group_name Changes to this property will trigger replacement. str
The consumer group name
user_metadata str
User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
eventHubName
This property is required.
Changes to this property will trigger replacement.
String
The Event Hub name
namespaceName
This property is required.
Changes to this property will trigger replacement.
String
The Namespace name
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Name of the resource group within the azure subscription.
consumerGroupName Changes to this property will trigger replacement. String
The consumer group name
userMetadata String
User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.

Outputs

All input properties are implicitly available as output properties. Additionally, the ConsumerGroup resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
CreatedAt string
Exact time the message was created.
Id string
The provider-assigned unique ID for this managed resource.
Location string
The geo-location where the resource lives
Name string
The name of the resource
SystemData Pulumi.AzureNative.EventHub.Outputs.SystemDataResponse
The system meta data relating to this resource.
Type string
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
UpdatedAt string
The exact time the message was updated.
AzureApiVersion string
The Azure API version of the resource.
CreatedAt string
Exact time the message was created.
Id string
The provider-assigned unique ID for this managed resource.
Location string
The geo-location where the resource lives
Name string
The name of the resource
SystemData SystemDataResponse
The system meta data relating to this resource.
Type string
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
UpdatedAt string
The exact time the message was updated.
azureApiVersion String
The Azure API version of the resource.
createdAt String
Exact time the message was created.
id String
The provider-assigned unique ID for this managed resource.
location String
The geo-location where the resource lives
name String
The name of the resource
systemData SystemDataResponse
The system meta data relating to this resource.
type String
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
updatedAt String
The exact time the message was updated.
azureApiVersion string
The Azure API version of the resource.
createdAt string
Exact time the message was created.
id string
The provider-assigned unique ID for this managed resource.
location string
The geo-location where the resource lives
name string
The name of the resource
systemData SystemDataResponse
The system meta data relating to this resource.
type string
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
updatedAt string
The exact time the message was updated.
azure_api_version str
The Azure API version of the resource.
created_at str
Exact time the message was created.
id str
The provider-assigned unique ID for this managed resource.
location str
The geo-location where the resource lives
name str
The name of the resource
system_data SystemDataResponse
The system meta data relating to this resource.
type str
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
updated_at str
The exact time the message was updated.
azureApiVersion String
The Azure API version of the resource.
createdAt String
Exact time the message was created.
id String
The provider-assigned unique ID for this managed resource.
location String
The geo-location where the resource lives
name String
The name of the resource
systemData Property Map
The system meta data relating to this resource.
type String
The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
updatedAt String
The exact time the message was updated.

Supporting Types

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The type of identity that last modified the resource.
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The type of identity that last modified the resource.
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The type of identity that last modified the resource.
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The type of identity that last modified the resource.
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The type of identity that last modified the resource.
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The type of identity that last modified the resource.
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:eventhub:ConsumerGroup sdk-ConsumerGroup-5563 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi