AZ-400 Question 211
Single answerYour organization uses Azure Pipelines to build and deploy several microservices. Most pipeline artifacts must be retained for 30 days to meet compliance requirements. However, you also have a small set of large shared dependencies that change frequently and are only needed temporarily. The team wants to reduce storage costs by retaining those ephemeral dependencies for only 2 days. Which strategy meets both the compliance requirements for core artifacts and the reduced retention need for ephemeral dependencies?
- A
Configure a single 30-day retention policy at the pipeline level and allow the default organization policy to handle the ephemeral dependencies automatically.
- B
Use separate feeds in Azure Artifacts: one feed with a 30-day retention policy for core pipeline artifacts, and another feed with a 2-day retention policy exclusively for ephemeral dependencies.
- C
Rely on a global 2-day retention policy for all artifacts and manually copy the core artifacts to another location after 2 days.
- D
Disable retention policies at both the pipeline and project levels, letting all artifacts persist indefinitely, then manually delete ephemeral artifacts whenever necessary.
Show answer and explanation
Correct answer: B
Explanation
Separating artifacts into different feeds with distinct retention policies is a common and recommended approach in Azure DevOps. This strategy allows you to handle core artifacts, which need longer retention to meet regulatory or business requirements, separately from ephemeral dependencies that only need to be retained briefly. For additional guidance, refer to Microsoft documentation on retention policies and Azure Artifacts feeds: https://docs.microsoft.com/azure/devops/pipelines/policies/retention and https://docs.microsoft.com/azure/devops/artifacts/feeds/feeds.
- A. Incorrect.
Option 1 is incorrect because applying a single 30-day policy for all artifacts does not address the requirement to reduce storage costs for ephemeral dependencies. The default organization policy would generally align with a single unified setting rather than selectively storing certain artifacts for fewer days.
- B. Correct.
Option 2 is correct. By segmenting artifacts into different feeds, you can apply distinct retention rules: a 30-day policy for artifacts that require longer storage for compliance, and a 2-day policy for ephemeral dependencies that do not need to be stored as long. This approach meets both compliance and cost reduction goals.
- C. Incorrect.
Option 3 is incorrect because reverting to a global 2-day policy for all artifacts would violate the compliance requirement to retain core artifacts for 30 days. Manual copying could lead to errors and is not a recommended best practice.
- D. Incorrect.
Option 4 is incorrect because disabling retention for everything would likely lead to excessive storage usage, and relying on manual deletes for ephemeral dependencies is prone to human error and does not enforce compliance for the core artifacts.