This page describes how to set and manage soft delete policies. You can set new policies on buckets to enable soft delete, as well as update and check the status of existing policies. To learn how to disable soft delete, see Disable soft delete.
To learn how to list and restore soft-deleted objects, see Use soft-deleted objects. To learn how to list and restore soft-deleted buckets, see Use soft-deleted buckets.
Required roles
To get the permissions that
you need to enable and manage soft delete policies,
ask your administrator to grant you the
Storage Admin (roles/storage.admin) IAM role on the bucket or the project that contains the bucket.
This predefined role contains the permissions required to enable and manage soft delete policies. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to enable and manage soft delete policies:
-
storage.buckets.get -
storage.buckets.update -
storage.buckets.list(this permission is only required if you plan to use the Google Cloud console to perform the instructions on this page)
For information about granting roles, see Set and manage IAM policies on buckets or Manage access to projects.
Edit a bucket's soft delete policy
The new soft delete retention duration only applies to objects or buckets that you delete after the soft delete policy takes effect. Existing soft-deleted objects aren't affected by updates made to the soft delete policy and are retained for the duration that was in effect when they were deleted.
Use the following instructions to edit a bucket's soft delete policy: