• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (OBS)
  4. Operations on Buckets
  5. PUT Bucket

PUT Bucket

You can send the PUT Bucket request to create a bucket with the specified name.

NOTE:

You can create a maximum of 100 buckets.

The name of a bucket must be unique in OBS. If a user repeatedly creates namesake buckets in the same region, status code 200 is returned. If namesake buckets are repeatedly created in other cases, status code 409 is returned. You can set the ACL of a bucket by adding optional header x-amz-acl to a request.

NOTE:

In multiple regions scenarios, if user A creates a bucket, deletes the bucket later, and immediately creates a bucket with the same name in different regions, the system will respond 409. If user A creates a bucket with the same name in different regions 30 minutes later, the system will respond 200.

If a 5xx error is returned from the server or the request times out during bucket creation, the system takes about 10 minutes to make bucket information consistent. During the process, bucket information is inaccurate.

Storage Class

Users are allowed to create buckets of different storage classes. The x-default-storage-class header in a bucket creation request specifies the default storage class for a bucket. The storage class of the objects in a bucket is the same as that of the bucket. There are three storage classes: STANDARD (OBS Standard), STANDARD_IA (OBS Warm), and GLACIER (OBS Cold). If this header is not in the request, the storage class of the bucket created is OBS Standard. When users upload an object to a bucket, if they do not set the storage class of the object (see PUT Object), the object will use the default storage class of the bucket.