You need to create a Cloud Storage bucket with a retention policy that prevents object deletion for 30 days. Which TWO steps are necessary?
Correct. Enabling Object Versioning ensures that when an object is deleted, the current version becomes noncurrent but remains retained, effectively preventing permanent deletion.
Why this answer
To prevent object deletion for 30 days, you need to use a combination of Object Versioning and a default event-based hold. Enabling Object Versioning (A) retains all versions of objects, so even if an object is deleted, the version history remains. Setting a default event-based hold (B) places a hold on new objects indefinitely until released, but combined with the retention policy, it ensures that objects cannot be deleted before the hold duration.
Locking the retention policy (C) makes it permanent, but it is not required if you want flexibility. IAM policies (D) control permissions but do not prevent deletion of objects by authorized users. Therefore, options A and B are the correct steps.