To store files in Cloud Object Storage (COS), you need to create a bucket to store objects. You can create a bucket via the console, tools, API, or SDK. For the bucket concept, please refer to Bucket Overview. The following is a detailed introduction on how to create a bucket. Description
One root account can create up to 200 buckets.
Once a bucket is created successfully, its name and region cannot be modified.
Bucket names must be unique under the same root account and cannot be changed.
Bucket names can only contain lowercase letters, numbers, and hyphens, i.e., [a-z, 0-9], and their combinations. The maximum allowed characters for a bucket name are influenced by the region abbreviation and APPID, with a total of up to 60 characters for the complete request domain name. For example, the request domain 123456789012345678901-1250000000.cos.ap-beijing.myqcloud.com has a total of 60 characters. A bucket name cannot start or end with "-".
How to Use
Using COS console
2. In the left sidebar, click bucket list.
3. On the bucket list page, click Create Bucket.
4. In the pop-up Create Bucket dialog box, configure the following information:
4.1 Information
Region: Please select the COS region corresponding to the physical area where your business (or number of users) is concentrated. This setting cannot be modified after creation. For more information, see regions and access endpoints. Name: Enter a custom bucket name. It cannot be modified after creation. For naming specifications, see naming specification for buckets. Access Permission: Buckets provide three types of access permissions by default: Private Read/Write, Public Read/Private Write, and Public Read/Write. These can still be modified after setting. For details, see bucket access permissions. Endpoint: Automatically generated. After bucket creation, you can use that domain name to access the bucket.
MAZ configuration: The Multi-AZ feature is an identifier for buckets. When you enable the multi-AZ configuration, your data will be stored in different IDCs within the same region, providing intra-city disaster recovery. Currently, this feature is applicable only to partial regions such as Beijing, Shanghai, Guangzhou, Hong Kong (China), and Singapore region. For more applicable regions and feature introduction, see the Multi-AZ feature overview document. Note:
Multi-AZ storage incurs higher storage capacity fees than single-AZ. For details, see product pricing in each region. After enabling multi-AZ configuration for a bucket, it cannot be modified. Once enabled, data will be stored in the bucket with storage types that support multi-AZ features (such as MAZ_STANDARD and MAZ_STANDARD_IA). Configure with caution. If version control is also enabled, its status cannot be modified.
The COS bucket you created cannot enable multi-AZ configuration. It can only be enabled when creating a new bucket.
4.2 Advanced optional configuration
Note:
This setting item is selectable, configure as needed.
Versioning: Once enabled, uploading objects with the same name or performing operations like add, delete, modify will save earlier versions, convenient for you to retrieve object history.
Note:
If version control and the Multi-AZ feature are enabled simultaneously, the version control state cannot be changed. Configure with caution.
Smart Compression: Once enabled, each time you access images of specified format in the bucket, they will be compressed in real time without changing the image format, drastically saving traffic. For details, see introduction to smart compression. Logging: Records various request logs related to bucket operations for you.
Bucket Tag: A bucket tag serves as an identifier for managing buckets. You can set tags for buckets, making it easy to group and manage them. For details, see set bucket tags. Server-Side Encryption: You can choose the server encryption method. For the server-side encryption overview and supported regions, see server-side encryption overview. 4.3 Confirm
Confirm the bucket configuration information. If modification is needed, click Back.
5. After confirming the information is correct, click Create to create a bucket. In the bucket list interface, you can see the newly created bucket.
Using tools
You can use tools to create a bucket, such as the COSBrowser tool, COSCMD tool, etc. For more information, see Tools Overview. Using the REST API
Use the REST API to initiate a bucket creating request. For more information, see PUT Bucket. Using SDKs
Directly call the bucket creating method in the SDK. For more information, see the SDK documentation for the corresponding programming language below: