Skip to content

Commit bce0310

Browse files
committed
Creating new Bicep quickstart - Stream Analytics
1 parent fb432b0 commit bce0310

File tree

3 files changed

+111
-0
lines changed

3 files changed

+111
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
href: ../../hdinsight/kafka/apache-kafka-quickstart-bicep.md?toc=/azure/azure-resource-manager/bicep/toc.json
7070
- name: HDInsight - Spark
7171
href: ../../hdinsight/spark/apache-spark-jupyter-spark-use-bicep.md?toc=/azure/azure-resource-manager/bicep/toc.json
72+
- name: Stream Analytics
73+
href: ../../stream-analytics/quick-create-bicep.md?toc=/azure/azure-resource-manager/bicep/toc.json
7274
- name: Compute
7375
items:
7476
- name: Batch

articles/stream-analytics/TOC.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
href: stream-analytics-quick-create-portal.md
1616
- name: Azure CLI
1717
href: quick-create-azure-cli.md
18+
- name: Bicep
19+
displayName: ARM, Resource Manager, Template
20+
href: quick-create-bicep.md
1821
- name: ARM template
1922
displayName: Resource Manager
2023
href: quick-create-azure-resource-manager.md
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
title: Quickstart - Create an Azure Stream Analytics job using Bicep
3+
description: This quickstart shows how to use Bicep to create an Azure Stream Analytics job.
4+
services: stream-analytics
5+
ms.service: stream-analytics
6+
author: schaffererin
7+
ms.author: v-eschaffer
8+
ms.workload: big-data
9+
ms.topic: quickstart
10+
ms.custom: mvc, subject-armqs, devx-track-azurepowershell, mode-arm
11+
ms.date: 05/17/2022
12+
---
13+
14+
# Quickstart: Create an Azure Stream Analytics job using Bicep
15+
16+
In this quickstart, you use Bicep to create an Azure Stream Analytics job. Once the job is created, you validate the deployment.
17+
18+
[!INCLUDE [About Bicep](../../includes/resource-manager-quickstart-bicep-introduction.md)]
19+
20+
## Prerequisites
21+
22+
To complete this article, you need to have an Azure subscription. [Create one for free](https://azure.microsoft.com/free/).
23+
24+
## Review the Bicep file
25+
26+
The Bicep file used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/streamanalytics-create/).
27+
28+
:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.streamanalytics/streamanalytics-create/main.bicep":::
29+
30+
The Azure resource defined in the Bicep file is [Microsoft.StreamAnalytics/StreamingJobs](/azure/templates/microsoft.streamanalytics/streamingjobs): create an Azure Stream Analytics job.
31+
32+
## Deploy the Bicep file
33+
34+
1. Save the Bicep file as **main.bicep** to your local computer.
35+
1. Deploy the Bicep file using either Azure CLI or Azure PowerShell.
36+
37+
# [CLI](#tab/CLI)
38+
39+
```azurecli
40+
az group create --name exampleRG --location eastus
41+
az deployment group create --resource-group exampleRG --template-file main.bicep --parameters streamAnalyticsJobName =<job-name> numberOfStreamingUnits=<int>
42+
```
43+
44+
# [PowerShell](#tab/PowerShell)
45+
46+
```azurepowershell
47+
New-AzResourceGroup -Name exampleRG -Location eastus
48+
New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep -streamAnalyticsJobName "<job-name>" -numberOfStreamingUnits <int>
49+
```
50+
51+
---
52+
53+
You need to provide values for the following parameters:
54+
55+
- **streamAnalyticsJobName**: Replace **\<job-name\>** with the Stream Analytics job name. The name can contain alphanumeric characters and hyphens, and it must be at least 3-63 characters long.
56+
- **numberOfStreamingUnits**: Replace **\<int\>** with the number of Streaming Units. Allowed values include: 1, 3, 6, 12, 18, 24, 30, 36, 42, and 48.
57+
58+
> [!NOTE]
59+
> When the deployment finishes, you should see a message indicating the deployment succeeded.
60+
61+
## Review deployed resources
62+
63+
You can either use the Azure portal to check the Azure Stream Analytics job or use the following Azure CLI or Azure PowerShell script to list the resource.
64+
65+
### Azure CLI
66+
67+
Use the Azure portal, Azure CLI, or Azure PowerShell to list the deployed resources in the resource group.
68+
69+
# [CLI](#tab/CLI)
70+
71+
```azurecli-interactive
72+
az resource list --resource-group exampleRG
73+
```
74+
75+
# [PowerShell](#tab/PowerShell)
76+
77+
```azurepowershell-interactive
78+
Get-AzResource -ResourceGroupName exampleRG
79+
```
80+
81+
---
82+
83+
## Clean up resources
84+
85+
If you plan to continue on to subsequent tutorials, you may wish to leave these resources in place. When no longer needed, delete the resource group, which deletes the Azure Stream Analytics job. To delete the resource group by using Azure CLI or Azure PowerShell:
86+
87+
# [CLI](#tab/CLI)
88+
89+
```azurecli-interactive
90+
az group delete --name exampleRG
91+
```
92+
93+
# [PowerShell](#tab/PowerShell)
94+
95+
```azurepowershell-interactive
96+
Remove-AzResourceGroup -Name exampleRG
97+
```
98+
99+
---
100+
101+
## Next steps
102+
103+
In this quickstart, you created an Azure Stream Analytics job using Bicep and validated the deployment. To learn how to create your own Bicep files using Visual Studio Code, continue on to the following article:
104+
105+
> [!div class="nextstepaction"]
106+
> [Quickstart: Create Bicep files with Visual Studio Code](../azure-resource-manager/bicep/quickstart-create-bicep-use-visual-studio-code.md)

0 commit comments

Comments
 (0)