1. Packages
  2. Azure Native v2
  3. API Docs
  4. devices
  5. IotHubResourceEventHubConsumerGroup
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.devices.IotHubResourceEventHubConsumerGroup

Explore with Pulumi AI

The properties of the EventHubConsumerGroupInfo object. Azure REST API version: 2022-04-30-preview. Prior API version in Azure Native 1.x: 2020-08-31.

Other available API versions: 2021-03-03-preview, 2022-11-15-preview, 2023-06-30, 2023-06-30-preview.

Example Usage

IotHubResource_CreateEventHubConsumerGroup

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

return await Deployment.RunAsync(() => 
{
    var iotHubResourceEventHubConsumerGroup = new AzureNative.Devices.IotHubResourceEventHubConsumerGroup("iotHubResourceEventHubConsumerGroup", new()
    {
        EventHubEndpointName = "events",
        Name = "test",
        Properties = new AzureNative.Devices.Inputs.EventHubConsumerGroupNameArgs
        {
            Name = "test",
        },
        ResourceGroupName = "myResourceGroup",
        ResourceName = "testHub",
    });

});
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := devices.NewIotHubResourceEventHubConsumerGroup(ctx, "iotHubResourceEventHubConsumerGroup", &devices.IotHubResourceEventHubConsumerGroupArgs{
			EventHubEndpointName: pulumi.String("events"),
			Name:                 pulumi.String("test"),
			Properties: &devices.EventHubConsumerGroupNameArgs{
				Name: pulumi.String("test"),
			},
			ResourceGroupName: pulumi.String("myResourceGroup"),
			ResourceName:      pulumi.String("testHub"),
		})
		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.devices.IotHubResourceEventHubConsumerGroup;
import com.pulumi.azurenative.devices.IotHubResourceEventHubConsumerGroupArgs;
import com.pulumi.azurenative.devices.inputs.EventHubConsumerGroupNameArgs;
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 iotHubResourceEventHubConsumerGroup = new IotHubResourceEventHubConsumerGroup("iotHubResourceEventHubConsumerGroup", IotHubResourceEventHubConsumerGroupArgs.builder()
            .eventHubEndpointName("events")
            .name("test")
            .properties(EventHubConsumerGroupNameArgs.builder()
                .name("test")
                .build())
            .resourceGroupName("myResourceGroup")
            .resourceName("testHub")
            .build());

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

const iotHubResourceEventHubConsumerGroup = new azure_native.devices.IotHubResourceEventHubConsumerGroup("iotHubResourceEventHubConsumerGroup", {
    eventHubEndpointName: "events",
    name: "test",
    properties: {
        name: "test",
    },
    resourceGroupName: "myResourceGroup",
    resourceName: "testHub",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

iot_hub_resource_event_hub_consumer_group = azure_native.devices.IotHubResourceEventHubConsumerGroup("iotHubResourceEventHubConsumerGroup",
    event_hub_endpoint_name="events",
    name="test",
    properties={
        "name": "test",
    },
    resource_group_name="myResourceGroup",
    resource_name_="testHub")
Copy
resources:
  iotHubResourceEventHubConsumerGroup:
    type: azure-native:devices:IotHubResourceEventHubConsumerGroup
    properties:
      eventHubEndpointName: events
      name: test
      properties:
        name: test
      resourceGroupName: myResourceGroup
      resourceName: testHub
Copy

Create IotHubResourceEventHubConsumerGroup Resource

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

Constructor syntax

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

@overload
def IotHubResourceEventHubConsumerGroup(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        event_hub_endpoint_name: Optional[str] = None,
                                        properties: Optional[EventHubConsumerGroupNameArgs] = None,
                                        resource_group_name: Optional[str] = None,
                                        resource_name_: Optional[str] = None,
                                        name: Optional[str] = None)
func NewIotHubResourceEventHubConsumerGroup(ctx *Context, name string, args IotHubResourceEventHubConsumerGroupArgs, opts ...ResourceOption) (*IotHubResourceEventHubConsumerGroup, error)
public IotHubResourceEventHubConsumerGroup(string name, IotHubResourceEventHubConsumerGroupArgs args, CustomResourceOptions? opts = null)
public IotHubResourceEventHubConsumerGroup(String name, IotHubResourceEventHubConsumerGroupArgs args)
public IotHubResourceEventHubConsumerGroup(String name, IotHubResourceEventHubConsumerGroupArgs args, CustomResourceOptions options)
type: azure-native:devices:IotHubResourceEventHubConsumerGroup
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. IotHubResourceEventHubConsumerGroupArgs
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. IotHubResourceEventHubConsumerGroupArgs
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. IotHubResourceEventHubConsumerGroupArgs
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. IotHubResourceEventHubConsumerGroupArgs
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. IotHubResourceEventHubConsumerGroupArgs
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 iotHubResourceEventHubConsumerGroupResource = new AzureNative.Devices.IotHubResourceEventHubConsumerGroup("iotHubResourceEventHubConsumerGroupResource", new()
{
    EventHubEndpointName = "string",
    Properties = 
    {
        { "name", "string" },
    },
    ResourceGroupName = "string",
    ResourceName = "string",
    Name = "string",
});
Copy
example, err := devices.NewIotHubResourceEventHubConsumerGroup(ctx, "iotHubResourceEventHubConsumerGroupResource", &devices.IotHubResourceEventHubConsumerGroupArgs{
	EventHubEndpointName: "string",
	Properties: map[string]interface{}{
		"name": "string",
	},
	ResourceGroupName: "string",
	ResourceName:      "string",
	Name:              "string",
})
Copy
var iotHubResourceEventHubConsumerGroupResource = new IotHubResourceEventHubConsumerGroup("iotHubResourceEventHubConsumerGroupResource", IotHubResourceEventHubConsumerGroupArgs.builder()
    .eventHubEndpointName("string")
    .properties(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .resourceGroupName("string")
    .resourceName("string")
    .name("string")
    .build());
Copy
iot_hub_resource_event_hub_consumer_group_resource = azure_native.devices.IotHubResourceEventHubConsumerGroup("iotHubResourceEventHubConsumerGroupResource",
    event_hub_endpoint_name=string,
    properties={
        name: string,
    },
    resource_group_name=string,
    resource_name_=string,
    name=string)
Copy
const iotHubResourceEventHubConsumerGroupResource = new azure_native.devices.IotHubResourceEventHubConsumerGroup("iotHubResourceEventHubConsumerGroupResource", {
    eventHubEndpointName: "string",
    properties: {
        name: "string",
    },
    resourceGroupName: "string",
    resourceName: "string",
    name: "string",
});
Copy
type: azure-native:devices:IotHubResourceEventHubConsumerGroup
properties:
    eventHubEndpointName: string
    name: string
    properties:
        name: string
    resourceGroupName: string
    resourceName: string
Copy

IotHubResourceEventHubConsumerGroup 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 IotHubResourceEventHubConsumerGroup resource accepts the following input properties:

EventHubEndpointName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Event Hub-compatible endpoint in the IoT hub.
Properties This property is required. Pulumi.AzureNative.Devices.Inputs.EventHubConsumerGroupName
The EventHub consumer group name.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the IoT hub.
ResourceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the IoT hub.
Name Changes to this property will trigger replacement. string
The name of the consumer group to add.
EventHubEndpointName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Event Hub-compatible endpoint in the IoT hub.
Properties This property is required. EventHubConsumerGroupNameArgs
The EventHub consumer group name.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the IoT hub.
ResourceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the IoT hub.
Name Changes to this property will trigger replacement. string
The name of the consumer group to add.
eventHubEndpointName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Event Hub-compatible endpoint in the IoT hub.
properties This property is required. EventHubConsumerGroupName
The EventHub consumer group name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the IoT hub.
resourceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the IoT hub.
name Changes to this property will trigger replacement. String
The name of the consumer group to add.
eventHubEndpointName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Event Hub-compatible endpoint in the IoT hub.
properties This property is required. EventHubConsumerGroupName
The EventHub consumer group name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the IoT hub.
resourceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the IoT hub.
name Changes to this property will trigger replacement. string
The name of the consumer group to add.
event_hub_endpoint_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the Event Hub-compatible endpoint in the IoT hub.
properties This property is required. EventHubConsumerGroupNameArgs
The EventHub consumer group name.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group that contains the IoT hub.
resource_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the IoT hub.
name Changes to this property will trigger replacement. str
The name of the consumer group to add.
eventHubEndpointName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Event Hub-compatible endpoint in the IoT hub.
properties This property is required. Property Map
The EventHub consumer group name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the IoT hub.
resourceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the IoT hub.
name Changes to this property will trigger replacement. String
The name of the consumer group to add.

Outputs

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

Etag string
The etag.
Id string
The provider-assigned unique ID for this managed resource.
Type string
the resource type.
Etag string
The etag.
Id string
The provider-assigned unique ID for this managed resource.
Type string
the resource type.
etag String
The etag.
id String
The provider-assigned unique ID for this managed resource.
type String
the resource type.
etag string
The etag.
id string
The provider-assigned unique ID for this managed resource.
type string
the resource type.
etag str
The etag.
id str
The provider-assigned unique ID for this managed resource.
type str
the resource type.
etag String
The etag.
id String
The provider-assigned unique ID for this managed resource.
type String
the resource type.

Supporting Types

EventHubConsumerGroupName
, EventHubConsumerGroupNameArgs

Name This property is required. string
EventHub consumer group name
Name This property is required. string
EventHub consumer group name
name This property is required. String
EventHub consumer group name
name This property is required. string
EventHub consumer group name
name This property is required. str
EventHub consumer group name
name This property is required. String
EventHub consumer group name

Import

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

$ pulumi import azure-native:devices:IotHubResourceEventHubConsumerGroup test /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name} 
Copy

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

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0