Getting information about an object
Written by
Updated at December 11, 2024
Management console
Yandex Cloud CLI
API
- In the management console
, select Object Storage from the list of services and go to the bucket you need. - In the left-hand panel, select
Objects. - Click the name of the object you need.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
See the description of the CLI command to get information about an object:
yc storage s3api head-object --help
-
Get a list of buckets in the default folder:
yc storage bucket list
Result:
+------------------+----------------------+-------------+-----------------------+---------------------+ | NAME | FOLDER ID | MAX SIZE | DEFAULT STORAGE CLASS | CREATED AT | +------------------+----------------------+-------------+-----------------------+---------------------+ | first-bucket | b1gmit33ngp6******** | 53687091200 | STANDARD | 2022-12-16 13:58:18 | +------------------+----------------------+-------------+-----------------------+---------------------+
-
Run this command:
yc storage s3api head-object \ --bucket <bucket_name> \ --key <object_key>
Where:
--bucket
: Name of your bucket.--key
: Object key.
Result:
etag: '"d41d8cd98f00b204e9800998********"' request_id: 6428ce25******** accept_ranges: bytes content_type: application/octet-stream last_modified_at: "2024-10-08T12:36:36Z" server_side_encryption: aws:kms sse_kms_key_id: abj497vtg3h0********
To get information about an object, use the getObjectMeta S3 API method.