HOTSPOT (Drag and Drop is not supported) You are developing a web application by using the Azure SDK. The web application accesses data in a zone-redundant BlockBlobStorage storage account.The application must determine whether the data has changed since the application last read the data. Update operations must use the latest data changes when writing data to the storage account.You need to implement the update operations.Which values should you use? To answer, select the appropriate option in the answer area.NOTE: Each correct selection is worth one point.Hot Area:
Answer(s): A
Box 1: Last Modified The Last-Modified response HTTP header contains a date and time when the origin server believes the resource was last modified. It is used as a validator to determine if the resource is the same as the previously stored one. Less accurate than an ETag header, it is a fallback mechanism.Box 2: If-Modified-Since Conditional Header If-Modified-Since:A DateTime value. Specify this header to perform the operation only if the resource has been modified since the specified time.Incorrect:Not ETag/If-Match Conditional Header If-Match:An ETag value. Specify this header to perform the operation only if the resource's ETag matches the value specified. For versions 2011-08-18 and newer, theETag can be specified in quotes.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations
HOTSPOT (Drag and Drop is not supported) An organization deploys a blob storage account. Users take multiple snapshots of the blob storage account over time.You need to delete all snapshots of the blob storage account. You must not delete the blob storage account itself.How should you complete the code segment? To answer, select the appropriate options in the answer area.NOTE: Each correct selection is worth one point.Hot Area:
Box 1: DeleteSnapshotsOption Sample code in powershell://dont forget to add the include snapshots :)await batchClient.DeleteBlobsAsync(listofURIforBlobs,Azure.Storage.Blobs.Models.DeleteSnapshotsOption.IncludeSnapshots);Sample code in .Net:// Create a batch with three deletesBlobBatchClient batchClient = service.GetBlobBatchClient();BlobBatch batch = batchClient.CreateBatch();batch.DeleteBlob(foo.Uri, DeleteSnapshotsOption.IncludeSnapshots); batch.DeleteBlob(bar.Uri, DeleteSnapshotsOption.OnlySnapshots); batch.DeleteBlob(baz.Uri);// Submit the batchbatchClient.SubmitBatch(batch);Box 2: OnlySnapshots
https://docs.microsoft.com/en-us/dotnet/api/overview/azure/storage.blobs.batch-readme https://stackoverflow.com/questions/39471212/programmatically-delete-azure-blob-storage-objects-in-bulks
Box 1: delete_snapshots # Delete only the snapshot (blob itself is retained)blob_client.delete_blob(delete_snapshots="only")Box 2: only
https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/storage/azure-storage-blob/samples/blob_samples_common.py
HOTSPOT (Drag and Drop is not supported)You are developing an application that monitors data added to an Azure Blob storage account.You need to process each change made to the storage account.How should you complete the code segment? To answer, select the appropriate options in the answer area.NOTE: Each correct selection is worth one point.
HOTSPOT (Drag and Drop is not supported)You develop an application that sells AI generated images based on user input. You recently started a marketing campaign that displays unique ads every second day.Sales data is stored in Azure Cosmos DB with the date of each sale being stored in a property named ‘whenFinished’.The marketing department requires a view that shows the number of sales for each unique ad.You need to implement the query for the view.How should you complete the query? To answer, select the appropriate options in the answer area.NOTE: Each correct selection is worth one point.
Post your Comments and Discuss Microsoft AZ-204 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the AZ-204 content, but please register or login to continue.