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.

186 lines
7.3 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. "GracePeriodSubscriptionName": "GracePeriod",
  18. "PaymentSubscriptionName": "Payment",
  19. "location": "[resourceGroup().location]",
  20. "sbVersion": "2015-08-01",
  21. "defaultSASKeyName": "Root",
  22. "namespace":"[concat(parameters('namespaceprefix'), uniqueString(resourceGroup().id))]",
  23. "authRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/topics/authorizationRules', variables('namespace'), variables('serviceBusTopicName'), variables('defaultSASKeyName'))]"
  24. },
  25. "resources": [
  26. {
  27. "apiVersion": "[variables('sbVersion')]",
  28. "name": "[variables('namespace')]",
  29. "type": "Microsoft.ServiceBus/Namespaces",
  30. "location": "[variables('location')]",
  31. "sku": {
  32. "name": "Standard",
  33. "tier": "Standard"
  34. },
  35. "resources": [
  36. {
  37. "apiVersion": "[variables('sbVersion')]",
  38. "name": "[variables('serviceBusTopicName')]",
  39. "type": "Topics",
  40. "dependsOn": [
  41. "[concat('Microsoft.ServiceBus/namespaces/', variables('namespace'))]"
  42. ],
  43. "properties": {
  44. "path": "[variables('serviceBusTopicName')]",
  45. "defaultMessageTimeToLive": "14.00:00:00",
  46. "maxSizeInMegabytes": 1024,
  47. "requiresDuplicateDetection": false,
  48. "enableBatchedOperations": true,
  49. "sizeInBytes": 0,
  50. "filteringMessagesBeforePublishing": false,
  51. "isAnonymousAccessible": false,
  52. "status": "Active",
  53. "supportOrdering": false,
  54. "autoDeleteOnIdle": "10675199.02:48:05.4775807",
  55. "enablePartitioning": true,
  56. "isExpress": false,
  57. "enableSubscriptionPartitioning": false,
  58. "enableExpress": false
  59. },
  60. "resources": [
  61. {
  62. "type": "AuthorizationRules",
  63. "name": "[variables('defaultSASKeyName')]",
  64. "apiVersion": "[variables('sbVersion')]",
  65. "properties": {
  66. "rights": [
  67. "Manage",
  68. "Send",
  69. "Listen"
  70. ]
  71. },
  72. "dependsOn": [
  73. "[variables('serviceBusTopicName')]"
  74. ]
  75. },
  76. {
  77. "apiVersion": "[variables('sbVersion')]",
  78. "name": "[variables('BasketSubscriptionName')]",
  79. "type": "Subscriptions",
  80. "dependsOn": [
  81. "[variables('serviceBusTopicName')]"
  82. ],
  83. "properties": {
  84. "lockDuration": "00:00:30",
  85. "requiresSession": false,
  86. "defaultMessageTimeToLive": "14.00:00:00",
  87. "deadLetteringOnMessageExpiration": true,
  88. "deadLetteringOnFilterEvaluationExceptions": true,
  89. "maxDeliveryCount": 10,
  90. "enableBatchedOperations": false,
  91. "status": "Active",
  92. "autoDeleteOnIdle": "10675199.02:48:05.4775807",
  93. "entityAvailabilityStatus": "Available"
  94. }
  95. },
  96. {
  97. "apiVersion": "[variables('sbVersion')]",
  98. "name": "[variables('OrderingSubscriptionName')]",
  99. "type": "Subscriptions",
  100. "dependsOn": [
  101. "[variables('serviceBusTopicName')]"
  102. ],
  103. "properties": {
  104. "lockDuration": "00:00:30",
  105. "requiresSession": false,
  106. "defaultMessageTimeToLive": "14.00:00:00",
  107. "deadLetteringOnMessageExpiration": true,
  108. "deadLetteringOnFilterEvaluationExceptions": true,
  109. "maxDeliveryCount": 10,
  110. "enableBatchedOperations": false,
  111. "status": "Active",
  112. "autoDeleteOnIdle": "10675199.02:48:05.4775807",
  113. "entityAvailabilityStatus": "Available"
  114. }
  115. },
  116. {
  117. "apiVersion": "[variables('sbVersion')]",
  118. "name": "[variables('CatalogSubscriptionName')]",
  119. "type": "Subscriptions",
  120. "dependsOn": [
  121. "[variables('serviceBusTopicName')]"
  122. ],
  123. "properties": {
  124. "lockDuration": "00:00:30",
  125. "requiresSession": false,
  126. "defaultMessageTimeToLive": "14.00:00:00",
  127. "deadLetteringOnMessageExpiration": true,
  128. "deadLetteringOnFilterEvaluationExceptions": true,
  129. "maxDeliveryCount": 10,
  130. "enableBatchedOperations": false,
  131. "status": "Active",
  132. "autoDeleteOnIdle": "10675199.02:48:05.4775807",
  133. "entityAvailabilityStatus": "Available"
  134. }
  135. },
  136. {
  137. "apiVersion": "[variables('sbVersion')]",
  138. "name": "[variables('GracePeriodSubscriptionName')]",
  139. "type": "Subscriptions",
  140. "dependsOn": [
  141. "[variables('serviceBusTopicName')]"
  142. ],
  143. "properties": {
  144. "lockDuration": "00:00:30",
  145. "requiresSession": false,
  146. "defaultMessageTimeToLive": "14.00:00:00",
  147. "deadLetteringOnMessageExpiration": true,
  148. "deadLetteringOnFilterEvaluationExceptions": true,
  149. "maxDeliveryCount": 10,
  150. "enableBatchedOperations": false,
  151. "status": "Active",
  152. "autoDeleteOnIdle": "10675199.02:48:05.4775807",
  153. "entityAvailabilityStatus": "Available"
  154. }
  155. },
  156. {
  157. "apiVersion": "[variables('sbVersion')]",
  158. "name": "[variables('PaymentSubscriptionName')]",
  159. "type": "Subscriptions",
  160. "dependsOn": [
  161. "[variables('serviceBusTopicName')]"
  162. ],
  163. "properties": {
  164. "lockDuration": "00:00:30",
  165. "requiresSession": false,
  166. "defaultMessageTimeToLive": "14.00:00:00",
  167. "deadLetteringOnMessageExpiration": true,
  168. "deadLetteringOnFilterEvaluationExceptions": true,
  169. "maxDeliveryCount": 10,
  170. "enableBatchedOperations": false,
  171. "status": "Active",
  172. "autoDeleteOnIdle": "10675199.02:48:05.4775807",
  173. "entityAvailabilityStatus": "Available"
  174. }
  175. }
  176. ]
  177. }
  178. ]
  179. }
  180. ],
  181. "outputs": {
  182. "NamespaceConnectionString": {
  183. "type": "string",
  184. "value": "[listkeys(variables('authRuleResourceId'), variables('sbVersion')).primaryConnectionString]"
  185. }
  186. }
  187. }