This page contains code samples for Cloud Storage. To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.
Get a bucket's metadata
Retrieve metadata from a Cloud Storage bucket.
List files in a paginated manner
List objects in a bucket with no autopagination, showing how to move to the next set of objects.
Move an object
Moving an object in Cloud Storage consists of two operations. First, you copy the object to a destination bucket and rename the moved object. Next, you delete the original object. Delete an object only when the old and new destinations are not equal.
View in documentation
Print the website configuration for a bucket
Print the website configuration for a Cloud Storage bucket.