Available in Classic and VPC
Get the metadata of all versions of an object in a Ncloud Storage bucket.
For a Sub Account user to execute this command, they must have the View/ListBucketVersions action permission.
Syntax
The list-object-versions syntax is as follows:
aws s3api list-object-versions \
--bucket <bucket> \
[--prefix <prefix>] \
[--starting-token <starting-token>] \
[--page-size <page-size>] \
[--max-items <max-items>] \
--endpoint-url <endpoint-url>
Options
This section describes the options available when running list-object-versions.
Required options
The following options are required for list-object-versions.
| Options | Type | Required | Description |
|---|---|---|---|
--bucket |
String | Required | Bucket name |
Optional options
These are the optional options for list-object-versions. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--prefix |
String | Optional | Prefix to query |
--starting-token |
String | Optional | Location to start the query |
--page-size |
Integer | Optional | Number of items per page
|
--max-items |
Integer | Optional | Total number of items to include in the output |
Common options
For information about the options common to all aws subcommands, see Ncloud Storage options.
Examples
If the request to retrieve the object's version is successful, the identification information for each version and whether it is the latest version are returned.
Command
The command example is as follows:
aws s3api list-object-versions --bucket my-test-bucket \
--endpoint-url=https://kr.ncloudstorage.com
Output
The output example is as follows:
{
"Versions": [
{
"ETag": "\"0625bd26765357783b665dab605fdc7c\"",
"ChecksumAlgorithm": [
"CRC32"
],
"ChecksumType": "FULL_OBJECT",
"Size": 20,
"StorageClass": "STANDARD",
"Key": "img/copy.png",
"VersionId": "11111111-2222-3333-4444-555555555553",
"IsLatest": true,
"LastModified": "2026-08-19T02:49:44Z"
},
{
"ETag": "\"0625bd26765357783b665dab605fdc7c\"",
"ChecksumAlgorithm": [
"CRC32"
],
"ChecksumType": "FULL_OBJECT",
"Size": 20,
"StorageClass": "STANDARD",
"Key": "img/image.png",
"VersionId": "11111111-2222-3333-4444-555555555551",
"IsLatest": true,
"LastModified": "2026-08-19T02:49:43Z"
},
{
"ETag": "\"0625bd26765357783b665dab605fdc7c\"",
"ChecksumAlgorithm": [
"CRC32"
],
"ChecksumType": "FULL_OBJECT",
"Size": 20,
"StorageClass": "DEEP_ARCHIVE",
"Key": "img/image2.png",
"VersionId": "11111111-2222-3333-4444-555555555552",
"IsLatest": true,
"LastModified": "2026-08-19T02:49:44Z"
},
{
"ETag": "\"85641ff9e82a40a643bc74450bc8999f\"",
"ChecksumAlgorithm": [
"CRC32"
],
"ChecksumType": "FULL_OBJECT",
"Size": 48,
"StorageClass": "STANDARD",
"Key": "sample.txt",
"VersionId": "null",
"IsLatest": true,
"LastModified": "2026-08-19T02:44:28Z"
}
],
"RequestCharged": null,
"Prefix": ""
}
Related commands
Related commands are as follows: