Skip to content

Commit aca0212

Browse files
Merge pull request #260904 from spelluru/egridfreshness1211
Freshness review & update - Event Grid quickstart
2 parents 1b5172a + e16373a commit aca0212

17 files changed

+28
-25
lines changed

articles/event-grid/custom-event-to-function.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ms.devlang: azurecli
1818
1. Sign in to the [Azure portal](https://portal.azure.com).
1919
1. On the left navigational menu, select **All services**.
2020
1. Select **Compute** in the list of **Categories**.
21-
1. Hover (not select) the mouse over **Function App**, and select **Create**.
21+
1. Hover (not select) the mouse over **Function App**, and select **+**.
2222

2323
:::image type="content" source="./media/custom-event-to-function/create-function-app-link.png" lightbox="./media/custom-event-to-function/create-function-app-link.png" alt-text="Screenshot showing the select of Create link for a Function App.":::
2424
1. On the **Basics** page of the **Create Function App** wizard, follow these steps:
@@ -27,35 +27,30 @@ ms.devlang: azurecli
2727
1. Specify a **name** for the function app.
2828
1. Select **.NET** for **Runtime stack**.
2929
1. Select the **region** closest to you.
30-
1. Select **Next: Hosting** at the bottom of the page.
30+
1. Select **Next: Storage** at the bottom of the page.
3131

3232
:::image type="content" source="./media/custom-event-to-function/create-function-app-page.png" alt-text="Screenshot showing the Basics tab of the Create Function App page.":::
33-
1. On the **Hosting** page, create a new storage account or select an existing storage account to be associated with the function app, and then select **Review + create** at the bottom of the page.
33+
1. On the **Storage** page, create a new storage account or select an existing storage account to be associated with the function app, and then select **Review + create** at the bottom of the page.
3434

35-
:::image type="content" source="./media/custom-event-to-function/create-function-app-hosting-page.png" alt-text="Screenshot showing the Hosting tab of the Create Function App page.":::
35+
:::image type="content" source="./media/custom-event-to-function/create-function-app-hosting-page.png" alt-text="Screenshot showing the Storage tab of the Create Function App page.":::
3636
1. On the **Review + create** page, review settings, and select **Create** at the bottom of the page to create the function app.
3737
1. Once the deployment is successful, select **Go to resource** to navigate to the home page for the function app.
3838

3939
## Create a function
4040
Before subscribing to the custom topic, create a function to handle the events.
4141

42-
1. On the **Function App** page, select **Functions** on the left menu.
43-
1. Select **+ Create** on the toolbar to create a function.
42+
1. On the **Function App** page, select **Create in Azure portal** link in the right pane.
4443

4544
:::image type="content" source="./media/custom-event-to-function/create-function-link.png" alt-text="Screenshot showing the selection of Create function link.":::
4645

4746
1. On the **Create Function** page, follow these steps:
48-
1. This step is optional. For **Development environment**, select the development environment that you want to use to work with the function code.
4947
1. In the **Select a template** section, in the filter or search box, type **Azure Event Grid trigger**.
5048
1. Select **Azure Event Grid Trigger** template in the template list.
5149
1. In the **Template details** section in the bottom pane, enter a name for the function. In this example, it's **HandleEventsFunc**.
5250
1. Select **Create**.
5351

5452
:::image type="content" source="./media/custom-event-to-function/function-trigger.png" lightbox="./media/custom-event-to-function/function-trigger.png" alt-text="Screenshot showing select Event Grid trigger.":::
55-
4. On the **Function** page for the **HandleEventsFunc**, select **Code + Test** on the left navigational menu.
56-
57-
:::image type="content" source="./media/custom-event-to-function/function-code-test-menu.png" alt-text="Image showing the selection Code + Test menu for an Azure function.":::
58-
5. Replace the code with the following code.
53+
4. On the **Function** page for the **HandleEventsFunc**, select **Code + Test** on the left navigational menu, replace the code with the following code, and then select **Save** on the command bar.
5954

6055
```csharp
6156
#r "Azure.Messaging.EventGrid"
@@ -69,11 +64,11 @@ Before subscribing to the custom topic, create a function to handle the events.
6964
log.LogInformation(eventGridEvent.Data.ToString());
7065
}
7166
```
72-
:::image type="content" source="./media/custom-event-to-function/function-updated-code.png" alt-text="Screenshot showing the Code + Test view of an Azure function with the updated code.":::
73-
6. Select **Monitor** on the left menu, and then select **Logs**.
7467

75-
:::image type="content" source="./media/custom-event-to-function/monitor-page.png" alt-text="Screenshot showing the Monitor view the Azure function.":::
76-
7. Keep this window or tab of the browser open so that you can see the received event information.
68+
:::image type="content" source="./media/custom-event-to-function/function-code-test-menu.png" alt-text="Image showing the selection Code + Test menu for an Azure function.":::
69+
6. Select **Monitor** on the left menu, and keep this window or tab of the browser open so that you can see the received event information.
70+
71+
:::image type="content" source="./media/custom-event-to-function/monitor-page.png" alt-text="Screenshot showing the Monitor view the Azure function.":::
7772

7873
## Create a custom topic
7974

@@ -93,7 +88,7 @@ An Event Grid topic provides a user-defined endpoint that you post your events t
9388
4. Select a **location** for the Event Grid topic.
9489
5. Select **Review + create**.
9590

96-
:::image type="content" source="./media/custom-event-to-function/create-custom-topic.png" alt-text="Image showing the Create Topic page.":::
91+
:::image type="content" source="./media/custom-event-to-function/create-custom-topic.png" alt-text="Screenshot showing the Create Topic page.":::
9792
1. On the **Review + create** page, review settings and select **Create**.
9893
5. After the custom topic has been created, select **Go to resource** link to see the following Event Grid topic page for the topic you created.
9994

@@ -109,7 +104,7 @@ You subscribe to an Event Grid topic to tell Event Grid which events you want to
109104
2. On the **Create Event Subscription** page, follow these steps:
110105
1. Enter a **name** for the event subscription.
111106
3. Select **Azure Function** for the **Endpoint type**.
112-
4. Choose **Select an endpoint**.
107+
4. Choose **Configure an endpoint**.
113108

114109
:::image type="content" source="./media/custom-event-to-function/provide-subscription-values.png" alt-text="Image showing event subscription values.":::
115110
5. For the function endpoint, select the Azure Subscription and Resource Group your Function App is in and then select the Function App and function you created earlier. Select **Confirm Selection**.
@@ -218,9 +213,17 @@ The second example uses PowerShell to perform similar steps.
218213
```
219214

220215
### Verify that function received the event
221-
You've triggered the event, and Event Grid sent the message to the endpoint you configured when subscribing. Navigate to your Event Grid triggered function and open the logs. You should see a copy of the data payload of the event in the logs. If you don't make sure you open the logs window first, or hit reconnect, and then try sending a test event again.
216+
You've triggered the event, and Event Grid sent the message to the endpoint you configured when subscribing.
217+
218+
1. On the **Monitor** page for your Azure function, you see an invocation.
219+
220+
:::image type="content" source="./media/custom-event-to-function/monitor-page-invocations.png" alt-text="Screenshot showing the Invocations tab of the Monitor page.":::
221+
2. Select the invocation to see the details.
222+
223+
:::image type="content" source="./media/custom-event-to-function/invocation-details-page.png" alt-text="Screenshot showing the Invocation details.":::
224+
3. You can also use the **Logs** tab in the right pane to see the logged messages when you post events to the topic's endpoint.
222225

223-
:::image type="content" source="./media/custom-event-to-function/successful-function.png" lightbox="./media/custom-event-to-function/successful-function.png" alt-text="Image showing the Monitor view of the Azure function with a log.":::
226+
:::image type="content" source="./media/custom-event-to-function/successful-function.png" lightbox="./media/custom-event-to-function/successful-function.png" alt-text="Image showing the Monitor view of the Azure function with a log.":::
224227

225228
## Clean up resources
226229
If you plan to continue working with this event, don't clean up the resources created in this article. Otherwise, delete the resources you created in this article.
6.45 KB
Loading
-124 Bytes
Loading
35.2 KB
Loading
50 KB
Loading
-3.72 KB
Loading
47.9 KB
Loading
19.8 KB
Loading
9.58 KB
Loading
24.8 KB
Loading

0 commit comments

Comments
 (0)