aws-sdk-perl icon indicating copy to clipboard operation
aws-sdk-perl copied to clipboard

S3::ListObjectVersions does not support a prefix

Open readparse opened this issue 8 years ago • 3 comments

I would submit a pull request, but since my patch was in generated code, and I have not yet figured out how to make the same change in this repo, I am just letting you know what I did to make it work.

It's also entirely possible that there is a more appropriate way to support this additional property. Please advise if I have missed the mark.

In the S3::ListObjectVersions class, the _api_uri attribute is set to /{Bucket}?versions. I changed it to /{Bucket}?versions&prefix={Prefix}. Now it sends the prefix if one was provided, but continues to work correctly without one as well.

readparse avatar May 08 '17 15:05 readparse

Untested, but it looks like you're supposed to provide Prefix as a parameter: See for example: https://github.com/pplu/aws-sdk-perl/blob/master/examples/s3-common-methods.pl#L185

This is ListObjects, ListObjectVersions has the same parameter - https://metacpan.org/pod/Paws::S3::ListObjectVersions#Prefix-=>-Str

castaway avatar Jun 05 '18 11:06 castaway

This looks like it works as-is, a test for this has been added in #265 (tests/stabilisations branch), see t/s3/prefix.t

castaway avatar Nov 06 '19 12:11 castaway

That one is passing as well on

https://github.com/byterock/aws-sdk-perl/tree/s3ObjectTagging

1..2 ok All tests successful.

byterock avatar Feb 04 '20 21:02 byterock