Class AwsS3BucketOperations

java.lang.Object
io.micronaut.objectstorage.aws.AwsS3BucketOperations
All Implemented Interfaces:
BucketOperations<software.amazon.awssdk.services.s3.model.HeadBucketResponse>

@EachBean(AwsS3Configuration.class) @Requires(condition=ToggeableCondition.class) @Requires(beans=AwsS3Configuration.class) public class AwsS3BucketOperations extends Object implements BucketOperations<software.amazon.awssdk.services.s3.model.HeadBucketResponse>
AWS bucket operations.
Since:
3.0.0
Author:
Álvaro Sánchez-Mariscal
  • Constructor Details

    • AwsS3BucketOperations

      public AwsS3BucketOperations(@Parameter AwsS3Configuration configuration, software.amazon.awssdk.services.s3.S3Client s3Client)
  • Method Details

    • create

      public void create(@NonNull String name)
      Description copied from interface: BucketOperations
      Create a new bucket with the given name.
      Specified by:
      create in interface BucketOperations<software.amazon.awssdk.services.s3.model.HeadBucketResponse>
      Parameters:
      name - The name of the new bucket
    • retrieve

      public @NonNull Optional<BucketEntry<software.amazon.awssdk.services.s3.model.HeadBucketResponse>> retrieve(@NonNull String name)
      Description copied from interface: BucketOperations
      Retrieve an existing bucket/container.
      Specified by:
      retrieve in interface BucketOperations<software.amazon.awssdk.services.s3.model.HeadBucketResponse>
      Parameters:
      name - The name of the bucket
      Returns:
      The provider-native bucket/container data if it exists.
    • delete

      public void delete(@NonNull String name)
      Description copied from interface: BucketOperations
      Delete a bucket/container with the given name.
      Specified by:
      delete in interface BucketOperations<software.amazon.awssdk.services.s3.model.HeadBucketResponse>
      Parameters:
      name - The name of the bucket/container.