Skip to content

Commit c8e282c

Browse files
authored
Merge pull request #164359 from spelluru/egridfresh0701-2
Update custom event quick start
2 parents f1889eb + 6641f6e commit c8e282c

File tree

3 files changed

+36
-23
lines changed

3 files changed

+36
-23
lines changed

articles/event-grid/custom-event-quickstart-portal.md

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,34 @@
11
---
2-
title: 'Quickstart: Send custom events to web endpoint - Event Grid, Azure portal'
2+
title: 'Send custom events to web endpoint - Event Grid, Azure portal'
33
description: 'Quickstart: Use Azure Event Grid and Azure portal to publish a custom topic, and subscribe to events for that topic. The events are handled by a web application.'
4-
ms.date: 04/22/2021
4+
ms.date: 07/01/2021
55
ms.topic: quickstart
66
---
77

8-
# Quickstart: Route custom events to web endpoint with the Azure portal and Event Grid
8+
# Route custom events to web endpoint with the Azure portal and Event Grid
9+
Event Grid is a fully managed service that enables you to easily manage events across many different Azure services and applications. It simplifies building event-driven and serverless applications. For an overview of the service, see [Event Grid overview](overview.md).
10+
11+
In this article, you use the Azure portal to do the following tasks:
12+
13+
1. Create a custom topic.
14+
1. Subscribe to the custom topic.
15+
1. Trigger the event.
16+
1. View the result. Typically, you send events to an endpoint that processes the event data and takes actions. However, to simplify this article, you send the events to a web app that collects and displays the messages.
917

10-
Azure Event Grid is an eventing service for the cloud. In this article, you use the Azure portal to create a custom topic, subscribe to the custom topic, and trigger the event to view the result. Typically, you send events to an endpoint that processes the event data and takes actions. However, to simplify this article, you send the events to a web app that collects and displays the messages.
1118

1219
## Prerequisites
1320
[!INCLUDE [quickstarts-free-trial-note.md](../../includes/quickstarts-free-trial-note.md)]
1421

1522
[!INCLUDE [event-grid-register-provider-portal.md](../../includes/event-grid-register-provider-portal.md)]
1623

1724
## Create a custom topic
18-
1925
An event grid topic provides a user-defined endpoint that you post your events to.
2026

2127
1. Sign in to [Azure portal](https://portal.azure.com/).
2228
2. In the search bar at the topic, type **Event Grid Topics**, and then select **Event Grid Topics** from the drop-down list.
2329

2430
:::image type="content" source="./media/custom-event-quickstart-portal/select-event-grid-topics.png" alt-text="Search for and select Event Grid Topics":::
25-
3. On the **Event Grid Topics** page, select **+ Add** on the toolbar.
26-
27-
:::image type="content" source="./media/custom-event-quickstart-portal/add-event-grid-topic-button.png" alt-text="Add Event Grid Topic button":::
31+
3. On the **Event Grid Topics** page, select **+ Create** on the toolbar.
2832
4. On the **Create Topic** page, follow these steps:
2933
1. Select your Azure **subscription**.
3034
2. Select an existing resource group or select **Create new**, and enter a **name** for the **resource group**.
@@ -36,28 +40,37 @@ An event grid topic provides a user-defined endpoint that you post your events t
3640
6. On the **Review + create** tab of the **Create topic** page, select **Create**.
3741

3842
:::image type="content" source="./media/custom-event-quickstart-portal/review-create-page.png" alt-text="Review settings and create":::
39-
5. After the deployment succeeds, type **Event Grid Topics** in the search bar again, and select **Event Grid Topics** from the drop-down list as you did before.
40-
6. Select the topic you created from the list.
41-
42-
:::image type="content" source="./media/custom-event-quickstart-portal/select-event-grid-topic.png" alt-text="Select your topic from the list":::
43+
5. After the deployment succeeds, select **Go to resource** to navigate to the **Event Grid Topic** page for your topic. Keep this page open. You use it later in the quickstart.
4344

44-
7. You see the **Event Grid Topic** page for your topic. Keep this page open. You use it later in the quickstart.
45-
46-
:::image type="content" source="./media/custom-event-quickstart-portal/event-grid-topic-home-page.png" alt-text="Event Grid Topic home page":::
45+
:::image type="content" source="./media/custom-event-quickstart-portal/event-grid-topic-home-page.png" alt-text="Screenshot showing the Event Grid Topic home page":::
4746

4847
## Create a message endpoint
4948
Before you create a subscription for the custom topic, create an endpoint for the event message. Typically, the endpoint takes actions based on the event data. To simplify this quickstart, you deploy a [pre-built web app](https://github.com/Azure-Samples/azure-event-grid-viewer) that displays the event messages. The deployed solution includes an App Service plan, an App Service web app, and source code from GitHub.
5049

5150
1. In the article page, select **Deploy to Azure** to deploy the solution to your subscription. In the Azure portal, provide values for the parameters.
5251

5352
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure-Samples%2Fazure-event-grid-viewer%2Fmaster%2Fazuredeploy.json" target="_blank"><img src="https://azuredeploy.net/deploybutton.png" alt="Button to Deploy to Aquent." /></a>
54-
1. The deployment may take a few minutes to complete. After the deployment has succeeded, view your web app to make sure it's running. In a web browser, navigate to:
55-
`https://<your-site-name>.azurewebsites.net`
53+
2. On the **Custom deployment** page, do the following steps:
54+
1. For **Resource group**, select the resource group that you created when creating the storage account. It will be easier for you to clean up after you are done with the tutorial by deleting the resource group.
55+
2. For **Site Name**, enter a name for the web app.
56+
3. For **Hosting plan name**, enter a name for the App Service plan to use for hosting the web app.
57+
5. Select **Review + create**.
58+
59+
:::image type="content" source="./media/blob-event-quickstart-portal/template-deploy-parameters.png" alt-text="Screenshot showing the Custom deployment page.":::
60+
1. On the **Review + create** page, select **Create**.
61+
1. The deployment may take a few minutes to complete. Select Alerts (bell icon) in the portal, and then select **Go to resource group**.
62+
63+
![Alert - navigate to resource group.](./media/blob-event-quickstart-portal/navigate-resource-group.png)
64+
4. On the **Resource group** page, in the list of resources, select the web app that you created. You also see the App Service plan and the storage account in this list.
65+
66+
![Select web site.](./media/blob-event-quickstart-portal/resource-group-resources.png)
67+
5. On the **App Service** page for your web app, select the URL to navigate to the web site. The URL should be in this format: `https://<your-site-name>.azurewebsites.net`.
68+
69+
![Navigate to web site.](./media/blob-event-quickstart-portal/web-site.png)
5670

57-
If the deployment fails, check the error message. It may be because the web site name is already taken. Deploy the template again and choose a different name for the site.
58-
1. You see the site but no events have been posted to it yet.
71+
6. Confirm that you see the site but no events have been posted to it yet.
5972

60-
![View new site](./media/custom-event-quickstart-portal/view-site.png)
73+
![View new site.](./media/blob-event-quickstart-portal/view-site.png)
6174

6275
## Subscribe to custom topic
6376

@@ -100,7 +113,7 @@ The first example uses Azure CLI. It gets the URL and key for the custom topic,
100113
```azurecli
101114
endpoint=$(az eventgrid topic show --name <topic name> -g <resource group name> --query "endpoint" --output tsv)
102115
```
103-
2. Run the following command to get the **key** for the custom topic: After you copy and paste the command, update the **topic name** and **resource group** name before you run the command. It's the primary key of the Event Grid topic. To get this key from the Azure portal, switch to the **Access keys** tab of the **Event Grid Topic** page. To be able post an event to a custom topic, you need the access key.
116+
2. Run the following command to get the **key** for the custom topic: After you copy and paste the command, update the **topic name** and **resource group** name before you run the command. It's the primary key of the event grid topic. To get this key from the Azure portal, switch to the **Access keys** tab of the **Event Grid Topic** page. To be able post an event to a custom topic, you need the access key.
104117
105118
```azurecli
106119
key=$(az eventgrid topic key list --name <topic name> -g <resource group name> --query "key1" --output tsv)

articles/event-grid/custom-event-quickstart-powershell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 'Quickstart: Send custom events to web endpoint - Event Grid, PowerShell'
33
description: 'Quickstart: Use Azure Event Grid and PowerShell to publish a custom topic, and subscribe to events for that topic. The events are handled by a web application.'
4-
ms.date: 04/22/2021
4+
ms.date: 07/01/2021
55
ms.topic: quickstart
66
ms.custom: devx-track-azurepowershell
77
---

articles/event-grid/custom-event-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 'Quickstart: Send custom events with Event Grid and Azure CLI'
33
description: 'Quickstart Use Azure Event Grid and Azure CLI to publish a custom topic, and subscribe to events for that topic. The events are handled by a web application.'
4-
ms.date: 04/22/2021
4+
ms.date: 07/01/2021
55
ms.topic: quickstart
66
ms.custom: devx-track-azurecli
77
---

0 commit comments

Comments
 (0)