You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/08/21 13:07:08 UTC
[camel] branch main updated: Camel 17318: AWS Timestream Component (#11155)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new e00676390dd Camel 17318: AWS Timestream Component (#11155)
e00676390dd is described below
commit e00676390dd5c2b712b1f0a0b064e7c1ee740961
Author: Vignesh Nayak Manel <vn...@gmail.com>
AuthorDate: Mon Aug 21 18:37:00 2023 +0530
Camel 17318: AWS Timestream Component (#11155)
* CAMEL-17318:WIP AWS Timestream component
* CAMEL-17318:Updated to 4.1.0
* Added abstract endpoint, operations and updated test cases for query
* Added query operations and mock endpoint and functions for query tests
* CAMEL-17318: Added Write Operations and test cases, and completed build
* CAMEL-17318: Added auto-generated files
* Updated timestream component doc
* Updated timestream component doc
---
bom/camel-bom/pom.xml | 5 +
catalog/camel-allcomponents/pom.xml | 5 +
.../org/apache/camel/catalog/components.properties | 1 +
.../camel/catalog/components/aws2-timestream.json | 108 ++
components/camel-aws/camel-aws2-timestream/pom.xml | 92 ++
.../Timestream2AbstractEndpointConfigurer.java | 144 +++
.../timestream/Timestream2ComponentConfigurer.java | 172 +++
.../timestream/Timestream2EndpointUriFactory.java | 90 ++
.../services/org/apache/camel/component.properties | 7 +
.../org/apache/camel/component/aws2-timestream | 2 +
.../camel/configurer/aws2-timestream-component | 2 +
.../camel/configurer/aws2-timestream-endpoint | 2 +
.../camel/urifactory/aws2-timestream-endpoint | 2 +
.../component/aws2/timestream/aws2-timestream.json | 108 ++
.../src/main/docs/aws2-timestream-component.adoc | 203 ++++
.../timestream/Timestream2AbstractEndpoint.java | 47 +
.../aws2/timestream/Timestream2ClientType.java | 22 +
.../aws2/timestream/Timestream2Component.java | 93 ++
.../aws2/timestream/Timestream2Configuration.java | 272 +++++
.../aws2/timestream/Timestream2Constants.java | 110 ++
.../aws2/timestream/Timestream2Operations.java | 51 +
.../client/Timestream2ClientFactory.java | 42 +
.../client/Timestream2InternalClient.java | 41 +
.../impl/Timestream2ClientIAMOptimizedImpl.java | 129 +++
.../client/impl/Timestream2ClientStandardImpl.java | 158 +++
.../timestream/query/Timestream2QueryEndpoint.java | 71 ++
.../timestream/query/Timestream2QueryProducer.java | 584 ++++++++++
.../query/Timestream2QueryProducerHealthCheck.java | 72 ++
.../timestream/write/Timestream2WriteEndpoint.java | 72 ++
.../timestream/write/Timestream2WriteProducer.java | 765 +++++++++++++
.../write/Timestream2WriteProducerHealthCheck.java | 72 ++
.../timestream/Timestream2ClientFactoryTest.java | 52 +
.../Timestream2ComponentClientRegistryTest.java | 86 ++
.../Timestream2ComponentConfigurationTest.java | 126 +++
.../query/AmazonTimestreamQueryClientMock.java | 116 ++
...m2QueryProducerHealthCheckProfileCredsTest.java | 94 ++
...am2QueryProducerHealthCheckStaticCredsTest.java | 95 ++
.../query/Timestream2QueryProducerSpringTest.java | 234 ++++
.../query/Timestream2QueryProducerTest.java | 291 +++++
.../write/AmazonTimestreamWriteClientMock.java | 163 +++
...m2WriteProducerHealthCheckProfileCredsTest.java | 94 ++
...am2WriteProducerHealthCheckStaticCredsTest.java | 95 ++
.../write/Timestream2WriteProducerSpringTest.java | 338 ++++++
.../write/Timestream2WriteProducerTest.java | 397 +++++++
.../src/test/resources/log4j2.properties | 28 +
.../TimestreamComponentSpringTest-context.xml | 172 +++
components/camel-aws/pom.xml | 1 +
.../org/apache/camel/main/components.properties | 1 +
.../ROOT/examples/json/aws2-timestream.json | 1 +
docs/components/modules/ROOT/nav.adoc | 1 +
.../ROOT/pages/aws2-timestream-component.adoc | 1 +
.../component/ComponentsBuilderFactory.java | 13 +
.../dsl/Aws2TimestreamComponentBuilderFactory.java | 459 ++++++++
.../src/generated/resources/metadata.json | 22 +
.../builder/endpoint/EndpointBuilderFactory.java | 1 +
.../camel/builder/endpoint/EndpointBuilders.java | 1 +
.../builder/endpoint/StaticEndpointBuilders.java | 51 +
.../dsl/Timestream2EndpointBuilderFactory.java | 1148 ++++++++++++++++++++
.../camel-component-known-dependencies.properties | 1 +
parent/pom.xml | 5 +
.../apache/camel/maven/packaging/MojoHelper.java | 3 +-
61 files changed, 7633 insertions(+), 1 deletion(-)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index c3c04872216..7373b9bd110 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -231,6 +231,11 @@
<artifactId>camel-aws2-sts</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws2-timestream</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-aws2-translate</artifactId>
diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml
index c00ddcd8d2a..f10a1100107 100644
--- a/catalog/camel-allcomponents/pom.xml
+++ b/catalog/camel-allcomponents/pom.xml
@@ -227,6 +227,11 @@
<artifactId>camel-aws2-sts</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws2-timestream</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-aws2-translate</artifactId>
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
index 75a7ac2930b..b6e196d2221 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
@@ -29,6 +29,7 @@ aws2-sns
aws2-sqs
aws2-step-functions
aws2-sts
+aws2-timestream
aws2-translate
azure-cosmosdb
azure-eventhubs
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-timestream.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-timestream.json
new file mode 100644
index 00000000000..5f490df799e
--- /dev/null
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-timestream.json
@@ -0,0 +1,108 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "aws2-timestream",
+ "title": "AWS Timestream",
+ "description": "A Camel Amazon Web Services TimeStream component",
+ "deprecated": false,
+ "firstVersion": "4.1.0",
+ "label": "cloud,database",
+ "javaType": "org.apache.camel.component.aws2.timestream.Timestream2Component",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-aws2-timestream",
+ "version": "4.1.0-SNAPSHOT",
+ "scheme": "aws2-timestream",
+ "extendsScheme": "",
+ "syntax": "aws2-timestream:clientType:label",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false
+ },
+ "componentProperties": {
+ "configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" },
+ "lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
+ "operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.timestream.Timestream2Operations", "enum": [ "describeEndpoints", "createBatchLoadTask", "describeBatchLoadTask", "resumeBatchLoadTask", "listBatchLoadTasks", "createDatabase", "deleteDatabase", "describeDatabase", "updateDatabase", "listDatabases", "createTable", "deleteTable", "describeTable", " [...]
+ "overrideEndpoint": { "index": 3, "kind": "property", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in [...]
+ "pojoRequest": { "index": 4, "kind": "property", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
+ "profileCredentialsName": { "index": 5, "kind": "property", "displayName": "Profile Credentials Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile [...]
+ "region": { "index": 6, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "The region in which Timestream client needs to work. When using this parameter, the configuration will expect [...]
+ "trustAllCertificates": { "index": 7, "kind": "property", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the en [...]
+ "uriEndpointOverride": { "index": 8, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with [...]
+ "useDefaultCredentialsProvider": { "index": 9, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set whether the Timestream client should expec [...]
+ "useProfileCredentialsProvider": { "index": 10, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set whether the Timestream client should expe [...]
+ "autowiredEnabled": { "index": 11, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching [...]
+ "awsTimestreamQueryClient": { "index": 12, "kind": "property", "displayName": "Aws Timestream Query Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "de [...]
+ "awsTimestreamWriteClient": { "index": 13, "kind": "property", "displayName": "Aws Timestream Write Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "de [...]
+ "healthCheckConsumerEnabled": { "index": 14, "kind": "property", "displayName": "Health Check Consumer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all consumer based health checks from this component" },
+ "healthCheckProducerEnabled": { "index": 15, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on produce [...]
+ "proxyHost": { "index": 16, "kind": "property", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Timestream client" },
+ "proxyPort": { "index": 17, "kind": "property", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Timestream client" },
+ "proxyProtocol": { "index": 18, "kind": "property", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "To define a proxy [...]
+ "accessKey": { "index": 19, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 20, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ },
+ "headers": {
+ "CamelAwsTimestreamOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#OPERATION" },
+ "CamelAwsTimestreamRecord": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.Record", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Represents a time-series data point being written into Timestream", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#RECORD" },
+ "CamelAwsTimestreamRecordList": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "List of Records", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#RECORD_LIST" },
+ "CamelAwsTimestreamTaskStatus": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Status of Batch Load Task", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#TASK_STATUS" },
+ "CamelAwsTimestreamTaskId": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID of the batch load task to resume.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#TASK_ID" },
+ "CamelAwsTimestreamDatabaseName": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of Database", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#DATABASE_NAME" },
+ "CamelAwsTimestreamTableName": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of Table", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#TABLE_NAME" },
+ "CamelAwsTimestreamTargetDatabaseName": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of Target Database", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#TARGET_DATABASE_NAME" },
+ "CamelAwsTimestreamTargetTableName": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of Target Table", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#TARGET_TABLE_NAME" },
+ "CamelAwsTimestreamRecordVersion": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Record version", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#RECORD_VERSION" },
+ "CamelAwsTimestreamDataModelConfiguration": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.DataModelConfiguration", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Configuration of Data Model", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#DATA_MODEL_CONFIGURATION" },
+ "CamelAwsTimestreamDataSourceConfiguration": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.DataSourceConfiguration", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Configuration of Data Source", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#DATA_SOURCE_CONFIGURATION" },
+ "CamelAwsTimestreamReportConfiguration": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.ReportConfiguration", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Reporting Configuration", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#REPORT_CONFIGURATION" },
+ "CamelAwsTimestreamTableSchema": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.Schema", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Timestream Table Schema", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEMA" },
+ "CamelAwsTimestreamRetentionProperties": { "index": 14, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.RetentionProperties", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Timestream Table Retention Properties", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#RETENTION_PROPERTIES" },
+ "CamelAwsTimestreamMagneticStoreWriteProperties": { "index": 15, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.MagneticStoreWriteProperties", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Timestream Table Magentic Store Write properties", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#MAGNET [...]
+ "CamelAwsTimestreamTimeColumn": { "index": 16, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of Time column", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#TIME_COLUMN" },
+ "CamelAwsTimestreamMeasureColumnName": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the measure column.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#MEASURE_NAME_COLUMN" },
+ "CamelAwsTimestreamDimensionMappingList": { "index": 18, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "This is to allow mapping column(s) from the query result to the dimension in the destination table.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#DIMENSION_MAPPING_LIST" },
+ "CamelAwsTimestreamMultiMeasureMappings": { "index": 19, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamquery.model.MultiMeasureMappings", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Multi-measure mappings.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#MULTI_MEASURE_MAPPINGS" },
+ "CamelAwsTimestreamMixedMeasureMappingList": { "index": 20, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Specifies how to map measures to multi-measure records.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#MIXED_MEASURE_MAPPING_LIST" },
+ "CamelAwsTimestreamScheduledQueryName": { "index": 21, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of scheduled query", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEDULED_QUERY_NAME" },
+ "CamelAwsTimestreamScheduledQueryArn": { "index": 22, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Arn of scheduled query", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEDULED_QUERY_ARN" },
+ "CamelAwsTimestreamScheduledQueryState": { "index": 23, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "State of scheduled query", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEDULED_QUERY_STATE" },
+ "CamelAwsTimestreamScheduledQueryInvocationTime": { "index": 24, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Instant", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Invocation Time for scheduled query execution", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEDULED_QUERY_INVOCATION_TIME" },
+ "CamelAwsTimestreamQueryString": { "index": 25, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The query string to run.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#QUERY_STRING" },
+ "CamelAwsTimestreamQueryId": { "index": 26, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "ID of query.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#QUERY_ID" },
+ "CamelAwsTimestreamQueryValidateOnly": { "index": 27, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Validates the prepared query, but does not store for later execution", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#QUERY_VALIDATE_ONLY" },
+ "CamelAwsTimestreamQueryMaxRows": { "index": 28, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The total number of rows to be returned in the Query output.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#QUERY_MAX_ROWS" },
+ "CamelAwsTimestreamMaxResults": { "index": 29, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Max Results to be returned in output", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#MAX_RESULTS" },
+ "CamelAwsTimestreamScheduleExpression": { "index": 30, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The schedule expression for the query.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEDULE_EXPRESSION" },
+ "CamelAwsTimestreamNotificationTopicArn": { "index": 31, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Notification Topic Arn for the scheduled query.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#NOTIFICATION_TOPIC_ARN" },
+ "CamelAwsTimestreamErrorReportS3BucketName": { "index": 32, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "S3 Bucket name for error reporting.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#ERROR_REPORT_S3_BUCKET_NAME" },
+ "CamelAwsTimestreamErrorReportS3ObjectKeyPrefix": { "index": 33, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "S3 object key prefix for error reporting.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#ERROR_REPORT_S3_OBJECT_KEY_PREFIX" },
+ "CamelAwsTimestreamErrorReportS3EncryptionOption": { "index": 34, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "S3 encryption option for error reporting.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#ERROR_REPORT_S3_ENCRYPTION_OPTION" },
+ "CamelAwsTimestreamScheduledQueryExecutionRoleArn": { "index": 35, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "he ARN for the IAM role that Timestream will assume when running the scheduled query.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEDULED_QUERY_EXECUTION_ROLE_ARN" },
+ "CamelAwsTimestreamClientToken": { "index": 36, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Using a ClientToken makes the call to CreateScheduledQuery idempotent", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#CLIENT_TOKEN" },
+ "CamelAwsTimestreamKmsKeyId": { "index": 37, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon KMS key used to encrypt the scheduled query resource, at-rest.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#KMS_KEY_ID" }
+ },
+ "properties": {
+ "clientType": { "index": 0, "kind": "path", "displayName": "Client Type", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.timestream.Timestream2ClientType", "enum": [ "write", "query" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Type [...]
+ "label": { "index": 1, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Logical name" },
+ "operation": { "index": 2, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.timestream.Timestream2Operations", "enum": [ "describeEndpoints", "createBatchLoadTask", "describeBatchLoadTask", "resumeBatchLoadTask", "listBatchLoadTasks", "createDatabase", "deleteDatabase", "describeDatabase", "updateDatabase", "listDatabases", "createTable", "deleteTable", "describeTable", [...]
+ "overrideEndpoint": { "index": 3, "kind": "parameter", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in [...]
+ "pojoRequest": { "index": 4, "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
+ "profileCredentialsName": { "index": 5, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile [...]
+ "region": { "index": 6, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "The region in which Timestream client needs to work. When using this parameter, the configuration will expect [...]
+ "trustAllCertificates": { "index": 7, "kind": "parameter", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the e [...]
+ "uriEndpointOverride": { "index": 8, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with [...]
+ "useDefaultCredentialsProvider": { "index": 9, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set whether the Timestream client should expe [...]
+ "useProfileCredentialsProvider": { "index": 10, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set whether the Timestream client should exp [...]
+ "lazyStartProducer": { "index": 11, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
+ "awsTimestreamQueryClient": { "index": 12, "kind": "parameter", "displayName": "Aws Timestream Query Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "d [...]
+ "awsTimestreamWriteClient": { "index": 13, "kind": "parameter", "displayName": "Aws Timestream Write Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "d [...]
+ "proxyHost": { "index": 14, "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Timestream client" },
+ "proxyPort": { "index": 15, "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Timestream client" },
+ "proxyProtocol": { "index": 16, "kind": "parameter", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "To define a proxy [...]
+ "accessKey": { "index": 17, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 18, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/pom.xml b/components/camel-aws/camel-aws2-timestream/pom.xml
new file mode 100644
index 00000000000..57eb8cd10a2
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/pom.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>camel-aws2-timestream</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Camel :: AWS Timestream</name>
+ <description>A Camel Amazon Web Services TimeStream component</description>
+
+ <properties>
+ <camel.surefire.forkTimeout>1200</camel.surefire.forkTimeout>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-support</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-health</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>software.amazon.awssdk</groupId>
+ <artifactId>timestreamquery</artifactId>
+ <version>${aws-java-sdk2-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>software.amazon.awssdk</groupId>
+ <artifactId>timestreamwrite</artifactId>
+ <version>${aws-java-sdk2-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>software.amazon.awssdk</groupId>
+ <artifactId>apache-client</artifactId>
+ <version>${aws-java-sdk2-version}</version>
+ </dependency>
+
+ <!-- for testing -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-spring-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- test infra -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-infra-aws-v2</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>${camel.surefire.fork.vmargs} -Xmx2G</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/components/camel-aws/camel-aws2-timestream/src/generated/java/org/apache/camel/component/aws2/timestream/Timestream2AbstractEndpointConfigurer.java b/components/camel-aws/camel-aws2-timestream/src/generated/java/org/apache/camel/component/aws2/timestream/Timestream2AbstractEndpointConfigurer.java
new file mode 100644
index 00000000000..73808a049e9
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/generated/java/org/apache/camel/component/aws2/timestream/Timestream2AbstractEndpointConfigurer.java
@@ -0,0 +1,144 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.aws2.timestream;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public class Timestream2AbstractEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+ Timestream2AbstractEndpoint target = (Timestream2AbstractEndpoint) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "awstimestreamqueryclient":
+ case "awsTimestreamQueryClient": target.getConfiguration().setAwsTimestreamQueryClient(property(camelContext, software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient.class, value)); return true;
+ case "awstimestreamwriteclient":
+ case "awsTimestreamWriteClient": target.getConfiguration().setAwsTimestreamWriteClient(property(camelContext, software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient.class, value)); return true;
+ case "lazystartproducer":
+ case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+ case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.aws2.timestream.Timestream2Operations.class, value)); return true;
+ case "overrideendpoint":
+ case "overrideEndpoint": target.getConfiguration().setOverrideEndpoint(property(camelContext, boolean.class, value)); return true;
+ case "pojorequest":
+ case "pojoRequest": target.getConfiguration().setPojoRequest(property(camelContext, boolean.class, value)); return true;
+ case "profilecredentialsname":
+ case "profileCredentialsName": target.getConfiguration().setProfileCredentialsName(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyhost":
+ case "proxyHost": target.getConfiguration().setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyport":
+ case "proxyPort": target.getConfiguration().setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "proxyprotocol":
+ case "proxyProtocol": target.getConfiguration().setProxyProtocol(property(camelContext, software.amazon.awssdk.core.Protocol.class, value)); return true;
+ case "region": target.getConfiguration().setRegion(property(camelContext, java.lang.String.class, value)); return true;
+ case "secretkey":
+ case "secretKey": target.getConfiguration().setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "trustallcertificates":
+ case "trustAllCertificates": target.getConfiguration().setTrustAllCertificates(property(camelContext, boolean.class, value)); return true;
+ case "uriendpointoverride":
+ case "uriEndpointOverride": target.getConfiguration().setUriEndpointOverride(property(camelContext, java.lang.String.class, value)); return true;
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": target.getConfiguration().setUseDefaultCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": target.getConfiguration().setUseProfileCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+ default: return false;
+ }
+ }
+
+ @Override
+ public String[] getAutowiredNames() {
+ return new String[]{"awsTimestreamQueryClient","awsTimestreamWriteClient"};
+ }
+
+ @Override
+ public Class<?> getOptionType(String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": return java.lang.String.class;
+ case "awstimestreamqueryclient":
+ case "awsTimestreamQueryClient": return software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient.class;
+ case "awstimestreamwriteclient":
+ case "awsTimestreamWriteClient": return software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient.class;
+ case "lazystartproducer":
+ case "lazyStartProducer": return boolean.class;
+ case "operation": return org.apache.camel.component.aws2.timestream.Timestream2Operations.class;
+ case "overrideendpoint":
+ case "overrideEndpoint": return boolean.class;
+ case "pojorequest":
+ case "pojoRequest": return boolean.class;
+ case "profilecredentialsname":
+ case "profileCredentialsName": return java.lang.String.class;
+ case "proxyhost":
+ case "proxyHost": return java.lang.String.class;
+ case "proxyport":
+ case "proxyPort": return java.lang.Integer.class;
+ case "proxyprotocol":
+ case "proxyProtocol": return software.amazon.awssdk.core.Protocol.class;
+ case "region": return java.lang.String.class;
+ case "secretkey":
+ case "secretKey": return java.lang.String.class;
+ case "trustallcertificates":
+ case "trustAllCertificates": return boolean.class;
+ case "uriendpointoverride":
+ case "uriEndpointOverride": return java.lang.String.class;
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": return boolean.class;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return boolean.class;
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+ Timestream2AbstractEndpoint target = (Timestream2AbstractEndpoint) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": return target.getConfiguration().getAccessKey();
+ case "awstimestreamqueryclient":
+ case "awsTimestreamQueryClient": return target.getConfiguration().getAwsTimestreamQueryClient();
+ case "awstimestreamwriteclient":
+ case "awsTimestreamWriteClient": return target.getConfiguration().getAwsTimestreamWriteClient();
+ case "lazystartproducer":
+ case "lazyStartProducer": return target.isLazyStartProducer();
+ case "operation": return target.getConfiguration().getOperation();
+ case "overrideendpoint":
+ case "overrideEndpoint": return target.getConfiguration().isOverrideEndpoint();
+ case "pojorequest":
+ case "pojoRequest": return target.getConfiguration().isPojoRequest();
+ case "profilecredentialsname":
+ case "profileCredentialsName": return target.getConfiguration().getProfileCredentialsName();
+ case "proxyhost":
+ case "proxyHost": return target.getConfiguration().getProxyHost();
+ case "proxyport":
+ case "proxyPort": return target.getConfiguration().getProxyPort();
+ case "proxyprotocol":
+ case "proxyProtocol": return target.getConfiguration().getProxyProtocol();
+ case "region": return target.getConfiguration().getRegion();
+ case "secretkey":
+ case "secretKey": return target.getConfiguration().getSecretKey();
+ case "trustallcertificates":
+ case "trustAllCertificates": return target.getConfiguration().isTrustAllCertificates();
+ case "uriendpointoverride":
+ case "uriEndpointOverride": return target.getConfiguration().getUriEndpointOverride();
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": return target.getConfiguration().isUseDefaultCredentialsProvider();
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return target.getConfiguration().isUseProfileCredentialsProvider();
+ default: return null;
+ }
+ }
+}
+
diff --git a/components/camel-aws/camel-aws2-timestream/src/generated/java/org/apache/camel/component/aws2/timestream/Timestream2ComponentConfigurer.java b/components/camel-aws/camel-aws2-timestream/src/generated/java/org/apache/camel/component/aws2/timestream/Timestream2ComponentConfigurer.java
new file mode 100644
index 00000000000..19908666186
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/generated/java/org/apache/camel/component/aws2/timestream/Timestream2ComponentConfigurer.java
@@ -0,0 +1,172 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.aws2.timestream;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public class Timestream2ComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+ private org.apache.camel.component.aws2.timestream.Timestream2Configuration getOrCreateConfiguration(Timestream2Component target) {
+ if (target.getConfiguration() == null) {
+ target.setConfiguration(new org.apache.camel.component.aws2.timestream.Timestream2Configuration());
+ }
+ return target.getConfiguration();
+ }
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+ Timestream2Component target = (Timestream2Component) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "autowiredenabled":
+ case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
+ case "awstimestreamqueryclient":
+ case "awsTimestreamQueryClient": getOrCreateConfiguration(target).setAwsTimestreamQueryClient(property(camelContext, software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient.class, value)); return true;
+ case "awstimestreamwriteclient":
+ case "awsTimestreamWriteClient": getOrCreateConfiguration(target).setAwsTimestreamWriteClient(property(camelContext, software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient.class, value)); return true;
+ case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.timestream.Timestream2Configuration.class, value)); return true;
+ case "healthcheckconsumerenabled":
+ case "healthCheckConsumerEnabled": target.setHealthCheckConsumerEnabled(property(camelContext, boolean.class, value)); return true;
+ case "healthcheckproducerenabled":
+ case "healthCheckProducerEnabled": target.setHealthCheckProducerEnabled(property(camelContext, boolean.class, value)); return true;
+ case "lazystartproducer":
+ case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+ case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.aws2.timestream.Timestream2Operations.class, value)); return true;
+ case "overrideendpoint":
+ case "overrideEndpoint": getOrCreateConfiguration(target).setOverrideEndpoint(property(camelContext, boolean.class, value)); return true;
+ case "pojorequest":
+ case "pojoRequest": getOrCreateConfiguration(target).setPojoRequest(property(camelContext, boolean.class, value)); return true;
+ case "profilecredentialsname":
+ case "profileCredentialsName": getOrCreateConfiguration(target).setProfileCredentialsName(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyhost":
+ case "proxyHost": getOrCreateConfiguration(target).setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyport":
+ case "proxyPort": getOrCreateConfiguration(target).setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "proxyprotocol":
+ case "proxyProtocol": getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, software.amazon.awssdk.core.Protocol.class, value)); return true;
+ case "region": getOrCreateConfiguration(target).setRegion(property(camelContext, java.lang.String.class, value)); return true;
+ case "secretkey":
+ case "secretKey": getOrCreateConfiguration(target).setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "trustallcertificates":
+ case "trustAllCertificates": getOrCreateConfiguration(target).setTrustAllCertificates(property(camelContext, boolean.class, value)); return true;
+ case "uriendpointoverride":
+ case "uriEndpointOverride": getOrCreateConfiguration(target).setUriEndpointOverride(property(camelContext, java.lang.String.class, value)); return true;
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": getOrCreateConfiguration(target).setUseDefaultCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": getOrCreateConfiguration(target).setUseProfileCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+ default: return false;
+ }
+ }
+
+ @Override
+ public String[] getAutowiredNames() {
+ return new String[]{"awsTimestreamQueryClient","awsTimestreamWriteClient"};
+ }
+
+ @Override
+ public Class<?> getOptionType(String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": return java.lang.String.class;
+ case "autowiredenabled":
+ case "autowiredEnabled": return boolean.class;
+ case "awstimestreamqueryclient":
+ case "awsTimestreamQueryClient": return software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient.class;
+ case "awstimestreamwriteclient":
+ case "awsTimestreamWriteClient": return software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient.class;
+ case "configuration": return org.apache.camel.component.aws2.timestream.Timestream2Configuration.class;
+ case "healthcheckconsumerenabled":
+ case "healthCheckConsumerEnabled": return boolean.class;
+ case "healthcheckproducerenabled":
+ case "healthCheckProducerEnabled": return boolean.class;
+ case "lazystartproducer":
+ case "lazyStartProducer": return boolean.class;
+ case "operation": return org.apache.camel.component.aws2.timestream.Timestream2Operations.class;
+ case "overrideendpoint":
+ case "overrideEndpoint": return boolean.class;
+ case "pojorequest":
+ case "pojoRequest": return boolean.class;
+ case "profilecredentialsname":
+ case "profileCredentialsName": return java.lang.String.class;
+ case "proxyhost":
+ case "proxyHost": return java.lang.String.class;
+ case "proxyport":
+ case "proxyPort": return java.lang.Integer.class;
+ case "proxyprotocol":
+ case "proxyProtocol": return software.amazon.awssdk.core.Protocol.class;
+ case "region": return java.lang.String.class;
+ case "secretkey":
+ case "secretKey": return java.lang.String.class;
+ case "trustallcertificates":
+ case "trustAllCertificates": return boolean.class;
+ case "uriendpointoverride":
+ case "uriEndpointOverride": return java.lang.String.class;
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": return boolean.class;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return boolean.class;
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+ Timestream2Component target = (Timestream2Component) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": return getOrCreateConfiguration(target).getAccessKey();
+ case "autowiredenabled":
+ case "autowiredEnabled": return target.isAutowiredEnabled();
+ case "awstimestreamqueryclient":
+ case "awsTimestreamQueryClient": return getOrCreateConfiguration(target).getAwsTimestreamQueryClient();
+ case "awstimestreamwriteclient":
+ case "awsTimestreamWriteClient": return getOrCreateConfiguration(target).getAwsTimestreamWriteClient();
+ case "configuration": return target.getConfiguration();
+ case "healthcheckconsumerenabled":
+ case "healthCheckConsumerEnabled": return target.isHealthCheckConsumerEnabled();
+ case "healthcheckproducerenabled":
+ case "healthCheckProducerEnabled": return target.isHealthCheckProducerEnabled();
+ case "lazystartproducer":
+ case "lazyStartProducer": return target.isLazyStartProducer();
+ case "operation": return getOrCreateConfiguration(target).getOperation();
+ case "overrideendpoint":
+ case "overrideEndpoint": return getOrCreateConfiguration(target).isOverrideEndpoint();
+ case "pojorequest":
+ case "pojoRequest": return getOrCreateConfiguration(target).isPojoRequest();
+ case "profilecredentialsname":
+ case "profileCredentialsName": return getOrCreateConfiguration(target).getProfileCredentialsName();
+ case "proxyhost":
+ case "proxyHost": return getOrCreateConfiguration(target).getProxyHost();
+ case "proxyport":
+ case "proxyPort": return getOrCreateConfiguration(target).getProxyPort();
+ case "proxyprotocol":
+ case "proxyProtocol": return getOrCreateConfiguration(target).getProxyProtocol();
+ case "region": return getOrCreateConfiguration(target).getRegion();
+ case "secretkey":
+ case "secretKey": return getOrCreateConfiguration(target).getSecretKey();
+ case "trustallcertificates":
+ case "trustAllCertificates": return getOrCreateConfiguration(target).isTrustAllCertificates();
+ case "uriendpointoverride":
+ case "uriEndpointOverride": return getOrCreateConfiguration(target).getUriEndpointOverride();
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": return getOrCreateConfiguration(target).isUseDefaultCredentialsProvider();
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return getOrCreateConfiguration(target).isUseProfileCredentialsProvider();
+ default: return null;
+ }
+ }
+}
+
diff --git a/components/camel-aws/camel-aws2-timestream/src/generated/java/org/apache/camel/component/aws2/timestream/Timestream2EndpointUriFactory.java b/components/camel-aws/camel-aws2-timestream/src/generated/java/org/apache/camel/component/aws2/timestream/Timestream2EndpointUriFactory.java
new file mode 100644
index 00000000000..3f90e592cab
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/generated/java/org/apache/camel/component/aws2/timestream/Timestream2EndpointUriFactory.java
@@ -0,0 +1,90 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.aws2.timestream;
+
+import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.camel.spi.EndpointUriFactory;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+public class Timestream2EndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory {
+
+ private static final String BASE = ":clientType:label";
+
+ private static final Set<String> PROPERTY_NAMES;
+ private static final Set<String> SECRET_PROPERTY_NAMES;
+ private static final Set<String> MULTI_VALUE_PREFIXES;
+ static {
+ Set<String> props = new HashSet<>(19);
+ props.add("accessKey");
+ props.add("awsTimestreamQueryClient");
+ props.add("awsTimestreamWriteClient");
+ props.add("clientType");
+ props.add("label");
+ props.add("lazyStartProducer");
+ props.add("operation");
+ props.add("overrideEndpoint");
+ props.add("pojoRequest");
+ props.add("profileCredentialsName");
+ props.add("proxyHost");
+ props.add("proxyPort");
+ props.add("proxyProtocol");
+ props.add("region");
+ props.add("secretKey");
+ props.add("trustAllCertificates");
+ props.add("uriEndpointOverride");
+ props.add("useDefaultCredentialsProvider");
+ props.add("useProfileCredentialsProvider");
+ PROPERTY_NAMES = Collections.unmodifiableSet(props);
+ Set<String> secretProps = new HashSet<>(2);
+ secretProps.add("accessKey");
+ secretProps.add("secretKey");
+ SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
+ MULTI_VALUE_PREFIXES = Collections.emptySet();
+ }
+
+ @Override
+ public boolean isEnabled(String scheme) {
+ return "aws2-timestream".equals(scheme);
+ }
+
+ @Override
+ public String buildUri(String scheme, Map<String, Object> properties, boolean encode) throws URISyntaxException {
+ String syntax = scheme + BASE;
+ String uri = syntax;
+
+ Map<String, Object> copy = new HashMap<>(properties);
+
+ uri = buildPathParameter(syntax, uri, "clientType", null, true, copy);
+ uri = buildPathParameter(syntax, uri, "label", null, true, copy);
+ uri = buildQueryParameters(uri, copy, encode);
+ return uri;
+ }
+
+ @Override
+ public Set<String> propertyNames() {
+ return PROPERTY_NAMES;
+ }
+
+ @Override
+ public Set<String> secretPropertyNames() {
+ return SECRET_PROPERTY_NAMES;
+ }
+
+ @Override
+ public Set<String> multiValuePrefixes() {
+ return MULTI_VALUE_PREFIXES;
+ }
+
+ @Override
+ public boolean isLenientProperties() {
+ return false;
+ }
+}
+
diff --git a/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/component.properties b/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/component.properties
new file mode 100644
index 00000000000..d68bcd9276f
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/component.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+components=aws2-timestream
+groupId=org.apache.camel
+artifactId=camel-aws2-timestream
+version=4.1.0-SNAPSHOT
+projectName=Camel :: AWS Timestream
+projectDescription=A Camel Amazon Web Services TimeStream component
diff --git a/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/component/aws2-timestream b/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/component/aws2-timestream
new file mode 100644
index 00000000000..df228948db3
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/component/aws2-timestream
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws2.timestream.Timestream2Component
diff --git a/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-timestream-component b/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-timestream-component
new file mode 100644
index 00000000000..e8fe0c0f5b8
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-timestream-component
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws2.timestream.Timestream2ComponentConfigurer
diff --git a/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-timestream-endpoint b/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-timestream-endpoint
new file mode 100644
index 00000000000..196f14d92f7
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws2-timestream-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws2.timestream.Timestream2AbstractEndpointConfigurer
diff --git a/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/urifactory/aws2-timestream-endpoint b/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/urifactory/aws2-timestream-endpoint
new file mode 100644
index 00000000000..aaa07f366f4
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/generated/resources/META-INF/services/org/apache/camel/urifactory/aws2-timestream-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws2.timestream.Timestream2EndpointUriFactory
diff --git a/components/camel-aws/camel-aws2-timestream/src/generated/resources/org/apache/camel/component/aws2/timestream/aws2-timestream.json b/components/camel-aws/camel-aws2-timestream/src/generated/resources/org/apache/camel/component/aws2/timestream/aws2-timestream.json
new file mode 100644
index 00000000000..5f490df799e
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/generated/resources/org/apache/camel/component/aws2/timestream/aws2-timestream.json
@@ -0,0 +1,108 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "aws2-timestream",
+ "title": "AWS Timestream",
+ "description": "A Camel Amazon Web Services TimeStream component",
+ "deprecated": false,
+ "firstVersion": "4.1.0",
+ "label": "cloud,database",
+ "javaType": "org.apache.camel.component.aws2.timestream.Timestream2Component",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-aws2-timestream",
+ "version": "4.1.0-SNAPSHOT",
+ "scheme": "aws2-timestream",
+ "extendsScheme": "",
+ "syntax": "aws2-timestream:clientType:label",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false
+ },
+ "componentProperties": {
+ "configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" },
+ "lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
+ "operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.timestream.Timestream2Operations", "enum": [ "describeEndpoints", "createBatchLoadTask", "describeBatchLoadTask", "resumeBatchLoadTask", "listBatchLoadTasks", "createDatabase", "deleteDatabase", "describeDatabase", "updateDatabase", "listDatabases", "createTable", "deleteTable", "describeTable", " [...]
+ "overrideEndpoint": { "index": 3, "kind": "property", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in [...]
+ "pojoRequest": { "index": 4, "kind": "property", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
+ "profileCredentialsName": { "index": 5, "kind": "property", "displayName": "Profile Credentials Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile [...]
+ "region": { "index": 6, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "The region in which Timestream client needs to work. When using this parameter, the configuration will expect [...]
+ "trustAllCertificates": { "index": 7, "kind": "property", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the en [...]
+ "uriEndpointOverride": { "index": 8, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with [...]
+ "useDefaultCredentialsProvider": { "index": 9, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set whether the Timestream client should expec [...]
+ "useProfileCredentialsProvider": { "index": 10, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set whether the Timestream client should expe [...]
+ "autowiredEnabled": { "index": 11, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching [...]
+ "awsTimestreamQueryClient": { "index": 12, "kind": "property", "displayName": "Aws Timestream Query Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "de [...]
+ "awsTimestreamWriteClient": { "index": 13, "kind": "property", "displayName": "Aws Timestream Write Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "de [...]
+ "healthCheckConsumerEnabled": { "index": 14, "kind": "property", "displayName": "Health Check Consumer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all consumer based health checks from this component" },
+ "healthCheckProducerEnabled": { "index": 15, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on produce [...]
+ "proxyHost": { "index": 16, "kind": "property", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Timestream client" },
+ "proxyPort": { "index": 17, "kind": "property", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Timestream client" },
+ "proxyProtocol": { "index": 18, "kind": "property", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "To define a proxy [...]
+ "accessKey": { "index": 19, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 20, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ },
+ "headers": {
+ "CamelAwsTimestreamOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#OPERATION" },
+ "CamelAwsTimestreamRecord": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.Record", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Represents a time-series data point being written into Timestream", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#RECORD" },
+ "CamelAwsTimestreamRecordList": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "List of Records", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#RECORD_LIST" },
+ "CamelAwsTimestreamTaskStatus": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Status of Batch Load Task", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#TASK_STATUS" },
+ "CamelAwsTimestreamTaskId": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID of the batch load task to resume.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#TASK_ID" },
+ "CamelAwsTimestreamDatabaseName": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of Database", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#DATABASE_NAME" },
+ "CamelAwsTimestreamTableName": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of Table", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#TABLE_NAME" },
+ "CamelAwsTimestreamTargetDatabaseName": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of Target Database", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#TARGET_DATABASE_NAME" },
+ "CamelAwsTimestreamTargetTableName": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of Target Table", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#TARGET_TABLE_NAME" },
+ "CamelAwsTimestreamRecordVersion": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Record version", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#RECORD_VERSION" },
+ "CamelAwsTimestreamDataModelConfiguration": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.DataModelConfiguration", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Configuration of Data Model", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#DATA_MODEL_CONFIGURATION" },
+ "CamelAwsTimestreamDataSourceConfiguration": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.DataSourceConfiguration", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Configuration of Data Source", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#DATA_SOURCE_CONFIGURATION" },
+ "CamelAwsTimestreamReportConfiguration": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.ReportConfiguration", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Reporting Configuration", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#REPORT_CONFIGURATION" },
+ "CamelAwsTimestreamTableSchema": { "index": 13, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.Schema", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Timestream Table Schema", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEMA" },
+ "CamelAwsTimestreamRetentionProperties": { "index": 14, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.RetentionProperties", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Timestream Table Retention Properties", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#RETENTION_PROPERTIES" },
+ "CamelAwsTimestreamMagneticStoreWriteProperties": { "index": 15, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamwrite.model.MagneticStoreWriteProperties", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Timestream Table Magentic Store Write properties", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#MAGNET [...]
+ "CamelAwsTimestreamTimeColumn": { "index": 16, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of Time column", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#TIME_COLUMN" },
+ "CamelAwsTimestreamMeasureColumnName": { "index": 17, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of the measure column.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#MEASURE_NAME_COLUMN" },
+ "CamelAwsTimestreamDimensionMappingList": { "index": 18, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "This is to allow mapping column(s) from the query result to the dimension in the destination table.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#DIMENSION_MAPPING_LIST" },
+ "CamelAwsTimestreamMultiMeasureMappings": { "index": 19, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.timestreamquery.model.MultiMeasureMappings", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Multi-measure mappings.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#MULTI_MEASURE_MAPPINGS" },
+ "CamelAwsTimestreamMixedMeasureMappingList": { "index": 20, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Specifies how to map measures to multi-measure records.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#MIXED_MEASURE_MAPPING_LIST" },
+ "CamelAwsTimestreamScheduledQueryName": { "index": 21, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Name of scheduled query", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEDULED_QUERY_NAME" },
+ "CamelAwsTimestreamScheduledQueryArn": { "index": 22, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Arn of scheduled query", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEDULED_QUERY_ARN" },
+ "CamelAwsTimestreamScheduledQueryState": { "index": 23, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "State of scheduled query", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEDULED_QUERY_STATE" },
+ "CamelAwsTimestreamScheduledQueryInvocationTime": { "index": 24, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Instant", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Invocation Time for scheduled query execution", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEDULED_QUERY_INVOCATION_TIME" },
+ "CamelAwsTimestreamQueryString": { "index": 25, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The query string to run.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#QUERY_STRING" },
+ "CamelAwsTimestreamQueryId": { "index": 26, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "ID of query.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#QUERY_ID" },
+ "CamelAwsTimestreamQueryValidateOnly": { "index": 27, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Validates the prepared query, but does not store for later execution", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#QUERY_VALIDATE_ONLY" },
+ "CamelAwsTimestreamQueryMaxRows": { "index": 28, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The total number of rows to be returned in the Query output.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#QUERY_MAX_ROWS" },
+ "CamelAwsTimestreamMaxResults": { "index": 29, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Max Results to be returned in output", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#MAX_RESULTS" },
+ "CamelAwsTimestreamScheduleExpression": { "index": 30, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The schedule expression for the query.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEDULE_EXPRESSION" },
+ "CamelAwsTimestreamNotificationTopicArn": { "index": 31, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Notification Topic Arn for the scheduled query.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#NOTIFICATION_TOPIC_ARN" },
+ "CamelAwsTimestreamErrorReportS3BucketName": { "index": 32, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "S3 Bucket name for error reporting.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#ERROR_REPORT_S3_BUCKET_NAME" },
+ "CamelAwsTimestreamErrorReportS3ObjectKeyPrefix": { "index": 33, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "S3 object key prefix for error reporting.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#ERROR_REPORT_S3_OBJECT_KEY_PREFIX" },
+ "CamelAwsTimestreamErrorReportS3EncryptionOption": { "index": 34, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "S3 encryption option for error reporting.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#ERROR_REPORT_S3_ENCRYPTION_OPTION" },
+ "CamelAwsTimestreamScheduledQueryExecutionRoleArn": { "index": 35, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "he ARN for the IAM role that Timestream will assume when running the scheduled query.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#SCHEDULED_QUERY_EXECUTION_ROLE_ARN" },
+ "CamelAwsTimestreamClientToken": { "index": 36, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Using a ClientToken makes the call to CreateScheduledQuery idempotent", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#CLIENT_TOKEN" },
+ "CamelAwsTimestreamKmsKeyId": { "index": 37, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon KMS key used to encrypt the scheduled query resource, at-rest.", "constantName": "org.apache.camel.component.aws2.timestream.Timestream2Constants#KMS_KEY_ID" }
+ },
+ "properties": {
+ "clientType": { "index": 0, "kind": "path", "displayName": "Client Type", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.timestream.Timestream2ClientType", "enum": [ "write", "query" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Type [...]
+ "label": { "index": 1, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Logical name" },
+ "operation": { "index": 2, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.timestream.Timestream2Operations", "enum": [ "describeEndpoints", "createBatchLoadTask", "describeBatchLoadTask", "resumeBatchLoadTask", "listBatchLoadTasks", "createDatabase", "deleteDatabase", "describeDatabase", "updateDatabase", "listDatabases", "createTable", "deleteTable", "describeTable", [...]
+ "overrideEndpoint": { "index": 3, "kind": "parameter", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in [...]
+ "pojoRequest": { "index": 4, "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
+ "profileCredentialsName": { "index": 5, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile [...]
+ "region": { "index": 6, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "The region in which Timestream client needs to work. When using this parameter, the configuration will expect [...]
+ "trustAllCertificates": { "index": 7, "kind": "parameter", "displayName": "Trust All Certificates", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the e [...]
+ "uriEndpointOverride": { "index": 8, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with [...]
+ "useDefaultCredentialsProvider": { "index": 9, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set whether the Timestream client should expe [...]
+ "useProfileCredentialsProvider": { "index": 10, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Set whether the Timestream client should exp [...]
+ "lazyStartProducer": { "index": 11, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...]
+ "awsTimestreamQueryClient": { "index": 12, "kind": "parameter", "displayName": "Aws Timestream Query Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "d [...]
+ "awsTimestreamWriteClient": { "index": 13, "kind": "parameter", "displayName": "Aws Timestream Write Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "d [...]
+ "proxyHost": { "index": 14, "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Timestream client" },
+ "proxyPort": { "index": 15, "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Timestream client" },
+ "proxyProtocol": { "index": 16, "kind": "parameter", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "object", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "To define a proxy [...]
+ "accessKey": { "index": 17, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 18, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.timestream.Timestream2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/docs/aws2-timestream-component.adoc b/components/camel-aws/camel-aws2-timestream/src/main/docs/aws2-timestream-component.adoc
new file mode 100644
index 00000000000..2d087ab2f4c
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/docs/aws2-timestream-component.adoc
@@ -0,0 +1,203 @@
+= AWS Timestream Component
+:doctitle: AWS Timestream
+:shortname: aws2-timestream
+:artifactid: camel-aws2-timestream
+:description: A Camel Amazon Web Services TimeStream component
+:since: 4.1
+:supportlevel: Preview
+:tabs-sync-option:
+:component-header: Only producer is supported
+//Manually maintained attributes
+:group: AWS
+:camel-spring-boot-name: aws2-timestream
+
+*Since Camel {since}*
+
+*{component-header}*
+
+The AWS2 Timestream component supports following operations on
+https://aws.amazon.com/timestream/[AWS Timestream]:
+
+* Write Operations
+** Describe Write Endpoints
+** Create,Describe,Resume,List Batch Load Tasks
+** Create, Delete, Update, Describe, List Databases
+** Create, Delete, Update, Describe, List Tables
+** Write Records
+
+
+* Query Operations
+** Describe Query Endpoints
+** Prepare Query, Query, Cancel Query
+** Create, Delete, Execute, Update, Describe, List Scheduled Queries
+
+Prerequisites
+
+You must have a valid Amazon Web Services developer account, and be
+signed up to use Amazon Timestream. More information is available at
+https://aws.amazon.com/timestream/[AWS Timestream].
+
+
+== URI Format
+
+-------------------------
+aws2-timestream://clientType:label[?options]
+-------------------------
+
+You can append query options to the URI in the following format,
+?options=value&option2=value&...
+
+
+// component-configure options: START
+
+// component-configure options: END
+
+// component options: START
+include::partial$component-configure-options.adoc[]
+include::partial$component-endpoint-options.adoc[]
+// component options: END
+
+// endpoint options: START
+
+// endpoint options: END
+
+
+Required Timestream component options
+
+Based on the type of operation to be performed, type of client (write/query) needs to be provided
+as clientType URI path parameter
+
+You have to provide either the awsTimestreamWriteClient(for write operations) or awsTimestreamQueryClient(for query operations) in the
+Registry or your accessKey and secretKey to access
+the https://aws.amazon.com/timestream/[AWS Timestream] service.
+
+== Usage
+
+=== Static credentials, Default Credential Provider and Profile Credentials Provider
+
+You have the possibility of avoiding the usage of explicit static credentials, by specifying the useDefaultCredentialsProvider option and set it to true.
+
+The order of evaluation for Default Credentials Provider is the following:
+
+ - Java system properties - aws.accessKeyId and aws.secretKey
+ - Environment variables - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
+ - Web Identity Token from AWS STS.
+ - The shared credentials and config files.
+ - Amazon ECS container credentials - loaded from the Amazon ECS if the environment variable AWS_CONTAINER_CREDENTIALS_RELATIVE_URI is set.
+ - Amazon EC2 Instance profile credentials.
+
+You have also the possibility of using Profile Credentials Provider, by specifying the useProfileCredentialsProvider option to true and profileCredentialsName to the profile name.
+
+Only one of static, default and profile credentials could be used at the same time.
+
+For more information about this you can look at https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html[AWS credentials documentation]
+
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
+
+=== Timestream Producer operations
+
+Camel-AWS Timestream component provides the following operation on the producer side:
+
+* Write Operations
+** describeEndpoints
+** createBatchLoadTask
+** describeBatchLoadTask
+** resumeBatchLoadTask
+** listBatchLoadTasks
+** createDatabase
+** deleteDatabase
+** describeDatabase
+** updateDatabase
+** listDatabases
+** createTable
+** deleteTable
+** describeTable
+** updateTable
+** listTables
+** writeRecords
+
+
+* Query Operations
+** describeEndpoints
+** createScheduledQuery
+** deleteScheduledQuery
+** executeScheduledQuery
+** updateScheduledQuery
+** describeScheduledQuery
+** listScheduledQueries
+** prepareQuery
+** query
+** cancelQuery
+
+== Producer Examples
+
+* Write Operation
+** createDatabase: this operation will create a timestream database
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:createDatabase")
+ .setHeader(Timestream2Constants.DATABASE_NAME, constant("testDb"))
+ .setHeader(Timestream2Constants.KMS_KEY_ID, constant("testKmsKey"))
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=createDatabase")
+--------------------------------------------------------------------------------
+
+* Query Operation
+** query: this operation will execute a timestream query
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:query")
+ .setHeader(Timestream2Constants.QUERY_STRING, constant("SELECT * FROM testDb.testTable ORDER BY time DESC LIMIT 10"))
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=query")
+--------------------------------------------------------------------------------
+
+== Using a POJO as body
+
+Sometimes build an AWS Request can be complex, because of multiple options. We introduce the possibility to use a POJO as body.
+In AWS Timestream there are multiple operations you can submit, as an example for Create state machine
+ request, you can do something like:
+
+* Write Operation
+** createDatabase: this operation will create a timestream database
+
+[source,java]
+------------------------------------------------------------------------------------------------------
+from("direct:start")
+ .setBody(CreateDatabaseRequest.builder().database(Database.builder().databaseName("testDb").kmsKeyId("testKmsKey").build()).build())
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=createDatabase&pojoRequest=true")
+------------------------------------------------------------------------------------------------------
+
+* Query Operation
+** query: this operation will execute a timestream query
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:query")
+ .setBody(QueryRequest.builder().queryString("SELECT * FROM testDb.testTable ORDER BY time DESC LIMIT 10").build())
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=query&pojoRequest=true")
+--------------------------------------------------------------------------------
+
+In this way you'll pass the request directly without the need of passing headers and options specifically related to this operation.
+
+== Dependencies
+
+Maven users will need to add the following dependency to their pom.xml.
+
+*pom.xml*
+
+[source,xml]
+---------------------------------------
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws2-timestream</artifactId>
+ <version>${camel-version}</version>
+</dependency>
+---------------------------------------
+
+where `$\{camel-version}` must be replaced by the actual version of Camel.
+
+
+include::spring-boot:partial$starter.adoc[]
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2AbstractEndpoint.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2AbstractEndpoint.java
new file mode 100644
index 00000000000..5d3c2d4d039
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2AbstractEndpoint.java
@@ -0,0 +1,47 @@
+/*
+ * 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.timestream;
+
+import org.apache.camel.*;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.support.DefaultEndpoint;
+
+@UriEndpoint(firstVersion = "4.1.0", scheme = "aws2-timestream", title = "AWS Timestream",
+ syntax = "aws2-timestream:clientType:label",
+ producerOnly = true, category = { Category.CLOUD, Category.DATABASE },
+ headersClass = Timestream2Constants.class)
+public abstract class Timestream2AbstractEndpoint extends DefaultEndpoint {
+
+ @UriParam
+ private Timestream2Configuration configuration;
+
+ public Timestream2AbstractEndpoint(String uri, Component component, Timestream2Configuration configuration) {
+ super(uri, component);
+ this.configuration = configuration;
+ }
+
+ @Override
+ public Timestream2Component getComponent() {
+ return (Timestream2Component) super.getComponent();
+ }
+
+ public Timestream2Configuration getConfiguration() {
+ return configuration;
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2ClientType.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2ClientType.java
new file mode 100644
index 00000000000..24802621261
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2ClientType.java
@@ -0,0 +1,22 @@
+/*
+ * 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.timestream;
+
+public enum Timestream2ClientType {
+ write,
+ query
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Component.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Component.java
new file mode 100644
index 00000000000..8162dd7d837
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Component.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.timestream;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.component.aws2.timestream.query.Timestream2QueryEndpoint;
+import org.apache.camel.component.aws2.timestream.write.Timestream2WriteEndpoint;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.annotations.Component;
+import org.apache.camel.support.HealthCheckComponent;
+
+@Component(value = "aws2-timestream")
+public class Timestream2Component extends HealthCheckComponent {
+
+ @Metadata
+ private Timestream2Configuration configuration = new Timestream2Configuration();
+
+ public Timestream2Component() {
+ this(null);
+ }
+
+ public Timestream2Component(CamelContext context) {
+ super(context);
+ }
+
+ @Override
+ protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+ Timestream2Configuration configuration
+ = this.configuration != null ? this.configuration.copy() : new Timestream2Configuration();
+
+ if (remaining.trim().length() != 0) {
+ String[] uriPath = remaining.split(":");
+ Timestream2ClientType timestream2ClientType = Timestream2ClientType.valueOf(uriPath[0]);
+ if (Timestream2ClientType.write.equals(timestream2ClientType)) {
+ Timestream2WriteEndpoint timestream2WriteEndpoint = new Timestream2WriteEndpoint(uri, this, configuration);
+ setProperties(timestream2WriteEndpoint, parameters);
+ if (Boolean.FALSE.equals(configuration.isUseDefaultCredentialsProvider())
+ && Boolean.FALSE.equals(configuration.isUseProfileCredentialsProvider())
+ && configuration.getAwsTimestreamWriteClient() == null
+ && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
+ throw new IllegalArgumentException(
+ "useDefaultCredentialsProvider is set to false, useProfileCredentialsProvider is set to false, Amazon Timestream Write client or accessKey and secretKey must be specified");
+ }
+ return timestream2WriteEndpoint;
+ } else if (Timestream2ClientType.query.equals(timestream2ClientType)) {
+ Timestream2QueryEndpoint timestream2QueryEndpoint = new Timestream2QueryEndpoint(uri, this, configuration);
+ setProperties(timestream2QueryEndpoint, parameters);
+ if (Boolean.FALSE.equals(configuration.isUseDefaultCredentialsProvider())
+ && Boolean.FALSE.equals(configuration.isUseProfileCredentialsProvider())
+ && configuration.getAwsTimestreamQueryClient() == null
+ && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
+ throw new IllegalArgumentException(
+ "useDefaultCredentialsProvider is set to false, useProfileCredentialsProvider is set to false, Amazon Timestream Query client or accessKey and secretKey must be specified");
+ }
+ return timestream2QueryEndpoint;
+ } else {
+ throw new IllegalArgumentException("Invalid Endpoint Type. It should be either write or query");
+ }
+ } else {
+ throw new IllegalArgumentException("Type of Endpoint is missing from uri, it should be either write or query");
+ }
+
+ }
+
+ public Timestream2Configuration getConfiguration() {
+ return configuration;
+ }
+
+ /**
+ * Component configuration
+ */
+ public void setConfiguration(Timestream2Configuration configuration) {
+ this.configuration = configuration;
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Configuration.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Configuration.java
new file mode 100644
index 00000000000..e8253997ae4
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Configuration.java
@@ -0,0 +1,272 @@
+/*
+ * 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.timestream;
+
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
+import software.amazon.awssdk.core.Protocol;
+import software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient;
+import software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient;
+
+@UriParams
+public class Timestream2Configuration implements Cloneable {
+
+ @UriPath(description = "Type of client - write/query")
+ @Metadata(required = true)
+ private Timestream2ClientType clientType;
+ @UriPath(description = "Logical name")
+ @Metadata(required = true)
+ private String label;
+ @UriParam
+ @Metadata(required = true)
+ private Timestream2Operations operation;
+ @UriParam(label = "security", secret = true)
+ private String accessKey;
+ @UriParam(label = "security", secret = true)
+ private String secretKey;
+ @UriParam
+ private String region;
+ @UriParam(label = "proxy", enums = "HTTP,HTTPS", defaultValue = "HTTPS")
+ private Protocol proxyProtocol = Protocol.HTTPS;
+ @UriParam(label = "proxy")
+ private String proxyHost;
+ @UriParam(label = "proxy")
+ private Integer proxyPort;
+ @UriParam(label = "advanced")
+ @Metadata(autowired = true)
+ private TimestreamWriteClient awsTimestreamWriteClient;
+ @UriParam(label = "advanced")
+ @Metadata(autowired = true)
+ private TimestreamQueryClient awsTimestreamQueryClient;
+ @UriParam(defaultValue = "false")
+ private boolean pojoRequest;
+ @UriParam(defaultValue = "false")
+ private boolean trustAllCertificates;
+ @UriParam(defaultValue = "false")
+ private boolean overrideEndpoint;
+ @UriParam
+ private String uriEndpointOverride;
+ @UriParam(defaultValue = "false")
+ private boolean useDefaultCredentialsProvider;
+ @UriParam(defaultValue = "false")
+ private boolean useProfileCredentialsProvider;
+ @UriParam
+ private String profileCredentialsName;
+
+ public Timestream2ClientType getClientType() {
+ return clientType;
+ }
+
+ public TimestreamWriteClient getAwsTimestreamWriteClient() {
+ return awsTimestreamWriteClient;
+ }
+
+ /**
+ * To use a existing configured AwsTimestreamWriteClient as client
+ */
+ public void setAwsTimestreamWriteClient(TimestreamWriteClient awsTimestreamWriteClient) {
+ this.awsTimestreamWriteClient = awsTimestreamWriteClient;
+ }
+
+ public TimestreamQueryClient getAwsTimestreamQueryClient() {
+ return awsTimestreamQueryClient;
+ }
+
+ /**
+ * To use a existing configured AwsTimestreamQueryClient as client
+ */
+ public void setAwsTimestreamQueryClient(TimestreamQueryClient awsTimestreamQueryClient) {
+ this.awsTimestreamQueryClient = awsTimestreamQueryClient;
+ }
+
+ public String getAccessKey() {
+ return accessKey;
+ }
+
+ /**
+ * Amazon AWS Access Key
+ */
+ public void setAccessKey(String accessKey) {
+ this.accessKey = accessKey;
+ }
+
+ public String getSecretKey() {
+ return secretKey;
+ }
+
+ /**
+ * Amazon AWS Secret Key
+ */
+ public void setSecretKey(String secretKey) {
+ this.secretKey = secretKey;
+ }
+
+ public String getRegion() {
+ return region;
+ }
+
+ /**
+ * The region in which Timestream 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()
+ */
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public Timestream2Operations getOperation() {
+ return operation;
+ }
+
+ /**
+ * The operation to perform. It can be describeEndpoints,createBatchLoadTask,describeBatchLoadTask,
+ * resumeBatchLoadTask,listBatchLoadTasks,createDatabase,deleteDatabase,describeDatabase,updateDatabase,
+ * listDatabases,createTable,deleteTable,describeTable,updateTable,listTables,writeRecords,
+ * createScheduledQuery,deleteScheduledQuery,executeScheduledQuery,updateScheduledQuery,
+ * describeScheduledQuery,listScheduledQueries,prepareQuery,query,cancelQuery
+ */
+ public void setOperation(Timestream2Operations operation) {
+ this.operation = operation;
+ }
+
+ public Protocol getProxyProtocol() {
+ return proxyProtocol;
+ }
+
+ /**
+ * To define a proxy protocol when instantiating the Timestream client
+ */
+ public void setProxyProtocol(Protocol proxyProtocol) {
+ this.proxyProtocol = proxyProtocol;
+ }
+
+ public String getProxyHost() {
+ return proxyHost;
+ }
+
+ /**
+ * To define a proxy host when instantiating the Timestream client
+ */
+ public void setProxyHost(String proxyHost) {
+ this.proxyHost = proxyHost;
+ }
+
+ public Integer getProxyPort() {
+ return proxyPort;
+ }
+
+ /**
+ * To define a proxy port when instantiating the Timestream client
+ */
+ public void setProxyPort(Integer proxyPort) {
+ this.proxyPort = proxyPort;
+ }
+
+ public boolean isPojoRequest() {
+ return pojoRequest;
+ }
+
+ /**
+ * If we want to use a POJO request as body or not
+ */
+ public void setPojoRequest(boolean pojoRequest) {
+ this.pojoRequest = pojoRequest;
+ }
+
+ public boolean isTrustAllCertificates() {
+ return trustAllCertificates;
+ }
+
+ /**
+ * If we want to trust all certificates in case of overriding the endpoint
+ */
+ public void setTrustAllCertificates(boolean trustAllCertificates) {
+ this.trustAllCertificates = trustAllCertificates;
+ }
+
+ public boolean isOverrideEndpoint() {
+ return overrideEndpoint;
+ }
+
+ /**
+ * Set the need for overidding the endpoint. This option needs to be used in combination with uriEndpointOverride
+ * option
+ */
+ public void setOverrideEndpoint(boolean overrideEndpoint) {
+ this.overrideEndpoint = overrideEndpoint;
+ }
+
+ public String getUriEndpointOverride() {
+ return uriEndpointOverride;
+ }
+
+ /**
+ * Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option
+ */
+ public void setUriEndpointOverride(String uriEndpointOverride) {
+ this.uriEndpointOverride = uriEndpointOverride;
+ }
+
+ /**
+ * Set whether the Timestream client should expect to load credentials through a default credentials provider or to
+ * expect static credentials to be passed in.
+ */
+ public void setUseDefaultCredentialsProvider(Boolean useDefaultCredentialsProvider) {
+ this.useDefaultCredentialsProvider = useDefaultCredentialsProvider;
+ }
+
+ public Boolean isUseDefaultCredentialsProvider() {
+ return useDefaultCredentialsProvider;
+ }
+
+ public boolean isUseProfileCredentialsProvider() {
+ return useProfileCredentialsProvider;
+ }
+
+ /**
+ * Set whether the Timestream client should expect to load credentials through a profile credentials provider.
+ */
+ public void setUseProfileCredentialsProvider(boolean useProfileCredentialsProvider) {
+ this.useProfileCredentialsProvider = useProfileCredentialsProvider;
+ }
+
+ public String getProfileCredentialsName() {
+ return profileCredentialsName;
+ }
+
+ /**
+ * If using a profile credentials provider this parameter will set the profile name
+ */
+ public void setProfileCredentialsName(String profileCredentialsName) {
+ this.profileCredentialsName = profileCredentialsName;
+ }
+
+ // *************************************************
+ //
+ // *************************************************
+
+ public Timestream2Configuration copy() {
+ try {
+ return (Timestream2Configuration) super.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new RuntimeCamelException(e);
+ }
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Constants.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Constants.java
new file mode 100644
index 00000000000..859dae6c299
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Constants.java
@@ -0,0 +1,110 @@
+/*
+ * 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.timestream;
+
+import org.apache.camel.spi.Metadata;
+
+public interface Timestream2Constants {
+
+ @Metadata(description = "The operation we want to perform", javaType = "String")
+ String OPERATION = "CamelAwsTimestreamOperation";
+ @Metadata(description = "Represents a time-series data point being written into Timestream",
+ javaType = "software.amazon.awssdk.services.timestreamwrite.model.Record")
+ String RECORD = "CamelAwsTimestreamRecord";
+ @Metadata(description = "List of Records", javaType = "List")
+ String RECORD_LIST = "CamelAwsTimestreamRecordList";
+ @Metadata(description = "Status of Batch Load Task", javaType = "String")
+ String TASK_STATUS = "CamelAwsTimestreamTaskStatus";
+ @Metadata(description = "The ID of the batch load task to resume.", javaType = "String")
+ String TASK_ID = "CamelAwsTimestreamTaskId";
+ @Metadata(description = "Name of Database", javaType = "String")
+ String DATABASE_NAME = "CamelAwsTimestreamDatabaseName";
+ @Metadata(description = "Name of Table", javaType = "String")
+ String TABLE_NAME = "CamelAwsTimestreamTableName";
+ @Metadata(description = "Name of Target Database", javaType = "String")
+ String TARGET_DATABASE_NAME = "CamelAwsTimestreamTargetDatabaseName";
+ @Metadata(description = "Name of Target Table", javaType = "String")
+ String TARGET_TABLE_NAME = "CamelAwsTimestreamTargetTableName";
+ @Metadata(description = "Record version", javaType = "String")
+ String RECORD_VERSION = "CamelAwsTimestreamRecordVersion";
+ @Metadata(description = "Configuration of Data Model",
+ javaType = "software.amazon.awssdk.services.timestreamwrite.model.DataModelConfiguration")
+ String DATA_MODEL_CONFIGURATION = "CamelAwsTimestreamDataModelConfiguration";
+ @Metadata(description = "Configuration of Data Source",
+ javaType = "software.amazon.awssdk.services.timestreamwrite.model.DataSourceConfiguration")
+ String DATA_SOURCE_CONFIGURATION = "CamelAwsTimestreamDataSourceConfiguration";
+ @Metadata(description = "Reporting Configuration",
+ javaType = "software.amazon.awssdk.services.timestreamwrite.model.ReportConfiguration")
+ String REPORT_CONFIGURATION = "CamelAwsTimestreamReportConfiguration";
+ @Metadata(description = "Timestream Table Schema",
+ javaType = "software.amazon.awssdk.services.timestreamwrite.model.Schema")
+ String SCHEMA = "CamelAwsTimestreamTableSchema";
+ @Metadata(description = "Timestream Table Retention Properties",
+ javaType = "software.amazon.awssdk.services.timestreamwrite.model.RetentionProperties")
+ String RETENTION_PROPERTIES = "CamelAwsTimestreamRetentionProperties";
+ @Metadata(description = "Timestream Table Magentic Store Write properties",
+ javaType = "software.amazon.awssdk.services.timestreamwrite.model.MagneticStoreWriteProperties")
+ String MAGNETIC_STORE_WRITE_PROPERTIES = "CamelAwsTimestreamMagneticStoreWriteProperties";
+ @Metadata(description = "Name of Time column", javaType = "String")
+ String TIME_COLUMN = "CamelAwsTimestreamTimeColumn";
+ @Metadata(description = "Name of the measure column.", javaType = "String")
+ String MEASURE_NAME_COLUMN = "CamelAwsTimestreamMeasureColumnName";
+ @Metadata(description = "This is to allow mapping column(s) from the query result to the dimension in the destination table.",
+ javaType = "List")
+ String DIMENSION_MAPPING_LIST = "CamelAwsTimestreamDimensionMappingList";
+ @Metadata(description = "Multi-measure mappings.",
+ javaType = "software.amazon.awssdk.services.timestreamquery.model.MultiMeasureMappings")
+ String MULTI_MEASURE_MAPPINGS = "CamelAwsTimestreamMultiMeasureMappings";
+ @Metadata(description = "Specifies how to map measures to multi-measure records.", javaType = "List")
+ String MIXED_MEASURE_MAPPING_LIST = "CamelAwsTimestreamMixedMeasureMappingList";
+ @Metadata(description = "Name of scheduled query", javaType = "String")
+ String SCHEDULED_QUERY_NAME = "CamelAwsTimestreamScheduledQueryName";
+ @Metadata(description = "Arn of scheduled query", javaType = "String")
+ String SCHEDULED_QUERY_ARN = "CamelAwsTimestreamScheduledQueryArn";
+ @Metadata(description = "State of scheduled query", javaType = "String")
+ String SCHEDULED_QUERY_STATE = "CamelAwsTimestreamScheduledQueryState";
+ @Metadata(description = "Invocation Time for scheduled query execution", javaType = "Instant")
+ String SCHEDULED_QUERY_INVOCATION_TIME = "CamelAwsTimestreamScheduledQueryInvocationTime";
+ @Metadata(description = "The query string to run.", javaType = "String")
+ String QUERY_STRING = "CamelAwsTimestreamQueryString";
+ @Metadata(description = "ID of query.", javaType = "String")
+ String QUERY_ID = "CamelAwsTimestreamQueryId";
+ @Metadata(description = "Validates the prepared query, but does not store for later execution", javaType = "Boolean")
+ String QUERY_VALIDATE_ONLY = "CamelAwsTimestreamQueryValidateOnly";
+ @Metadata(description = "The total number of rows to be returned in the Query output.", javaType = "Integer")
+ String QUERY_MAX_ROWS = "CamelAwsTimestreamQueryMaxRows";
+ @Metadata(description = "Max Results to be returned in output", javaType = "Integer")
+ String MAX_RESULTS = "CamelAwsTimestreamMaxResults";
+ @Metadata(description = "The schedule expression for the query.", javaType = "String")
+ String SCHEDULE_EXPRESSION = "CamelAwsTimestreamScheduleExpression";
+ @Metadata(description = "Notification Topic Arn for the scheduled query.", javaType = "String")
+ String NOTIFICATION_TOPIC_ARN = "CamelAwsTimestreamNotificationTopicArn";
+ @Metadata(description = "S3 Bucket name for error reporting.", javaType = "String")
+ String ERROR_REPORT_S3_BUCKET_NAME = "CamelAwsTimestreamErrorReportS3BucketName";
+ @Metadata(description = "S3 object key prefix for error reporting.", javaType = "String")
+ String ERROR_REPORT_S3_OBJECT_KEY_PREFIX = "CamelAwsTimestreamErrorReportS3ObjectKeyPrefix";
+ @Metadata(description = "S3 encryption option for error reporting.", javaType = "String")
+ String ERROR_REPORT_S3_ENCRYPTION_OPTION = "CamelAwsTimestreamErrorReportS3EncryptionOption";
+ @Metadata(description = "he ARN for the IAM role that Timestream will assume when running the scheduled query.",
+ javaType = "String")
+ String SCHEDULED_QUERY_EXECUTION_ROLE_ARN = "CamelAwsTimestreamScheduledQueryExecutionRoleArn";
+ @Metadata(description = "Using a ClientToken makes the call to CreateScheduledQuery idempotent", javaType = "String")
+ String CLIENT_TOKEN = "CamelAwsTimestreamClientToken";
+ @Metadata(description = "The Amazon KMS key used to encrypt the scheduled query resource, at-rest.", javaType = "String")
+ String KMS_KEY_ID = "CamelAwsTimestreamKmsKeyId";
+
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Operations.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Operations.java
new file mode 100644
index 00000000000..03eb574db15
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/Timestream2Operations.java
@@ -0,0 +1,51 @@
+/*
+ * 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.timestream;
+
+public enum Timestream2Operations {
+
+ /** Describes Endpoints available for Write or Query **/
+ describeEndpoints,
+
+ /** Write Operations **/
+ createBatchLoadTask,
+ describeBatchLoadTask,
+ resumeBatchLoadTask,
+ listBatchLoadTasks,
+ createDatabase,
+ deleteDatabase,
+ describeDatabase,
+ updateDatabase,
+ listDatabases,
+ createTable,
+ deleteTable,
+ describeTable,
+ updateTable,
+ listTables,
+ writeRecords,
+
+ /** Query Operations **/
+ createScheduledQuery,
+ deleteScheduledQuery,
+ executeScheduledQuery,
+ updateScheduledQuery,
+ describeScheduledQuery,
+ listScheduledQueries,
+ prepareQuery,
+ query,
+ cancelQuery
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/client/Timestream2ClientFactory.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/client/Timestream2ClientFactory.java
new file mode 100644
index 00000000000..a62fccd976a
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/client/Timestream2ClientFactory.java
@@ -0,0 +1,42 @@
+/*
+ * 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.timestream.client;
+
+import org.apache.camel.component.aws2.timestream.Timestream2Configuration;
+import org.apache.camel.component.aws2.timestream.client.impl.Timestream2ClientIAMOptimizedImpl;
+import org.apache.camel.component.aws2.timestream.client.impl.Timestream2ClientStandardImpl;
+
+/**
+ * Factory class to return the correct type of AWS Timestream client.
+ */
+public final class Timestream2ClientFactory {
+
+ private Timestream2ClientFactory() {
+ }
+
+ /**
+ * Return the correct AWS Timestream client (based on remote vs local).
+ *
+ * @param configuration configuration
+ * @return Timestream
+ */
+ public static Timestream2InternalClient getTimestreamClient(Timestream2Configuration configuration) {
+ return Boolean.TRUE.equals(configuration.isUseDefaultCredentialsProvider())
+ ? new Timestream2ClientIAMOptimizedImpl(configuration) : new Timestream2ClientStandardImpl(configuration);
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/client/Timestream2InternalClient.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/client/Timestream2InternalClient.java
new file mode 100644
index 00000000000..6eeceb0df7b
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/client/Timestream2InternalClient.java
@@ -0,0 +1,41 @@
+/*
+ * 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.timestream.client;
+
+import software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient;
+import software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient;
+
+/**
+ * Manage the required actions of an Timestream client for either local or remote.
+ */
+public interface Timestream2InternalClient {
+
+ /**
+ * Returns an TimestreamWrite client after a factory method determines which one to return.
+ *
+ * @return TimestreamWriteClient TimestreamWriteClient
+ */
+ TimestreamWriteClient getTimestreamWriteClient();
+
+ /**
+ * Returns an TimestreamQuery client after a factory method determines which one to return.
+ *
+ * @return TimestreamQueryClient TimestreamQueryClient
+ */
+ TimestreamQueryClient getTimestreamQueryClient();
+
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/client/impl/Timestream2ClientIAMOptimizedImpl.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/client/impl/Timestream2ClientIAMOptimizedImpl.java
new file mode 100644
index 00000000000..39f9789f09d
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/client/impl/Timestream2ClientIAMOptimizedImpl.java
@@ -0,0 +1,129 @@
+/*
+ * 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.timestream.client.impl;
+
+import java.net.URI;
+
+import org.apache.camel.component.aws2.timestream.Timestream2Configuration;
+import org.apache.camel.component.aws2.timestream.client.Timestream2InternalClient;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.http.SdkHttpClient;
+import software.amazon.awssdk.http.SdkHttpConfigurationOption;
+import software.amazon.awssdk.http.apache.ApacheHttpClient;
+import software.amazon.awssdk.http.apache.ProxyConfiguration;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient;
+import software.amazon.awssdk.services.timestreamquery.TimestreamQueryClientBuilder;
+import software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient;
+import software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClientBuilder;
+import software.amazon.awssdk.utils.AttributeMap;
+
+/**
+ * Manage an AWS Timestream client for all users to use (enabling temporary creds). This implementation is for remote
+ * instances to manage the credentials on their own (eliminating credential rotations)
+ */
+public class Timestream2ClientIAMOptimizedImpl implements Timestream2InternalClient {
+
+ private static final Logger LOG = LoggerFactory.getLogger(Timestream2ClientIAMOptimizedImpl.class);
+ private Timestream2Configuration configuration;
+
+ /**
+ * Constructor that uses the config file.
+ */
+ public Timestream2ClientIAMOptimizedImpl(Timestream2Configuration configuration) {
+ LOG.trace("Creating an AWS Timestream client for an ec2 instance with IAM temporary credentials (normal for ec2s).");
+ this.configuration = configuration;
+ }
+
+ /**
+ * Getting the TimestreamWrite aws client that is used.
+ *
+ * @return TimestreamWriteClient.
+ */
+ @Override
+ public TimestreamWriteClient getTimestreamWriteClient() {
+ TimestreamWriteClient client = null;
+ TimestreamWriteClientBuilder clientBuilder = TimestreamWriteClient.builder();
+ ProxyConfiguration.Builder proxyConfig = null;
+ ApacheHttpClient.Builder httpClientBuilder = null;
+ if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
+ proxyConfig = ProxyConfiguration.builder();
+ URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + "://" + configuration.getProxyHost() + ":"
+ + configuration.getProxyPort());
+ proxyConfig.endpoint(proxyEndpoint);
+ httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
+ clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder);
+ }
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ clientBuilder = clientBuilder.region(Region.of(configuration.getRegion()));
+ }
+ if (configuration.isOverrideEndpoint()) {
+ clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
+ }
+ if (configuration.isTrustAllCertificates()) {
+ SdkHttpClient ahc = ApacheHttpClient.builder().buildWithDefaults(AttributeMap
+ .builder()
+ .put(
+ SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES,
+ Boolean.TRUE)
+ .build());
+ clientBuilder.httpClient(ahc);
+ }
+ client = clientBuilder.build();
+ return client;
+ }
+
+ /**
+ * Getting the TimestreamQuery aws client that is used.
+ *
+ * @return TimestreamQueryClient.
+ */
+ @Override
+ public TimestreamQueryClient getTimestreamQueryClient() {
+ TimestreamQueryClient client = null;
+ TimestreamQueryClientBuilder clientBuilder = TimestreamQueryClient.builder();
+ ProxyConfiguration.Builder proxyConfig = null;
+ ApacheHttpClient.Builder httpClientBuilder = null;
+ if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
+ proxyConfig = ProxyConfiguration.builder();
+ URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + "://" + configuration.getProxyHost() + ":"
+ + configuration.getProxyPort());
+ proxyConfig.endpoint(proxyEndpoint);
+ httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
+ clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder);
+ }
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ clientBuilder = clientBuilder.region(Region.of(configuration.getRegion()));
+ }
+ if (configuration.isOverrideEndpoint()) {
+ clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
+ }
+ if (configuration.isTrustAllCertificates()) {
+ SdkHttpClient ahc = ApacheHttpClient.builder().buildWithDefaults(AttributeMap
+ .builder()
+ .put(
+ SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES,
+ Boolean.TRUE)
+ .build());
+ clientBuilder.httpClient(ahc);
+ }
+ client = clientBuilder.build();
+ return client;
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/client/impl/Timestream2ClientStandardImpl.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/client/impl/Timestream2ClientStandardImpl.java
new file mode 100644
index 00000000000..8318a1917e7
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/client/impl/Timestream2ClientStandardImpl.java
@@ -0,0 +1,158 @@
+/*
+ * 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.timestream.client.impl;
+
+import java.net.URI;
+
+import org.apache.camel.component.aws2.timestream.Timestream2Configuration;
+import org.apache.camel.component.aws2.timestream.client.Timestream2InternalClient;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
+import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
+import software.amazon.awssdk.http.SdkHttpClient;
+import software.amazon.awssdk.http.SdkHttpConfigurationOption;
+import software.amazon.awssdk.http.apache.ApacheHttpClient;
+import software.amazon.awssdk.http.apache.ProxyConfiguration;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient;
+import software.amazon.awssdk.services.timestreamquery.TimestreamQueryClientBuilder;
+import software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient;
+import software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClientBuilder;
+import software.amazon.awssdk.utils.AttributeMap;
+
+/**
+ * Manage an AWS Timestream client for all users to use. This implementation is for local instances to use a static and
+ * solid credential set.
+ */
+public class Timestream2ClientStandardImpl implements Timestream2InternalClient {
+ private static final Logger LOG = LoggerFactory.getLogger(Timestream2ClientStandardImpl.class);
+ private Timestream2Configuration configuration;
+
+ /**
+ * Constructor that uses the config file.
+ */
+ public Timestream2ClientStandardImpl(Timestream2Configuration configuration) {
+ LOG.trace("Creating an AWS Timestream manager using static credentials.");
+ this.configuration = configuration;
+ }
+
+ /**
+ * Getting the TimestreamWrite AWS client that is used.
+ *
+ * @return Amazon TimestreamWrite Client.
+ */
+ @Override
+ public TimestreamWriteClient getTimestreamWriteClient() {
+ TimestreamWriteClient client = null;
+ TimestreamWriteClientBuilder clientBuilder = TimestreamWriteClient.builder();
+ ProxyConfiguration.Builder proxyConfig = null;
+ ApacheHttpClient.Builder httpClientBuilder = null;
+ boolean isClientConfigFound = false;
+ if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
+ proxyConfig = ProxyConfiguration.builder();
+ URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + "://" + configuration.getProxyHost() + ":"
+ + configuration.getProxyPort());
+ proxyConfig.endpoint(proxyEndpoint);
+ httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
+ isClientConfigFound = true;
+ }
+ if (configuration.getAccessKey() != null && configuration.getSecretKey() != null) {
+ AwsBasicCredentials cred = AwsBasicCredentials.create(configuration.getAccessKey(), configuration.getSecretKey());
+ if (isClientConfigFound) {
+ clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder)
+ .credentialsProvider(StaticCredentialsProvider.create(cred));
+ } else {
+ clientBuilder = clientBuilder.credentialsProvider(StaticCredentialsProvider.create(cred));
+ }
+ } else {
+ if (!isClientConfigFound) {
+ clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder);
+ }
+ }
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ clientBuilder = clientBuilder.region(Region.of(configuration.getRegion()));
+ }
+ if (configuration.isOverrideEndpoint()) {
+ clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
+ }
+ if (configuration.isTrustAllCertificates()) {
+ SdkHttpClient ahc = ApacheHttpClient.builder().buildWithDefaults(AttributeMap
+ .builder()
+ .put(
+ SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES,
+ Boolean.TRUE)
+ .build());
+ clientBuilder.httpClient(ahc);
+ }
+ client = clientBuilder.build();
+ return client;
+ }
+
+ /**
+ * Getting the TimestreamQuery AWS client that is used.
+ *
+ * @return Amazon TimestreamQuery Client.
+ */
+ @Override
+ public TimestreamQueryClient getTimestreamQueryClient() {
+ TimestreamQueryClient client = null;
+ TimestreamQueryClientBuilder clientBuilder = TimestreamQueryClient.builder();
+ ProxyConfiguration.Builder proxyConfig = null;
+ ApacheHttpClient.Builder httpClientBuilder = null;
+ boolean isClientConfigFound = false;
+ if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
+ proxyConfig = ProxyConfiguration.builder();
+ URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + "://" + configuration.getProxyHost() + ":"
+ + configuration.getProxyPort());
+ proxyConfig.endpoint(proxyEndpoint);
+ httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
+ isClientConfigFound = true;
+ }
+ if (configuration.getAccessKey() != null && configuration.getSecretKey() != null) {
+ AwsBasicCredentials cred = AwsBasicCredentials.create(configuration.getAccessKey(), configuration.getSecretKey());
+ if (isClientConfigFound) {
+ clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder)
+ .credentialsProvider(StaticCredentialsProvider.create(cred));
+ } else {
+ clientBuilder = clientBuilder.credentialsProvider(StaticCredentialsProvider.create(cred));
+ }
+ } else {
+ if (!isClientConfigFound) {
+ clientBuilder = clientBuilder.httpClientBuilder(httpClientBuilder);
+ }
+ }
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ clientBuilder = clientBuilder.region(Region.of(configuration.getRegion()));
+ }
+ if (configuration.isOverrideEndpoint()) {
+ clientBuilder.endpointOverride(URI.create(configuration.getUriEndpointOverride()));
+ }
+ if (configuration.isTrustAllCertificates()) {
+ SdkHttpClient ahc = ApacheHttpClient.builder().buildWithDefaults(AttributeMap
+ .builder()
+ .put(
+ SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES,
+ Boolean.TRUE)
+ .build());
+ clientBuilder.httpClient(ahc);
+ }
+ client = clientBuilder.build();
+ return client;
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryEndpoint.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryEndpoint.java
new file mode 100644
index 00000000000..c31b15ef220
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryEndpoint.java
@@ -0,0 +1,71 @@
+/*
+ * 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.timestream.query;
+
+import org.apache.camel.*;
+import org.apache.camel.component.aws2.timestream.Timestream2AbstractEndpoint;
+import org.apache.camel.component.aws2.timestream.Timestream2Configuration;
+import org.apache.camel.component.aws2.timestream.client.Timestream2ClientFactory;
+import org.apache.camel.util.ObjectHelper;
+import software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient;
+
+/**
+ * Manage and invoke AWS Timestream.
+ */
+public class Timestream2QueryEndpoint extends Timestream2AbstractEndpoint {
+
+ /** AWS TimestreamQueryClient for TimestreamQuery Endpoint **/
+ private TimestreamQueryClient awsTimestreamQueryClient;
+
+ public Timestream2QueryEndpoint(String uri, Component component, Timestream2Configuration configuration) {
+ super(uri, component, configuration);
+ }
+
+ @Override
+ public Consumer createConsumer(Processor processor) throws Exception {
+ throw new UnsupportedOperationException("You cannot receive messages from this endpoint");
+ }
+
+ @Override
+ public Producer createProducer() throws Exception {
+ return new Timestream2QueryProducer(this);
+ }
+
+ @Override
+ public void doStart() throws Exception {
+ super.doStart();
+ awsTimestreamQueryClient = getConfiguration().getAwsTimestreamQueryClient() != null
+ ? getConfiguration().getAwsTimestreamQueryClient()
+ : Timestream2ClientFactory.getTimestreamClient(getConfiguration()).getTimestreamQueryClient();
+ }
+
+ @Override
+ public void doStop() throws Exception {
+
+ if (ObjectHelper.isEmpty(getConfiguration().getAwsTimestreamQueryClient())) {
+ if (awsTimestreamQueryClient != null) {
+ awsTimestreamQueryClient.close();
+ }
+ }
+ super.doStop();
+ }
+
+ public TimestreamQueryClient getAwsTimestreamQueryClient() {
+ return awsTimestreamQueryClient;
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducer.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducer.java
new file mode 100644
index 00000000000..0ae079fa166
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducer.java
@@ -0,0 +1,584 @@
+/*
+ * 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.timestream.query;
+
+import java.time.Instant;
+import java.util.List;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.InvalidPayloadException;
+import org.apache.camel.Message;
+import org.apache.camel.component.aws2.timestream.Timestream2Configuration;
+import org.apache.camel.component.aws2.timestream.Timestream2Constants;
+import org.apache.camel.component.aws2.timestream.Timestream2Operations;
+import org.apache.camel.health.HealthCheck;
+import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.health.WritableHealthCheckRepository;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.util.URISupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.awscore.exception.AwsServiceException;
+import software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient;
+import software.amazon.awssdk.services.timestreamquery.model.*;
+
+/**
+ * A Producer which sends messages to the Amazon Web Service Timestream <a href="https://aws.amazon.com/timestream/">AWS
+ * Timestream</a>
+ */
+public class Timestream2QueryProducer extends DefaultProducer {
+
+ private static final Logger LOG = LoggerFactory.getLogger(Timestream2QueryProducer.class);
+
+ private transient String timestreamQueryProducerToString;
+
+ private HealthCheck producerHealthCheck;
+ private WritableHealthCheckRepository healthCheckRepository;
+
+ public Timestream2QueryProducer(final Endpoint endpoint) {
+ super(endpoint);
+ }
+
+ @Override
+ public void process(final Exchange exchange) throws Exception {
+ switch (determineOperation(exchange)) {
+ case describeEndpoints -> describeEndpoints(getEndpoint().getAwsTimestreamQueryClient(), exchange);
+ case createScheduledQuery -> createScheduledQuery(getEndpoint().getAwsTimestreamQueryClient(), exchange);
+ case deleteScheduledQuery -> deleteScheduledQuery(getEndpoint().getAwsTimestreamQueryClient(), exchange);
+ case executeScheduledQuery -> executeScheduledQuery(getEndpoint().getAwsTimestreamQueryClient(), exchange);
+ case updateScheduledQuery -> updateScheduledQuery(getEndpoint().getAwsTimestreamQueryClient(), exchange);
+ case describeScheduledQuery -> describeScheduledQuery(getEndpoint().getAwsTimestreamQueryClient(), exchange);
+ case listScheduledQueries -> listScheduledQueries(getEndpoint().getAwsTimestreamQueryClient(), exchange);
+ case prepareQuery -> prepareQuery(getEndpoint().getAwsTimestreamQueryClient(), exchange);
+ case query -> query(getEndpoint().getAwsTimestreamQueryClient(), exchange);
+ case cancelQuery -> cancelQuery(getEndpoint().getAwsTimestreamQueryClient(), exchange);
+ default -> throw new IllegalArgumentException("Unsupported operation");
+ }
+ }
+
+ private Timestream2Operations determineOperation(Exchange exchange) {
+ Timestream2Operations operation
+ = exchange.getIn().getHeader(Timestream2Constants.OPERATION, Timestream2Operations.class);
+ if (operation == null) {
+ operation = getConfiguration().getOperation();
+ }
+ return operation;
+ }
+
+ protected Timestream2Configuration getConfiguration() {
+ return getEndpoint().getConfiguration();
+ }
+
+ @Override
+ public String toString() {
+ if (timestreamQueryProducerToString == null) {
+ timestreamQueryProducerToString
+ = "TimestreamQueryProducer[" + URISupport.sanitizeUri(getEndpoint().getEndpointUri()) + "]";
+ }
+ return timestreamQueryProducerToString;
+ }
+
+ @Override
+ public Timestream2QueryEndpoint getEndpoint() {
+ return (Timestream2QueryEndpoint) super.getEndpoint();
+ }
+
+ private void describeEndpoints(TimestreamQueryClient timestreamQueryClient, Exchange exchange)
+ throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DescribeEndpointsRequest request) {
+ DescribeEndpointsResponse result;
+ try {
+ result = timestreamQueryClient.describeEndpoints(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Endpoints command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DescribeEndpointsRequest.Builder builder = DescribeEndpointsRequest.builder();
+
+ DescribeEndpointsResponse result;
+ try {
+ result = timestreamQueryClient.describeEndpoints(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Endpoints command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void createScheduledQuery(TimestreamQueryClient timestreamQueryClient, Exchange exchange)
+ throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof CreateScheduledQueryRequest request) {
+ CreateScheduledQueryResponse result;
+ try {
+ result = timestreamQueryClient.createScheduledQuery(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Create Scheduled Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ CreateScheduledQueryRequest.Builder builder = CreateScheduledQueryRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_NAME))) {
+ String name = exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_NAME, String.class);
+ builder.name(name);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.QUERY_STRING))) {
+ String queryString = exchange.getIn().getHeader(Timestream2Constants.QUERY_STRING, String.class);
+ builder.queryString(queryString);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.SCHEDULE_EXPRESSION))) {
+ String scheduleExp = exchange.getIn().getHeader(Timestream2Constants.SCHEDULE_EXPRESSION, String.class);
+ builder.scheduleConfiguration(ScheduleConfiguration.builder().scheduleExpression(scheduleExp).build());
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.NOTIFICATION_TOPIC_ARN))) {
+ String topicArn = exchange.getIn().getHeader(Timestream2Constants.NOTIFICATION_TOPIC_ARN, String.class);
+ SnsConfiguration snsConfiguration = SnsConfiguration.builder().topicArn(topicArn).build();
+ builder.notificationConfiguration(
+ NotificationConfiguration.builder().snsConfiguration(snsConfiguration).build());
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.KMS_KEY_ID))) {
+ String kmsKeyId = exchange.getIn().getHeader(Timestream2Constants.KMS_KEY_ID, String.class);
+ builder.kmsKeyId(kmsKeyId);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.CLIENT_TOKEN))) {
+ String clientToken = exchange.getIn().getHeader(Timestream2Constants.CLIENT_TOKEN, String.class);
+ builder.clientToken(clientToken);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_EXECUTION_ROLE_ARN))) {
+ String roleArn
+ = exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_EXECUTION_ROLE_ARN, String.class);
+ builder.scheduledQueryExecutionRoleArn(roleArn);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.ERROR_REPORT_S3_BUCKET_NAME))) {
+ String s3BucketName
+ = exchange.getIn().getHeader(Timestream2Constants.ERROR_REPORT_S3_BUCKET_NAME, String.class);
+ S3Configuration.Builder s3Configuration = S3Configuration.builder().bucketName(s3BucketName);
+ if (ObjectHelper
+ .isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.ERROR_REPORT_S3_OBJECT_KEY_PREFIX))) {
+ String objectKeyPrefix
+ = exchange.getIn().getHeader(Timestream2Constants.ERROR_REPORT_S3_OBJECT_KEY_PREFIX, String.class);
+ s3Configuration.objectKeyPrefix(objectKeyPrefix);
+ }
+
+ if (ObjectHelper
+ .isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.ERROR_REPORT_S3_ENCRYPTION_OPTION))) {
+ String encryptionOption
+ = exchange.getIn().getHeader(Timestream2Constants.ERROR_REPORT_S3_ENCRYPTION_OPTION, String.class);
+ s3Configuration.encryptionOption(encryptionOption);
+ }
+
+ ErrorReportConfiguration errorReportConfiguration
+ = ErrorReportConfiguration.builder().s3Configuration(s3Configuration.build()).build();
+ builder.errorReportConfiguration(errorReportConfiguration);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_EXECUTION_ROLE_ARN))) {
+ String roleArn
+ = exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_EXECUTION_ROLE_ARN, String.class);
+ builder.scheduledQueryExecutionRoleArn(roleArn);
+ }
+
+ TargetConfiguration.Builder targetConfiguration = TargetConfiguration.builder();
+ TimestreamConfiguration.Builder timestreamConfigBuilder = TimestreamConfiguration.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME))) {
+ String database = exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME, String.class);
+ timestreamConfigBuilder.databaseName(database);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.TABLE_NAME))) {
+ String table = exchange.getIn().getHeader(Timestream2Constants.TABLE_NAME, String.class);
+ timestreamConfigBuilder.tableName(table);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.TIME_COLUMN))) {
+ String timeColumn = exchange.getIn().getHeader(Timestream2Constants.TIME_COLUMN, String.class);
+ timestreamConfigBuilder.tableName(timeColumn);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.MEASURE_NAME_COLUMN))) {
+ String measureNameColumn = exchange.getIn().getHeader(Timestream2Constants.MEASURE_NAME_COLUMN, String.class);
+ timestreamConfigBuilder.measureNameColumn(measureNameColumn);
+ }
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DIMENSION_MAPPING_LIST))) {
+ List<DimensionMapping> dimensionMappingList
+ = exchange.getIn().getHeader(Timestream2Constants.DIMENSION_MAPPING_LIST, List.class);
+ timestreamConfigBuilder.dimensionMappings(dimensionMappingList);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.MULTI_MEASURE_MAPPINGS))) {
+ MultiMeasureMappings multiMeasureMappings
+ = exchange.getIn().getHeader(Timestream2Constants.MULTI_MEASURE_MAPPINGS, MultiMeasureMappings.class);
+ timestreamConfigBuilder.multiMeasureMappings(multiMeasureMappings);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.MIXED_MEASURE_MAPPING_LIST))) {
+ List<MixedMeasureMapping> mixedMeasureMappings
+ = exchange.getIn().getHeader(Timestream2Constants.MIXED_MEASURE_MAPPING_LIST, List.class);
+ timestreamConfigBuilder.mixedMeasureMappings(mixedMeasureMappings);
+ }
+ targetConfiguration.timestreamConfiguration(timestreamConfigBuilder.build());
+ builder.targetConfiguration(targetConfiguration.build());
+
+ CreateScheduledQueryResponse result;
+ try {
+ result = timestreamQueryClient.createScheduledQuery(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Create Scheduled Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void deleteScheduledQuery(TimestreamQueryClient timestreamQueryClient, Exchange exchange)
+ throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DeleteScheduledQueryRequest request) {
+ DeleteScheduledQueryResponse result;
+ try {
+ result = timestreamQueryClient.deleteScheduledQuery(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Delete Scheduled Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DeleteScheduledQueryRequest.Builder builder = DeleteScheduledQueryRequest.builder();
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_ARN))) {
+ String queryArn = exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_ARN, String.class);
+ builder.scheduledQueryArn(queryArn);
+ }
+
+ DeleteScheduledQueryResponse result;
+ try {
+ result = timestreamQueryClient.deleteScheduledQuery(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Delete Scheduled Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+
+ }
+
+ private void executeScheduledQuery(TimestreamQueryClient timestreamQueryClient, Exchange exchange)
+ throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof ExecuteScheduledQueryRequest request) {
+ ExecuteScheduledQueryResponse result;
+ try {
+ result = timestreamQueryClient.executeScheduledQuery(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Execute Scheduled Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ ExecuteScheduledQueryRequest.Builder builder = ExecuteScheduledQueryRequest.builder();
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_ARN))) {
+ String queryArn = exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_ARN, String.class);
+ builder.scheduledQueryArn(queryArn);
+ }
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.CLIENT_TOKEN))) {
+ String clientToken = exchange.getIn().getHeader(Timestream2Constants.CLIENT_TOKEN, String.class);
+ builder.clientToken(clientToken);
+ }
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_INVOCATION_TIME))) {
+ Instant invocationTime
+ = exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_INVOCATION_TIME, Instant.class);
+ builder.invocationTime(invocationTime);
+ }
+
+ ExecuteScheduledQueryResponse result;
+ try {
+ result = timestreamQueryClient.executeScheduledQuery(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Execute Scheduled Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void updateScheduledQuery(TimestreamQueryClient timestreamQueryClient, Exchange exchange)
+ throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof UpdateScheduledQueryRequest request) {
+ UpdateScheduledQueryResponse result;
+ try {
+ result = timestreamQueryClient.updateScheduledQuery(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Update Scheduled Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ UpdateScheduledQueryRequest.Builder builder = UpdateScheduledQueryRequest.builder();
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_ARN))) {
+ String queryArn = exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_ARN, String.class);
+ builder.scheduledQueryArn(queryArn);
+ }
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_STATE))) {
+ String state = exchange.getIn().getHeader(Timestream2Constants.SCHEDULED_QUERY_STATE, String.class);
+ builder.state(state);
+ }
+
+ UpdateScheduledQueryResponse result;
+ try {
+ result = timestreamQueryClient.updateScheduledQuery(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Update Scheduled Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void describeScheduledQuery(TimestreamQueryClient timestreamQueryClient, Exchange exchange)
+ throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DescribeScheduledQueryRequest request) {
+ DescribeScheduledQueryResponse result;
+ try {
+ result = timestreamQueryClient.describeScheduledQuery(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Scheduled Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DescribeScheduledQueryRequest.Builder builder = DescribeScheduledQueryRequest.builder();
+
+ DescribeScheduledQueryResponse result;
+ try {
+ result = timestreamQueryClient.describeScheduledQuery(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Scheduled Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void listScheduledQueries(TimestreamQueryClient timestreamQueryClient, Exchange exchange)
+ throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof ListScheduledQueriesRequest request) {
+ ListScheduledQueriesResponse result;
+ try {
+ result = timestreamQueryClient.listScheduledQueries(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("List Scheduled Queries command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ ListScheduledQueriesRequest.Builder builder = ListScheduledQueriesRequest.builder();
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.MAX_RESULTS))) {
+ Integer maxResults = exchange.getIn().getHeader(Timestream2Constants.MAX_RESULTS, Integer.class);
+ builder.maxResults(maxResults);
+ }
+
+ ListScheduledQueriesResponse result;
+ try {
+ result = timestreamQueryClient.listScheduledQueries(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("List Scheduled Queries command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void prepareQuery(TimestreamQueryClient timestreamQueryClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof PrepareQueryRequest request) {
+ PrepareQueryResponse result;
+ try {
+ result = timestreamQueryClient.prepareQuery(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Prepare Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ PrepareQueryRequest.Builder builder = PrepareQueryRequest.builder();
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.QUERY_STRING))) {
+ String queryString = exchange.getIn().getHeader(Timestream2Constants.QUERY_STRING, String.class);
+ builder.queryString(queryString);
+ }
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.QUERY_VALIDATE_ONLY))) {
+ Boolean validateFlag = exchange.getIn().getHeader(Timestream2Constants.QUERY_VALIDATE_ONLY, Boolean.class);
+ builder.validateOnly(validateFlag);
+ }
+
+ PrepareQueryResponse result;
+ try {
+ result = timestreamQueryClient.prepareQuery(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Prepare Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void query(TimestreamQueryClient timestreamQueryClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof QueryRequest request) {
+ QueryResponse result;
+ try {
+ result = timestreamQueryClient.query(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ QueryRequest.Builder builder = QueryRequest.builder();
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.QUERY_STRING))) {
+ String queryString = exchange.getIn().getHeader(Timestream2Constants.QUERY_STRING, String.class);
+ builder.queryString(queryString);
+ }
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.QUERY_MAX_ROWS))) {
+ Integer maxRows = exchange.getIn().getHeader(Timestream2Constants.QUERY_MAX_ROWS, Integer.class);
+ builder.maxRows(maxRows);
+ }
+
+ QueryResponse result;
+ try {
+ result = timestreamQueryClient.query(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void cancelQuery(TimestreamQueryClient timestreamQueryClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof CancelQueryRequest request) {
+ CancelQueryResponse result;
+ try {
+ result = timestreamQueryClient.cancelQuery(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Cancel Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ CancelQueryRequest.Builder builder = CancelQueryRequest.builder();
+
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.QUERY_ID))) {
+ String queryId = exchange.getIn().getHeader(Timestream2Constants.QUERY_ID, String.class);
+ builder.queryId(queryId);
+ }
+
+ CancelQueryResponse result;
+ try {
+ result = timestreamQueryClient.cancelQuery(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Cancel Query command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ public static Message getMessageForResponse(final Exchange exchange) {
+ return exchange.getMessage();
+ }
+
+ @Override
+ protected void doStart() throws Exception {
+ // health-check is optional so discover and resolve
+ healthCheckRepository = HealthCheckHelper.getHealthCheckRepository(
+ getEndpoint().getCamelContext(),
+ "producers",
+ WritableHealthCheckRepository.class);
+
+ if (healthCheckRepository != null) {
+ String id = getEndpoint().getId();
+ producerHealthCheck = new Timestream2QueryProducerHealthCheck(getEndpoint(), id);
+ producerHealthCheck.setEnabled(getEndpoint().getComponent().isHealthCheckProducerEnabled());
+ healthCheckRepository.addHealthCheck(producerHealthCheck);
+ }
+ }
+
+ @Override
+ protected void doStop() throws Exception {
+ if (healthCheckRepository != null && producerHealthCheck != null) {
+ healthCheckRepository.removeHealthCheck(producerHealthCheck);
+ producerHealthCheck = null;
+ }
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerHealthCheck.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerHealthCheck.java
new file mode 100644
index 00000000000..4654180c7fc
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerHealthCheck.java
@@ -0,0 +1,72 @@
+/*
+ * 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.timestream.query;
+
+import java.util.Map;
+
+import org.apache.camel.component.aws2.timestream.Timestream2Configuration;
+import org.apache.camel.health.HealthCheckResultBuilder;
+import org.apache.camel.impl.health.AbstractHealthCheck;
+import org.apache.camel.util.ObjectHelper;
+import software.amazon.awssdk.awscore.exception.AwsServiceException;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient;
+import software.amazon.awssdk.services.timestreamquery.model.DescribeEndpointsRequest;
+
+public class Timestream2QueryProducerHealthCheck extends AbstractHealthCheck {
+
+ private final Timestream2QueryEndpoint timestream2QueryEndpoint;
+
+ public Timestream2QueryProducerHealthCheck(Timestream2QueryEndpoint timestream2QueryEndpoint, String clientId) {
+ super("camel", "producer:aws2-timestream-query-" + clientId);
+ this.timestream2QueryEndpoint = timestream2QueryEndpoint;
+ }
+
+ @Override
+ protected void doCall(HealthCheckResultBuilder builder, Map<String, Object> options) {
+ Timestream2Configuration configuration = timestream2QueryEndpoint.getConfiguration();
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ if (!TimestreamQueryClient.serviceMetadata().regions().contains(Region.of(configuration.getRegion()))) {
+ builder.message("The service is not supported in this region");
+ builder.down();
+ return;
+ }
+ }
+ try {
+ TimestreamQueryClient client = timestream2QueryEndpoint.getAwsTimestreamQueryClient();
+ client.describeEndpoints(DescribeEndpointsRequest.builder().build());
+ } catch (AwsServiceException e) {
+ builder.message(e.getMessage());
+ builder.error(e);
+ if (ObjectHelper.isNotEmpty(e.statusCode())) {
+ builder.detail(SERVICE_STATUS_CODE, e.statusCode());
+ }
+ if (ObjectHelper.isNotEmpty(e.awsErrorDetails().errorCode())) {
+ builder.detail(SERVICE_ERROR_CODE, e.awsErrorDetails().errorCode());
+ }
+ builder.down();
+ return;
+ } catch (Exception e) {
+ builder.error(e);
+ builder.down();
+ return;
+ }
+ builder.up();
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteEndpoint.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteEndpoint.java
new file mode 100644
index 00000000000..56e6482c04e
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteEndpoint.java
@@ -0,0 +1,72 @@
+/*
+ * 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.timestream.write;
+
+import org.apache.camel.*;
+import org.apache.camel.component.aws2.timestream.Timestream2AbstractEndpoint;
+import org.apache.camel.component.aws2.timestream.Timestream2Configuration;
+import org.apache.camel.component.aws2.timestream.client.Timestream2ClientFactory;
+import org.apache.camel.util.ObjectHelper;
+import software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient;
+
+/**
+ * Manage and invoke AWS Timestream.
+ */
+
+public class Timestream2WriteEndpoint extends Timestream2AbstractEndpoint {
+
+ /** AWS TimestreamWriteClient for TimestreamWrite Endpoint **/
+ private TimestreamWriteClient awsTimestreamWriteClient;
+
+ public Timestream2WriteEndpoint(String uri, Component component, Timestream2Configuration configuration) {
+ super(uri, component, configuration);
+ }
+
+ @Override
+ public Consumer createConsumer(Processor processor) throws Exception {
+ throw new UnsupportedOperationException("You cannot receive messages from this endpoint");
+ }
+
+ @Override
+ public Producer createProducer() throws Exception {
+ return new Timestream2WriteProducer(this);
+ }
+
+ @Override
+ public void doStart() throws Exception {
+ super.doStart();
+ awsTimestreamWriteClient = getConfiguration().getAwsTimestreamWriteClient() != null
+ ? getConfiguration().getAwsTimestreamWriteClient()
+ : Timestream2ClientFactory.getTimestreamClient(getConfiguration()).getTimestreamWriteClient();
+ }
+
+ @Override
+ public void doStop() throws Exception {
+
+ if (ObjectHelper.isEmpty(getConfiguration().getAwsTimestreamWriteClient())) {
+ if (awsTimestreamWriteClient != null) {
+ awsTimestreamWriteClient.close();
+ }
+ }
+ super.doStop();
+ }
+
+ public TimestreamWriteClient getAwsTimestreamWriteClient() {
+ return awsTimestreamWriteClient;
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducer.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducer.java
new file mode 100644
index 00000000000..18c346ab71a
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducer.java
@@ -0,0 +1,765 @@
+/*
+ * 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.timestream.write;
+
+import java.util.List;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.InvalidPayloadException;
+import org.apache.camel.Message;
+import org.apache.camel.component.aws2.timestream.Timestream2Configuration;
+import org.apache.camel.component.aws2.timestream.Timestream2Constants;
+import org.apache.camel.component.aws2.timestream.Timestream2Operations;
+import org.apache.camel.health.HealthCheck;
+import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.health.WritableHealthCheckRepository;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.util.URISupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.awscore.exception.AwsServiceException;
+import software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient;
+import software.amazon.awssdk.services.timestreamwrite.model.*;
+import software.amazon.awssdk.services.timestreamwrite.model.Record;
+
+/**
+ * A Producer which sends messages to the Amazon Web Service Timestream <a href="https://aws.amazon.com/timestream/">AWS
+ * Timestream</a>
+ */
+public class Timestream2WriteProducer extends DefaultProducer {
+
+ private static final Logger LOG = LoggerFactory.getLogger(Timestream2WriteProducer.class);
+
+ private transient String timestreamWriteProducerToString;
+
+ private HealthCheck producerHealthCheck;
+ private WritableHealthCheckRepository healthCheckRepository;
+
+ public Timestream2WriteProducer(final Endpoint endpoint) {
+ super(endpoint);
+ }
+
+ @Override
+ public void process(final Exchange exchange) throws Exception {
+ switch (determineOperation(exchange)) {
+ case describeEndpoints -> describeEndpoints(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case createBatchLoadTask -> createBatchLoadTask(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case describeBatchLoadTask -> describeBatchLoadTask(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case resumeBatchLoadTask -> resumeBatchLoadTask(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case listBatchLoadTasks -> listBatchLoadTasks(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case createDatabase -> createDatabase(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case deleteDatabase -> deleteDatabase(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case describeDatabase -> describeDatabase(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case updateDatabase -> updateDatabase(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case listDatabases -> listDatabases(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case createTable -> createTable(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case deleteTable -> deleteTable(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case describeTable -> describeTable(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case updateTable -> updateTable(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case listTables -> listTables(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ case writeRecords -> writeRecords(getEndpoint().getAwsTimestreamWriteClient(), exchange);
+ default -> throw new IllegalArgumentException("Unsupported operation");
+ }
+ }
+
+ private Timestream2Operations determineOperation(Exchange exchange) throws InvalidPayloadException {
+ Timestream2Operations operation
+ = exchange.getIn().getHeader(Timestream2Constants.OPERATION, Timestream2Operations.class);
+ if (operation == null) {
+ operation = getConfiguration().getOperation();
+ }
+ return operation;
+ }
+
+ protected Timestream2Configuration getConfiguration() {
+ return getEndpoint().getConfiguration();
+ }
+
+ @Override
+ public String toString() {
+ if (timestreamWriteProducerToString == null) {
+ timestreamWriteProducerToString
+ = "TimestreamWriteProducer[" + URISupport.sanitizeUri(getEndpoint().getEndpointUri()) + "]";
+ }
+ return timestreamWriteProducerToString;
+ }
+
+ @Override
+ public Timestream2WriteEndpoint getEndpoint() {
+ return (Timestream2WriteEndpoint) super.getEndpoint();
+ }
+
+ private void describeEndpoints(TimestreamWriteClient timestreamWriteClient, Exchange exchange)
+ throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DescribeEndpointsRequest request) {
+ DescribeEndpointsResponse result;
+ try {
+ result = timestreamWriteClient.describeEndpoints(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Endpoints command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DescribeEndpointsRequest.Builder builder = DescribeEndpointsRequest.builder();
+
+ DescribeEndpointsResponse result;
+ try {
+ result = timestreamWriteClient.describeEndpoints(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Endpoints command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void createBatchLoadTask(TimestreamWriteClient timestreamWriteClient, Exchange exchange)
+ throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof CreateBatchLoadTaskRequest request) {
+ CreateBatchLoadTaskResponse result;
+ try {
+ result = timestreamWriteClient.createBatchLoadTask(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Create Batch Load Task command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ CreateBatchLoadTaskRequest.Builder builder = CreateBatchLoadTaskRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.CLIENT_TOKEN))) {
+ String clientToken = exchange.getIn().getHeader(Timestream2Constants.CLIENT_TOKEN, String.class);
+ builder.clientToken(clientToken);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.TARGET_DATABASE_NAME))) {
+ String targetDB = exchange.getIn().getHeader(Timestream2Constants.TARGET_DATABASE_NAME, String.class);
+ builder.targetDatabaseName(targetDB);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.TARGET_TABLE_NAME))) {
+ String targetTable = exchange.getIn().getHeader(Timestream2Constants.TARGET_TABLE_NAME, String.class);
+ builder.targetTableName(targetTable);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.RECORD_VERSION))) {
+ Long recordVersion = exchange.getIn().getHeader(Timestream2Constants.RECORD_VERSION, Long.class);
+ builder.recordVersion(recordVersion);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DATA_MODEL_CONFIGURATION))) {
+ DataModelConfiguration config = exchange.getIn().getHeader(Timestream2Constants.DATA_MODEL_CONFIGURATION,
+ DataModelConfiguration.class);
+ builder.dataModelConfiguration(config);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DATA_SOURCE_CONFIGURATION))) {
+ DataSourceConfiguration config = exchange.getIn().getHeader(Timestream2Constants.DATA_SOURCE_CONFIGURATION,
+ DataSourceConfiguration.class);
+ builder.dataSourceConfiguration(config);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.REPORT_CONFIGURATION))) {
+ ReportConfiguration config
+ = exchange.getIn().getHeader(Timestream2Constants.REPORT_CONFIGURATION, ReportConfiguration.class);
+ builder.reportConfiguration(config);
+ }
+
+ CreateBatchLoadTaskResponse result;
+ try {
+ result = timestreamWriteClient.createBatchLoadTask(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Create Batch Load Task command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void describeBatchLoadTask(TimestreamWriteClient timestreamWriteClient, Exchange exchange)
+ throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DescribeBatchLoadTaskRequest request) {
+ DescribeBatchLoadTaskResponse result;
+ try {
+ result = timestreamWriteClient.describeBatchLoadTask(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Batch Load Task command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DescribeBatchLoadTaskRequest.Builder builder = DescribeBatchLoadTaskRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.TASK_ID))) {
+ String taskId = exchange.getIn().getHeader(Timestream2Constants.TASK_ID, String.class);
+ builder.taskId(taskId);
+ }
+
+ DescribeBatchLoadTaskResponse result;
+ try {
+ result = timestreamWriteClient.describeBatchLoadTask(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Batch Load Task command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void resumeBatchLoadTask(TimestreamWriteClient timestreamWriteClient, Exchange exchange)
+ throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof ResumeBatchLoadTaskRequest request) {
+ ResumeBatchLoadTaskResponse result;
+ try {
+ result = timestreamWriteClient.resumeBatchLoadTask(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Resume Batch Load Task command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ ResumeBatchLoadTaskRequest.Builder builder = ResumeBatchLoadTaskRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.TASK_ID))) {
+ String taskId = exchange.getIn().getHeader(Timestream2Constants.TASK_ID, String.class);
+ builder.taskId(taskId);
+ }
+
+ ResumeBatchLoadTaskResponse result;
+ try {
+ result = timestreamWriteClient.resumeBatchLoadTask(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Resume Batch Load Task command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void listBatchLoadTasks(TimestreamWriteClient timestreamWriteClient, Exchange exchange)
+ throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof ListBatchLoadTasksRequest request) {
+ ListBatchLoadTasksResponse result;
+ try {
+ result = timestreamWriteClient.listBatchLoadTasks(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("List Batch Load Tasks command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ ListBatchLoadTasksRequest.Builder builder = ListBatchLoadTasksRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.MAX_RESULTS))) {
+ Integer maxResults = exchange.getIn().getHeader(Timestream2Constants.MAX_RESULTS, Integer.class);
+ builder.maxResults(maxResults);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.TASK_STATUS))) {
+ String taskStatus = exchange.getIn().getHeader(Timestream2Constants.TASK_STATUS, String.class);
+ builder.taskStatus(taskStatus);
+ }
+
+ ListBatchLoadTasksResponse result;
+ try {
+ result = timestreamWriteClient.listBatchLoadTasks(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("List Batch Load Tasks command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void createDatabase(TimestreamWriteClient timestreamWriteClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof CreateDatabaseRequest request) {
+ CreateDatabaseResponse result;
+ try {
+ result = timestreamWriteClient.createDatabase(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Create Database command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ CreateDatabaseRequest.Builder builder = CreateDatabaseRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME))) {
+ String dbName = exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME, String.class);
+ builder.databaseName(dbName);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.KMS_KEY_ID))) {
+ String kmsKeyId = exchange.getIn().getHeader(Timestream2Constants.KMS_KEY_ID, String.class);
+ builder.kmsKeyId(kmsKeyId);
+ }
+
+ CreateDatabaseResponse result;
+ try {
+ result = timestreamWriteClient.createDatabase(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Create Database command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void deleteDatabase(TimestreamWriteClient timestreamWriteClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DeleteDatabaseRequest request) {
+ DeleteDatabaseResponse result;
+ try {
+ result = timestreamWriteClient.deleteDatabase(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Delete Database command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DeleteDatabaseRequest.Builder builder = DeleteDatabaseRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME))) {
+ String dbName = exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME, String.class);
+ builder.databaseName(dbName);
+ }
+
+ DeleteDatabaseResponse result;
+ try {
+ result = timestreamWriteClient.deleteDatabase(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Delete Database command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void describeDatabase(TimestreamWriteClient timestreamWriteClient, Exchange exchange)
+ throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DescribeDatabaseRequest request) {
+ DescribeDatabaseResponse result;
+ try {
+ result = timestreamWriteClient.describeDatabase(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Database command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DescribeDatabaseRequest.Builder builder = DescribeDatabaseRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME))) {
+ String dbName = exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME, String.class);
+ builder.databaseName(dbName);
+ }
+
+ DescribeDatabaseResponse result;
+ try {
+ result = timestreamWriteClient.describeDatabase(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Database command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void updateDatabase(TimestreamWriteClient timestreamWriteClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof UpdateDatabaseRequest request) {
+ UpdateDatabaseResponse result;
+ try {
+ result = timestreamWriteClient.updateDatabase(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Update Database command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ UpdateDatabaseRequest.Builder builder = UpdateDatabaseRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME))) {
+ String dbName = exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME, String.class);
+ builder.databaseName(dbName);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.KMS_KEY_ID))) {
+ String kmsKeyId = exchange.getIn().getHeader(Timestream2Constants.KMS_KEY_ID, String.class);
+ builder.kmsKeyId(kmsKeyId);
+ }
+
+ UpdateDatabaseResponse result;
+ try {
+ result = timestreamWriteClient.updateDatabase(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Update Database command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void listDatabases(TimestreamWriteClient timestreamWriteClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof ListDatabasesRequest request) {
+ ListDatabasesResponse result;
+ try {
+ result = timestreamWriteClient.listDatabases(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("List Databases command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ ListDatabasesRequest.Builder builder = ListDatabasesRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.MAX_RESULTS))) {
+ Integer maxResults = exchange.getIn().getHeader(Timestream2Constants.MAX_RESULTS, Integer.class);
+ builder.maxResults(maxResults);
+ }
+
+ ListDatabasesResponse result;
+ try {
+ result = timestreamWriteClient.listDatabases(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("List Databases command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void createTable(TimestreamWriteClient timestreamWriteClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof CreateTableRequest request) {
+ CreateTableResponse result;
+ try {
+ result = timestreamWriteClient.createTable(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Create Table command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ CreateTableRequest.Builder builder = CreateTableRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME))) {
+ String dbName = exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME, String.class);
+ builder.databaseName(dbName);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.TABLE_NAME))) {
+ String tableName = exchange.getIn().getHeader(Timestream2Constants.TABLE_NAME, String.class);
+ builder.tableName(tableName);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.SCHEMA))) {
+ Schema schema = exchange.getIn().getHeader(Timestream2Constants.SCHEMA, Schema.class);
+ builder.schema(schema);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.RETENTION_PROPERTIES))) {
+ RetentionProperties properties
+ = exchange.getIn().getHeader(Timestream2Constants.RETENTION_PROPERTIES, RetentionProperties.class);
+ builder.retentionProperties(properties);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.MAGNETIC_STORE_WRITE_PROPERTIES))) {
+ MagneticStoreWriteProperties properties = exchange.getIn()
+ .getHeader(Timestream2Constants.MAGNETIC_STORE_WRITE_PROPERTIES, MagneticStoreWriteProperties.class);
+ builder.magneticStoreWriteProperties(properties);
+ }
+
+ CreateTableResponse result;
+ try {
+ result = timestreamWriteClient.createTable(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Create Table command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void deleteTable(TimestreamWriteClient timestreamWriteClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DeleteTableRequest request) {
+ DeleteTableResponse result;
+ try {
+ result = timestreamWriteClient.deleteTable(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Delete Table command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DeleteTableRequest.Builder builder = DeleteTableRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME))) {
+ String dbName = exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME, String.class);
+ builder.databaseName(dbName);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.TABLE_NAME))) {
+ String tableName = exchange.getIn().getHeader(Timestream2Constants.TABLE_NAME, String.class);
+ builder.tableName(tableName);
+ }
+
+ DeleteTableResponse result;
+ try {
+ result = timestreamWriteClient.deleteTable(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Delete Table command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void describeTable(TimestreamWriteClient timestreamWriteClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof DescribeTableRequest request) {
+ DescribeTableResponse result;
+ try {
+ result = timestreamWriteClient.describeTable(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Table command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ DescribeTableRequest.Builder builder = DescribeTableRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME))) {
+ String dbName = exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME, String.class);
+ builder.databaseName(dbName);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.TABLE_NAME))) {
+ String tableName = exchange.getIn().getHeader(Timestream2Constants.TABLE_NAME, String.class);
+ builder.tableName(tableName);
+ }
+
+ DescribeTableResponse result;
+ try {
+ result = timestreamWriteClient.describeTable(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Describe Table command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void updateTable(TimestreamWriteClient timestreamWriteClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof UpdateTableRequest request) {
+ UpdateTableResponse result;
+ try {
+ result = timestreamWriteClient.updateTable(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Update Table command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ UpdateTableRequest.Builder builder = UpdateTableRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME))) {
+ String dbName = exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME, String.class);
+ builder.databaseName(dbName);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.TABLE_NAME))) {
+ String tableName = exchange.getIn().getHeader(Timestream2Constants.TABLE_NAME, String.class);
+ builder.tableName(tableName);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.SCHEMA))) {
+ Schema schema = exchange.getIn().getHeader(Timestream2Constants.SCHEMA, Schema.class);
+ builder.schema(schema);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.RETENTION_PROPERTIES))) {
+ RetentionProperties properties
+ = exchange.getIn().getHeader(Timestream2Constants.RETENTION_PROPERTIES, RetentionProperties.class);
+ builder.retentionProperties(properties);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.MAGNETIC_STORE_WRITE_PROPERTIES))) {
+ MagneticStoreWriteProperties properties = exchange.getIn()
+ .getHeader(Timestream2Constants.MAGNETIC_STORE_WRITE_PROPERTIES, MagneticStoreWriteProperties.class);
+ builder.magneticStoreWriteProperties(properties);
+ }
+
+ UpdateTableResponse result;
+ try {
+ result = timestreamWriteClient.updateTable(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Update Table command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void listTables(TimestreamWriteClient timestreamWriteClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof ListTablesRequest request) {
+ ListTablesResponse result;
+ try {
+ result = timestreamWriteClient.listTables(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("List Tables command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ ListTablesRequest.Builder builder = ListTablesRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME))) {
+ String dbName = exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME, String.class);
+ builder.databaseName(dbName);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.MAX_RESULTS))) {
+ Integer maxResults = exchange.getIn().getHeader(Timestream2Constants.MAX_RESULTS, Integer.class);
+ builder.maxResults(maxResults);
+ }
+
+ ListTablesResponse result;
+ try {
+ result = timestreamWriteClient.listTables(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("List Tables command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ private void writeRecords(TimestreamWriteClient timestreamWriteClient, Exchange exchange) throws InvalidPayloadException {
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (payload instanceof WriteRecordsRequest request) {
+ WriteRecordsResponse result;
+ try {
+ result = timestreamWriteClient.writeRecords(request);
+ } catch (AwsServiceException ase) {
+ LOG.trace("Write Records command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ } else {
+ WriteRecordsRequest.Builder builder = WriteRecordsRequest.builder();
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME))) {
+ String dbName = exchange.getIn().getHeader(Timestream2Constants.DATABASE_NAME, String.class);
+ builder.databaseName(dbName);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.TABLE_NAME))) {
+ String tableName = exchange.getIn().getHeader(Timestream2Constants.TABLE_NAME, String.class);
+ builder.tableName(tableName);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.RECORD))) {
+ Record record = exchange.getIn().getHeader(Timestream2Constants.RECORD, Record.class);
+ builder.commonAttributes(record);
+ }
+ if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(Timestream2Constants.RECORD_LIST))) {
+ List<Record> records = exchange.getIn().getHeader(Timestream2Constants.RECORD_LIST, List.class);
+ builder.records(records);
+ }
+
+ WriteRecordsResponse result;
+ try {
+ result = timestreamWriteClient.writeRecords(builder.build());
+ } catch (AwsServiceException ase) {
+ LOG.trace("Write Records command returned the error code {}", ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ }
+ }
+
+ public static Message getMessageForResponse(final Exchange exchange) throws InvalidPayloadException {
+ return exchange.getMessage();
+ }
+
+ @Override
+ protected void doStart() throws Exception {
+ // health-check is optional so discover and resolve
+ healthCheckRepository = HealthCheckHelper.getHealthCheckRepository(
+ getEndpoint().getCamelContext(),
+ "producers",
+ WritableHealthCheckRepository.class);
+
+ if (healthCheckRepository != null) {
+ String id = getEndpoint().getId();
+ producerHealthCheck = new Timestream2WriteProducerHealthCheck(getEndpoint(), id);
+ producerHealthCheck.setEnabled(getEndpoint().getComponent().isHealthCheckProducerEnabled());
+ healthCheckRepository.addHealthCheck(producerHealthCheck);
+ }
+ }
+
+ @Override
+ protected void doStop() throws Exception {
+ if (healthCheckRepository != null && producerHealthCheck != null) {
+ healthCheckRepository.removeHealthCheck(producerHealthCheck);
+ producerHealthCheck = null;
+ }
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerHealthCheck.java b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerHealthCheck.java
new file mode 100644
index 00000000000..d2abd6a0482
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/main/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerHealthCheck.java
@@ -0,0 +1,72 @@
+/*
+ * 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.timestream.write;
+
+import java.util.Map;
+
+import org.apache.camel.component.aws2.timestream.Timestream2Configuration;
+import org.apache.camel.health.HealthCheckResultBuilder;
+import org.apache.camel.impl.health.AbstractHealthCheck;
+import org.apache.camel.util.ObjectHelper;
+import software.amazon.awssdk.awscore.exception.AwsServiceException;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient;
+import software.amazon.awssdk.services.timestreamwrite.model.DescribeEndpointsRequest;
+
+public class Timestream2WriteProducerHealthCheck extends AbstractHealthCheck {
+
+ private final Timestream2WriteEndpoint timestream2WriteEndpoint;
+
+ public Timestream2WriteProducerHealthCheck(Timestream2WriteEndpoint timestream2WriteEndpoint, String clientId) {
+ super("camel", "producer:aws2-timestream-write-" + clientId);
+ this.timestream2WriteEndpoint = timestream2WriteEndpoint;
+ }
+
+ @Override
+ protected void doCall(HealthCheckResultBuilder builder, Map<String, Object> options) {
+ Timestream2Configuration configuration = timestream2WriteEndpoint.getConfiguration();
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ if (!TimestreamWriteClient.serviceMetadata().regions().contains(Region.of(configuration.getRegion()))) {
+ builder.message("The service is not supported in this region");
+ builder.down();
+ return;
+ }
+ }
+ try {
+ TimestreamWriteClient client = timestream2WriteEndpoint.getAwsTimestreamWriteClient();
+ client.describeEndpoints(DescribeEndpointsRequest.builder().build());
+ } catch (AwsServiceException e) {
+ builder.message(e.getMessage());
+ builder.error(e);
+ if (ObjectHelper.isNotEmpty(e.statusCode())) {
+ builder.detail(SERVICE_STATUS_CODE, e.statusCode());
+ }
+ if (ObjectHelper.isNotEmpty(e.awsErrorDetails().errorCode())) {
+ builder.detail(SERVICE_ERROR_CODE, e.awsErrorDetails().errorCode());
+ }
+ builder.down();
+ return;
+ } catch (Exception e) {
+ builder.error(e);
+ builder.down();
+ return;
+ }
+ builder.up();
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/Timestream2ClientFactoryTest.java b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/Timestream2ClientFactoryTest.java
new file mode 100644
index 00000000000..2c5cfa65ae5
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/Timestream2ClientFactoryTest.java
@@ -0,0 +1,52 @@
+/*
+ * 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.timestream;
+
+import org.apache.camel.component.aws2.timestream.client.Timestream2ClientFactory;
+import org.apache.camel.component.aws2.timestream.client.Timestream2InternalClient;
+import org.apache.camel.component.aws2.timestream.client.impl.Timestream2ClientIAMOptimizedImpl;
+import org.apache.camel.component.aws2.timestream.client.impl.Timestream2ClientStandardImpl;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class Timestream2ClientFactoryTest {
+
+ @Test
+ public void getStandardTimestreamClientDefault() {
+ Timestream2Configuration timestream2Configuration = new Timestream2Configuration();
+ Timestream2InternalClient timestreamClient = Timestream2ClientFactory.getTimestreamClient(timestream2Configuration);
+ assertTrue(timestreamClient instanceof Timestream2ClientStandardImpl);
+ }
+
+ @Test
+ public void getStandardTimestreamClient() {
+ Timestream2Configuration timestream2Configuration = new Timestream2Configuration();
+ timestream2Configuration.setUseDefaultCredentialsProvider(false);
+ Timestream2InternalClient timestreamClient = Timestream2ClientFactory.getTimestreamClient(timestream2Configuration);
+ assertTrue(timestreamClient instanceof Timestream2ClientStandardImpl);
+ }
+
+ @Test
+ public void getIAMOptimizedTimestreamClient() {
+ Timestream2Configuration timestream2Configuration = new Timestream2Configuration();
+ timestream2Configuration.setUseDefaultCredentialsProvider(true);
+ Timestream2InternalClient timestream2InternalClient
+ = Timestream2ClientFactory.getTimestreamClient(timestream2Configuration);
+ assertTrue(timestream2InternalClient instanceof Timestream2ClientIAMOptimizedImpl);
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/Timestream2ComponentClientRegistryTest.java b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/Timestream2ComponentClientRegistryTest.java
new file mode 100644
index 00000000000..e8d1ca08953
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/Timestream2ComponentClientRegistryTest.java
@@ -0,0 +1,86 @@
+/*
+ * 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.timestream;
+
+import org.apache.camel.component.aws2.timestream.query.AmazonTimestreamQueryClientMock;
+import org.apache.camel.component.aws2.timestream.query.Timestream2QueryEndpoint;
+import org.apache.camel.component.aws2.timestream.write.AmazonTimestreamWriteClientMock;
+import org.apache.camel.component.aws2.timestream.write.Timestream2WriteEndpoint;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+public class Timestream2ComponentClientRegistryTest extends CamelTestSupport {
+
+ @Test
+ public void createEndpointWithMinimalTimestreamWriteConfiguration() throws Exception {
+
+ AmazonTimestreamWriteClientMock clientMock = new AmazonTimestreamWriteClientMock();
+ context.getRegistry().bind("awsTimestreamWriteClient", clientMock);
+ Timestream2Component component = context.getComponent("aws2-timestream", Timestream2Component.class);
+ Timestream2WriteEndpoint endpoint
+ = (Timestream2WriteEndpoint) component.createEndpoint("aws2-timestream:write:TestDomain");
+
+ assertNotNull(endpoint.getConfiguration().getAwsTimestreamWriteClient());
+ }
+
+ @Test
+ public void createEndpointWithMinimalTimestreamQueryConfiguration() throws Exception {
+
+ AmazonTimestreamQueryClientMock clientMock = new AmazonTimestreamQueryClientMock();
+ context.getRegistry().bind("awsTimestreamQueryClient", clientMock);
+ Timestream2Component component = context.getComponent("aws2-timestream", Timestream2Component.class);
+ Timestream2QueryEndpoint endpoint
+ = (Timestream2QueryEndpoint) component.createEndpoint("aws2-timestream://query:TestDomain");
+
+ assertNotNull(endpoint.getConfiguration().getAwsTimestreamQueryClient());
+ }
+
+ @Test
+ public void createEndpointWithMinimalTimestreamWriteClientMisconfiguration() {
+
+ Timestream2Component component = context.getComponent("aws2-timestream", Timestream2Component.class);
+ assertThrows(IllegalArgumentException.class, () -> {
+ component.createEndpoint("aws2-timestream://write:TestDomain");
+ });
+ }
+
+ @Test
+ public void createEndpointWithMinimalTimestreamQueryClientMisconfiguration() {
+
+ Timestream2Component component = context.getComponent("aws2-timestream", Timestream2Component.class);
+ assertThrows(IllegalArgumentException.class, () -> {
+ component.createEndpoint("aws2-timestream://query:TestDomain");
+ });
+ }
+
+ @Test
+ public void createWriteQueryEndpointWithAutowired() throws Exception {
+
+ AmazonTimestreamQueryClientMock clientMock = new AmazonTimestreamQueryClientMock();
+ context.getRegistry().bind("awsTimestreamQueryClient", clientMock);
+ Timestream2Component component = context.getComponent("aws2-timestream", Timestream2Component.class);
+ Timestream2QueryEndpoint endpoint = (Timestream2QueryEndpoint) component
+ .createEndpoint("aws2-timestream://query:TestDomain?accessKey=xxx&secretKey=yyy");
+
+ assertSame(clientMock, endpoint.getConfiguration().getAwsTimestreamQueryClient());
+ }
+
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/Timestream2ComponentConfigurationTest.java b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/Timestream2ComponentConfigurationTest.java
new file mode 100644
index 00000000000..648a7183302
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/Timestream2ComponentConfigurationTest.java
@@ -0,0 +1,126 @@
+/*
+ * 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.timestream;
+
+import org.apache.camel.component.aws2.timestream.query.Timestream2QueryEndpoint;
+import org.apache.camel.component.aws2.timestream.write.Timestream2WriteEndpoint;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.core.Protocol;
+import software.amazon.awssdk.regions.Region;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class Timestream2ComponentConfigurationTest extends CamelTestSupport {
+
+ @Test
+ public void createEndpointWithComponentElements() throws Exception {
+ Timestream2Component component = context.getComponent("aws2-timestream", Timestream2Component.class);
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ Timestream2WriteEndpoint writeEndpoint
+ = (Timestream2WriteEndpoint) component.createEndpoint("aws2-timestream://write:label");
+ Timestream2QueryEndpoint queryEndpoint
+ = (Timestream2QueryEndpoint) component.createEndpoint("aws2-timestream://query:label");
+
+ assertEquals("XXX", writeEndpoint.getConfiguration().getAccessKey());
+ assertEquals("YYY", writeEndpoint.getConfiguration().getSecretKey());
+ assertEquals("XXX", queryEndpoint.getConfiguration().getAccessKey());
+ assertEquals("YYY", queryEndpoint.getConfiguration().getSecretKey());
+ }
+
+ @Test
+ public void createEndpointWithComponentAndEndpointElements() throws Exception {
+ Timestream2Component component = context.getComponent("aws2-timestream", Timestream2Component.class);
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ component.getConfiguration().setRegion(Region.US_WEST_1.toString());
+ Timestream2WriteEndpoint writeEndpoint
+ = (Timestream2WriteEndpoint) component
+ .createEndpoint("aws2-timestream://write:label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1");
+
+ Timestream2QueryEndpoint queryEndpoint
+ = (Timestream2QueryEndpoint) component
+ .createEndpoint("aws2-timestream://query:label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1");
+
+ assertEquals("xxxxxx", writeEndpoint.getConfiguration().getAccessKey());
+ assertEquals("yyyyy", writeEndpoint.getConfiguration().getSecretKey());
+ assertEquals("US_EAST_1", writeEndpoint.getConfiguration().getRegion());
+
+ assertEquals("xxxxxx", queryEndpoint.getConfiguration().getAccessKey());
+ assertEquals("yyyyy", queryEndpoint.getConfiguration().getSecretKey());
+ assertEquals("US_EAST_1", queryEndpoint.getConfiguration().getRegion());
+ }
+
+ @Test
+ public void createEndpointWithComponentEndpointElementsAndProxy() throws Exception {
+ Timestream2Component component = context.getComponent("aws2-timestream", Timestream2Component.class);
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ component.getConfiguration().setRegion(Region.US_WEST_1.toString());
+ Timestream2WriteEndpoint writeEndpoint = (Timestream2WriteEndpoint) component
+ .createEndpoint(
+ "aws2-timestream://write:label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
+
+ Timestream2QueryEndpoint queryEndpoint = (Timestream2QueryEndpoint) component
+ .createEndpoint(
+ "aws2-timestream://query:label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
+
+ assertEquals("xxxxxx", writeEndpoint.getConfiguration().getAccessKey());
+ assertEquals("yyyyy", writeEndpoint.getConfiguration().getSecretKey());
+ assertEquals("US_EAST_1", writeEndpoint.getConfiguration().getRegion());
+ assertEquals(Protocol.HTTP, writeEndpoint.getConfiguration().getProxyProtocol());
+ assertEquals("localhost", writeEndpoint.getConfiguration().getProxyHost());
+ assertEquals(Integer.valueOf(9000), writeEndpoint.getConfiguration().getProxyPort());
+
+ assertEquals("xxxxxx", queryEndpoint.getConfiguration().getAccessKey());
+ assertEquals("yyyyy", queryEndpoint.getConfiguration().getSecretKey());
+ assertEquals("US_EAST_1", queryEndpoint.getConfiguration().getRegion());
+ assertEquals(Protocol.HTTP, queryEndpoint.getConfiguration().getProxyProtocol());
+ assertEquals("localhost", queryEndpoint.getConfiguration().getProxyHost());
+ assertEquals(Integer.valueOf(9000), queryEndpoint.getConfiguration().getProxyPort());
+ }
+
+ @Test
+ public void createEndpointWithOverrideEndpoint() throws Exception {
+ Timestream2Component component = context.getComponent("aws2-timestream", Timestream2Component.class);
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ component.getConfiguration().setRegion(Region.US_WEST_1.toString());
+ Timestream2WriteEndpoint writeEndpoint
+ = (Timestream2WriteEndpoint) component.createEndpoint(
+ "aws2-timestream://write:label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1&overrideEndpoint=true&uriEndpointOverride=http://localhost:9090");
+
+ Timestream2QueryEndpoint queryEndpoint
+ = (Timestream2QueryEndpoint) component.createEndpoint(
+ "aws2-timestream://query:label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1&overrideEndpoint=true&uriEndpointOverride=http://localhost:9090");
+
+ assertEquals("xxxxxx", writeEndpoint.getConfiguration().getAccessKey());
+ assertEquals("yyyyy", writeEndpoint.getConfiguration().getSecretKey());
+ assertEquals("US_EAST_1", writeEndpoint.getConfiguration().getRegion());
+ assertTrue(writeEndpoint.getConfiguration().isOverrideEndpoint());
+ assertEquals("http://localhost:9090", writeEndpoint.getConfiguration().getUriEndpointOverride());
+
+ assertEquals("xxxxxx", queryEndpoint.getConfiguration().getAccessKey());
+ assertEquals("yyyyy", queryEndpoint.getConfiguration().getSecretKey());
+ assertEquals("US_EAST_1", queryEndpoint.getConfiguration().getRegion());
+ assertTrue(writeEndpoint.getConfiguration().isOverrideEndpoint());
+ assertEquals("http://localhost:9090", queryEndpoint.getConfiguration().getUriEndpointOverride());
+
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/AmazonTimestreamQueryClientMock.java b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/AmazonTimestreamQueryClientMock.java
new file mode 100644
index 00000000000..3cf54c21fae
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/AmazonTimestreamQueryClientMock.java
@@ -0,0 +1,116 @@
+/*
+ * 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.timestream.query;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient;
+import software.amazon.awssdk.services.timestreamquery.model.*;
+
+public class AmazonTimestreamQueryClientMock implements TimestreamQueryClient {
+
+ public AmazonTimestreamQueryClientMock() {
+ }
+
+ @Override
+ public DescribeEndpointsResponse describeEndpoints(DescribeEndpointsRequest describeEndpointsRequest) {
+ DescribeEndpointsResponse.Builder result = DescribeEndpointsResponse.builder();
+ Endpoint.Builder endpoint = Endpoint.builder();
+ endpoint.address("query.timestream.region.amazonaws.com");
+ List<Endpoint> endpointList = new ArrayList<>();
+ endpointList.add(endpoint.build());
+ result.endpoints(endpointList);
+ return result.build();
+ }
+
+ @Override
+ public CancelQueryResponse cancelQuery(CancelQueryRequest cancelQueryRequest) {
+ CancelQueryResponse.Builder result = CancelQueryResponse.builder();
+ result.cancellationMessage("Query Cancelled");
+ return result.build();
+ }
+
+ @Override
+ public CreateScheduledQueryResponse createScheduledQuery(CreateScheduledQueryRequest createScheduledQueryRequest) {
+ CreateScheduledQueryResponse.Builder result = CreateScheduledQueryResponse.builder();
+ result.arn("aws-timestream:test:scheduled-query:arn");
+ return result.build();
+ }
+
+ @Override
+ public DeleteScheduledQueryResponse deleteScheduledQuery(DeleteScheduledQueryRequest deleteScheduledQueryRequest) {
+ DeleteScheduledQueryResponse.Builder result = DeleteScheduledQueryResponse.builder();
+ return result.build();
+ }
+
+ @Override
+ public DescribeScheduledQueryResponse describeScheduledQuery(DescribeScheduledQueryRequest describeScheduledQueryRequest) {
+ DescribeScheduledQueryResponse.Builder result = DescribeScheduledQueryResponse.builder();
+ ScheduledQueryDescription.Builder description = ScheduledQueryDescription.builder();
+ description.arn("aws-timestream:test:scheduled-query:arn");
+ result.scheduledQuery(description.build());
+ return result.build();
+ }
+
+ @Override
+ public ExecuteScheduledQueryResponse executeScheduledQuery(ExecuteScheduledQueryRequest executeScheduledQueryRequest) {
+ ExecuteScheduledQueryResponse.Builder result = ExecuteScheduledQueryResponse.builder();
+ return result.build();
+ }
+
+ @Override
+ public ListScheduledQueriesResponse listScheduledQueries(ListScheduledQueriesRequest listScheduledQueriesRequest) {
+ ListScheduledQueriesResponse.Builder result = ListScheduledQueriesResponse.builder();
+ List<ScheduledQuery> scheduledQueries = new ArrayList<>();
+ ScheduledQuery.Builder scheduledQuery = ScheduledQuery.builder();
+ scheduledQuery.arn("aws-timestream:test:scheduled-query:arn");
+ scheduledQueries.add(scheduledQuery.build());
+ result.scheduledQueries(scheduledQueries);
+ return result.build();
+ }
+
+ @Override
+ public PrepareQueryResponse prepareQuery(PrepareQueryRequest prepareQueryRequest) {
+ PrepareQueryResponse.Builder result = PrepareQueryResponse.builder();
+ result.queryString("select * from test_db");
+ return result.build();
+ }
+
+ @Override
+ public QueryResponse query(QueryRequest queryRequest) {
+ QueryResponse.Builder result = QueryResponse.builder();
+ result.queryId("query-1");
+ return result.build();
+ }
+
+ @Override
+ public UpdateScheduledQueryResponse updateScheduledQuery(UpdateScheduledQueryRequest updateScheduledQueryRequest) {
+ UpdateScheduledQueryResponse.Builder result = UpdateScheduledQueryResponse.builder();
+ return result.build();
+ }
+
+ @Override
+ public String serviceName() {
+ return TimestreamQueryClient.SERVICE_NAME;
+ }
+
+ @Override
+ public void close() {
+
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerHealthCheckProfileCredsTest.java b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerHealthCheckProfileCredsTest.java
new file mode 100644
index 00000000000..c3435f3e86c
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerHealthCheckProfileCredsTest.java
@@ -0,0 +1,94 @@
+/*
+ * 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.timestream.query;
+
+import java.util.Collection;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.health.HealthCheck;
+import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.health.HealthCheckRegistry;
+import org.apache.camel.health.HealthCheckRepository;
+import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
+
+public class Timestream2QueryProducerHealthCheckProfileCredsTest extends CamelTestSupport {
+
+ CamelContext context;
+
+ @Override
+ protected CamelContext createCamelContext() throws Exception {
+ context = super.createCamelContext();
+ context.getPropertiesComponent().setLocation("ref:prop");
+
+ // install health check manually (yes a bit cumbersome)
+ HealthCheckRegistry registry = new DefaultHealthCheckRegistry();
+ registry.setCamelContext(context);
+ Object hc = registry.resolveById("context");
+ registry.register(hc);
+ hc = registry.resolveById("routes");
+ registry.register(hc);
+ hc = registry.resolveById("consumers");
+ registry.register(hc);
+ HealthCheckRepository hcr = (HealthCheckRepository) registry.resolveById("producers");
+ hcr.setEnabled(true);
+ registry.register(hcr);
+ context.getCamelContextExtension().addContextPlugin(HealthCheckRegistry.class, registry);
+
+ return context;
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+
+ @Override
+ public void configure() {
+ from("direct:describeEndpoints")
+ .to("aws2-timestream://query:test?operation=describeEndpoints®ion=l&useDefaultCredentialsProvider=true");
+ }
+ };
+ }
+
+ @Test
+ public void testConnectivity() {
+ Collection<HealthCheck.Result> res = HealthCheckHelper.invokeLiveness(context);
+ boolean up = res.stream().allMatch(r -> r.getState().equals(HealthCheck.State.UP));
+ Assertions.assertTrue(up, "liveness check");
+
+ // health-check readiness should be down
+ await().atMost(20, TimeUnit.SECONDS).untilAsserted(() -> {
+ Collection<HealthCheck.Result> res2 = HealthCheckHelper.invokeReadiness(context);
+ boolean down = res2.stream().allMatch(r -> r.getState().equals(HealthCheck.State.DOWN));
+ boolean containsAws2TimestreamHealthCheck = res2.stream()
+ .anyMatch(result -> result.getCheck().getId().startsWith("producer:aws2-timestream-query"));
+ boolean hasRegionMessage = res2.stream()
+ .anyMatch(r -> r.getMessage().stream().anyMatch(msg -> msg.contains("region")));
+ Assertions.assertTrue(down, "liveness check");
+ Assertions.assertTrue(containsAws2TimestreamHealthCheck, "aws2-timestream-query check");
+ Assertions.assertTrue(hasRegionMessage, "aws2-timestream-query check error message");
+ });
+
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerHealthCheckStaticCredsTest.java b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerHealthCheckStaticCredsTest.java
new file mode 100644
index 00000000000..217742970eb
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerHealthCheckStaticCredsTest.java
@@ -0,0 +1,95 @@
+/*
+ * 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.timestream.query;
+
+import java.util.Collection;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.health.HealthCheck;
+import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.health.HealthCheckRegistry;
+import org.apache.camel.health.HealthCheckRepository;
+import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
+
+public class Timestream2QueryProducerHealthCheckStaticCredsTest extends CamelTestSupport {
+
+ CamelContext context;
+
+ @Override
+ protected CamelContext createCamelContext() throws Exception {
+ context = super.createCamelContext();
+ context.getPropertiesComponent().setLocation("ref:prop");
+
+ // install health check manually (yes a bit cumbersome)
+ HealthCheckRegistry registry = new DefaultHealthCheckRegistry();
+ registry.setCamelContext(context);
+ Object hc = registry.resolveById("context");
+ registry.register(hc);
+ hc = registry.resolveById("routes");
+ registry.register(hc);
+ hc = registry.resolveById("consumers");
+ registry.register(hc);
+ HealthCheckRepository hcr = (HealthCheckRepository) registry.resolveById("producers");
+ hcr.setEnabled(true);
+ registry.register(hcr);
+ context.getCamelContextExtension().addContextPlugin(HealthCheckRegistry.class, registry);
+
+ return context;
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+
+ @Override
+ public void configure() {
+ from("direct:describeEndpoints")
+ .to("aws2-timestream://query:test?operation=describeEndpoints®ion=l&secretKey=l&accessKey=k");
+ }
+ };
+ }
+
+ @Test
+ public void testConnectivity() {
+
+ Collection<HealthCheck.Result> res = HealthCheckHelper.invokeLiveness(context);
+ boolean up = res.stream().allMatch(r -> r.getState().equals(HealthCheck.State.UP));
+ Assertions.assertTrue(up, "liveness check");
+
+ // health-check readiness should be down
+ await().atMost(20, TimeUnit.SECONDS).untilAsserted(() -> {
+ Collection<HealthCheck.Result> res2 = HealthCheckHelper.invokeReadiness(context);
+ boolean down = res2.stream().allMatch(r -> r.getState().equals(HealthCheck.State.DOWN));
+ boolean containsAws2TimestreamQueryHealthCheck = res2.stream()
+ .anyMatch(result -> result.getCheck().getId().startsWith("producer:aws2-timestream-query"));
+ boolean hasRegionMessage = res2.stream()
+ .anyMatch(r -> r.getMessage().stream().anyMatch(msg -> msg.contains("region")));
+ Assertions.assertTrue(down, "liveness check");
+ Assertions.assertTrue(containsAws2TimestreamQueryHealthCheck, "aws2-timestream-query check");
+ Assertions.assertTrue(hasRegionMessage, "aws2-timestream-query check error message");
+ });
+
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerSpringTest.java b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerSpringTest.java
new file mode 100644
index 00000000000..ca48779559f
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerSpringTest.java
@@ -0,0 +1,234 @@
+/*
+ * 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.timestream.query;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.component.aws2.timestream.Timestream2Constants;
+import org.apache.camel.component.aws2.timestream.Timestream2Operations;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
+import org.junit.jupiter.api.Test;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import software.amazon.awssdk.services.timestreamquery.model.*;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class Timestream2QueryProducerSpringTest extends CamelSpringTestSupport {
+
+ @EndpointInject("mock:result")
+ private MockEndpoint mock;
+
+ @Test
+ public void timestreamDescribeQueryEndpointTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeQueryEndpoints", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeEndpoints);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeEndpointsResponse resultGet = (DescribeEndpointsResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.endpoints().size());
+ assertEquals("query.timestream.region.amazonaws.com", resultGet.endpoints().get(0).address());
+ }
+
+ @Test
+ public void timestreamDescribeQueryEndpointPojoTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeQueryEndpointsPojo", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeEndpoints);
+ exchange.getIn().setBody(DescribeEndpointsRequest.builder().build());
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeEndpointsResponse resultGet = (DescribeEndpointsResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.endpoints().size());
+ assertEquals("query.timestream.region.amazonaws.com", resultGet.endpoints().get(0).address());
+ }
+
+ @Test
+ public void timestreamCreateScheduledQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createScheduledQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.createScheduledQuery);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateScheduledQueryResponse resultGet = (CreateScheduledQueryResponse) exchange.getIn().getBody();
+ assertEquals("aws-timestream:test:scheduled-query:arn", resultGet.arn());
+ }
+
+ @Test
+ public void timestreamDeleteScheduledQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:deleteScheduledQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.deleteScheduledQuery);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DeleteScheduledQueryResponse resultGet = (DeleteScheduledQueryResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamExecuteScheduledQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:executeScheduledQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.executeScheduledQuery);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ExecuteScheduledQueryResponse resultGet = (ExecuteScheduledQueryResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamUpdateScheduledQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:updateScheduledQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.updateScheduledQuery);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ UpdateScheduledQueryResponse resultGet = (UpdateScheduledQueryResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamDescribeScheduledQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeScheduledQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeScheduledQuery);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeScheduledQueryResponse resultGet = (DescribeScheduledQueryResponse) exchange.getIn().getBody();
+ assertEquals("aws-timestream:test:scheduled-query:arn", resultGet.scheduledQuery().arn());
+ }
+
+ @Test
+ public void timestreamListScheduledQueriesTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listScheduledQueries", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.listScheduledQueries);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListScheduledQueriesResponse resultGet = (ListScheduledQueriesResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.scheduledQueries().size());
+ assertEquals("aws-timestream:test:scheduled-query:arn", resultGet.scheduledQueries().get(0).arn());
+ }
+
+ @Test
+ public void timestreamPrepareQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:prepareQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.prepareQuery);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ PrepareQueryResponse resultGet = (PrepareQueryResponse) exchange.getIn().getBody();
+ assertEquals("select * from test_db", resultGet.queryString());
+ }
+
+ @Test
+ public void timestreamQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:query", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.query);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ QueryResponse resultGet = (QueryResponse) exchange.getIn().getBody();
+ assertEquals("query-1", resultGet.queryId());
+ }
+
+ @Test
+ public void timestreamCancelQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:cancelQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.cancelQuery);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CancelQueryResponse resultGet = (CancelQueryResponse) exchange.getIn().getBody();
+ assertEquals("Query Cancelled", resultGet.cancellationMessage());
+ }
+
+ @Override
+ protected ClassPathXmlApplicationContext createApplicationContext() {
+ return new ClassPathXmlApplicationContext(
+ "org/apache/camel/component/aws2/timestream/TimestreamComponentSpringTest-context.xml");
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerTest.java b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerTest.java
new file mode 100644
index 00000000000..846df528395
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/query/Timestream2QueryProducerTest.java
@@ -0,0 +1,291 @@
+/*
+ * 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.timestream.query;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.camel.BindToRegistry;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.aws2.timestream.Timestream2Constants;
+import org.apache.camel.component.aws2.timestream.Timestream2Operations;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.services.timestreamquery.model.*;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class Timestream2QueryProducerTest extends CamelTestSupport {
+
+ @BindToRegistry("awsTimestreamQueryClient")
+ AmazonTimestreamQueryClientMock clientMock = new AmazonTimestreamQueryClientMock();
+
+ @EndpointInject("mock:result")
+ private MockEndpoint mock;
+
+ @Test
+ public void timestreamDescribeQueryEndpointsTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeQueryEndpoints", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeEndpoints);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeEndpointsResponse resultGet = (DescribeEndpointsResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.endpoints().size());
+ assertEquals("query.timestream.region.amazonaws.com", resultGet.endpoints().get(0).address());
+ }
+
+ @Test
+ public void timestreamDescribeQueryEndpointsPojoTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeQueryEndpointsPojo", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeEndpoints);
+ exchange.getIn().setBody(DescribeEndpointsRequest.builder().build());
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeEndpointsResponse resultGet = (DescribeEndpointsResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.endpoints().size());
+ assertEquals("query.timestream.region.amazonaws.com", resultGet.endpoints().get(0).address());
+ }
+
+ @Test
+ public void timestreamCreateScheduledQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createScheduledQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.createScheduledQuery);
+ DimensionMapping.Builder builder = DimensionMapping.builder();
+ builder.dimensionValueType("dimensionValue");
+ List<DimensionMapping> dimensionMappingList = new ArrayList<>();
+ dimensionMappingList.add(builder.build());
+ MultiMeasureMappings.Builder multiMeasureMapping = MultiMeasureMappings.builder();
+ multiMeasureMapping.targetMultiMeasureName("MM1");
+ List<MultiMeasureMappings> multiMeasureMappings = new ArrayList<>();
+ multiMeasureMappings.add(multiMeasureMapping.build());
+ exchange.getIn().setHeader(Timestream2Constants.DIMENSION_MAPPING_LIST, dimensionMappingList);
+ exchange.getIn().setHeader(Timestream2Constants.MULTI_MEASURE_MAPPINGS, multiMeasureMappings);
+ exchange.getIn().setHeader(Timestream2Constants.DATABASE_NAME, "TESTDB");
+ exchange.getIn().setHeader(Timestream2Constants.TABLE_NAME, "TESTTABLE");
+ exchange.getIn().setHeader(Timestream2Constants.TIME_COLUMN, "time");
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateScheduledQueryResponse resultGet = (CreateScheduledQueryResponse) exchange.getIn().getBody();
+ assertEquals("aws-timestream:test:scheduled-query:arn", resultGet.arn());
+ }
+
+ @Test
+ public void timestreamDeleteScheduledQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:deleteScheduledQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.deleteScheduledQuery);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DeleteScheduledQueryResponse resultGet = (DeleteScheduledQueryResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamExecuteScheduledQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:executeScheduledQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.executeScheduledQuery);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ExecuteScheduledQueryResponse resultGet = (ExecuteScheduledQueryResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamUpdateScheduledQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:updateScheduledQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.updateScheduledQuery);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ UpdateScheduledQueryResponse resultGet = (UpdateScheduledQueryResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamDescribeScheduledQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeScheduledQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeScheduledQuery);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeScheduledQueryResponse resultGet = (DescribeScheduledQueryResponse) exchange.getIn().getBody();
+ assertEquals("aws-timestream:test:scheduled-query:arn", resultGet.scheduledQuery().arn());
+ }
+
+ @Test
+ public void timestreamListScheduledQueriesTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listScheduledQueries", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.listScheduledQueries);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListScheduledQueriesResponse resultGet = (ListScheduledQueriesResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.scheduledQueries().size());
+ assertEquals("aws-timestream:test:scheduled-query:arn", resultGet.scheduledQueries().get(0).arn());
+ }
+
+ @Test
+ public void timestreamPrepareQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:prepareQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.prepareQuery);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ PrepareQueryResponse resultGet = (PrepareQueryResponse) exchange.getIn().getBody();
+ assertEquals("select * from test_db", resultGet.queryString());
+ }
+
+ @Test
+ public void timestreamQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:query", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.query);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ QueryResponse resultGet = (QueryResponse) exchange.getIn().getBody();
+ assertEquals("query-1", resultGet.queryId());
+ }
+
+ @Test
+ public void timestreamCancelQueryTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:cancelQuery", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.cancelQuery);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CancelQueryResponse resultGet = (CancelQueryResponse) exchange.getIn().getBody();
+ assertEquals("Query Cancelled", resultGet.cancellationMessage());
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("direct:describeQueryEndpoints")
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=describeEndpoints")
+ .to("mock:result");
+ from("direct:describeQueryEndpointsPojo")
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=describeEndpoints&pojoRequest=true")
+ .to("mock:result");
+ from("direct:createScheduledQuery")
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=createScheduledQuery")
+ .to("mock:result");
+ from("direct:deleteScheduledQuery")
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=deleteScheduledQuery")
+ .to("mock:result");
+ from("direct:executeScheduledQuery")
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=executeScheduledQuery")
+ .to("mock:result");
+ from("direct:updateScheduledQuery")
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=updateScheduledQuery")
+ .to("mock:result");
+ from("direct:describeScheduledQuery")
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=describeScheduledQuery")
+ .to("mock:result");
+ from("direct:listScheduledQueries")
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=listScheduledQueries")
+ .to("mock:result");
+ from("direct:prepareQuery")
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=prepareQuery")
+ .to("mock:result");
+ from("direct:query")
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=query")
+ .to("mock:result");
+ from("direct:cancelQuery")
+ .to("aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=cancelQuery")
+ .to("mock:result");
+
+ }
+ };
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/AmazonTimestreamWriteClientMock.java b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/AmazonTimestreamWriteClientMock.java
new file mode 100644
index 00000000000..1cf6813d3be
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/AmazonTimestreamWriteClientMock.java
@@ -0,0 +1,163 @@
+/*
+ * 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.timestream.write;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient;
+import software.amazon.awssdk.services.timestreamwrite.model.*;
+
+public class AmazonTimestreamWriteClientMock implements TimestreamWriteClient {
+
+ public AmazonTimestreamWriteClientMock() {
+ }
+
+ @Override
+ public DescribeEndpointsResponse describeEndpoints(DescribeEndpointsRequest describeEndpointsRequest) {
+ DescribeEndpointsResponse.Builder result = DescribeEndpointsResponse.builder();
+ Endpoint.Builder endpoint = Endpoint.builder();
+ endpoint.address("ingest.timestream.region.amazonaws.com");
+ List<Endpoint> endpointList = new ArrayList<>();
+ endpointList.add(endpoint.build());
+ result.endpoints(endpointList);
+ return result.build();
+ }
+
+ @Override
+ public CreateBatchLoadTaskResponse createBatchLoadTask(CreateBatchLoadTaskRequest createBatchLoadTaskRequest) {
+ CreateBatchLoadTaskResponse.Builder result = CreateBatchLoadTaskResponse.builder();
+ result.taskId("task-1");
+ return result.build();
+ }
+
+ @Override
+ public CreateDatabaseResponse createDatabase(CreateDatabaseRequest createDatabaseRequest) {
+ CreateDatabaseResponse.Builder result = CreateDatabaseResponse.builder();
+ result.database(Database.builder().databaseName("testDb").build());
+ return result.build();
+ }
+
+ @Override
+ public CreateTableResponse createTable(CreateTableRequest createTableRequest) {
+ CreateTableResponse.Builder result = CreateTableResponse.builder();
+ result.table(Table.builder().tableName("testTable").build());
+ return result.build();
+ }
+
+ @Override
+ public DeleteDatabaseResponse deleteDatabase(DeleteDatabaseRequest deleteDatabaseRequest) {
+ DeleteDatabaseResponse.Builder result = DeleteDatabaseResponse.builder();
+ return result.build();
+ }
+
+ @Override
+ public DeleteTableResponse deleteTable(DeleteTableRequest deleteTableRequest) {
+ DeleteTableResponse.Builder result = DeleteTableResponse.builder();
+ return result.build();
+ }
+
+ @Override
+ public DescribeBatchLoadTaskResponse describeBatchLoadTask(DescribeBatchLoadTaskRequest describeBatchLoadTaskRequest) {
+ DescribeBatchLoadTaskResponse.Builder result = DescribeBatchLoadTaskResponse.builder();
+ result.batchLoadTaskDescription(BatchLoadTaskDescription.builder().taskId("task-1").build());
+ return result.build();
+ }
+
+ @Override
+ public DescribeDatabaseResponse describeDatabase(DescribeDatabaseRequest describeDatabaseRequest) {
+ DescribeDatabaseResponse.Builder result = DescribeDatabaseResponse.builder();
+ result.database(Database.builder().databaseName("testDb").build());
+ return result.build();
+ }
+
+ @Override
+ public DescribeTableResponse describeTable(DescribeTableRequest describeTableRequest) {
+ DescribeTableResponse.Builder result = DescribeTableResponse.builder();
+ result.table(Table.builder().tableName("testTable").build());
+ return result.build();
+ }
+
+ @Override
+ public ListBatchLoadTasksResponse listBatchLoadTasks(ListBatchLoadTasksRequest listBatchLoadTasksRequest) {
+ ListBatchLoadTasksResponse.Builder result = ListBatchLoadTasksResponse.builder();
+ BatchLoadTask.Builder batchLoadTask = BatchLoadTask.builder();
+ batchLoadTask.taskId("task-1");
+ List<BatchLoadTask> batchLoadTasks = new ArrayList<>();
+ batchLoadTasks.add(batchLoadTask.build());
+ result.batchLoadTasks(batchLoadTasks);
+ return result.build();
+ }
+
+ @Override
+ public ListDatabasesResponse listDatabases(ListDatabasesRequest listDatabasesRequest) {
+ ListDatabasesResponse.Builder result = ListDatabasesResponse.builder();
+ Database.Builder database = Database.builder();
+ database.databaseName("testDb");
+ List<Database> databases = new ArrayList<>();
+ databases.add(database.build());
+ result.databases(databases);
+ return result.build();
+ }
+
+ @Override
+ public ListTablesResponse listTables(ListTablesRequest listTablesRequest) {
+ ListTablesResponse.Builder result = ListTablesResponse.builder();
+ Table.Builder table = Table.builder().tableName("testTable");
+ List<Table> tables = new ArrayList<>();
+ tables.add(table.build());
+ result.tables(tables);
+ return result.build();
+ }
+
+ @Override
+ public ResumeBatchLoadTaskResponse resumeBatchLoadTask(ResumeBatchLoadTaskRequest resumeBatchLoadTaskRequest) {
+ ResumeBatchLoadTaskResponse.Builder result = ResumeBatchLoadTaskResponse.builder();
+ return result.build();
+ }
+
+ @Override
+ public UpdateDatabaseResponse updateDatabase(UpdateDatabaseRequest updateDatabaseRequest) {
+ UpdateDatabaseResponse.Builder result = UpdateDatabaseResponse.builder();
+ result.database(Database.builder().databaseName("testDb").build());
+ return result.build();
+ }
+
+ @Override
+ public UpdateTableResponse updateTable(UpdateTableRequest updateTableRequest) {
+ UpdateTableResponse.Builder result = UpdateTableResponse.builder();
+ result.table(Table.builder().tableName("testTable").build());
+ return result.build();
+ }
+
+ @Override
+ public WriteRecordsResponse writeRecords(WriteRecordsRequest writeRecordsRequest) {
+ WriteRecordsResponse.Builder result = WriteRecordsResponse.builder();
+ result.recordsIngested(RecordsIngested.builder().total(5).build());
+ return result.build();
+ }
+
+ @Override
+ public String serviceName() {
+ return SERVICE_NAME;
+ }
+
+ @Override
+ public void close() {
+
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerHealthCheckProfileCredsTest.java b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerHealthCheckProfileCredsTest.java
new file mode 100644
index 00000000000..49832cb8762
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerHealthCheckProfileCredsTest.java
@@ -0,0 +1,94 @@
+/*
+ * 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.timestream.write;
+
+import java.util.Collection;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.health.HealthCheck;
+import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.health.HealthCheckRegistry;
+import org.apache.camel.health.HealthCheckRepository;
+import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
+
+public class Timestream2WriteProducerHealthCheckProfileCredsTest extends CamelTestSupport {
+
+ CamelContext context;
+
+ @Override
+ protected CamelContext createCamelContext() throws Exception {
+ context = super.createCamelContext();
+ context.getPropertiesComponent().setLocation("ref:prop");
+
+ // install health check manually (yes a bit cumbersome)
+ HealthCheckRegistry registry = new DefaultHealthCheckRegistry();
+ registry.setCamelContext(context);
+ Object hc = registry.resolveById("context");
+ registry.register(hc);
+ hc = registry.resolveById("routes");
+ registry.register(hc);
+ hc = registry.resolveById("consumers");
+ registry.register(hc);
+ HealthCheckRepository hcr = (HealthCheckRepository) registry.resolveById("producers");
+ hcr.setEnabled(true);
+ registry.register(hcr);
+ context.getCamelContextExtension().addContextPlugin(HealthCheckRegistry.class, registry);
+
+ return context;
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+
+ @Override
+ public void configure() {
+ from("direct:describeEndpoints")
+ .to("aws2-timestream://write:test?operation=describeEndpoints®ion=l&useDefaultCredentialsProvider=true");
+ }
+ };
+ }
+
+ @Test
+ public void testConnectivity() {
+ Collection<HealthCheck.Result> res = HealthCheckHelper.invokeLiveness(context);
+ boolean up = res.stream().allMatch(r -> r.getState().equals(HealthCheck.State.UP));
+ Assertions.assertTrue(up, "liveness check");
+
+ // health-check readiness should be down
+ await().atMost(20, TimeUnit.SECONDS).untilAsserted(() -> {
+ Collection<HealthCheck.Result> res2 = HealthCheckHelper.invokeReadiness(context);
+ boolean down = res2.stream().allMatch(r -> r.getState().equals(HealthCheck.State.DOWN));
+ boolean containsAws2TimestreamHealthCheck = res2.stream()
+ .anyMatch(result -> result.getCheck().getId().startsWith("producer:aws2-timestream-write"));
+ boolean hasRegionMessage = res2.stream()
+ .anyMatch(r -> r.getMessage().stream().anyMatch(msg -> msg.contains("region")));
+ Assertions.assertTrue(down, "liveness check");
+ Assertions.assertTrue(containsAws2TimestreamHealthCheck, "aws2-timestream-write check");
+ Assertions.assertTrue(hasRegionMessage, "aws2-timestream-write check error message");
+ });
+
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerHealthCheckStaticCredsTest.java b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerHealthCheckStaticCredsTest.java
new file mode 100644
index 00000000000..7f89c242e85
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerHealthCheckStaticCredsTest.java
@@ -0,0 +1,95 @@
+/*
+ * 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.timestream.write;
+
+import java.util.Collection;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.health.HealthCheck;
+import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.health.HealthCheckRegistry;
+import org.apache.camel.health.HealthCheckRepository;
+import org.apache.camel.impl.health.DefaultHealthCheckRegistry;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import static org.testcontainers.shaded.org.awaitility.Awaitility.await;
+
+public class Timestream2WriteProducerHealthCheckStaticCredsTest extends CamelTestSupport {
+
+ CamelContext context;
+
+ @Override
+ protected CamelContext createCamelContext() throws Exception {
+ context = super.createCamelContext();
+ context.getPropertiesComponent().setLocation("ref:prop");
+
+ // install health check manually (yes a bit cumbersome)
+ HealthCheckRegistry registry = new DefaultHealthCheckRegistry();
+ registry.setCamelContext(context);
+ Object hc = registry.resolveById("context");
+ registry.register(hc);
+ hc = registry.resolveById("routes");
+ registry.register(hc);
+ hc = registry.resolveById("consumers");
+ registry.register(hc);
+ HealthCheckRepository hcr = (HealthCheckRepository) registry.resolveById("producers");
+ hcr.setEnabled(true);
+ registry.register(hcr);
+ context.getCamelContextExtension().addContextPlugin(HealthCheckRegistry.class, registry);
+
+ return context;
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+
+ @Override
+ public void configure() {
+ from("direct:describeEndpoints")
+ .to("aws2-timestream://write:test?operation=describeEndpoints®ion=l&secretKey=l&accessKey=k");
+ }
+ };
+ }
+
+ @Test
+ public void testConnectivity() {
+
+ Collection<HealthCheck.Result> res = HealthCheckHelper.invokeLiveness(context);
+ boolean up = res.stream().allMatch(r -> r.getState().equals(HealthCheck.State.UP));
+ Assertions.assertTrue(up, "liveness check");
+
+ // health-check readiness should be down
+ await().atMost(20, TimeUnit.SECONDS).untilAsserted(() -> {
+ Collection<HealthCheck.Result> res2 = HealthCheckHelper.invokeReadiness(context);
+ boolean down = res2.stream().allMatch(r -> r.getState().equals(HealthCheck.State.DOWN));
+ boolean containsAws2TimestreamWriteHealthCheck = res2.stream()
+ .anyMatch(result -> result.getCheck().getId().startsWith("producer:aws2-timestream-write"));
+ boolean hasRegionMessage = res2.stream()
+ .anyMatch(r -> r.getMessage().stream().anyMatch(msg -> msg.contains("region")));
+ Assertions.assertTrue(down, "liveness check");
+ Assertions.assertTrue(containsAws2TimestreamWriteHealthCheck, "aws2-timestream-write check");
+ Assertions.assertTrue(hasRegionMessage, "aws2-timestream-write check error message");
+ });
+
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerSpringTest.java b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerSpringTest.java
new file mode 100644
index 00000000000..22163ced7ba
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerSpringTest.java
@@ -0,0 +1,338 @@
+/*
+ * 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.timestream.write;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.component.aws2.timestream.Timestream2Constants;
+import org.apache.camel.component.aws2.timestream.Timestream2Operations;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
+import org.junit.jupiter.api.Test;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import software.amazon.awssdk.services.timestreamwrite.model.*;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class Timestream2WriteProducerSpringTest extends CamelSpringTestSupport {
+
+ @EndpointInject("mock:result")
+ private MockEndpoint mock;
+
+ @Test
+ public void timestreamDescribeWriteEndpointTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeWriteEndpoints", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeEndpoints);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeEndpointsResponse resultGet = (DescribeEndpointsResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.endpoints().size());
+ assertEquals("ingest.timestream.region.amazonaws.com", resultGet.endpoints().get(0).address());
+ }
+
+ @Test
+ public void timestreamDescribeWriteEndpointPojoTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeWriteEndpointsPojo", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeEndpoints);
+ exchange.getIn().setBody(DescribeEndpointsRequest.builder().build());
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeEndpointsResponse resultGet = (DescribeEndpointsResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.endpoints().size());
+ assertEquals("ingest.timestream.region.amazonaws.com", resultGet.endpoints().get(0).address());
+ }
+
+ @Test
+ public void timestreamCreateBatchLoadTaskTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createBatchLoadTask", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.createBatchLoadTask);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateBatchLoadTaskResponse resultGet = (CreateBatchLoadTaskResponse) exchange.getIn().getBody();
+ assertEquals("task-1", resultGet.taskId());
+ }
+
+ @Test
+ public void timestreamDescribeBatchLoadTaskTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeBatchLoadTask", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeBatchLoadTask);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeBatchLoadTaskResponse resultGet = (DescribeBatchLoadTaskResponse) exchange.getIn().getBody();
+ assertEquals("task-1", resultGet.batchLoadTaskDescription().taskId());
+ }
+
+ @Test
+ public void timestreamResumeBatchLoadTaskTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:resumeBatchLoadTask", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.resumeBatchLoadTask);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ResumeBatchLoadTaskResponse resultGet = (ResumeBatchLoadTaskResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamListBatchLoadTasksTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listBatchLoadTasks", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.listBatchLoadTasks);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListBatchLoadTasksResponse resultGet = (ListBatchLoadTasksResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.batchLoadTasks().size());
+ assertEquals("task-1", resultGet.batchLoadTasks().get(0).taskId());
+ }
+
+ @Test
+ public void timestreamCreateDatabaseTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createDatabase", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.createDatabase);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateDatabaseResponse resultGet = (CreateDatabaseResponse) exchange.getIn().getBody();
+ assertEquals("testDb", resultGet.database().databaseName());
+ }
+
+ @Test
+ public void timestreamDeleteDatabaseTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:deleteDatabase", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.deleteDatabase);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DeleteDatabaseResponse resultGet = (DeleteDatabaseResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamDescribeDatabaseTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeDatabase", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeDatabase);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeDatabaseResponse resultGet = (DescribeDatabaseResponse) exchange.getIn().getBody();
+ assertEquals("testDb", resultGet.database().databaseName());
+ }
+
+ @Test
+ public void timestreamUpdateDatabaseTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:updateDatabase", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.updateDatabase);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ UpdateDatabaseResponse resultGet = (UpdateDatabaseResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamListDatabasesTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listDatabases", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.listDatabases);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListDatabasesResponse resultGet = (ListDatabasesResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.databases().size());
+ assertEquals("testDb", resultGet.databases().get(0).databaseName());
+ }
+
+ @Test
+ public void timestreamCreateTableTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createTable", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.createTable);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateTableResponse resultGet = (CreateTableResponse) exchange.getIn().getBody();
+ assertEquals("testTable", resultGet.table().tableName());
+ }
+
+ @Test
+ public void timestreamDeleteTableTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:deleteTable", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.deleteTable);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DeleteTableResponse resultGet = (DeleteTableResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamDescribeTableTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeTable", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeTable);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeTableResponse resultGet = (DescribeTableResponse) exchange.getIn().getBody();
+ assertEquals("testTable", resultGet.table().tableName());
+ }
+
+ @Test
+ public void timestreamUpdateTableTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:updateTable", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.updateTable);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ UpdateTableResponse resultGet = (UpdateTableResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamListTablesTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listTables", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.listTables);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListTablesResponse resultGet = (ListTablesResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.tables().size());
+ assertEquals("testTable", resultGet.tables().get(0).tableName());
+ }
+
+ @Test
+ public void timestreamWriteRecordsTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:writeRecords", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.writeRecords);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ WriteRecordsResponse resultGet = (WriteRecordsResponse) exchange.getIn().getBody();
+ assertEquals(5, resultGet.recordsIngested().total());
+ }
+
+ @Override
+ protected ClassPathXmlApplicationContext createApplicationContext() {
+ return new ClassPathXmlApplicationContext(
+ "org/apache/camel/component/aws2/timestream/TimestreamComponentSpringTest-context.xml");
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerTest.java b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerTest.java
new file mode 100644
index 00000000000..1ae7e56c713
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/java/org/apache/camel/component/aws2/timestream/write/Timestream2WriteProducerTest.java
@@ -0,0 +1,397 @@
+/*
+ * 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.timestream.write;
+
+import org.apache.camel.BindToRegistry;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.aws2.timestream.Timestream2Constants;
+import org.apache.camel.component.aws2.timestream.Timestream2Operations;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.services.timestreamwrite.model.*;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class Timestream2WriteProducerTest extends CamelTestSupport {
+
+ @BindToRegistry("awsTimestreamWriteClient")
+ AmazonTimestreamWriteClientMock clientMock = new AmazonTimestreamWriteClientMock();
+
+ @EndpointInject("mock:result")
+ private MockEndpoint mock;
+
+ @Test
+ public void timestreamDescribeWriteEndpointsTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeWriteEndpoints", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeEndpoints);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeEndpointsResponse resultGet = (DescribeEndpointsResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.endpoints().size());
+ assertEquals("ingest.timestream.region.amazonaws.com", resultGet.endpoints().get(0).address());
+ }
+
+ @Test
+ public void timestreamDescribeWriteEndpointsPojoTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeWriteEndpointsPojo", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeEndpoints);
+ exchange.getIn().setBody(DescribeEndpointsRequest.builder().build());
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeEndpointsResponse resultGet = (DescribeEndpointsResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.endpoints().size());
+ assertEquals("ingest.timestream.region.amazonaws.com", resultGet.endpoints().get(0).address());
+ }
+
+ @Test
+ public void timestreamCreateBatchLoadTaskTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createBatchLoadTask", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.createBatchLoadTask);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateBatchLoadTaskResponse resultGet = (CreateBatchLoadTaskResponse) exchange.getIn().getBody();
+ assertEquals("task-1", resultGet.taskId());
+ }
+
+ @Test
+ public void timestreamDescribeBatchLoadTaskTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeBatchLoadTask", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeBatchLoadTask);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeBatchLoadTaskResponse resultGet = (DescribeBatchLoadTaskResponse) exchange.getIn().getBody();
+ assertEquals("task-1", resultGet.batchLoadTaskDescription().taskId());
+ }
+
+ @Test
+ public void timestreamResumeBatchLoadTaskTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:resumeBatchLoadTask", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.resumeBatchLoadTask);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ResumeBatchLoadTaskResponse resultGet = (ResumeBatchLoadTaskResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamListBatchLoadTasksTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listBatchLoadTasks", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.listBatchLoadTasks);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListBatchLoadTasksResponse resultGet = (ListBatchLoadTasksResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.batchLoadTasks().size());
+ assertEquals("task-1", resultGet.batchLoadTasks().get(0).taskId());
+ }
+
+ @Test
+ public void timestreamCreateDatabaseTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createDatabase", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.createDatabase);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateDatabaseResponse resultGet = (CreateDatabaseResponse) exchange.getIn().getBody();
+ assertEquals("testDb", resultGet.database().databaseName());
+ }
+
+ @Test
+ public void timestreamDeleteDatabaseTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:deleteDatabase", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.deleteDatabase);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DeleteDatabaseResponse resultGet = (DeleteDatabaseResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamDescribeDatabaseTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeDatabase", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeDatabase);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeDatabaseResponse resultGet = (DescribeDatabaseResponse) exchange.getIn().getBody();
+ assertEquals("testDb", resultGet.database().databaseName());
+ }
+
+ @Test
+ public void timestreamUpdateDatabaseTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:updateDatabase", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.updateDatabase);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ UpdateDatabaseResponse resultGet = (UpdateDatabaseResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamListDatabasesTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listDatabases", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.listDatabases);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListDatabasesResponse resultGet = (ListDatabasesResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.databases().size());
+ assertEquals("testDb", resultGet.databases().get(0).databaseName());
+ }
+
+ @Test
+ public void timestreamCreateTableTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:createTable", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.createTable);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ CreateTableResponse resultGet = (CreateTableResponse) exchange.getIn().getBody();
+ assertEquals("testTable", resultGet.table().tableName());
+ }
+
+ @Test
+ public void timestreamDeleteTableTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:deleteTable", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.deleteTable);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DeleteTableResponse resultGet = (DeleteTableResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamDescribeTableTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:describeTable", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.describeTable);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ DescribeTableResponse resultGet = (DescribeTableResponse) exchange.getIn().getBody();
+ assertEquals("testTable", resultGet.table().tableName());
+ }
+
+ @Test
+ public void timestreamUpdateTableTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:updateTable", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.updateTable);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ UpdateTableResponse resultGet = (UpdateTableResponse) exchange.getIn().getBody();
+ assertNotNull(resultGet);
+ }
+
+ @Test
+ public void timestreamListTablesTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:listTables", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.listTables);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ ListTablesResponse resultGet = (ListTablesResponse) exchange.getIn().getBody();
+ assertEquals(1, resultGet.tables().size());
+ assertEquals("testTable", resultGet.tables().get(0).tableName());
+ }
+
+ @Test
+ public void timestreamWriteRecordsTest() throws Exception {
+
+ mock.expectedMessageCount(1);
+ Exchange exchange = template.request("direct:writeRecords", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(Timestream2Constants.OPERATION, Timestream2Operations.writeRecords);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ WriteRecordsResponse resultGet = (WriteRecordsResponse) exchange.getIn().getBody();
+ assertEquals(5, resultGet.recordsIngested().total());
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("direct:describeWriteEndpoints")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=describeEndpoints")
+ .to("mock:result");
+ from("direct:describeWriteEndpointsPojo")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=describeEndpoints&pojoRequest=true")
+ .to("mock:result");
+ from("direct:createBatchLoadTask")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=createBatchLoadTask")
+ .to("mock:result");
+ from("direct:describeBatchLoadTask")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=describeBatchLoadTask")
+ .to("mock:result");
+ from("direct:resumeBatchLoadTask")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=resumeBatchLoadTask")
+ .to("mock:result");
+ from("direct:listBatchLoadTasks")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=listBatchLoadTasks")
+ .to("mock:result");
+ from("direct:createDatabase")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=createDatabase")
+ .to("mock:result");
+ from("direct:deleteDatabase")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=deleteDatabase")
+ .to("mock:result");
+ from("direct:describeDatabase")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=describeDatabase")
+ .to("mock:result");
+ from("direct:updateDatabase")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=updateDatabase")
+ .to("mock:result");
+ from("direct:listDatabases")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=listDatabases")
+ .to("mock:result");
+ from("direct:createTable")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=createTable")
+ .to("mock:result");
+ from("direct:deleteTable")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=deleteTable")
+ .to("mock:result");
+ from("direct:describeTable")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=describeTable")
+ .to("mock:result");
+ from("direct:updateTable")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=updateTable")
+ .to("mock:result");
+ from("direct:listTables")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=listTables")
+ .to("mock:result");
+ from("direct:writeRecords")
+ .to("aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=writeRecords")
+ .to("mock:result");
+
+ }
+ };
+ }
+}
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/resources/log4j2.properties b/components/camel-aws/camel-aws2-timestream/src/test/resources/log4j2.properties
new file mode 100644
index 00000000000..d1eb7de76d2
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/resources/log4j2.properties
@@ -0,0 +1,28 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-aws2-timestream-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = file
diff --git a/components/camel-aws/camel-aws2-timestream/src/test/resources/org/apache/camel/component/aws2/timestream/TimestreamComponentSpringTest-context.xml b/components/camel-aws/camel-aws2-timestream/src/test/resources/org/apache/camel/component/aws2/timestream/TimestreamComponentSpringTest-context.xml
new file mode 100644
index 00000000000..f9ff08d4ab4
--- /dev/null
+++ b/components/camel-aws/camel-aws2-timestream/src/test/resources/org/apache/camel/component/aws2/timestream/TimestreamComponentSpringTest-context.xml
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
+
+ <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+ <route>
+ <from uri="direct:describeWriteEndpoints"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=describeEndpoints"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:describeWriteEndpointsPojo"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=describeEndpoints"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:createBatchLoadTask"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=createBatchLoadTask"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:describeBatchLoadTask"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=describeBatchLoadTask"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:resumeBatchLoadTask"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=resumeBatchLoadTask"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:listBatchLoadTasks"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=listBatchLoadTasks"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:createDatabase"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=createDatabase"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:deleteDatabase"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=deleteDatabase"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:describeDatabase"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=describeDatabase"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:updateDatabase"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=updateDatabase"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:listDatabases"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=listDatabases"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:createTable"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=createTable"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:deleteTable"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=deleteTable"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:describeTable"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=describeTable"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:updateTable"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=updateTable"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:listTables"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=listTables"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:writeRecords"/>
+ <to uri="aws2-timestream://write:test?awsTimestreamWriteClient=#awsTimestreamWriteClient&operation=writeRecords"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:describeQueryEndpoints"/>
+ <to uri="aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=describeEndpoints"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:describeQueryEndpointsPojo"/>
+ <to uri="aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=describeEndpoints"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:cancelQuery"/>
+ <to uri="aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=cancelQuery"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:createScheduledQuery"/>
+ <to uri="aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=createScheduledQuery"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:deleteScheduledQuery"/>
+ <to uri="aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=deleteScheduledQuery"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:executeScheduledQuery"/>
+ <to uri="aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=executeScheduledQuery"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:updateScheduledQuery"/>
+ <to uri="aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=updateScheduledQuery"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:describeScheduledQuery"/>
+ <to uri="aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=describeScheduledQuery"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:listScheduledQueries"/>
+ <to uri="aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=listScheduledQueries"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:prepareQuery"/>
+ <to uri="aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=prepareQuery"/>
+ <to uri="mock:result"/>
+ </route>
+ <route>
+ <from uri="direct:query"/>
+ <to uri="aws2-timestream://query:test?awsTimestreamQueryClient=#awsTimestreamQueryClient&operation=query"/>
+ <to uri="mock:result"/>
+ </route>
+
+ </camelContext>
+
+ <bean id="awsTimestreamWriteClient" class="org.apache.camel.component.aws2.timestream.write.AmazonTimestreamWriteClientMock"/>
+ <bean id="awsTimestreamQueryClient" class="org.apache.camel.component.aws2.timestream.query.AmazonTimestreamQueryClientMock"/>
+</beans>
\ No newline at end of file
diff --git a/components/camel-aws/pom.xml b/components/camel-aws/pom.xml
index fabcc99cea4..69e53019911 100644
--- a/components/camel-aws/pom.xml
+++ b/components/camel-aws/pom.xml
@@ -60,6 +60,7 @@
<module>camel-aws2-sqs</module>
<module>camel-aws2-step-functions</module>
<module>camel-aws2-sts</module>
+ <module>camel-aws2-timestream</module>
<module>camel-aws2-translate</module>
<module>camel-aws-xray</module>
</modules>
diff --git a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
index 75a7ac2930b..b6e196d2221 100644
--- a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
+++ b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
@@ -29,6 +29,7 @@ aws2-sns
aws2-sqs
aws2-step-functions
aws2-sts
+aws2-timestream
aws2-translate
azure-cosmosdb
azure-eventhubs
diff --git a/docs/components/modules/ROOT/examples/json/aws2-timestream.json b/docs/components/modules/ROOT/examples/json/aws2-timestream.json
new file mode 120000
index 00000000000..fb1d894fea8
--- /dev/null
+++ b/docs/components/modules/ROOT/examples/json/aws2-timestream.json
@@ -0,0 +1 @@
+../../../../../../components/camel-aws/camel-aws2-timestream/src/generated/resources/org/apache/camel/component/aws2/timestream/aws2-timestream.json
\ No newline at end of file
diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc
index 4a42be3934f..b74c494422c 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -34,6 +34,7 @@
*** xref:aws2-sns-component.adoc[AWS Simple Notification System (SNS)]
*** xref:aws2-sqs-component.adoc[AWS Simple Queue Service (SQS)]
*** xref:aws2-step-functions-component.adoc[AWS StepFunctions]
+*** xref:aws2-timestream-component.adoc[AWS Timestream]
*** xref:aws2-translate-component.adoc[AWS Translate]
** xref:azure-summary.adoc[Azure]
*** xref:azure-cosmosdb-component.adoc[Azure CosmosDB]
diff --git a/docs/components/modules/ROOT/pages/aws2-timestream-component.adoc b/docs/components/modules/ROOT/pages/aws2-timestream-component.adoc
new file mode 120000
index 00000000000..48aa2d5b1a7
--- /dev/null
+++ b/docs/components/modules/ROOT/pages/aws2-timestream-component.adoc
@@ -0,0 +1 @@
+../../../../../components/camel-aws/camel-aws2-timestream/src/main/docs/aws2-timestream-component.adoc
\ No newline at end of file
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index cda51c7bc6d..f95592f16c9 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -448,6 +448,19 @@ public interface ComponentsBuilderFactory {
static org.apache.camel.builder.component.dsl.Aws2StsComponentBuilderFactory.Aws2StsComponentBuilder aws2Sts() {
return org.apache.camel.builder.component.dsl.Aws2StsComponentBuilderFactory.aws2Sts();
}
+ /**
+ * AWS Timestream (camel-aws2-timestream)
+ * A Camel Amazon Web Services TimeStream component
+ *
+ * Category: cloud,database
+ * Since: 4.1
+ * Maven coordinates: org.apache.camel:camel-aws2-timestream
+ *
+ * @return the dsl builder
+ */
+ static org.apache.camel.builder.component.dsl.Aws2TimestreamComponentBuilderFactory.Aws2TimestreamComponentBuilder aws2Timestream() {
+ return org.apache.camel.builder.component.dsl.Aws2TimestreamComponentBuilderFactory.aws2Timestream();
+ }
/**
* AWS Translate (camel-aws2-translate)
* Translate texts using AWS Translate and AWS SDK version 2.x.
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2TimestreamComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2TimestreamComponentBuilderFactory.java
new file mode 100644
index 00000000000..56b66e29344
--- /dev/null
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2TimestreamComponentBuilderFactory.java
@@ -0,0 +1,459 @@
+/*
+ * 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.builder.component.dsl;
+
+import javax.annotation.processing.Generated;
+import org.apache.camel.Component;
+import org.apache.camel.builder.component.AbstractComponentBuilder;
+import org.apache.camel.builder.component.ComponentBuilder;
+import org.apache.camel.component.aws2.timestream.Timestream2Component;
+
+/**
+ * A Camel Amazon Web Services TimeStream component
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
+public interface Aws2TimestreamComponentBuilderFactory {
+
+ /**
+ * AWS Timestream (camel-aws2-timestream)
+ * A Camel Amazon Web Services TimeStream component
+ *
+ * Category: cloud,database
+ * Since: 4.1
+ * Maven coordinates: org.apache.camel:camel-aws2-timestream
+ *
+ * @return the dsl builder
+ */
+ static Aws2TimestreamComponentBuilder aws2Timestream() {
+ return new Aws2TimestreamComponentBuilderImpl();
+ }
+
+ /**
+ * Builder for the AWS Timestream component.
+ */
+ interface Aws2TimestreamComponentBuilder
+ extends
+ ComponentBuilder<Timestream2Component> {
+ /**
+ * Component configuration.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws2.timestream.Timestream2Configuration</code> type.
+ *
+ * Group: producer
+ *
+ * @param configuration the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder configuration(
+ org.apache.camel.component.aws2.timestream.Timestream2Configuration configuration) {
+ doSetProperty("configuration", configuration);
+ return this;
+ }
+ /**
+ * Whether the producer should be started lazy (on the first message).
+ * By starting lazy you can use this to allow CamelContext and routes to
+ * startup in situations where a producer may otherwise fail during
+ * starting and cause the route to fail being started. By deferring this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder lazyStartProducer(
+ boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * The operation to perform. It can be
+ * describeEndpoints,createBatchLoadTask,describeBatchLoadTask,
+ * resumeBatchLoadTask,listBatchLoadTasks,createDatabase,deleteDatabase,describeDatabase,updateDatabase, listDatabases,createTable,deleteTable,describeTable,updateTable,listTables,writeRecords, createScheduledQuery,deleteScheduledQuery,executeScheduledQuery,updateScheduledQuery, describeScheduledQuery,listScheduledQueries,prepareQuery,query,cancelQuery.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws2.timestream.Timestream2Operations</code> type.
+ *
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder operation(
+ org.apache.camel.component.aws2.timestream.Timestream2Operations operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * Set the need for overidding the endpoint. This option needs to be
+ * used in combination with uriEndpointOverride option.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param overrideEndpoint the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder overrideEndpoint(
+ boolean overrideEndpoint) {
+ doSetProperty("overrideEndpoint", overrideEndpoint);
+ return this;
+ }
+ /**
+ * If we want to use a POJO request as body or not.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param pojoRequest the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder pojoRequest(boolean pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+ /**
+ * If using a profile credentials provider this parameter will set the
+ * profile name.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param profileCredentialsName the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder profileCredentialsName(
+ java.lang.String profileCredentialsName) {
+ doSetProperty("profileCredentialsName", profileCredentialsName);
+ return this;
+ }
+ /**
+ * The region in which Timestream 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().
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param region the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder region(java.lang.String region) {
+ doSetProperty("region", region);
+ return this;
+ }
+ /**
+ * If we want to trust all certificates in case of overriding the
+ * endpoint.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param trustAllCertificates the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder trustAllCertificates(
+ boolean trustAllCertificates) {
+ doSetProperty("trustAllCertificates", trustAllCertificates);
+ return this;
+ }
+ /**
+ * Set the overriding uri endpoint. This option needs to be used in
+ * combination with overrideEndpoint option.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param uriEndpointOverride the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder uriEndpointOverride(
+ java.lang.String uriEndpointOverride) {
+ doSetProperty("uriEndpointOverride", uriEndpointOverride);
+ return this;
+ }
+ /**
+ * Set whether the Timestream client should expect to load credentials
+ * through a default credentials provider or to expect static
+ * credentials to be passed in.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useDefaultCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder useDefaultCredentialsProvider(
+ boolean useDefaultCredentialsProvider) {
+ doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the Timestream client should expect to load credentials
+ * through a profile credentials provider.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useProfileCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder useProfileCredentialsProvider(
+ boolean useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
+ /**
+ * Whether autowiring is enabled. This is used for automatic autowiring
+ * options (the option must be marked as autowired) by looking up in the
+ * registry to find if there is a single instance of matching type,
+ * which then gets configured on the component. This can be used for
+ * automatic configuring JDBC data sources, JMS connection factories,
+ * AWS Clients, etc.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: advanced
+ *
+ * @param autowiredEnabled the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder autowiredEnabled(
+ boolean autowiredEnabled) {
+ doSetProperty("autowiredEnabled", autowiredEnabled);
+ return this;
+ }
+ /**
+ * To use a existing configured AwsTimestreamQueryClient as client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param awsTimestreamQueryClient the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder awsTimestreamQueryClient(
+ software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient awsTimestreamQueryClient) {
+ doSetProperty("awsTimestreamQueryClient", awsTimestreamQueryClient);
+ return this;
+ }
+ /**
+ * To use a existing configured AwsTimestreamWriteClient as client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param awsTimestreamWriteClient the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder awsTimestreamWriteClient(
+ software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient awsTimestreamWriteClient) {
+ doSetProperty("awsTimestreamWriteClient", awsTimestreamWriteClient);
+ return this;
+ }
+ /**
+ * Used for enabling or disabling all consumer based health checks from
+ * this component.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: health
+ *
+ * @param healthCheckConsumerEnabled the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder healthCheckConsumerEnabled(
+ boolean healthCheckConsumerEnabled) {
+ doSetProperty("healthCheckConsumerEnabled", healthCheckConsumerEnabled);
+ return this;
+ }
+ /**
+ * Used for enabling or disabling all producer based health checks from
+ * this component. Notice: Camel has by default disabled all producer
+ * based health-checks. You can turn on producer checks globally by
+ * setting camel.health.producersEnabled=true.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: health
+ *
+ * @param healthCheckProducerEnabled the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder healthCheckProducerEnabled(
+ boolean healthCheckProducerEnabled) {
+ doSetProperty("healthCheckProducerEnabled", healthCheckProducerEnabled);
+ return this;
+ }
+ /**
+ * To define a proxy host when instantiating the Timestream client.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyHost the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder proxyHost(
+ java.lang.String proxyHost) {
+ doSetProperty("proxyHost", proxyHost);
+ return this;
+ }
+ /**
+ * To define a proxy port when instantiating the Timestream client.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyPort the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder proxyPort(
+ java.lang.Integer proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+ /**
+ * To define a proxy protocol when instantiating the Timestream client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.core.Protocol</code> type.
+ *
+ * Default: HTTPS
+ * Group: proxy
+ *
+ * @param proxyProtocol the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder proxyProtocol(
+ software.amazon.awssdk.core.Protocol proxyProtocol) {
+ doSetProperty("proxyProtocol", proxyProtocol);
+ return this;
+ }
+ /**
+ * Amazon AWS Access Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param accessKey the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder accessKey(
+ java.lang.String accessKey) {
+ doSetProperty("accessKey", accessKey);
+ return this;
+ }
+ /**
+ * Amazon AWS Secret Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param secretKey the value to set
+ * @return the dsl builder
+ */
+ default Aws2TimestreamComponentBuilder secretKey(
+ java.lang.String secretKey) {
+ doSetProperty("secretKey", secretKey);
+ return this;
+ }
+ }
+
+ class Aws2TimestreamComponentBuilderImpl
+ extends
+ AbstractComponentBuilder<Timestream2Component>
+ implements
+ Aws2TimestreamComponentBuilder {
+ @Override
+ protected Timestream2Component buildConcreteComponent() {
+ return new Timestream2Component();
+ }
+ private org.apache.camel.component.aws2.timestream.Timestream2Configuration getOrCreateConfiguration(
+ org.apache.camel.component.aws2.timestream.Timestream2Component component) {
+ if (component.getConfiguration() == null) {
+ component.setConfiguration(new org.apache.camel.component.aws2.timestream.Timestream2Configuration());
+ }
+ return component.getConfiguration();
+ }
+ @Override
+ protected boolean setPropertyOnComponent(
+ Component component,
+ String name,
+ Object value) {
+ switch (name) {
+ case "configuration": ((Timestream2Component) component).setConfiguration((org.apache.camel.component.aws2.timestream.Timestream2Configuration) value); return true;
+ case "lazyStartProducer": ((Timestream2Component) component).setLazyStartProducer((boolean) value); return true;
+ case "operation": getOrCreateConfiguration((Timestream2Component) component).setOperation((org.apache.camel.component.aws2.timestream.Timestream2Operations) value); return true;
+ case "overrideEndpoint": getOrCreateConfiguration((Timestream2Component) component).setOverrideEndpoint((boolean) value); return true;
+ case "pojoRequest": getOrCreateConfiguration((Timestream2Component) component).setPojoRequest((boolean) value); return true;
+ case "profileCredentialsName": getOrCreateConfiguration((Timestream2Component) component).setProfileCredentialsName((java.lang.String) value); return true;
+ case "region": getOrCreateConfiguration((Timestream2Component) component).setRegion((java.lang.String) value); return true;
+ case "trustAllCertificates": getOrCreateConfiguration((Timestream2Component) component).setTrustAllCertificates((boolean) value); return true;
+ case "uriEndpointOverride": getOrCreateConfiguration((Timestream2Component) component).setUriEndpointOverride((java.lang.String) value); return true;
+ case "useDefaultCredentialsProvider": getOrCreateConfiguration((Timestream2Component) component).setUseDefaultCredentialsProvider((boolean) value); return true;
+ case "useProfileCredentialsProvider": getOrCreateConfiguration((Timestream2Component) component).setUseProfileCredentialsProvider((boolean) value); return true;
+ case "autowiredEnabled": ((Timestream2Component) component).setAutowiredEnabled((boolean) value); return true;
+ case "awsTimestreamQueryClient": getOrCreateConfiguration((Timestream2Component) component).setAwsTimestreamQueryClient((software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient) value); return true;
+ case "awsTimestreamWriteClient": getOrCreateConfiguration((Timestream2Component) component).setAwsTimestreamWriteClient((software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient) value); return true;
+ case "healthCheckConsumerEnabled": ((Timestream2Component) component).setHealthCheckConsumerEnabled((boolean) value); return true;
+ case "healthCheckProducerEnabled": ((Timestream2Component) component).setHealthCheckProducerEnabled((boolean) value); return true;
+ case "proxyHost": getOrCreateConfiguration((Timestream2Component) component).setProxyHost((java.lang.String) value); return true;
+ case "proxyPort": getOrCreateConfiguration((Timestream2Component) component).setProxyPort((java.lang.Integer) value); return true;
+ case "proxyProtocol": getOrCreateConfiguration((Timestream2Component) component).setProxyProtocol((software.amazon.awssdk.core.Protocol) value); return true;
+ case "accessKey": getOrCreateConfiguration((Timestream2Component) component).setAccessKey((java.lang.String) value); return true;
+ case "secretKey": getOrCreateConfiguration((Timestream2Component) component).setSecretKey((java.lang.String) value); return true;
+ default: return false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/dsl/camel-componentdsl/src/generated/resources/metadata.json b/dsl/camel-componentdsl/src/generated/resources/metadata.json
index 30acc944c68..b2b34ae56b5 100644
--- a/dsl/camel-componentdsl/src/generated/resources/metadata.json
+++ b/dsl/camel-componentdsl/src/generated/resources/metadata.json
@@ -640,6 +640,28 @@
"producerOnly": true,
"lenientProperties": false
},
+ "Aws2TimestreamComponentBuilderFactory": {
+ "kind": "component",
+ "name": "aws2-timestream",
+ "title": "AWS Timestream",
+ "description": "A Camel Amazon Web Services TimeStream component",
+ "deprecated": false,
+ "firstVersion": "4.1.0",
+ "label": "cloud,database",
+ "javaType": "org.apache.camel.component.aws2.timestream.Timestream2Component",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-aws2-timestream",
+ "version": "4.1.0-SNAPSHOT",
+ "scheme": "aws2-timestream",
+ "extendsScheme": "",
+ "syntax": "aws2-timestream:clientType:label",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false
+ },
"Aws2TranslateComponentBuilderFactory": {
"kind": "component",
"name": "aws2-translate",
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
index f09034f5f87..fd487c3abcd 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
@@ -313,6 +313,7 @@ public interface EndpointBuilderFactory
org.apache.camel.builder.endpoint.dsl.ThriftEndpointBuilderFactory.ThriftBuilders,
org.apache.camel.builder.endpoint.dsl.TikaEndpointBuilderFactory.TikaBuilders,
org.apache.camel.builder.endpoint.dsl.TimerEndpointBuilderFactory.TimerBuilders,
+ org.apache.camel.builder.endpoint.dsl.Timestream2EndpointBuilderFactory.Timestream2Builders,
org.apache.camel.builder.endpoint.dsl.Translate2EndpointBuilderFactory.Translate2Builders,
org.apache.camel.builder.endpoint.dsl.TwilioEndpointBuilderFactory.TwilioBuilders,
org.apache.camel.builder.endpoint.dsl.TwitterDirectMessageEndpointBuilderFactory.TwitterDirectMessageBuilders,
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
index ae14a8f4e33..593df8dcf6b 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
@@ -310,6 +310,7 @@ public interface EndpointBuilders
org.apache.camel.builder.endpoint.dsl.ThriftEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.TikaEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.TimerEndpointBuilderFactory,
+ org.apache.camel.builder.endpoint.dsl.Timestream2EndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.Translate2EndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.TwilioEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.TwitterDirectMessageEndpointBuilderFactory,
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index 410ee313651..b632170141e 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -1327,6 +1327,57 @@ public class StaticEndpointBuilders {
String path) {
return org.apache.camel.builder.endpoint.dsl.STS2EndpointBuilderFactory.endpointBuilder(componentName, path);
}
+ /**
+ * AWS Timestream (camel-aws2-timestream)
+ * A Camel Amazon Web Services TimeStream component
+ *
+ * Category: cloud,database
+ * Since: 4.1
+ * Maven coordinates: org.apache.camel:camel-aws2-timestream
+ *
+ * Syntax: <code>aws2-timestream:clientType:label</code>
+ *
+ * Path parameter: clientType (required)
+ * Type of client - write/query
+ * There are 2 enums and the value can be one of: write, query
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param path clientType:label
+ * @return the dsl builder
+ */
+ public static org.apache.camel.builder.endpoint.dsl.Timestream2EndpointBuilderFactory.Timestream2EndpointBuilder aws2Timestream(
+ String path) {
+ return org.apache.camel.builder.endpoint.dsl.Timestream2EndpointBuilderFactory.endpointBuilder("aws2-timestream", path);
+ }
+ /**
+ * AWS Timestream (camel-aws2-timestream)
+ * A Camel Amazon Web Services TimeStream component
+ *
+ * Category: cloud,database
+ * Since: 4.1
+ * Maven coordinates: org.apache.camel:camel-aws2-timestream
+ *
+ * Syntax: <code>aws2-timestream:clientType:label</code>
+ *
+ * Path parameter: clientType (required)
+ * Type of client - write/query
+ * There are 2 enums and the value can be one of: write, query
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path clientType:label
+ * @return the dsl builder
+ */
+ public static org.apache.camel.builder.endpoint.dsl.Timestream2EndpointBuilderFactory.Timestream2EndpointBuilder aws2Timestream(
+ String componentName,
+ String path) {
+ return org.apache.camel.builder.endpoint.dsl.Timestream2EndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
/**
* AWS Translate (camel-aws2-translate)
* Translate texts using AWS Translate and AWS SDK version 2.x.
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Timestream2EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Timestream2EndpointBuilderFactory.java
new file mode 100644
index 00000000000..4fe2d5d20ba
--- /dev/null
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Timestream2EndpointBuilderFactory.java
@@ -0,0 +1,1148 @@
+/*
+ * 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.builder.endpoint.dsl;
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.function.*;
+import java.util.stream.*;
+import javax.annotation.processing.Generated;
+import org.apache.camel.builder.EndpointConsumerBuilder;
+import org.apache.camel.builder.EndpointProducerBuilder;
+import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
+
+/**
+ * A Camel Amazon Web Services TimeStream component
+ *
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public interface Timestream2EndpointBuilderFactory {
+
+
+ /**
+ * Builder for endpoint for the AWS Timestream component.
+ */
+ public interface Timestream2EndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default AdvancedTimestream2EndpointBuilder advanced() {
+ return (AdvancedTimestream2EndpointBuilder) this;
+ }
+ /**
+ * The operation to perform. It can be
+ * describeEndpoints,createBatchLoadTask,describeBatchLoadTask,
+ * resumeBatchLoadTask,listBatchLoadTasks,createDatabase,deleteDatabase,describeDatabase,updateDatabase, listDatabases,createTable,deleteTable,describeTable,updateTable,listTables,writeRecords, createScheduledQuery,deleteScheduledQuery,executeScheduledQuery,updateScheduledQuery, describeScheduledQuery,listScheduledQueries,prepareQuery,query,cancelQuery.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws2.timestream.Timestream2Operations</code> type.
+ *
+ * Required: true
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder operation(
+ org.apache.camel.component.aws2.timestream.Timestream2Operations operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * The operation to perform. It can be
+ * describeEndpoints,createBatchLoadTask,describeBatchLoadTask,
+ * resumeBatchLoadTask,listBatchLoadTasks,createDatabase,deleteDatabase,describeDatabase,updateDatabase, listDatabases,createTable,deleteTable,describeTable,updateTable,listTables,writeRecords, createScheduledQuery,deleteScheduledQuery,executeScheduledQuery,updateScheduledQuery, describeScheduledQuery,listScheduledQueries,prepareQuery,query,cancelQuery.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.component.aws2.timestream.Timestream2Operations</code> type.
+ *
+ * Required: true
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder operation(String operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * Set the need for overidding the endpoint. This option needs to be
+ * used in combination with uriEndpointOverride option.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param overrideEndpoint the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder overrideEndpoint(
+ boolean overrideEndpoint) {
+ doSetProperty("overrideEndpoint", overrideEndpoint);
+ return this;
+ }
+ /**
+ * Set the need for overidding the endpoint. This option needs to be
+ * used in combination with uriEndpointOverride option.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param overrideEndpoint the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder overrideEndpoint(
+ String overrideEndpoint) {
+ doSetProperty("overrideEndpoint", overrideEndpoint);
+ return this;
+ }
+ /**
+ * If we want to use a POJO request as body or not.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param pojoRequest the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder pojoRequest(boolean pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+ /**
+ * If we want to use a POJO request as body or not.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param pojoRequest the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder pojoRequest(String pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+ /**
+ * If using a profile credentials provider this parameter will set the
+ * profile name.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param profileCredentialsName the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder profileCredentialsName(
+ String profileCredentialsName) {
+ doSetProperty("profileCredentialsName", profileCredentialsName);
+ return this;
+ }
+ /**
+ * The region in which Timestream 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().
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param region the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder region(String region) {
+ doSetProperty("region", region);
+ return this;
+ }
+ /**
+ * If we want to trust all certificates in case of overriding the
+ * endpoint.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param trustAllCertificates the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder trustAllCertificates(
+ boolean trustAllCertificates) {
+ doSetProperty("trustAllCertificates", trustAllCertificates);
+ return this;
+ }
+ /**
+ * If we want to trust all certificates in case of overriding the
+ * endpoint.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param trustAllCertificates the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder trustAllCertificates(
+ String trustAllCertificates) {
+ doSetProperty("trustAllCertificates", trustAllCertificates);
+ return this;
+ }
+ /**
+ * Set the overriding uri endpoint. This option needs to be used in
+ * combination with overrideEndpoint option.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param uriEndpointOverride the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder uriEndpointOverride(
+ String uriEndpointOverride) {
+ doSetProperty("uriEndpointOverride", uriEndpointOverride);
+ return this;
+ }
+ /**
+ * Set whether the Timestream client should expect to load credentials
+ * through a default credentials provider or to expect static
+ * credentials to be passed in.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useDefaultCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder useDefaultCredentialsProvider(
+ boolean useDefaultCredentialsProvider) {
+ doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the Timestream client should expect to load credentials
+ * through a default credentials provider or to expect static
+ * credentials to be passed in.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useDefaultCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder useDefaultCredentialsProvider(
+ String useDefaultCredentialsProvider) {
+ doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the Timestream client should expect to load credentials
+ * through a profile credentials provider.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useProfileCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder useProfileCredentialsProvider(
+ boolean useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the Timestream client should expect to load credentials
+ * through a profile credentials provider.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param useProfileCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder useProfileCredentialsProvider(
+ String useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
+ /**
+ * To define a proxy host when instantiating the Timestream client.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyHost the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder proxyHost(String proxyHost) {
+ doSetProperty("proxyHost", proxyHost);
+ return this;
+ }
+ /**
+ * To define a proxy port when instantiating the Timestream client.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyPort the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder proxyPort(Integer proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+ /**
+ * To define a proxy port when instantiating the Timestream client.
+ *
+ * The option will be converted to a
+ * <code>java.lang.Integer</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyPort the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder proxyPort(String proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+ /**
+ * To define a proxy protocol when instantiating the Timestream client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.core.Protocol</code> type.
+ *
+ * Default: HTTPS
+ * Group: proxy
+ *
+ * @param proxyProtocol the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder proxyProtocol(
+ software.amazon.awssdk.core.Protocol proxyProtocol) {
+ doSetProperty("proxyProtocol", proxyProtocol);
+ return this;
+ }
+ /**
+ * To define a proxy protocol when instantiating the Timestream client.
+ *
+ * The option will be converted to a
+ * <code>software.amazon.awssdk.core.Protocol</code> type.
+ *
+ * Default: HTTPS
+ * Group: proxy
+ *
+ * @param proxyProtocol the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder proxyProtocol(String proxyProtocol) {
+ doSetProperty("proxyProtocol", proxyProtocol);
+ return this;
+ }
+ /**
+ * Amazon AWS Access Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param accessKey the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder accessKey(String accessKey) {
+ doSetProperty("accessKey", accessKey);
+ return this;
+ }
+ /**
+ * Amazon AWS Secret Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param secretKey the value to set
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder secretKey(String secretKey) {
+ doSetProperty("secretKey", secretKey);
+ return this;
+ }
+ }
+
+ /**
+ * Advanced builder for endpoint for the AWS Timestream component.
+ */
+ public interface AdvancedTimestream2EndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default Timestream2EndpointBuilder basic() {
+ return (Timestream2EndpointBuilder) this;
+ }
+ /**
+ * Whether the producer should be started lazy (on the first message).
+ * By starting lazy you can use this to allow CamelContext and routes to
+ * startup in situations where a producer may otherwise fail during
+ * starting and cause the route to fail being started. By deferring this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer (advanced)
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AdvancedTimestream2EndpointBuilder lazyStartProducer(
+ boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * Whether the producer should be started lazy (on the first message).
+ * By starting lazy you can use this to allow CamelContext and routes to
+ * startup in situations where a producer may otherwise fail during
+ * starting and cause the route to fail being started. By deferring this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: false
+ * Group: producer (advanced)
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AdvancedTimestream2EndpointBuilder lazyStartProducer(
+ String lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * To use a existing configured AwsTimestreamQueryClient as client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param awsTimestreamQueryClient the value to set
+ * @return the dsl builder
+ */
+ default AdvancedTimestream2EndpointBuilder awsTimestreamQueryClient(
+ software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient awsTimestreamQueryClient) {
+ doSetProperty("awsTimestreamQueryClient", awsTimestreamQueryClient);
+ return this;
+ }
+ /**
+ * To use a existing configured AwsTimestreamQueryClient as client.
+ *
+ * The option will be converted to a
+ * <code>software.amazon.awssdk.services.timestreamquery.TimestreamQueryClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param awsTimestreamQueryClient the value to set
+ * @return the dsl builder
+ */
+ default AdvancedTimestream2EndpointBuilder awsTimestreamQueryClient(
+ String awsTimestreamQueryClient) {
+ doSetProperty("awsTimestreamQueryClient", awsTimestreamQueryClient);
+ return this;
+ }
+ /**
+ * To use a existing configured AwsTimestreamWriteClient as client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param awsTimestreamWriteClient the value to set
+ * @return the dsl builder
+ */
+ default AdvancedTimestream2EndpointBuilder awsTimestreamWriteClient(
+ software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient awsTimestreamWriteClient) {
+ doSetProperty("awsTimestreamWriteClient", awsTimestreamWriteClient);
+ return this;
+ }
+ /**
+ * To use a existing configured AwsTimestreamWriteClient as client.
+ *
+ * The option will be converted to a
+ * <code>software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param awsTimestreamWriteClient the value to set
+ * @return the dsl builder
+ */
+ default AdvancedTimestream2EndpointBuilder awsTimestreamWriteClient(
+ String awsTimestreamWriteClient) {
+ doSetProperty("awsTimestreamWriteClient", awsTimestreamWriteClient);
+ return this;
+ }
+ }
+
+ public interface Timestream2Builders {
+ /**
+ * AWS Timestream (camel-aws2-timestream)
+ * A Camel Amazon Web Services TimeStream component
+ *
+ * Category: cloud,database
+ * Since: 4.1
+ * Maven coordinates: org.apache.camel:camel-aws2-timestream
+ *
+ * @return the dsl builder for the headers' name.
+ */
+ default Timestream2HeaderNameBuilder aws2Timestream() {
+ return Timestream2HeaderNameBuilder.INSTANCE;
+ }
+ /**
+ * AWS Timestream (camel-aws2-timestream)
+ * A Camel Amazon Web Services TimeStream component
+ *
+ * Category: cloud,database
+ * Since: 4.1
+ * Maven coordinates: org.apache.camel:camel-aws2-timestream
+ *
+ * Syntax: <code>aws2-timestream:clientType:label</code>
+ *
+ * Path parameter: clientType (required)
+ * Type of client - write/query
+ * There are 2 enums and the value can be one of: write, query
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param path clientType:label
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder aws2Timestream(String path) {
+ return Timestream2EndpointBuilderFactory.endpointBuilder("aws2-timestream", path);
+ }
+ /**
+ * AWS Timestream (camel-aws2-timestream)
+ * A Camel Amazon Web Services TimeStream component
+ *
+ * Category: cloud,database
+ * Since: 4.1
+ * Maven coordinates: org.apache.camel:camel-aws2-timestream
+ *
+ * Syntax: <code>aws2-timestream:clientType:label</code>
+ *
+ * Path parameter: clientType (required)
+ * Type of client - write/query
+ * There are 2 enums and the value can be one of: write, query
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path clientType:label
+ * @return the dsl builder
+ */
+ default Timestream2EndpointBuilder aws2Timestream(
+ String componentName,
+ String path) {
+ return Timestream2EndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
+ }
+
+ /**
+ * The builder of headers' name for the AWS Timestream component.
+ */
+ public static class Timestream2HeaderNameBuilder {
+ /**
+ * The internal instance of the builder used to access to all the
+ * methods representing the name of headers.
+ */
+ private static final Timestream2HeaderNameBuilder INSTANCE = new Timestream2HeaderNameBuilder();
+
+ /**
+ * The operation we want to perform.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamOperation}.
+ */
+ public String awsTimestreamOperation() {
+ return "AwsTimestreamOperation";
+ }
+
+ /**
+ * Represents a time-series data point being written into Timestream.
+ *
+ * The option is a: {@code
+ * software.amazon.awssdk.services.timestreamwrite.model.Record} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamRecord}.
+ */
+ public String awsTimestreamRecord() {
+ return "AwsTimestreamRecord";
+ }
+
+ /**
+ * List of Records.
+ *
+ * The option is a: {@code List} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamRecordList}.
+ */
+ public String awsTimestreamRecordList() {
+ return "AwsTimestreamRecordList";
+ }
+
+ /**
+ * Status of Batch Load Task.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamTaskStatus}.
+ */
+ public String awsTimestreamTaskStatus() {
+ return "AwsTimestreamTaskStatus";
+ }
+
+ /**
+ * The ID of the batch load task to resume.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamTaskId}.
+ */
+ public String awsTimestreamTaskId() {
+ return "AwsTimestreamTaskId";
+ }
+
+ /**
+ * Name of Database.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamDatabaseName}.
+ */
+ public String awsTimestreamDatabaseName() {
+ return "AwsTimestreamDatabaseName";
+ }
+
+ /**
+ * Name of Table.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamTableName}.
+ */
+ public String awsTimestreamTableName() {
+ return "AwsTimestreamTableName";
+ }
+
+ /**
+ * Name of Target Database.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamTargetDatabaseName}.
+ */
+ public String awsTimestreamTargetDatabaseName() {
+ return "AwsTimestreamTargetDatabaseName";
+ }
+
+ /**
+ * Name of Target Table.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamTargetTableName}.
+ */
+ public String awsTimestreamTargetTableName() {
+ return "AwsTimestreamTargetTableName";
+ }
+
+ /**
+ * Record version.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamRecordVersion}.
+ */
+ public String awsTimestreamRecordVersion() {
+ return "AwsTimestreamRecordVersion";
+ }
+
+ /**
+ * Configuration of Data Model.
+ *
+ * The option is a: {@code
+ * software.amazon.awssdk.services.timestreamwrite.model.DataModelConfiguration} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamDataModelConfiguration}.
+ */
+ public String awsTimestreamDataModelConfiguration() {
+ return "AwsTimestreamDataModelConfiguration";
+ }
+
+ /**
+ * Configuration of Data Source.
+ *
+ * The option is a: {@code
+ * software.amazon.awssdk.services.timestreamwrite.model.DataSourceConfiguration} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamDataSourceConfiguration}.
+ */
+ public String awsTimestreamDataSourceConfiguration() {
+ return "AwsTimestreamDataSourceConfiguration";
+ }
+
+ /**
+ * Reporting Configuration.
+ *
+ * The option is a: {@code
+ * software.amazon.awssdk.services.timestreamwrite.model.ReportConfiguration} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamReportConfiguration}.
+ */
+ public String awsTimestreamReportConfiguration() {
+ return "AwsTimestreamReportConfiguration";
+ }
+
+ /**
+ * Timestream Table Schema.
+ *
+ * The option is a: {@code
+ * software.amazon.awssdk.services.timestreamwrite.model.Schema} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamTableSchema}.
+ */
+ public String awsTimestreamTableSchema() {
+ return "AwsTimestreamTableSchema";
+ }
+
+ /**
+ * Timestream Table Retention Properties.
+ *
+ * The option is a: {@code
+ * software.amazon.awssdk.services.timestreamwrite.model.RetentionProperties} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamRetentionProperties}.
+ */
+ public String awsTimestreamRetentionProperties() {
+ return "AwsTimestreamRetentionProperties";
+ }
+
+ /**
+ * Timestream Table Magentic Store Write properties.
+ *
+ * The option is a: {@code
+ * software.amazon.awssdk.services.timestreamwrite.model.MagneticStoreWriteProperties} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamMagneticStoreWriteProperties}.
+ */
+ public String awsTimestreamMagneticStoreWriteProperties() {
+ return "AwsTimestreamMagneticStoreWriteProperties";
+ }
+
+ /**
+ * Name of Time column.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamTimeColumn}.
+ */
+ public String awsTimestreamTimeColumn() {
+ return "AwsTimestreamTimeColumn";
+ }
+
+ /**
+ * Name of the measure column.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamMeasureColumnName}.
+ */
+ public String awsTimestreamMeasureColumnName() {
+ return "AwsTimestreamMeasureColumnName";
+ }
+
+ /**
+ * This is to allow mapping column(s) from the query result to the
+ * dimension in the destination table.
+ *
+ * The option is a: {@code List} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamDimensionMappingList}.
+ */
+ public String awsTimestreamDimensionMappingList() {
+ return "AwsTimestreamDimensionMappingList";
+ }
+
+ /**
+ * Multi-measure mappings.
+ *
+ * The option is a: {@code
+ * software.amazon.awssdk.services.timestreamquery.model.MultiMeasureMappings} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamMultiMeasureMappings}.
+ */
+ public String awsTimestreamMultiMeasureMappings() {
+ return "AwsTimestreamMultiMeasureMappings";
+ }
+
+ /**
+ * Specifies how to map measures to multi-measure records.
+ *
+ * The option is a: {@code List} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamMixedMeasureMappingList}.
+ */
+ public String awsTimestreamMixedMeasureMappingList() {
+ return "AwsTimestreamMixedMeasureMappingList";
+ }
+
+ /**
+ * Name of scheduled query.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamScheduledQueryName}.
+ */
+ public String awsTimestreamScheduledQueryName() {
+ return "AwsTimestreamScheduledQueryName";
+ }
+
+ /**
+ * Arn of scheduled query.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamScheduledQueryArn}.
+ */
+ public String awsTimestreamScheduledQueryArn() {
+ return "AwsTimestreamScheduledQueryArn";
+ }
+
+ /**
+ * State of scheduled query.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamScheduledQueryState}.
+ */
+ public String awsTimestreamScheduledQueryState() {
+ return "AwsTimestreamScheduledQueryState";
+ }
+
+ /**
+ * Invocation Time for scheduled query execution.
+ *
+ * The option is a: {@code Instant} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamScheduledQueryInvocationTime}.
+ */
+ public String awsTimestreamScheduledQueryInvocationTime() {
+ return "AwsTimestreamScheduledQueryInvocationTime";
+ }
+
+ /**
+ * The query string to run.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamQueryString}.
+ */
+ public String awsTimestreamQueryString() {
+ return "AwsTimestreamQueryString";
+ }
+
+ /**
+ * ID of query.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamQueryId}.
+ */
+ public String awsTimestreamQueryId() {
+ return "AwsTimestreamQueryId";
+ }
+
+ /**
+ * Validates the prepared query, but does not store for later execution.
+ *
+ * The option is a: {@code Boolean} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamQueryValidateOnly}.
+ */
+ public String awsTimestreamQueryValidateOnly() {
+ return "AwsTimestreamQueryValidateOnly";
+ }
+
+ /**
+ * The total number of rows to be returned in the Query output.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamQueryMaxRows}.
+ */
+ public String awsTimestreamQueryMaxRows() {
+ return "AwsTimestreamQueryMaxRows";
+ }
+
+ /**
+ * Max Results to be returned in output.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamMaxResults}.
+ */
+ public String awsTimestreamMaxResults() {
+ return "AwsTimestreamMaxResults";
+ }
+
+ /**
+ * The schedule expression for the query.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamScheduleExpression}.
+ */
+ public String awsTimestreamScheduleExpression() {
+ return "AwsTimestreamScheduleExpression";
+ }
+
+ /**
+ * Notification Topic Arn for the scheduled query.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamNotificationTopicArn}.
+ */
+ public String awsTimestreamNotificationTopicArn() {
+ return "AwsTimestreamNotificationTopicArn";
+ }
+
+ /**
+ * S3 Bucket name for error reporting.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamErrorReportS3BucketName}.
+ */
+ public String awsTimestreamErrorReportS3BucketName() {
+ return "AwsTimestreamErrorReportS3BucketName";
+ }
+
+ /**
+ * S3 object key prefix for error reporting.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamErrorReportS3ObjectKeyPrefix}.
+ */
+ public String awsTimestreamErrorReportS3ObjectKeyPrefix() {
+ return "AwsTimestreamErrorReportS3ObjectKeyPrefix";
+ }
+
+ /**
+ * S3 encryption option for error reporting.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamErrorReportS3EncryptionOption}.
+ */
+ public String awsTimestreamErrorReportS3EncryptionOption() {
+ return "AwsTimestreamErrorReportS3EncryptionOption";
+ }
+
+ /**
+ * he ARN for the IAM role that Timestream will assume when running the
+ * scheduled query.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsTimestreamScheduledQueryExecutionRoleArn}.
+ */
+ public String awsTimestreamScheduledQueryExecutionRoleArn() {
+ return "AwsTimestreamScheduledQueryExecutionRoleArn";
+ }
+
+ /**
+ * Using a ClientToken makes the call to CreateScheduledQuery
+ * idempotent.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamClientToken}.
+ */
+ public String awsTimestreamClientToken() {
+ return "AwsTimestreamClientToken";
+ }
+
+ /**
+ * The Amazon KMS key used to encrypt the scheduled query resource,
+ * at-rest.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsTimestreamKmsKeyId}.
+ */
+ public String awsTimestreamKmsKeyId() {
+ return "AwsTimestreamKmsKeyId";
+ }
+ }
+ static Timestream2EndpointBuilder endpointBuilder(
+ String componentName,
+ String path) {
+ class Timestream2EndpointBuilderImpl extends AbstractEndpointBuilder implements Timestream2EndpointBuilder, AdvancedTimestream2EndpointBuilder {
+ public Timestream2EndpointBuilderImpl(String path) {
+ super(componentName, path);
+ }
+ }
+ return new Timestream2EndpointBuilderImpl(path);
+ }
+}
\ No newline at end of file
diff --git a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
index fa5aca8ff22..51543551966 100644
--- a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
+++ b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
@@ -48,6 +48,7 @@ org.apache.camel.component.aws2.sns.Sns2Component=camel:aws2-sns
org.apache.camel.component.aws2.sqs.Sqs2Component=camel:aws2-sqs
org.apache.camel.component.aws2.stepfunctions.StepFunctions2Component=camel:aws2-step-functions
org.apache.camel.component.aws2.sts.STS2Component=camel:aws2-sts
+org.apache.camel.component.aws2.timestream.Timestream2Component=camel:aws2-timestream
org.apache.camel.component.aws2.translate.Translate2Component=camel:aws2-translate
org.apache.camel.component.azure.cosmosdb.CosmosDbComponent=camel:azure-cosmosdb
org.apache.camel.component.azure.eventhubs.EventHubsComponent=camel:azure-eventhubs
diff --git a/parent/pom.xml b/parent/pom.xml
index 8bf1aa124cd..9bd6722a169 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -825,6 +825,11 @@
<artifactId>camel-aws2-sts</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws2-timestream</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-aws2-translate</artifactId>
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
index 6d0be19d013..117e89c6e57 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
@@ -84,7 +84,8 @@ public final class MojoHelper {
dir.resolve("camel-aws2-msk"), dir.resolve("camel-aws2-s3"), dir.resolve("camel-aws2-ses"),
dir.resolve("camel-aws2-sns"),
dir.resolve("camel-aws2-sqs"), dir.resolve("camel-aws2-step-functions"),
- dir.resolve("camel-aws2-sts"), dir.resolve("camel-aws2-translate"),
+ dir.resolve("camel-aws2-sts"),
+ dir.resolve("camel-aws2-timestream"), dir.resolve("camel-aws2-translate"),
dir.resolve("camel-aws-xray"), dir.resolve("camel-aws-secrets-manager"),
dir.resolve("camel-aws-cloudtrail"));
case "camel-vertx":