Microsoft DevOps Engineer Expert AZ-400 Practice Question

You operate a mission-critical Azure App Service web app that uses a production slot and a staging slot named "green". A multi-stage Azure Pipelines YAML pipeline already builds and deploys the new version to the green slot. Compliance rules state that:

  1. traffic must be shifted to the new version without any measurable downtime,
  2. an automated health-check endpoint (/health) must be called before live traffic is routed,
  3. if the health check fails, the swap must be cancelled automatically.

You need to add a job to the pipeline that performs the slot swap while meeting the compliance rules. Which pipeline task and configuration should you use?

  • Add an AzureTrafficManager task that gradually shifts 100% of traffic from the green slot to the production slot.

  • Add an AzureCLI@2 task that runs az webapp deployment slot swap --slot green --target-slot production.

  • Add an AzureAppServiceDeploy task configured for the production slot and set the deployToSlotOrASE input to true.

  • Add an AzureAppServiceManage task, set its action to Swap Slots, and enable the Swap with preview option.

Microsoft DevOps Engineer Expert AZ-400
Design and implement build and release pipelines
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot