Creating a Bucket
After being authorized, a user can create buckets in OBS. A bucket belongs to only one account. If a bucket owner repeatedly creates the bucket, success messages are returned but no actions are performed. In other scenarios, if a bucket is created repeatedly, a message indicating a conflict is returned.
Before creating a bucket, plan the following:
- Bucket name
- Bucket region
- Default storage class
- Bucket access permissions
- Bucket cluster type
Table 1 Bucket planning Item
Description
Mandatory
Bucket name
Select a bucket name by referring to Bucket Names.
Yes
AZ mode of a bucket
You can enable or disable the multi-AZ mode when creating an OBS bucket. After the multi-AZ mode is enabled, data is stored in multiple AZs with redundancy, improving reliability. If the multi-AZ mode is disabled, data is stored only in a single AZ, which is cheaper than the storage in the multi-AZ mode. Buckets created earlier without specifying the AZ mode adopt the single-AZ storage by default.
For details about multi-AZ pricing, see Product Pricing Details.
No
Bucket region
Select a region by referring to Regions and Endpoints.
Yes
Bucket cluster type
If you have purchased the dedicated OBS cluster, you can specify the cluster type when creating a bucket. You can specify the dedicated cluster for a new bucket. Then the bucket and all objects in the bucket are stored in the dedicated cluster. You can also create a bucket in a public cluster. Then the bucket and all objects in the bucket are stored in the public cluster shared by all users.
NOTE:If the cluster type is not specified in a bucket creation request, the following bucket creation rules are applied: The bucket will be created in the dedicated cluster, if you have a dedicated cluster in the region where the bucket is to be created; The bucket will be created in a public cluster, if you do not have any dedicated cluster in the region where the bucket is to be created.NOTICE:The cluster type of the bucket cannot be changed once the bucket is created.
No
Default storage class
OBS allows you to specify the default storage class of a bucket when creating the bucket. If no storage class is specified for an object, OBS uses the default storage class of the bucket as that of the object. The charging rates and costs vary according to the storage class. You need to select a storage class based on service models. For details about storage classes, see Storage Classes.
NOTE:If you do not specify the default storage class for a bucket, the standard storage class is used by default.
NOTICE:The default storage class of a bucket can be modified, but the modification takes effect only for newly uploaded objects.
No
Bucket access permissions
The access permission of a bucket can be controlled by bucket policies and ACL rules. When creating a bucket, you can use the predefined header field of OBS to set a default ACL. However, bucket policies cannot be set during bucket creation. For details about the functions of and differences between bucket policies and bucket ACLs, see Permission Control.
A predefined ACL is used in scenarios where public access or authorization to other specified tenants is required. For example,
- x-obs-acl: public-read indicates that the read-only permission is granted to all users by default after the bucket is created.
- x-obs-grant-read: id=bbac5b3bdcb04674bad8b60a1eb885c4 indicates that the read-only permission is granted to the account whose ID is bbac5b3bdcb04674bad8b60a1eb885c4 by default after the bucket is created.
- For more predefined header fields, see Creating a Bucket.
NOTE:If you do not specify the access permission, the bucket is a private bucket and only the owner of the bucket has access permissions.
No
Creating a Bucket Using OBS Console
For details about how to create a bucket using OBS Console, see the Console Operation Guide.
Creating a Bucket Using OBS API
Although using the API for development is not recommended, you can choose to do so in special scenarios. For example, when running the environment on which the SDK depends on is impossible on embedded board software, you can use the API.
Comply with the API description and signature rules when using the OBS API for development. For details about the interface description and usage, see User Signature Authentication and Creating a Bucket in the Object Storage Service API Reference.
If a 5xx error is returned from the server or the request times out during bucket creation, the system takes approximately 30 minutes to make bucket information consistent. During the process, bucket information may be inaccurate.
Last Article: Use Restrictions
Next Article: Deleting a Bucket
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.