Google Cloud Associate Cloud Engineer — Question 53
You need to set up a policy so that videos stored in a specific Cloud Storage Regional bucket are moved to Coldline after 90 days, and then deleted after one year from their creation. How should you set up the policy?
Answer options
- A. Use Cloud Storage Object Lifecycle Management using Age conditions with SetStorageClass and Delete actions. Set the SetStorageClass action to 90 days and the Delete action to 275 days (365 ג€" 90)
- B. Use Cloud Storage Object Lifecycle Management using Age conditions with SetStorageClass and Delete actions. Set the SetStorageClass action to 90 days and the Delete action to 365 days.
- C. Use gsutil rewrite and set the Delete action to 275 days (365-90).
- D. Use gsutil rewrite and set the Delete action to 365 days.
Correct answer: B
Explanation
The correct answer, B, accurately sets the SetStorageClass action to 90 days for moving videos to Coldline and the Delete action to 365 days for complete removal after one year. Option A incorrectly calculates the deletion timing by subtracting 90 days from 365, leading to an earlier deletion than intended. Options C and D do not use the Object Lifecycle Management feature, which is necessary for automating these actions.