You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/04/26 06:26:13 UTC

[camel] 02/04: CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Athena component

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e0c1fa8b0024d695b5cf241cac00fbd0d137f74b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Apr 26 08:14:47 2021 +0200

    CAMEL-16465 - Camel-AWS: Add useDefaultCredentialProvider option to all the components - Athena component
---
 .../camel/catalog/docs/aws2-athena-component.adoc  |  6 ++--
 .../aws2/athena/Athena2ComponentConfigurer.java    |  6 ++++
 .../aws2/athena/Athena2EndpointConfigurer.java     |  6 ++++
 .../aws2/athena/Athena2EndpointUriFactory.java     |  3 +-
 .../camel/component/aws2/athena/aws2-athena.json   |  2 ++
 .../src/main/docs/aws2-athena-component.adoc       |  6 ++--
 .../component/aws2/athena/Athena2Component.java    |  5 +--
 .../aws2/athena/Athena2Configuration.java          |  9 +++---
 .../component/aws2/athena/Athena2Endpoint.java     | 11 ++-----
 .../client/impl/Athena2ClientIAMOptimizedImpl.java |  8 ++---
 .../client/impl/Athena2ClientStandardImpl.java     | 10 +++---
 .../dsl/Aws2AthenaComponentBuilderFactory.java     | 19 +++++++++++
 .../dsl/Athena2EndpointBuilderFactory.java         | 37 ++++++++++++++++++++++
 .../modules/ROOT/pages/aws2-athena-component.adoc  |  6 ++--
 14 files changed, 103 insertions(+), 31 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-athena-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-athena-component.adoc
index 8c5bd92..33aabc1 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-athena-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-athena-component.adoc
@@ -60,7 +60,7 @@ from("direct:start")
 
 
 // component options: START
-The AWS 2 Athena component supports 29 options, which are listed below.
+The AWS 2 Athena component supports 30 options, which are listed below.
 
 
 
@@ -92,6 +92,7 @@ The AWS 2 Athena component supports 29 options, which are listed below.
 | *resetWaitTimeoutOnRetry* (producer) | Reset the waitTimeout countdown in the event of a query retry. If set to true, potential max time spent waiting for queries is equal to waitTimeout x maxAttempts. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. | true | boolean
 | *retry* (producer) | Optional comma separated list of error types to retry the query for. Use 'retryable' to retry all retryable failure conditions (e.g. generic errors and resources exhausted), 'generic' to retry 'GENERIC_INTERNAL_ERROR' failures, 'exhausted' to retry queries that have exhausted resource limits, 'always' to always retry regardless of failure condition, or 'never' or null to never retry (default). See the section 'Waiting for Query Completion and Retrying Failed Querie [...]
 | *secretKey* (producer) | Amazon AWS Secret Key. |  | String
+| *useDefaultCredentialsProvider* (producer) | Set whether the Athena client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in | false | boolean
 | *waitTimeout* (producer) | Optional max wait time in millis to wait for a successful query completion. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. | 0 | long
 | *workGroup* (producer) | The workgroup to use for running the query. |  | String
 | *autowiredEnabled* (advanced) | 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. | true | boolean
@@ -128,7 +129,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (27 parameters):
+=== Query Parameters (28 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -158,6 +159,7 @@ with the following path and query parameters:
 | *resetWaitTimeoutOnRetry* (producer) | Reset the waitTimeout countdown in the event of a query retry. If set to true, potential max time spent waiting for queries is equal to waitTimeout x maxAttempts. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. | true | boolean
 | *retry* (producer) | Optional comma separated list of error types to retry the query for. Use 'retryable' to retry all retryable failure conditions (e.g. generic errors and resources exhausted), 'generic' to retry 'GENERIC_INTERNAL_ERROR' failures, 'exhausted' to retry queries that have exhausted resource limits, 'always' to always retry regardless of failure condition, or 'never' or null to never retry (default). See the section 'Waiting for Query Completion and Retrying Failed Querie [...]
 | *secretKey* (producer) | Amazon AWS Secret Key. |  | String
+| *useDefaultCredentialsProvider* (producer) | Set whether the Athena client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in | false | boolean
 | *waitTimeout* (producer) | Optional max wait time in millis to wait for a successful query completion. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. | 0 | long
 | *workGroup* (producer) | The workgroup to use for running the query. |  | String
 | *clientRequestToken* (advanced) | A unique string to ensure issues queries are idempotent. It is unlikely you will need to set this. |  | String
diff --git a/components/camel-aws/camel-aws2-athena/src/generated/java/org/apache/camel/component/aws2/athena/Athena2ComponentConfigurer.java b/components/camel-aws/camel-aws2-athena/src/generated/java/org/apache/camel/component/aws2/athena/Athena2ComponentConfigurer.java
index f2ae089..7a6d2ac 100644
--- a/components/camel-aws/camel-aws2-athena/src/generated/java/org/apache/camel/component/aws2/athena/Athena2ComponentConfigurer.java
+++ b/components/camel-aws/camel-aws2-athena/src/generated/java/org/apache/camel/component/aws2/athena/Athena2ComponentConfigurer.java
@@ -76,6 +76,8 @@ public class Athena2ComponentConfigurer extends PropertyConfigurerSupport implem
         case "retry": getOrCreateConfiguration(target).setRetry(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 "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": getOrCreateConfiguration(target).setUseDefaultCredentialsProvider(property(camelContext, boolean.class, value)); return true;
         case "waittimeout":
         case "waitTimeout": getOrCreateConfiguration(target).setWaitTimeout(property(camelContext, long.class, value)); return true;
         case "workgroup":
@@ -140,6 +142,8 @@ public class Athena2ComponentConfigurer extends PropertyConfigurerSupport implem
         case "retry": return java.lang.String.class;
         case "secretkey":
         case "secretKey": return java.lang.String.class;
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": return boolean.class;
         case "waittimeout":
         case "waitTimeout": return long.class;
         case "workgroup":
@@ -200,6 +204,8 @@ public class Athena2ComponentConfigurer extends PropertyConfigurerSupport implem
         case "retry": return getOrCreateConfiguration(target).getRetry();
         case "secretkey":
         case "secretKey": return getOrCreateConfiguration(target).getSecretKey();
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": return getOrCreateConfiguration(target).isUseDefaultCredentialsProvider();
         case "waittimeout":
         case "waitTimeout": return getOrCreateConfiguration(target).getWaitTimeout();
         case "workgroup":
diff --git a/components/camel-aws/camel-aws2-athena/src/generated/java/org/apache/camel/component/aws2/athena/Athena2EndpointConfigurer.java b/components/camel-aws/camel-aws2-athena/src/generated/java/org/apache/camel/component/aws2/athena/Athena2EndpointConfigurer.java
index 19db31c..de4faaa 100644
--- a/components/camel-aws/camel-aws2-athena/src/generated/java/org/apache/camel/component/aws2/athena/Athena2EndpointConfigurer.java
+++ b/components/camel-aws/camel-aws2-athena/src/generated/java/org/apache/camel/component/aws2/athena/Athena2EndpointConfigurer.java
@@ -66,6 +66,8 @@ public class Athena2EndpointConfigurer extends PropertyConfigurerSupport impleme
         case "retry": target.getConfiguration().setRetry(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 "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": target.getConfiguration().setUseDefaultCredentialsProvider(property(camelContext, boolean.class, value)); return true;
         case "waittimeout":
         case "waitTimeout": target.getConfiguration().setWaitTimeout(property(camelContext, long.class, value)); return true;
         case "workgroup":
@@ -127,6 +129,8 @@ public class Athena2EndpointConfigurer extends PropertyConfigurerSupport impleme
         case "retry": return java.lang.String.class;
         case "secretkey":
         case "secretKey": return java.lang.String.class;
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": return boolean.class;
         case "waittimeout":
         case "waitTimeout": return long.class;
         case "workgroup":
@@ -184,6 +188,8 @@ public class Athena2EndpointConfigurer extends PropertyConfigurerSupport impleme
         case "retry": return target.getConfiguration().getRetry();
         case "secretkey":
         case "secretKey": return target.getConfiguration().getSecretKey();
+        case "usedefaultcredentialsprovider":
+        case "useDefaultCredentialsProvider": return target.getConfiguration().isUseDefaultCredentialsProvider();
         case "waittimeout":
         case "waitTimeout": return target.getConfiguration().getWaitTimeout();
         case "workgroup":
diff --git a/components/camel-aws/camel-aws2-athena/src/generated/java/org/apache/camel/component/aws2/athena/Athena2EndpointUriFactory.java b/components/camel-aws/camel-aws2-athena/src/generated/java/org/apache/camel/component/aws2/athena/Athena2EndpointUriFactory.java
index 39b6570..21b0382 100644
--- a/components/camel-aws/camel-aws2-athena/src/generated/java/org/apache/camel/component/aws2/athena/Athena2EndpointUriFactory.java
+++ b/components/camel-aws/camel-aws2-athena/src/generated/java/org/apache/camel/component/aws2/athena/Athena2EndpointUriFactory.java
@@ -20,7 +20,7 @@ public class Athena2EndpointUriFactory extends org.apache.camel.support.componen
     private static final Set<String> PROPERTY_NAMES;
     private static final Set<String> SECRET_PROPERTY_NAMES;
     static {
-        Set<String> props = new HashSet<>(28);
+        Set<String> props = new HashSet<>(29);
         props.add("outputLocation");
         props.add("workGroup");
         props.add("kmsKey");
@@ -38,6 +38,7 @@ public class Athena2EndpointUriFactory extends org.apache.camel.support.componen
         props.add("proxyProtocol");
         props.add("secretKey");
         props.add("resetWaitTimeoutOnRetry");
+        props.add("useDefaultCredentialsProvider");
         props.add("label");
         props.add("queryExecutionId");
         props.add("queryString");
diff --git a/components/camel-aws/camel-aws2-athena/src/generated/resources/org/apache/camel/component/aws2/athena/aws2-athena.json b/components/camel-aws/camel-aws2-athena/src/generated/resources/org/apache/camel/component/aws2/athena/aws2-athena.json
index eb4767a..f4e0f35 100644
--- a/components/camel-aws/camel-aws2-athena/src/generated/resources/org/apache/camel/component/aws2/athena/aws2-athena.json
+++ b/components/camel-aws/camel-aws2-athena/src/generated/resources/org/apache/camel/component/aws2/athena/aws2-athena.json
@@ -47,6 +47,7 @@
     "resetWaitTimeoutOnRetry": { "kind": "property", "displayName": "Reset Wait Timeout On Retry", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.athena.Athena2Configuration", "configurationField": "configuration", "description": "Reset the waitTimeout countdown in the event of a query retry. If set  [...]
     "retry": { "kind": "property", "displayName": "Retry", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "never", "always", "retryable", "exhausted", "generic" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "never", "configurationClass": "org.apache.camel.component.aws2.athena.Athena2Configuration", "configurationField": "configuration", "description": "Optional comma separated list o [...]
     "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.athena.Athena2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key." },
+    "useDefaultCredentialsProvider": { "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.athena.Athena2Configuration", "configurationField": "configuration", "description": "Set whether the Athena client should expect to load credentials th [...]
     "waitTimeout": { "kind": "property", "displayName": "Wait Timeout", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 0, "configurationClass": "org.apache.camel.component.aws2.athena.Athena2Configuration", "configurationField": "configuration", "description": "Optional max wait time in millis to wait for a successful query completion. See the section 'Waiting fo [...]
     "workGroup": { "kind": "property", "displayName": "Work Group", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.athena.Athena2Configuration", "configurationField": "configuration", "description": "The workgroup to use for running the query." },
     "autowiredEnabled": { "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 type, which t [...]
@@ -78,6 +79,7 @@
     "resetWaitTimeoutOnRetry": { "kind": "parameter", "displayName": "Reset Wait Timeout On Retry", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.aws2.athena.Athena2Configuration", "configurationField": "configuration", "description": "Reset the waitTimeout countdown in the event of a query retry. If set [...]
     "retry": { "kind": "parameter", "displayName": "Retry", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "never", "always", "retryable", "exhausted", "generic" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "never", "configurationClass": "org.apache.camel.component.aws2.athena.Athena2Configuration", "configurationField": "configuration", "description": "Optional comma separated list  [...]
     "secretKey": { "kind": "parameter", "displayName": "Secret Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.athena.Athena2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key." },
+    "useDefaultCredentialsProvider": { "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.athena.Athena2Configuration", "configurationField": "configuration", "description": "Set whether the Athena client should expect to load credentials t [...]
     "waitTimeout": { "kind": "parameter", "displayName": "Wait Timeout", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 0, "configurationClass": "org.apache.camel.component.aws2.athena.Athena2Configuration", "configurationField": "configuration", "description": "Optional max wait time in millis to wait for a successful query completion. See the section 'Waiting f [...]
     "workGroup": { "kind": "parameter", "displayName": "Work Group", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.athena.Athena2Configuration", "configurationField": "configuration", "description": "The workgroup to use for running the query." },
     "clientRequestToken": { "kind": "parameter", "displayName": "Client Request Token", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.athena.Athena2Configuration", "configurationField": "configuration", "description": "A unique string to ensure issues queries are idempotent. It is unlikely you will need to set this." }
diff --git a/components/camel-aws/camel-aws2-athena/src/main/docs/aws2-athena-component.adoc b/components/camel-aws/camel-aws2-athena/src/main/docs/aws2-athena-component.adoc
index 8c5bd92..33aabc1 100644
--- a/components/camel-aws/camel-aws2-athena/src/main/docs/aws2-athena-component.adoc
+++ b/components/camel-aws/camel-aws2-athena/src/main/docs/aws2-athena-component.adoc
@@ -60,7 +60,7 @@ from("direct:start")
 
 
 // component options: START
-The AWS 2 Athena component supports 29 options, which are listed below.
+The AWS 2 Athena component supports 30 options, which are listed below.
 
 
 
@@ -92,6 +92,7 @@ The AWS 2 Athena component supports 29 options, which are listed below.
 | *resetWaitTimeoutOnRetry* (producer) | Reset the waitTimeout countdown in the event of a query retry. If set to true, potential max time spent waiting for queries is equal to waitTimeout x maxAttempts. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. | true | boolean
 | *retry* (producer) | Optional comma separated list of error types to retry the query for. Use 'retryable' to retry all retryable failure conditions (e.g. generic errors and resources exhausted), 'generic' to retry 'GENERIC_INTERNAL_ERROR' failures, 'exhausted' to retry queries that have exhausted resource limits, 'always' to always retry regardless of failure condition, or 'never' or null to never retry (default). See the section 'Waiting for Query Completion and Retrying Failed Querie [...]
 | *secretKey* (producer) | Amazon AWS Secret Key. |  | String
+| *useDefaultCredentialsProvider* (producer) | Set whether the Athena client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in | false | boolean
 | *waitTimeout* (producer) | Optional max wait time in millis to wait for a successful query completion. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. | 0 | long
 | *workGroup* (producer) | The workgroup to use for running the query. |  | String
 | *autowiredEnabled* (advanced) | 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. | true | boolean
@@ -128,7 +129,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (27 parameters):
+=== Query Parameters (28 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -158,6 +159,7 @@ with the following path and query parameters:
 | *resetWaitTimeoutOnRetry* (producer) | Reset the waitTimeout countdown in the event of a query retry. If set to true, potential max time spent waiting for queries is equal to waitTimeout x maxAttempts. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. | true | boolean
 | *retry* (producer) | Optional comma separated list of error types to retry the query for. Use 'retryable' to retry all retryable failure conditions (e.g. generic errors and resources exhausted), 'generic' to retry 'GENERIC_INTERNAL_ERROR' failures, 'exhausted' to retry queries that have exhausted resource limits, 'always' to always retry regardless of failure condition, or 'never' or null to never retry (default). See the section 'Waiting for Query Completion and Retrying Failed Querie [...]
 | *secretKey* (producer) | Amazon AWS Secret Key. |  | String
+| *useDefaultCredentialsProvider* (producer) | Set whether the Athena client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in | false | boolean
 | *waitTimeout* (producer) | Optional max wait time in millis to wait for a successful query completion. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. | 0 | long
 | *workGroup* (producer) | The workgroup to use for running the query. |  | String
 | *clientRequestToken* (advanced) | A unique string to ensure issues queries are idempotent. It is unlikely you will need to set this. |  | String
diff --git a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Component.java b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Component.java
index 1ca4ae2..8d5b9f3 100644
--- a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Component.java
+++ b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Component.java
@@ -54,8 +54,9 @@ public class Athena2Component extends DefaultComponent {
         setProperties(endpoint, parameters);
         if (!configuration.isUseDefaultCredentialsProvider() && configuration.getAmazonAthenaClient() == null
                 && (configuration.getAccessKey() == null
-                || configuration.getSecretKey() == null)) {
-            throw new IllegalArgumentException("useDefaultCredentialsProvider is set to false, accessKey/secretKey or amazonAthenaClient must be specified");
+                        || configuration.getSecretKey() == null)) {
+            throw new IllegalArgumentException(
+                    "useDefaultCredentialsProvider is set to false, accessKey/secretKey or amazonAthenaClient must be specified");
         }
         return endpoint;
     }
diff --git a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Configuration.java b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Configuration.java
index f8b6841..220c6b6 100644
--- a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Configuration.java
+++ b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Configuration.java
@@ -137,8 +137,9 @@ public class Athena2Configuration implements Cloneable {
     @UriParam
     private String region;
     @UriParam(defaultValue = "false",
-            description = "Set whether the Athena client should expect to load credentials through a default credentials provider or to expect " +
-                    "static credentials to be passed in")
+              description = "Set whether the Athena client should expect to load credentials through a default credentials provider or to expect "
+                            +
+                            "static credentials to be passed in")
     private boolean useDefaultCredentialsProvider;
 
     public String getAccessKey() {
@@ -446,8 +447,8 @@ public class Athena2Configuration implements Cloneable {
     }
 
     /**
-     * Set whether the Athena client should expect to load credentials through a default credentials provider or to expect
-     * static credentials to be passed in.
+     * Set whether the Athena 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;
diff --git a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Endpoint.java b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Endpoint.java
index 3a9f757..b80524c 100644
--- a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Endpoint.java
+++ b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Endpoint.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.component.aws2.athena;
 
-import java.net.URI;
-
 import org.apache.camel.Category;
 import org.apache.camel.Component;
 import org.apache.camel.Consumer;
@@ -28,13 +26,7 @@ import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.support.DefaultEndpoint;
 import org.apache.camel.util.ObjectHelper;
-import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
-import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
-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.athena.AthenaClient;
-import software.amazon.awssdk.services.athena.AthenaClientBuilder;
 
 /**
  * Access AWS Athena service using AWS SDK version 2.x.
@@ -69,7 +61,8 @@ public class Athena2Endpoint extends DefaultEndpoint {
         super.doInit();
 
         athenaClient = configuration.getAmazonAthenaClient() != null
-                ? configuration.getAmazonAthenaClient() : Athena2ClientFactory.getAWSAthenaClient(configuration).getAthenaClient();
+                ? configuration.getAmazonAthenaClient()
+                : Athena2ClientFactory.getAWSAthenaClient(configuration).getAthenaClient();
     }
 
     @Override
diff --git a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/client/impl/Athena2ClientIAMOptimizedImpl.java b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/client/impl/Athena2ClientIAMOptimizedImpl.java
index 86266b2..9fce28a 100644
--- a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/client/impl/Athena2ClientIAMOptimizedImpl.java
+++ b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/client/impl/Athena2ClientIAMOptimizedImpl.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.aws2.athena.client.impl;
 
+import java.net.URI;
+
 import org.apache.camel.component.aws2.athena.Athena2Configuration;
 import org.apache.camel.component.aws2.athena.client.Athena2InternalClient;
 import org.apache.camel.util.ObjectHelper;
@@ -27,11 +29,9 @@ import software.amazon.awssdk.regions.Region;
 import software.amazon.awssdk.services.athena.AthenaClient;
 import software.amazon.awssdk.services.athena.AthenaClientBuilder;
 
-import java.net.URI;
-
 /**
- * Manage an AWS Athena 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)
+ * Manage an AWS Athena 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 Athena2ClientIAMOptimizedImpl implements Athena2InternalClient {
     private static final Logger LOG = LoggerFactory.getLogger(Athena2ClientIAMOptimizedImpl.class);
diff --git a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/client/impl/Athena2ClientStandardImpl.java b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/client/impl/Athena2ClientStandardImpl.java
index 1a6665d..515131b 100644
--- a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/client/impl/Athena2ClientStandardImpl.java
+++ b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/client/impl/Athena2ClientStandardImpl.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.aws2.athena.client.impl;
 
+import java.net.URI;
+
 import org.apache.camel.component.aws2.athena.Athena2Configuration;
 import org.apache.camel.component.aws2.athena.client.Athena2InternalClient;
 import org.apache.camel.util.ObjectHelper;
@@ -29,11 +31,9 @@ import software.amazon.awssdk.regions.Region;
 import software.amazon.awssdk.services.athena.AthenaClient;
 import software.amazon.awssdk.services.athena.AthenaClientBuilder;
 
-import java.net.URI;
-
 /**
- * Manage an AWS Athena client for all users to use. This implementation is for local instances to use a static and solid
- * credential set.
+ * Manage an AWS Athena client for all users to use. This implementation is for local instances to use a static and
+ * solid credential set.
  */
 public class Athena2ClientStandardImpl implements Athena2InternalClient {
     private static final Logger LOG = LoggerFactory.getLogger(Athena2ClientStandardImpl.class);
@@ -62,7 +62,7 @@ public class Athena2ClientStandardImpl implements Athena2InternalClient {
         if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
             proxyConfig = ProxyConfiguration.builder();
             URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + "://" + configuration.getProxyHost() + ":"
-                    + configuration.getProxyPort());
+                                           + configuration.getProxyPort());
             proxyConfig.endpoint(proxyEndpoint);
             httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
             isClientConfigFound = true;
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2AthenaComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2AthenaComponentBuilderFactory.java
index c39abb3..c5ccd68 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2AthenaComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2AthenaComponentBuilderFactory.java
@@ -470,6 +470,24 @@ public interface Aws2AthenaComponentBuilderFactory {
             return this;
         }
         /**
+         * Set whether the Athena client should expect to load credentials
+         * through a default credentials provider or to expect static
+         * credentials to be passed in.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: producer
+         * 
+         * @param useDefaultCredentialsProvider the value to set
+         * @return the dsl builder
+         */
+        default Aws2AthenaComponentBuilder useDefaultCredentialsProvider(
+                boolean useDefaultCredentialsProvider) {
+            doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+            return this;
+        }
+        /**
          * Optional max wait time in millis to wait for a successful query
          * completion. See the section 'Waiting for Query Completion and
          * Retrying Failed Queries' to learn more.
@@ -586,6 +604,7 @@ public interface Aws2AthenaComponentBuilderFactory {
             case "resetWaitTimeoutOnRetry": getOrCreateConfiguration((Athena2Component) component).setResetWaitTimeoutOnRetry((boolean) value); return true;
             case "retry": getOrCreateConfiguration((Athena2Component) component).setRetry((java.lang.String) value); return true;
             case "secretKey": getOrCreateConfiguration((Athena2Component) component).setSecretKey((java.lang.String) value); return true;
+            case "useDefaultCredentialsProvider": getOrCreateConfiguration((Athena2Component) component).setUseDefaultCredentialsProvider((boolean) value); return true;
             case "waitTimeout": getOrCreateConfiguration((Athena2Component) component).setWaitTimeout((long) value); return true;
             case "workGroup": getOrCreateConfiguration((Athena2Component) component).setWorkGroup((java.lang.String) value); return true;
             case "autowiredEnabled": ((Athena2Component) component).setAutowiredEnabled((boolean) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Athena2EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Athena2EndpointBuilderFactory.java
index 4b7762a..f130992 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Athena2EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Athena2EndpointBuilderFactory.java
@@ -663,6 +663,43 @@ public interface Athena2EndpointBuilderFactory {
             return this;
         }
         /**
+         * Set whether the Athena client should expect to load credentials
+         * through a default credentials provider or to expect static
+         * credentials to be passed in.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: producer
+         * 
+         * @param useDefaultCredentialsProvider the value to set
+         * @return the dsl builder
+         */
+        default Athena2EndpointBuilder useDefaultCredentialsProvider(
+                boolean useDefaultCredentialsProvider) {
+            doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+            return this;
+        }
+        /**
+         * Set whether the Athena 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 &lt;code&gt;boolean&lt;/code&gt;
+         * type.
+         * 
+         * Default: false
+         * Group: producer
+         * 
+         * @param useDefaultCredentialsProvider the value to set
+         * @return the dsl builder
+         */
+        default Athena2EndpointBuilder useDefaultCredentialsProvider(
+                String useDefaultCredentialsProvider) {
+            doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+            return this;
+        }
+        /**
          * Optional max wait time in millis to wait for a successful query
          * completion. See the section 'Waiting for Query Completion and
          * Retrying Failed Queries' to learn more.
diff --git a/docs/components/modules/ROOT/pages/aws2-athena-component.adoc b/docs/components/modules/ROOT/pages/aws2-athena-component.adoc
index 5ae054f..98e18fb 100644
--- a/docs/components/modules/ROOT/pages/aws2-athena-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-athena-component.adoc
@@ -62,7 +62,7 @@ from("direct:start")
 
 
 // component options: START
-The AWS 2 Athena component supports 29 options, which are listed below.
+The AWS 2 Athena component supports 30 options, which are listed below.
 
 
 
@@ -94,6 +94,7 @@ The AWS 2 Athena component supports 29 options, which are listed below.
 | *resetWaitTimeoutOnRetry* (producer) | Reset the waitTimeout countdown in the event of a query retry. If set to true, potential max time spent waiting for queries is equal to waitTimeout x maxAttempts. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. | true | boolean
 | *retry* (producer) | Optional comma separated list of error types to retry the query for. Use 'retryable' to retry all retryable failure conditions (e.g. generic errors and resources exhausted), 'generic' to retry 'GENERIC_INTERNAL_ERROR' failures, 'exhausted' to retry queries that have exhausted resource limits, 'always' to always retry regardless of failure condition, or 'never' or null to never retry (default). See the section 'Waiting for Query Completion and Retrying Failed Querie [...]
 | *secretKey* (producer) | Amazon AWS Secret Key. |  | String
+| *useDefaultCredentialsProvider* (producer) | Set whether the Athena client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in | false | boolean
 | *waitTimeout* (producer) | Optional max wait time in millis to wait for a successful query completion. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. | 0 | long
 | *workGroup* (producer) | The workgroup to use for running the query. |  | String
 | *autowiredEnabled* (advanced) | 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. | true | boolean
@@ -130,7 +131,7 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (27 parameters):
+=== Query Parameters (28 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -160,6 +161,7 @@ with the following path and query parameters:
 | *resetWaitTimeoutOnRetry* (producer) | Reset the waitTimeout countdown in the event of a query retry. If set to true, potential max time spent waiting for queries is equal to waitTimeout x maxAttempts. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. | true | boolean
 | *retry* (producer) | Optional comma separated list of error types to retry the query for. Use 'retryable' to retry all retryable failure conditions (e.g. generic errors and resources exhausted), 'generic' to retry 'GENERIC_INTERNAL_ERROR' failures, 'exhausted' to retry queries that have exhausted resource limits, 'always' to always retry regardless of failure condition, or 'never' or null to never retry (default). See the section 'Waiting for Query Completion and Retrying Failed Querie [...]
 | *secretKey* (producer) | Amazon AWS Secret Key. |  | String
+| *useDefaultCredentialsProvider* (producer) | Set whether the Athena client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in | false | boolean
 | *waitTimeout* (producer) | Optional max wait time in millis to wait for a successful query completion. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. | 0 | long
 | *workGroup* (producer) | The workgroup to use for running the query. |  | String
 | *clientRequestToken* (advanced) | A unique string to ensure issues queries are idempotent. It is unlikely you will need to set this. |  | String