Package org.cdlib.mrt.s3v2.action
Class PutObjectData
java.lang.Object
org.cdlib.mrt.s3v2.action.PutObjectData
Before running this Java V2 code example, set up your development
environment, including your credentials.
For more information, see the following documentation topic:
https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidputS3Object(software.amazon.awssdk.services.s3.S3Client s3, String bucketName, String objectKey, String objectPath, Map<String, String> metadata) Uploads an object to an Amazon S3 bucket with metadata.uploadFile(software.amazon.awssdk.transfer.s3.S3TransferManager transferManager, String bucketName, String key, URI filePathURI) static voiduploadFileAsync(software.amazon.awssdk.services.s3.S3AsyncClient s3AsyncClient, String bucketName, String key, String downloadedFileWithPath, Map<String, String> metadata) static voiduploadFileAsync2(software.amazon.awssdk.services.s3.S3AsyncClient s3AsyncClient, String bucketName, String key, String downloadedFileWithPath, Map<String, String> metadata) static voiduploadFileParts(software.amazon.awssdk.services.s3.S3AsyncClient s3AsyncClient, String bucketName, String key, String downloadedFileWithPath, Map<String, String> metadata)
-
Field Details
-
logger
protected static final org.apache.logging.log4j.Logger logger
-
-
Constructor Details
-
PutObjectData
public PutObjectData()
-
-
Method Details
-
putS3Object
public static void putS3Object(software.amazon.awssdk.services.s3.S3Client s3, String bucketName, String objectKey, String objectPath, Map<String, String> metadata) throws org.cdlib.mrt.utility.TExceptionUploads an object to an Amazon S3 bucket with metadata.- Parameters:
s3- the S3Client object used to interact with the Amazon S3 servicebucketName- the name of the S3 bucket to upload the object toobjectKey- the name of the object to be uploadedobjectPath- the local file path of the object to be uploaded- Throws:
org.cdlib.mrt.utility.TException
-
uploadFileAsync
-
uploadFileAsync2
-
uploadFileParts
-
uploadFile
-