最新的Microsoft Developing Solutions for Microsoft Azure - AZ-204免費考試真題
Your company has several containers based on the following operating systems:
- Windows Server 2019 Nano Server
- Windows Server 2019 Server Core
- Windows Server 2022 Nano Server
- Windows Server 2022 Server Core
- Linux
You plan to migrate the containers to an Azure Kubernetes cluster.
What is the minimum number of node pools that the cluster must have?
- Windows Server 2019 Nano Server
- Windows Server 2019 Server Core
- Windows Server 2022 Nano Server
- Windows Server 2022 Server Core
- Linux
You plan to migrate the containers to an Azure Kubernetes cluster.
What is the minimum number of node pools that the cluster must have?
正確答案: A
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 are implementing an application by using Azure Event Grid to push near-real-time information to customers.
You have the following requirements:
- You must send events to thousands of customers that include hundreds
of various event types.
- The events must be filtered by event type before processing.
- Authentication and authorization must be handled by using Microsoft
Entra ID.
- The events must be published to a single endpoint.
You need to implement Azure Event Grid.
Solution: Publish events to a partner topic. Create an event subscription for each customer.
Does the solution meet the goal?
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 are implementing an application by using Azure Event Grid to push near-real-time information to customers.
You have the following requirements:
- You must send events to thousands of customers that include hundreds
of various event types.
- The events must be filtered by event type before processing.
- Authentication and authorization must be handled by using Microsoft
Entra ID.
- The events must be published to a single endpoint.
You need to implement Azure Event Grid.
Solution: Publish events to a partner topic. Create an event subscription for each customer.
Does the solution meet the goal?
正確答案: A
Case Study 1 - Litware Inc
Background
You are a developer for Litware Inc., a SaaS company that provides a solution for managing employee expenses. The solution consists of an ASP.NET Core Web API project that is deployed as an Azure Web App.
Overall architecture
Employees upload receipts for the system to process. When processing is complete, the employee receives a summary report email that details the processing results. Employees then use a web application to manage their receipts and perform any additional tasks needed for reimbursement.
Receipt processing
Employees may upload receipts in two ways:
* Uploading using an Azure Files mounted folder
* Uploading using the web application
Data Storage
Receipt and employee information is stored in an Azure SQL database.
Documentation
Employees are provided with a getting started document when they first use the solution. The documentation includes details on supported operating systems for Azure File upload, and instructions on how to configure the mounted folder.
Solution details
Users table

Web Application
You enable MSI for the Web App and configure the Web App to use the security principal name WebAppIdentity.
Processing
Processing is performed by an Azure Function that uses version 2 of the Azure Function runtime.
Once processing is completed, results are stored in Azure Blob
Storage and an Azure SQL database. Then, an email summary is sent to the user with a link to the processing report. The link to the report must remain valid if the email is forwarded to another user.
Logging
Azure Application Insights is used for telemetry and logging in both the processor and the web application. The processor also has TraceWriter logging enabled.
Application Insights must always contain all log messages.
Requirements
Receipt processing
Concurrent processing of a receipt must be prevented.
Disaster recovery
Regional outage must not impact application availability. All DR operations must not be dependent on application running and must ensure that data in the DR region is up to date.
Security
* Users' SecurityPin must be stored in such a way that access to the database does not allow the
viewing of SecurityPins. The web application is the only system that should have access to SecurityPins.
* All certificates and secrets used to secure data must be stored in Azure Key Vault.
* You must adhere to the principle of least privilege and provide privileges which are essential to
perform the intended function.
* All access to Azure Storage and Azure SQL database must use the application's Managed
Service Identity (MSI)
* Receipt data must always be encrypted at rest.
* All data must be protected in transit
* User's expense account number must be visible only to logged in users. All other views of the
expense account number should include only the last segment, with the remaining parts obscured.
* In the case of a security breach access to all summary reports must be revoked without
impacting other parts of the system.
Issues
Upload format issue
Employees occasionally report an issue with uploading a receipt using the web application. They report that when they upload a receipt using the Azure File Share, the receipt does not appear in their profile. When this occurs, they delete the file in the file share and use the web application, which returns a 500 Internal Server error page.
Capacity issue
During busy periods, employees report long delays between the time they upload the receipt and when it appears in the web application.
Log capacity issue
Developers report that the number of log message in the trace output for the processor is too high, resulting in lost log messages.
Application code
Processing.cs

Database.cs

ReceiptUploader.cs

ConfigureSSE.ps1

You need to resolve the capacity issue.
What should you do?
Background
You are a developer for Litware Inc., a SaaS company that provides a solution for managing employee expenses. The solution consists of an ASP.NET Core Web API project that is deployed as an Azure Web App.
Overall architecture
Employees upload receipts for the system to process. When processing is complete, the employee receives a summary report email that details the processing results. Employees then use a web application to manage their receipts and perform any additional tasks needed for reimbursement.
Receipt processing
Employees may upload receipts in two ways:
* Uploading using an Azure Files mounted folder
* Uploading using the web application
Data Storage
Receipt and employee information is stored in an Azure SQL database.
Documentation
Employees are provided with a getting started document when they first use the solution. The documentation includes details on supported operating systems for Azure File upload, and instructions on how to configure the mounted folder.
Solution details
Users table

Web Application
You enable MSI for the Web App and configure the Web App to use the security principal name WebAppIdentity.
Processing
Processing is performed by an Azure Function that uses version 2 of the Azure Function runtime.
Once processing is completed, results are stored in Azure Blob
Storage and an Azure SQL database. Then, an email summary is sent to the user with a link to the processing report. The link to the report must remain valid if the email is forwarded to another user.
Logging
Azure Application Insights is used for telemetry and logging in both the processor and the web application. The processor also has TraceWriter logging enabled.
Application Insights must always contain all log messages.
Requirements
Receipt processing
Concurrent processing of a receipt must be prevented.
Disaster recovery
Regional outage must not impact application availability. All DR operations must not be dependent on application running and must ensure that data in the DR region is up to date.
Security
* Users' SecurityPin must be stored in such a way that access to the database does not allow the
viewing of SecurityPins. The web application is the only system that should have access to SecurityPins.
* All certificates and secrets used to secure data must be stored in Azure Key Vault.
* You must adhere to the principle of least privilege and provide privileges which are essential to
perform the intended function.
* All access to Azure Storage and Azure SQL database must use the application's Managed
Service Identity (MSI)
* Receipt data must always be encrypted at rest.
* All data must be protected in transit
* User's expense account number must be visible only to logged in users. All other views of the
expense account number should include only the last segment, with the remaining parts obscured.
* In the case of a security breach access to all summary reports must be revoked without
impacting other parts of the system.
Issues
Upload format issue
Employees occasionally report an issue with uploading a receipt using the web application. They report that when they upload a receipt using the Azure File Share, the receipt does not appear in their profile. When this occurs, they delete the file in the file share and use the web application, which returns a 500 Internal Server error page.
Capacity issue
During busy periods, employees report long delays between the time they upload the receipt and when it appears in the web application.
Log capacity issue
Developers report that the number of log message in the trace output for the processor is too high, resulting in lost log messages.
Application code
Processing.cs

Database.cs

ReceiptUploader.cs

ConfigureSSE.ps1

You need to resolve the capacity issue.
What should you do?
正確答案: D
說明:(僅 Fast2test 成員可見)
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.17command.
Does this meet the goal?
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.17command.
Does this meet the goal?
正確答案: A
說明:(僅 Fast2test 成員可見)
Drag and Drop Question
You are a developer for a company that provides a bookings management service in the tourism industry. You are implementing Azure Search for the tour agencies listed in your company's solution.
You create the index in Azure Search. You now need to use the Azure Search .NET SDK to import the relevant data into the Azure Search service.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions from left to right and arrange them in the correct order.

You are a developer for a company that provides a bookings management service in the tourism industry. You are implementing Azure Search for the tour agencies listed in your company's solution.
You create the index in Azure Search. You now need to use the Azure Search .NET SDK to import the relevant data into the Azure Search service.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions from left to right and arrange them in the correct order.

正確答案:

Explanation:
1. The index needs to be populated. To do this, we will need a SearchIndexClient. There are two ways to obtain one: by constructing it, or by calling Indexes.GetClient on the SearchServiceClient.
Here we will use the first method.
2. Create the indexBatch with the documents
Something like:
var hotels = new Hotel[];
{
new Hotel()
{
HotelId = "3",
BaseRate = 129.99,
Description = "Close to town hall and the river"
}
};
...
var batch = IndexBatch.Upload(hotels);
3. The next step is to populate the newly-created index
Example:
var batch = IndexBatch.Upload(hotels);
try
{
indexClient.Documents.Index(batch);
}
Reference:
https://docs.microsoft.com/en-us/azure/search/search-howto-dotnet-sdk
Note: The question is included in a number of questions that depicts the identical set-up.
However, every question has a distinctive result. Establish if the solution satisfies the requirements.
You are configuring a web app that delivers streaming video to users. The application makes use of continuous integration and deployment.
You need to ensure that the application is highly available and that the users' streaming experience is constant. You also want to configure the application to store data in a geographic location that is nearest to the user.
Solution: You include the use of an Azure Content Delivery Network (CDN) in your design.
Does the solution meet the goal?
However, every question has a distinctive result. Establish if the solution satisfies the requirements.
You are configuring a web app that delivers streaming video to users. The application makes use of continuous integration and deployment.
You need to ensure that the application is highly available and that the users' streaming experience is constant. You also want to configure the application to store data in a geographic location that is nearest to the user.
Solution: You include the use of an Azure Content Delivery Network (CDN) in your design.
Does the solution meet the goal?
正確答案: B
說明:(僅 Fast2test 成員可見)
Case Study 2 - Coho Winery
LabelMaker app
Coho Winery produces bottles, and distributes a variety of wines globally. You are developer implementing highly scalable and resilient applications to support online order processing by using Azure solutions.
Coho Winery has a LabelMaker application that prints labels for wine bottles. The application sends data to several printers. The application consists of five modules that run independently on virtual machines (VMs). Coho Winery plans to move the application to Azure and continue to support label creation.
External partners send data to the LabelMaker application to include artwork and text for custom label designs.
Data
You identify the following requirements for data management and manipulation:
* Order data is stored as nonrelational JSON and must be queried using Structured Query
Language (SQL).
* Changes to the Order data must reflect immediately across all partitions. All reads to the Order
data must fetch the most recent writes.
You have the following security requirements:
* Users of Coho Winery applications must be able to provide access to documents, resources,
and applications to external partners.
* External partners must use their own credentials and authenticate with their organization's
identity management solution.
* External partner logins must be audited monthly for application use by a user account
administrator to maintain company compliance.
* Storage of e-commerce application settings must be maintained in Azure Key Vault.
* E-commerce application sign-ins must be secured by using Azure App Service authentication
and Azure Active Directory (AAD).
* Conditional access policies must be applied at the application level to protect company content
* The LabelMaker applications must be secured by using an AAD account that has full access to
all namespaces of the Azure Kubernetes Service (AKS) cluster.
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.

Calls to the Printer API App fail periodically due to printer communication timeouts.
Printer communications timeouts occur after 10 seconds. The label printer must only receive up to 5 attempts within one minute.
The order workflow fails to run upon initial deployment to Azure.
Order .json

Hotspot Question
You need to retrieve all order line items from Order.json and sort the data alphabetically by the city.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

LabelMaker app
Coho Winery produces bottles, and distributes a variety of wines globally. You are developer implementing highly scalable and resilient applications to support online order processing by using Azure solutions.
Coho Winery has a LabelMaker application that prints labels for wine bottles. The application sends data to several printers. The application consists of five modules that run independently on virtual machines (VMs). Coho Winery plans to move the application to Azure and continue to support label creation.
External partners send data to the LabelMaker application to include artwork and text for custom label designs.
Data
You identify the following requirements for data management and manipulation:
* Order data is stored as nonrelational JSON and must be queried using Structured Query
Language (SQL).
* Changes to the Order data must reflect immediately across all partitions. All reads to the Order
data must fetch the most recent writes.
You have the following security requirements:
* Users of Coho Winery applications must be able to provide access to documents, resources,
and applications to external partners.
* External partners must use their own credentials and authenticate with their organization's
identity management solution.
* External partner logins must be audited monthly for application use by a user account
administrator to maintain company compliance.
* Storage of e-commerce application settings must be maintained in Azure Key Vault.
* E-commerce application sign-ins must be secured by using Azure App Service authentication
and Azure Active Directory (AAD).
* Conditional access policies must be applied at the application level to protect company content
* The LabelMaker applications must be secured by using an AAD account that has full access to
all namespaces of the Azure Kubernetes Service (AKS) cluster.
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.

Calls to the Printer API App fail periodically due to printer communication timeouts.
Printer communications timeouts occur after 10 seconds. The label printer must only receive up to 5 attempts within one minute.
The order workflow fails to run upon initial deployment to Azure.
Order .json

Hotspot Question
You need to retrieve all order line items from Order.json and sort the data alphabetically by the city.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

正確答案:

Explanation:
Box 1: orders o
Scenario: Order data is stored as nonrelational JSON and must be queried using SQL.
Box 2:li
Box 3: o.line_items
Box 4: o.address.city
Address is not joined, so it has to be o.city
You are designing a multi-tiered application that will be hosted on Azure virtual machines. The virtual machines will run Windows Server. Front-end servers will be accessible from the Internet over port 443. The other servers will NOT be directly accessible over the internet.
You need to recommend a solution to manage the virtual machines that meets the following requirement:
- Allows the virtual machine to be administered by using Remote
Desktop.
- Minimizes the exposure of the virtual machines on the Internet
Which Azure service should you recommend?
You need to recommend a solution to manage the virtual machines that meets the following requirement:
- Allows the virtual machine to be administered by using Remote
Desktop.
- Minimizes the exposure of the virtual machines on the Internet
Which Azure service should you recommend?
正確答案: C
Case Study 4 - Best for You Organics
Background
Best for You Organics Company is a global restaurant franchise that has multiple locations. The company wants to enhance user experiences and vendor integrations. The company plans to implement automated mobile ordering and delivery services.
Best For You Organics hosts an Azure web app at the URL https://www.bestforyouorganics.com.
Users can use the web app to browse restaurant locations, menu items, nutritional, information, and company information. The company developed and deployed a cross-platform mobile app.
Requirements
You must develop a chartbot by using the Bot Builder SDK and Language Understanding Intelligence Service (LUIS). The chatbot must allow users to order food for pickup or delivery.
The chatbot must meet the following requirements:
* Ensure that chatbot endpoint can be accessed only by the Bot Framework connector.
* Use natural language processing and speech recognition so that users can interact with the
chatbot by using text and voice. Processing must be server-based.
* Alert users about promotions at local restaurants.
* Enable users to place an order for delivery or pickup by using their voice.
* Greet the user upon sign-in by displaying a graphical interface that contains action buttons.
* The chatbot greeting interface must match the formatting of the following example:

Vendor API
Vendors receive and provide updates for the restaurant inventory and delivery services by using Azure API Management hosted APIs. Each vendor uses their own subscription to access each of the APIs.
APIs must meet the following conditions:
* API usage must not exceed 5,000 calls and 50,000 kilobytes of bandwidth per hour per vendor.
* If a vendor is nearing the number of calls or bandwidth limit, the API must trigger email
notifications to the vendor.
* APIs must prevent API usage spikes on a per-subscription basis by limiting the call rate to 100
calls per minute.
* The Inventory API must be written by using ASP.NET Core and Node.js.
* The API must be updated to provide an interface to Azure SQL Database. Database objects
must be managed by using code.
* The Delivery API must be protected by using the OAuth 2.0 protocol with Azure Active Directory
(Azure AD) when called from the Azure web app. You register the Delivery API and web app in Azure AD. You enable OAuth 2.0 in the web app.
* The delivery API must update the Products table, the Vendor transactions table, and the Billing
table in a single transaction.
The Best For You Organics Company architecture team has created the following diagram depicting the expected deployments into Azure:

Delivery API
The Delivery API intermittently throws the following exception:

Chatbot greeting
The chatbot's greeting does not show the user's name. You need to debug the chatbot locally.
Language processing
Users report that the bot fails to understand when a customer attempts to order dishes that use Italian names.
Relevant portions of the app files are shown below. Line numbers are included for reference only and include a two-character prefix that denotes the specific file to which they belong.
Startup.cs

Hotspot Question
You need to update the Inventory API.
Which development tools should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Background
Best for You Organics Company is a global restaurant franchise that has multiple locations. The company wants to enhance user experiences and vendor integrations. The company plans to implement automated mobile ordering and delivery services.
Best For You Organics hosts an Azure web app at the URL https://www.bestforyouorganics.com.
Users can use the web app to browse restaurant locations, menu items, nutritional, information, and company information. The company developed and deployed a cross-platform mobile app.
Requirements
You must develop a chartbot by using the Bot Builder SDK and Language Understanding Intelligence Service (LUIS). The chatbot must allow users to order food for pickup or delivery.
The chatbot must meet the following requirements:
* Ensure that chatbot endpoint can be accessed only by the Bot Framework connector.
* Use natural language processing and speech recognition so that users can interact with the
chatbot by using text and voice. Processing must be server-based.
* Alert users about promotions at local restaurants.
* Enable users to place an order for delivery or pickup by using their voice.
* Greet the user upon sign-in by displaying a graphical interface that contains action buttons.
* The chatbot greeting interface must match the formatting of the following example:

Vendor API
Vendors receive and provide updates for the restaurant inventory and delivery services by using Azure API Management hosted APIs. Each vendor uses their own subscription to access each of the APIs.
APIs must meet the following conditions:
* API usage must not exceed 5,000 calls and 50,000 kilobytes of bandwidth per hour per vendor.
* If a vendor is nearing the number of calls or bandwidth limit, the API must trigger email
notifications to the vendor.
* APIs must prevent API usage spikes on a per-subscription basis by limiting the call rate to 100
calls per minute.
* The Inventory API must be written by using ASP.NET Core and Node.js.
* The API must be updated to provide an interface to Azure SQL Database. Database objects
must be managed by using code.
* The Delivery API must be protected by using the OAuth 2.0 protocol with Azure Active Directory
(Azure AD) when called from the Azure web app. You register the Delivery API and web app in Azure AD. You enable OAuth 2.0 in the web app.
* The delivery API must update the Products table, the Vendor transactions table, and the Billing
table in a single transaction.
The Best For You Organics Company architecture team has created the following diagram depicting the expected deployments into Azure:

Delivery API
The Delivery API intermittently throws the following exception:

Chatbot greeting
The chatbot's greeting does not show the user's name. You need to debug the chatbot locally.
Language processing
Users report that the bot fails to understand when a customer attempts to order dishes that use Italian names.
Relevant portions of the app files are shown below. Line numbers are included for reference only and include a two-character prefix that denotes the specific file to which they belong.
Startup.cs

Hotspot Question
You need to update the Inventory API.
Which development tools should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

正確答案:

Explanation:
Scenario: The Inventory API must be written by using ASP.NET Core and Node.js.
Box 1: Entity Framework Core
Box 2: Code first
References:
https://docs.microsoft.com/en-us/aspnet/mvc/overview/getting-started/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net- mvc-application
Hotspot Question
You are debugging an application that is running on Azure Kubernetes cluster named cluster1.
The cluster uses Azure Monitor for containers to monitor the cluster.
The application has sticky sessions enabled on the ingress controller.
Some customers report a large number of errors in the application over the last 24 hours.
You need to determine on which virtual machines (VMs) the errors are occurring.
How should you complete the Azure Monitor query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

You are debugging an application that is running on Azure Kubernetes cluster named cluster1.
The cluster uses Azure Monitor for containers to monitor the cluster.
The application has sticky sessions enabled on the ingress controller.
Some customers report a large number of errors in the application over the last 24 hours.
You need to determine on which virtual machines (VMs) the errors are occurring.
How should you complete the Azure Monitor query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

正確答案:

Explanation:
Box 1: ago(1d)
Box 2: distinct containerID
Box 3: where ContainerID in (ContainerIDs)
Box 4: summarize Count by Computer
Summarize: aggregate groups of rows
Use summarize to identify groups of records, according to one or more columns, and apply aggregations to them. The most common use of summarize is count, which returns the number of results in each group.
Reference:
https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/get-started-queries
https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/query-optimization