Hardware : GCP
Open GCP Console
Click Menu > Cloud Storage > Browser
Select one project.
Click on Retention > Set Retention Policy.
Give the retention period. You can give it in Seconds, Months, Days and Years. Click Save.
Now the retention policy is effective in the bucket.
Once the retention policy is effective if it is locked, then we can’t remove it unless the specified period is finished.
To check the retention policy, Select one file in bucket. Press delete.
The Error message will be shown as File could not be deleted.
Lifecycle lets you to move your bucket’s objects into another storage if it met certain rule/ Conditions.
Click on Lifecycle > Add a rule.
Select the action you want. Click Continue.
Select the conditions which you want to give for your bucket. Click Create.
Now the Rule has been created for the bucket.