Using the aws cli I can send a --query
to return only the objects since LastModified:
aws s3api list-objects --profile <profile> --bucket <bucket> --query 'Contents[?LastModified>=`2017-01-19`][]'
Works great, returns only objects >=
the date.
I'm trying to translate this to the Java SDK with something like this:
ListObjectsV2Request req = new ListObjectsV2Request();
req.putCustomQueryParameter("LastModified>=`2017-01-19`", null);
I've tried a large number of variations on the both the query and parameter strings without any luck- the query always returns all objects. So two questions:
- Should this work? That is is this something putCustomQueryParameter should do?
- What's the correct syntax if the answer to #1 is 'Yes'?
Thanks in advance.