title | description | services | documentationcenter | author | ms.service | ms.devlang | ms.topic | ms.tgt_pltfrm | ms.workload | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|
Azure CLI script sample - Subscribe to custom topic | Microsoft Docs |
Azure CLI Script Sample - Subscribe to custom topic |
event-grid |
na |
tfitzmac |
event-grid |
azurecli |
sample |
na |
na |
11/02/2018 |
tomfitz |
This script creates an Event Grid subscription to the events for a custom topic.
[!INCLUDE sample-cli-install]
[!INCLUDE quickstarts-free-trial-note]
The preview sample script requires the Event Grid extension. To install, run az extension add --name eventgrid
.
[!code-azureclimain]
[!code-azureclimain]
This script uses the following command to create the event subscription. Each command in the table links to command-specific documentation.
Command | Notes |
---|---|
az eventgrid event-subscription create | Create an Event Grid subscription. |
az eventgrid event-subscription create - extension version | Create an Event Grid subscription. |
- For information about querying subscriptions, see Query Event Grid subscriptions.
- For more information on the Azure CLI, see Azure CLI documentation.