0
0
Azurecloud~10 mins

Event Grid for event-driven architecture in Azure - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create an Event Grid topic in Azure.

Azure
az eventgrid topic create --name [1] --resource-group MyResourceGroup --location eastus
Drag options to blanks, or click blank then click option'
AMyEventGridTopic
BMyStorageAccount
CMyVirtualNetwork
DMySqlDatabase
Attempts:
3 left
💡 Hint
Common Mistakes
Using a storage account name instead of an Event Grid topic name.
Using a virtual network or database name which are unrelated.
2fill in blank
medium

Complete the code to subscribe an Azure Function to an Event Grid topic.

Azure
az eventgrid event-subscription create --name MySubscription --source-resource-id [1] --endpoint https://myfunction.azurewebsites.net/runtime/webhooks/eventgrid
Drag options to blanks, or click blank then click option'
A/subscriptions/xxxx/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorage
B/subscriptions/xxxx/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/myvnet
C/subscriptions/xxxx/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/servers/myserver
D/subscriptions/xxxx/resourceGroups/MyResourceGroup/providers/Microsoft.EventGrid/topics/MyEventGridTopic
Attempts:
3 left
💡 Hint
Common Mistakes
Using a storage account or SQL server resource ID instead of the Event Grid topic.
Using a virtual network resource ID which is unrelated.
3fill in blank
hard

Fix the error in the Event Grid subscription creation command by completing the missing parameter.

Azure
az eventgrid event-subscription create --name MySubscription --source-resource-id /subscriptions/xxxx/resourceGroups/MyResourceGroup/providers/Microsoft.EventGrid/topics/MyEventGridTopic --endpoint [1]
Drag options to blanks, or click blank then click option'
Ahttp://myfunction
Bmyfunction.azurewebsites.net
Chttps://myfunction.azurewebsites.net/runtime/webhooks/eventgrid
Dftp://myfunction.azurewebsites.net
Attempts:
3 left
💡 Hint
Common Mistakes
Using a URL without the protocol or path.
Using non-HTTPS protocols like FTP or HTTP.
4fill in blank
hard

Fill in the blank to create an Event Grid subscription with a filter for events of type 'Microsoft.Storage.BlobCreated'.

Azure
az eventgrid event-subscription create --name MySubscription --source-resource-id /subscriptions/xxxx/resourceGroups/MyResourceGroup/providers/Microsoft.EventGrid/topics/MyEventGridTopic --endpoint https://myfunction.azurewebsites.net/runtime/webhooks/eventgrid --[1] Microsoft.Storage.BlobCreated
Drag options to blanks, or click blank then click option'
Aincluded-event-types
Bevent-type-filter
Csubject-filter-operator
Dsubject-begins-with
Attempts:
3 left
💡 Hint
Common Mistakes
Using subject filter parameters instead of event type filters.
Using incorrect parameter names.
5fill in blank
hard

Fill all three blanks to define an Event Grid subscription with a subject filter that only accepts events where the subject begins with '/blobServices/default/containers/images' and ends with '.jpg'.

Azure
az eventgrid event-subscription create --name MySubscription --source-resource-id /subscriptions/xxxx/resourceGroups/MyResourceGroup/providers/Microsoft.EventGrid/topics/MyEventGridTopic --endpoint https://myfunction.azurewebsites.net/runtime/webhooks/eventgrid --subject-begins-with [1] --subject-ends-with [2] --included-event-types [3]
Drag options to blanks, or click blank then click option'
A/blobServices/default/containers/images
B.jpg
CMicrosoft.Storage.BlobCreated
D/blobServices/default/containers/videos
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong container path for subject begins with.
Using incorrect file extension or event type.