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

[camel] 04/06: CAMEL-16171 - Add uri-endpoint-override options to all AWS2 components - AWS2-EC2 component

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

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

commit e6f32a815297cf4d174b1a25ee8bf3cfcbe13f00
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Mar 1 06:56:05 2021 +0100

    CAMEL-16171 - Add uri-endpoint-override options to all AWS2 components - AWS2-EC2 component
---
 .../main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Endpoint.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/components/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Endpoint.java b/components/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Endpoint.java
index 993e4a9..1127382 100644
--- a/components/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Endpoint.java
+++ b/components/camel-aws2-ec2/src/main/java/org/apache/camel/component/aws2/ec2/AWS2EC2Endpoint.java
@@ -121,6 +121,9 @@ public class AWS2EC2Endpoint extends ScheduledPollEndpoint {
         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()