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
1. To subscribe to events, create either a general-purpose v2 storage account or a Blob storage account. For more information, see [Create a storage account](../storage/common/storage-account-create.md).
33
+
To subscribe to events, create either a general-purpose v2 storage account or a Blob storage account.
34
+
35
+
1. On the **Create storage account** page, do the following steps:
36
+
1. Select your Azure subscription.
37
+
2. For **Resource group**, create a new resource group or select an existing one.
5. On the **Review + create** page, review the settings, and select **Create**.
38
43
39
-
>[!NOTE]
40
-
> Only storage accounts of kind **StorageV2 (general purpose v2)** and **BlobStorage** support event integration. **Storage (genral purpose v1)** does *not* support integration with Event Grid.
44
+
>[!NOTE]
45
+
> Only storage accounts of kind **StorageV2 (general purpose v2)** and **BlobStorage** support event integration. **Storage (genral purpose v1)** does *not* support integration with Event Grid.
41
46
42
47
## Create a message endpoint
43
48
44
49
Before subscribing to the events for the Blob storage, 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.
45
50
46
-
1. Select **Deploy to Azure** to deploy the solution to your subscription. In the Azure portal, provide values for the parameters.
51
+
1. Select **Deploy to Azure** to deploy the solution to your subscription.
2. On the **Custom deployment** page, do the following steps:
55
+
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.
56
+
2. For **Site Name**, enter a name for the web app.
57
+
3. For **Hosting plan name**, enter a name for the App Service plan to use for hosting the web app.
58
+
4. Select the check box for **I agree to the terms and conditions stated above**.
1. The deployment may take a few minutes to complete. Select Alerts (bell icon) in the portal, and then select **Go to resource group**.
49
63
50
-
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:
51
-
`https://<your-site-name>.azurewebsites.net`
64
+

65
+
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.
52
66
53
-
1. You see the site but no events have been posted to it yet.
67
+

68
+
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`.
69
+
70
+

71
+
72
+
6. Confirm that you see the site but no events have been posted to it yet.
54
73
55
74

56
75
@@ -60,15 +79,20 @@ Before subscribing to the events for the Blob storage, let's create the endpoint
60
79
61
80
You subscribe to a topic to tell Event Grid which events you want to track, and where to send the events.
62
81
63
-
1. In the portal, select your blob storage and select **Events**.
1. To send events to your viewer app, use a web hook for the endpoint. Select **More Options**, and **Web Hook**.
82
+
1. In the portal, navigate to your Azure Storage account that you created earlier. On the left menu, select **All resources** and select your storage account.
83
+
2. On the **Storage account** page, select **Events** on the left menu.
84
+
1. Select **More Options**, and **Web Hook**. You are sending events to your viewer app using a web hook for the endpoint.
68
85
69
86

87
+
3. On the **Create Event Subscription** page, do the following steps:
88
+
1. Enter a **name** for the event subscription.
89
+
2. Select **Web Hook** for **Endpoint type**.
90
+
91
+

92
+
4. For **Endpoint**, click **Select an endpoint**, and enter the URL of your web app and add `api/updates` to the home page URL (for example: `https://spegridsite.azurewebsites.net/api/updates`), and then select **Confirm Selection**.
70
93
71
-
1. The event subscription is prefilled with values for your Blob storage. For the web hook endpoint, provide the URL of your web app and add `api/updates` to the home page URL. Give your subscription a name. When done, select **Create**.
@@ -82,51 +106,27 @@ Now, let's trigger an event to see how Event Grid distributes the message to you
82
106
83
107
You trigger an event for the Blob storage by uploading a file. The file doesn't need any specific content. The articles assumes you have a file named testfile.txt, but you can use any file.
84
108
85
-
1.For your Blob storage, select **Blobs**.
109
+
1.In the Azure portal, navigate to your Blob storage account, and select **Containers** on the **Overview** page.
1. To upload a file, select **Upload**. On the **Upload blob** page, browse and select a file that you want to upload for testing, and then select **Upload** on that page.
1. You've triggered the event, and Event Grid sent the message to the endpoint you configured when subscribing. The message is in the JSON format and it contains an array with one or more events. In the following example, the JSON message contains an array with one event. View your web app and notice that a blob created event was received.
1. You've triggered the event, and Event Grid sent the message to the endpoint you configured when subscribing. The message is in the JSON format and it contains an array with one or more events. In the following example, the JSON message contains an array with one event. View your web app and notice that a **blob created** event was received.
128
+
129
+

0 commit comments