microsoft az-204 online test

Developing Solutions for Microsoft Azure

What students need to know about the az-204 exam

  • Total 252 Questions & Answers
  • Has case studies
  • Passing score: 700

Question 1 Topic 1, Case Study 1Case Study Question View Case

HOTSPOT
You need to configure Azure CDN for the Shipping web site.
Which configuration options should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:

Explanation:
Scenario: Shipping website
Use Azure Content Delivery Network (CDN) and ensure maximum performance for dynamic content while minimizing latency
and costs.
Tier: Standard
Profile: Akamai
Optimization: Dynamic site acceleration
Dynamic site acceleration (DSA) is available for Azure CDN Standard from Akamai, Azure CDN Standard from Verizon, and
Azure CDN Premium from Verizon profiles.
DSA includes various techniques that benefit the latency and performance of dynamic content. Techniques include route and
network optimization, TCP optimization, and more.
You can use this optimization to accelerate a web app that includes numerous responses that aren't cacheable. Examples
are search results, checkout transactions, or real-time data. You can continue to use core Azure CDN caching capabilities
for static data.
Reference:
https://docs.microsoft.com/en-us/azure/cdn/cdn-optimization-overview

Discussions

Question 2 Topic 1, Case Study 1Case Study Question View Case

HOTSPOT
You need to correct the VM issues.
Which tools should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:

Explanation:
Box 1: Azure Backup
The VM is critical and has not been backed up in the past. The VM must enable a quick restore from a 7-day snapshot to
include in-place restore of disks in case of failure.
In-Place restore of disks in IaaS VMs is a feature of Azure Backup.
Performance: Accelerated Networking
Scenario: The VM shows high network latency, jitter, and high CPU utilization.
Box 2: Accelerated networking
The VM shows high network latency, jitter, and high CPU utilization.
Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, greatly improving its networking
performance. This high-performance path bypasses the host from the datapath, reducing latency, jitter, and CPU utilization,
for use with the most demanding network workloads on supported VM types.
Reference:
https://azure.microsoft.com/en-us/blog/an-easy-way-to-bring-back-your-azure-vm-with-in-place-restore/
Develop
Azure compute solutions

Discussions

Question 3 Topic 2, Case Study 2Case Study Question View Case

HOTSPOT
You need to ensure that validation testing is triggered per the requirements.
How should you complete the code segment? To answer, select the appropriate values in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Answer:

Explanation:
Box 1: RepositoryUpdated
When a new version of the ContentAnalysisService is available the previous seven days of content must be processed with
the new version to verify that the new version does not significantly deviate from the old version.
Box 2: service Box 3: imageCollection
Reference:
https://docs.microsoft.com/en-us/azure/devops/notifications/oob-supported-event-types
Develop Azure compute solutions

Discussions

Question 4 Topic 2, Case Study 2Case Study Question View Case

You need to deploy the CheckUserContent Azure Function. The solution must meet the security and cost requirements.
Which hosting model should you use?

  • A. Premium plan
  • B. App Service plan
  • C. Consumption plan
Answer:

B

Explanation:
Scenario:
You must minimize costs for all Azure services.
All Internal services must only be accessible from internal Virtual Networks (VNets).
Best for long-running scenarios where Durable Functions can't be used. Consider an App Service plan in the following
situations: You have existing, underutilized VMs that are already running other App Service instances.

You want to provide a custom image on which to run your functions. Predictive scaling and costs are required.


Note: When you create a function app in Azure, you must choose a hosting plan for your app. There are three basic hosting
plans available for Azure Functions: Consumption plan, Premium plan, and Dedicated (App Service) plan.
Incorrect Answers:
A: A Premium plan would be more costly. C: Need the VNET functionality.
Reference:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale

Discussions

Question 5 Topic 3, Case Study 3Case Study Question View Case

DRAG DROP
You need to deploy a new version of the LabelMaker application to ACR.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the
answer area and arrange them in the correct order.
Select and Place:

Answer:

Explanation:
Step 1: Build a new application image by using dockerfile
Step 2: Create an alias if the image with the fully qualified path to the registry
Before you can push the image to a private registry, youve to ensure a proper image name. This can be achieved using the
docker tag command. For demonstration purpose, well use Dockers hello world image, rename it and push it to ACR.
# pulls hello-world from the public docker hub
$ docker pull hello-world
# tag the image in order to be able to push it to a private registry
$ docker tag hello-word /hello-world
# push the image
$ docker push /hello-world
Step 3: Log in to the registry and push image
In order to push images to the newly created ACR instance, you need to login to ACR form the Docker CLI. Once logged in,
you can push any existing docker image to your ACR instance.
Scenario:
Coho Winery plans to move the application to Azure and continue to support label creation.
LabelMaker app
Azure Monitor Container Health must be used to monitor the performance of workloads that are deployed to Kubernetes
environments and hosted on Azure Kubernetes Service (AKS).
You must use Azure Container Registry to publish images that support the AKS deployment.
Reference:
https://thorsten-hans.com/how-to-use-a-private-azure-container-registry-with-kubernetes-9b86e67b93b6
https://docs.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-quick-task

Discussions

Question 6 Topic 3, Case Study 3Case Study Question View Case

You need to access data from the user claim object in the e-commerce web app.
What should you do first?

  • A. Write custom code to make a Microsoft Graph API call from the e-commerce web app.
  • B. Assign the Contributor RBAC role to the e-commerce web app by using the Resource Manager create role assignment API.
  • C. Update the e-commerce web app to read the HTTP request header values.
  • D. Using the Azure CLI, enable Cross-origin resource sharing (CORS) from the e-commerce checkout API to the e- commerce web app.
Answer:

C

Explanation:
Methods to Get User Identity and Claims in a .NET Azure Functions App include: ClaimsPrincipal from the Request

Context
The ClaimsPrincipal object is also available as part of the request context and can be extracted from the
HttpRequest.HttpContext. User Claims from the Request Headers.

App Service passes user claims to the app by using special request headers.
Reference:
https://levelup.gitconnected.com/four-alternative-methods-to-get-user-identity-and-claims-in-a-net-azure-functions-app-
df98c40424bb

Discussions

Question 7 Topic 4, Case Study 4Case Study Question View Case

You need to store the user agreements.
Where should you store the agreement after it is completed?

  • A. Azure Storage queue
  • B. Azure Event Hub
  • C. Azure Service Bus topic
  • D. Azure Event Grid topic
Answer:

B

Explanation:
Azure Event Hub is used for telemetry and distributed data streaming.
This service provides a single solution that enables rapid data retrieval for real-time processing as well as repeated replay of
stored raw data. It can capture the streaming data into a file for processing and analysis.
It has the following characteristics:
low latency

capable of receiving and processing millions of events per second at least once delivery Reference:


https://docs.microsoft.com/en-us/azure/event-grid/compare-messaging-services

Discussions

Question 8 Topic 4, Case Study 4Case Study Question View Case

HOTSPOT
You need to implement the bindings for the CheckUserContent function.
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:

Answer:

Explanation:
Box 1: [BlobTrigger(..)]
Box 2: [Blob(..)]
Azure Blob storage output binding for Azure Functions. The output binding allows you to modify and delete blob storage data
in an Azure Function.
The attribute's constructor takes the path to the blob and a FileAccess parameter indicating read or write, as shown in the
following example:
[FunctionName("ResizeImage")]
public static void Run(
[BlobTrigger("sample-images/{name}")] Stream image,
[Blob("sample-images-md/{name}", FileAccess.Write)] Stream imageSmall)
{
...
}
Scenario: You must create an Azure Function named CheckUserContent to perform the content checks.
The companys data science group built ContentAnalysisService which accepts user generated content as a string and
returns a probable value for inappropriate content. Any values over a specific threshold must be reviewed by an employee of
Contoso, Ltd.
Reference:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-output
Develop for Azure storage

Discussions

Question 9 Topic 4, Case Study 4Case Study Question View Case

You need to configure the ContentUploadService deployment.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

  • A. Add the following markup to line CS23: type: Private
  • B. Add the following markup to line CS24: osType: Windows
  • C. Add the following markup to line CS24: osType: Linux
  • D. Add the following markup to line CS23: type: Public
Answer:

A

Explanation:
Scenario: All Internal services must only be accessible from Internal Virtual Networks (VNets) There are three Network
Location types Private, Public and Domain Reference:
https://devblogs.microsoft.com/powershell/setting-network-location-to-private/

Discussions

Question 10 Topic 5, Case Study 5Case Study Question View Case

DRAG DROP
You need to add code at line PC32 in Processing.cs to implement the GetCredentials method in the Processing class.
How should you complete the code? To answer, drag the appropriate code segments to the correct locations. Each code
segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to
view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Answer:

Explanation:
Box 1: AzureServiceTokenProvider()
Box 2: tp.GetAccessTokenAsync("..")
Acquiring an access token is then quite easy. Example code:
private async Task GetAccessTokenAsync()
{
var tokenProvider = new AzureServiceTokenProvider();
return await tokenProvider.GetAccessTokenAsync("https://storage.azure.com/");
}
Reference: https://joonasw.net/view/azure-ad-authentication-with-azure-storage-and-managed-service-identity

Discussions
To page 2