exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 25 question 1 discussion

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

DRAG DROP -
You need to add code at line EG15 in EventGridController.cs to ensure that the Log policy applies to all services.
How should you complete the code? To answer, drag the appropriate code segments to the correct locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Scenario, Log policy: All Azure App Service Web Apps must write logs to Azure Blob storage.

Box 1: Status -

Box 2: Succeeded -

Box 3: operationName -
Microsoft.Web/sites/write is resource provider operation. It creates a new Web App or updates an existing one.
Reference:
https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations

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
MrZoom
Highly Voted 4 years, 1 month ago
Answer seems to be correct. Once a new web app is created, an event is triggered from the resource group... https://docs.microsoft.com/en-us/azure/event-grid/event-schema-resource-groups?tabs=event-grid-event-schema That event contains the status, which must be Succeeded in order for it to make sense to apply the policy. The above site also mentions that the event["data"] contains an operationName property for resource group events, which in this case is an "Microsoft.web/sites/write" operation.
upvoted 27 times
MiraA
3 years, 6 months ago
operationName ... Name of the operation. status ... String describing the status of the operation. Some common values are: Started, In Progress, Succeeded, Failed, Active, Resolved. https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log-schema#administrative-category Microsoft.Web/sites/Write ... Create a new Web App or update an existing one https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations But why do we need to call EnsureLogging() upon creating/updating the Web App? I cannot find such requirement in the assignment. Or am I wrong?
upvoted 4 times
...
...
1CY1
Most Recent 10 months, 1 week ago
Alternative way of working it out... 1) topic : exlude this as it is part of the event data. 2) Find 2 remaining options that can be equal. Only 'status' and 'Succeeded' are a logical boolean test. Answer 1 : status Answer 2 : Succeeded 3) What could be a string that could match 'Microsoft.Web/site/write'. Only 2 could logically match this, eventType and operationName. operationName is the most likely. Answer 3 : operationName
upvoted 4 times
...
OPT_001122
2 years, 4 months ago
1: Status 2: Succeeded 3: operationName
upvoted 2 times
...
ning
3 years, 8 months ago
The given answer seems logical, but the wording is so confusing ... This operation is for when a new web site is created or updated, or a web log is generated ...
upvoted 2 times
MiraA
3 years, 6 months ago
Confusing is the opening brace - it should be "(" instead of "{" as it is a logical expression for the "if" statement. ;-)
upvoted 3 times
overhill
5 months, 1 week ago
that's not confusing you can clearly understand thats a typo. confusing is the wording in the question and the code samples do not match quite well its confusing
upvoted 1 times
...
...
...
Faizs
4 years ago
Correct
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