How to rename an object in Google Storage bucket through the API?
See also An error attempting to rename a Google Bucket object (Google bug?)
How to rename an object in Google Storage bucket through the API?
See also An error attempting to rename a Google Bucket object (Google bug?)
Objects can't be renamed. The best you can do is copy to a new object and delete the original. If the new and old object are the same location (which will be true if they're in the same bucket, for example) it will be a metadata-only (no byte copying) operation, and hence fast. However, since it's two operations it won't be atomic.
First, use the "rewrite" method to produce a copy of the original object. Then, delete the original object.
Documentation on rewrite: https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite