Objects are hosted in buckets and contain user data in the format it was uploaded in.
An object ID is a string key.
Object Storage allows you to store objects in storages belonging to various classes depending on your requirements for the storage duration and frequency of object operations. For more information, see Storage class.
Object Storage supports the following operations with objects:
- Uploading an object to a storage.
- Downloading an object from a storage.
- Copying an object within a storage, e.g., from one bucket to another.
You can also combine these operations using the tools.
You can configure lifecycles for bucket objects.
Object Storage restricts the size of objects and their metadata. For more information, see Quotas and limits in Object Storage.
A key is an ID of an object in a bucket.
Objects are stored in a flat structure, although GUI-based tools allow you to use Object Storage as a hierarchical file system. Hierarchical view is possible because keys can be written as paths in a file system, e.g.,
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 these characters:
: * ? " < > | !.
The following characters are safe to use in a key:
\. Other characters may cause various issues in Object Storage.
There are no directories in Object Storage, but GUI-based file management clients, such as CyberDuck and the Object Storage interface in the Yandex Cloud management console, can emulate them. Such an emulated directory is a zero-size object. 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 its own logic, which is described in the respective documentation.
Deleting folders with objects is an asynchronous operation. Once it starts, Object Storage prepares a list of objects to delete, and then deletes them. If during the process you upload an object to Object Storage to a directory marked for deletion, the object will upload successfully. After both operations in Object Storage are complete, the directory marked for deletion will remain and contain 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, e.g., a signature and validity period.
You can get files from a publicly available bucket using a public link via both HTTP and HTTPS even if the bucket has no website hosting configured. In this case, a cloud-level certificate from GlobalSign will be used for HTTPS access.
For buckets with restricted access, the service generates temporary pre-signed URLs that allow you to download an object even from a bucket with restricted access. You can read more about pre-signed URLs, their generation, and their use here.
If you use the
http://<bucket>.storage.yandexcloud.net?<parameters> format instead, HTTPS will not be available.
You can read more about HTTPS support when hosting websites in Object Storage under Static website hosting.
If you use AWS SDK for .NET, access the
Metadata is stored with an object as
This can be either system or user metadata.
System metadata is defined by Object Storage.
||Date and time the request to upload an object to Object Storage was sent.|
||Object size in bytes.|
||Date the object was created or last modified.|
||Object MD5 hash value, Base64-encoded.|
||Value of the
For example, the
||Value of the
For example, the
When uploading an object to Object Storage, you can provide its metadata as
In an Amazon S3-compatible HTTP API, metadata is provided as HTTP headers. The header name must start with
X-Amz-Meta-. When an object is requested via HTTP API, Object Storage returns metadata as HTTP headers with the same prefix.
Metadata names must consist of ASCII characters only. The headers being provided are transformed as follows:
Foo-Bar_baz is the name of the metadata to store with the object.
The PUT request header must not exceed 8 KB. The maximum size of user-defined metadata in this header is 2 KB.