com.amazonaws.services.s3.model.ListBucketsRequest Java Examples
The following examples show how to use
com.amazonaws.services.s3.model.ListBucketsRequest.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: S3CossEndpoint.java From super-cloudops with Apache License 2.0 | 6 votes |
@Override public S3BucketList listBuckets(String prefix, String marker, Integer maxKeys) { S3BucketList bucketList = new S3BucketList(); ListBucketsRequest request = new ListBucketsRequest(); // TODO Custom parameters condition. request.putCustomQueryParameter("", prefix); request.putCustomQueryParameter("", marker); request.putCustomQueryParameter("", valueOf(maxKeys)); List<S3Bucket> s3Buckets = safeList((s3Client.listBuckets(request))).stream().map(b -> { S3Bucket bucket = new S3Bucket(); bucket.setName(b.getName()); bucket.setOwner(new Owner(b.getOwner().getId(), b.getOwner().getDisplayName())); bucket.setCreationDate(b.getCreationDate()); return bucket; }).collect(toList()); bucketList.getBucketList().addAll(s3Buckets); return bucketList; }
Example #2
Source File: DummyS3Client.java From ignite with Apache License 2.0 | 4 votes |
/** Unsupported Operation. */ @Override public List<Bucket> listBuckets(ListBucketsRequest listBucketsReq) throws SdkClientException { throw new UnsupportedOperationException("Operation not supported"); }
Example #3
Source File: AmazonS3Mock.java From Scribengin with GNU Affero General Public License v3.0 | 4 votes |
@Override public List<Bucket> listBuckets(ListBucketsRequest listBucketsRequest) throws AmazonClientException, AmazonServiceException { // TODO Auto-generated method stub return null; }