I am planning to delete numerous old small objects in GCP to save on storage costs. There is an object lifecycle policy set to delete these objects after a few years. But, we no longer require them. We wish to filter and delete them off earlier than the policy.
As per google cloud storage pricing
- storage.buckets.delete and storage.objects.delete are free operations
- However, storage.buckets.list and storage.objects.list are class-A operations costing $0.05 and $0.5 per 10k operations for standard and archived storage respectively
Query:
- Are list operations billed per API call, or by the number of objects in the result set?
I am wary of running a long operation to get a listing of all the objects in the bucket by their creation date just to find that listing operation itself costing more than the continued storage till as set in lifecycle policy. Specifically, for archive storage, listing operation is 10 times costly than that on standard storage.