You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/event-grid/custom-event-quickstart-portal.md
+34-21Lines changed: 34 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,34 @@
1
1
---
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'
3
3
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
5
5
ms.topic: quickstart
6
6
---
7
7
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.
9
17
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.
An event grid topic provides a user-defined endpoint that you post your events to.
20
26
21
27
1. Sign in to [Azure portal](https://portal.azure.com/).
22
28
2. In the search bar at the topic, type **Event Grid Topics**, and then select **Event Grid Topics** from the drop-down list.
23
29
24
30
:::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.
3. On the **Event Grid Topics** page, select **+ Create** on the toolbar.
28
32
4. On the **Create Topic** page, follow these steps:
29
33
1. Select your Azure **subscription**.
30
34
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
36
40
6. On the **Review + create** tab of the **Create topic** page, select **Create**.
37
41
38
42
:::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.
43
44
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":::
47
46
48
47
## Create a message endpoint
49
48
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.
50
49
51
50
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.
52
51
53
52
<ahref="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"><imgsrc="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
+

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
+

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
+

56
70
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.
59
72
60
-

73
+

61
74
62
75
## Subscribe to custom topic
63
76
@@ -100,7 +113,7 @@ The first example uses Azure CLI. It gets the URL and key for the custom topic,
100
113
```azurecli
101
114
endpoint=$(az eventgrid topic show --name <topic name> -g <resource group name> --query "endpoint" --output tsv)
102
115
```
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.
104
117
105
118
```azurecli
106
119
key=$(az eventgrid topic key list --name <topic name> -g <resource group name> --query "key1" --output tsv)
Copy file name to clipboardExpand all lines: articles/event-grid/custom-event-quickstart-powershell.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: 'Quickstart: Send custom events to web endpoint - Event Grid, PowerShell'
3
3
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.'
Copy file name to clipboardExpand all lines: articles/event-grid/custom-event-quickstart.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: 'Quickstart: Send custom events with Event Grid and Azure CLI'
3
3
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.'
0 commit comments