Skip to content

Commit 2bd4a64

Browse files
committed
quickstart and TOCs
1 parent 132b49e commit 2bd4a64

File tree

3 files changed

+122
-0
lines changed

3 files changed

+122
-0
lines changed

articles/azure-resource-manager/bicep/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
items:
4444
- name: Analysis Services
4545
href: ../../analysis-services/analysis-services-create-bicep-file.md?toc=/azure/azure-resource-manager/bicep/toc.json
46+
- name: Event Hubs
47+
href: ../../event-hubs/event-hubs-bicep-namespace-event-hub.md?toc=/azure/azure-resource-manager/bicep/toc.json
4648
- name: Compute
4749
items:
4850
- name: Linux virtual machine

articles/event-hubs/TOC.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
href: event-hubs-quickstart-cli.md
1818
- name: Azure PowerShell
1919
href: event-hubs-quickstart-powershell.md
20+
- name: Bicep
21+
displayName: ARM, Resource Manager, Template
22+
href: event-hubs-bicep-namespace-event-hub.md
2023
- name: ARM template
2124
displayName: Resource Manager
2225
href: event-hubs-resource-manager-namespace-event-hub.md
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
title: 'Quickstart: Create an event hub with consumer group - Azure Event Hubs'
3+
description: 'Quickstart: Create an Event Hubs namespace with an event hub and a consumer group using Bicep'
4+
author: schaffererin
5+
ms.topic: quickstart
6+
ms.author: v-eschaffer
7+
ms.custom: subject-armqs, devx-track-azurepowershell, mode-arm
8+
ms.date: 03/22/2022
9+
---
10+
11+
# Quickstart: Create an event hub by using Bicep
12+
13+
Azure Event Hubs is a Big Data streaming platform and event ingestion service, capable of receiving and processing millions of events per second. Event Hubs can process and store events, data, or telemetry produced by distributed software and devices. Data sent to an event hub can be transformed and stored using any real-time analytics provider or batching/storage adapters. For detailed overview of Event Hubs, see [Event Hubs overview](event-hubs-about.md) and [Event Hubs features](event-hubs-features.md). In this quickstart, you create an event hub by using [Bicep](../azure-resource-manager/bicep/overview.md). You deploy a Bicep file to create a namespace of type [Event Hubs](./event-hubs-about.md), with one event hub.
14+
15+
[!INCLUDE [About Azure Resource Manager](../../includes/resource-manager-quickstart-bicep-introduction.md)]
16+
17+
## Prerequisites
18+
19+
If you don't have an Azure subscription, [create a free account](https://azure.microsoft.com/free/) before you begin.
20+
21+
## Review the Bicep file
22+
23+
The Bicep file used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/eventhubs-create-namespace-and-eventhub/).
24+
25+
:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.eventhub/eventhubs-create-namespace-and-eventhub/main.bicep":::
26+
27+
The resources defined in the Bicep file include:
28+
29+
- [**Microsoft.EventHub/namespaces**](/azure/templates/microsoft.eventhub/namespaces)
30+
- [**Microsoft.EventHub/namespaces/eventhubs**](/azure/templates/microsoft.eventhub/namespaces/eventhubs)
31+
32+
To find template samples, see [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/?term=eventhub&pageNumber=1&sort=Popular).
33+
34+
## Deploy the Bicep file
35+
36+
1. Save the Bicep file as **main.bicep** to your local computer.
37+
1. Deploy the Bicep file using either Azure CLI or Azure PowerShell.
38+
39+
# [CLI](#tab/CLI)
40+
41+
```azurecli
42+
az group create --name exampleRG --location eastus
43+
az deployment group create --resource-group exampleRG --template-file main.bicep --parameters projectName=<project-name>
44+
```
45+
46+
# [PowerShell](#tab/PowerShell)
47+
48+
```azurepowershell
49+
New-AzResourceGroup -Name exampleRG -Location eastus
50+
New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep -projectName "<project-name>"
51+
```
52+
53+
---
54+
55+
> [!NOTE]
56+
> Replace **\<project-name\>** with a project name. It will be used to generate the Event Hub and the Namespace name.
57+
58+
When the deployment finishes, you should see a message indicating the deployment succeeded.
59+
60+
## Validate the deployment
61+
62+
Use the Azure portal, Azure CLI, or Azure PowerShell to list the deployed resources in the resource group.
63+
64+
# [CLI](#tab/CLI)
65+
66+
```azurecli-interactive
67+
az resource list --resource-group exampleRG
68+
```
69+
70+
# [PowerShell](#tab/PowerShell)
71+
72+
```azurepowershell-interactive
73+
Get-AzResource -ResourceGroupName exampleRG
74+
```
75+
76+
---
77+
78+
## Clean up resources
79+
80+
When no longer needed, use the Azure portal, Azure CLI, or Azure PowerShell to delete the VM and all of the resources in the resource group.
81+
82+
# [CLI](#tab/CLI)
83+
84+
```azurecli-interactive
85+
az group delete --name exampleRG
86+
```
87+
88+
# [PowerShell](#tab/PowerShell)
89+
90+
```azurepowershell-interactive
91+
Remove-AzResourceGroup -Name exampleRG
92+
```
93+
94+
---
95+
96+
## Next steps
97+
98+
In this article, you created an Event Hubs namespace and an event hub in the namespace using Bicep. For step-by-step instructions to send events to (or) receive events from an event hub, see the **Send and receive events** tutorials:
99+
100+
- [.NET Core](event-hubs-dotnet-standard-getstarted-send.md)
101+
- [Java](event-hubs-java-get-started-send.md)
102+
- [Python](event-hubs-python-get-started-send.md)
103+
- [JavaScript](event-hubs-node-get-started-send.md)
104+
- [Go](event-hubs-go-get-started-send.md)
105+
- [C (send only)](event-hubs-c-getstarted-send.md)
106+
- [Apache Storm (receive only)](event-hubs-storm-getstarted-receive.md)
107+
108+
109+
[3]: ./media/event-hubs-quickstart-powershell/sender1.png
110+
[4]: ./media/event-hubs-quickstart-powershell/receiver1.png
111+
[5]: ./media/event-hubs-quickstart-powershell/metrics.png
112+
113+
[Understand the structure and syntax of Bicep files]: ../azure-resource-manager/bicep/file.md
114+
[Azure Quickstart Templates]: https://azure.microsoft.com/resources/templates/?term=event+hubs
115+
[Deploy resources with Bicep and Azure PowerShell]: ../azure-resource-manager/bicep/deploy-powershell.md
116+
[Deploy resource with Bicep and Azure CLI]: ../azure-resource-manager/bicep/deploy-cli.md
117+
[Event hub and consumer group template]: https://github.com/Azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.eventhub/event-hubs-create-event-hub-and-consumer-group/

0 commit comments

Comments
 (0)