Objects are hosted in buckets and contain user data in the format it was uploaded in.
The object ID is the string key.
Object Storage lets you store objects in standard and cold storage. For more information, see Storage class.
Object Storage supports the following operations with objects:
- Uploading an object to storage
- Downloading an object from storage.
- Copying an object inside the storage (for example, from one bucket to another).
All other operations that can be performed using tools are combinations of the ones given above.
You can configure lifecycles for bucket objects.
Object Storage restricts the size of objects and their metadata. For more information, see Quotas and limits).
The key is the ID of an object in a bucket.
Objects are stored in a flat structure, but GUI-based tools let you use Object Storage as a hierarchical file system. Hierarchical view is possible because keys can be written as paths in a file system (for example,
top_level_prefix/subprefix/text_data.txt). In the Yandex.Cloud management console, prefixes are called folders.
A key must:
- Be UTF-8 encoded.
- Be less than 1024 bytes in size.
- Not contain the characters
: * ? " < > | !.
The following characters are safe to use in a key:
\. Other characters may cause various problems in Object Storage.
There are no directories in Object Storage, but GUI-based file management clients like CyberDuck and the Object Storage interface in the Yandex.Cloud management console emulate them. A zero-size object serves as a directory. Its key is included as a prefix in the keys of other objects. For example, an object with the
x key and zero size is a directory in the management console, while an object with the
x/y.txt key is the
y.txt object located in the
Each tool manages objects and directories according to their own logic, which is described in their respective documentation.
Deleting directories with objects is an asynchronous operation. At the start of the operation, Object Storage prepares a list of objects to delete and then deletes them. If during the deletion process, you upload an object to Object Storage that should be in the directory being deleted, the object will still be uploaded successfully. After both operations in Object Storage are complete, you're left with the directory that was supposed to be deleted and the newly uploaded file.
You can specify a link to a bucket object in one of the following formats:
- For a bucket with public access:
- For a bucket with restricted access:
bucket: Bucket name.
key: Key (file path).
parameters: Additional parameters for accessing a bucket with restricted access. For example, a signature and validity period.
For buckets with restricted access, links are generated by the service and let you temporarily download an object even from a bucket with restricted access.
If you use the SDK for .NET, access the
Metadata is stored with an object as
Metadata can be system or user-defined.
System metadata is defined by Object Storage.
||Date and time a request is sent to upload an object to Object Storage.|
||Object size in bytes.|
||Date when the object was created or last modified.|
||Object MD5 hash value, base64 encoded.|
||The value of the
For example, the
||The value of the
For example, the
When uploading an object to Object Storage, you can pass a set of metadata as a
name-value pair along with the object.
In the Amazon S3-compatible HTTP API, metadata is passed as HTTP headers. The header name must start with
x-amz-meta-. When an object is requested via the HTTP API, Yandex Object Storage returns metadata in the form of HTTP headers with the same prefix.
Metadata names must conform to the HTTP header naming convention and be in lowercase.
The PUT request header must not exceed 8 KB. The maximum size of user-defined metadata in this header is 2 KB.