Chapter 2 · AZ-204: Developing Solutions for Microsoft Azure Develop Azure Compute Solutions
Azure Functions
20 practice questions · 5 marks weightage
Practice questions
- Question 1Q-B0AF35See the answer and solution
A company wants an Azure Function to run whenever a file is uploaded to the incoming container in Azure Blob Storage. The function must create a thumbnail and write it to the thumbnails container without explicitly creating BlobServiceClient code. Which design satisfies these requirements?
- A.Use a Blob trigger for the incoming container and a Blob output binding for the thumbnails container.
- B.Use an HTTP trigger and require the uploading client to invoke the function after the upload.
- C.Use a timer trigger and periodically scan the incoming container with an HTTP output binding.
- D.Use a queue trigger and configure the thumbnails container as the function's application setting.
- Question 2Q-A8D19BSee the answer and solution
You are developing a C# HTTP-triggered Azure Function named SubmitOrder. Only clients that possess a function key should be able to invoke it. Which implementation and request behavior meet the requirement?
- A.Decorate the function with [HttpTrigger(AuthorizationLevel.Function, "post", Route = "orders")] and send the key in the x-functions-key request header.
- B.Decorate the function with [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "orders")] and send the key in the Authorization bearer token.
- C.Decorate the function with [HttpTrigger(AuthorizationLevel.Admin, "post", Route = "orders")] and send the key in the request body.
- D.Decorate the function with [HttpTrigger(AuthorizationLevel.Function, "post", Route = "orders")] and place the key in the response body returned by the function.
- Question 3Q-334587See the answer and solution
A durable workflow receives a list of 100 document IDs. It must process all documents in parallel and then return only after every document has completed. The workflow must also remain correct when the orchestrator replays its history. Which implementation is appropriate for the orchestration function?
- A.Call an activity for each document, store the returned tasks, and await Task.WhenAll(tasks). Put all document-processing logic inside the activities.
- B.Process each document with a direct database call from the orchestrator and use DateTime.UtcNow to record the start time.
- C.Start a new Task.Run operation for each document from the orchestrator and return immediately after starting the tasks.
- D.Call one activity for each document sequentially, await each activity before starting the next, and perform the database calls directly in the orchestrator.
- Question 4Q-66E37CSee the answer and solution
An Azure Function must run automatically every five minutes. Which timer trigger schedule expression uses the Azure Functions six-field NCRONTAB format correctly?
- A.0 */5 * * * *
- B.*/5 * * * *
- C.0 5 * * * *
- D.0 0 */5 * * *
- Question 5Q-BF7795See the answer and solution
A company is hosting an HTTP-triggered Azure Function that must scale automatically, support virtual network integration, and minimize cold starts by keeping prewarmed instances available. Which hosting option best meets these requirements?
- A.Consumption plan
- B.Premium plan
- C.Static Web Apps managed function
- D.Deployment slot on a Consumption plan
15 more questions on Azure Functions
Sign up free to practise the full chapter. Questions you get wrong come back until you've mastered them.
Start practising freeFree to start · No credit card needed