Skip to content

Commit 9dbfe53

Browse files
committed
fixed the CLI command
1 parent f42a15c commit 9dbfe53

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

articles/service-bus-messaging/service-bus-to-event-grid-integration-concept.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,15 @@ Execute the following code:
142142
```azurecli-interactive
143143
az login
144144
145-
az account set -s “THE SUBSCRIPTION YOU WANT TO USE”
145+
az account set -s "<Azure subscription name>"
146146
147-
$namespaceid=(az resource show --namespace Microsoft.ServiceBus --resource-type namespaces --name “<yourNamespace>“--resource-group “<Your Resource Group Name>” --query id --output tsv)
147+
namespaceid=$(az resource show --namespace Microsoft.ServiceBus --resource-type namespaces --name "<service bus namespace>" --resource-group "<resource group that contains the service bus namespace>" --query id --output tsv
148148
149-
az eventgrid event-subscription create --resource-id $namespaceid --name <YOUR EVENT GRID SUBSCRIPTION NAME (CAN BE ANY NOT EXISTING)> --endpoint <your_function_url> --subject-ends-with <YOUR SERVICE BUS SUBSCRIPTION NAME>
149+
az eventgrid event-subscription create --resource-id $namespaceid --name "<YOUR EVENT GRID SUBSCRIPTION NAME (CAN BE ANY NOT EXISTING)>" --endpoint "<your_function_url>" --subject-ends-with "<YOUR SERVICE BUS SUBSCRIPTION NAME>"
150150
```
151151

152+
If you are using BASH
153+
152154
## PowerShell instructions
153155

154156
Make sure you have Azure PowerShell installed. [Download the installer](https://docs.microsoft.com/powershell/azure/install-Az-ps). Select **Windows + X**, and then open a new PowerShell console with Administrator permissions. Alternatively, you can use a command shell within the Azure portal.
@@ -164,7 +166,7 @@ Install-Module Az.ServiceBus
164166
$NSID = (Get-AzServiceBusNamespace -ResourceGroupName "<YOUR RESOURCE GROUP NAME>" -Na
165167
mespaceName "<YOUR NAMESPACE NAME>").Id
166168
167-
New-AzEVentGridSubscription -EventSubscriptionName <YOUR EVENT GRID SUBSCRIPTION NAME (CAN BE ANY NOT EXISTING)> -ResourceId $NSID -Endpoint "<YOUR FUNCTION URL>” -SubjectEndsWith <YOUR SERVICE BUS SUBSCRIPTION NAME>
169+
New-AzEVentGridSubscription -EventSubscriptionName "<YOUR EVENT GRID SUBSCRIPTION NAME (CAN BE ANY NOT EXISTING)>" -ResourceId $NSID -Endpoint "<YOUR FUNCTION URL>” -SubjectEndsWith "<YOUR SERVICE BUS SUBSCRIPTION NAME>"
168170
```
169171

170172
From here, you can explore the other setup options or test that events are flowing.

0 commit comments

Comments
 (0)