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 the following three types based on how they are created:
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.
An object cannot be converted to a different object type. For example, a normal object cannot be converted to a multipart object or an appendable object.
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 is 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 because of a network exception or program error, the upload task is resumed from the position recorded in the checkpoint file. | |
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 use a signed URL or the temporary access credentials obtained from Security Token Service (STS) to grant a third-party user the permissions to upload objects to OSS. | |
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 use Real-Time Messaging Protocol (RTMP) to ingest H.264-encoded video streams and Advanced Audio Coding (AAC)-encoded audio streams to OSS. Audio and video data uploaded to OSS can be played on demand or be used for live streaming 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 the specified 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 the same 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 specify a prefix to search for objects. | |
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 access control lists (ACLs) for objects that have the same tag. | |
Symbolic links can be used to access objects that are frequently used in buckets. After you configure a symbolic link for an object, you can use the symbolic link to quickly access the object. A symbolic link works in a similar manner as a shortcut in Windows. | |
Object metadata describes object attributes. Object 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 the user metadata of an object to identify the purposes or attributes of the object. | |
When you access objects in OSS by using a client, especially a client on which traffic throttling is difficult to perform, a large amount of bandwidth resources 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 the 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 in multipart upload mode, the object is split into multiple small parts. After all parts are uploaded to the OSS server, you can call CompleteMultipartUpload to combine them into a complete object. | |
Compared with typical file systems, data in OSS is stored as objects in a flat structure instead of a hierarchical structure. All objects in OSS are stored in buckets. You can use directories in OSS to help you categorize objects and control access to your objects in a simplified manner. | |
You can use the data indexing feature to index the metadata of objects. You can specify the metadata of objects as index conditions to query objects. Data indexing can help you understand and manage data structures in a more efficient manner. Data indexing also facilitates queries, statistics, and the management of objects. |