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:
You can create a bucket in the COS Console. For more information, see Creating a Bucket in Console Guide.
You can use the REST API directly to initiate a bucket creating request. For more information, see PUT Bucket.
You can directly call the bucket creating method in the SDK. For more information, see the SDK documentation for the corresponding programming language below: