Microsoft Azure Developer Associate AZ-204 Practice Question

A .NET 6 console application receives files as Stream objects and must store each file in Azure Blob Storage by using the Azure.Storage.Blobs 12.x SDK. The solution must meet these requirements:

  • Upload the stream as a block blob.
  • Throw an exception if a blob with the same name already exists.
  • Support cancellation through a provided CancellationToken.
  • Do not overwrite an existing blob by using the convenience overwrite parameter. Which code approach should you use?
  • Call BlobClient.StartCopyFromUriAsync(sourceUri, cancellationToken).

  • Call BlobClient.UploadAsync(fileStream, overwrite: true, cancellationToken).

  • Call BlobClient.UploadAsync(fileStream, new BlobUploadOptions { Conditions = new BlobRequestConditions }, cancellationToken).

  • Call BlockBlobClient.StageBlockAsync for each block and then CommitBlockListAsync.

Microsoft Azure Developer Associate AZ-204
Develop for Azure storage
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot