Class AwsBlobClient
java.lang.Object
com.salesforce.multicloudj.blob.driver.AbstractBlobClient<AwsBlobClient>
com.salesforce.multicloudj.blob.aws.AwsBlobClient
- All Implemented Interfaces:
Provider,SdkService,AutoCloseable
An implementation of the
AbstractBlobClient for AWS S3. AwsBlobClient is service client
for interacting with AWS Cloud Blob Storage.
This class provides methods to interact with AWS resources using AWS SDK for Java to interact with the S3 service.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.salesforce.multicloudj.blob.driver.AbstractBlobClient
credentialsOverrider, region -
Constructor Summary
ConstructorsConstructorDescriptionAwsBlobClient(AwsBlobClient.Builder builder) Constructs an instance ofAwsBlobClientusing the provided builder and S3 client.AwsBlobClient(AwsBlobClient.Builder builder, software.amazon.awssdk.services.s3.S3Client s3Client) Constructs an instance ofAwsBlobClientusing the provided builder and S3 client. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns a new instance ofAwsBlobClient.Builder.voidclose()Closes the underlying S3 client and releases any resources.protected voiddoCreateBucket(String bucketName) Creates a new bucket with the specified name.protected ListBucketsResponseLists all the buckets in the current region for this authenticated account.Class<? extends SubstrateSdkException>Returns the appropriate exception class based on the given throwable.Methods inherited from class com.salesforce.multicloudj.blob.driver.AbstractBlobClient
createBucket, getProviderId, getRegion, listBuckets
-
Constructor Details
-
AwsBlobClient
Constructs an instance ofAwsBlobClientusing the provided builder and S3 client.- Parameters:
builder- the builder used to configure this client.
-
AwsBlobClient
public AwsBlobClient(AwsBlobClient.Builder builder, software.amazon.awssdk.services.s3.S3Client s3Client) Constructs an instance ofAwsBlobClientusing the provided builder and S3 client.- Parameters:
builder- the builder used to configure this client.s3Client- the S3 client used to communicate with the S3 service.
-
-
Method Details
-
doListBuckets
Lists all the buckets in the current region for this authenticated account.- Specified by:
doListBucketsin classAbstractBlobClient<AwsBlobClient>- Returns:
- a
ListBucketsResponsecontaining a list ofBucketInfoobjects representing the buckets in the current region for this account.
-
doCreateBucket
Creates a new bucket with the specified name.- Specified by:
doCreateBucketin classAbstractBlobClient<AwsBlobClient>- Parameters:
bucketName- The name of the bucket to create
-
builder
Returns a new instance ofAwsBlobClient.Builder.- Returns:
- a new instance of
AwsBlobClient.Builder.
-
getException
Returns the appropriate exception class based on the given throwable.- Parameters:
t- The Throwable to be mapped.- Returns:
- The Class of the corresponding SubstrateSdkException.
-
close
public void close()Closes the underlying S3 client and releases any resources.
-