Google Professional Cloud Developer Question 167
Single answerGoogle Cloud PlatformYour organization has a regulatory requirement to retain customer data for 7 years. You are using Google Cloud Storage to store this data. How can you enforce this data retention policy in the most reliable way?
- A
Set a bucket-level retention policy with a retention period of 7 years.
- B
Use Object Lifecycle Management to automatically delete objects after 7 years.
- C
Manually review and delete objects older than 7 years every month.
- D
Enable Object Versioning and delete older versions of objects after 7 years.
Show answer and explanation
Correct answer: A
Explanation
To meet regulatory retention requirements, Google Cloud Storage provides bucket-level retention policies that enforce a minimum retention period for objects. This policy ensures compliance by preventing objects from being deleted or modified until the specified retention period (7 years in this case) has elapsed. Other methods, like Object Lifecycle Management or manual deletion, do not guarantee enforcement of a strict retention policy.
- A. Correct.
Setting a bucket-level retention policy with a retention period of 7 years ensures that every object in the bucket is retained for a minimum of 7 years and cannot be deleted or overwritten before that time. This is the most reliable way to enforce a data retention policy.
- B. Incorrect.
Using Object Lifecycle Management to automatically delete objects after 7 years does not enforce retention. It only specifies deletion, and objects can still be accidentally deleted before the 7-year period.
- C. Incorrect.
Manually reviewing and deleting objects is prone to human error and does not reliably enforce a 7-year retention policy.
- D. Incorrect.
Enabling Object Versioning tracks changes to objects, but it does not enforce a minimum retention period. Older versions of objects could still be deleted before the 7-year requirement.