While creating a GCS bucket using python code I am getting below error
Hi @KunalSapkal,
Welcome to Google Cloud Community!
The reason for the issue is because the soft delete policy constraint (constraints/storage.softDeletePolicySeconds) is enforced by your business. The minimum retention time for soft deletion is specified by this restriction. This restriction is broken by the default value of 7 days (604800 seconds).
Solution:
To resolve the issue:
bucket.retention_period = <minimum_policy_duration>
gcloud resource-manager org-policies describe constraints/storage.softDeletePolicySeconds \
--organization=ORGANIZATION_ID
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.