AZ-204 · Question #66
Case Study 1 - Litware Inc Background You are a developer for Litware Inc., a SaaS company that provides a solution for managing employee expenses. The solution consists of an ASP.NET Core Web API…
The correct answer is D. Create a SharedAccessBlobPolicy and set the expiry time to two weeks from today. Scenario: Processing is performed by an Azure Function that uses version 2 of the Azure Function runtime. Once processing is completed, results are stored in Azure Blob Storage and an Azure SQL database. Then, an email summary is sent to the user with a link to the processing…
Question
Options
- ACreate a SharedAccessBlobPolicy and add it to the containers SharedAccessPolicies.
- BCreate a SharedAccessAccountPolicy and call GetSharedAccessSignature on storage account
- CCreate a SharedAccessBlobPolicy and set the expiry time to two weeks from today.
- DCreate a SharedAccessBlobPolicy and set the expiry time to two weeks from today.
How the community answered
(44 responses)- A7% (3)
- B5% (2)
- C11% (5)
- D77% (34)
Explanation
Scenario: Processing is performed by an Azure Function that uses version 2 of the Azure Function runtime. Once processing is completed, results are stored in Azure Blob Storage and an Azure SQL database. Then, an email summary is sent to the user with a link to the processing report. The link to the report must remain valid if the email is forwarded to another user. Create a stored access policy to manage signatures on a container's resources, and then generate the shared access signature on the container, setting the constraints directly on the Code example: Add a method that generates the shared access signature for the container and returns the signature URI. static string GetContainerSasUri(CloudBlobContainer container) { //Set the expiry time and permissions for the container. //In this case no start time is specified, so the shared access signature becomes valid SharedAccessBlobPolicy sasConstraints = new SharedAccessBlobPolicy(); sasConstraints.SharedAccessExpiryTime = DateTimeOffset.UtcNow.AddHours(24); sasConstraints.Permissions = SharedAccessBlobPermissions.List | SharedAccessBlobPermissions.Write; //Generate the shared access signature on the container, setting the constraints directly on the string sasContainerToken = container.GetSharedAccessSignature(sasConstraints); //Return the URI string for the container, including the SAS token. return container.Uri + sasContainerToken; Incorrect Answers: C: Call GetSharedAccessSignature on the container, not on the blob. https://docs.microsoft.com/en-us/azure/storage/blobs/storage-dotnet-shared-access-signature-
Topics
Community Discussion
No community discussion yet for this question.