ConsumerGroup
Manages a Consumer Group within an IotHub
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 exampleIoTHub = new Azure.Iot.IoTHub("exampleIoTHub", new Azure.Iot.IoTHubArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
Sku = new Azure.Iot.Inputs.IoTHubSkuArgs
{
Name = "S1",
Capacity = 1,
},
Tags =
{
{ "purpose", "testing" },
},
});
var exampleConsumerGroup = new Azure.Iot.ConsumerGroup("exampleConsumerGroup", new Azure.Iot.ConsumerGroupArgs
{
IothubName = exampleIoTHub.Name,
EventhubEndpointName = "events",
ResourceGroupName = exampleResourceGroup.Name,
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/iot"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West US"),
})
if err != nil {
return err
}
exampleIoTHub, err := iot.NewIoTHub(ctx, "exampleIoTHub", &iot.IoTHubArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
Sku: &iot.IoTHubSkuArgs{
Name: pulumi.String("S1"),
Capacity: pulumi.Int(1),
},
Tags: pulumi.Map{
"purpose": pulumi.String("testing"),
},
})
if err != nil {
return err
}
_, err = iot.NewConsumerGroup(ctx, "exampleConsumerGroup", &iot.ConsumerGroupArgs{
IothubName: exampleIoTHub.Name,
EventhubEndpointName: pulumi.String("events"),
ResourceGroupName: exampleResourceGroup.Name,
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West US")
example_io_t_hub = azure.iot.IoTHub("exampleIoTHub",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
sku={
"name": "S1",
"capacity": "1",
},
tags={
"purpose": "testing",
})
example_consumer_group = azure.iot.ConsumerGroup("exampleConsumerGroup",
iothub_name=example_io_t_hub.name,
eventhub_endpoint_name="events",
resource_group_name=example_resource_group.name)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West US"});
const exampleIoTHub = new azure.iot.IoTHub("exampleIoTHub", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
sku: {
name: "S1",
capacity: "1",
},
tags: {
purpose: "testing",
},
});
const exampleConsumerGroup = new azure.iot.ConsumerGroup("exampleConsumerGroup", {
iothubName: exampleIoTHub.name,
eventhubEndpointName: "events",
resourceGroupName: exampleResourceGroup.name,
});Create a ConsumerGroup Resource
new ConsumerGroup(name: string, args: ConsumerGroupArgs, opts?: CustomResourceOptions);def ConsumerGroup(resource_name, opts=None, eventhub_endpoint_name=None, iothub_name=None, name=None, resource_group_name=None, __props__=None);func NewConsumerGroup(ctx *Context, name string, args ConsumerGroupArgs, opts ...ResourceOption) (*ConsumerGroup, error)public ConsumerGroup(string name, ConsumerGroupArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
ConsumerGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ConsumerGroup resource accepts the following input properties:
- Eventhub
Endpoint stringName The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created.
- Iothub
Name string The name of the IoT Hub. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created.
- Name string
The name of this Consumer Group. Changing this forces a new resource to be created.
- Eventhub
Endpoint stringName The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created.
- Iothub
Name string The name of the IoT Hub. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created.
- Name string
The name of this Consumer Group. Changing this forces a new resource to be created.
- eventhub
Endpoint stringName The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created.
- iothub
Name string The name of the IoT Hub. Changing this forces a new resource to be created.
- resource
Group stringName The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created.
- name string
The name of this Consumer Group. Changing this forces a new resource to be created.
- eventhub_
endpoint_ strname The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created.
- iothub_
name str The name of the IoT Hub. Changing this forces a new resource to be created.
- resource_
group_ strname The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created.
- name str
The name of this Consumer Group. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the ConsumerGroup resource produces the following output properties:
Look up an Existing ConsumerGroup Resource
Get an existing ConsumerGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ConsumerGroupState, opts?: CustomResourceOptions): ConsumerGroupstatic get(resource_name, id, opts=None, eventhub_endpoint_name=None, iothub_name=None, name=None, resource_group_name=None, __props__=None);func GetConsumerGroup(ctx *Context, name string, id IDInput, state *ConsumerGroupState, opts ...ResourceOption) (*ConsumerGroup, error)public static ConsumerGroup Get(string name, Input<string> id, ConsumerGroupState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Eventhub
Endpoint stringName The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created.
- Iothub
Name string The name of the IoT Hub. Changing this forces a new resource to be created.
- Name string
The name of this Consumer Group. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created.
- Eventhub
Endpoint stringName The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created.
- Iothub
Name string The name of the IoT Hub. Changing this forces a new resource to be created.
- Name string
The name of this Consumer Group. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created.
- eventhub
Endpoint stringName The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created.
- iothub
Name string The name of the IoT Hub. Changing this forces a new resource to be created.
- name string
The name of this Consumer Group. Changing this forces a new resource to be created.
- resource
Group stringName The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created.
- eventhub_
endpoint_ strname The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created.
- iothub_
name str The name of the IoT Hub. Changing this forces a new resource to be created.
- name str
The name of this Consumer Group. Changing this forces a new resource to be created.
- resource_
group_ strname The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.