Complete the code to create an Event Grid subscription with a filter on the event type.
az eventgrid event-subscription create --name mySubscription --source-resource-id /subscriptions/123/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/myStorage [1] --endpoint https://myendpoint.com/api/events
The --included-event-types option filters events by their type. Here, we want to receive only BlobCreated events.
Complete the code to add a subject filter that only accepts events where the subject begins with a specific path.
az eventgrid event-subscription create --name mySubscription --source-resource-id /subscriptions/123/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/myStorage --included-event-types BlobCreated [1] --endpoint https://myendpoint.com/api/events
--subject-ends-with instead of --subject-begins-with.--subject-contains which is not a valid filter option.The --subject-begins-with option filters events whose subject starts with the specified string.
Fix the error in the filter syntax to correctly filter events where the subject ends with '.jpg'.
az eventgrid event-subscription create --name mySubscription --source-resource-id /subscriptions/123/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/myStorage --included-event-types BlobCreated [1] --endpoint https://myendpoint.com/api/events
The correct option for filtering events by subject suffix is --subject-ends-with.
Fill both blanks to create an Event Grid subscription with filters for event type and subject prefix.
az eventgrid event-subscription create --name mySubscription --source-resource-id /subscriptions/123/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/myStorage [1] [2] --endpoint https://myendpoint.com/api/events
Use --included-event-types BlobCreated to filter event types and --subject-begins-with to filter subjects starting with the given path.
Fill all three blanks to create an Event Grid subscription with filters for event type, subject prefix, and subject suffix.
az eventgrid event-subscription create --name mySubscription --source-resource-id /subscriptions/123/resourceGroups/myRG/providers/Microsoft.Storage/storageAccounts/myStorage [1] [2] [3] --endpoint https://myendpoint.com/api/events
Combine filters for event type (BlobCreated), subject prefix, and subject suffix to receive only matching events.