AZ-204 – Question 153

0
1432
Introductory Info
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.

LabelMaker app –
Coho Winery produces, bottles, and distributes a variety of wines globally. You are a 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.

Requirements. Data –
You identify the following requirements for data management and manipulation:

  • Order data is stored as nonrelational JSON and must be queried using SQL.
  • Changes to the Order data must reflect immediately across all partitions.
  • All reads to the Order data must fetch the most recent writes.

Requirements. Security –
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 application must be secured by using an AAD account that has full access to all namespaces of the Azure Kubernetes Service (AKS) cluster.
Requirements. 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.

Architecture –
Issues –
  • Calls to the Printer API App fail periodically due to printer communication timeouts.
  • Printer communication 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 –
Relevant portions of the app files are shown below. Line numbers are included for reference only.
This JSON file contains a representation of the data for an order that includes a single item.

Question 1.
You need to troubleshoot the order workflow.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

A. Review the API connections.
B. Review the activity log.
C. Review the run history.
D. Review the trigger history.

Correct Answer: CD

Scenario: The order workflow fails to run upon initial deployment to Azure.
Check runs history: Each time that the trigger fires for an item or event, the Logic Apps engine creates and runs a separate workflow instance for each item or event. If a run fails, follow these steps to review what happened during that run, including the status for each step in the workflow plus the inputs and outputs for each step.
Check the workflow’s run status by checking the runs history. To view more information about a failed run, including all the steps in that run in their status, select the failed run.

Example:
Check the trigger’s status by checking the trigger history
To view more information about the trigger attempt, select that trigger event, for example:

Question 2.

HOTSPOT –
You need to update the order workflow to address the issue when calling the Printer API App.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:
Correct Answer:
Box 1: fixed –
Box 2: PT10S –
The ג€˜Defaultג€™ policy does 4 exponential retries and from my experience the interval times are often too short in situations.

Box 3: 5 –

Question 3.

DRAG DROP –
You need to deploy a new version of the LabelMaker application to ACR.
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:

Correct Answer:

Step 1: Build a new application image by using dockerfile
Step 2: Create an alias if the image with the fully qualified path to the registry
Before you can push the image to a private registry, youג€™ve to ensure a proper image name. This can be achieved using the docker tag command. For demonstration purpose, weג€™ll use Dockerג€™s hello world image, rename it and push it to ACR.
# pulls hello-world from the public docker hub
$ docker pull hello-world
# tag the image in order to be able to push it to a private registry
$ docker tag hello-word <REGISTRY_NAME>/hello-world
# push the image
$ docker push <REGISTRY_NAME>/hello-world
Step 3: Log in to the registry and push image
In order to push images to the newly created ACR instance, you need to login to ACR form the Docker CLI. Once logged in, you can push any existing docker image to your ACR instance.
Scenario:
Coho Winery plans to move the application to Azure and continue to support label creation.
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.

Question 4.

You need to access data from the user claim object in the e-commerce web app.
What should you do first?

A. Write custom code to make a Microsoft Graph API call from the e-commerce web app.
B. Assign the Contributor RBAC role to the e-commerce web app by using the Resource Manager create role assignment API.
C. Update the e-commerce web app to read the HTTP request header values.
D. Using the Azure CLI, enable Cross-origin resource sharing (CORS) from the e-commerce checkout API to the e-commerce web app. 

Correct Answer: C 

Methods to Get User Identity and Claims in a .NET Azure Functions App include:
ClaimsPrincipal from the Request Context
The ClaimsPrincipal object is also available as part of the request context and can be extracted from the HttpRequest.HttpContext.
User Claims from the Request Headers.
App Service passes user claims to the app by using special request headers.

Reference: https://levelup.gitconnected.com/four-alternative-methods-to-get-user-identity-and-claims-in-a-net-azure-functions-app-df98c40424bb

Question 5.

HOTSPOT –
You need to configure Azure Cosmos DB.
Which settings should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:
Correct Answer:
Box 1: Strong –
When the consistency level is set to strong, the staleness window is equivalent to zero, and the clients are guaranteed to read the latest committed value of the write operation.
Scenario: Changes to the Order data must reflect immediately across all partitions. All reads to the Order data must fetch the most recent writes.
Note: You can choose from five well-defined models on the consistency spectrum. From strongest to weakest, the models are: Strong, Bounded staleness,
Session, Consistent prefix, Eventual
Box 2: SQL –
Scenario: 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).

Question 6.

HOTSPOT –
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.
Hot Area:
Correct Answer:
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.city –

The city field is in Order, not in the 2s.