Folder

The Folder resource represents afolder in a Cloud Storage bucket withhierarchical namespace enabled.

To try out the methods for this resource, seeMethods.

Resource representations

{"kind":"storage#folder""id":string,"selfLink":string,"name":string,"bucket":string,"createTime":datetime,"updateTime":datetime,"metageneration":long}
Property nameValueDescriptionNotes
kindstringThe kind of item this is. For folders, this is alwaysstorage#folder.
idstringThe ID of the folder, which is composed of the bucket name and folder name, expressed as a path. For example,example-bucket/example-folder1/example-folder2/.
selfLinkstringThe canonical URL of the folder. For example,https://www.googleapis.com/storage/v1/b/example-bucket/folders/example-folder1/example-folder2/.
namestringThe name of the folder, expressed as a path. For example,example-folder1/example-folder2/.
bucketstringThe name of the bucket that contains the folder.
createTimedatetimeThe time at which the folder was created, inRFC 3339 format.
updateTimedatetimeThe time at which the folder's metadata was last updated, inRFC 3339 format.
metagenerationlongThe metadata generation of the folder.

Methods

delete
Delete a folder.
get
Get the metadata of a folder.
insert
Create a folder.
list
Retrieves a list of folders matching the criteria.
rename
Rename a folder.

For information about status and error codes returned by these APIs, see thereference page.

Try it for yourself

If you're new to Google Cloud, create an account to evaluate how Cloud Storage performs in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.

Try Cloud Storage free

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.