Complete the code to create an Event Grid topic in Azure.
az eventgrid topic create --name [1] --resource-group MyResourceGroup --location eastusThe command creates an Event Grid topic named MyEventGridTopic in the specified resource group and location.
Complete the code to subscribe an Azure Function to an Event Grid topic.
az eventgrid event-subscription create --name MySubscription --source-resource-id [1] --endpoint https://myfunction.azurewebsites.net/runtime/webhooks/eventgridThe --source-resource-id must point to the Event Grid topic resource to subscribe to its events.
Fix the error in the Event Grid subscription creation command by completing the missing parameter.
az eventgrid event-subscription create --name MySubscription --source-resource-id /subscriptions/xxxx/resourceGroups/MyResourceGroup/providers/Microsoft.EventGrid/topics/MyEventGridTopic --endpoint [1]The endpoint must be a full HTTPS URL to the Azure Function's Event Grid webhook.
Fill in the blank to create an Event Grid subscription with a filter for events of type 'Microsoft.Storage.BlobCreated'.
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.BlobCreatedThe --included-event-types parameter specifies which event types to receive, such as Microsoft.Storage.BlobCreated.
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'.
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]
The --subject-begins-with and --subject-ends-with parameters filter events by their subject prefix and suffix. The --included-event-types parameter specifies the event type to filter.