View bucket list
Updated at:2025-11-03
Basic introduction
Once a user creates a bucket, they can check the list of all buckets they own.
Operation types
You can view the bucket list through the console, SDK, and API, as follows:
-
View the bucket list through the console:
- Sign in to the Baidu AI Cloud Object Storage (BOS) Management Console.
- You can view your owned buckets under the Storage Management section on the left-hand side of the console page.
-
View the bucket list through SDK:
- [Java SDK](BOS/SDK/Java-SDK/Bucket management/List buckets.md)
- [Python SDK](BOS/SDK/Python-SDK/Bucket management/List buckets.md)
- [PHP SDK](BOS/SDK/PHP-SDK/Bucket management.md#List buckets)
- [C# SDK](BOS/SDK/C-Dotnet-SDK/Bucket management.md#View bucket list)
- [JavaScript SDK](BOS/SDK/JavaScript-SDK/Bucket management.md#View bucket list)
- [Android SDK](BOS/SDK/Android-SDK/Bucket management/View bucket list.md)
- [iOS SDK](BOS/SDK/IOS-SDK/Bucket management/View bucket list.md)
- [Ruby SDK](BOS/SDK/Ruby-SDK/Bucket management/List buckets.md)
- [GO SDK](BOS/SDK/GO-SDK/Bucket management.md#List buckets)
- [C++ SDK](BOS/SDK/C++-SDK/Bucket management/List buckets.md)
-
View the bucket list through API:
Example
The following is a code example using Java SDK:
Java
1public void listBuckets (BosClient client) {
2 // Obtain the user's bucket list
3 List<BucketSummary> buckets = client.listBuckets().getBuckets();
4 // Traverse bucket
5 for (BucketSummary bucket : buckets) {
6 System.out.println(bucket.getName());
7 }
8}
