azure-native.eventhub.ConsumerGroup
Explore with Pulumi AI
Single item in List or Get Consumer group operation Azure REST API version: 2022-10-01-preview. Prior API version in Azure Native 1.x: 2017-04-01.
Other available API versions: 2023-01-01-preview, 2024-01-01, 2024-05-01-preview.
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",
    });
});
package main
import (
	eventhub "github.com/pulumi/pulumi-azure-native-sdk/eventhub/v2"
	"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
	})
}
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());
    }
}
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",
});
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")
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
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 string
- The unique name of the resource.
- args ConsumerGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args ConsumerGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConsumerGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var consumerGroupResource = new ConsumerGroup("consumerGroupResource", ConsumerGroupArgs.builder()
    .eventHubName("string")
    .namespaceName("string")
    .resourceGroupName("string")
    .consumerGroupName("string")
    .userMetadata("string")
    .build());
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")
const consumerGroupResource = new azure_native.eventhub.ConsumerGroup("consumerGroupResource", {
    eventHubName: "string",
    namespaceName: "string",
    resourceGroupName: "string",
    consumerGroupName: "string",
    userMetadata: "string",
});
type: azure-native:eventhub:ConsumerGroup
properties:
    consumerGroupName: string
    eventHubName: string
    namespaceName: string
    resourceGroupName: string
    userMetadata: string
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:
- EventHub stringName 
- The Event Hub name
- NamespaceName string
- The Namespace name
- ResourceGroup stringName 
- Name of the resource group within the azure subscription.
- ConsumerGroup stringName 
- 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.
- EventHub stringName 
- The Event Hub name
- NamespaceName string
- The Namespace name
- ResourceGroup stringName 
- Name of the resource group within the azure subscription.
- ConsumerGroup stringName 
- 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.
- eventHub StringName 
- The Event Hub name
- namespaceName String
- The Namespace name
- resourceGroup StringName 
- Name of the resource group within the azure subscription.
- consumerGroup StringName 
- 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.
- eventHub stringName 
- The Event Hub name
- namespaceName string
- The Namespace name
- resourceGroup stringName 
- Name of the resource group within the azure subscription.
- consumerGroup stringName 
- 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_ strname 
- The Event Hub name
- namespace_name str
- The Namespace name
- resource_group_ strname 
- Name of the resource group within the azure subscription.
- consumer_group_ strname 
- 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.
- eventHub StringName 
- The Event Hub name
- namespaceName String
- The Namespace name
- resourceGroup StringName 
- Name of the resource group within the azure subscription.
- consumerGroup StringName 
- 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:
- 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.Azure Native. Event Hub. Outputs. System Data Response 
- 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.
- 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 SystemData Response 
- 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.
- 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 SystemData Response 
- 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.
- 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 SystemData Response 
- 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.
- 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 SystemData Response 
- 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.
- 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.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The type of identity that last modified the resource.
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- 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.
- CreatedBy stringType 
- The type of identity that created the resource.
- LastModified stringAt 
- The type of identity that last modified the resource.
- LastModified stringBy 
- The identity that last modified the resource.
- LastModified stringBy Type 
- 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.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The type of identity that last modified the resource.
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- 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.
- createdBy stringType 
- The type of identity that created the resource.
- lastModified stringAt 
- The type of identity that last modified the resource.
- lastModified stringBy 
- The identity that last modified the resource.
- lastModified stringBy Type 
- 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_ strtype 
- The type of identity that created the resource.
- last_modified_ strat 
- The type of identity that last modified the resource.
- last_modified_ strby 
- The identity that last modified the resource.
- last_modified_ strby_ type 
- 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.
- createdBy StringType 
- The type of identity that created the resource.
- lastModified StringAt 
- The type of identity that last modified the resource.
- lastModified StringBy 
- The identity that last modified the resource.
- lastModified StringBy Type 
- 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} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0