Skip to content

Commit 34eed43

Browse files
add subscriptionId and resourceGroup parameter
1 parent 6c395bf commit 34eed43

File tree

3 files changed

+81
-18
lines changed

3 files changed

+81
-18
lines changed

articles/data-explorer/data-connection-event-grid-resource-manager.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,21 @@ The following example shows an Azure Resource Manager template for adding an Eve
4141
"type": "string",
4242
"defaultValue": "eventhubns",
4343
"metadata": {
44-
"description": "Specifies the event hub Namespace name."
44+
"description": "Specifies the Event Hub Namespace name."
4545
}
4646
},
4747
"EventHubs_eventhubdemo_name": {
4848
"type": "string",
4949
"defaultValue": "eventhubdemo",
5050
"metadata": {
51-
"description": "Specifies the event hub name."
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."
5259
}
5360
},
5461
"StorageAccounts_storagedemo_name": {
@@ -86,7 +93,7 @@ The following example shows an Azure Resource Manager template for adding an Eve
8693
"description": "Specifies the name of the mapping rule"
8794
}
8895
},
89-
"dataformat_csv_type": {
96+
"dataformat_type": {
9097
"type": "string",
9198
"defaultValue": "csv",
9299
"metadata": {
@@ -100,6 +107,20 @@ The following example shows an Azure Resource Manager template for adding an Eve
100107
"description": "Name of the data connection to create"
101108
}
102109
},
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+
},
103124
"location": {
104125
"type": "string",
105126
"defaultValue": "[resourceGroup().location]",
@@ -117,12 +138,12 @@ The following example shows an Azure Resource Manager template for adding an Eve
117138
"location": "[parameters('location')]",
118139
"kind": "EventGrid",
119140
"properties": {
120-
"storageAccountResourceId": "[resourceId('Microsoft.Storage/storageAccounts', parameters('StorageAccounts_storagedemo_name'))]",
121-
"eventHubResourceId": "[resourceId('Microsoft.EventHub/namespaces/eventhubs', parameters('namespaces_eventhubns_name'), parameters('EventHubs_eventhubdemo_name'))]",
122-
"consumerGroup": "$Default",
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')]",
123144
"tableName": "[parameters('tables_kustotable_name')]",
124145
"mappingRuleName": "[parameters('mapping_kustomapping_name')]",
125-
"dataFormat": "[parameters('dataformat_csv_type')]"
146+
"dataFormat": "[parameters('dataformat_type')]"
126147
}
127148
}
128149
]

articles/data-explorer/data-connection-event-hub-resource-manager.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,21 @@ The following example shows an Azure Resource Manager template for adding an Eve
3939
"type": "string",
4040
"defaultValue": "eventhubns",
4141
"metadata": {
42-
"description": "Specifies the event hub Namespace name."
42+
"description": "Specifies the Event Hub Namespace name."
4343
}
4444
},
4545
"EventHubs_eventhubdemo_name": {
4646
"type": "string",
4747
"defaultValue": "eventhubdemo",
4848
"metadata": {
49-
"description": "Specifies the event hub name."
49+
"description": "Specifies the Event Hub name."
50+
}
51+
},
52+
"consumergroup_default_name": {
53+
"type": "string",
54+
"defaultValue": "$Default",
55+
"metadata": {
56+
"description": "Specifies the consumer group of the Event Hub."
5057
}
5158
},
5259
"Clusters_kustocluster_name": {
@@ -77,7 +84,7 @@ The following example shows an Azure Resource Manager template for adding an Eve
7784
"description": "Specifies the name of the mapping rule"
7885
}
7986
},
80-
"dataformat_csv_type": {
87+
"dataformat_type": {
8188
"type": "string",
8289
"defaultValue": "csv",
8390
"metadata": {
@@ -91,6 +98,20 @@ The following example shows an Azure Resource Manager template for adding an Eve
9198
"description": "Name of the data connection to create"
9299
}
93100
},
101+
"subscriptionId": {
102+
"type": "string",
103+
"defaultValue": "[subscription().subscriptionId]",
104+
"metadata": {
105+
"description": "Specifies the subscriptionId of the Event Hub"
106+
}
107+
},
108+
"resourceGroup": {
109+
"type": "string",
110+
"defaultValue": "[resourceGroup().name]",
111+
"metadata": {
112+
"description": "Specifies the resourceGroup of the Event Hub"
113+
}
114+
},
94115
"location": {
95116
"type": "string",
96117
"defaultValue": "[resourceGroup().location]",
@@ -108,11 +129,11 @@ The following example shows an Azure Resource Manager template for adding an Eve
108129
"location": "[parameters('location')]",
109130
"kind": "EventHub",
110131
"properties": {
111-
"eventHubResourceId": "[resourceId('Microsoft.EventHub/namespaces/eventhubs', parameters('namespaces_eventhubns_name'), parameters('EventHubs_eventhubdemo_name'))]",
112-
"consumerGroup": "$Default",
132+
"eventHubResourceId": "[resourceId(parameters('subscriptionId'), parameters('resourceGroup'), 'Microsoft.EventHub/namespaces/eventhubs', parameters('namespaces_eventhubns_name'), parameters('EventHubs_eventhubdemo_name'))]",
133+
"consumerGroup": "[parameters('consumergroup_default_name')]",
113134
"tableName": "[parameters('tables_kustotable_name')]",
114135
"mappingRuleName": "[parameters('mapping_kustomapping_name')]",
115-
"dataFormat": "[parameters('dataformat_csv_type')]"
136+
"dataFormat": "[parameters('dataformat_type')]"
116137
}
117138
}
118139
]

articles/data-explorer/data-connection-iot-hub-resource-manager.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The following example shows an Azure Resource Manager template for adding an IoT
3939
"type": "string",
4040
"defaultValue": "iothubdemo",
4141
"metadata": {
42-
"description": "Specifies the event hub name."
42+
"description": "Specifies the IoT Hub name."
4343
}
4444
},
4545
"iothubpolices_iothubowner_name": {
@@ -49,6 +49,13 @@ The following example shows an Azure Resource Manager template for adding an IoT
4949
"description": "Specifies the shared access policy name."
5050
}
5151
},
52+
"consumergroup_default_name": {
53+
"type": "string",
54+
"defaultValue": "$Default",
55+
"metadata": {
56+
"description": "Specifies the consumer group of the IoT Hub."
57+
}
58+
},
5259
"Clusters_kustocluster_name": {
5360
"type": "string",
5461
"defaultValue": "kustocluster",
@@ -77,7 +84,7 @@ The following example shows an Azure Resource Manager template for adding an IoT
7784
"description": "Specifies the name of the mapping rule"
7885
}
7986
},
80-
"dataformat_csv_type": {
87+
"dataformat_type": {
8188
"type": "string",
8289
"defaultValue": "csv",
8390
"metadata": {
@@ -90,6 +97,20 @@ The following example shows an Azure Resource Manager template for adding an IoT
9097
"metadata": {
9198
"description": "Name of the data connection to create"
9299
}
100+
},
101+
"subscriptionId": {
102+
"type": "string",
103+
"defaultValue": "[subscription().subscriptionId]",
104+
"metadata": {
105+
"description": "Specifies the subscriptionId of the IoT Hub"
106+
}
107+
},
108+
"resourceGroup": {
109+
"type": "string",
110+
"defaultValue": "[resourceGroup().name]",
111+
"metadata": {
112+
"description": "Specifies the resourceGroup of the IoT Hub"
113+
}
93114
},
94115
"location": {
95116
"type": "string",
@@ -108,12 +129,12 @@ The following example shows an Azure Resource Manager template for adding an IoT
108129
"location": "[parameters('location')]",
109130
"kind": "IotHub",
110131
"properties": {
111-
"iotHubResourceId": "[resourceId('Microsoft.Devices/IotHubs', parameters('IotHubs_iothubdemo_name'))]",
112-
"consumerGroup": "$Default",
132+
"iotHubResourceId": "[resourceId(parameters('subscriptionId'), parameters('resourceGroup'), 'Microsoft.Devices/IotHubs', parameters('IotHubs_iothubdemo_name'))]",
133+
"consumerGroup": "[parameters('consumergroup_default_name')]",
113134
"sharedAccessPolicyName": "[parameters('iothubpolices_iothubowner_name')]",
114135
"tableName": "[parameters('tables_kustotable_name')]",
115136
"mappingRuleName": "[parameters('mapping_kustomapping_name')]",
116-
"dataFormat": "[parameters('dataformat_csv_type')]"
137+
"dataFormat": "[parameters('dataformat_type')]"
117138
}
118139
}
119140
]

0 commit comments

Comments
 (0)