Skip to content

ListObjectVersions does not contain Storage Class info #6822

@nickklon

Description

@nickklon

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.service-apiThis issue is due to a problem in a service API, not the SDK implementation.service:s3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions