Microsoft DevOps Engineer Expert AZ-400 Practice Question

Your organization uses Azure Pipelines to deploy an ASP.NET Core application. Compliance rules require that any pipeline run that successfully deploys to the Prod environment must keep all build artifacts, logs, and test results for at least five years. All other runs can follow the default 30-day project retention policy. The multi-stage deployment pipeline is defined in YAML and must remain self-service for developers. You need an automated solution that meets the compliance requirement while minimizing storage costs for non-production runs. What should you recommend?

  • Define a retention policy in the pipeline's YAML that sets daysToKeep to 1,825 for all runs.

  • Create an Azure Artifacts feed with a 1,825-day retention policy and publish all build outputs as packages to that feed.

  • Set the project-level pipeline retention policy to 1,825 days.

  • Add a job in the production stage that invokes the Azure DevOps REST API to create a retention lease on the current run after a successful deployment.

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