πŸ”

AZ-400 β€” questions

Page 17 of 18 Β· 358 total questions.

Topic 9 Β· Question 494

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?

  • Aan Azure Pipelines release artifact
  • Ban Azure Repos branch policy
  • Can Azure Monitor alert
  • Dan Azure Pipelines deployment gate (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: an Azure Pipelines deployment gate.

Topic 9 Β· Question 496

You have an Azure subscription. You create two Bicep templates named Template1 and Template2 that will be used to create a virtual machine and a website. You need to create a template named Template3 that will reuse logic from Template1 and Template2. What should you define first?

  • Aoutputs
  • Bresources
  • Cmodules (correct answer)
  • Dparameters
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: modules.

Topic 9 Β· Question 497

You have an Azure subscription. You use Bicep templates to deploy websites and Azure SQL infrastructure. You need to automate the deployments by using Azure Pipelines and a self-hosted agent that runs on two virtual machines. The solution must minimize administrative effort. What should you do first?

  • ACreate a service principal. (correct answer)
  • BCreate an Azure Automation account.
  • CCreate a user-assigned managed identity.
  • DOn each virtual machine, enable a system-assigned managed identity.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create a service principal.

Topic 9 Β· Question 500

You plan to deploy a solution that will include multiple microservices. You need to recommend a deployment strategy for the microservices. The solution must meet the following requirements: β€’ Enable users to test new features by using a specific URL. β€’ Minimize the effort required to promote a test version to production. β€’ Minimize the effort required to revert production code to the previous version. Which strategy should you recommend?

  • AA/B
  • Bfeature toggle
  • Cprogressive exposure
  • Dblue/green (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: blue/green.

Topic 9 Β· Question 501

You manage a project by using Azure Boards. You manage the project code by using GitHub. You have three work items that have IDs of 456, 457, and 458. You need to create a pull request that will be linked to all the work items. The solution must set the state of work item 456 to done. What should you add to the commit message?

  • ADone #456, #457, #458
  • BFixes #456, #457, #458
  • CFixes #AB456, #A8457, #A8458 (correct answer)
  • D#AB456, #AB457, #AB458Completed #AB456
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Fixes #AB456, #A8457, #A8458.

Topic 9 Β· Question 502

You plan to deploy a solution that will include multiple microservices. You need to recommend a deployment strategy for the microservices. The solution must meet the following requirements: β€’ Enable testing and monitoring of changes during a gradual rollout. β€’ Control the number of users that will receive new code releases. Which strategy should you recommend?

  • Aprogressive exposure (correct answer)
  • BA/B
  • Cfeature toggle
  • Dblue/green
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: progressive exposure.

Topic 9 Β· Question 504 Β· Select all that apply

You use Azure Pipelines to build and test code. You need to analyze the agent pool usage. What are two ways to achieve the goal? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

  • AReview the historical graph for the agent pools. (correct answer)
  • BReview the Pipeline duration report.
  • CQuery the TaskAgentPoolSizeSnapshot/TaskAgentPoolSizeSnapshots endpoint. (correct answer)
  • DQuery the PipelineRun/PipelineRuns endpoint.
Reveal answer & explanation
Correct answer: A, C

The correct answer is A, C. Option A: Review the historical graph for the agent pools. Option C: Query the TaskAgentPoolSizeSnapshot/TaskAgentPoolSizeSnapshots endpoint.

Topic 9 Β· Question 506

You use an Azure Pipelines pipeline to build and deploy an app. You have a custom test task that has the following inputs: β€’ testResultsFiles: **/TEST-*.trx β€’ searchFolder: $(System.DefaultWorkingDirectory) β€’ mergeTestResults: true Which format should you use for the input data of testResultsFiles?

  • AVSTest (correct answer)
  • BNUnit
  • CCTest
  • DJUnit
Reveal answer & explanation
Correct answer: A

The test task consumes **/TEST-*.trx files. The.trx format is produced by VSTest, so the testResultsFormat/format input should be VSTest. NUnit, CTest, and JUnit use different result file formats.

Topic 9 Β· Question 507

You use an Azure Pipelines pipeline to build, test, and deploy an app named App1. You need to reduce how long it takes to complete unit and integration tests for App1. The solution must ensure that the code coverage testing ratio is maintained. What should you do?

  • AEnable flaky test management.
  • BPurchase additional parallel jobs.
  • CEnable Test Impact Analysis (TIA). (correct answer)
  • DAdd an agent pool.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Enable Test Impact Analysis (TIA).

Topic 9 Β· Question 508

You have an app that is deployed to two environments named Production-A and Production-B by using Azure Pipelines. You need to configure a release pipeline that will mark the app as complete and ready for release into the Production-B environment. The solution must meet the following requirements: β€’ Ensure that there are no active Azure Monitor alerts in the Production-A environment before the app is marked as complete. β€’ Minimize administrative effort. What should you do?

  • ATo the Production-B environment stage, add a pre-deployment gate that will query Azure Monitor.
  • BTo the Production-A environment stage, add a post-deployment gate that will query Azure Monitor. (correct answer)
  • CTo the Production-A environment stage, add a post-deployment approval.
  • DTo the Production-A environment stage, add a pre-deployment gate that will query Azure Monitor.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: To the Production-A environment stage, add a post-deployment gate that will query Azure Monitor.

Explanation

Azure Monitor collects metrics and logs across resources for observability and alerting.

Topic 9 Β· Question 509

You manage package feeds by using Azure Artifacts. You plan to create a new package feed that will include the following views: β€’ @Local β€’ @Latest β€’ @Release β€’ @Prerelease Which view should you create manually?

  • A@Local
  • B@Latest (correct answer)
  • C@Release
  • D@Prerelease
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: @Latest.

Topic 9 Β· Question 510

You plan to create an image that will contain a .NET Core application. You have a Dockerfile file that contains the following code. (Line numbers are included for reference only.) You need to ensure that the image is as small as possible when the image is built. Which line should you modify in the file?

Exhibit 1 for question 510
  • A1
  • B3
  • C4 (correct answer)
  • D7
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: 4.

Topic 9 Β· Question 511

You have an Azure subscription that includes an app named App1. You have an Azure DevOps project that contains two environments named Staging and Production. You use Azure Pipelines to deploy App1. You need to validate the performance of App1 in the Staging environment before it is deployed to Production. The solution must minimize administrative effort. What should you do in the Azure DevOps project?

  • AIn the production branch policy, add a status check to query Azure Monitor Alerts for active alerts.
  • BIn the Production environment, add a check to query Azure Monitor Alerts for active alerts.
  • CIn the Production environment stage, add a post-deployment approval for the Azure Monitor Alerts group.
  • DIn the Staging environment add a check to query Azure Monitor Alerts for active alerts. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: In the Staging environment add a check to query Azure Monitor Alerts for active alerts.

Explanation

Azure Monitor collects metrics and logs across resources for observability and alerting.

Topic 9 Β· Question 512

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 need to use an Azure Pipelines pipeline to build and test an app and test the database of the app. The solution must meet the following requirements. β€’ The test stages must be run in parallel. β€’ The Publish_Test_Results stage must always be run. β€’ The test stages must be run after successful completion of the build stage. β€’ The Publish_Test_Results stage must be run after completion of all the test stages. Solution: You include the following elements in the YAML definition of the pipeline. Does this meet the goal?

Exhibit 1 for question 512
  • AYes
  • BNo (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: No.

Topic 9 Β· Question 513

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 need to use an Azure Pipelines pipeline to build and test an app and test the database of the app. The solution must meet the following requirements. β€’ The test stages must be run in parallel. β€’ The Publish_Test_Results stage must always be run. β€’ The test stages must be run after successful completion of the build stage. β€’ The Publish_Test_Results stage must be run after completion of all the test stages. Solution: You include the following elements in the YAML definition of the pipeline. Does this meet the goal?

Exhibit 1 for question 513
  • AYes
  • BNo (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: No.

Topic 9 Β· Question 514

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 need to use an Azure Pipelines pipeline to build and test an app and test the database of the app. The solution must meet the following requirements. β€’ The test stages must be run in parallel. β€’ The Publish_Test_Results stage must always be run. β€’ The test stages must be run after successful completion of the build stage. β€’ The Publish_Test_Results stage must be run after completion of all the test stages. Solution: You include the following elements in the YAML definition of the pipeline. Does this meet the goal?

Exhibit 1 for question 514
  • AYes (correct answer)
  • BNo
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Yes.

Topic 9 Β· Question 516

You are developing an Azure Pipelines pipeline. You need to configure a check in the pipeline that will query Azure Boards to ensure that there are no active work item issues before the pipeline deploys a build to production. Which type of check should you implement?

  • Apost-deployment approvals
  • Bmanual validations
  • Cpre-deployment gates (correct answer)
  • Dpre-deployment approvals
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: pre-deployment gates.

Topic 9 Β· Question 517

You have an Azure Resource Manager (ARM) template that contains the following expression. [if(parameters('isComplete'), '1a', '2a')] You need to migrate the template to Bicep. Which expression should you run?

  • Aiif(isComplete, '1a', '2a')
  • Bif(isComplete, '1a', '2a')
  • Cif('isComplete') '1a' else '2a'
  • DisComplete ? '1a' '2a' (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: isComplete ? '1a' '2a'.

Topic 9 Β· Question 518

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 use an Azure Pipelines pipeline to build and release web apps. You need to configure the pipeline to meet the following requirements: β€’ Only run when there is a change in the /webapp folder. β€’ Only run when a pr is created. Solution: You configure the pipeline definition by using the following elements. Does this meet the goal?

Exhibit 1 for question 518
  • AYes
  • BNo (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: No.

Topic 9 Β· Question 519

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 use an Azure Pipelines pipeline to build and release web apps. You need to configure the pipeline to meet the following requirements: β€’ Only run when there is a change in the /webapp folder. β€’ Only run when a pr is created. Solution: You configure the pipeline definition by using the following elements. Does this meet the goal?

Exhibit 1 for question 519
  • AYes
  • BNo (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: No.

Showing questions 321–340 of 358 Β· Page 17 of 18