Objects are the basic unit for data storage in Object Storage Service (OSS). OSS stores all elements as objects in buckets, and does not use a hierarchical structure to store objects.
Object types
Objects can be classified into three types based on how they are created. The following table describes the three types.
You cannot change the type of an object. For example, a normal object cannot be converted to a multipart object or an appendable object.
Type | Definition | Description |
Normal | Objects of this type are created by using simple upload. |
|
Multipart | Objects of this type are created by using multipart upload. |
|
Appendable | Objects of this type are created by using append upload. | You can append content only to appendable objects. |
Symlink | Symbolic links generated by using PutSymlink | Create symbolic links for immediate access to objects in OSS buckets. |
Delete Marker | Delete markers generated by using DeleteObject request when the version ID of the object is not specified | If you do not specify a version ID in the DeleteObject request sent to an object in a bucket whose versioning status is enabled or suspended, the object is not deleted. Instead, OSS inserts a delete marker which becomes the current version of the object for data recovery purposes. |
Object information
An object consists of the following information:
Key: the name of the object. You can use the object key to query the object.
Data: the content that is stored in the object. The length of the content is not limited.
Version ID: the ID of the object version. After you upload an object to a versioned bucket, OSS generates a version ID for the object.
Object metadata: the metadata of the object. Object metadata is a set of key-value pairs that define the attributes of the object, such as the time when the object was last modified and the object size. You can add custom information to object metadata.
Related operations
The following table describes the operations that you can perform on objects.
Operation | Description |
Simple upload allows you to call the PutObject operation to upload a single object that is less than 5 GB in size. Simple upload is suitable for scenarios in which an object can be uploaded in a single HTTP request. | |
You can perform multipart upload to split an object that you want to upload into multiple parts and upload the parts separately. After the parts are uploaded, you can call the CompleteMultipartUpload operation to combine these parts into a complete object. | |
When you use resumable upload to upload objects to OSS, you can specify a checkpoint file. The checkpoint file stores the progress of the resumable upload task. If an object fails to be uploaded due to a network exception or program error, the upload task is resumed based on the progress recorded in the checkpoint file to upload the remaining data. | |
After an object is uploaded, OSS can send a callback request to the application server. To configure upload callbacks, you need to only add the required callback parameters to the upload request that is sent to OSS. | |
You can upload data from clients directly to OSS by performing a direct client upload. The direct client upload solution accelerates uploads and reduces the resource usage of the application server by eliminating the need to transfer objects to and from the application server. | |
You can call the PostObject operation to upload an object whose size is up to 5 GB by using an HTML form. | |
You can perform append upload to append content to an appendable object. | |
You can ingest H.264-encoded video streams and Advanced Audio Coding (AAC)-encoded audio streams to OSS over Real-Time Messaging Protocol (RTMP). Audio and video data uploaded to OSS can be played on demand or be used for livestreaming in latency-insensitive scenarios. | |
Simple download allows you to call the GetObject operation to download an object. Simple download is suitable for scenarios in which an object can be downloaded in a single HTTP request. | |
You can download data from a specific position of an object. When you download a large object, you can split the object into multiple parts and download the parts at different points in time. If a download task is interrupted, you can resume the download task from the position at which the task is interrupted. | |
You can authorize third-party users to download an object by providing them with temporary access credentials or a signed URL without exposing the AccessKey pair of the object owner. | |
By default, when you list objects in a bucket, the objects are returned in alphabetical order. You can list all objects, objects whose names contain a specific prefix, or a specific number of objects in a bucket. | |
You can copy an object from a source bucket to a destination bucket within the same region without modifying the content of the object. | |
You can rename an object in a bucket. | |
After you upload objects to a bucket, you can share the URLs of the objects with third parties for downloads or previews. | |
If a large number of objects are stored in a bucket, you can search for objects by prefix. | |
You can read objects whose storage class is Cold Archive or Deep Cold Archive only after they are restored. | |
You can use multiple methods to delete objects that you no longer need from your buckets in OSS. | |
You can configure object tags to classify objects. Tags allow you to configure lifecycle rules and ACLs for objects that have the same tag. | |
You can use symbolic links to access objects that are frequently accessed. A symbolic link points to an object and allows you to quickly access the object. Symbolic links are similar to shortcuts in Windows. | |
Object metadata describes the attributes of an object. The metadata includes standard HTTP headers and user metadata. You can configure HTTP headers to create custom HTTP request policies, such as object cache policies and policies for forced object downloads. You can also configure user metadata to identify the purposes or attributes of objects. | |
When you access objects in OSS by using a client, especially a client on which traffic throttling is difficult to implement, a large amount of bandwidth may be occupied. This affects other applications that access OSS. To prevent this issue, you can use the single-connection bandwidth throttling feature to throttle bandwidth for operations such as object upload and download. This way, sufficient bandwidth can be reserved for other applications that access OSS. | |
You can call the SelectObject operation to execute SQL statements on an object and obtain the execution results. | |
When you upload an object by using multipart upload, the object is split into multiple small parts. After all parts are uploaded to the OSS server, you can call the CompleteMultipartUpload operation to combine them into a complete object. | |
Compared with traditional file systems that use a hierarchical structure, data in OSS is stored as objects in a flat structure. All objects in OSS are stored in buckets. You can use directories in OSS to categorize objects and manage access to your objects in a simplified manner. |