Last updated: 2019-11-13 15:08:21PDF
To use COS, you need to create a bucket that helps you use and manage objects. You can create buckets via the console, APIs, or SDKs.
You can use the following sample code to create a bucket in the specified region. The supported parameters are:
- Bucket: specify your full bucket name in the format of
- Region: select the region where your bucket resides. Once the bucket is created, the region cannot be modified. For more information, see Regions and Access Domain Names supported by COS.
Via the COS Console
You can create a bucket in the COS Console. For more information, see Creating a Bucket in Console Guide.
Via REST API
You can use the REST API directly to initiate a bucket creating request. For more information, see PUT Bucket.
Via the SDK
You can directly call the bucket creating method in the SDK. For more information, see the SDK documentation for the corresponding programming language below: