Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
© 2022 Yandex.Cloud LLC
Yandex Object Storage
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Buckets
      • Creating a bucket
      • Deleting a bucket
      • Limiting the maximum size of a bucket
      • Allowing public access to a bucket
      • Bucket encryption
      • Managing object lifecycles
      • Managing CORS configurations
      • Managing bucket policies
      • Managing bucket versioning
      • Editing a bucket ACL
      • Enabling logging
    • Objects
      • Uploading an object
      • Getting information about an object
      • Downloading an object
      • Getting a public link to an object
      • Deleting an object
      • Deleting all objects
      • Deleting a partially uploaded object
      • Editing an object ACL
    • Static website hosting
      • Hosting setup
      • Support for your own domain
      • Support for multiple domain names
      • Configuring HTTPS
    • Access management
      • Applying an access policy
  • Practical guidelines
    • Getting object query statistics with S3 Select
    • Getting website traffic statistics with S3 Select
    • Generating a billing report with resource break-down using S3 Select
    • Server-side encryption
    • Integrating an L7 load balancer with the CDN and Object Storage
    • Blue-green and canary deployment
    • Analyzing logs in DataLens
  • Concepts
    • Overview
    • Bucket
    • Objects
    • Bucket versioning
    • Object lifecycles
    • CORS
    • Static website hosting
    • Pre-signed URLs
    • Multipart upload
    • Access control lists (ACLs)
    • Bucket Policy
    • Uploading files via an HTML form
    • Storage class
    • Logging actions with a bucket
    • Backups
    • TLS protocol
    • S3 Select query language
    • Quotas and limits
  • Tools
    • All tools
    • Console clients
      • AWS CLI
      • S3cmd
    • File browsers
      • CyberDuck
      • WinSCP
    • SDK
      • AWS SDK for Java
      • Python SDK (boto)
      • The AWS SDK for .NET
      • AWS SDK for C++
      • AWS SDK for PHP
      • AWS SDK for Go
    • FUSE
      • GeeseFS
      • s3fs
      • goofys
    • FTP
      • Docker container for (S)FTP(S)
  • API reference
    • REST (Amazon S3-compatible)
      • How to use the API
      • Signing requests
      • API reference
        • All services and methods
        • Bucket
          • All methods
          • create
          • getBucketEncryption
          • getMeta
          • listObjects
          • listBuckets
          • deleteBucket
          • deleteBucketEncryption
          • putBucketEncryption
          • putBucketVersioning
          • getBucketVersioning
          • putBucketLogging
          • getBucketLogging
          • listObjectVersions
        • Object
          • All methods
          • upload
          • get
          • copy
          • getObjectMeta
          • delete
          • deleteMultipleObjects
          • options
          • selectObjectContent
        • Multipart upload
          • General multipart upload procedure
          • startUpload
          • uploadPart
          • copyPart
          • listParts
          • abortUpload
          • completeUpload
          • listUploads
        • Static Website Hosting
          • All methods
          • upload
          • get
          • delete
          • Static website response codes
        • CORS
          • All methods
          • XML structure of CORS configuration
          • upload
          • get
          • delete
        • Lifecycles
          • All methods
          • XML structure of lifecycle configuration
          • upload
          • get
          • delete
        • ACL
          • All methods
          • XML structure of ACL configuration
          • objectGetAcl
          • objectPutAcl
          • bucketGetAcl
          • bucketPutAcl
        • Bucket Policy
          • All methods
          • GetBucketPolicy
          • PutBucketPolicy
          • DeleteBucketPolicy
          • Data schema
          • Actions
          • Conditions
        • Common request headers
        • Common response headers
        • Responses
    • gRPC and REST
      • Authentication in the API
      • gRPC
        • Overview
        • BucketService
        • OperationService
      • REST
        • Overview
        • Bucket
          • Overview
          • create
          • delete
          • deleteHTTPSConfig
          • get
          • getHTTPSConfig
          • getStats
          • list
          • setHTTPSConfig
          • update
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
  • Questions and answers
  1. Concepts
  2. Objects

Objects

Written by
Yandex Cloud
,
improved by
Vitaly K.
  • Key
    • Directory
  • Object URL
  • Metadata
    • System metadata
    • User-defined metadata

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 stores user-defined and system metadata along with the object.

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 in Object Storage).

Key

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: [a-zA-Z0-9], -, _, /, \. Other characters may cause various problems in Object Storage.

Directory

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 x directory.

Each tool manages objects and directories according to their own logic, which is described in their respective documentation.

Note

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.

Object URL

You can specify a link to a bucket object in one of the following formats:

  • For a bucket with public access:
    • https://<bucket>.storage.yandexcloud.net/<key>
    • https://storage.yandexcloud.net/<bucket>/<key>
  • For a bucket with restricted access:
    • https://storage.yandexcloud.net/<bucket>/<key>?<parameters>
    • https://<bucket>.storage.yandexcloud.net/<key>?<parameters>

Where:

  • 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, signed links are generated by the service and let you temporarily download an object even from a bucket with restricted access. Read more about pre-signed urls.

Note

If you use the AWS SDK for .NET, access the s3.yandexcloud.net host.

Metadata

Metadata is stored with an object as name-value pairs.

Metadata can be system or user-defined.

System metadata

System metadata is defined by Object Storage.

Name Description
Date Date and time a request is sent to upload an object to Object Storage.
Content-Length Object size in bytes.
Last-Modified Date when the object was created or last modified.
Content-MD5 Object MD5 hash value, base64 encoded.
Cache-Control The value of the Cache-Control HTTP header passed by the client when saving the object to the bucket. Object Storage later returns this header to clients when responding to a request for an object or its metadata.

For example, the Cache-Control: max-age=200 header indicates that the object expires 200 seconds after the client receives it. Read more about this header in RFC 7234.
Expires The value of the Expires HTTP header passed by the client when saving the object to the bucket. Object Storage later returns this header to clients when responding to a request for an object or its metadata.

For example, the Expires: Thu, 15 Apr 2020 20:00:00 GMT header indicates that the object expires at 20:00:00 (GMT) on April 15, 2020. Read more about this header in RFC 7234.

User-defined metadata

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.

Note

The PUT request header must not exceed 8 KB. The maximum size of user-defined metadata in this header is 2 KB.

Was the article helpful?

Language / Region
© 2022 Yandex.Cloud LLC
In this article:
  • Key
  • Directory
  • Object URL
  • Metadata
  • System metadata
  • User-defined metadata