exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 25 question 2 discussion

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

HOTSPOT -
You need to insert code at line LE03 of LoginEvent.cs to ensure that all authentication events are processed correctly.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: id -
id is a unique identifier for the event.

Box 2: eventType -
eventType is one of the registered event types for this event source.

Box 3: dataVersion -
dataVersion is the schema version of the data object. The publisher defines the schema version.
Scenario: Authentication events are used to monitor users signing in and signing out. All authentication events must be processed by Policy service. Sign outs must be processed as quickly as possible.
The following example shows the properties that are used by all event publishers:
[
{
"topic": string,
"subject": string,
"id": string,
"eventType": string,
"eventTime": string,
"data":{
object-unique-to-each-publisher
},
"dataVersion": string,
"metadataVersion": string
}
]
Reference:
https://docs.microsoft.com/en-us/azure/event-grid/event-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
somenkr
Highly Voted 2 years, 11 months ago
Answer is correct : metadataVersion string Not required, but if included, must match the Event Grid Schema
upvoted 15 times
...
JH81
Highly Voted 11 months, 3 weeks ago
Wow MS, id and eventType I get but we then have to decide between dataVersion and metadataVersion and somehow know that metadataVersion only has a getter??? Another wonderful question.
upvoted 10 times
...
plusJoyed
Most Recent 1 year, 1 month ago
Why does the order matter for the 3 values? Isn't this just a class model/interface?
upvoted 4 times
devex
9 months ago
Order does not matter and as long as you do not select duplicates, you get at least 2/3 points. Strange question.
upvoted 5 times
...
...
UnknowMan
3 years ago
Correct (Metadataversion have not a Setter so is Dataversion), Id and eventType is required in Event Grid Schema
upvoted 4 times
...
faizalzain
3 years, 1 month ago
the last one i think should be metadataversion
upvoted 2 times
ning
2 years, 9 months ago
No, metadataversion is determined by event grid, not sender
upvoted 2 times
...
jay158
2 years, 10 months ago
NO , the only allowed value at present for metadataversion is 1 https://docs.microsoft.com/en-us/azure/event-grid/event-schema
upvoted 2 times
...
...
Mike_St
3 years, 2 months ago
As shown in the example in the explanation of the answer, all 4 values are needed BUT from programmer stand point... ID should not be public and have getter and setter... it should be a private immutable value... so in my opionion it should be eventType dataVersion and metadataVersion (i am not 100% sertain of that answer)
upvoted 4 times
rdemontis
3 years, 2 months ago
I think answer is correct because id is a required field in EventGrid Schema and if you loog at the EventGridEvent class from Microsoft libraries the property has both getter and setter methods defined. https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.eventgrid.models.eventgridevent.id?view=azure-dotnet#Microsoft_Azure_EventGrid_Models_EventGridEvent_Id
upvoted 9 times
aperez1979
3 years, 2 months ago
I agree, metadaversion only get https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.eventgrid.models.eventgridevent.metadataversion?view=azure-dotnet
upvoted 10 times
clarionprogrammer
3 years, 1 month ago
Good point. I can't believe their question choice is so nit-picky.
upvoted 2 times
clarionprogrammer
3 years, 1 month ago
This question proves how ridiculous this test is.
upvoted 25 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 ...