Microsoft AZ-204 Übungsprüfungen
Zuletzt aktualisiert am 23.05.2025- Prüfungscode: AZ-204
- Prüfungsname: Developing Solutions for Microsoft Azure
- Zertifizierungsanbieter: Microsoft
- Zuletzt aktualisiert am: 23.05.2025
You are creating a hazard notification system that has a single signaling server which triggers audio and visual alarms to start and stop.
You implement Azure Service Bus to publish alarms. Each alarm controller uses Azure Service Bus to receive alarm signals as part of a transaction. Alarm events must be recorded for audit purposes. Each transaction record must include information about the alarm type that was activated.
You need to implement a reply trail auditing solution.
Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
- A . Assign the value of the hazard message SessionID property to the ReplyToSessionId property.
- B . Assign the value of the hazard message MessageId property to the DevileryCount property.
- C . Assign the value of the hazard message SessionID property to the SequenceNumber property.
- D . Assign the value of the hazard message MessageId property to the CorrelationId property.
- E . Assign the value of the hazard message SequenceNumber property to the DeliveryCount property.
- F . Assign the value of the hazard message MessageId property to the SequenceNumber property.
You need to implement a solution to resolve the retail store location data issue.
Which three Azure Blob features should you enable? Each correct answer presents part of the solution. NOTE Each correct selection is worth one point
- A . Immutability
- B . Snapshots
- C . Versioning
- D . Soft delete
- E . Object replication
- F . Change feed
You need to implement a solution to resolve the retail store location data issue.
Which three Azure Blob features should you enable? Each correct answer presents part of the solution. NOTE Each correct selection is worth one point
- A . Immutability
- B . Snapshots
- C . Versioning
- D . Soft delete
- E . Object replication
- F . Change feed
You need to implement a solution to resolve the retail store location data issue.
Which three Azure Blob features should you enable? Each correct answer presents part of the solution. NOTE Each correct selection is worth one point
- A . Immutability
- B . Snapshots
- C . Versioning
- D . Soft delete
- E . Object replication
- F . Change feed
HOTSPOT
You are developing an Azure-hosted e-commerce web application. The application will use Azure Cosmos DB to store sales orders. You are using the latest SDK to manage the sales orders in the database.
You create a new Azure Cosmos DB instance. You include a valid endpoint and valid authorization key to an appSettings.json file in the code project.
You are evaluating the following application code: (Line number are included for reference only.)
For each of the following statements, select Yes if the statement is true. Otherwise, select No. NOTE: Each correct selection is worth one point.
HOTSPOT
You are developing an application that includes two Docker containers.
The application must meet the following requirements
✑ The containers must not run as root.
✑ The containers must be deployed to Azure Container Instances by using a YAML file.
✑ The containers must share a lifecycle, resources, local network and storage volume.
✑ The storage volume must persist through container crashes.
✑ The storage volume must be destroyed on stop or restart of the containers.
You need to configure Azure Container Instances for the application.
Topic 3, City Power & Light
Case study
Overview
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
City Power & Light company provides electrical infrastructure monitoring solutions for homes and businesses. The company is migrating solutions to Azure.
Current environment
Architecture overview
The company has a public website located at http://www.cpandl.com/. The site is a single-page web application that runs in Azure App Service on Linux. The website uses files stored in Azure Storage and cached in Azure Content Delivery Network (CDN) to serve static content.
API Management and Azure Function App functions are used to process and store data in Azure Database for PostgreSQL. API Management is used to broker communications to the Azure Function app functions for Logic app integration. Logic apps are used to orchestrate the data processing while Service Bus and Event Grid handle messaging and events.
The solution uses Application Insights, Azure Monitor, and Azure Key Vault.
Architecture diagram
The company has several applications and services that support their business. The company plans to implement serverless computing where possible.
The overall architecture is shown below.
User authentication
The following steps detail the user authentication process:
✑ The user selects Sign in in the website.
✑ The browser redirects the user to the Azure Active Directory (Azure AD) sign in page.
✑ The user signs in.
✑ Azure AD redirects the user’s session back to the web application. The URL includes an access token.
✑ The web application calls an API and includes the access token in the authentication header. The application ID is sent as the audience (‘aud’) claim in the access token.
✑ The back-end API validates the access token.
Requirements
Corporate website
✑ Communications and content must be secured by using SSL.
✑ Communications must use HTTPS.
✑ Data must be replicated to a secondary region and three availability zones.
✑ Data storage costs must be minimized.
Azure Database for PostgreSQL
The database connection string is stored in Azure Key Vault with the following attributes:
✑ Azure Key Vault name: cpandlkeyvault
✑ Secret name: PostgreSQLConn
✑ Id: 80df3e46ffcd4f1cb187f79905e9a1e8
The connection information is updated frequently. The application must always use the latest information to connect to the database.
Azure Service Bus and Azure Event Grid
✑ Azure Event Grid must use Azure Service Bus for queue-based load leveling.
✑ Events in Azure Event Grid must be routed directly to Service Bus queues for use in buffering.
✑ Events from Azure Service Bus and other Azure services must continue to be routed to Azure Event Grid for processing.
Security
✑ All SSL certificates and credentials must be stored in Azure Key Vault.
✑ File access must restrict access by IP, protocol, and Azure AD rights.
✑ All user accounts and processes must receive only those privileges which are essential to perform their intended function.
Compliance
Auditing of the file updates and transfers must be enabled to comply with General Data Protection Regulation (GDPR). The file updates must be read-only, stored in the order in which they occurred, include only create, update, delete, and copy operations, and be retained for compliance reasons.
Issues
Corporate website
While testing the site, the following error message displays:
CryptographicException: The system cannot find the file specified.
Function app
You perform local testing for the RequestUserApproval function. The following error
message displays:
‚Timeout value of 00:10:00 exceeded by function: RequestUserApproval‘
The same error message displays when you test the function in an Azure development environment when you run the following Kusto query: FunctionAppLogs
| where FunctionName = = "RequestUserApproval"
Logic app
You test the Logic app in a development environment. The following error message displays:
‚400 Bad Request‘
Troubleshooting of the error shows an HttpTrigger action to call the RequestUserApproval function.
Code
Corporate website
Security.cs:
Function app
RequestUserApproval.cs:
You need to correct the RequestUserApproval Function app error.
What should you do?
- A . Update line RA13 to use the async keyword and return an HttpRequest object value.
- B . Configure the Function app to use an App Service hosting plan. Enable the Always On setting of the hosting plan.
- C . Update the function to be stateful by using Durable Functions to process the request payload.
- D . Update the functionTimeout property of the host.json project file to 15 minutes.
HOTSPOT
You are creating an app that uses Event Grid to connect with other services. Your app’s event data will be sent to a serverless function that checks compliance. This function is maintained by your company.
You write a new event subscription at the scope of your resource. The event must be invalidated after a specific period of time. You need to configure Event Grid to ensure security.
What should you implement? To answer, select the appropriate options in [he answer area. NOTE: Each correct selection is worth one point
You need to investigate the Azure Function app error message in the development environment.
What should you do?
- A . Connect Live Metrics Stream from Application Insights to the Azure Function app and filter the metrics.
- B . Create a new Azure Log Analytics workspace and instrument the Azure Function app with Application Insights.
- C . Update the Azure Function app with extension methods from Microsoft.Extensions.Logging to log events by using the log instance.
- D . Add a new diagnostic setting to the Azure Function app to send logs to Log Analytics.
You are updating an application that stores data on Azure and uses Azure Cosmos DB for storage. The application stores data in multiple documents associated with a single username.
The application requires the ability to update multiple documents for a username in a single ACID operation.
You need to configure Azure Cosmos DB.
Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
- A . Configure Azure Cosmos DB to use the Azure Cosmos DB for Apache Gremlin API.
- B . Configure Azure Cosmos DB to use the Azure Cosmos DB for MongoDB API.
- C . Create a collection sharded on username to store documents.
- D . Create an unsharded collection to store documents.