- Documentation
Torch Object Storage
SDK Reference
C++
Bucket Interface
Basic Bucket Interface
Creating a Bucket (C++ SDK)
Basic Bucket Interface
Creating a Bucket (C++ SDK)
Creating a Bucket (C++ SDK)
A Bucket is the globally unique namespace in TOS, functioning as a data container used to store Object data. Users are provided with the capability to create a new bucket using a specified bucket name. The newly created bucket name must be unique within TOS. This document describes how to create a bucket.
Precautions
- Only lowercase letters a–z, digits, and hyphens (-) are permitted.
- The beginning and end can only be digits or letters.
- The length must be between 3 and 63 characters.
- When accessing TOS from other Volcano Engine products within the same region, it is recommended to use the internal network Endpoint. For more information about regions and Endpoints, see Regions and Access Domain Names.
- Before creating a bucket, you must ensure that your account has the tos:CreateBucket permission. You can grant the appropriate permissions through IAM policies. For detailed steps, see IAM policies.
Sample Code
The following code is used to create a bucket named examplebucket.
Relevant Documentation
For API documentation on creating a bucket, refer to CreateBucket. Last updated: 2025.09.25 14:22:45