Microsoft

AZ-204 Free Practice Questions — Page 12

Question 116

HOTSPOT - You develop a Python application for image rendering. The application uses GPU resources to optimize rendering processes. You have the following requirements: • The application must be deployed to a Linux container. • The container must be stopped when the image rendering is complete. • The solution must minimize cost. You need to deploy the application to Azure.

Illustration for AZ-204 question 116
Show Answer
Correct Answer: Compute target: Azure Container Instances Container termination: Restart policy
Explanation:
Azure Container Instances support Linux containers with GPU, are billed per second, and are ideal for run-once jobs, minimizing cost. Setting the restart policy to Never ensures the container stops after rendering completes.

Question 117

DRAG DROP - You are developing several microservices named serviceA, serviceB, and serviceC. You deploy the microservices to a new Azure Container Apps environment. You have the following requirements: • The microservices must persist data to storage. • serviceA must persist data only visible to the current container and the storage must be restricted to the amount of disk space available in the container. • serviceB must persist data for the lifetime of the replica and allow multiple containers in the replica to mount the same storage location. • serviceC must persist data beyond the lifetime of the replica while allowing multiple containers to access the storage and enable per object permissions. You need to configure storage for each microservice. Which storage type should you use? To answer, drag the appropriate storage types to the correct microservices. Each storage type 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.

Illustration for AZ-204 question 117
Show Answer
Correct Answer: serviceA: Container file system serviceB: Ephemeral volume serviceC: Azure Files storage
Explanation:
serviceA requires storage visible only inside a single container and limited to container disk, which matches the container file system. serviceB needs storage that lasts for the lifetime of a replica and can be shared by containers in that replica, which is provided by an ephemeral volume. serviceC must persist data beyond replica lifetime, be accessible by multiple containers, and support granular permissions, which fits Azure Files storage.

Question 118

You have a Linux container-based console application that uploads image files from customer sites all over the world. A back-end system that runs on Azure virtual machines processes the images by using the Azure Blobs API. You are not permitted to make changes to the application. Some customer sites only have phone-based internet connections. You need to configure the console application to access the images. What should you use?

A. Azure BlobFuse
B. Azure Disks
C. Azure Storage Network File System (NFS) 3.0 support
D. Azure Files
Show Answer
Correct Answer: A
Explanation:
The application runs in a Linux container and cannot be modified, yet it must upload images to Azure Blob Storage. Azure BlobFuse mounts an Azure Blob container as a POSIX-like file system on Linux, allowing an existing application to read/write files without code changes while still using Blob Storage. Azure Disks are VM-only block storage, Azure Files requires SMB/NFS semantics and different access patterns, and Blob Storage NFS 3.0 is more restrictive and not suitable for general container uploads over constrained connections. Therefore, Azure BlobFuse is the correct choice.

Question 119

HOTSPOT - You plan to develop an Azure Functions app with an Azure Blob Storage trigger. The app will be used infrequently, with a limited duration of individual executions. The app must meet the following requirements: • Event-driven scaling • Support for deployment slots • Minimize costs You need to identify the hosting plan and the maximum duration when executing the app. Which configuration setting values should you use? To answer, select the appropriate values in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-204 question 119
Show Answer
Correct Answer: Hosting plan: Consumption Maximum execution time: 10 minutes
Explanation:
The Consumption plan provides event-driven scaling and the lowest cost for infrequent workloads, and it supports deployment slots. In the Consumption plan, the maximum function execution duration is 10 minutes.

Question 120

HOTSPOT - You plan to develop an Azure Functions app with an HTTP trigger. The app must support the following requirements: • Event-driven scaling • Ability to use custom Linux images for function execution You need to identify the app’s hosting plan and the maximum amount of time that the app function can take to respond to incoming requests. Which configuration setting values should you use? To answer, select the appropriate values in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-204 question 120
Show Answer
Correct Answer: Hosting plan: Premium Timeout value: 230 seconds
Explanation:
Event-driven scaling with support for custom Linux images requires the Azure Functions Premium plan. Although Premium supports unlimited function timeouts, HTTP-triggered functions are constrained by the Azure Load Balancer idle timeout, which limits responses to about 230 seconds regardless of plan.

Question 121

You develop a web application that sells access to last-minute openings for child camps that run on the weekends. The application uses Azure Application Insights for all alerting and monitoring. The application must alert operators when a technical issue is preventing sales to camps. You need to build an alert to detect technical issues. Which alert type should you use?

A. Metric alert using multiple time series
B. Metric alert using dynamic thresholds
C. Log alert using multiple time series
D. Log alert using dynamic thresholds
Show Answer
Correct Answer: B
Explanation:
To detect technical issues preventing sales, you want an alert that can automatically recognize abnormal behavior compared to the application’s normal pattern, such as an unexpected drop in successful requests or increase in failures. Azure Application Insights exposes key application metrics (requests, failed requests, availability, dependency failures) that directly reflect sales flow health. Metric alerts with dynamic thresholds are designed for this scenario: they learn historical baselines and trigger when behavior deviates, without requiring fixed thresholds. Log alerts are better for detailed diagnostics or custom queries, but for proactive, reliable detection of sales-impacting technical issues, dynamic metric alerts are the recommended and simplest choice.

Question 122

A company is developing a solution that allows smart refrigerators to send temperature information to a central location. The solution must receive and store messages until they can be processed. You create an Azure Service Bus instance by providing a name, pricing tier, subscription, resource group, and location. You need to complete the configuration. Which Azure CLI or PowerShell command should you run?

A.
B.
C.
D.
Show Answer
Correct Answer: D
Explanation:
After creating the Service Bus namespace, you must create a queue so messages can be received and stored until processed. The correct command is the one that creates a Service Bus queue within the existing namespace (for example, using az servicebus queue create or New-AzServiceBusQueue). Option D corresponds to creating the queue, which completes the required configuration.

Question 123

You have an Azure API Management (APIM) Standard tier instance named APIM1 that uses a managed gateway. You plan to use APIM1 to publish an API named API1 that uses a backend database that supports only a limited volume of requests per minute. You also need a policy for API1 that will minimize the possibility that the number of requests to the backend database from an individual IP address you specify exceeds the supported limit. You need to identify a policy for API1 that will meet the requirements. Which policy should you use?

A. ip-filter
B. quota-by-key
C. rate-limit-by-key
D. rate-limit
Show Answer
Correct Answer: C
Explanation:
The requirement is to limit the number of requests per minute sent to the backend from an individual specified IP address. The rate-limit-by-key policy is designed for this scenario because it enforces a call rate over a defined time window (such as per minute) based on a key, which can be the client IP address. This helps prevent request spikes from a single IP. The ip-filter policy only allows or blocks IPs, quota-by-key enforces longer-term quotas rather than per-minute limits, and rate-limit applies globally rather than per key.

Question 124

HOTSPOT - Case study - This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided. To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study. At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section. To start the case study - To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. When you are ready to answer a question, click the Question button to return to the question. Background - VanArsdel, Ltd. is a global office supply company. The company is based in Canada and has retail store locations across the world. The company is developing several cloud-based solutions to support their stores, distributors, suppliers, and delivery services. Current environment - Corporate website - The company provides a public website located at http://www.vanarsdelltd.com. The website consists of a React JavaScript user interface, HTML, CSS, image assets, and several APIs hosted in Azure Functions. Retail Store Locations - The company supports thousands of store locations globally. Store locations send data every hour to an Azure Blob storage account to support inventory, purchasing and delivery services. Each record includes a location identifier and sales transaction information. Requirements - The application components must meet the following requirements: Corporate website - • Secure the website by using SSL. • Minimize costs for data storage and hosting. • Implement native GitHub workflows for continuous integration and continuous deployment (CI/CD). • Distribute the website content globally for local use. • Implement monitoring by using Application Insights and availability web tests including SSL certificate validity and custom header value verification. • The website must have 99.95 percent uptime. Retail store locations - • Azure Functions must process data immediately when data is uploaded to Blob storage. Azure Functions must update Azure Cosmos DB by using native SQL language queries. • Audit store sale transaction information nightly to validate data, process sales financials, and reconcile inventory. Delivery services - • Store service telemetry data in Azure Cosmos DB by using an Azure Function. Data must include an item id, the delivery vehicle license plate, vehicle package capacity, and current vehicle location coordinates. • Store delivery driver profile information in Azure Active Directory (Azure AD) by using an Azure Function called from the corporate website. Inventory services - The company has contracted a third-party to develop an API for inventory processing that requires access to a specific blob within the retail store storage account for three months to include read-only access to the data. Security - • All Azure Functions must centralize management and distribution of configuration data for different environments and geographies, encrypted by using a company-provided RSA-HSM key. • Authentication and authorization must use Azure AD and services must use managed identities where possible. Issues - Retail Store Locations - • You must perform a point-in-time restoration of the retail store location data due to an unexpected and accidental deletion of data. • Azure Cosmos DB queries from the Azure Function exhibit high Request Unit (RU) usage and contain multiple, complex queries that exhibit high point read latency for large items as the function app is scaling. You need to implement the delivery service telemetry data. How should you configure the solution? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-204 question 124
Show Answer
Correct Answer: API: Core (SQL) Partition Key: Item id
Explanation:
Delivery telemetry is semi-structured JSON and is written/read via Azure Functions, which aligns with Azure Cosmos DB Core (SQL) API. Using Item id as the partition key provides high cardinality, immutability, and efficient point reads, avoiding hot partitions and reducing RU consumption compared to vehicle-based attributes.

Question 125

Case study - This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided. To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study. At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section. To start the case study - To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. When you are ready to answer a question, click the Question button to return to the question. Background - VanArsdel, Ltd. is a global office supply company. The company is based in Canada and has retail store locations across the world. The company is developing several cloud-based solutions to support their stores, distributors, suppliers, and delivery services. Current environment - Corporate website - The company provides a public website located at http://www.vanarsdelltd.com. The website consists of a React JavaScript user interface, HTML, CSS, image assets, and several APIs hosted in Azure Functions. Retail Store Locations - The company supports thousands of store locations globally. Store locations send data every hour to an Azure Blob storage account to support inventory, purchasing and delivery services. Each record includes a location identifier and sales transaction information. Requirements - The application components must meet the following requirements: Corporate website - • Secure the website by using SSL. • Minimize costs for data storage and hosting. • Implement native GitHub workflows for continuous integration and continuous deployment (CI/CD). • Distribute the website content globally for local use. • Implement monitoring by using Application Insights and availability web tests including SSL certificate validity and custom header value verification. • The website must have 99.95 percent uptime. Retail store locations - • Azure Functions must process data immediately when data is uploaded to Blob storage. Azure Functions must update Azure Cosmos DB by using native SQL language queries. • Audit store sale transaction information nightly to validate data, process sales financials, and reconcile inventory. Delivery services - • Store service telemetry data in Azure Cosmos DB by using an Azure Function. Data must include an item id, the delivery vehicle license plate, vehicle package capacity, and current vehicle location coordinates. • Store delivery driver profile information in Azure Active Directory (Azure AD) by using an Azure Function called from the corporate website. Inventory services - The company has contracted a third-party to develop an API for inventory processing that requires access to a specific blob within the retail store storage account for three months to include read-only access to the data. Security - • All Azure Functions must centralize management and distribution of configuration data for different environments and geographies, encrypted by using a company-provided RSA-HSM key. • Authentication and authorization must use Azure AD and services must use managed identities where possible. Issues - Retail Store Locations - • You must perform a point-in-time restoration of the retail store location data due to an unexpected and accidental deletion of data. • Azure Cosmos DB queries from the Azure Function exhibit high Request Unit (RU) usage and contain multiple, complex queries that exhibit high point read latency for large items as the function app is scaling. You need to test the availability of the corporate website. Which two test types can you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

A. Standard
B. URL ping
C. Custom testing using the TrackAvailability API method
D. Multi-step
Show Answer
Correct Answer: A, C
Explanation:
To test availability of the corporate website using Application Insights with SSL validation and custom header verification, Standard availability tests are required because they support TLS/SSL certificate checks and modern global probing. Additionally, custom availability testing using the TrackAvailability API allows you to implement advanced or specialized checks, such as validating custom headers or scenarios not covered by built-in tests. URL ping and multi-step tests are legacy/deprecated and do not fully meet the stated requirements.

$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.