Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the AWS S3 list buckets call (see https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html). The call itself is trivial however there are some non conventional differences
S3.listBuckets
method should just return aFuture[Seq[ListBucketsResultContents]]
or the current version which is aSource[ListBucketsResultContents, NotUsed]
. I opted for theSource
variant due to consistency with the rest of the S3 API (every single other method in S3 that returns a list of entities is aSource
) plus there is a chance that AWS may add a paginatedlist-buckets
call in the future in which case its trivially easy to use the newly updated version. I don't feel strongly about it either way however, so if you want me to change it toFuture[Seq[ListBucketsResultContents]]
then just let me knowlistBuckets
call inHttpRequests.scala
is manually constructing the URI itself, i.e. there isn't any Path/Virtual access style and the authority is hardcoded tos3.amazonaws.com
(for AWS) since the call is region agnostic. I have tested this both with Minio and a real AWS S3 account so I can confirm its working