Discover
Get started
Create buckets
Access and manage buckets
Upload and download objects
Access and manage objects
Get insights on your stored data
Cache objects
Control data lifecycles
Make requests
Secure data
Monitor data and usage
Protection, backup, and recovery
Mount buckets with Cloud Storage FUSE
Work across products, Clouds, and platforms
Troubleshoot
Stay organized with collections Save and categorize content based on your preferences.
This guide describes how to create, list, and delete managed folders.
Before you beginTo create and manage managed folders, you must first enable uniform bucket-level access and get the required IAM roles.
Enable uniform bucket-level accessIf you haven't already, enable uniform bucket-level access.
Get required rolesTo get the permissions that you need to create and manage managed folders, ask your administrator to grant you the Storage Folder Admin (roles/storage.folderAdmin
) IAM role on the bucket.
This predefined role contains the permissions required to create and manage managed folders. To see the exact permissions that are required, expand the Required permissions section:
Required permissionsThe following permissions are required to create and manage managed folders:
storage.managedFolders.create
storage.objects.list
storage.managedFolders.list
storage.managedFolders.get
storage.managedFolders.delete
(on the source bucket)storage.managedFolders.create
(on the destination bucket)storage.managedFolders.delete
For information about granting roles on buckets, see Set and manage IAM policies on buckets.
Create a managed folder ConsoleWhen using the Google Cloud console, you create managed folders by enabling management on folders or simulated folders. The following steps describe how to create a folder or a simulated folder and then enable folder management:
In the list of buckets, click the name of the bucket you want to create managed folders in.
In the Bucket details page, click Create folder to create a new folder. If the folder you want to convert to a managed folder already exists, skip to the step describing how to access the More options more_vert menu.
In the Name field, enter a name for your folder. For naming considerations, see Managed folder names.
Click Create.
Your newly created folder appears in the Folder browser pane.
In the Folder browser pane, click the More options more_vert menu next to the folder you want to convert to a managed folder and click Edit access.
The Enable folder management? dialog appears.
Click Enable.
Your folder converts to a managed folder. A Permissions for MANAGED_FOLDER_NAME
pane appears that displays the IAM policies on the folder by principal and role. To create new IAM policies, see Set an IAM policy on a managed folder.
To create a managed folder, run the gcloud storage managed-folders create
command:
gcloud storage managed-folders create gs://BUCKET_NAME/MANAGED_FOLDER_NAME
Where:
BUCKET_NAME
is the name of the bucket in which you want to create a managed folder. For example, my-bucket
.
MANAGED_FOLDER_NAME
is the name of the managed folder you want to create. For example, my-managed-folder/
.
To confirm that the managed folder was created, run the gcloud storage managed-folders describe
command:
gcloud storage managed-folders describe gs://BUCKET_NAME/MANAGED_FOLDER_NAME
Where:
BUCKET_NAME
is the name of the bucket in which you created a managed folder.
MANAGED_FOLDER_NAME
is the name of the managed folder you created.
For more information, see the Cloud Storage C++ API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
C#For more information, see the Cloud Storage C# API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
GoFor more information, see the Cloud Storage Go API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
JavaFor more information, see the Cloud Storage Java API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
Node.jsFor more information, see the Cloud Storage Node.js API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
PHPFor more information, see the Cloud Storage PHP API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
PythonFor more information, see the Cloud Storage Python API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
RubyFor more information, see the Cloud Storage Ruby API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
REST APIs List managed folders ConsoleFrom the Folder browser pane, use the toggle node arrow_right to expand the list of folders within your bucket.
A list displays the folders, simulated folders, and managed folders in your bucket.
Command lineTo list managed folders, run the gcloud storage managed-folders list
command:
gcloud storage managed-folders list gs://BUCKET_NAME
Where:
BUCKET_NAME
is the name of the bucket that contains the managed folders you want to list. For example, my-bucket
.Note that you can also specify a folder path instead of a bucket name. For example:
gcloud storage managed-folders list gs://my-bucket/folder/Client libraries C++
For more information, see the Cloud Storage C++ API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
C#For more information, see the Cloud Storage C# API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
GoFor more information, see the Cloud Storage Go API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
JavaFor more information, see the Cloud Storage Java API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
Node.jsFor more information, see the Cloud Storage Node.js API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
PHPFor more information, see the Cloud Storage PHP API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
PythonFor more information, see the Cloud Storage Python API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
RubyFor more information, see the Cloud Storage Ruby API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
REST APIs Get the metadata of a managed folder Command lineTo get the metadata of a managed folder, run the gcloud storage managed-folders describe
command:
gcloud storage managed-folders describe gs://BUCKET_NAME/MANAGED_FOLDER_NAME
Where:
BUCKET_NAME
is the name of the bucket that contains the managed folders you want to list. For example, my-bucket
.
MANAGED_FOLDER_NAME
is the name of the managed folder you want to retrieve metadata for.
For more information, see the Cloud Storage C++ API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
C#For more information, see the Cloud Storage C# API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
GoFor more information, see the Cloud Storage Go API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
JavaFor more information, see the Cloud Storage Java API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
Node.jsFor more information, see the Cloud Storage Node.js API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
PHPFor more information, see the Cloud Storage PHP API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
PythonFor more information, see the Cloud Storage Python API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
RubyFor more information, see the Cloud Storage Ruby API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
REST APIs JSON APIHave gcloud CLI installed and initialized, which lets you generate an access token for the Authorization
header.
Use cURL
to call the JSON API with a request to get managed folders:
curl -X GET -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://storage.googleapis.com/storage/v1/b/BUCKET_NAME/managedFolders/MANAGED_FOLDER_NAME"
Where:
BUCKET_NAME
is the name of the bucket that contains the managed folders you want to get. For example, my-bucket
.
MANAGED_FOLDER_NAME
is the name of the managed folder expressed as a path. For example, example-dir/
. If the managed folder is nested, the slash (/
) character in the managed folder path must be escaped. For example, example-dir1%2Fexample-dir2
.
Create a new managed folder in the destination bucket.
Copy the IAM policies from the original managed folder in the source bucket into the new managed folder in the destination bucket.
Copy the objects from the original managed folder in the source bucket to the new managed folder in the destination bucket.
Delete the original managed folder from the source bucket.
To move managed folders and the objects they contain, run the gcloud storage mv
command with the --include-managed-folders
option:
gcloud storage mv --include-managed-folders gs://SOURCE_BUCKET_NAME/MANAGED_FOLDER_NAME gs://DESTINATION_BUCKET_NAME/MANAGED_FOLDER_NAME
Where:
SOURCE_BUCKET
is the name of your original bucket. For example, my-source-bucket
`.
DESTINATION_BUCKET
is the name of the bucket you are moving your managed folder to. For example, my-destination-bucket
.
MANAGED_FOLDER_NAME
is the name of the managed folder you're moving. For example, my-managed-folder/
.
In the list of buckets, click the name of the bucket that contains the managed folder you want to delete.
In the Bucket details page, click the More options icon more_vert next to the managed folder you want to delete.
Click Delete folder.
To confirm that you want to delete the managed folder, type DELETE
in Delete field.
Click Delete.
The managed folder and its contents, including stored objects and other managed folders, are deleted from your Cloud Storage bucket.
To delete a managed folder and the objects it contains, run the gcloud storage rm
command:
gcloud storage rm -r gs://BUCKET_NAME/MANAGED_FOLDER_NAME
Where:
BUCKET_NAME
is the name of the bucket that contains the managed folder you want to delete. For example, my-bucket
.
MANAGED_FOLDER_NAME
is the name of the managed folder you want to delete. For example, my-managed-folder/
.
For more information, see the Cloud Storage C++ API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
C#For more information, see the Cloud Storage C# API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
GoFor more information, see the Cloud Storage Go API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
JavaFor more information, see the Cloud Storage Java API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
Node.jsFor more information, see the Cloud Storage Node.js API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
PHPFor more information, see the Cloud Storage PHP API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
PythonFor more information, see the Cloud Storage Python API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
RubyFor more information, see the Cloud Storage Ruby API reference documentation.
To authenticate to Cloud Storage, set up Application Default Credentials. For more information, see Set up authentication for client libraries.
REST APIs JSON APITo delete a managed folder, you must first delete the objects within the managed folder.
Have gcloud CLI installed and initialized, which lets you generate an access token for the Authorization
header.
Use cURL
to call the JSON API with a DELETE
ManagedFolder request:
curl -X DELETE -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://storage.googleapis.com/storage/v1/b/BUCKET_NAME/managedFolders/MANAGED_FOLDER_NAME"
Where:
BUCKET_NAME
is the name of the bucket that contains the managed folder you want to delete. For example, my-bucket
.
MANAGED_FOLDER_NAME
is the name of the managed folder you want to delete. For example, my-managed-folder/
.
By default, managed folders must be empty before they can be deleted. To delete a non-empty managed folder, include allowNonEmpty=true
as a query parameter in your request.
For help creating and managing managed folders, refer to the Troubleshooting page.
Next stepsExcept as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-02 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.5