tencent cloud

All product documents
Cloud Object Storage
Creating Buckets - mb
Last updated: 2024-01-06 16:15:35
Creating Buckets - mb
Last updated: 2024-01-06 16:15:35
The mb command is used to create a bucket.

Command Syntax

./coscli mb cos://<BucketName-APPID> -e <endpoint> [flag]
Note:
To create a bucket with the mb command, you need to add the global flag -e or --endpoint to specify the region where the bucket resides.
mb includes the following parameters:
Parameter Format
Description
Example
cos://<BucketName-APPID>
Customizes the bucket name
cos://examplebucket-1250000000
mb includes the following optional flags:
Flag Abbreviation
Flag Name
Description
-h
--help
Views the usage of this command.
-r
--region
Indicates the region of the bucket
Note:
After you run the mb command to successfully create a bucket, we recommend that you add information about the bucket in the configuration file, so that you can use the bucket alias for quick operations. For command usage, see the following example.
For more general options for this command (such as switching buckets or user accounts), see Common Options.

Examples

// Create the bucket3 bucket.
./coscli mb cos://bucket3-1250000000 -e cos.ap-chengdu.myqcloud.com
If you want to configure an alias for the bucket you just created, update the configuration file with the following command:
// Update the configuration file.
./coscli config add -b bucket3-1250000000 -e cos.ap-chengdu.myqcloud.com -a bucket3
// After the update, you can access the bucket at cos://bucket3.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon