Class ConsumerGroup
Manages a Event Hubs Consumer Group as a nested resource within an Event Hub.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West US",
});
var exampleEventHubNamespace = new Azure.EventHub.EventHubNamespace("exampleEventHubNamespace", new Azure.EventHub.EventHubNamespaceArgs
{
Location = "West US",
ResourceGroupName = exampleResourceGroup.Name,
Sku = "Basic",
Capacity = 2,
Tags =
{
{ "environment", "Production" },
},
});
var exampleEventHub = new Azure.EventHub.EventHub("exampleEventHub", new Azure.EventHub.EventHubArgs
{
NamespaceName = exampleEventHubNamespace.Name,
ResourceGroupName = exampleResourceGroup.Name,
PartitionCount = 2,
MessageRetention = 2,
});
var exampleConsumerGroup = new Azure.EventHub.ConsumerGroup("exampleConsumerGroup", new Azure.EventHub.ConsumerGroupArgs
{
NamespaceName = exampleEventHubNamespace.Name,
EventhubName = exampleEventHub.Name,
ResourceGroupName = exampleResourceGroup.Name,
UserMetadata = "some-meta-data",
});
}
}
Inherited Members
Namespace: Pulumi.Azure.EventHub
Assembly: Pulumi.Azure.dll
Syntax
public class ConsumerGroup : CustomResource
Constructors
View SourceConsumerGroup(String, ConsumerGroupArgs, CustomResourceOptions)
Create a ConsumerGroup resource with the given unique name, arguments, and options.
Declaration
public ConsumerGroup(string name, ConsumerGroupArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ConsumerGroupArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceEventhubName
Specifies the name of the EventHub. Changing this forces a new resource to be created.
Declaration
public Output<string> EventhubName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NamespaceName
Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
Declaration
public Output<string> NamespaceName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupName
The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
UserMetadata
Specifies the user metadata.
Declaration
public Output<string> UserMetadata { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ConsumerGroupState, CustomResourceOptions)
Get an existing ConsumerGroup resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ConsumerGroup Get(string name, Input<string> id, ConsumerGroupState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ConsumerGroupState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ConsumerGroup |