-
Notifications
You must be signed in to change notification settings - Fork 16.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2378 from sazeesha/master
Adding template for AuthRules in EH
- Loading branch information
Showing
10 changed files
with
208 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
301-eventHub-create-authrule-namespace-and-eventHub/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Create Event Hub namespace, an Event Hub, a consumer group and authorizationRules. | ||
|
||
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.luolix.top%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F301-eventHub-create-authrule-namespace-and-eventHub%2Fazuredeploy.json" target="_blank"> | ||
<img src="http://azuredeploy.net/deploybutton.png"/> | ||
</a> |
124 changes: 124 additions & 0 deletions
124
301-eventHub-create-authrule-namespace-and-eventHub/azuredeploy.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
{ | ||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"namespaceName": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Name of the EventHub namespace" | ||
} | ||
}, | ||
"eventHubName": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Name of the Event Hub" | ||
} | ||
}, | ||
"consumerGroupName": { | ||
"type": "string", | ||
"metadata": { | ||
"description": "Name of the Consumer Group" | ||
} | ||
}, | ||
"apiVersion": { | ||
"type": "string", | ||
"defaultValue": "2015-08-01", | ||
"metadata": { | ||
"description": "ApiVersion used by the template" | ||
} | ||
} | ||
}, | ||
"variables": { | ||
"managePolicy": "ManagePolicy", | ||
"sendPolicy": "SendPolicy", | ||
"listenPolicy": "ListenPolicy", | ||
"location": "[resourceGroup().location]", | ||
"ehVersion": "[parameters('apiVersion')]", | ||
"defaultSASKeyName": "RootManageSharedAccessKey", | ||
"authRuleResourceId": "[resourceId('Microsoft.EventHub/namespaces/authorizationRules', parameters('namespaceName'), variables('defaultSASKeyName'))]" | ||
}, | ||
"resources": [{ | ||
"apiVersion": "[variables('ehVersion')]", | ||
"name": "[parameters('namespaceName')]", | ||
"type": "Microsoft.EventHub/Namespaces", | ||
"location": "[variables('location')]", | ||
"sku": { | ||
"name": "Standard", | ||
"tier": "Standard" | ||
}, | ||
"resources": [{ | ||
"apiVersion": "[variables('ehVersion')]", | ||
"name": "[parameters('eventHubName')]", | ||
"type": "EventHubs", | ||
"dependsOn": [ | ||
"[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'))]" | ||
], | ||
"properties": { | ||
"path": "[parameters('eventHubName')]" | ||
}, | ||
"resources": [{ | ||
"apiVersion": "[variables('ehVersion')]", | ||
"name": "[parameters('consumerGroupName')]", | ||
"type": "ConsumerGroups", | ||
"dependsOn": [ | ||
"[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'),'/eventhubs/',parameters('eventHubName'))]" | ||
], | ||
"properties": {} | ||
}, { | ||
"apiVersion": "[variables('ehVersion')]", | ||
"name": "[variables('managePolicy')]", | ||
"type": "authorizationRules", | ||
"dependsOn": [ | ||
"[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'),'/eventhubs/',parameters('eventHubName'))]", | ||
"[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'),'/eventhubs/',parameters('eventHubName'), '/consumerGroups/', parameters('consumerGroupName'))]" | ||
], | ||
"properties": { | ||
"Rights": [ | ||
"Send", | ||
"Listen", | ||
"Manage" | ||
] | ||
} | ||
}, { | ||
"apiVersion": "[variables('ehVersion')]", | ||
"name": "[variables('sendPolicy')]", | ||
"type": "authorizationRules", | ||
"dependsOn": [ | ||
"[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'),'/eventhubs/',parameters('eventHubName'))]", | ||
"[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'),'/eventhubs/',parameters('eventHubName'), '/authorizationRules/', variables('managePolicy'))]", | ||
"[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'),'/eventhubs/',parameters('eventHubName'), '/consumerGroups/', parameters('consumerGroupName'))]" | ||
], | ||
"properties": { | ||
"Rights": [ | ||
"Send" | ||
] | ||
} | ||
}, { | ||
"apiVersion": "[variables('ehVersion')]", | ||
"name": "[variables('listenPolicy')]", | ||
"type": "authorizationRules", | ||
"dependsOn": [ | ||
"[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'),'/eventhubs/',parameters('eventHubName'))]", | ||
"[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'),'/eventhubs/',parameters('eventHubName'), '/authorizationRules/', variables('managePolicy'))]", | ||
"[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'),'/eventhubs/',parameters('eventHubName'), '/authorizationRules/', variables('sendPolicy'))]", | ||
"[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'),'/eventhubs/',parameters('eventHubName'), '/consumerGroups/', parameters('consumerGroupName'))]" | ||
], | ||
"properties": { | ||
"Rights": [ | ||
"Listen" | ||
] | ||
} | ||
}] | ||
}] | ||
}], | ||
"outputs": { | ||
"NamespaceConnectionString": { | ||
"type": "string", | ||
"value": "[listkeys(variables('authRuleResourceId'), variables('ehVersion')).primaryConnectionString]" | ||
}, | ||
"SharedAccessPolicyPrimaryKey": { | ||
"type": "string", | ||
"value": "[listkeys(variables('authRuleResourceId'), variables('ehVersion')).primaryKey]" | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
301-eventHub-create-authrule-namespace-and-eventHub/azuredeploy.parameters.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"namespaceName": { | ||
"value": "GEN-UNIQUE" | ||
}, | ||
"eventHubName": { | ||
"value": "GEN-UNIQUE" | ||
}, | ||
"consumerGroupName": { | ||
"value": "GEN-UNIQUE" | ||
}, | ||
"apiVersion": { | ||
"value": "2015-08-01" | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
301-eventHub-create-authrule-namespace-and-eventHub/metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"itemDisplayName": "Create EventHubs authorizationRules", | ||
"description": "This template enables you to deploy a EventHubs Standard namespace, an Event Hub, a consumer group and authorizationRules", | ||
"summary": "This template creates a EventHubs namespace, an Event Hub, a consumer group and authorizationRules", | ||
"githubUsername": "sazeesha", | ||
"dateUpdated": "2016-08-18" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters