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 2023/06/12 13:18:09 UTC
[camel] branch main updated (e2f29dc7293 -> f6a8dcec4ec)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
from e2f29dc7293 CAMEL-18597: Add dev console for route circuit breaker and support in the jbang command.
new cc6f3d158f7 CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
new 33ff8955950 CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
new cb843f4d0b2 CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
new 6aac43871a5 CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
new 3d67c0b681c CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
new f6a8dcec4ec CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../apache/camel/catalog/components/aws2-cw.json | 56 ++++++++++++----------
.../component/aws2/cw/Cw2ComponentConfigurer.java | 12 +++++
.../component/aws2/cw/Cw2EndpointConfigurer.java | 12 +++++
.../component/aws2/cw/Cw2EndpointUriFactory.java | 4 +-
.../apache/camel/component/aws2/cw/aws2-cw.json | 56 ++++++++++++----------
.../src/main/docs/aws2-cw-component.adoc | 8 +++-
.../camel/component/aws2/cw/Cw2Component.java | 6 ++-
.../camel/component/aws2/cw/Cw2Configuration.java | 26 ++++++++++
.../component/aws2/cw/client/Cw2ClientFactory.java | 10 +++-
....java => Cw2ClientIAMProfileOptimizedImpl.java} | 11 +++--
.../endpoint/dsl/Cw2EndpointBuilderFactory.java | 51 ++++++++++++++++++++
11 files changed, 191 insertions(+), 61 deletions(-)
copy components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/client/impl/{Cw2ClientIAMOptimizedImpl.java => Cw2ClientIAMProfileOptimizedImpl.java} (88%)
[camel] 06/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
Posted by ac...@apache.org.
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 f6a8dcec4ec1f1d7ac3b2743424e498ab16407cd
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 12 15:05:00 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../apache/camel/catalog/components/aws2-cw.json | 56 ++++++++++++----------
.../endpoint/dsl/Cw2EndpointBuilderFactory.java | 51 ++++++++++++++++++++
2 files changed, 81 insertions(+), 26 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-cw.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-cw.json
index ac4a504b074..51ee300af56 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-cw.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-cw.json
@@ -27,19 +27,21 @@
"lazyStartProducer": { "index": 2, "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 [...]
"name": { "index": 3, "kind": "property", "displayName": "Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric name" },
"overrideEndpoint": { "index": 4, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination with [...]
- "proxyHost": { "index": 5, "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
- "proxyPort": { "index": 6, "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
- "proxyProtocol": { "index": 7, "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when insta [...]
- "region": { "index": 8, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "The region in which CW client needs to work. When using this parameter, the configuration will expect the lowercase name of th [...]
- "timestamp": { "index": 9, "kind": "property", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
- "trustAllCertificates": { "index": 10, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
- "unit": { "index": 11, "kind": "property", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
- "uriEndpointOverride": { "index": 12, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoin [...]
- "useDefaultCredentialsProvider": { "index": 13, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load credentials t [...]
- "value": { "index": 14, "kind": "property", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
- "autowiredEnabled": { "index": 15, "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 [...]
- "accessKey": { "index": 16, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
- "secretKey": { "index": 17, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" },
+ "proxyHost": { "index": 6, "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
+ "proxyPort": { "index": 7, "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
+ "proxyProtocol": { "index": 8, "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when insta [...]
+ "region": { "index": 9, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "The region in which CW client needs to work. When using this parameter, the configuration will expect the lowercase name of th [...]
+ "timestamp": { "index": 10, "kind": "property", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
+ "trustAllCertificates": { "index": 11, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "unit": { "index": 12, "kind": "property", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
+ "uriEndpointOverride": { "index": 13, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoin [...]
+ "useDefaultCredentialsProvider": { "index": 14, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load credentials t [...]
+ "useProfileCredentialsProvider": { "index": 15, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the Cloudwatch client should expect to load crede [...]
+ "value": { "index": 16, "kind": "property", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
+ "autowiredEnabled": { "index": 17, "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 [...]
+ "accessKey": { "index": 18, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 19, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
},
"headers": {
"CamelAwsCwMetricNamespace": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric namespace.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_NAMESPACE" },
@@ -56,18 +58,20 @@
"amazonCwClient": { "index": 1, "kind": "parameter", "displayName": "Amazon Cw Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.cloudwatch.CloudWatchClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To use the AmazonCloudWatch as the client" },
"name": { "index": 2, "kind": "parameter", "displayName": "Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric name" },
"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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination wit [...]
- "proxyHost": { "index": 4, "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
- "proxyPort": { "index": 5, "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
- "proxyProtocol": { "index": 6, "kind": "parameter", "displayName": "Proxy Protocol", "group": "producer", "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when inst [...]
- "region": { "index": 7, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "The region in which CW client needs to work. When using this parameter, the configuration will expect the lowercase name of t [...]
- "timestamp": { "index": 8, "kind": "parameter", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
- "trustAllCertificates": { "index": 9, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
- "unit": { "index": 10, "kind": "parameter", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
- "uriEndpointOverride": { "index": 11, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoi [...]
- "useDefaultCredentialsProvider": { "index": 12, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load credentials [...]
- "value": { "index": 13, "kind": "parameter", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
- "lazyStartProducer": { "index": 14, "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 [...]
- "accessKey": { "index": 15, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
- "secretKey": { "index": 16, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ "profileCredentialsName": { "index": 4, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" },
+ "proxyHost": { "index": 5, "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
+ "proxyPort": { "index": 6, "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
+ "proxyProtocol": { "index": 7, "kind": "parameter", "displayName": "Proxy Protocol", "group": "producer", "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when inst [...]
+ "region": { "index": 8, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "The region in which CW client needs to work. When using this parameter, the configuration will expect the lowercase name of t [...]
+ "timestamp": { "index": 9, "kind": "parameter", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
+ "trustAllCertificates": { "index": 10, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "unit": { "index": 11, "kind": "parameter", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
+ "uriEndpointOverride": { "index": 12, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoi [...]
+ "useDefaultCredentialsProvider": { "index": 13, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load credentials [...]
+ "useProfileCredentialsProvider": { "index": 14, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the Cloudwatch client should expect to load cred [...]
+ "value": { "index": 15, "kind": "parameter", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
+ "lazyStartProducer": { "index": 16, "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 [...]
+ "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.cw.Cw2Configuration", "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
}
}
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Cw2EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Cw2EndpointBuilderFactory.java
index 6a270120b35..de9f8799e65 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Cw2EndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Cw2EndpointBuilderFactory.java
@@ -119,6 +119,22 @@ public interface Cw2EndpointBuilderFactory {
doSetProperty("overrideEndpoint", overrideEndpoint);
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 Cw2EndpointBuilder profileCredentialsName(
+ String profileCredentialsName) {
+ doSetProperty("profileCredentialsName", profileCredentialsName);
+ return this;
+ }
/**
* To define a proxy host when instantiating the CW client.
*
@@ -343,6 +359,41 @@ public interface Cw2EndpointBuilderFactory {
doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
return this;
}
+ /**
+ * Set whether the Cloudwatch 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 Cw2EndpointBuilder useProfileCredentialsProvider(
+ boolean useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the Cloudwatch 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 Cw2EndpointBuilder useProfileCredentialsProvider(
+ String useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
/**
* The metric value.
*
[camel] 02/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
Posted by ac...@apache.org.
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 33ff895595043dcfcd423e7f26457ec42aab6f11
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 12 14:06:49 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../component/aws2/cw/client/Cw2ClientFactory.java | 10 ++-
.../impl/Cw2ClientIAMProfileOptimizedImpl.java | 93 ++++++++++++++++++++++
2 files changed, 101 insertions(+), 2 deletions(-)
diff --git a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/client/Cw2ClientFactory.java b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/client/Cw2ClientFactory.java
index 1960bf2c05b..cf2abffa32a 100644
--- a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/client/Cw2ClientFactory.java
+++ b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/client/Cw2ClientFactory.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.aws2.cw.client;
import org.apache.camel.component.aws2.cw.Cw2Configuration;
import org.apache.camel.component.aws2.cw.client.impl.Cw2ClientIAMOptimizedImpl;
+import org.apache.camel.component.aws2.cw.client.impl.Cw2ClientIAMProfileOptimizedImpl;
import org.apache.camel.component.aws2.cw.client.impl.Cw2ClientStandardImpl;
/**
@@ -35,7 +36,12 @@ public final class Cw2ClientFactory {
* @return CloudWatchClient
*/
public static Cw2InternalClient getCloudWatchClient(Cw2Configuration configuration) {
- return Boolean.TRUE.equals(configuration.isUseDefaultCredentialsProvider())
- ? new Cw2ClientIAMOptimizedImpl(configuration) : new Cw2ClientStandardImpl(configuration);
+ if (Boolean.TRUE.equals(configuration.isUseDefaultCredentialsProvider())) {
+ return new Cw2ClientIAMOptimizedImpl(configuration);
+ } else if (Boolean.TRUE.equals(configuration.isUseProfileCredentialsProvider())) {
+ return new Cw2ClientIAMProfileOptimizedImpl(configuration);
+ } else {
+ return new Cw2ClientStandardImpl(configuration);
+ }
}
}
diff --git a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/client/impl/Cw2ClientIAMProfileOptimizedImpl.java b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/client/impl/Cw2ClientIAMProfileOptimizedImpl.java
new file mode 100644
index 00000000000..d5ccd05dd66
--- /dev/null
+++ b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/client/impl/Cw2ClientIAMProfileOptimizedImpl.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.cw.client.impl;
+
+import org.apache.camel.component.aws2.cw.Cw2Configuration;
+import org.apache.camel.component.aws2.cw.client.Cw2InternalClient;
+import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider;
+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.cloudwatch.CloudWatchClient;
+import software.amazon.awssdk.services.cloudwatch.CloudWatchClientBuilder;
+import software.amazon.awssdk.utils.AttributeMap;
+
+import java.net.URI;
+
+/**
+ * Manage an AWS CloudWatch 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 Cw2ClientIAMProfileOptimizedImpl implements Cw2InternalClient {
+ private static final Logger LOG = LoggerFactory.getLogger(Cw2ClientIAMProfileOptimizedImpl.class);
+ private Cw2Configuration configuration;
+
+ /**
+ * Constructor that uses the config file.
+ */
+ public Cw2ClientIAMProfileOptimizedImpl(Cw2Configuration configuration) {
+ LOG.trace("Creating an AWS CloudWatch client for an ec2 instance with IAM temporary credentials (normal for ec2s).");
+ this.configuration = configuration;
+ }
+
+ /**
+ * Getting the Cloud watch aws client that is used.
+ *
+ * @return Cloud Watch Client.
+ */
+ @Override
+ public CloudWatchClient getCloudWatchClient() {
+ CloudWatchClient client = null;
+ CloudWatchClientBuilder clientBuilder = CloudWatchClient.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 (configuration.getProfileCredentialsName() != null) {
+ clientBuilder = clientBuilder
+ .credentialsProvider(ProfileCredentialsProvider.create(configuration.getProfileCredentialsName()));
+ }
+ 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;
+ }
+}
[camel] 03/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
Posted by ac...@apache.org.
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 cb843f4d0b2cf7fbc004850af4f6f8b5ea7d71ad
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 12 14:07:56 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../component/aws2/cw/Cw2ComponentConfigurer.java | 12 +++++
.../component/aws2/cw/Cw2EndpointConfigurer.java | 12 +++++
.../component/aws2/cw/Cw2EndpointUriFactory.java | 4 +-
.../apache/camel/component/aws2/cw/aws2-cw.json | 56 ++++++++++++----------
4 files changed, 57 insertions(+), 27 deletions(-)
diff --git a/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2ComponentConfigurer.java b/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2ComponentConfigurer.java
index fcde0cc6fb0..d7a831d02bf 100644
--- a/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2ComponentConfigurer.java
+++ b/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2ComponentConfigurer.java
@@ -40,6 +40,8 @@ public class Cw2ComponentConfigurer extends PropertyConfigurerSupport implements
case "name": getOrCreateConfiguration(target).setName(property(camelContext, java.lang.String.class, value)); return true;
case "overrideendpoint":
case "overrideEndpoint": getOrCreateConfiguration(target).setOverrideEndpoint(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":
@@ -57,6 +59,8 @@ public class Cw2ComponentConfigurer extends PropertyConfigurerSupport implements
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 "value": getOrCreateConfiguration(target).setValue(property(camelContext, java.lang.Double.class, value)); return true;
default: return false;
}
@@ -82,6 +86,8 @@ public class Cw2ComponentConfigurer extends PropertyConfigurerSupport implements
case "name": return java.lang.String.class;
case "overrideendpoint":
case "overrideEndpoint": return boolean.class;
+ case "profilecredentialsname":
+ case "profileCredentialsName": return java.lang.String.class;
case "proxyhost":
case "proxyHost": return java.lang.String.class;
case "proxyport":
@@ -99,6 +105,8 @@ public class Cw2ComponentConfigurer extends PropertyConfigurerSupport implements
case "uriEndpointOverride": return java.lang.String.class;
case "usedefaultcredentialsprovider":
case "useDefaultCredentialsProvider": return boolean.class;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return boolean.class;
case "value": return java.lang.Double.class;
default: return null;
}
@@ -120,6 +128,8 @@ public class Cw2ComponentConfigurer extends PropertyConfigurerSupport implements
case "name": return getOrCreateConfiguration(target).getName();
case "overrideendpoint":
case "overrideEndpoint": return getOrCreateConfiguration(target).isOverrideEndpoint();
+ case "profilecredentialsname":
+ case "profileCredentialsName": return getOrCreateConfiguration(target).getProfileCredentialsName();
case "proxyhost":
case "proxyHost": return getOrCreateConfiguration(target).getProxyHost();
case "proxyport":
@@ -137,6 +147,8 @@ public class Cw2ComponentConfigurer extends PropertyConfigurerSupport implements
case "uriEndpointOverride": return getOrCreateConfiguration(target).getUriEndpointOverride();
case "usedefaultcredentialsprovider":
case "useDefaultCredentialsProvider": return getOrCreateConfiguration(target).isUseDefaultCredentialsProvider();
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return getOrCreateConfiguration(target).isUseProfileCredentialsProvider();
case "value": return getOrCreateConfiguration(target).getValue();
default: return null;
}
diff --git a/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointConfigurer.java b/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointConfigurer.java
index ba28722c1c4..6462288de8d 100644
--- a/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointConfigurer.java
+++ b/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointConfigurer.java
@@ -30,6 +30,8 @@ public class Cw2EndpointConfigurer extends PropertyConfigurerSupport implements
case "name": target.getConfiguration().setName(property(camelContext, java.lang.String.class, value)); return true;
case "overrideendpoint":
case "overrideEndpoint": target.getConfiguration().setOverrideEndpoint(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":
@@ -47,6 +49,8 @@ public class Cw2EndpointConfigurer extends PropertyConfigurerSupport implements
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;
case "value": target.getConfiguration().setValue(property(camelContext, java.lang.Double.class, value)); return true;
default: return false;
}
@@ -69,6 +73,8 @@ public class Cw2EndpointConfigurer extends PropertyConfigurerSupport implements
case "name": return java.lang.String.class;
case "overrideendpoint":
case "overrideEndpoint": return boolean.class;
+ case "profilecredentialsname":
+ case "profileCredentialsName": return java.lang.String.class;
case "proxyhost":
case "proxyHost": return java.lang.String.class;
case "proxyport":
@@ -86,6 +92,8 @@ public class Cw2EndpointConfigurer extends PropertyConfigurerSupport implements
case "uriEndpointOverride": return java.lang.String.class;
case "usedefaultcredentialsprovider":
case "useDefaultCredentialsProvider": return boolean.class;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return boolean.class;
case "value": return java.lang.Double.class;
default: return null;
}
@@ -104,6 +112,8 @@ public class Cw2EndpointConfigurer extends PropertyConfigurerSupport implements
case "name": return target.getConfiguration().getName();
case "overrideendpoint":
case "overrideEndpoint": return target.getConfiguration().isOverrideEndpoint();
+ case "profilecredentialsname":
+ case "profileCredentialsName": return target.getConfiguration().getProfileCredentialsName();
case "proxyhost":
case "proxyHost": return target.getConfiguration().getProxyHost();
case "proxyport":
@@ -121,6 +131,8 @@ public class Cw2EndpointConfigurer extends PropertyConfigurerSupport implements
case "uriEndpointOverride": return target.getConfiguration().getUriEndpointOverride();
case "usedefaultcredentialsprovider":
case "useDefaultCredentialsProvider": return target.getConfiguration().isUseDefaultCredentialsProvider();
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return target.getConfiguration().isUseProfileCredentialsProvider();
case "value": return target.getConfiguration().getValue();
default: return null;
}
diff --git a/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointUriFactory.java b/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointUriFactory.java
index cebe7814215..8447535a105 100644
--- a/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointUriFactory.java
+++ b/components/camel-aws/camel-aws2-cw/src/generated/java/org/apache/camel/component/aws2/cw/Cw2EndpointUriFactory.java
@@ -21,13 +21,14 @@ public class Cw2EndpointUriFactory extends org.apache.camel.support.component.En
private static final Set<String> SECRET_PROPERTY_NAMES;
private static final Set<String> MULTI_VALUE_PREFIXES;
static {
- Set<String> props = new HashSet<>(17);
+ Set<String> props = new HashSet<>(19);
props.add("accessKey");
props.add("amazonCwClient");
props.add("lazyStartProducer");
props.add("name");
props.add("namespace");
props.add("overrideEndpoint");
+ props.add("profileCredentialsName");
props.add("proxyHost");
props.add("proxyPort");
props.add("proxyProtocol");
@@ -38,6 +39,7 @@ public class Cw2EndpointUriFactory extends org.apache.camel.support.component.En
props.add("unit");
props.add("uriEndpointOverride");
props.add("useDefaultCredentialsProvider");
+ props.add("useProfileCredentialsProvider");
props.add("value");
PROPERTY_NAMES = Collections.unmodifiableSet(props);
Set<String> secretProps = new HashSet<>(2);
diff --git a/components/camel-aws/camel-aws2-cw/src/generated/resources/org/apache/camel/component/aws2/cw/aws2-cw.json b/components/camel-aws/camel-aws2-cw/src/generated/resources/org/apache/camel/component/aws2/cw/aws2-cw.json
index ac4a504b074..51ee300af56 100644
--- a/components/camel-aws/camel-aws2-cw/src/generated/resources/org/apache/camel/component/aws2/cw/aws2-cw.json
+++ b/components/camel-aws/camel-aws2-cw/src/generated/resources/org/apache/camel/component/aws2/cw/aws2-cw.json
@@ -27,19 +27,21 @@
"lazyStartProducer": { "index": 2, "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 [...]
"name": { "index": 3, "kind": "property", "displayName": "Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric name" },
"overrideEndpoint": { "index": 4, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination with [...]
- "proxyHost": { "index": 5, "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
- "proxyPort": { "index": 6, "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
- "proxyProtocol": { "index": 7, "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when insta [...]
- "region": { "index": 8, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "The region in which CW client needs to work. When using this parameter, the configuration will expect the lowercase name of th [...]
- "timestamp": { "index": 9, "kind": "property", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
- "trustAllCertificates": { "index": 10, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
- "unit": { "index": 11, "kind": "property", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
- "uriEndpointOverride": { "index": 12, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoin [...]
- "useDefaultCredentialsProvider": { "index": 13, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load credentials t [...]
- "value": { "index": 14, "kind": "property", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
- "autowiredEnabled": { "index": 15, "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 [...]
- "accessKey": { "index": 16, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
- "secretKey": { "index": 17, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" },
+ "proxyHost": { "index": 6, "kind": "property", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
+ "proxyPort": { "index": 7, "kind": "property", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
+ "proxyProtocol": { "index": 8, "kind": "property", "displayName": "Proxy Protocol", "group": "producer", "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when insta [...]
+ "region": { "index": 9, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "The region in which CW client needs to work. When using this parameter, the configuration will expect the lowercase name of th [...]
+ "timestamp": { "index": 10, "kind": "property", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
+ "trustAllCertificates": { "index": 11, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "unit": { "index": 12, "kind": "property", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
+ "uriEndpointOverride": { "index": 13, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoin [...]
+ "useDefaultCredentialsProvider": { "index": 14, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load credentials t [...]
+ "useProfileCredentialsProvider": { "index": 15, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the Cloudwatch client should expect to load crede [...]
+ "value": { "index": 16, "kind": "property", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
+ "autowiredEnabled": { "index": 17, "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 [...]
+ "accessKey": { "index": 18, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "secretKey": { "index": 19, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
},
"headers": {
"CamelAwsCwMetricNamespace": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Amazon CW metric namespace.", "constantName": "org.apache.camel.component.aws2.cw.Cw2Constants#METRIC_NAMESPACE" },
@@ -56,18 +58,20 @@
"amazonCwClient": { "index": 1, "kind": "parameter", "displayName": "Amazon Cw Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.cloudwatch.CloudWatchClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To use the AmazonCloudWatch as the client" },
"name": { "index": 2, "kind": "parameter", "displayName": "Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric name" },
"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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the need for overidding the endpoint. This option needs to be used in combination wit [...]
- "proxyHost": { "index": 4, "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
- "proxyPort": { "index": 5, "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
- "proxyProtocol": { "index": 6, "kind": "parameter", "displayName": "Proxy Protocol", "group": "producer", "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when inst [...]
- "region": { "index": 7, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "The region in which CW client needs to work. When using this parameter, the configuration will expect the lowercase name of t [...]
- "timestamp": { "index": 8, "kind": "parameter", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
- "trustAllCertificates": { "index": 9, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
- "unit": { "index": 10, "kind": "parameter", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
- "uriEndpointOverride": { "index": 11, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoi [...]
- "useDefaultCredentialsProvider": { "index": 12, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load credentials [...]
- "value": { "index": 13, "kind": "parameter", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
- "lazyStartProducer": { "index": 14, "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 [...]
- "accessKey": { "index": 15, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
- "secretKey": { "index": 16, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
+ "profileCredentialsName": { "index": 4, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the profile name" },
+ "proxyHost": { "index": 5, "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
+ "proxyPort": { "index": 6, "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
+ "proxyProtocol": { "index": 7, "kind": "parameter", "displayName": "Proxy Protocol", "group": "producer", "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "To define a proxy protocol when inst [...]
+ "region": { "index": 8, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "The region in which CW client needs to work. When using this parameter, the configuration will expect the lowercase name of t [...]
+ "timestamp": { "index": 9, "kind": "parameter", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.time.Instant", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric timestamp" },
+ "trustAllCertificates": { "index": 10, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overriding the endpoint" },
+ "unit": { "index": 11, "kind": "parameter", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric unit" },
+ "uriEndpointOverride": { "index": 12, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoi [...]
+ "useDefaultCredentialsProvider": { "index": 13, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the S3 client should expect to load credentials [...]
+ "useProfileCredentialsProvider": { "index": 14, "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Set whether the Cloudwatch client should expect to load cred [...]
+ "value": { "index": 15, "kind": "parameter", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.cw.Cw2Configuration", "configurationField": "configuration", "description": "The metric value" },
+ "lazyStartProducer": { "index": 16, "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 [...]
+ "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.cw.Cw2Configuration", "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.cw.Cw2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
}
}
[camel] 01/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
Posted by ac...@apache.org.
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 cc6f3d158f7fe1da78a0c99fc37c00d27206a909
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 12 12:40:00 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../camel/component/aws2/cw/Cw2Component.java | 4 ++--
.../camel/component/aws2/cw/Cw2Configuration.java | 26 ++++++++++++++++++++++
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Component.java b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Component.java
index 32ed02ce969..526162d448c 100644
--- a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Component.java
+++ b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Component.java
@@ -55,10 +55,10 @@ public class Cw2Component extends DefaultComponent {
// parameters
setProperties(endpoint, parameters);
- if (Boolean.FALSE.equals(configuration.isUseDefaultCredentialsProvider()) && configuration.getAmazonCwClient() == null
+ if (Boolean.FALSE.equals(configuration.isUseDefaultCredentialsProvider()) && Boolean.FALSE.equals(configuration.isUseProfileCredentialsProvider()) && configuration.getAmazonCwClient() == null
&& (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
throw new IllegalArgumentException(
- "useDefaultCredentialsProvider is set to false, AmazonCwClient or accessKey and secretKey must be specified");
+ "useDefaultCredentialsProvider is set to false, useProfileCredentialsProvider is set to false, AmazonCwClient or accessKey and secretKey must be specified");
}
return endpoint;
diff --git a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Configuration.java b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Configuration.java
index cb857248a68..82eec2b95d6 100644
--- a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Configuration.java
+++ b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Configuration.java
@@ -63,6 +63,10 @@ public class Cw2Configuration implements Cloneable {
private String uriEndpointOverride;
@UriParam(defaultValue = "false")
private boolean useDefaultCredentialsProvider;
+ @UriParam(defaultValue = "false")
+ private boolean useProfileCredentialsProvider;
+ @UriParam
+ private String profileCredentialsName;
public String getAccessKey() {
return accessKey;
@@ -242,6 +246,28 @@ public class Cw2Configuration implements Cloneable {
public Boolean isUseDefaultCredentialsProvider() {
return useDefaultCredentialsProvider;
}
+
+ public boolean isUseProfileCredentialsProvider() {
+ return useProfileCredentialsProvider;
+ }
+
+ /**
+ * Set whether the Cloudwatch 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;
+ }
// *************************************************
//
// *************************************************
[camel] 04/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
Posted by ac...@apache.org.
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 6aac43871a57ac5879068220877a2c9dd3b1981c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 12 14:08:44 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../main/java/org/apache/camel/component/aws2/cw/Cw2Component.java | 4 +++-
.../aws2/cw/client/impl/Cw2ClientIAMProfileOptimizedImpl.java | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Component.java b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Component.java
index 526162d448c..a5712bb7636 100644
--- a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Component.java
+++ b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Component.java
@@ -55,7 +55,9 @@ public class Cw2Component extends DefaultComponent {
// parameters
setProperties(endpoint, parameters);
- if (Boolean.FALSE.equals(configuration.isUseDefaultCredentialsProvider()) && Boolean.FALSE.equals(configuration.isUseProfileCredentialsProvider()) && configuration.getAmazonCwClient() == null
+ if (Boolean.FALSE.equals(configuration.isUseDefaultCredentialsProvider())
+ && Boolean.FALSE.equals(configuration.isUseProfileCredentialsProvider())
+ && configuration.getAmazonCwClient() == null
&& (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
throw new IllegalArgumentException(
"useDefaultCredentialsProvider is set to false, useProfileCredentialsProvider is set to false, AmazonCwClient or accessKey and secretKey must be specified");
diff --git a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/client/impl/Cw2ClientIAMProfileOptimizedImpl.java b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/client/impl/Cw2ClientIAMProfileOptimizedImpl.java
index d5ccd05dd66..36142ff1c26 100644
--- a/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/client/impl/Cw2ClientIAMProfileOptimizedImpl.java
+++ b/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/client/impl/Cw2ClientIAMProfileOptimizedImpl.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.aws2.cw.client.impl;
+import java.net.URI;
+
import org.apache.camel.component.aws2.cw.Cw2Configuration;
import org.apache.camel.component.aws2.cw.client.Cw2InternalClient;
import org.apache.camel.util.ObjectHelper;
@@ -31,8 +33,6 @@ import software.amazon.awssdk.services.cloudwatch.CloudWatchClient;
import software.amazon.awssdk.services.cloudwatch.CloudWatchClientBuilder;
import software.amazon.awssdk.utils.AttributeMap;
-import java.net.URI;
-
/**
* Manage an AWS CloudWatch 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)
[camel] 05/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
Posted by ac...@apache.org.
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 3d67c0b681c4b1520ef9843111fafbd7d52f6066
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 12 14:12:05 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS CloudWatch
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../camel-aws/camel-aws2-cw/src/main/docs/aws2-cw-component.adoc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/components/camel-aws/camel-aws2-cw/src/main/docs/aws2-cw-component.adoc b/components/camel-aws/camel-aws2-cw/src/main/docs/aws2-cw-component.adoc
index a82f8727fc0..51ac3f0fc34 100644
--- a/components/camel-aws/camel-aws2-cw/src/main/docs/aws2-cw-component.adoc
+++ b/components/camel-aws/camel-aws2-cw/src/main/docs/aws2-cw-component.adoc
@@ -58,10 +58,12 @@ the https://aws.amazon.com/cloudwatch/[Amazon's CloudWatch].
== Usage
-=== Static credentials vs Default Credential Provider
+=== 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.
@@ -69,6 +71,10 @@ You have the possibility of avoiding the usage of explicit static credentials, b
- 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