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.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ When you're finished, you see that the event data has been sent to the web app.
25
25
26
26
Event Grid topics are Azure resources, and must be placed in an Azure resource group. The resource group is a logical collection into which Azure resources are deployed and managed.
27
27
28
-
Create a resource group with the [az group create](/cli/azure/group#az-group-create) command. The following example creates a resource group named *gridResourceGroup* in the *westus2* location. If you click**Try it**, you'll see the Azure Cloud Shell window in the right pane. Then, click**Copy** to copy the command and paste it in the Azure Cloud Shell window, and press ENTER to run the command. Change the name of the resource group and the location if you like.
28
+
Create a resource group with the [az group create](/cli/azure/group#az-group-create) command. The following example creates a resource group named *gridResourceGroup* in the *westus2* location. If you select**Try it**, you'll see the Azure Cloud Shell window in the right pane. Then, select**Copy** to copy the command and paste it in the Azure Cloud Shell window, and press ENTER to run the command. Change the name of the resource group and the location if you like.
29
29
30
30
```azurecli-interactive
31
31
az group create --name gridResourceGroup --location westus2
@@ -35,7 +35,7 @@ az group create --name gridResourceGroup --location westus2
35
35
36
36
## Create a custom topic
37
37
38
-
An Event Grid topic provides a user-defined endpoint that you post your events to. The following example creates the custom topic in your resource group using Bash in Azure Cloud Shell. Replace `<your-topic-name>` with a unique name for your topic. The custom topic name must be unique because it's part of the DNS entry. Additionally, it must be between 3-50 characters and contain only values a-z, A-Z, 0-9, and "-"
38
+
An Event Grid topic provides a user-defined endpoint that you post your events to. The following example creates the custom topic in your resource group using Bash in Azure Cloud Shell. Replace `<your-topic-name>` with a unique name for your topic. The custom topic name must be unique because it's part of the Domain Name System (DNS) entry. Additionally, it must be between 3-50 characters and contain only values a-z, A-Z, 0-9, and "-"
39
39
40
40
1. Copy the following command, specify a name for the topic, and press ENTER to run the command.
41
41
@@ -50,7 +50,7 @@ An Event Grid topic provides a user-defined endpoint that you post your events t
50
50
51
51
## Create a message endpoint
52
52
53
-
Before subscribing to the custom topic, let's create the 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.
53
+
Before subscribing to the custom topic, let's create the endpoint for the event message. Typically, the endpoint takes actions based on the event data. To simplify this quickstart, you deploy a [prebuilt 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.
54
54
55
55
56
56
@@ -68,7 +68,7 @@ Before subscribing to the custom topic, let's create the endpoint for the event
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:
71
+
The deployment might 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:
72
72
`https://<your-site-name>.azurewebsites.net`
73
73
74
74
You should see the site with no messages currently displayed.
@@ -87,19 +87,19 @@ The endpoint for your web app must include the suffix `/api/updates/`.
87
87
2. Run the following command to get the resource ID of the topic you created.
88
88
89
89
```azurecli-interactive
90
-
topicresourceid=$(az eventgrid topic show --resource-group gridResourceGroup --name $topicname --query id)
1. Run the following command to create a subscription to the custom topic using the endpoint.
92
+
3. Run the following command to create a subscription to the custom topic using the endpoint.
93
93
```azurecli-interactive
94
94
az eventgrid event-subscription create \
95
95
--source-resource-id $topicresourceid \
96
96
--name demoViewerSub \
97
97
--endpoint $endpoint
98
98
```
99
99
100
-
View your web app again, and notice that a subscription validation event has been sent to it. Select the eye icon to expand the event data. Event Grid sends the validation event so the endpoint can verify that it wants to receive event data. The web app includes code to validate the subscription.
101
-
102
-

100
+
View your web app again, and notice that a subscription validation event has been sent to it. Select the eye icon to expand the event data. Event Grid sends the validation event so the endpoint can verify that it wants to receive event data. The web app includes code to validate the subscription.
101
+
102
+

0 commit comments