aws / aws/aws-sdk-java-v2

ListObjectVersions does not contain Storage Class info

Open
#6,822 1 comment 0 reactions 0 assignees View on GitHub
bug service-api service:s3
Dominant language
Java
Stars
2.6k
Forks
1k
Avg merge
2d 9h
Merged PRs (30d)
51

Description

### Describe the bug

`ListObjectVersionsResponse` has a list of `ObjectVersion`, which uses its own enum for storage class, `ObjectVersionStorageClass`. This enum currently has only two values: STANDARD and UNKNOWN_TO_SDK_VERSION. The result is any StorageClass other than Standard is unknown.

### Regression Issue

- [ ] Select this option if this issue appears to be a regression.

### Expected Behavior

Storage class info to be available list as it is via the CLI

### Current Behavior

Objects in storage classes other than standard show up as UNKOWN_TO_SDK_VERSION

### Reproduction Steps

```kotlin
val listing = s3Client.listObjectVersions(..) // call on a prefix with IntelligentTiering data
for (v in listing.versions()) {
println(version.storageClass().toString()) // prints null or STANDARD only
}
```

### Possible Solution

This train has probably left the station, but use the same enum as a list-objects-v2 or get-objects call

### Additional Information/Context

_No response_

### AWS Java SDK version used

2.42.21

### JDK version used

Irrelevant

### Operating System and version

Irrelevant

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.