Skip to content

Commit 5faeb01

Browse files
authored
Merge pull request #79526 from spelluru/egridcliext0613
Extension
2 parents d4caaf4 + 421b940 commit 5faeb01

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

articles/event-grid/event-handlers.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,45 @@ Use Service Bus as an event handler to route your events in Event Grid directly
7474

7575
Please note, while Service Bus as a handler is in public preview, you must install the CLI or PowerShell extension when using those to create event subscriptions.
7676

77-
### Using CLI
77+
### Install extension for Azure CLI
7878

79-
For Azure CLI, the following example subscribes a connects and Event Grid topic to a Service Bus queue:
79+
For Azure CLI, you need the [Event Grid extension](/cli/azure/azure-cli-extensions-list).
80+
81+
In [CloudShell](/azure/cloud-shell/quickstart):
82+
83+
* If you've installed the extension previously, update it with `az extension update -n eventgrid`.
84+
* If you haven't installed the extension previously, install it by using `az extension add -n eventgrid`.
85+
86+
For a local installation:
87+
88+
1. [Install the Azure CLI](/cli/azure/install-azure-cli). Make sure that you have the latest version, by checking with `az --version`.
89+
1. Uninstall previous versions of the extension with `az extension remove -n eventgrid`.
90+
1. Install the `eventgrid` extension with `az extension add -n eventgrid`.
91+
92+
### Install module for PowerShell
93+
94+
For PowerShell, you need the [AzureRM.EventGrid module](https://www.powershellgallery.com/packages/AzureRM.EventGrid/0.4.1-preview).
95+
96+
In [CloudShell](/azure/cloud-shell/quickstart-powershell):
97+
98+
* Install the module with `Install-Module -Name AzureRM.EventGrid -AllowPrerelease -Force -Repository PSGallery`.
99+
100+
For a local installation:
101+
102+
1. Open PowerShell console as administrator.
103+
1. Install the module with `Install-Module -Name AzureRM.EventGrid -AllowPrerelease -Force -Repository PSGallery`.
104+
105+
If the `-AllowPrerelease` parameter isn't available, use the following steps:
106+
107+
1. Run `Install-Module PowerShellGet -Force`.
108+
1. Run `Update-Module PowerShellGet`.
109+
1. Close the PowerShell console.
110+
1. Restart PowerShell as administrator.
111+
1. Install the module `Install-Module -Name AzureRM.EventGrid -AllowPrerelease -Force -Repository PSGallery`.
112+
113+
### Using CLI to add a Service Bus handler
114+
115+
For Azure CLI, the following example subscribes and connects an Event Grid topic to a Service Bus queue:
80116

81117
```azurecli-interactive
82118
# If you haven't already installed the extension, do it now.

0 commit comments

Comments
 (0)