Class GoogleCloudBucketOperations
java.lang.Object
io.micronaut.objectstorage.googlecloud.GoogleCloudBucketOperations
- All Implemented Interfaces:
BucketOperations<com.google.cloud.storage.Bucket>
@EachBean(GoogleCloudStorageConfiguration.class)
@Requires(condition=ToggeableCondition.class) @Requires(beans=GoogleCloudStorageConfiguration.class)
public class GoogleCloudBucketOperations
extends Object
implements BucketOperations<com.google.cloud.storage.Bucket>
GCP bucket operations.
- Since:
- 3.0.0
- Author:
- Álvaro Sánchez-Mariscal
-
Constructor Summary
ConstructorsConstructorDescriptionGoogleCloudBucketOperations(GoogleCloudStorageConfiguration configuration, com.google.cloud.storage.Storage storage) -
Method Summary
Modifier and TypeMethodDescriptionvoidCreate a new bucket with the given name.voidDelete a bucket/container with the given name.Optional<BucketEntry<com.google.cloud.storage.Bucket>> 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
-
GoogleCloudBucketOperations
public GoogleCloudBucketOperations(@Parameter GoogleCloudStorageConfiguration configuration, com.google.cloud.storage.Storage storage)
-
-
Method Details
-
create
Description copied from interface:BucketOperationsCreate a new bucket with the given name.- Specified by:
createin interfaceBucketOperations<com.google.cloud.storage.Bucket>- Parameters:
name- The name of the new bucket
-
retrieve
Description copied from interface:BucketOperationsRetrieve an existing bucket/container.- Specified by:
retrievein interfaceBucketOperations<com.google.cloud.storage.Bucket>- 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<com.google.cloud.storage.Bucket>- Parameters:
name- The name of the bucket/container.
-