exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 19 question 1 discussion

Actual exam question from Microsoft's AZ-204
Question #: 1
Topic #: 19
[All AZ-204 Questions]

DRAG DROP -
You need to implement the Log policy.
How should you complete the Azure Event Grid subscription? To answer, drag the appropriate JSON segments to the correct locations. Each JSON segment may be used once, more than once, or not at all. You may need to drag the split bar between panes to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1:WebHook -
Scenario: If an anomaly is detected, an Azure Function that emails administrators is called by using an HTTP WebHook. endpointType: The type of endpoint for the subscription (webhook/HTTP, Event Hub, or queue).

Box 2: SubjectBeginsWith -
Box 3: Microsoft.Storage.BlobCreated

Scenario: Log Policy -
All Azure App Service Web Apps must write logs to Azure Blob storage. All log files should be saved to a container named logdrop. Logs must remain in the container for 15 days.

Example subscription schema -
{
"properties": {
"destination": {
"endpointType": "webhook",
"properties": {
"endpointUrl": "https://example.azurewebsites.net/api/HttpTriggerCSharp1?code=VXbGWce53l48Mt8wuotr0GPmyJ/nDT4hgdFj9DpBiRt38qqnnm5OFg=="
}
},
"filter": {
"includedEventTypes": [ "Microsoft.Storage.BlobCreated", "Microsoft.Storage.BlobDeleted" ],
"subjectBeginsWith": "blobServices/default/containers/mycontainer/log",
[1]
"isSubjectCaseSensitive ": "true"
}
}
}
Reference:
https://docs.microsoft.com/en-us/azure/event-grid/subscription-creation-schema

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
clarionprogrammer
Highly Voted 4 years, 1 month ago
Looks correct based on the provided reference. https://docs.microsoft.com/en-us/azure/event-grid/subscription-creation-schema
upvoted 28 times
gmishra88
2 years, 7 months ago
You mean to say that documentation link has eventType as "Webhook" as an example. But isn't that an example? Where is the reference to say it is a webhook? The question itself is not clear
upvoted 3 times
1CY1
10 months, 2 weeks ago
If an anomaly is detected, an Azure Function that emails administrators is called by using an HTTP WebHook.
upvoted 1 times
Jay456
5 months, 2 weeks ago
Yeah, but this is sending an event for every log file that is created.
upvoted 1 times
...
1CY1
10 months, 2 weeks ago
Also, what was your alternative?
upvoted 1 times
...
...
...
...
coffecold
Highly Voted 2 years, 6 months ago
To prevent reading the cases multiple times: Please see the spots below where you can find the questions (page/topic/question/subject) Proseware, Inc. 53 19 1 ARM for Azure Event Grid subscription, enable + filter logging 53 19 2 use Application Insights for scaling 53 19 3 code : telemetry filter/ telemetry processor 53 19 4 code : telemetry initializer 55 25 1 code : if-then condition on properties of incomming event from GRID 56 25 2 code : class for login event, properties needed 56 25 3 code : programatically update application settings for blob 56 26 1 azure function delay : always on and tier
upvoted 22 times
OPT_001122
2 years, 5 months ago
Thanks again for this great help!!
upvoted 2 times
...
ks321
1 year, 9 months ago
Dude, you are awesome, Seems like you have provided this for all case study questions. Thanks a ton!
upvoted 3 times
...
...
bluetopp
Most Recent 1 year, 5 months ago
By googling the case study i found more text that fits more appropriately: Policies Log policy All Azure App Service Web Apps must write logs to Azure Blob storage. All log files should be saved to a container named logdrop. Logs must remain in the container for 15 days.
upvoted 1 times
bp_a_user
1 year, 4 months ago
this text is already in...
upvoted 2 times
...
...
gmishra88
2 years, 7 months ago
It looks correct purely based on options and there is no need to read the big scenario. But I wonder why it is reacting on logdrop container events. That's where the service itself is writing log files to. Won't it create an endless loop?
upvoted 3 times
coffecold
2 years, 6 months ago
"All Azure App Service Web Apps must write logs to Azure Blob storage" -There are n (production) Web apps that write logs to a blob storage. -On that blob storage an event grid is put to trigger the event when blobs are written. -From that event a function is triggered, doing great thing with policies.
upvoted 2 times
...
gmishra88
2 years, 7 months ago
marvelous microsoftiness, probably this is for the subscription for the anomaly detection service and not the policy service where they expliclty mentioned event grid to confuse you. Once you pass this exam, the certification can be used when applying for a job at CSI new york. For finding clues where they do not exist.
upvoted 12 times
acjdev514
1 year, 7 months ago
hahaha gmishra88
upvoted 1 times
...
...
...
edengoforit
3 years, 3 months ago
What is a webhook and how do you use it? Webhooks are automated messages sent from apps when something happens. They have a message—or payload—and are sent to a unique URL—essentially the app's phone number or address. Webhooks are almost always faster than polling, and require less work on your end. They're much like SMS notifications.
upvoted 3 times
...
gfiorini
3 years, 5 months ago
The question is really worded poorly. The subscription is for events that are inserted into the container and a webhook is invoked when a log file is created in the storage container. I assume that the webhook point to a function (?) that analyze the log with a machine learning model and THEN if there is an anomaly call an azure function to notify adminstrator via mail. Am I missing something ?
upvoted 5 times
coffecold
2 years, 6 months ago
It's in the text: "You develop and deploy a stateful ASP.NET Core 2.1 web application named Policy service to an Azure App Service Web App. The application reacts to events from Azure Event Grid and performs policy actions based on those events" The controller of "Policy service" is given in the code EventGridController.cs. So the subscription in Grid triggers a webhook to the Policy service and executes the 'Process' controller function there .
upvoted 1 times
...
...
mc0re
3 years, 9 months ago
> an Azure Function that emails administrators is called by using an HTTP WebHook The question is about the EventGrid subscription, not how another Function is called. How do they fit together?
upvoted 3 times
MiraA
3 years, 7 months ago
I am missing "properties" section within "destination" key to define either "endpointUrl" or "resourceId". https://docs.microsoft.com/en-us/azure/event-grid/subscription-creation-schema#example-subscription-schema https://docs.microsoft.com/en-us/azure/event-grid/handler-event-hubs#event-hub
upvoted 1 times
MiraA
3 years, 7 months ago
Endpoint properties based on the "destination" type: https://docs.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?tabs=json#endpointproperties-object
upvoted 1 times
...
...
...
UnknowMan
3 years, 11 months ago
Correct !
upvoted 2 times
...
UnknowMan
3 years, 11 months ago
Correct !
upvoted 2 times
...
jokergester
4 years, 1 month ago
https://docs.microsoft.com/en-us/azure/templates/microsoft.eventgrid/eventsubscriptions?tabs=json#template-format
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago