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 Summary
ConstructorsConstructorDescriptionAwsS3BucketOperations(AwsS3Configuration configuration, software.amazon.awssdk.services.s3.S3Client s3Client) -
Method Summary
Modifier and TypeMethodDescriptionvoidCreate a new bucket with the given name.voidDelete a bucket/container with the given name.@NonNull Optional<BucketEntry<software.amazon.awssdk.services.s3.model.HeadBucketResponse>> Retrieve an existing bucket/container.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BucketOperations
exists
-
Constructor Details
-
AwsS3BucketOperations
public AwsS3BucketOperations(@Parameter AwsS3Configuration configuration, software.amazon.awssdk.services.s3.S3Client s3Client)
-
-
Method Details
-
create
Description copied from interface:BucketOperationsCreate a new bucket with the given name.- Specified by:
createin interfaceBucketOperations<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:BucketOperationsRetrieve an existing bucket/container.- Specified by:
retrievein interfaceBucketOperations<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
Description copied from interface:BucketOperationsDelete a bucket/container with the given name.- Specified by:
deletein interfaceBucketOperations<software.amazon.awssdk.services.s3.model.HeadBucketResponse>- Parameters:
name- The name of the bucket/container.
-