Microsoft

AZ-204 Free Practice Questions — Page 23

Question 232

HOTSPOT - You are developing an Azure Durable Function based application that processes a list of input values. The application is monitored using a console application that retrieves JSON data from an Azure Function diagnostic endpoint. During processing a single instance of invalid input does not cause the function to fail. Invalid input must be available to the monitoring application. You need to implement the Azure Durable Function and the monitoring console application. How should you complete the code segments? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

Illustration for AZ-204 question 232
Show Answer
Correct Answer: context.SetCustomStatus(input[errIndex]) Completed runtimeStatus
Explanation:
Use custom status to publish the invalid input without failing the orchestration. The orchestration completes successfully, so the runtimeStatus is Completed and can be checked by the monitoring app.

Question 233

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?

A. Yes
B. No
Show Answer
Correct Answer: B
Explanation:
Installing only the Azure CLI and running kubectl apply is insufficient. You must have kubectl installed and, critically, authenticate and connect to the AKS cluster (for example, using az aks get-credentials) before kubectl can apply a manifest. Therefore, as stated, the solution does not meet the goal.

Question 234

DRAG DROP - You are developing a serverless Java application on Azure. You create a new Azure Key Vault to work with secrets from a new Azure Functions application. The application must meet the following requirements: ✑ Reference the Azure Key Vault without requiring any changes to the Java code. ✑ Dynamically add and remove instances of the Azure Functions host based on the number of incoming application events. ✑ Ensure that instances are perpetually warm to avoid any cold starts. ✑ Connect to a VNet. ✑ Authentication to the Azure Key Vault instance must be removed if the Azure Function application is deleted. You need to grant the Azure Functions application access to the Azure Key Vault. 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:

Illustration for AZ-204 question 234
Show Answer
Correct Answer: Create the Azure Functions app with a Premium plan type. Create a system-assigned managed identity for the application. Create an access policy in Azure Key Vault for the application identity.
Explanation:
Premium plan supports VNet integration, elastic scaling, and keeps instances warm to avoid cold starts. A system-assigned managed identity is automatically removed when the Function App is deleted. Granting a Key Vault access policy allows the Function App to access secrets without code changes.

Question 235

DRAG DROP - Fourth Coffee has an ASP.NET Core web app that runs in Docker. The app is mapped to the www.fourthcoffee.com domain. Fourth Coffee is migrating this application to Azure. You need to provision an App Service Web App to host this docker image and map the custom domain to the App Service web app. A resource group named FourthCoffeePublicWebResourceGroup has been created in the WestUS region that contains an App Service Plan named AppServiceLinuxDockerPlan. Which order should the CLI commands be used to develop the solution? To answer, move all of the Azure CLI commands from the list of commands to the answer area and arrange them in the correct order. Select and Place:

Illustration for AZ-204 question 235
Show Answer
Correct Answer: # /bin/bash (set variables) az webapp create az webapp config container set az webapp config hostname add
Explanation:
First define variables for reuse. Create the Web App in the existing Linux App Service plan. Then configure the app to use the Docker image. Finally, map the custom domain after the app exists and is configured.

Question 236

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You develop and deploy an Azure App Service API app to a Windows-hosted deployment slot named Development. You create additional deployment slots named Testing and Production. You enable auto swap on the Production deployment slot. You need to ensure that scripts run and resources are available before a swap operation occurs. Solution: Disable auto swap. Update the app with a method named statuscheck to run the scripts. Re-enable auto swap and deploy the app to the Production slot. Does the solution meet the goal?

A. No
B. Yes
Show Answer
Correct Answer: A
Explanation:
The solution does not ensure scripts run before a swap. Simply adding a method named statuscheck does not make Azure App Service call it during slot warm-up. Auto swap requires proper warm-up configuration (such as WEBSITE_SWAP_WARMUP_PING_PATH or applicationInitialization in web.config) on the source slot. Disabling and re-enabling auto swap alone does not guarantee pre-swap execution of scripts or resource readiness.

Question 237

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You develop and deploy an Azure App Service API app to a Windows-hosted deployment slot named Development. You create additional deployment slots named Testing and Production. You enable auto swap on the Production deployment slot. You need to ensure that scripts run and resources are available before a swap operation occurs. Solution: Update the web.config file to include the applicationInitialization configuration element. Specify custom initialization actions to run the scripts. Does the solution meet the goal?

A. No
B. Yes
Show Answer
Correct Answer: B
Explanation:
Azure App Service supports custom warm-up logic during slot swaps by using the IIS applicationInitialization element in web.config. This allows scripts or initialization actions to run and resources to be prepared before the swap completes, which meets the requirement to ensure readiness prior to an auto-swap operation.

Question 238

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You develop and deploy an Azure App Service API app to a Windows-hosted deployment slot named Development. You create additional deployment slots named Testing and Production. You enable auto swap on the Production deployment slot. You need to ensure that scripts run and resources are available before a swap operation occurs. Solution: Enable auto swap for the Testing slot. Deploy the app to the Testing slot. Does the solution meet the goal?

A. No
B. Yes
Show Answer
Correct Answer: A
Explanation:
The goal is to ensure scripts run and required resources are available *before* a swap occurs. Simply enabling auto swap on the Testing slot and deploying there only causes an automatic swap after deployment; it does not configure or guarantee pre-swap script execution or custom warm‑up/initialization logic (such as applicationInitialization or health checks). Therefore, the proposed solution does not meet the stated requirement.

Question 240

You need to audit the retail store sales transactions. What are two possible ways to achieve the goal? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

A. Update the retail store location data upload process to include blob index tags. Create an Azure Function to process the blob index tags and filter by store location.
B. Process the change feed logs of the Azure Blob storage account by using an Azure Function. Specify a time range for the change feed data.
C. Enable blob versioning for the storage account. Use an Azure Function to process a list of the blob versions per day.
D. Process an Azure Storage blob inventory report by using an Azure Function. Create rule filters on the blob inventory report.
E. Subscribe to blob storage events by using an Azure Function and Azure Event Grid. Filter the events by store location.
Show Answer
Correct Answer: B, E
Explanation:
Auditing sales transactions requires capturing and reviewing changes to transaction data over time. B: Azure Blob Storage change feed provides an ordered, immutable log of all blob changes. Processing the change feed with an Azure Function and a specified time range enables reliable auditing of transactions for a given period (for example, nightly audits). E: Subscribing to Blob Storage events via Azure Event Grid and processing them with an Azure Function enables capturing create/update/delete events as they occur. Filtering by store location provides an auditable trail of transaction-related changes per store. Other options do not provide a complete or reliable transaction audit: blob index tags and inventory focus on metadata/state, and blob versioning lists versions but does not provide a transactional change log.

Question 241

HOTSPOT - You need to secure the Shipping Function app. How should you configure the app? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:

Illustration for AZ-204 question 241
Show Answer
Correct Answer: Authorization level: Anonymous User claims: JSON Web Token (JWT) Trigger type: HTTP
Explanation:
When securing Azure Functions with app-level authentication using Microsoft Entra ID (Azure AD), the HTTP-triggered function authorization level must be set to Anonymous so that access keys are not required. Authentication and authorization are handled by Azure AD using JWTs containing user claims. The function must use an HTTP trigger to accept authenticated HTTP requests.

Question 242

You need to secure the Azure Functions to meet the security requirements. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

A. Store the RSA-HSM key in Azure Key Vault with soft-delete and purge-protection features enabled.
B. Store the RSA-HSM key in Azure Blob storage with an immutability policy applied to the container.
C. Create a free tier Azure App Configuration instance with a new Azure AD service principal.
D. Create a standard tier Azure App Configuration instance with an assigned Azure AD managed identity.
E. Store the RSA-HSM key in Azure Cosmos DB. Apply the built-in policies for customer-managed keys and allowed locations.
Show Answer
Correct Answer: A, D
Explanation:
The requirements state that configuration data must be encrypted using a company-provided RSA-HSM key and that authentication/authorization should use Azure AD with managed identities where possible. Azure Key Vault with soft-delete and purge protection is the correct service to securely store and protect RSA-HSM keys. Azure App Configuration should be used to centralize configuration, and only the Standard tier supports customer-managed keys and integration with managed identities, making it the correct choice over the Free tier.

$19

Get all 447 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.