AZ-204: Developing Solutions for Microsoft Azure

100%

Question 1

Your company has an Azure Kubernetes Service (AKS) cluster that you manage from an Azure AD-joined device. The cluster is located in a resource group.
Developers have created an application named MyApp. MyApp was packaged into a container image.
You need to deploy the YAML manifest file for the application.

Solution: You install the Azure CLI on the device and run the kubectl apply `"f myapp.yaml command.

Does this meet the goal?
Yes
No




Answer is Yes

The solution provided involves using kubectl, which is the Kubernetes command-line tool, to apply the YAML manifest file (myapp.yaml) for deploying the application. Since you're managing the AKS cluster from an Azure AD-joined device and have the Azure CLI installed, running kubectl apply -f myapp.yaml command will deploy the application to the AKS cluster. This is a common and valid method for deploying applications to Kubernetes clusters, including AKS.

Reference:
https://www.devspace.sh/docs/configuration/deployments/kubectl/inline_manifests

Question 2

Your company has an Azure Kubernetes Service (AKS) cluster that you manage from an Azure AD-joined device. The cluster is located in a resource group.
Developers have created an application named MyApp. MyApp was packaged into a container image.
You need to deploy the YAML manifest file for the application.

Solution: You install the docker client on the device and run the docker run -it microsoft/azure-cli:0.10.17 command.

Does this meet the goal?
Yes
No




Answer is No

docker run -it microsoft/azure-cli:0.10.17 is no k8s command

The provided solution is incorrect for deploying the YAML manifest file for the application (MyApp) to the Azure Kubernetes Service (AKS) cluster. Using the Docker client (docker run -it microsoft/azure-cli:0.10.17 command) would only allow you to interact with Docker containers, not Kubernetes clusters.

To deploy the YAML manifest file for the application to the AKS cluster, you should use the Kubernetes command-line tool (kubectl) rather than the Docker client. Therefore, the solution provided does not meet the goal.

Question 3

Your company has a web app named WebApp1.
You use the WebJobs SDK to design a triggered App Service background task that automatically invokes a function in the code every time new data is received in a queue.
You are preparing to configure the service processes a queue data item.

Which of the following is the service you should use?
Logic Apps
WebJobs
Flow
Functions




Answer is WebJobs

The scenario described suggests that you're using the WebJobs SDK to create a triggered background task that processes data from a queue. Therefore, the correct service to use for this purpose is: WebJobs

WebJobs allow you to run scripts or programs as background processes alongside your web app in Azure App Service. They can be triggered by various sources, including queues, blobs, and timers. In this case, since you're triggering a function every time new data is received in a queue, WebJobs would be the appropriate service to configure and manage this process.

Reference:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-compare-logic-apps-ms-flow-webjobs

Question 4

Your company has an Azure subscription.
You need to deploy a number of Azure virtual machines to the subscription by using Azure Resource Manager (ARM) templates. The virtual machines will be included in a single availability set.
You need to ensure that the ARM template allows for as many virtual machines as possible to remain accessible in the event of fabric failure or maintenance.

Which of the following is the value that you should configure for the platformUpdateDomainCount property?
10
20
30
40




Answer is 20

Each availability set can be configured with up to three fault domains. The maximum value you can configure for platformUpdateDomainCount is 20. This means that virtual machines within the availability set will be spread across 20 update domains. By setting this value to the maximum, you ensure that the virtual machines are distributed optimally for availability during maintenance or update operations.

Reference:
https://docs.microsoft.com/en-us/azure/virtual-machines/availability-set-overview

Question 5

You are creating an Azure Cosmos DB account that makes use of the SQL API. Data will be added to the account every day by a web application.
You need to ensure that an email notification is sent when information is received from IoT devices, and that compute cost is reduced.
You decide to deploy a function app.

Which of the following should you configure the function app to use?
Azure Cosmos DB connector
SendGrid action
Consumption plan
Azure Event Hubs binding
SendGrid binding




Answers are;
Consumption plan
SendGrid binding


Configure the function app to use consumption plan and use sendgrid bindings to send emails.

SendGrid action: This option is used to send email messages using SendGrid. However, it requires you to write code to send the email messages. By using the SendGrid binding, you can easily send email notifications without writing any code.

Azure Event Hubs binding: This option is used to receive and process events from Azure Event Hubs. It is not relevant for sending email notifications.

SendGrid binding and SendGrid action are Both functions. But the difference is SendGrid Action is used to send an email synchronously, while SendGrid binding is used to send an email asynchronously.

It means that SendGrid Action will block the execution of the function app until the email has been sent. This can lead to increased compute costs, especially if you are sending a large number of emails. On the other way, SendGrid binding will not block while the email is being sent. This can help to reduce compute costs, as the function app can continue to process other requests while the email is being sent.
Question is "You need to eunsure that compute cost is reduced". So SendGrid binding which is good for reducing costs.

Reference:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-sendgrid?tabs=in-process%2Cfunctionsv2&pivots=programming-language-csharp#example

Question 6

This question requires that you evaluate the underlined text to determine if it is correct.

You company has an on-premises deployment of MongoDB, and an Azure Cosmos DB account that makes use of the MongoDB API.
You need to devise a strategy to migrate MongoDB to the Azure Cosmos DB account.
You include the Data Management Gateway tool in your migration strategy.
No change required
mongorestore
Azure Storage Explorer
AzCopy




Answer is mongorestore

Data Management Gateway: This tool is used for connecting on-premises data sources (like SQL Server) to Azure Analysis Services or Power BI for data visualization and reporting. It's not designed for direct database migrations.

The mongorestore command-line tool is specifically designed for restoring data backups created with mongodump into a MongoDB instance. This makes it a suitable option for migrating data from your on-premises MongoDB deployment to the Azure Cosmos DB account using the MongoDB API.

Reference:
https://docs.microsoft.com/en-us/azure/cosmos-db/mongodb-migrate
https://docs.mongodb.com/manual/reference/program/mongorestore/

Question 7

You have downloaded an Azure Resource Manager template to deploy numerous virtual machines. The template is based on a current virtual machine, but must be adapted to reference an administrative password.
You need to make sure that the password is not stored in plain text.
You are preparing to create the necessary components to achieve your goal.

Which of the following should you create to achieve your goal?
An Azure Key Vault
An Azure Storage account
Azure Active Directory (AD) Identity Protection
An access policy
An Azure policy
A backup policy




Answers are;
An Azure Key Vault
An access policy


Using Key Vault we create a secret containing our Password

Using an Access Policy we allow access to the previously created secret.

Reference:
https://docs.microsoft.com/en-us/azure/key-vault/secrets/quick-create-portal
https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/key-vault-parameter?tabs=azure-cli

Question 8

You are developing an e-Commerce Web App.
You want to use Azure Key Vault to ensure that sign-ins to the e-Commerce Web App are secured by using Azure App Service authentication and Azure Active Directory (AAD).

What should you do on the e-Commerce Web App?
Run the az keyvault secret command.
Enable Azure AD Connect.
Enable Managed Service Identity (MSI).
Create an Azure AD service principal.




Answer is Enable Managed Service Identity (MSI).

Managed Service Identity (MSI) is a feature in Azure that allows you to securely authenticate an Azure service to other Azure services without having to manage credentials. By enabling MSI on the Azure App Service hosting the e-Commerce Web App, you can create a trust relationship between the App Service and Azure Key Vault. This allows the e-Commerce Web App to authenticate with Azure Active Directory (AAD) and securely retrieve secrets from the Key Vault.

Reference:
https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity
https://docs.microsoft.com/en-us/samples/azure-samples/app-service-msi-keyvault-dotnet/keyvault-msi-appservice-sample/

Question 9

You have two Hyper-V hosts named Host1 and Host2. Host1 has an Azure virtual machine named VM1 that was deployed by using a custom Azure Resource Manager template.
You need to move VM1 to Host2.

What should you do?
From the Update management blade, click Enable.
From the Overview blade, move VM1 to a different subscription.
From the Redeploy blade, click Redeploy.
From the Profile blade, modify the usage location.




Answer is From the Redeploy blade, click Redeploy.

When you redeploy a VM, it moves the VM to a new node within the Azure infrastructure and then powers it back on, retaining all your configuration options and associated resources.

Reference:
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/redeploy-to-new-node

Question 10

Your company has an Azure subscription.
You need to deploy a number of Azure virtual machines to the subscription by using Azure Resource Manager (ARM) templates. The virtual machines will be included in a single availability set.
You need to ensure that the ARM template allows for as many virtual machines as possible to remain accessible in the event of fabric failure or maintenance.

Which of the following is the value that you should configure for the platformFaultDomainCount property?
10
30
Min Value
Max Value




Answer is Max Value

The platformFaultDomainCount property in an Azure Resource Manager (ARM) template specifies the number of fault domains for the Azure virtual machines within an availability set. Fault domains are distinct groups of hardware within a datacenter. When you deploy virtual machines within an availability set, Azure ensures that each VM is placed into a different fault domain to minimize the impact of hardware failures or maintenance events.

The maximum value allowed for platformFaultDomainCount depends on the region where you're deploying your resources. It varies across Azure regions. Typically, the maximum value is either 2 or 3. Therefore, to ensure that the ARM template allows for as many virtual machines as possible to remain accessible in the event of fabric failure or maintenance, you should configure

Reference:
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/manage-availability
https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-manage-fault-domains
https://docs.microsoft.com/en-us/azure/virtual-machines/availability-set-overview



Quick access to all questions in this exam