You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
5.5 KiB

  1. {
  2. "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
  3. "contentVersion": "1.0.0.0",
  4. "parameters": {
  5. "namespaceprefix": {
  6. "type": "string",
  7. "metadata": {
  8. "description": "Name of the Service Bus namespace"
  9. }
  10. }
  11. },
  12. "variables": {
  13. "serviceBusTopicName": "eshop_event_bus",
  14. "BasketSubscriptionName": "Basket",
  15. "CatalogSubscriptionName": "Catalog",
  16. "OrderingSubscriptionName": "Ordering",
  17. "location": "[resourceGroup().location]",
  18. "sbVersion": "2015-08-01",
  19. "defaultSASKeyName": "Root",
  20. "namespace":"[concat(parameters('namespaceprefix'), uniqueString(resourceGroup().id))]",
  21. "authRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/topics/authorizationRules', variables('namespace'), variables('serviceBusTopicName'), variables('defaultSASKeyName'))]"
  22. },
  23. "resources": [
  24. {
  25. "apiVersion": "[variables('sbVersion')]",
  26. "name": "[variables('namespace')]",
  27. "type": "Microsoft.ServiceBus/Namespaces",
  28. "location": "[variables('location')]",
  29. "sku": {
  30. "name": "Standard",
  31. "tier": "Standard"
  32. },
  33. "resources": [
  34. {
  35. "apiVersion": "[variables('sbVersion')]",
  36. "name": "[variables('serviceBusTopicName')]",
  37. "type": "Topics",
  38. "dependsOn": [
  39. "[concat('Microsoft.ServiceBus/namespaces/', variables('namespace'))]"
  40. ],
  41. "properties": {
  42. "path": "[variables('serviceBusTopicName')]",
  43. "defaultMessageTimeToLive": "14.00:00:00",
  44. "maxSizeInMegabytes": 1024,
  45. "requiresDuplicateDetection": false,
  46. "enableBatchedOperations": true,
  47. "sizeInBytes": 0,
  48. "filteringMessagesBeforePublishing": false,
  49. "isAnonymousAccessible": false,
  50. "status": "Active",
  51. "supportOrdering": false,
  52. "autoDeleteOnIdle": "10675199.02:48:05.4775807",
  53. "enablePartitioning": true,
  54. "isExpress": false,
  55. "enableSubscriptionPartitioning": false,
  56. "enableExpress": false
  57. },
  58. "resources": [
  59. {
  60. "type": "AuthorizationRules",
  61. "name": "[variables('defaultSASKeyName')]",
  62. "apiVersion": "[variables('sbVersion')]",
  63. "properties": {
  64. "rights": [
  65. "Manage",
  66. "Send",
  67. "Listen"
  68. ]
  69. },
  70. "dependsOn": [
  71. "[variables('serviceBusTopicName')]"
  72. ]
  73. },
  74. {
  75. "apiVersion": "[variables('sbVersion')]",
  76. "name": "[variables('BasketSubscriptionName')]",
  77. "type": "Subscriptions",
  78. "dependsOn": [
  79. "[variables('serviceBusTopicName')]"
  80. ],
  81. "properties": {
  82. "lockDuration": "00:00:30",
  83. "requiresSession": false,
  84. "defaultMessageTimeToLive": "14.00:00:00",
  85. "deadLetteringOnMessageExpiration": true,
  86. "deadLetteringOnFilterEvaluationExceptions": true,
  87. "maxDeliveryCount": 10,
  88. "enableBatchedOperations": false,
  89. "status": "Active",
  90. "autoDeleteOnIdle": "10675199.02:48:05.4775807",
  91. "entityAvailabilityStatus": "Available"
  92. }
  93. },
  94. {
  95. "apiVersion": "[variables('sbVersion')]",
  96. "name": "[variables('OrderingSubscriptionName')]",
  97. "type": "Subscriptions",
  98. "dependsOn": [
  99. "[variables('serviceBusTopicName')]"
  100. ],
  101. "properties": {
  102. "lockDuration": "00:00:30",
  103. "requiresSession": false,
  104. "defaultMessageTimeToLive": "14.00:00:00",
  105. "deadLetteringOnMessageExpiration": true,
  106. "deadLetteringOnFilterEvaluationExceptions": true,
  107. "maxDeliveryCount": 10,
  108. "enableBatchedOperations": false,
  109. "status": "Active",
  110. "autoDeleteOnIdle": "10675199.02:48:05.4775807",
  111. "entityAvailabilityStatus": "Available"
  112. }
  113. },
  114. {
  115. "apiVersion": "[variables('sbVersion')]",
  116. "name": "[variables('CatalogSubscriptionName')]",
  117. "type": "Subscriptions",
  118. "dependsOn": [
  119. "[variables('serviceBusTopicName')]"
  120. ],
  121. "properties": {
  122. "lockDuration": "00:00:30",
  123. "requiresSession": false,
  124. "defaultMessageTimeToLive": "14.00:00:00",
  125. "deadLetteringOnMessageExpiration": true,
  126. "deadLetteringOnFilterEvaluationExceptions": true,
  127. "maxDeliveryCount": 10,
  128. "enableBatchedOperations": false,
  129. "status": "Active",
  130. "autoDeleteOnIdle": "10675199.02:48:05.4775807",
  131. "entityAvailabilityStatus": "Available"
  132. }
  133. }
  134. ]
  135. }
  136. ]
  137. }
  138. ],
  139. "outputs": {
  140. "NamespaceConnectionString": {
  141. "type": "string",
  142. "value": "[listkeys(variables('authRuleResourceId'), variables('sbVersion')).primaryConnectionString]"
  143. }
  144. }
  145. }