Lab 2: Create an Event Grid subscription

Task 1: Access the Event Grid Viewer web application

  1. On the Azure portal's navigation pane, select Resource groups.

  2. On the Resource groups blade, select the PubSubEvents resource group.

  3. On the PubSubEvents blade, select the eventviewer[yourname] web app.

  4. On the App Service blade, in the Settings category, select the Properties link.

  5. In the Properties section, record the value of the URL link. You'll use this value later in the lab.

  6. Select Overview, and then select Browse.

  7. Observe the currently running Azure Event Grid Viewer web application. Leave this web application running for the remainder of the lab.

    Note: This web application will update in real time as events are sent to its endpoint. You'll use this application to monitor events throughout the lab.

  8. Return to your currently open browser window that displays the Azure portal.

Task 2: Create a new subscription

  1. On the Azure portal's navigation pane, select Resource groups.

  2. On the Resource groups blade, select the PubSubEvents resource group that you created previously in this lab.

  3. On the PubSubEvents blade, select the hrtopic[yourname] Event Grid topic that you created previously in this lab.

  4. On the Event Grid Topic blade, select + Event Subscription.

  5. On the Create Event Subscription blade, perform the following actions, and then select Create:

    | Setting | Action | | -- | -- | | Name text box | Enter basicsub | | Event Schema drop-down list | Select Event Grid Schema | | Endpoint Type drop-down list | Select Web Hook | | Endpoint | Select Select an endpoint. In the Subscriber Endpoint text box, enter the Web App URL value that you recorded previously, ensure that it uses an https:// prefix, add the suffix /api/updates, and then select Confirm Selection. For example, if your Web App URL value is http://eventviewerstudent.azurewebsites.net/, then your Subscriber Endpoint would be https://eventviewerstudent.azurewebsites.net/api/updates |

    The following screenshot displays the configured settings on the Create Event Subscription blade.

    Screenshot displaying the configured settings on the Create Event Subscription blade

    Note: Wait for Azure to finish creating the subscription before you continue with the lab. You'll receive a notification when the subscription is created.

Task 3: Observe the subscription validation event

  1. Return to the browser window displaying the Azure Event Grid Viewer web application.

  2. Review the Microsoft.EventGrid.SubscriptionValidationEvent event that was created as part of the subscription creation process.

  3. Select the event and review its JSON content.

  4. Return to your currently open browser window with the Azure portal.

Task 4: Record subscription credentials

  1. On the Azure portal's navigation pane, select Resource groups.

  2. On the Resource groups blade, select the PubSubEvents resource group that you created previously in this lab.

  3. On the PubSubEvents blade, select the hrtopic[yourname] Event Grid topic that you created previously in this lab.

  4. On the Event Grid Topic blade, record the value of the Topic Endpoint field. You'll use this value later in the lab.

  5. In the Settings category, select the Access keys link.

  6. In the Access keys section, record the value of the Key 1 text box. You'll use this value later in the lab.

Review

In this exercise, you created a new subscription, validated its registration, and then recorded the credentials required to publish a new event to the topic.

results matching ""

    No results matching ""