1
+ @description ('The location for the resource(s) to be deployed.' )
2
+ param location string = resourceGroup ().location
3
+
4
+ param sku string = 'Standard'
5
+
6
+ param principalType string
7
+
8
+ param principalId string
9
+
10
+ resource sbemulator 'Microsoft.ServiceBus/namespaces@2024-01-01' = {
11
+ name : take ('sbemulator-${uniqueString (resourceGroup ().id )}' , 50 )
12
+ location : location
13
+ properties : {
14
+ disableLocalAuth : true
15
+ }
16
+ sku : {
17
+ name : sku
18
+ }
19
+ tags : {
20
+ 'aspire-resource-name' : 'sbemulator'
21
+ }
22
+ }
23
+
24
+ resource sbemulator_AzureServiceBusDataOwner 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
25
+ name : guid (sbemulator .id , principalId , subscriptionResourceId ('Microsoft.Authorization/roleDefinitions' , '090c5cfd-751d-490a-894a-3ce6f1109419' ))
26
+ properties : {
27
+ principalId : principalId
28
+ roleDefinitionId : subscriptionResourceId ('Microsoft.Authorization/roleDefinitions' , '090c5cfd-751d-490a-894a-3ce6f1109419' )
29
+ principalType : principalType
30
+ }
31
+ scope : sbemulator
32
+ }
33
+
34
+ resource queue1 'Microsoft.ServiceBus/namespaces/queues@2024-01-01' = {
35
+ name : 'queue1'
36
+ properties : {
37
+ deadLetteringOnMessageExpiration : false
38
+ }
39
+ parent : sbemulator
40
+ }
41
+
42
+ resource topic1 'Microsoft.ServiceBus/namespaces/topics@2024-01-01' = {
43
+ name : 'topic1'
44
+ parent : sbemulator
45
+ }
46
+
47
+ resource sub1 'Microsoft.ServiceBus/namespaces/topics/subscriptions@2024-01-01' = {
48
+ name : 'sub1'
49
+ properties : {
50
+ maxDeliveryCount : 10
51
+ }
52
+ parent : topic1
53
+ }
54
+
55
+ resource app_prop_filter_1 'Microsoft.ServiceBus/namespaces/topics/subscriptions/rules@2024-01-01' = {
56
+ name : 'app-prop-filter-1'
57
+ properties : {
58
+ correlationFilter : {
59
+ correlationId : 'id1'
60
+ messageId : 'msgid1'
61
+ to : 'xyz'
62
+ replyTo : 'someQueue'
63
+ label : 'subject1'
64
+ sessionId : 'session1'
65
+ replyToSessionId : 'sessionId'
66
+ contentType : 'application/text'
67
+ }
68
+ filterType : 'CorrelationFilter'
69
+ }
70
+ parent : sub1
71
+ }
72
+
73
+ output serviceBusEndpoint string = sbemulator .properties .serviceBusEndpoint
0 commit comments