Microsoft

AZ-400 Free Practice Questions — Page 17

Question 166

You use Calendar Versioning (CalVer) for code assets. You need to store an optional tag of beta as part of the version. Which part of the version should you use for the tag?

A. minor
B. major
C. micro
D. modifier
Show Answer
Correct Answer: D
Explanation:
In Calendar Versioning (CalVer), the modifier is an optional text component specifically intended for labels such as pre-release or build tags (e.g., dev, alpha, beta, rc). Since "beta" is an optional pre-release tag rather than a numeric calendar component, it belongs in the modifier part of the version.

Question 167

You have a project in Azure DevOps named Project1 that contains two environments named environment1 and environment2. When a new version of Project is released, the latest version is deployed to environment2, and the previous version is redeployed to environment1. You need to distribute users across the environments. The solution must meet the following requirements: • New releases must be available to only a subset of the users. • You must gradually increase the number of users that can access environment2. What should you use?

A. VIP swaping
B. web app deployment slots
C. Azure Load Balancer
D. Azure Traffic Manager
Show Answer
Correct Answer: B
Explanation:
Web App deployment slots support staged rollouts (canary releases) by allowing you to route a configurable percentage of production traffic to a slot running the new version. This lets new releases be exposed to only a subset of users and gradually increase traffic to the new version. Traffic Manager and Load Balancer operate at DNS/network level and are not designed for progressive, per-app version rollout within the same app, and VIP swapping does not provide gradual user distribution.

Question 168

DRAG DROP - You have an Azure Pipeline. You need to store configuration values as variables. At which four scopes can the variables be defined, and what is the precedence of the variables from the highest precedence to lowest precedence? To answer, move the appropriate scope from the list of scopes to the answer area and arrange them in the correct order.

Illustration for AZ-400 question 168
Show Answer
Correct Answer: job stage pipeline root pipeline settings UI
Explanation:
Azure Pipelines variables can be defined at pipeline settings UI, pipeline root (YAML), stage, and job scopes. When the same variable name exists in multiple scopes, job-level variables override stage-level, stage overrides pipeline root, and pipeline root overrides variables defined in the pipeline settings UI.

Question 169

HOTSPOT - You have an Azure subscription that contains two resource groups named ContosoRG and ContosoDev, an Azure data factory named Contoso Data Factory, and a release pipeline in Azure Pipelines named Pipeline1. You plan to deploy Contoso Data Factory to ContosoRG by using Pipeline1. You add the Azure Resource Manager (ARM) template deployment task 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 169 Illustration for AZ-400 question 169
Show Answer
Correct Answer: Deployment mode output of the continuous integration build
Explanation:
To avoid modifying or deleting existing databases and web apps in the resource group, the ARM deployment must use Incremental rather than Complete deployment mode. With Template location set to Linked artifact and the template path under $(System.DefaultWorkingDirectory), the release pipeline retrieves the ARM template from the artifacts produced by the continuous integration build.

Question 170

HOTSPOT - You use Git for source control. You have an app named App1. In the main branch, you need to restore the third most recent revision of a file named App.exe.config. How should you complete the command? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-400 question 170
Show Answer
Correct Answer: checkout --source
Explanation:
First ensure you are on the main branch. To restore a file from an earlier commit, git restore must read content from a specific commit or tree, which is done with --source (e.g., main~3). The --staged option only affects the index and does not select a historical revision.

Question 171

DRAG DROP - You are designing a versioning strategy for Git-based packages. You plan to use a Semantic Versioning (SemVer)-based strategy. You need to identify when to change the build version. What should you identify for each scenario? To answer, drag the appropriate versions to the correct scenarios. Each version 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 171
Show Answer
Correct Answer: You rename a parameter in an API: Major You deprecate functionality in an API: Minor You add a feature and maintain backwards compatibility: Minor
Explanation:
Major: Renaming a public API parameter is a breaking change. Minor: Deprecation is backward compatible; functionality still works. Minor: Adding backward-compatible features increments the minor version per SemVer.

Question 172

DRAG DROP - You have a GitHub repository that contains the code for an app named App1. App1 depends on a library of functions from a repository at https://github.com/contoso/afeed. You need to keep a clone of the afeed repository as a subdirectory of the App1 repository. How should you complete the Git command? To answer, drag the appropriate values to the correct targets. Each value 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 172
Show Answer
Correct Answer: submodule add
Explanation:
To keep another repository as a subdirectory while tracking it separately, Git uses submodules. The correct command is `git submodule add <repo-url>`, which adds the external repository as a subdirectory and records it in the parent repository.

Question 173

DRAG DROP - You have an Azure subscription that uses Azure Automation State Configuration to manage the configuration of virtual machines. You need to identify which nodes are noncompliant. How should you complete the query? To answer, drag the appropriate values to the correct targets. Each value 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 173
Show Answer
Correct Answer: Category OperationName ResultType
Explanation:
Azure Automation DSC logs are in AzureDiagnostics. Filter nodes by Category == "DscNodeStatus", narrow to node status records via OperationName (containing DSCNodeStatusData), and identify noncompliance with ResultType != "Compliant".

Question 174

You have an Azure DevOps project that produces Node Package Manager (npm) packages. Multiple projects consume the packages. You need to configure Azure Artifacts to ensure that both the latest and pre-release versions of the packages are available for consumption. What should you do?

A. Create two feed views named @prerelease and @release, Set @release as the default view. Configure a release pipeline that tags the packages as release after successful testing.
B. Create a feed view named @prerelease. Configure a release pipeline that tags the packages as release after successful testing.
C. Create two feed views named @prerelease and @default. Configure a release pipeline that promotes a package to the @default view after successful testing.
D. Create two feed views named @prerelease and @release. Set @release as the default view. Configure a release pipeline that promotes a package to the @release view after successful testing.
Show Answer
Correct Answer: D
Explanation:
Azure Artifacts best practices recommend using feed views to separate pre-release and release packages. You should create two views (@prerelease and @release), set @release as the default view so consumers get stable versions by default, and use a pipeline to promote packages from @prerelease to @release after successful testing. This ensures both pre-release and latest stable versions are available appropriately.

Question 175

HOTSPOT - You company uses a Git source-code repository. You plan to implement GitFlow as a workflow strategy. You need to identify which branch types are used for production code and preproduction code in the strategy. Which branch type should you identify for each code type? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for AZ-400 question 175
Show Answer
Correct Answer: Production code: Main Preproduction code: Develop
Explanation:
In GitFlow, the Main (master) branch contains production-ready code, while the Develop branch integrates features and represents the preproduction/staging state.

$19

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