ListBuckets()仅列出我创建的存储桶,但我想列出我具有读/写访问权限的所有存储桶。
s3Client = AmazonS3ClientBuilder.standard()
.withCredentials(new AWSStaticCredentialsProvider(credentials))
.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(credential.getEndpoint(), null))
.withPathStyleAccessEnabled(true)
.build();
List<Bucket> buckets = s3Client.listBuckets();