Skip to content

Commit e236fc8

Browse files
authored
Merge pull request #113750 from jayendranarumugam/jayendranarumugam-patch-1
Fix the Eventhub Param
2 parents 3feeec6 + 3962d8d commit e236fc8

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

articles/api-management/api-management-howto-log-event-hubs.md

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Use the API Management [REST API](/rest/api/apimanagement/current-preview/logger
126126
"loggerType": "azureEventHub",
127127
"description": "adding a new logger with system assigned managed identity",
128128
"credentials": {
129-
"endpointAddress":"<EventHubsNamespace>.servicebus.windows.net/<EventHubName>",
129+
"endpointAddress":"<EventHubsNamespace>.servicebus.windows.net",
130130
"identityClientId":"SystemAssigned",
131131
"name":"<EventHubName>"
132132
}
@@ -147,9 +147,9 @@ resource ehLoggerWithSystemAssignedIdentity 'Microsoft.ApiManagement/service/log
147147
loggerType: 'azureEventHub'
148148
description: 'Event hub logger with system-assigned managed identity'
149149
credentials: {
150-
endpointAddress: '<EventHubsNamespace>.servicebus.windows.net/<EventHubName>'
150+
endpointAddress: '<EventHubsNamespace>.servicebus.windows.net'
151151
identityClientId: 'systemAssigned'
152-
name: 'ApimEventHub'
152+
name: '<EventHubName>'
153153
}
154154
}
155155
}
@@ -169,9 +169,9 @@ Include a JSON snippet similar to the following in your Azure Resource Manager t
169169
"description": "Event hub logger with system-assigned managed identity",
170170
"resourceId": "<EventHubsResourceID>",
171171
"credentials": {
172-
"endpointAddress": "<EventHubsNamespace>.servicebus.windows.net/<EventHubName>",
172+
"endpointAddress": "<EventHubsNamespace>.servicebus.windows.net",
173173
"identityClientId": "SystemAssigned",
174-
"name": "ApimEventHub"
174+
"name": "<EventHubName>"
175175
},
176176
}
177177
}
@@ -181,10 +181,25 @@ Include a JSON snippet similar to the following in your Azure Resource Manager t
181181

182182
For prerequisites, see [Configure API Management managed identity](#option-2-configure-api-management-managed-identity).
183183

184-
#### [PowerShell](#tab/PowerShell)
184+
#### [REST API](#tab/PowerShell)
185185

186186
Use the API Management [REST API](/rest/api/apimanagement/current-preview/logger/create-or-update) or a Bicep or ARM template to configure a logger to an event hub with user-assigned managed identity credentials.
187187

188+
```JSON
189+
{
190+
"properties": {
191+
"loggerType": "azureEventHub",
192+
"description": "adding a new logger with system assigned managed identity",
193+
"credentials": {
194+
"endpointAddress":"<EventHubsNamespace>.servicebus.windows.net",
195+
"identityClientId":"<ClientID>",
196+
"name":"<EventHubName>"
197+
}
198+
}
199+
}
200+
201+
```
202+
188203
#### [Bicep](#tab/bicep)
189204

190205
Include a snippet similar the following in your Bicep template.
@@ -197,9 +212,9 @@ resource ehLoggerWithUserAssignedIdentity 'Microsoft.ApiManagement/service/logge
197212
loggerType: 'azureEventHub'
198213
description: 'Event hub logger with user-assigned managed identity'
199214
credentials: {
200-
endpointAddress: '<EventHubsNamespace>.servicebus.windows.net/<EventHubName>'
215+
endpointAddress: '<EventHubsNamespace>.servicebus.windows.net'
201216
identityClientId: '<ClientID>'
202-
name: 'ApimEventHub'
217+
name: '<EventHubName>'
203218
}
204219
}
205220
}
@@ -219,9 +234,9 @@ Include a JSON snippet similar to the following in your Azure Resource Manager t
219234
"description": "Event hub logger with user-assigned managed identity",
220235
"resourceId": "<EventHubsResourceID>",
221236
"credentials": {
222-
"endpointAddress": "<EventHubsNamespace>.servicebus.windows.net/<EventHubName>",
237+
"endpointAddress": "<EventHubsNamespace>.servicebus.windows.net",
223238
"identityClientId": "<ClientID>",
224-
"name": "ApimEventHub"
239+
"name": "<EventHubName>"
225240
},
226241
}
227242
}

0 commit comments

Comments
 (0)