Skip to content

Commit 30b4545

Browse files
authored
Merge pull request #97388 from lucygoldbergmicrosoft/add-arm-template-for-dataconnections
Add arm template for dataconnections
2 parents e38a1ed + d93d124 commit 30b4545

18 files changed

+496
-69
lines changed

articles/data-explorer/create-cluster-database-csharp.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,18 @@ ms.date: 06/03/2019
1717
> * [PowerShell](create-cluster-database-powershell.md)
1818
> * [C#](create-cluster-database-csharp.md)
1919
> * [Python](create-cluster-database-python.md)
20-
> * [ARM template](create-cluster-database-resource-manager.md)
20+
> * [Azure Resource Manager template](create-cluster-database-resource-manager.md)
2121
2222
Azure Data Explorer is a fast, fully managed data analytics service for real-time analysis on large volumes of data streaming from applications, websites, IoT devices, and more. To use Azure Data Explorer, you first create a cluster, and create one or more databases in that cluster. Then you ingest (load) data into a database so that you can run queries against it. In this article, you create a cluster and a database by using C#.
2323

2424
## Prerequisites
2525

2626
* If you don't have Visual Studio 2019 installed, you can download and use the **free** [Visual Studio 2019 Community Edition](https://www.visualstudio.com/downloads/). Make sure that you enable **Azure development** during the Visual Studio setup.
27-
2827
* If you don't have an Azure subscription, create a [free Azure account](https://azure.microsoft.com/free/) before you begin.
2928

3029
## Install C# Nuget
3130

3231
* Install the [Azure Data Explorer (Kusto) nuget package](https://www.nuget.org/packages/Microsoft.Azure.Management.Kusto/).
33-
3432
* Install the [Microsoft.IdentityModel.Clients.ActiveDirectory nuget package](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/) for authentication.
3533

3634
## Authentication

articles/data-explorer/create-cluster-database-resource-manager.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ms.date: 09/26/2019
1717
> * [PowerShell](create-cluster-database-powershell.md)
1818
> * [C#](create-cluster-database-csharp.md)
1919
> * [Python](create-cluster-database-python.md)
20-
> * [ARM template](create-cluster-database-resource-manager.md)
20+
> * [Azure Resource Manager template](create-cluster-database-resource-manager.md)
2121
2222
Azure Data Explorer is a fast and highly scalable data exploration service for log and telemetry data. To use Azure Data Explorer, you first create a cluster, and create one or more databases in that cluster. Then you ingest (load) data into a database so that you can run queries against it.
2323

@@ -150,26 +150,7 @@ Get-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName
150150
Write-Host "Press [ENTER] to continue ..."
151151
```
152152

153-
## Clean up resources
154-
155-
When the Azure resources are no longer needed, clean up the resources you deployed by deleting the resource group.
156-
157-
### Clean up resources using the Azure portal
158-
159-
Delete the resources in the Azure portal by following the steps in [clean up resources](create-cluster-database-portal.md#clean-up-resources).
160-
161-
### Clean up resources using PowerShell
162-
163-
If the Cloud Shell is still open, you don't need to copy/run the first line (Read-Host).
164-
165-
```azurepowershell-interactive
166-
$projectName = Read-Host -Prompt "Enter the same project name that you used in the last procedure"
167-
$resourceGroupName = "${projectName}rg"
168-
169-
Remove-AzResourceGroup -ResourceGroupName $resourceGroupName
170-
171-
Write-Host "Press [ENTER] to continue ..."
172-
```
153+
[!INCLUDE [data-explorer-clean-resources](../../includes/data-explorer-clean-resources.md)]
173154

174155
## Next steps
175156

articles/data-explorer/data-connection-event-grid-csharp.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,18 @@ ms.date: 10/07/2019
1515
> * [Portal](ingest-data-event-grid.md)
1616
> * [C#](data-connection-event-grid-csharp.md)
1717
> * [Python](data-connection-event-grid-python.md)
18+
> * [Azure Resource Manager template](data-connection-event-grid-resource-manager.md)
1819
1920

2021
Azure Data Explorer is a fast and highly scalable data exploration service for log and telemetry data. Azure Data Explorer offers ingestion (data loading) from Event Hubs, IoT Hubs, and blobs written to blob containers. In this article, you create an Event Grid data connection for Azure Data Explorer by using C#.
2122

2223
## Prerequisites
2324

2425
* If you don't have Visual Studio 2019 installed, you can download and use the **free** [Visual Studio 2019 Community Edition](https://www.visualstudio.com/downloads/). Make sure that you enable **Azure development** during the Visual Studio setup.
25-
2626
* If you don't have an Azure subscription, create a [free Azure account](https://azure.microsoft.com/free/) before you begin.
27-
2827
* Create [a cluster and database](create-cluster-database-csharp.md)
29-
3028
* Create [table and column mapping](net-standard-ingest-data.md#create-a-table-on-your-test-cluster)
31-
3229
* Set [database and table policies](database-table-policies-csharp.md) (optional)
33-
3430
* Create a [storage account with an Event Grid subscription](ingest-data-event-grid.md#create-an-event-grid-subscription-in-your-storage-account).
3531

3632
[!INCLUDE [data-explorer-data-connection-install-nuget-csharp](../../includes/data-explorer-data-connection-install-nuget-csharp.md)]

articles/data-explorer/data-connection-event-grid-python.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,16 @@ ms.date: 10/07/2019
1515
> * [Portal](ingest-data-event-grid.md)
1616
> * [C#](data-connection-event-grid-csharp.md)
1717
> * [Python](data-connection-event-grid-python.md)
18+
> * [Azure Resource Manager template](data-connection-event-grid-resource-manager.md)
1819
1920
Azure Data Explorer is a fast and highly scalable data exploration service for log and telemetry data. Azure Data Explorer offers ingestion (data loading) from Event Hubs, IoT Hubs, and blobs written to blob containers. In this article, you create an Event Grid data connection for Azure Data Explorer by using Python.
2021

2122
## Prerequisites
2223

2324
* If you don't have an Azure subscription, create a [free Azure account](https://azure.microsoft.com/free/) before you begin.
24-
2525
* Create [a cluster and database](create-cluster-database-csharp.md)
26-
2726
* Create [table and column mapping](net-standard-ingest-data.md#create-a-table-on-your-test-cluster)
28-
2927
* Set [database and table policies](database-table-policies-csharp.md) (optional)
30-
3128
* Create a [storage account with an Event Grid subscription](ingest-data-event-grid.md#create-an-event-grid-subscription-in-your-storage-account).
3229

3330
[!INCLUDE [data-explorer-data-connection-install-package-python](../../includes/data-explorer-data-connection-install-package-python.md)]
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
---
2+
title: 'Create an Event Grid data connection for Azure Data Explorer by using Azure Resource Manager template'
3+
description: In this article, you learn how to create an Event Grid data connection for Azure Data Explorer by using Azure Resource Manager template.
4+
author: lucygoldbergmicrosoft
5+
ms.author: lugoldbe
6+
ms.reviewer: orspodek
7+
ms.service: data-explorer
8+
ms.topic: conceptual
9+
ms.date: 11/28/2019
10+
---
11+
12+
# Create an Event Grid data connection for Azure Data Explorer by using Azure Resource Manager template
13+
14+
> [!div class="op_single_selector"]
15+
> * [Portal](ingest-data-event-grid.md)
16+
> * [C#](data-connection-event-grid-csharp.md)
17+
> * [Python](data-connection-event-grid-python.md)
18+
> * [Azure Resource Manager template](data-connection-event-grid-resource-manager.md)
19+
20+
21+
Azure Data Explorer is a fast and highly scalable data exploration service for log and telemetry data. Azure Data Explorer offers ingestion (data loading) from Event Hubs, IoT Hubs, and blobs written to blob containers. In this article, you create an Event Grid data connection for Azure Data Explorer by using Azure Resource Manager template.
22+
23+
## Prerequisites
24+
25+
* If you don't have an Azure subscription, create a [free Azure account](https://azure.microsoft.com/free/) before you begin.
26+
* Create [a cluster and database](create-cluster-database-portal.md)
27+
* Create [a table and column mapping](ingest-data-event-grid.md#create-a-target-table-in-azure-data-explorer)
28+
* Create [an event hub](https://docs.microsoft.com/azure/event-hubs/event-hubs-create)
29+
* Create [a storage account with an Event Grid subscription](ingest-data-event-grid.md#create-an-event-grid-subscription-in-your-storage-account).
30+
31+
## Azure Resource Manager template for adding an Event Grid data connection
32+
33+
The following example shows an Azure Resource Manager template for adding an Event Grid data connection. You can [edit and deploy the template in the Azure portal](/azure/azure-resource-manager/resource-manager-quickstart-create-templates-use-the-portal#edit-and-deploy-the-template) by using the form.
34+
35+
```json
36+
{
37+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
38+
"contentVersion": "1.0.0.0",
39+
"parameters": {
40+
"namespaces_eventhubns_name": {
41+
"type": "string",
42+
"defaultValue": "eventhubns",
43+
"metadata": {
44+
"description": "Specifies the Event Hub Namespace name."
45+
}
46+
},
47+
"EventHubs_eventhubdemo_name": {
48+
"type": "string",
49+
"defaultValue": "eventhubdemo",
50+
"metadata": {
51+
"description": "Specifies the Event Hub name."
52+
}
53+
},
54+
"consumergroup_default_name": {
55+
"type": "string",
56+
"defaultValue": "$Default",
57+
"metadata": {
58+
"description": "Specifies the consumer group of the Event Hub."
59+
}
60+
},
61+
"StorageAccounts_storagedemo_name": {
62+
"type": "string",
63+
"defaultValue": "storagedemo",
64+
"metadata": {
65+
"description": "Specifies the storage account name"
66+
}
67+
},
68+
"Clusters_kustocluster_name": {
69+
"type": "string",
70+
"defaultValue": "kustocluster",
71+
"metadata": {
72+
"description": "Specifies the name of the cluster"
73+
}
74+
},
75+
"databases_kustodb_name": {
76+
"type": "string",
77+
"defaultValue": "kustodb",
78+
"metadata": {
79+
"description": "Specifies the name of the database"
80+
}
81+
},
82+
"tables_kustotable_name": {
83+
"type": "string",
84+
"defaultValue": "kustotable",
85+
"metadata": {
86+
"description": "Specifies the name of the table"
87+
}
88+
},
89+
"mapping_kustomapping_name": {
90+
"type": "string",
91+
"defaultValue": "kustomapping",
92+
"metadata": {
93+
"description": "Specifies the name of the mapping rule"
94+
}
95+
},
96+
"dataformat_type": {
97+
"type": "string",
98+
"defaultValue": "csv",
99+
"metadata": {
100+
"description": "Specifies the data format"
101+
}
102+
},
103+
"dataconnections_kustodc_name": {
104+
"type": "string",
105+
"defaultValue": "kustodc",
106+
"metadata": {
107+
"description": "Name of the data connection to create"
108+
}
109+
},
110+
"subscriptionId": {
111+
"type": "string",
112+
"defaultValue": "[subscription().subscriptionId]",
113+
"metadata": {
114+
"description": "Specifies the subscriptionId of the resources"
115+
}
116+
},
117+
"resourceGroup": {
118+
"type": "string",
119+
"defaultValue": "[resourceGroup().name]",
120+
"metadata": {
121+
"description": "Specifies the resourceGroup of the resources"
122+
}
123+
},
124+
"location": {
125+
"type": "string",
126+
"defaultValue": "[resourceGroup().location]",
127+
"metadata": {
128+
"description": "Location for all resources."
129+
}
130+
}
131+
},
132+
"variables": {
133+
},
134+
"resources": [{
135+
"type": "Microsoft.Kusto/Clusters/Databases/DataConnections",
136+
"apiVersion": "2019-09-07",
137+
"name": "[concat(parameters('Clusters_kustocluster_name'), '/', parameters('databases_kustodb_name'), '/', parameters('dataconnections_kustodc_name'))]",
138+
"location": "[parameters('location')]",
139+
"kind": "EventGrid",
140+
"properties": {
141+
"storageAccountResourceId": "[resourceId(parameters('subscriptionId'), parameters('resourceGroup'), 'Microsoft.Storage/storageAccounts', parameters('StorageAccounts_storagedemo_name'))]",
142+
"eventHubResourceId": "[resourceId(parameters('subscriptionId'), parameters('resourceGroup'), 'Microsoft.EventHub/namespaces/eventhubs', parameters('namespaces_eventhubns_name'), parameters('EventHubs_eventhubdemo_name'))]",
143+
"consumerGroup": "[parameters('consumergroup_default_name')]",
144+
"tableName": "[parameters('tables_kustotable_name')]",
145+
"mappingRuleName": "[parameters('mapping_kustomapping_name')]",
146+
"dataFormat": "[parameters('dataformat_type')]"
147+
}
148+
}
149+
]
150+
}
151+
```
152+
153+
[!INCLUDE [data-explorer-clean-resources](../../includes/data-explorer-clean-resources.md)]

articles/data-explorer/data-connection-event-hub-csharp.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,17 @@ ms.date: 10/07/2019
1515
> * [Portal](ingest-data-event-hub.md)
1616
> * [C#](data-connection-event-hub-csharp.md)
1717
> * [Python](data-connection-event-hub-python.md)
18+
> * [Azure Resource Manager template](data-connection-event-hub-resource-manager.md)
1819
1920
Azure Data Explorer is a fast and highly scalable data exploration service for log and telemetry data. Azure Data Explorer offers ingestion (data loading) from Event Hubs, IoT Hubs, and blobs written to blob containers. In this article, you create an Event Hub data connection for Azure Data Explorer by using C#.
2021

2122
## Prerequisites
2223

2324
* If you don't have Visual Studio 2019 installed, you can download and use the **free** [Visual Studio 2019 Community Edition](https://www.visualstudio.com/downloads/). Make sure that you enable **Azure development** during the Visual Studio setup.
24-
2525
* If you don't have an Azure subscription, create a [free Azure account](https://azure.microsoft.com/free/) before you begin.
26-
2726
* Create [a cluster and database](create-cluster-database-csharp.md)
28-
2927
* Create [table and column mapping](net-standard-ingest-data.md#create-a-table-on-your-test-cluster)
30-
3128
* Set [database and table policies](database-table-policies-csharp.md) (optional)
32-
3329
* Create an [Event Hub with data for ingestion](ingest-data-event-hub.md#create-an-event-hub).
3430

3531
[!INCLUDE [data-explorer-data-connection-install-nuget-csharp](../../includes/data-explorer-data-connection-install-nuget-csharp.md)]

articles/data-explorer/data-connection-event-hub-python.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,16 @@ ms.date: 10/07/2019
1515
> * [Portal](ingest-data-event-hub.md)
1616
> * [C#](data-connection-event-hub-csharp.md)
1717
> * [Python](data-connection-event-hub-python.md)
18+
> * [Azure Resource Manager template](data-connection-event-hub-resource-manager.md)
1819
1920
Azure Data Explorer is a fast and highly scalable data exploration service for log and telemetry data. Azure Data Explorer offers ingestion (data loading) from Event Hubs, IoT Hubs, and blobs written to blob containers. In this article, you create an Event Hub data connection for Azure Data Explorer by using Python.
2021

2122
## Prerequisites
2223

2324
* If you don't have an Azure subscription, create a [free Azure account](https://azure.microsoft.com/free/) before you begin.
24-
2525
* Create [a cluster and database](create-cluster-database-csharp.md)
26-
2726
* Create [table and column mapping](net-standard-ingest-data.md#create-a-table-on-your-test-cluster)
28-
2927
* Set [database and table policies](database-table-policies-csharp.md) (optional)
30-
3128
* Create an [Event Hub with data for ingestion](ingest-data-event-hub.md#create-an-event-hub).
3229

3330
[!INCLUDE [data-explorer-data-connection-install-package-python](../../includes/data-explorer-data-connection-install-package-python.md)]

0 commit comments

Comments
 (0)