Professional Cloud DevOps Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Your team manages automated CI/CD artifact lifecycles across development and production environments using Google Cloud Artifact Registry. Frequent automated pipeline runs are rapidly inflating cloud storage costs with intermediate untagged layers and expired preview builds.
You need to configure automated repository cleanup policies to enforce the following governance and retention criteria:
prod- prefix from deletion indefinitely.feat- prefix that are older than 30 days.Which cleanup policy configuration should you implement in Artifact Registry?
Artifact Registry Cleanup Policies provide automated, declarative lifecycle management directly on container and language repositories. They allow platform engineers to define granular rules using conditions such as tag status, tag prefixes, version age, and version count limits to automate storage optimization without requiring custom cron scripts or maintenance tools.
KEEP policy with mostRecentVersions.keepCount: 10 evaluates all versions in the repository and unconditionally preserves the newest 10 artifacts regardless of any other matching deletion rules.prod- tagged releases: Defining a KEEP policy matching tagState: TAGGED with tagPrefixes: ["prod-"] ensures that any version bearing a production tag is never purged.DELETE policy targeting tagState: UNTAGGED with an olderThan: 14d duration safely strips away old orphaned intermediate layers.DELETE policy targeting tagState: TAGGED, tagPrefixes: ["feat-"], and olderThan: 30d cleans up abandoned branch testing builds.KEEP policies always take precedence over DELETE policies, guaranteeing that artifacts matching retention rules will never be removed even if they match a deletion condition.tagState, tagPrefixes, versionNamePrefixes, olderThan, and newerThan.This design precisely separates retention guardrails (KEEP rules) from storage cleanup logic (DELETE rules). Because Artifact Registry evaluates all KEEP rules first, production images and recent rollbacks are guaranteed protection before any time-based deletion occurs.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.