How to pass sort_by query parameters to https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/ec2/model/DescribeImagesRequest.html in a programatic fashion, much similar to what is given below
aws ecr describe-images --output json --repository-name foo-service --query 'sort_by(imageDetails,& imagePushedAt)[-1].imageTags[0]'