Microsoft

AZ-400 Free Practice Questions — Page 7

Question 62

HOTSPOT - You have a GitHub repository that contains a workflow named WF1. WF1 is used to build code for an app named App1. You need to add a build status badge to the README.md file in the repository for App1. How should you complete the URL for the badge? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-400 question 62
Show Answer
Correct Answer: Repository owner Repository name
Explanation:
GitHub Actions workflow badge URLs use the format: https://github.com/{owner}/{repository}/actions/workflows/{workflow_file}/badge.svg. Thus the placeholders are the repository owner and repository name.

Question 63

HOTSPOT - You are interrogating logs by using KQL. You execute the query shown in the following exhibit. Use the drop-down menus to select the answer choice that completes each statement based on the information presented in the graphic. NOTE: Each correct selection is worth one point.

Illustration for AZ-400 question 63 Illustration for AZ-400 question 63
Show Answer
Correct Answer: Six timespan
Explanation:
The project operator returns five columns: StartTime, EndTime, EpisodeId, State, and Level. The extend operator appends Duration, making six columns total. Duration is computed as EndTime - StartTime, which produces a timespan, and it is compared to make_timespan(2,10).

Question 64

DRAG DROP - You have a project in Azure DevOps. You need to configure a dashboard that will provide information on the following metrics. • How long it takes to close a work item • The number of completed backlog items • How long it takes to restore failed services Which type of widget should you use for each metric? To answer, drag the appropriate widget types to the correct metrics. Each widget 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-400 question 64
Show Answer
Correct Answer: How long it takes to close a work item: Cycle time The number of completed backlog items: Velocity How long it takes to restore failed services: Lead time
Explanation:
Cycle time measures work item completion duration, Velocity shows completed backlog items per iteration, and Lead time measures elapsed time from request/issue creation to completion or resolution.

Question 65

You have an Azure subscription that contains an Azure Kubernetes Service (AKS) instance named AKS1. You collect and analyze metrics for AKS1 by using the Azure Monitor managed service for Prometheus. You need to analyze the performance of AKS1. Which query language should you use?

A. PL/SQL
B. PromQL
C. SparkQL
D. KQL
Show Answer
Correct Answer: B
Explanation:
Azure Monitor managed service for Prometheus stores and queries Prometheus metrics using PromQL. KQL is used for Log Analytics and Azure Data Explorer, not for querying Prometheus metrics. PL/SQL is Oracle's procedural language, and SparkQL is for Apache Spark.

Question 66

You have an Azure App Service app named App1. You need to identify when App1 was offline. The solution must minimize administrative effort. Which troubleshooting category in App Service diagnostics should you use?

A. Navigator
B. Configuration and Management
C. Diagnostic Tools
D. Availability and Performance
Show Answer
Correct Answer: D
Explanation:
Use the Availability and Performance troubleshooting category in App Service Diagnostics. It includes availability analysis, application downtime detection, HTTP errors, latency, and performance insights, making it the appropriate place to identify when an App Service was offline with minimal administrative effort.

Question 67

You manage source control by using GitHub. You have a file named Data.txt that contains sensitive data. A user pushes Data.txt to a repository. You need to purge the file from the repository. Which two commands can you use? Each correct answer presents a complete solution. NOTE: Each correct solution is worth one point.

A. git checkout git reset -hard -pathspec data.txt
B. git checkout git clean -d data.txt --force
C. bfg --delete-files data.txt git push --force
D. git rm data.txt git push --force
E. git filter-repo --invert-paths --path data.txt git push origin --force --all
F. git revert -edit data.txt git push -force
Show Answer
Correct Answer: C, E
Explanation:
To purge a sensitive file from a Git repository, you must rewrite the repository history and then force-push the rewritten history. BFG Repo-Cleaner (`bfg --delete-files`) is a standard tool for removing sensitive files from all commits, followed by a force push. `git filter-repo --invert-paths --path data.txt` likewise rewrites history to remove the file from every commit, and `git push origin --force --all` publishes the rewritten history. Commands like `git rm` only remove the file from the latest commit and do not purge it from history; `git revert`, `git checkout`, and `git clean` do not remove sensitive data from repository history. Sources: https://learn.microsoft.com/en-us/training/modules/manage-git-repositories

Question 68

HOTSPOT - You have a management group that contains four Azure subscriptions. Each subscription contains four resource groups. You develop a new web app named App1. You plan to deploy an instance of App1 to each resource group. You need to create a Bicep template that will be used to deploy App1. The solution must meet the following requirements: • The name of each App1 instance must be consistent for each subscription and resource group. • The name of each App Service plan used to host App1 must be consistent. How should you complete the template? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-400 question 68
Show Answer
Correct Answer: Plan name: subscription().id App name: resourceGroup().id
Explanation:
Use uniqueString(subscription().id) to keep the App Service plan name consistent across all resource groups within a subscription. Use uniqueString(resourceGroup().id) to generate a stable, unique app name per resource group, giving consistent names for repeated deployments while differing between resource groups.

Question 69

You have an Azure pipeline that is used to deploy an app named App1. You need to ensure that new versions of App1 are released only if they exceed performance baselines. The solution must minimize administrative effort. What should you configure?

A. an Azure Pipelines release artifact
B. an Azure Repos branch policy
C. an Azure Monitor alert
D. an Azure Pipelines deployment gate
Show Answer
Correct Answer: D
Explanation:
Azure Pipelines deployment gates are designed to automatically evaluate conditions, such as Azure Monitor queries and alerts, before allowing a deployment to proceed. This ensures new versions are released only when they meet defined performance criteria while minimizing administrative effort. An Azure Monitor alert by itself only detects and notifies; the deployment gate uses that signal to block or allow the release. Branch policies and release artifacts do not evaluate post-deployment performance baselines.

Question 70

You manage a project by using Azure Board, and you manage the project code by using Azure Repos. You have a bug work item that has an ID of 123. You need to set the work item state to Resolved. What should you add to the commit message?

A. #123 completes
B. Resolves #AB-123
C. Verifies #123
D. Fixes #123
Show Answer
Correct Answer: D
Explanation:
In Azure Repos, including a resolution mention such as 'Fixes #123' in the commit message links the commit to work item 123 and transitions the work item to the Resolved state. 'Fix', 'Fixes', and 'Fixed' are supported keywords. The '#AB-123' syntax is used in GitHub integration with Azure Boards, not Azure Repos.

Question 71

You manage projects by using Azure Boards. You have a current work item name itemA that is dependant on a work item named itemB. You need to define the dependency for itemA. What should you do in the web portal for Azure DevOps?

A. Add a Parent link to the user story of item
B. From Backlogs, open the context menu, select Add link, and then select itemA. Set Link type to References and add the ID of item
C. From itemA, open the Links tab, and then select Add link. Set Link type to References and add the ID of itemB.
D. From itemA, open the Links tab, and then select Add link. Set Link type to Successor and add the ID of itemB.
Show Answer
Correct Answer: D
Explanation:
To model a dependency where itemA depends on itemB, create a dependency link from itemA to itemB using the Successor/Predecessor link type. If itemA cannot proceed until itemB is completed, then itemA is the successor of itemB. The 'References' link type is not the correct dependency link type, and a Parent link represents hierarchy rather than dependency.

$19

Get all 534 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.