Updated on 2025-06-20 GMT+08:00

Configuring Storage Classes for Buckets and Objects

Scenarios

This section describes how to configure storage classes for buckets or objects when creating buckets or uploading objects. If you want to change the storage class of a bucket or object, see Changing the Storage Classes of Buckets and Objects.

Bucket and Object Storage Classes

You can specify the storage class for a bucket when creating the bucket. You can also change the storage class of a bucket after the bucket is created.

You can specify a storage class for an object when uploading it, or you can change the object storage class after the object has been uploaded.

Changing the storage class of a bucket does not change the storage class of existing objects in the bucket. However, any new objects uploaded to the bucket will inherit the bucket's new storage class.

Configuring a Storage Class During Bucket Creation

  1. In the upper right corner of the OBS Console page, click Create Bucket.
  2. Configure bucket parameters.

    Table 1 Bucket parameters

    Parameter

    Description

    Region

    Region where the bucket is located. For low latency and faster access, select the region nearest to you. Once the bucket is created, its region cannot be changed.

    Bucket Name

    Name of the bucket. A bucket name must be unique across all accounts and regions. Once a bucket is created, its name cannot be changed.

    According to the globally applied DNS naming rules, an OBS bucket name:

    • Must be unique across all accounts and regions. The name of a deleted bucket can be reused for another bucket or a parallel file system at least 30 minutes after the deletion.
    • Must be 3 to 63 characters long. Only lowercase letters, digits, hyphens (-), and periods (.) are allowed.
    • Cannot start or end with a period (.) or hyphen (-), and cannot contain two consecutive periods (..) or contain a period (.) and a hyphen (-) adjacent to each other.
    • Cannot be formatted as an IP address.
      NOTE:

      When you access OBS through HTTPS using virtual hosted-style URLs, if the bucket name contains a period (.), the certificate verification will fail. To work around this issue, you are advised not to use periods (.) in bucket names.

    Storage Class

    The storage class of a bucket. These storage classes can meet different needs for storage performance and costs.

    • The Standard storage class is for storing a large number of hot files or small files that are frequently accessed (multiple times per month on average) and require quick retrieval.
    • The Warm storage class is for storing data that is less frequently accessed (less than 12 times per year on average) but requires quick retrieval.
    • The Cold storage class is for archiving data that is rarely accessed (once a year on average) and has less demanding requirements for quick retrieval.

    For details, see Overview.

    Bucket Policy

    Controls read and write permissions for buckets.

    • Private: Only users granted permissions by the bucket ACL can access the bucket.
    • Public Read: Anyone can read objects in the bucket.
    • Public Read and Write: Anyone can read, write, or delete objects in the bucket.

    Enterprise Project

    You can add a bucket to an enterprise project for unified management.

    Create an enterprise project on the enterprise project page. The default enterprise project is named default.

    On the Enterprise Project Management Service page, create an enterprise project, create a user group and add users to this group, and then add the user group to the enterprise project. By doing so, users in this user group obtain the operation permissions for the buckets and objects in the enterprise project.

    NOTE:

    Only an enterprise account can configure enterprise projects.

    OBS Viewer and OBS Operator are the fine-grained authorizations of the enterprise project user group in OBS.

    Default Encryption

    When is enabled for a bucket, you can configure an object to inherit the bucket's KMS encryption settings when you upload the object to the bucket.

    After is enabled for a bucket, all objects uploaded to the bucket are automatically encrypted. The obs/default key is used by default. You can also click Create KMS Key to switch to the management console and create a customer master key. Then go back to OBS Console and select the key from the drop-down list.

    WORM

    When you enable write-once-read-many (WORM), you can configure a retention policy for the current bucket. The object version which the retention policy is applied to cannot be deleted within a specified period. You can only enable WORM when you create a bucket. Once enabled for a bucket, WORM cannot be disabled. When you enable WORM, OBS automatically enables versioning for the bucket, and versioning cannot be suspended later for that bucket.

    Tags

    Optional. Tags are used to identify and classify buckets in OBS. Each tag is represented by a key-value pair.

    For more information, see Tag Overview.

  3. Click Create Now.

Configuring a Storage Class During Object Uploads

  1. In the bucket list, click the bucket you want to operate. The Overview page is displayed.
  2. In the navigation pane, choose Objects.
  3. Click Upload Object or go to the folder where you want to upload files and click Upload Object. The Upload Object dialog box is displayed.

    If the files that you want to upload to OBS are stored in Microsoft OneDrive, it is recommended that the names of these files contain a maximum of 32 characters to ensure compatibility.

    Figure 1 Uploading objects

  4. Select a storage class. If you do not specify a storage class, the objects you upload inherit the default storage class of the bucket.

    An object can have a different storage class from its bucket. By default, an object inherits the storage class of the bucket where it is uploaded. You can specify a storage class for an object when uploading it, or you can change the object storage class after the object is uploaded.

  5. Drag and drop the files or folders you want to upload to the Upload Object area.

    You can also click add files in the Upload Object area to select files.

  6. Click Upload.