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 abe96e0e82e9042523a10c065c23329fee5b661a Author: Andrea Cosentino <[email protected]> AuthorDate: Tue Mar 21 10:26:50 2023 +0100 CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS SQS Signed-off-by: Andrea Cosentino <[email protected]> --- .../camel/component/aws2/sqs/Sqs2ComponentConfigurer.java | 12 ++++++++++++ .../camel/component/aws2/sqs/Sqs2EndpointConfigurer.java | 12 ++++++++++++ .../camel/component/aws2/sqs/Sqs2EndpointUriFactory.java | 4 +++- .../org/apache/camel/component/aws2/sqs/aws2-sqs.json | 4 ++++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/components/camel-aws/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2ComponentConfigurer.java b/components/camel-aws/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2ComponentConfigurer.java index c58d85502a9..80ae4eabd24 100644 --- a/components/camel-aws/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2ComponentConfigurer.java +++ b/components/camel-aws/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2ComponentConfigurer.java @@ -81,6 +81,8 @@ public class Sqs2ComponentConfigurer extends PropertyConfigurerSupport implement case "overrideendpoint": case "overrideEndpoint": getOrCreateConfiguration(target).setOverrideEndpoint(property(camelContext, boolean.class, value)); return true; case "policy": getOrCreateConfiguration(target).setPolicy(property(camelContext, java.lang.String.class, value)); return true; + case "profilecredentialsname": + case "profileCredentialsName": getOrCreateConfiguration(target).setProfileCredentialsName(property(camelContext, java.lang.String.class, value)); return true; case "protocol": getOrCreateConfiguration(target).setProtocol(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; @@ -107,6 +109,8 @@ public class Sqs2ComponentConfigurer extends PropertyConfigurerSupport implement 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; case "visibilitytimeout": case "visibilityTimeout": getOrCreateConfiguration(target).setVisibilityTimeout(property(camelContext, java.lang.Integer.class, value)); return true; case "waittimeseconds": @@ -176,6 +180,8 @@ public class Sqs2ComponentConfigurer extends PropertyConfigurerSupport implement case "overrideendpoint": case "overrideEndpoint": return boolean.class; case "policy": return java.lang.String.class; + case "profilecredentialsname": + case "profileCredentialsName": return java.lang.String.class; case "protocol": return java.lang.String.class; case "proxyhost": case "proxyHost": return java.lang.String.class; @@ -202,6 +208,8 @@ public class Sqs2ComponentConfigurer extends PropertyConfigurerSupport implement case "uriEndpointOverride": return java.lang.String.class; case "usedefaultcredentialsprovider": case "useDefaultCredentialsProvider": return boolean.class; + case "useprofilecredentialsprovider": + case "useProfileCredentialsProvider": return boolean.class; case "visibilitytimeout": case "visibilityTimeout": return java.lang.Integer.class; case "waittimeseconds": @@ -267,6 +275,8 @@ public class Sqs2ComponentConfigurer extends PropertyConfigurerSupport implement case "overrideendpoint": case "overrideEndpoint": return getOrCreateConfiguration(target).isOverrideEndpoint(); case "policy": return getOrCreateConfiguration(target).getPolicy(); + case "profilecredentialsname": + case "profileCredentialsName": return getOrCreateConfiguration(target).getProfileCredentialsName(); case "protocol": return getOrCreateConfiguration(target).getProtocol(); case "proxyhost": case "proxyHost": return getOrCreateConfiguration(target).getProxyHost(); @@ -293,6 +303,8 @@ public class Sqs2ComponentConfigurer extends PropertyConfigurerSupport implement case "uriEndpointOverride": return getOrCreateConfiguration(target).getUriEndpointOverride(); case "usedefaultcredentialsprovider": case "useDefaultCredentialsProvider": return getOrCreateConfiguration(target).isUseDefaultCredentialsProvider(); + case "useprofilecredentialsprovider": + case "useProfileCredentialsProvider": return getOrCreateConfiguration(target).isUseProfileCredentialsProvider(); case "visibilitytimeout": case "visibilityTimeout": return getOrCreateConfiguration(target).getVisibilityTimeout(); case "waittimeseconds": diff --git a/components/camel-aws/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointConfigurer.java b/components/camel-aws/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointConfigurer.java index 8f4b390363e..7390a236471 100644 --- a/components/camel-aws/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointConfigurer.java +++ b/components/camel-aws/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointConfigurer.java @@ -91,6 +91,8 @@ public class Sqs2EndpointConfigurer extends PropertyConfigurerSupport implements case "policy": target.getConfiguration().setPolicy(property(camelContext, java.lang.String.class, value)); return true; case "pollstrategy": case "pollStrategy": target.setPollStrategy(property(camelContext, org.apache.camel.spi.PollingConsumerPollStrategy.class, value)); return true; + case "profilecredentialsname": + case "profileCredentialsName": target.getConfiguration().setProfileCredentialsName(property(camelContext, java.lang.String.class, value)); return true; case "protocol": target.getConfiguration().setProtocol(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; @@ -134,6 +136,8 @@ public class Sqs2EndpointConfigurer extends PropertyConfigurerSupport implements case "useDefaultCredentialsProvider": target.getConfiguration().setUseDefaultCredentialsProvider(property(camelContext, boolean.class, value)); return true; case "usefixeddelay": case "useFixedDelay": target.setUseFixedDelay(property(camelContext, boolean.class, value)); return true; + case "useprofilecredentialsprovider": + case "useProfileCredentialsProvider": target.getConfiguration().setUseProfileCredentialsProvider(property(camelContext, boolean.class, value)); return true; case "visibilitytimeout": case "visibilityTimeout": target.getConfiguration().setVisibilityTimeout(property(camelContext, java.lang.Integer.class, value)); return true; case "waittimeseconds": @@ -220,6 +224,8 @@ public class Sqs2EndpointConfigurer extends PropertyConfigurerSupport implements case "policy": return java.lang.String.class; case "pollstrategy": case "pollStrategy": return org.apache.camel.spi.PollingConsumerPollStrategy.class; + case "profilecredentialsname": + case "profileCredentialsName": return java.lang.String.class; case "protocol": return java.lang.String.class; case "proxyhost": case "proxyHost": return java.lang.String.class; @@ -263,6 +269,8 @@ public class Sqs2EndpointConfigurer extends PropertyConfigurerSupport implements case "useDefaultCredentialsProvider": return boolean.class; case "usefixeddelay": case "useFixedDelay": return boolean.class; + case "useprofilecredentialsprovider": + case "useProfileCredentialsProvider": return boolean.class; case "visibilitytimeout": case "visibilityTimeout": return java.lang.Integer.class; case "waittimeseconds": @@ -345,6 +353,8 @@ public class Sqs2EndpointConfigurer extends PropertyConfigurerSupport implements case "policy": return target.getConfiguration().getPolicy(); case "pollstrategy": case "pollStrategy": return target.getPollStrategy(); + case "profilecredentialsname": + case "profileCredentialsName": return target.getConfiguration().getProfileCredentialsName(); case "protocol": return target.getConfiguration().getProtocol(); case "proxyhost": case "proxyHost": return target.getConfiguration().getProxyHost(); @@ -388,6 +398,8 @@ public class Sqs2EndpointConfigurer extends PropertyConfigurerSupport implements case "useDefaultCredentialsProvider": return target.getConfiguration().isUseDefaultCredentialsProvider(); case "usefixeddelay": case "useFixedDelay": return target.isUseFixedDelay(); + case "useprofilecredentialsprovider": + case "useProfileCredentialsProvider": return target.getConfiguration().isUseProfileCredentialsProvider(); case "visibilitytimeout": case "visibilityTimeout": return target.getConfiguration().getVisibilityTimeout(); case "waittimeseconds": diff --git a/components/camel-aws/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointUriFactory.java b/components/camel-aws/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointUriFactory.java index 19693a8ee25..14c504e9e30 100644 --- a/components/camel-aws/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointUriFactory.java +++ b/components/camel-aws/camel-aws2-sqs/src/generated/java/org/apache/camel/component/aws2/sqs/Sqs2EndpointUriFactory.java @@ -21,7 +21,7 @@ public class Sqs2EndpointUriFactory extends org.apache.camel.support.component.E private static final Set<String> SECRET_PROPERTY_NAMES; private static final Set<String> MULTI_VALUE_PREFIXES; static { - Set<String> props = new HashSet<>(63); + Set<String> props = new HashSet<>(65); props.add("accessKey"); props.add("amazonAWSHost"); props.add("amazonSQSClient"); @@ -59,6 +59,7 @@ public class Sqs2EndpointUriFactory extends org.apache.camel.support.component.E props.add("overrideEndpoint"); props.add("policy"); props.add("pollStrategy"); + props.add("profileCredentialsName"); props.add("protocol"); props.add("proxyHost"); props.add("proxyPort"); @@ -83,6 +84,7 @@ public class Sqs2EndpointUriFactory extends org.apache.camel.support.component.E props.add("uriEndpointOverride"); props.add("useDefaultCredentialsProvider"); props.add("useFixedDelay"); + props.add("useProfileCredentialsProvider"); props.add("visibilityTimeout"); props.add("waitTimeSeconds"); PROPERTY_NAMES = Collections.unmodifiableSet(props); diff --git a/components/camel-aws/camel-aws2-sqs/src/generated/resources/org/apache/camel/component/aws2/sqs/aws2-sqs.json b/components/camel-aws/camel-aws2-sqs/src/generated/resources/org/apache/camel/component/aws2/sqs/aws2-sqs.json index d0961f010d4..52464066dca 100644 --- a/components/camel-aws/camel-aws2-sqs/src/generated/resources/org/apache/camel/component/aws2/sqs/aws2-sqs.json +++ b/components/camel-aws/camel-aws2-sqs/src/generated/resources/org/apache/camel/component/aws2/sqs/aws2-sqs.json @@ -27,6 +27,7 @@ "autoCreateQueue": { "kind": "property", "displayName": "Auto Create Queue", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Setting the autocreation of the queue" }, "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "deprecated": false, "autowired": false, "secret": false, "description": "The AWS SQS default configuration" }, "overrideEndpoint": { "kind": "property", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with uriEndpoint [...] + "profileCredentialsName": { "kind": "property", "displayName": "Profile Credentials Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" }, "protocol": { "kind": "property", "displayName": "Protocol", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The underlying protocol used to communicate with SQS" }, "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", "group": "common", "label": "", "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.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the [...] "queueOwnerAWSAccountId": { "kind": "property", "displayName": "Queue Owner AWSAccount Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Specify the queue owner aws account id when you need to connect the queue with different account owner." }, @@ -34,6 +35,7 @@ "trustAllCertificates": { "kind": "property", "displayName": "Trust All Certificates", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" }, "uriEndpointOverride": { "kind": "property", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" }, "useDefaultCredentialsProvider": { "kind": "property", "displayName": "Use Default Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set whether the SQS client should expect to load credentials on an AWS inf [...] + "useProfileCredentialsProvider": { "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set whether the SQS client should expect to load credentials through a pro [...] "attributeNames": { "kind": "property", "displayName": "Attribute Names", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "A list of attribute names to receive when consuming. Multiple names can be separated by comma." }, "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a me [...] "concurrentConsumers": { "kind": "property", "displayName": "Concurrent Consumers", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Allows you to use multiple threads to poll the sqs queue to increase throughput" }, @@ -84,6 +86,7 @@ "autoCreateQueue": { "kind": "parameter", "displayName": "Auto Create Queue", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Setting the autocreation of the queue" }, "headerFilterStrategy": { "kind": "parameter", "displayName": "Header Filter Strategy", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom HeaderFilterStrategy to map headers to\/from Camel." }, "overrideEndpoint": { "kind": "parameter", "displayName": "Override Endpoint", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in combination with uriEndpoin [...] + "profileCredentialsName": { "kind": "parameter", "displayName": "Profile Credentials Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" }, "protocol": { "kind": "parameter", "displayName": "Protocol", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The underlying protocol used to communicate with SQS" }, "proxyProtocol": { "kind": "parameter", "displayName": "Proxy Protocol", "group": "common", "label": "", "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.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating th [...] "queueOwnerAWSAccountId": { "kind": "parameter", "displayName": "Queue Owner AWSAccount Id", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Specify the queue owner aws account id when you need to connect the queue with different account owner." }, @@ -91,6 +94,7 @@ "trustAllCertificates": { "kind": "parameter", "displayName": "Trust All Certificates", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" }, "uriEndpointOverride": { "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option" }, "useDefaultCredentialsProvider": { "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set whether the SQS client should expect to load credentials on an AWS in [...] + "useProfileCredentialsProvider": { "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Set whether the SQS client should expect to load credentials through a pr [...] "attributeNames": { "kind": "parameter", "displayName": "Attribute Names", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "A list of attribute names to receive when consuming. Multiple names can be separated by comma." }, "concurrentConsumers": { "kind": "parameter", "displayName": "Concurrent Consumers", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "Allows you to use multiple threads to poll the sqs queue to increase throughput" }, "defaultVisibilityTimeout": { "kind": "parameter", "displayName": "Default Visibility Timeout", "group": "consumer", "label": "consumer", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.sqs.Sqs2Configuration", "configurationField": "configuration", "description": "The default visibility timeout (in seconds)" },
