This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch s3-simple in repository https://gitbox.apache.org/repos/asf/camel.git
commit 44f2d68fcc739eac4dd08b083c3d2b89c56df1a8 Author: Claus Ibsen <[email protected]> AuthorDate: Fri Jul 12 17:47:00 2024 +0200 CAMEL-20971: camel-aws-s3 - Dynamic bucketName/key using simple language. This make the producer more flexible. --- .../apache/camel/catalog/components/aws2-s3.json | 62 ++++++++------- .../apache/camel/component/aws2/s3/aws2-s3.json | 62 ++++++++------- .../camel/component/aws2/s3/AWS2S3Constants.java | 10 ++- .../camel/component/aws2/s3/AWS2S3Producer.java | 37 ++++++--- .../camel/component/aws2/s3/utils/AWS2S3Utils.java | 16 +++- .../S3GetObjectDynamicKeyOperationIT.java | 93 ++++++++++++++++++++++ .../endpoint/dsl/AWS2S3EndpointBuilderFactory.java | 35 +++++++- 7 files changed, 234 insertions(+), 81 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-s3.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-s3.json index 6d368c6c25d..b70e059b12e 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-s3.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-s3.json @@ -84,36 +84,38 @@ "useSessionCredentials": { "index": 58, "kind": "property", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to use Session Credentials. [...] }, "headers": { - "CamelAwsS3BucketName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The bucket Name which this object will be stored or which will be used for the current operation or in which this object is contained.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#BUCKET_NAME" }, - "CamelAwsS3BucketDestinationName": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The bucket Destination Name which will be used for the current operation", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#BUCKET_DESTINATION_NAME" }, - "CamelAwsS3ContentControl": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional Cache-Control HTTP header which allows the user to specify caching behavior along the HTTP request\/reply chain.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CACHE_CONTROL" }, - "CamelAwsS3ContentDisposition": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional Content-Disposition HTTP header, which specifies presentational information such as the recommended filename for the object to be saved as.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CONTENT_DISP [...] - "CamelAwsS3ContentEncoding": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional Content-Encoding HTTP header specifying what content encodings have been applied to the object and what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type field.", "constantNa [...] - "CamelAwsS3ContentLength": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Content-Length HTTP header indicating the size of the associated object in bytes.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CONTENT_LENGTH" }, - "CamelAwsS3ContentMD5": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The base64 encoded 128-bit MD5 digest of the associated object (content - not including headers) according to RFC 1864. This data is used as a message integrity check to verify that the data received by Amazon S3 is the same data that the call [...] - "CamelAwsS3ContentType": { "index": 7, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Content-Type HTTP header, which indicates the type of content stored in the associated object. The value of this header is a standard MIME type.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CONTENT_TYPE" }, - "CamelAwsS3ETag": { "index": 8, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "(producer) The ETag value for the newly uploaded object. (consumer) The hex encoded 128-bit MD5 digest of the associated object according to RFC 1864. This data is used as an integrity check to verify that the data received by the caller is the same [...] - "CamelAwsS3Key": { "index": 9, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key under which this object is stored or will be stored or which will be used for the current operation", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#KEY" }, - "CamelAwsS3DestinationKey": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Destination key which will be used for the current operation", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DESTINATION_KEY" }, - "CamelAwsS3LastModified": { "index": 11, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Date", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The value of the Last-Modified header, indicating the date and time at which Amazon S3 last recorded a modification to the associated object.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#LAST_MODIFIED" }, - "CamelAwsS3StorageClass": { "index": 12, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The storage class of this object.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#STORAGE_CLASS" }, - "CamelAwsS3VersionId": { "index": 13, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "(producer) The optional version ID of the newly uploaded object. (consumer) The version ID of the associated Amazon S3 object if available. Version IDs are only assigned to objects when an object is uploaded to an Amazon S3 bucket that has obj [...] - "CamelAwsS3CannedAcl": { "index": 14, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The canned acl that will be applied to the object. see software.amazon.awssdk.services.s3.model.ObjectCannedACL for allowed values.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CANNED_ACL" }, - "CamelAwsS3Acl": { "index": 15, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "software.amazon.awssdk.services.s3.model.BucketCannedACL", "enum": [ "private", "public-read", "public-read-write", "authenticated-read", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A well constructed Amazon S3 Access Control List object.", "constantName": "org.apache.camel.compone [...] - "CamelAwsS3Operation": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform. Permitted values are copyObject, deleteObject, listBuckets, deleteBucket, listObjects", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#S3_OPERATION" }, - "CamelAwsS3ServerSideEncryption": { "index": 17, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets the server-side encryption algorithm when encrypting the object using AWS-managed keys. For example use AES256.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#SERVER_SIDE_ENCRYPTION" }, - "CamelAwsS3ExpirationTime": { "index": 18, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#EXPIRATION_TIME" }, - "CamelAwsS3ReplicationStatus": { "index": 19, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "software.amazon.awssdk.services.s3.model.ReplicationStatus", "enum": [ "COMPLETE", "PENDING", "FAILED", "REPLICA", "COMPLETED", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Amazon S3 can return this if your request involves a bucket that is either a source or destinati [...] - "CamelAwsS3RangeStart": { "index": 20, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The position of the first byte to get", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#RANGE_START" }, - "CamelAwsS3RangeEnd": { "index": 21, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The position of the last byte to get", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#RANGE_END" }, - "CamelAwsS3DowloadLinkExpirationTime": { "index": 22, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The expiration time of the download link in milliseconds", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_EXPIRATION_TIME" }, - "CamelAwsS3DownloadLinkBrowserCompatible": { "index": 23, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the download link is browser compatible", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_BROWSER_COMPATIBLE" }, - "CamelAwsS3DownloadLinkHttpRequestHeaders": { "index": 24, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Map<String, List<String>>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The headers that are needed by the service (not needed when BrowserCompatible is true)", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_HTTP_REQUEST_HEADERS" }, - "CamelAwsS3DownloadLinkSignedPayload": { "index": 25, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The request payload that is needed by the service (not needed when BrowserCompatible is true)", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_SIGNED_PAYLOAD" }, - "CamelAwsS3Metadata": { "index": 26, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A map of metadata to be stored or stored with the object in S3. More details about metadata https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/userguide\/UsingMetadata.htmlhere.", "constantName": "org.apache.camel.component.aws2.s3.A [...] - "CamelMessageTimestamp": { "index": 27, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The timestamp of the message", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#MESSAGE_TIMESTAMP" }, - "CamelAwsS3Prefix": { "index": 28, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The prefix which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only list objects we are interested in", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#PREFIX" }, - "CamelAwsS3Delimiter": { "index": 29, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The delimiter which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only list objects we are interested in", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DELIMITER" } + "CamelAwsS3BucketName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The bucket Name (can be dynamic using the simple language in the producer) which this object will be stored or which will be used for the current operation or in which this object is contained.", "constantName": "org.apache.camel.component.aws [...] + "CamelAwsS3ProducedBucketName": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The computed bucket name that was used by the producer such as to get or put an s3 object", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#PRODUCED_BUCKET_NAME" }, + "CamelAwsS3BucketDestinationName": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The bucket Destination Name which will be used for the current operation", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#BUCKET_DESTINATION_NAME" }, + "CamelAwsS3ContentControl": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional Cache-Control HTTP header which allows the user to specify caching behavior along the HTTP request\/reply chain.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CACHE_CONTROL" }, + "CamelAwsS3ContentDisposition": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional Content-Disposition HTTP header, which specifies presentational information such as the recommended filename for the object to be saved as.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CONTENT_DISP [...] + "CamelAwsS3ContentEncoding": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional Content-Encoding HTTP header specifying what content encodings have been applied to the object and what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type field.", "constantNa [...] + "CamelAwsS3ContentLength": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Content-Length HTTP header indicating the size of the associated object in bytes.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CONTENT_LENGTH" }, + "CamelAwsS3ContentMD5": { "index": 7, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The base64 encoded 128-bit MD5 digest of the associated object (content - not including headers) according to RFC 1864. This data is used as a message integrity check to verify that the data received by Amazon S3 is the same data that the call [...] + "CamelAwsS3ContentType": { "index": 8, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Content-Type HTTP header, which indicates the type of content stored in the associated object. The value of this header is a standard MIME type.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CONTENT_TYPE" }, + "CamelAwsS3ETag": { "index": 9, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "(producer) The ETag value for the newly uploaded object. (consumer) The hex encoded 128-bit MD5 digest of the associated object according to RFC 1864. This data is used as an integrity check to verify that the data received by the caller is the same [...] + "CamelAwsS3Key": { "index": 10, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key (can be dynamic using the simple language in the producer) under which this object is stored or will be stored or which will be used for the current operation", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#KEY" }, + "CamelAwsS3ProducedKey": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The computed key that was used for retrieving this object", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#PRODUCED_KEY" }, + "CamelAwsS3DestinationKey": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Destination key which will be used for the current operation", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DESTINATION_KEY" }, + "CamelAwsS3LastModified": { "index": 13, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Date", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The value of the Last-Modified header, indicating the date and time at which Amazon S3 last recorded a modification to the associated object.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#LAST_MODIFIED" }, + "CamelAwsS3StorageClass": { "index": 14, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The storage class of this object.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#STORAGE_CLASS" }, + "CamelAwsS3VersionId": { "index": 15, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "(producer) The optional version ID of the newly uploaded object. (consumer) The version ID of the associated Amazon S3 object if available. Version IDs are only assigned to objects when an object is uploaded to an Amazon S3 bucket that has obj [...] + "CamelAwsS3CannedAcl": { "index": 16, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The canned acl that will be applied to the object. see software.amazon.awssdk.services.s3.model.ObjectCannedACL for allowed values.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CANNED_ACL" }, + "CamelAwsS3Acl": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "software.amazon.awssdk.services.s3.model.BucketCannedACL", "enum": [ "private", "public-read", "public-read-write", "authenticated-read", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A well constructed Amazon S3 Access Control List object.", "constantName": "org.apache.camel.compone [...] + "CamelAwsS3Operation": { "index": 18, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform. Permitted values are copyObject, deleteObject, listBuckets, deleteBucket, listObjects", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#S3_OPERATION" }, + "CamelAwsS3ServerSideEncryption": { "index": 19, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets the server-side encryption algorithm when encrypting the object using AWS-managed keys. For example use AES256.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#SERVER_SIDE_ENCRYPTION" }, + "CamelAwsS3ExpirationTime": { "index": 20, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#EXPIRATION_TIME" }, + "CamelAwsS3ReplicationStatus": { "index": 21, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "software.amazon.awssdk.services.s3.model.ReplicationStatus", "enum": [ "COMPLETE", "PENDING", "FAILED", "REPLICA", "COMPLETED", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Amazon S3 can return this if your request involves a bucket that is either a source or destinati [...] + "CamelAwsS3RangeStart": { "index": 22, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The position of the first byte to get", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#RANGE_START" }, + "CamelAwsS3RangeEnd": { "index": 23, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The position of the last byte to get", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#RANGE_END" }, + "CamelAwsS3DowloadLinkExpirationTime": { "index": 24, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The expiration time of the download link in milliseconds", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_EXPIRATION_TIME" }, + "CamelAwsS3DownloadLinkBrowserCompatible": { "index": 25, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the download link is browser compatible", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_BROWSER_COMPATIBLE" }, + "CamelAwsS3DownloadLinkHttpRequestHeaders": { "index": 26, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Map<String, List<String>>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The headers that are needed by the service (not needed when BrowserCompatible is true)", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_HTTP_REQUEST_HEADERS" }, + "CamelAwsS3DownloadLinkSignedPayload": { "index": 27, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The request payload that is needed by the service (not needed when BrowserCompatible is true)", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_SIGNED_PAYLOAD" }, + "CamelAwsS3Metadata": { "index": 28, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A map of metadata to be stored or stored with the object in S3. More details about metadata https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/userguide\/UsingMetadata.htmlhere.", "constantName": "org.apache.camel.component.aws2.s3.A [...] + "CamelMessageTimestamp": { "index": 29, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The timestamp of the message", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#MESSAGE_TIMESTAMP" }, + "CamelAwsS3Prefix": { "index": 30, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The prefix which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only list objects we are interested in", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#PREFIX" }, + "CamelAwsS3Delimiter": { "index": 31, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The delimiter which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only list objects we are interested in", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DELIMITER" } }, "properties": { "bucketNameOrArn": { "index": 0, "kind": "path", "displayName": "Bucket Name Or Arn", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Bucket name or ARN" }, diff --git a/components/camel-aws/camel-aws2-s3/src/generated/resources/META-INF/org/apache/camel/component/aws2/s3/aws2-s3.json b/components/camel-aws/camel-aws2-s3/src/generated/resources/META-INF/org/apache/camel/component/aws2/s3/aws2-s3.json index 6d368c6c25d..b70e059b12e 100644 --- a/components/camel-aws/camel-aws2-s3/src/generated/resources/META-INF/org/apache/camel/component/aws2/s3/aws2-s3.json +++ b/components/camel-aws/camel-aws2-s3/src/generated/resources/META-INF/org/apache/camel/component/aws2/s3/aws2-s3.json @@ -84,36 +84,38 @@ "useSessionCredentials": { "index": 58, "kind": "property", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to use Session Credentials. [...] }, "headers": { - "CamelAwsS3BucketName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The bucket Name which this object will be stored or which will be used for the current operation or in which this object is contained.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#BUCKET_NAME" }, - "CamelAwsS3BucketDestinationName": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The bucket Destination Name which will be used for the current operation", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#BUCKET_DESTINATION_NAME" }, - "CamelAwsS3ContentControl": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional Cache-Control HTTP header which allows the user to specify caching behavior along the HTTP request\/reply chain.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CACHE_CONTROL" }, - "CamelAwsS3ContentDisposition": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional Content-Disposition HTTP header, which specifies presentational information such as the recommended filename for the object to be saved as.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CONTENT_DISP [...] - "CamelAwsS3ContentEncoding": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional Content-Encoding HTTP header specifying what content encodings have been applied to the object and what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type field.", "constantNa [...] - "CamelAwsS3ContentLength": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Content-Length HTTP header indicating the size of the associated object in bytes.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CONTENT_LENGTH" }, - "CamelAwsS3ContentMD5": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The base64 encoded 128-bit MD5 digest of the associated object (content - not including headers) according to RFC 1864. This data is used as a message integrity check to verify that the data received by Amazon S3 is the same data that the call [...] - "CamelAwsS3ContentType": { "index": 7, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Content-Type HTTP header, which indicates the type of content stored in the associated object. The value of this header is a standard MIME type.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CONTENT_TYPE" }, - "CamelAwsS3ETag": { "index": 8, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "(producer) The ETag value for the newly uploaded object. (consumer) The hex encoded 128-bit MD5 digest of the associated object according to RFC 1864. This data is used as an integrity check to verify that the data received by the caller is the same [...] - "CamelAwsS3Key": { "index": 9, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key under which this object is stored or will be stored or which will be used for the current operation", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#KEY" }, - "CamelAwsS3DestinationKey": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Destination key which will be used for the current operation", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DESTINATION_KEY" }, - "CamelAwsS3LastModified": { "index": 11, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Date", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The value of the Last-Modified header, indicating the date and time at which Amazon S3 last recorded a modification to the associated object.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#LAST_MODIFIED" }, - "CamelAwsS3StorageClass": { "index": 12, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The storage class of this object.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#STORAGE_CLASS" }, - "CamelAwsS3VersionId": { "index": 13, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "(producer) The optional version ID of the newly uploaded object. (consumer) The version ID of the associated Amazon S3 object if available. Version IDs are only assigned to objects when an object is uploaded to an Amazon S3 bucket that has obj [...] - "CamelAwsS3CannedAcl": { "index": 14, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The canned acl that will be applied to the object. see software.amazon.awssdk.services.s3.model.ObjectCannedACL for allowed values.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CANNED_ACL" }, - "CamelAwsS3Acl": { "index": 15, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "software.amazon.awssdk.services.s3.model.BucketCannedACL", "enum": [ "private", "public-read", "public-read-write", "authenticated-read", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A well constructed Amazon S3 Access Control List object.", "constantName": "org.apache.camel.compone [...] - "CamelAwsS3Operation": { "index": 16, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform. Permitted values are copyObject, deleteObject, listBuckets, deleteBucket, listObjects", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#S3_OPERATION" }, - "CamelAwsS3ServerSideEncryption": { "index": 17, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets the server-side encryption algorithm when encrypting the object using AWS-managed keys. For example use AES256.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#SERVER_SIDE_ENCRYPTION" }, - "CamelAwsS3ExpirationTime": { "index": 18, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#EXPIRATION_TIME" }, - "CamelAwsS3ReplicationStatus": { "index": 19, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "software.amazon.awssdk.services.s3.model.ReplicationStatus", "enum": [ "COMPLETE", "PENDING", "FAILED", "REPLICA", "COMPLETED", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Amazon S3 can return this if your request involves a bucket that is either a source or destinati [...] - "CamelAwsS3RangeStart": { "index": 20, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The position of the first byte to get", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#RANGE_START" }, - "CamelAwsS3RangeEnd": { "index": 21, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The position of the last byte to get", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#RANGE_END" }, - "CamelAwsS3DowloadLinkExpirationTime": { "index": 22, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The expiration time of the download link in milliseconds", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_EXPIRATION_TIME" }, - "CamelAwsS3DownloadLinkBrowserCompatible": { "index": 23, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the download link is browser compatible", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_BROWSER_COMPATIBLE" }, - "CamelAwsS3DownloadLinkHttpRequestHeaders": { "index": 24, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Map<String, List<String>>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The headers that are needed by the service (not needed when BrowserCompatible is true)", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_HTTP_REQUEST_HEADERS" }, - "CamelAwsS3DownloadLinkSignedPayload": { "index": 25, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The request payload that is needed by the service (not needed when BrowserCompatible is true)", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_SIGNED_PAYLOAD" }, - "CamelAwsS3Metadata": { "index": 26, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A map of metadata to be stored or stored with the object in S3. More details about metadata https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/userguide\/UsingMetadata.htmlhere.", "constantName": "org.apache.camel.component.aws2.s3.A [...] - "CamelMessageTimestamp": { "index": 27, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The timestamp of the message", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#MESSAGE_TIMESTAMP" }, - "CamelAwsS3Prefix": { "index": 28, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The prefix which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only list objects we are interested in", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#PREFIX" }, - "CamelAwsS3Delimiter": { "index": 29, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The delimiter which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only list objects we are interested in", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DELIMITER" } + "CamelAwsS3BucketName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The bucket Name (can be dynamic using the simple language in the producer) which this object will be stored or which will be used for the current operation or in which this object is contained.", "constantName": "org.apache.camel.component.aws [...] + "CamelAwsS3ProducedBucketName": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The computed bucket name that was used by the producer such as to get or put an s3 object", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#PRODUCED_BUCKET_NAME" }, + "CamelAwsS3BucketDestinationName": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The bucket Destination Name which will be used for the current operation", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#BUCKET_DESTINATION_NAME" }, + "CamelAwsS3ContentControl": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional Cache-Control HTTP header which allows the user to specify caching behavior along the HTTP request\/reply chain.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CACHE_CONTROL" }, + "CamelAwsS3ContentDisposition": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional Content-Disposition HTTP header, which specifies presentational information such as the recommended filename for the object to be saved as.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CONTENT_DISP [...] + "CamelAwsS3ContentEncoding": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The optional Content-Encoding HTTP header specifying what content encodings have been applied to the object and what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type field.", "constantNa [...] + "CamelAwsS3ContentLength": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Content-Length HTTP header indicating the size of the associated object in bytes.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CONTENT_LENGTH" }, + "CamelAwsS3ContentMD5": { "index": 7, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The base64 encoded 128-bit MD5 digest of the associated object (content - not including headers) according to RFC 1864. This data is used as a message integrity check to verify that the data received by Amazon S3 is the same data that the call [...] + "CamelAwsS3ContentType": { "index": 8, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Content-Type HTTP header, which indicates the type of content stored in the associated object. The value of this header is a standard MIME type.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CONTENT_TYPE" }, + "CamelAwsS3ETag": { "index": 9, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "(producer) The ETag value for the newly uploaded object. (consumer) The hex encoded 128-bit MD5 digest of the associated object according to RFC 1864. This data is used as an integrity check to verify that the data received by the caller is the same [...] + "CamelAwsS3Key": { "index": 10, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key (can be dynamic using the simple language in the producer) under which this object is stored or will be stored or which will be used for the current operation", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#KEY" }, + "CamelAwsS3ProducedKey": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The computed key that was used for retrieving this object", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#PRODUCED_KEY" }, + "CamelAwsS3DestinationKey": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Destination key which will be used for the current operation", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DESTINATION_KEY" }, + "CamelAwsS3LastModified": { "index": 13, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Date", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The value of the Last-Modified header, indicating the date and time at which Amazon S3 last recorded a modification to the associated object.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#LAST_MODIFIED" }, + "CamelAwsS3StorageClass": { "index": 14, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The storage class of this object.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#STORAGE_CLASS" }, + "CamelAwsS3VersionId": { "index": 15, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "(producer) The optional version ID of the newly uploaded object. (consumer) The version ID of the associated Amazon S3 object if available. Version IDs are only assigned to objects when an object is uploaded to an Amazon S3 bucket that has obj [...] + "CamelAwsS3CannedAcl": { "index": 16, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The canned acl that will be applied to the object. see software.amazon.awssdk.services.s3.model.ObjectCannedACL for allowed values.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#CANNED_ACL" }, + "CamelAwsS3Acl": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "software.amazon.awssdk.services.s3.model.BucketCannedACL", "enum": [ "private", "public-read", "public-read-write", "authenticated-read", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A well constructed Amazon S3 Access Control List object.", "constantName": "org.apache.camel.compone [...] + "CamelAwsS3Operation": { "index": 18, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform. Permitted values are copyObject, deleteObject, listBuckets, deleteBucket, listObjects", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#S3_OPERATION" }, + "CamelAwsS3ServerSideEncryption": { "index": 19, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets the server-side encryption algorithm when encrypting the object using AWS-managed keys. For example use AES256.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#SERVER_SIDE_ENCRYPTION" }, + "CamelAwsS3ExpirationTime": { "index": 20, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header.", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#EXPIRATION_TIME" }, + "CamelAwsS3ReplicationStatus": { "index": 21, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "software.amazon.awssdk.services.s3.model.ReplicationStatus", "enum": [ "COMPLETE", "PENDING", "FAILED", "REPLICA", "COMPLETED", "null" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Amazon S3 can return this if your request involves a bucket that is either a source or destinati [...] + "CamelAwsS3RangeStart": { "index": 22, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The position of the first byte to get", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#RANGE_START" }, + "CamelAwsS3RangeEnd": { "index": 23, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The position of the last byte to get", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#RANGE_END" }, + "CamelAwsS3DowloadLinkExpirationTime": { "index": 24, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The expiration time of the download link in milliseconds", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_EXPIRATION_TIME" }, + "CamelAwsS3DownloadLinkBrowserCompatible": { "index": 25, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Whether the download link is browser compatible", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_BROWSER_COMPATIBLE" }, + "CamelAwsS3DownloadLinkHttpRequestHeaders": { "index": 26, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Map<String, List<String>>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The headers that are needed by the service (not needed when BrowserCompatible is true)", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_HTTP_REQUEST_HEADERS" }, + "CamelAwsS3DownloadLinkSignedPayload": { "index": 27, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The request payload that is needed by the service (not needed when BrowserCompatible is true)", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_SIGNED_PAYLOAD" }, + "CamelAwsS3Metadata": { "index": 28, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A map of metadata to be stored or stored with the object in S3. More details about metadata https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/userguide\/UsingMetadata.htmlhere.", "constantName": "org.apache.camel.component.aws2.s3.A [...] + "CamelMessageTimestamp": { "index": 29, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The timestamp of the message", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#MESSAGE_TIMESTAMP" }, + "CamelAwsS3Prefix": { "index": 30, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The prefix which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only list objects we are interested in", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#PREFIX" }, + "CamelAwsS3Delimiter": { "index": 31, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The delimiter which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only list objects we are interested in", "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constants#DELIMITER" } }, "properties": { "bucketNameOrArn": { "index": 0, "kind": "path", "displayName": "Bucket Name Or Arn", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Bucket name or ARN" }, diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Constants.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Constants.java index ba9dfd2c786..fbec6079a18 100644 --- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Constants.java +++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Constants.java @@ -24,9 +24,12 @@ import org.apache.camel.spi.Metadata; */ public interface AWS2S3Constants { - @Metadata(description = "The bucket Name which this object will be stored or which will be used for the current operation or in which this object is contained.", + @Metadata(description = "The bucket Name (can be dynamic using the simple language in the producer) which this object will be stored or which will be used for the current operation or in which this object is contained.", javaType = "String") String BUCKET_NAME = "CamelAwsS3BucketName"; + @Metadata(label = "producer", description = "The computed bucket name that was used by the producer such as to get or put an s3 object", + javaType = "String") + String PRODUCED_BUCKET_NAME = "CamelAwsS3ProducedBucketName"; @Metadata(label = "producer", description = "The bucket Destination Name which will be used for the current operation", javaType = "String") String BUCKET_DESTINATION_NAME = "CamelAwsS3BucketDestinationName"; @@ -66,9 +69,12 @@ public interface AWS2S3Constants { "data received by the caller is the same data that was sent by Amazon S3.", javaType = "String") String E_TAG = "CamelAwsS3ETag"; - @Metadata(description = "The key under which this object is stored or will be stored or which will be used for the current operation", + @Metadata(description = "The key (can be dynamic using the simple language in the producer) under which this object is stored or will be stored or which will be used for the current operation", javaType = "String") String KEY = "CamelAwsS3Key"; + @Metadata(label = "producer", description = "The computed key that was used for retrieving this object", + javaType = "String") + String PRODUCED_KEY = "CamelAwsS3ProducedKey"; @Metadata(label = "producer", description = "The Destination key which will be used for the current operation", javaType = "String") String DESTINATION_KEY = "CamelAwsS3DestinationKey"; diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java index 899c4cc81cb..6ebd0e94b18 100644 --- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java +++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java @@ -253,6 +253,7 @@ public class AWS2S3Producer extends DefaultProducer { Message message = getMessageForResponse(exchange); message.setHeader(AWS2S3Constants.E_TAG, uploadResult.eTag()); + message.setHeader(AWS2S3Constants.PRODUCED_KEY, keyName); if (uploadResult.versionId() != null) { message.setHeader(AWS2S3Constants.VERSION_ID, uploadResult.versionId()); } @@ -315,8 +316,8 @@ public class AWS2S3Producer extends DefaultProducer { Exchange exchange, PutObjectRequest.Builder putObjectRequest, Map<String, String> objectMetadata, File file, InputStream inputStream, long contentLength) { final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration()); - final String key = AWS2S3Utils.determineKey(exchange, getConfiguration()); - putObjectRequest.bucket(bucketName).key(key).metadata(objectMetadata); + final String keyName = AWS2S3Utils.determineKey(exchange, getConfiguration()); + putObjectRequest.bucket(bucketName).key(keyName).metadata(objectMetadata); String storageClass = AWS2S3Utils.determineStorageClass(exchange, getConfiguration()); if (storageClass != null) { @@ -404,6 +405,8 @@ public class AWS2S3Producer extends DefaultProducer { Message message = getMessageForResponse(exchange); message.setHeader(AWS2S3Constants.E_TAG, putObjectResult.eTag()); + message.setHeader(AWS2S3Constants.PRODUCED_KEY, keyName); + message.setHeader(AWS2S3Constants.PRODUCED_BUCKET_NAME, bucketName); if (putObjectResult.versionId() != null) { message.setHeader(AWS2S3Constants.VERSION_ID, putObjectResult.versionId()); } @@ -411,7 +414,7 @@ public class AWS2S3Producer extends DefaultProducer { private void copyObject(S3Client s3Client, Exchange exchange) throws InvalidPayloadException { final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration()); - final String sourceKey = AWS2S3Utils.determineKey(exchange, getConfiguration()); + final String keyName = AWS2S3Utils.determineKey(exchange, getConfiguration()); final String destinationKey = exchange.getIn().getHeader(AWS2S3Constants.DESTINATION_KEY, String.class); final String bucketNameDestination = exchange.getIn().getHeader(AWS2S3Constants.BUCKET_DESTINATION_NAME, String.class); if (getConfiguration().isPojoRequest()) { @@ -430,7 +433,7 @@ public class AWS2S3Producer extends DefaultProducer { throw new IllegalArgumentException("Destination Key must be specified for copyObject Operation"); } CopyObjectRequest.Builder copyObjectRequest = CopyObjectRequest.builder().destinationBucket(bucketNameDestination) - .destinationKey(destinationKey).sourceBucket(bucketName).sourceKey(sourceKey); + .destinationKey(destinationKey).sourceBucket(bucketName).sourceKey(keyName); if (getConfiguration().isUseAwsKMS()) { if (ObjectHelper.isNotEmpty(getConfiguration().getAwsKMSKeyId())) { @@ -461,12 +464,14 @@ public class AWS2S3Producer extends DefaultProducer { if (copyObjectResult.versionId() != null) { message.setHeader(AWS2S3Constants.VERSION_ID, copyObjectResult.versionId()); } + message.setHeader(AWS2S3Constants.PRODUCED_KEY, keyName); + message.setHeader(AWS2S3Constants.PRODUCED_BUCKET_NAME, bucketName); } } private void deleteObject(S3Client s3Client, Exchange exchange) throws InvalidPayloadException { final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration()); - final String sourceKey = AWS2S3Utils.determineKey(exchange, getConfiguration()); + final String keyName = AWS2S3Utils.determineKey(exchange, getConfiguration()); if (getConfiguration().isPojoRequest()) { Object payload = exchange.getIn().getMandatoryBody(); @@ -476,11 +481,13 @@ public class AWS2S3Producer extends DefaultProducer { message.setBody(true); } } else { - DeleteObjectRequest.Builder deleteObjectRequest = DeleteObjectRequest.builder().bucket(bucketName).key(sourceKey); + DeleteObjectRequest.Builder deleteObjectRequest = DeleteObjectRequest.builder().bucket(bucketName).key(keyName); s3Client.deleteObject(deleteObjectRequest.build()); Message message = getMessageForResponse(exchange); message.setBody(true); + message.setHeader(AWS2S3Constants.PRODUCED_KEY, keyName); + message.setHeader(AWS2S3Constants.PRODUCED_BUCKET_NAME, bucketName); } } @@ -522,19 +529,21 @@ public class AWS2S3Producer extends DefaultProducer { } } else { final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration()); - final String sourceKey = AWS2S3Utils.determineKey(exchange, getConfiguration()); - GetObjectRequest.Builder req = GetObjectRequest.builder().bucket(bucketName).key(sourceKey); + final String keyName = AWS2S3Utils.determineKey(exchange, getConfiguration()); + GetObjectRequest.Builder req = GetObjectRequest.builder().bucket(bucketName).key(keyName); ResponseInputStream<GetObjectResponse> res = s3Client.getObject(req.build(), ResponseTransformer.toInputStream()); Message message = getMessageForResponse(exchange); message.setBody(res); populateMetadata(res, message); + message.setHeader(AWS2S3Constants.PRODUCED_KEY, keyName); + message.setHeader(AWS2S3Constants.PRODUCED_BUCKET_NAME, bucketName); } } private void getObjectRange(S3Client s3Client, Exchange exchange) throws InvalidPayloadException { final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration()); - final String sourceKey = AWS2S3Utils.determineKey(exchange, getConfiguration()); + final String keyName = AWS2S3Utils.determineKey(exchange, getConfiguration()); final String rangeStart = exchange.getIn().getHeader(AWS2S3Constants.RANGE_START, String.class); final String rangeEnd = exchange.getIn().getHeader(AWS2S3Constants.RANGE_END, String.class); @@ -552,12 +561,14 @@ public class AWS2S3Producer extends DefaultProducer { "A Range start and range end header must be configured to perform a range get operation."); } - GetObjectRequest.Builder req = GetObjectRequest.builder().bucket(bucketName).key(sourceKey) + GetObjectRequest.Builder req = GetObjectRequest.builder().bucket(bucketName).key(keyName) .range("bytes=" + Long.parseLong(rangeStart) + "-" + Long.parseLong(rangeEnd)); ResponseInputStream<GetObjectResponse> res = s3Client.getObject(req.build(), ResponseTransformer.toInputStream()); Message message = getMessageForResponse(exchange); message.setBody(res); + message.setHeader(AWS2S3Constants.PRODUCED_KEY, keyName); + message.setHeader(AWS2S3Constants.PRODUCED_BUCKET_NAME, bucketName); } } @@ -592,7 +603,7 @@ public class AWS2S3Producer extends DefaultProducer { private void createDownloadLink(Exchange exchange) { final String bucketName = AWS2S3Utils.determineBucketName(exchange, getConfiguration()); - final String key = AWS2S3Utils.determineKey(exchange, getConfiguration()); + final String keyName = AWS2S3Utils.determineKey(exchange, getConfiguration()); long milliSeconds = 0; @@ -625,7 +636,7 @@ public class AWS2S3Producer extends DefaultProducer { GetObjectRequest getObjectRequest = GetObjectRequest.builder() .bucket(bucketName) - .key(key) + .key(keyName) .build(); GetObjectPresignRequest getObjectPresignRequest = GetObjectPresignRequest.builder() @@ -638,6 +649,8 @@ public class AWS2S3Producer extends DefaultProducer { Message message = getMessageForResponse(exchange); message.setBody(presignedGetObjectRequest.url().toString()); message.setHeader(AWS2S3Constants.DOWNLOAD_LINK_BROWSER_COMPATIBLE, presignedGetObjectRequest.isBrowserExecutable()); + message.setHeader(AWS2S3Constants.PRODUCED_KEY, keyName); + message.setHeader(AWS2S3Constants.PRODUCED_BUCKET_NAME, bucketName); if (!presignedGetObjectRequest.isBrowserExecutable()) { LOG.debug( diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java index fa166fdcdb8..aa17ce2a061 100644 --- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java +++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/utils/AWS2S3Utils.java @@ -25,10 +25,13 @@ import org.apache.camel.Exchange; import org.apache.camel.StreamCache; import org.apache.camel.component.aws2.s3.AWS2S3Configuration; import org.apache.camel.component.aws2.s3.AWS2S3Constants; +import org.apache.camel.spi.Language; import org.apache.camel.util.ObjectHelper; import software.amazon.awssdk.services.s3.model.CreateMultipartUploadRequest; import software.amazon.awssdk.services.s3.model.ServerSideEncryption; +import static org.apache.camel.support.LanguageSupport.hasSimpleFunction; + public final class AWS2S3Utils { private AWS2S3Utils() { @@ -45,15 +48,17 @@ public final class AWS2S3Utils { */ public static String determineBucketName(final Exchange exchange, AWS2S3Configuration configuration) { String bucketName = exchange.getIn().getHeader(AWS2S3Constants.BUCKET_NAME, String.class); - if (ObjectHelper.isEmpty(bucketName)) { bucketName = configuration.getBucketName(); } - if (bucketName == null) { throw new IllegalArgumentException("AWS S3 Bucket name header is missing or not configured."); } - + // dynamic keys using built-in simple language + if (hasSimpleFunction(bucketName)) { + Language simple = exchange.getContext().resolveLanguage("simple"); + bucketName = simple.createExpression(bucketName).evaluate(exchange, String.class); + } return bucketName; } @@ -134,6 +139,11 @@ public final class AWS2S3Utils { if (key == null) { throw new IllegalArgumentException("AWS S3 Key header missing."); } + // dynamic keys using built-in simple language + if (hasSimpleFunction(key)) { + Language simple = exchange.getContext().resolveLanguage("simple"); + key = simple.createExpression(key).evaluate(exchange, String.class); + } return key; } diff --git a/components/camel-aws/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3GetObjectDynamicKeyOperationIT.java b/components/camel-aws/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3GetObjectDynamicKeyOperationIT.java new file mode 100644 index 00000000000..76041c38b88 --- /dev/null +++ b/components/camel-aws/camel-aws2-s3/src/test/java/org/apache/camel/component/aws2/s3/integration/S3GetObjectDynamicKeyOperationIT.java @@ -0,0 +1,93 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.aws2.s3.integration; + +import java.io.InputStream; + +import org.apache.camel.EndpointInject; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.Processor; +import org.apache.camel.ProducerTemplate; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.aws2.s3.AWS2S3Constants; +import org.apache.camel.component.aws2.s3.AWS2S3Operations; +import org.apache.camel.component.mock.MockEndpoint; +import org.junit.jupiter.api.Test; +import software.amazon.awssdk.utils.IoUtils; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +public class S3GetObjectDynamicKeyOperationIT extends Aws2S3Base { + + @EndpointInject + private ProducerTemplate template; + + @EndpointInject("mock:result") + private MockEndpoint result; + + @Test + public void sendIn() throws Exception { + result.expectedMessageCount(1); + + template.send("direct:putObject", new Processor() { + + @Override + public void process(Exchange exchange) { + exchange.getIn().setHeader(AWS2S3Constants.KEY, "${variable.global:myVar}.txt"); + exchange.getIn().setHeader(AWS2S3Constants.CONTENT_TYPE, "application/text"); + exchange.getIn().setBody("Camel rocks again!"); + } + }); + + template.request("direct:getObject", new Processor() { + + @Override + public void process(Exchange exchange) { + exchange.getIn().setHeader(AWS2S3Constants.BUCKET_NAME, name.get()); + exchange.getIn().setHeader(AWS2S3Constants.KEY, "${variable.global:myVar}.txt"); + exchange.getIn().setHeader(AWS2S3Constants.S3_OPERATION, AWS2S3Operations.getObject); + } + }); + + Message resp = result.getExchanges().get(0).getMessage(); + assertEquals("Camel rocks again!", new String(IoUtils.toByteArray(resp.getBody(InputStream.class)))); + assertEquals("application/text", resp.getHeader(AWS2S3Constants.CONTENT_TYPE)); + assertEquals("myCamel.txt", resp.getHeader(AWS2S3Constants.PRODUCED_KEY)); + assertEquals(name.get(), resp.getHeader(AWS2S3Constants.PRODUCED_BUCKET_NAME)); + assertNotNull(resp.getHeader(AWS2S3Constants.E_TAG)); + MockEndpoint.assertIsSatisfied(context); + } + + @Override + protected RouteBuilder createRouteBuilder() { + return new RouteBuilder() { + @Override + public void configure() { + context.setVariable("myVar", "myCamel"); + + String awsEndpoint = "aws2-s3://" + name.get() + "?autoCreateBucket=true"; + + from("direct:putObject").to(awsEndpoint); + + from("direct:getObject").to(awsEndpoint).to("mock:result"); + + } + }; + } +} diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java index ebfb56a57e7..9acd886b2c4 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java @@ -3487,8 +3487,9 @@ public interface AWS2S3EndpointBuilderFactory { private static final AWS2S3HeaderNameBuilder INSTANCE = new AWS2S3HeaderNameBuilder(); /** - * The bucket Name which this object will be stored or which will be - * used for the current operation or in which this object is contained. + * The bucket Name (can be dynamic using the simple language in the + * producer) which this object will be stored or which will be used for + * the current operation or in which this object is contained. * * The option is a: {@code String} type. * @@ -3499,6 +3500,19 @@ public interface AWS2S3EndpointBuilderFactory { public String awsS3BucketName() { return "CamelAwsS3BucketName"; } + /** + * The computed bucket name that was used by the producer such as to get + * or put an s3 object. + * + * The option is a: {@code String} type. + * + * Group: producer + * + * @return the name of the header {@code AwsS3ProducedBucketName}. + */ + public String awsS3ProducedBucketName() { + return "CamelAwsS3ProducedBucketName"; + } /** * The bucket Destination Name which will be used for the current * operation. @@ -3613,8 +3627,9 @@ public interface AWS2S3EndpointBuilderFactory { return "CamelAwsS3ETag"; } /** - * The key under which this object is stored or will be stored or which - * will be used for the current operation. + * The key (can be dynamic using the simple language in the producer) + * under which this object is stored or will be stored or which will be + * used for the current operation. * * The option is a: {@code String} type. * @@ -3625,6 +3640,18 @@ public interface AWS2S3EndpointBuilderFactory { public String awsS3Key() { return "CamelAwsS3Key"; } + /** + * The computed key that was used for retrieving this object. + * + * The option is a: {@code String} type. + * + * Group: producer + * + * @return the name of the header {@code AwsS3ProducedKey}. + */ + public String awsS3ProducedKey() { + return "CamelAwsS3ProducedKey"; + } /** * The Destination key which will be used for the current operation. *
