Class AWS2S3Configuration
java.lang.Object
org.apache.camel.component.aws2.s3.AWS2S3Configuration
- All Implemented Interfaces:
Cloneable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
software.amazon.awssdk.services.s3.S3Client
software.amazon.awssdk.services.s3.presigner.S3Presigner
int
int
long
software.amazon.awssdk.core.Protocol
long
boolean
boolean
boolean
boolean
boolean
boolean
If it is true, the S3 Object Body will be ignored completely, if it is set to false the S3 Object will be put in the body.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
setAccessKey
(String accessKey) Amazon AWS Access Keyvoid
setAmazonS3Client
(software.amazon.awssdk.services.s3.S3Client amazonS3Client) Reference to a `com.amazonaws.services.s3.AmazonS3` in the registry.void
setAmazonS3Presigner
(software.amazon.awssdk.services.s3.presigner.S3Presigner amazonS3Presigner) An S3 Presigner for Request, used mainly in createDownloadLink operationvoid
setAutocloseBody
(boolean autocloseBody) If this option is true and includeBody is false, then the S3Object.close() method will be called on exchange completion.void
setAutoCreateBucket
(boolean autoCreateBucket) Setting the autocreation of the S3 bucket bucketName.void
setAwsKMSKeyId
(String awsKMSKeyId) Define the id of KMS key to use in case KMS is enabledvoid
setBatchMessageNumber
(int batchMessageNumber) The number of messages composing a batch in streaming upload modevoid
setBatchSize
(int batchSize) The batch size (in bytes) in streaming upload modevoid
setBucketName
(String bucketName) Name of the bucket.void
setCustomerAlgorithm
(String customerAlgorithm) Define the customer algorithm to use in case CustomerKey is enabledvoid
setCustomerKeyId
(String customerKeyId) Define the id of Customer key to use in case CustomerKey is enabledvoid
setCustomerKeyMD5
(String customerKeyMD5) Define the MD5 of Customer key to use in case CustomerKey is enabledvoid
setDeleteAfterRead
(boolean deleteAfterRead) Delete objects from S3 after they have been retrieved.void
setDeleteAfterWrite
(boolean deleteAfterWrite) Delete file object after the S3 file has been uploadedvoid
setDelimiter
(String delimiter) The delimiter which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only consume objects we are interested in.void
setDestinationBucket
(String destinationBucket) Define the destination bucket where an object must be moved when moveAfterRead is set to true.void
setDestinationBucketPrefix
(String destinationBucketPrefix) Define the destination bucket prefix to use when an object must be moved and moveAfterRead is set to true.void
setDestinationBucketSuffix
(String destinationBucketSuffix) Define the destination bucket suffix to use when an object must be moved and moveAfterRead is set to true.void
setDoneFileName
(String doneFileName) If provided, Camel will only consume files if a done file exists.void
setFileName
(String fileName) To get the object from the bucket with the given file namevoid
setForcePathStyle
(boolean forcePathStyle) Set whether the S3 client should use path-style URL instead of virtual-hosted-stylevoid
setIgnoreBody
(boolean ignoreBody) void
setIncludeBody
(boolean includeBody) If it is true, the S3Object exchange will be consumed and put into the body and closed.void
setIncludeFolders
(boolean includeFolders) If it is true, the folders/directories will be consumed.void
setKeyName
(String keyName) Setting the key name for an element in the bucket through endpoint parametervoid
setMoveAfterRead
(boolean moveAfterRead) Move objects from S3 bucket to a different bucket after they have been retrieved.void
setMultiPartUpload
(boolean multiPartUpload) If it is true, camel will upload the file with multi part format, the part size is decided by the option of `partSize`void
setNamingStrategy
(AWSS3NamingStrategyEnum namingStrategy) The naming strategy to use in streaming upload modevoid
setOperation
(AWS2S3Operations operation) The operation to do in case the user don't want to do only an uploadvoid
setOverrideEndpoint
(boolean overrideEndpoint) Set the need for overidding the endpoint.void
setPartSize
(long partSize) Setup the partSize which is used in multi part upload, the default size is 25M.void
setPojoRequest
(boolean pojoRequest) If we want to use a POJO request as body or notvoid
The policy for this queue to set in the `com.amazonaws.services.s3.AmazonS3#setBucketPolicy()` method.void
The prefix which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only consume objects we are interested in.void
setProfileCredentialsName
(String profileCredentialsName) If using a profile credentials provider this parameter will set the profile namevoid
setProxyHost
(String proxyHost) To define a proxy host when instantiating the SQS clientvoid
setProxyPort
(Integer proxyPort) Specify a proxy port to be used inside the client definition.void
setProxyProtocol
(software.amazon.awssdk.core.Protocol proxyProtocol) To define a proxy protocol when instantiating the S3 clientvoid
The region in which S3 client needs to work.void
setRestartingPolicy
(AWSS3RestartingPolicyEnum restartingPolicy) The restarting policy to use in streaming upload modevoid
setSecretKey
(String secretKey) Amazon AWS Secret Keyvoid
setStorageClass
(String storageClass) The storage class to set in the `com.amazonaws.services.s3.model.PutObjectRequest` request.void
setStreamingUploadMode
(boolean streamingUploadMode) When stream mode is true the upload to bucket will be done in streamingvoid
setStreamingUploadTimeout
(long streamingUploadTimeout) While streaming upload mode is true, this option set the timeout to complete uploadvoid
setTrustAllCertificates
(boolean trustAllCertificates) If we want to trust all certificates in case of overriding the endpointvoid
setUriEndpointOverride
(String uriEndpointOverride) Set the overriding uri endpoint.void
setUseAwsKMS
(boolean useAwsKMS) Define if KMS must be used or notvoid
setUseCustomerKey
(boolean useCustomerKey) Define if Customer Key must be used or notvoid
setUseDefaultCredentialsProvider
(Boolean useDefaultCredentialsProvider) Set whether the S3 client should expect to load credentials through a default credentials provider.void
setUseProfileCredentialsProvider
(boolean useProfileCredentialsProvider) Set whether the S3 client should expect to load credentials through a profile credentials provider.void
setUseSSES3
(boolean useSSES3) Define if SSE S3 must be used or not
-
Constructor Details
-
AWS2S3Configuration
public AWS2S3Configuration()
-
-
Method Details
-
getPartSize
public long getPartSize() -
setPartSize
public void setPartSize(long partSize) Setup the partSize which is used in multi part upload, the default size is 25M. -
isMultiPartUpload
public boolean isMultiPartUpload() -
setMultiPartUpload
public void setMultiPartUpload(boolean multiPartUpload) If it is true, camel will upload the file with multi part format, the part size is decided by the option of `partSize` -
getAccessKey
-
setAccessKey
Amazon AWS Access Key -
getSecretKey
-
setSecretKey
Amazon AWS Secret Key -
getAmazonS3Client
public software.amazon.awssdk.services.s3.S3Client getAmazonS3Client() -
setAmazonS3Client
public void setAmazonS3Client(software.amazon.awssdk.services.s3.S3Client amazonS3Client) Reference to a `com.amazonaws.services.s3.AmazonS3` in the registry. -
getPrefix
-
setPrefix
The prefix which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only consume objects we are interested in. -
getDelimiter
-
setDelimiter
The delimiter which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only consume objects we are interested in. -
getDoneFileName
-
setDoneFileName
If provided, Camel will only consume files if a done file exists. -
setIncludeFolders
public void setIncludeFolders(boolean includeFolders) If it is true, the folders/directories will be consumed. If it is false, they will be ignored, and Exchanges will not be created for those -
isIncludeFolders
public boolean isIncludeFolders() -
getBucketName
-
setBucketName
Name of the bucket. The bucket will be created if it doesn't already exists. -
getFileName
-
setFileName
To get the object from the bucket with the given file name -
getRegion
-
setRegion
The region in which S3 client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name Region.EU_WEST_1.id() -
setIncludeBody
public void setIncludeBody(boolean includeBody) If it is true, the S3Object exchange will be consumed and put into the body and closed. If false the S3Object stream will be put raw into the body and the headers will be set with the S3 object metadata. This option is strongly related to autocloseBody option. In case of setting includeBody to true because the S3Object stream will be consumed then it will also be closed, while in case of includeBody false then it will be up to the caller to close the S3Object stream. However setting autocloseBody to true when includeBody is false it will schedule to close the S3Object stream automatically on exchange completion. -
isIncludeBody
public boolean isIncludeBody() -
isIgnoreBody
public boolean isIgnoreBody()If it is true, the S3 Object Body will be ignored completely, if it is set to false the S3 Object will be put in the body. Setting this to true, will override any behavior defined by includeBody option. -
setIgnoreBody
public void setIgnoreBody(boolean ignoreBody) -
isDeleteAfterRead
public boolean isDeleteAfterRead() -
setDeleteAfterRead
public void setDeleteAfterRead(boolean deleteAfterRead) Delete objects from S3 after they have been retrieved. The delete is only performed if the Exchange is committed. If a rollback occurs, the object is not deleted. If this option is false, then the same objects will be retrieve over and over again on the polls. Therefore you need to use the Idempotent Consumer EIP in the route to filter out duplicates. You can filter using theAWS2S3Constants.BUCKET_NAME
andAWS2S3Constants.KEY
headers, or only theAWS2S3Constants.KEY
header. -
isMoveAfterRead
public boolean isMoveAfterRead() -
setMoveAfterRead
public void setMoveAfterRead(boolean moveAfterRead) Move objects from S3 bucket to a different bucket after they have been retrieved. To accomplish the operation the destinationBucket option must be set. The copy bucket operation is only performed if the Exchange is committed. If a rollback occurs, the object is not moved. -
getDestinationBucket
-
setDestinationBucket
Define the destination bucket where an object must be moved when moveAfterRead is set to true. -
getDestinationBucketPrefix
-
setDestinationBucketPrefix
Define the destination bucket prefix to use when an object must be moved and moveAfterRead is set to true. -
getDestinationBucketSuffix
-
setDestinationBucketSuffix
Define the destination bucket suffix to use when an object must be moved and moveAfterRead is set to true. -
isDeleteAfterWrite
public boolean isDeleteAfterWrite() -
setDeleteAfterWrite
public void setDeleteAfterWrite(boolean deleteAfterWrite) Delete file object after the S3 file has been uploaded -
getPolicy
-
setPolicy
The policy for this queue to set in the `com.amazonaws.services.s3.AmazonS3#setBucketPolicy()` method. -
getStorageClass
-
setStorageClass
The storage class to set in the `com.amazonaws.services.s3.model.PutObjectRequest` request. -
getProxyProtocol
public software.amazon.awssdk.core.Protocol getProxyProtocol() -
setProxyProtocol
public void setProxyProtocol(software.amazon.awssdk.core.Protocol proxyProtocol) To define a proxy protocol when instantiating the S3 client -
getProxyHost
-
setProxyHost
To define a proxy host when instantiating the SQS client -
getProxyPort
-
setProxyPort
Specify a proxy port to be used inside the client definition. -
getOperation
-
setOperation
The operation to do in case the user don't want to do only an upload -
isAutocloseBody
public boolean isAutocloseBody() -
setAutocloseBody
public void setAutocloseBody(boolean autocloseBody) If this option is true and includeBody is false, then the S3Object.close() method will be called on exchange completion. This option is strongly related to includeBody option. In case of setting includeBody to false and autocloseBody to false, it will be up to the caller to close the S3Object stream. Setting autocloseBody to true, will close the S3Object stream automatically. -
isUseAwsKMS
public boolean isUseAwsKMS() -
setUseAwsKMS
public void setUseAwsKMS(boolean useAwsKMS) Define if KMS must be used or not -
getAwsKMSKeyId
-
setAwsKMSKeyId
Define the id of KMS key to use in case KMS is enabled -
isUseCustomerKey
public boolean isUseCustomerKey() -
setUseCustomerKey
public void setUseCustomerKey(boolean useCustomerKey) Define if Customer Key must be used or not -
getCustomerKeyId
-
setCustomerKeyId
Define the id of Customer key to use in case CustomerKey is enabled -
getCustomerKeyMD5
-
setCustomerKeyMD5
Define the MD5 of Customer key to use in case CustomerKey is enabled -
getCustomerAlgorithm
-
setCustomerAlgorithm
Define the customer algorithm to use in case CustomerKey is enabled -
isForcePathStyle
public boolean isForcePathStyle() -
setForcePathStyle
public void setForcePathStyle(boolean forcePathStyle) Set whether the S3 client should use path-style URL instead of virtual-hosted-style -
setUseDefaultCredentialsProvider
Set whether the S3 client should expect to load credentials through a default credentials provider. -
isUseDefaultCredentialsProvider
-
setUseProfileCredentialsProvider
public void setUseProfileCredentialsProvider(boolean useProfileCredentialsProvider) Set whether the S3 client should expect to load credentials through a profile credentials provider. -
isUseProfileCredentialsProvider
public boolean isUseProfileCredentialsProvider() -
isAutoCreateBucket
public boolean isAutoCreateBucket() -
setAutoCreateBucket
public void setAutoCreateBucket(boolean autoCreateBucket) Setting the autocreation of the S3 bucket bucketName. This will apply also in case of moveAfterRead option enabled and it will create the destinationBucket if it doesn't exist already. -
getKeyName
-
setKeyName
Setting the key name for an element in the bucket through endpoint parameter -
isOverrideEndpoint
public boolean isOverrideEndpoint() -
setOverrideEndpoint
public void setOverrideEndpoint(boolean overrideEndpoint) Set the need for overidding the endpoint. This option needs to be used in combination with uriEndpointOverride option -
getUriEndpointOverride
-
setUriEndpointOverride
Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option -
isPojoRequest
public boolean isPojoRequest() -
setPojoRequest
public void setPojoRequest(boolean pojoRequest) If we want to use a POJO request as body or not -
isTrustAllCertificates
public boolean isTrustAllCertificates() -
setTrustAllCertificates
public void setTrustAllCertificates(boolean trustAllCertificates) If we want to trust all certificates in case of overriding the endpoint -
getAmazonS3Presigner
public software.amazon.awssdk.services.s3.presigner.S3Presigner getAmazonS3Presigner() -
setAmazonS3Presigner
public void setAmazonS3Presigner(software.amazon.awssdk.services.s3.presigner.S3Presigner amazonS3Presigner) An S3 Presigner for Request, used mainly in createDownloadLink operation -
isStreamingUploadMode
public boolean isStreamingUploadMode() -
setStreamingUploadMode
public void setStreamingUploadMode(boolean streamingUploadMode) When stream mode is true the upload to bucket will be done in streaming -
getBatchMessageNumber
public int getBatchMessageNumber() -
setBatchMessageNumber
public void setBatchMessageNumber(int batchMessageNumber) The number of messages composing a batch in streaming upload mode -
getBatchSize
public int getBatchSize() -
setBatchSize
public void setBatchSize(int batchSize) The batch size (in bytes) in streaming upload mode -
getNamingStrategy
-
setNamingStrategy
The naming strategy to use in streaming upload mode -
getStreamingUploadTimeout
public long getStreamingUploadTimeout() -
setStreamingUploadTimeout
public void setStreamingUploadTimeout(long streamingUploadTimeout) While streaming upload mode is true, this option set the timeout to complete upload -
getRestartingPolicy
-
setRestartingPolicy
The restarting policy to use in streaming upload mode -
isUseSSES3
public boolean isUseSSES3() -
setUseSSES3
public void setUseSSES3(boolean useSSES3) Define if SSE S3 must be used or not -
getProfileCredentialsName
-
setProfileCredentialsName
If using a profile credentials provider this parameter will set the profile name -
copy
-