exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 3 question 6 discussion

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

DRAG DROP -
You have an application that uses Azure Blob storage.
You need to update the metadata of the blobs.
Which three methods should you use to develop the solution? To answer, move the appropriate methods from the list of methods to the answer area and arrange them in the correct order.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:

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
Phenr
Highly Voted 4 years, 1 month ago
Since we're talking about updating the metadata, - first we need to fetch it, to populate blob's properties and metadata (we want to update it - without fetching we would just set the new metadata): FetchAttributesAsync - second, we need to manipulate the metadatas to update them and the best fitting is Metadata.Add - third, we have to persist our changes. We can use a method that initiates an asynchronous operation to update the blob's metadata, which is SetMetadataAsync
upvoted 262 times
zzt
3 years, 9 months ago
Based on MS documentation referenced it should be: // Get the blob's properties and metadata. BlobProperties properties = await blob.GetPropertiesAsync(); // Add metadata to the dictionary by calling the Add method properties.metadata.Add("docType", "textDocuments"); // Add metadata to the dictionary by using key/value syntax properties.metadata["category"] = "guidance"; // Set the blob's metadata. await blob.SetMetadataAsync(properties.metadata);
upvoted 21 times
altafpatel1984
3 years, 5 months ago
But there is no option for GetProperties !
upvoted 2 times
coffecold
2 years, 7 months ago
Yes there is, in version 12. The exam topic references for version 11 (legacy)
upvoted 3 times
...
...
...
azurelearner666
3 years, 11 months ago
This is the best response (the "official" response is wrong)
upvoted 4 times
...
rdemontis
4 years, 1 month ago
correct!
upvoted 2 times
...
TakumaK
4 years ago
nicely explained!
upvoted 3 times
...
...
Tom87
Highly Voted 4 years, 1 month ago
I suppose there are two correct answers, depending on the version of Azure.Storage.Blobs. For v11: FetchAttributesAsync, Metadata.Add, SetMetadataAsync. For v12: GetPropertiesAsync, Metadata.Add, SetMetadataAsync. Just look here, there are two tabs with source code. One for v11, one for v12: https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-properties-metadata?tabs=dotnet#set-and-retrieve-metadata
upvoted 57 times
vtomy
3 years, 10 months ago
Correct. But GetPropertiesAsync not mentioned in answer options. We can go with FetchAttributesAsync
upvoted 14 times
...
xRiot007
2 years, 10 months ago
MS updated their pages. Now, to set metadata, you need to add it either with metadata.Add, or metadata[key] = value. After, you just need to save it, by calling SetMetadataAsync. No other operations are required as we do not care what metadata is already on the blob set.
upvoted 1 times
macobuzi
1 year, 8 months ago
Yeah, But the question forces you to pick 3 options. So FetchAtrributeAsync is probably the closest one.
upvoted 1 times
...
...
...
Vichu_1607
Most Recent 6 months, 1 week ago
Correct Order: c. FetchAttributesAsync a. Metadata.Add b. SetMetadataAsync
upvoted 1 times
...
alora01
1 year, 2 months ago
Sure, here are three methods you could use to update the metadata of blobs in Azure Blob storage- SetBlobMetadata SetMetadataAsync SetPropertiesAsync FOr more details - https://sysconverter.com/blog/import-pst-to-shared-mailbox-office-365/
upvoted 2 times
Mattt
6 months, 3 weeks ago
irrelevant link
upvoted 1 times
...
...
onlyforheros
1 year, 2 months ago
Got it in exam on 13.03.2024. Score: 910.
upvoted 2 times
...
arunkuml
1 year, 5 months ago
Got it in the exam 14/12/23. Went with given answer. All questions are from ExamTopics. Case study - VanArsdel, Ltd (11 questions)
upvoted 2 times
...
AndySmith
1 year, 6 months ago
On exam 3-Nov-2023. Went with most-voted answer - 932/1000. 1) FetchAtrributesAsync 2) Metadata.Add 3) SetMetadataAsync
upvoted 2 times
...
ENGs
1 year, 7 months ago
On my exam 2023-10 before the Update of the Exam
upvoted 1 times
...
RuffBoii
1 year, 7 months ago
Had this on my exam today.
upvoted 1 times
...
dddddd111
1 year, 7 months ago
I got this same question. Provided answers are correct. (Note: I failed the exam 20/Sept/23. I only scored 644 and I felt bad. I think because many questions here in Examtopics are not correct or already outdated. I suggest following the most voted answers and not rely on Examtopics answers. At the beginning of the exam, you will be asked which programming languages you want to use. C#/Python. I chose C#. Also, I just want to add that some questions here in the actual exams, but the choices are written and formatted differently. Please be aware of that. Goodluck. I feel bad for failing it, but I want to retake next month. I will try Python. T_T
upvoted 3 times
TechyNetty
1 year, 7 months ago
Sorry to hear that. I have exam soon. Were all the questions from ExamTopics> Any tips you would like to share please, Thanks
upvoted 1 times
MedELKARMI
1 year ago
Do the questions you found in the exam all come from here?
upvoted 1 times
...
dddddd111
1 year, 6 months ago
I would say 30% percent of the questions here really shown to my exam. But after I purchased contributor access, I would say 90 percent of the questions here. In my first attempt, I almost lose my hope of passing because of the case study. So, I highly recommend you review case studies. really difficult. And like I said, some question and answer format are quite different from the actual exam. Good luck. I'm gonna retake before end of Nov.2023 because of the recent update from MS. AZ-204 was updated.
upvoted 1 times
...
...
...
longnguyendh
1 year, 9 months ago
It should be FetchAttributesAsync, Metadata.Add, SetMetadataAsync
upvoted 2 times
...
juanckar
1 year, 10 months ago
This was on the exam (July 2023). Went with fetch/metadata.add/setMetadata. Scored 917
upvoted 4 times
...
DonH
1 year, 11 months ago
Just for information: I just had this question on my AZ204 exam - 16-jun-2023. I barely made it (with only 767 points) so I can't inform anyony if this answer is correct or not, just stating that this is an actual exam question.
upvoted 4 times
...
saravanasanthosh
2 years, 4 months ago
Got this in exam 12/30/2022
upvoted 2 times
...
OPT_001122
2 years, 5 months ago
thanks to all who have mentioned the exam dates
upvoted 2 times
...
OPT_001122
2 years, 5 months ago
FetchAttributesAsync Metadata.Add SetMetadataAsync
upvoted 3 times
...
elequiel
2 years, 6 months ago
Got it in exam 20/10/2022
upvoted 2 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