--- title: "head-object" slug: "head-object" updated: 2026-10-08T05:00:31Z published: 2026-10-08T05:00:31Z canonical: "cli.ncloud-docs.com/head-object" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # head-object Available in Classic and VPC Get the metadata of an object stored in a Ncloud Storage bucket. Note For a Sub Account user to execute this command, they must have View/GetObject action permissions. ## Syntax The `head-object` syntax is as follows: ``` aws s3api head-object \ --bucket \ --key \ [--version-id ] \ [--range ] \ [--part-number ] \ [--sse-customer-algorithm ] \ [--sse-customer-key ] \ [--sse-customer-key-md5 ] \ --endpoint-url ``` Note When you query an object for which object lock retention or legal hold has been set, the `ObjectLockMode`, `ObjectLockRetainUntilDate`, and `ObjectLockLegalHoldStatus` fields are returned. ## Options This section describes the options available when running `head-object`. ### Required options The following options are required for `head-object`. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--bucket` | String | Required | Bucket name | | `--key` | String | Required | Object name | ### Optional options These are the optional options for `head-object`. Options that are not specified will use their default values. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--version-id` | String | Optional | Object version ID - When querying a specific version of an object in a bucket with versioning enabled | | `--range` | String | Optional | Byte range to query | | `--part-number` | String | Optional | Part number to query - When retrieving only a part of the object | | `--sse-customer-algorithm` | String | Optional | User encryption algorithm (AES256) | | `--sse-customer-key` | String | Optional | User-provided encryption key | | `--sse-customer-key-md5` | String | Optional | User-provided encryption key's MD5 value | ### Common options For information about the options common to all `aws` subcommands, see [Ncloud Storage options](/docs/en/storage-ncloudstorage#%EC%98%B5%EC%85%98). ## Examples If the request to retrieve an object is successful, the object's metadata and encryption information are returned. ### Command The command example is as follows: ``` aws s3api head-object --bucket my-test-bucket \ --key img/image.png \ --endpoint-url=https://kr.ncloudstorage.com ``` ### Output The output example is as follows: ``` { "AcceptRanges": "bytes", "LastModified": "Fri, 04 Sep 2026 06:19:10 GMT", "ContentLength": 40960, "ChecksumType": "FULL_OBJECT", "ETag": "\"7cb4883d8f0eede455af0738a2d83b4b\"", "ContentType": "binary/octet-stream", "ServerSideEncryption": "AES256", "Metadata": {} } ``` ## Related commands Related commands are as follows: - [get-object](/docs/en/get-object)