Getting information about an object
- In the management console
, select a folder. - Go to Object Storage.
- Select the bucket from the list.
- In the left-hand panel, select
Objects. - Click the name of the object you need.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
-
See the description of the CLI command for getting information about an object:
yc storage s3api head-object --help -
Get a list of buckets in the default folder:
yc storage bucket listResult:
+------------------+----------------------+-------------+-----------------------+---------------------+ | 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.