Updated on 2025-11-10 GMT+08:00

Objects

Objects are basic units stored in OBS. An object contains both data and the metadata that describes data attributes. Data uploaded to OBS is stored in buckets as objects.

An object consists of the key, metadata, and data:
  • The key specifies the name of an object. An object key is a UTF-8 string up to 1,024 characters long. Each object within a bucket is uniquely identified by a key.
  • The metadata describes an object. Metadata is a set of key-value pairs that are assigned to objects stored in OBS. There are two types of metadata: system-defined metadata and user-defined metadata.
    • System-defined metadata is automatically assigned by OBS. Such metadata includes Date, Content-Length, Last-Modified, ETag, and more.
    • User-defined metadata is the metadata you can assign to objects during upload to describe objects.
  • The data is the content of the object.

Objects are generally managed as files, but OBS, as an object-based service, has no concept of files and folders. For easy data management, OBS provides a method to simulate folders. By adding a slash (/) to an object name, for example, test/123.jpg, you can create a virtual folder, test, and use 123.jpg as the name of a file in that folder. But it is actually an object with the key test/123.jpg.

When uploading an object, you can specify a storage class for it. If you do not specify a storage class, the object inherits the storage class of the bucket. You can also change the storage class of an existing object in a bucket.

On OBS Console and OBS clients, you can use folders the same way you use them in a file system.

For details about object operations, see Managing Objects.