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 2f0af7b49141e7d95cd2e0b8093f5f287b9d2a10
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Jan 27 13:23:20 2020 +0100

    CAMEL-14446 - Create an AWS-ECS component based on SDK v2
---
 components/camel-aws2-ecs/pom.xml                  |  86 +++++
 .../src/main/docs/aws-ecs-component.adoc           | 196 ++++++++++++
 .../camel/component/aws2/ecs/ECS2Component.java    | 121 +++++++
 .../aws2/ecs/ECS2ComponentVerifierExtension.java   |  86 +++++
 .../component/aws2/ecs/ECS2Configuration.java      | 152 +++++++++
 .../camel/component/aws2/ecs/ECS2Constants.java    |  26 ++
 .../camel/component/aws2/ecs/ECS2Endpoint.java     | 120 +++++++
 .../camel/component/aws2/ecs/ECS2Operations.java   |  25 ++
 .../camel/component/aws2/ecs/ECS2Producer.java     | 176 +++++++++++
 .../component/aws2/ecs/AmazonECSClientMock.java    |  84 +++++
 .../aws2/ecs/ECSComponentClientRegistryTest.java   |  43 +++
 .../aws2/ecs/ECSComponentConfigurationTest.java    |  70 ++++
 .../ecs/ECSComponentVerifierExtensionTest.java     |  74 +++++
 .../component/aws2/ecs/ECSProducerSpringTest.java  | 115 +++++++
 .../camel/component/aws2/ecs/ECSProducerTest.java  | 135 ++++++++
 .../integration/ECS2ProducerIntegrationTest.java   |  60 ++++
 .../src/test/resources/log4j2.properties           |  28 ++
 .../aws2/ecs/ECSComponentSpringTest-context.xml    |  50 +++
 .../builder/endpoint/EndpointBuilderFactory.java   |   1 +
 .../camel/builder/endpoint/EndpointBuilders.java   |   1 +
 .../endpoint/dsl/ECS2EndpointBuilderFactory.java   | 351 +++++++++++++++++++++
 21 files changed, 2000 insertions(+)

diff --git a/components/camel-aws2-ecs/pom.xml 
b/components/camel-aws2-ecs/pom.xml
new file mode 100644
index 0000000..143359a
--- /dev/null
+++ b/components/camel-aws2-ecs/pom.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>components</artifactId>
+        <version>3.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-aws2-ecs</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Camel :: AWS2 ECS</name>
+    <description>A Camel Amazon ECS Web Service Component Version 
2</description>
+
+    <properties>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-support</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>software.amazon.awssdk</groupId>
+            <artifactId>ecs</artifactId>
+            <version>${aws-java-sdk2-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>software.amazon.awssdk</groupId>
+            <artifactId>apache-client</artifactId>
+            <version>${aws-java-sdk2-version}</version>
+        </dependency>
+
+        <!-- for testing -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-test-spring</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-slf4j-impl</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/components/camel-aws2-ecs/src/main/docs/aws-ecs-component.adoc 
b/components/camel-aws2-ecs/src/main/docs/aws-ecs-component.adoc
new file mode 100644
index 0000000..8df9eca
--- /dev/null
+++ b/components/camel-aws2-ecs/src/main/docs/aws-ecs-component.adoc
@@ -0,0 +1,196 @@
+[[aws-ecs-component]]
+= AWS ECS Component
+
+*Since Camel 3.0*
+
+// HEADER START
+*Only producer is supported*
+// HEADER END
+
+The ECS component supports create, delete, describe and list
+https://aws.amazon.com/ecs/[AWS ECS] clusters instances.
+
+Prerequisites
+
+You must have a valid Amazon Web Services developer account, and be
+signed up to use Amazon ECS. More information is available at
+https://aws.amazon.com/ecs/[Amazon ECS].
+
+== URI Format
+
+[source,java]
+-------------------------
+aws-ecs://label[?options]
+-------------------------
+
+You can append query options to the URI in the following format,
+?options=value&option2=value&...
+
+== URI Options
+
+
+// component options: START
+The AWS ECS component supports 6 options, which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *configuration* (advanced) | The AWS ECS default configuration |  | 
ECSConfiguration
+| *accessKey* (producer) | Amazon AWS Access Key |  | String
+| *secretKey* (producer) | Amazon AWS Secret Key |  | String
+| *region* (producer) | The region in which ECS client needs to work |  | 
String
+| *basicPropertyBinding* (advanced) | Whether the component should use basic 
property binding (Camel 2.x) or the newer property binding with additional 
capabilities | false | boolean
+| *lazyStartProducer* (producer) | Whether the producer should be started lazy 
(on the first message). By starting lazy you can use this to allow CamelContext 
and routes to startup in situations where a producer may otherwise fail during 
starting and cause the route to fail being started. By deferring this startup 
to be lazy then the startup failure can be handled during routing messages via 
Camel's routing error handlers. Beware that when the first message is processed 
then creating and [...]
+|===
+// component options: END
+
+
+
+
+// endpoint options: START
+The AWS ECS endpoint is configured using URI syntax:
+
+----
+aws-ecs:label
+----
+
+with the following path and query parameters:
+
+=== Path Parameters (1 parameters):
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *label* | *Required* Logical name |  | String
+|===
+
+
+=== Query Parameters (11 parameters):
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *accessKey* (producer) | Amazon AWS Access Key |  | String
+| *ecsClient* (producer) | To use a existing configured AWS ECS as client |  | 
AmazonECS
+| *lazyStartProducer* (producer) | Whether the producer should be started lazy 
(on the first message). By starting lazy you can use this to allow CamelContext 
and routes to startup in situations where a producer may otherwise fail during 
starting and cause the route to fail being started. By deferring this startup 
to be lazy then the startup failure can be handled during routing messages via 
Camel's routing error handlers. Beware that when the first message is processed 
then creating and [...]
+| *operation* (producer) | *Required* The operation to perform |  | 
ECSOperations
+| *proxyHost* (producer) | To define a proxy host when instantiating the ECS 
client |  | String
+| *proxyPort* (producer) | To define a proxy port when instantiating the ECS 
client |  | Integer
+| *proxyProtocol* (producer) | To define a proxy protocol when instantiating 
the ECS client | HTTPS | Protocol
+| *region* (producer) | The region in which ECS client needs to work. When 
using this parameter, the configuration will expect the capitalized name of the 
region (for example AP_EAST_1) You'll need to use the name 
Regions.EU_WEST_1.name() |  | String
+| *secretKey* (producer) | Amazon AWS Secret Key |  | String
+| *basicPropertyBinding* (advanced) | Whether the endpoint should use basic 
property binding (Camel 2.x) or the newer property binding with additional 
capabilities | false | boolean
+| *synchronous* (advanced) | Sets whether synchronous processing should be 
strictly used, or Camel is allowed to use asynchronous processing (if 
supported). | false | boolean
+|===
+// endpoint options: END
+// spring-boot-auto-configure options: START
+== Spring Boot Auto-Configuration
+
+When using Spring Boot make sure to use the following Maven dependency to have 
support for auto configuration:
+
+[source,xml]
+----
+<dependency>
+  <groupId>org.apache.camel.springboot</groupId>
+  <artifactId>camel-aws-ecs-starter</artifactId>
+  <version>x.x.x</version>
+  <!-- use the same version as your Camel core version -->
+</dependency>
+----
+
+
+The component supports 15 options, which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *camel.component.aws-ecs.access-key* | Amazon AWS Access Key |  | String
+| *camel.component.aws-ecs.basic-property-binding* | Whether the component 
should use basic property binding (Camel 2.x) or the newer property binding 
with additional capabilities | false | Boolean
+| *camel.component.aws-ecs.bridge-error-handler* | 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 message and handled by the routing Error Handler. By 
default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal 
with exceptions, that will be logged at WARN or ERROR level and ignored. | 
false | Boolean
+| *camel.component.aws-ecs.configuration.access-key* | Amazon AWS Access Key | 
 | String
+| *camel.component.aws-ecs.configuration.ecs-client* | To use a existing 
configured AWS ECS as client |  | AmazonECS
+| *camel.component.aws-ecs.configuration.operation* | The operation to perform 
|  | ECSOperations
+| *camel.component.aws-ecs.configuration.proxy-host* | To define a proxy host 
when instantiating the ECS client |  | String
+| *camel.component.aws-ecs.configuration.proxy-port* | To define a proxy port 
when instantiating the ECS client |  | Integer
+| *camel.component.aws-ecs.configuration.proxy-protocol* | To define a proxy 
protocol when instantiating the ECS client |  | Protocol
+| *camel.component.aws-ecs.configuration.region* | The region in which ECS 
client needs to work. When using this parameter, the configuration will expect 
the capitalized name of the region (for example AP_EAST_1) You'll need to use 
the name Regions.EU_WEST_1.name() |  | String
+| *camel.component.aws-ecs.configuration.secret-key* | Amazon AWS Secret Key | 
 | String
+| *camel.component.aws-ecs.enabled* | Whether to enable auto configuration of 
the aws-ecs component. This is enabled by default. |  | Boolean
+| *camel.component.aws-ecs.lazy-start-producer* | Whether the producer should 
be started lazy (on the first message). By starting lazy you can use this to 
allow CamelContext and routes to startup in situations where a producer may 
otherwise fail during starting and cause the route to fail being started. By 
deferring this startup to be lazy then the startup failure can be handled 
during routing messages via Camel's routing error handlers. Beware that when 
the first message is processed th [...]
+| *camel.component.aws-ecs.region* | The region in which ECS client needs to 
work |  | String
+| *camel.component.aws-ecs.secret-key* | Amazon AWS Secret Key |  | String
+|===
+// spring-boot-auto-configure options: END
+
+
+
+
+Required ECS component options
+
+You have to provide the amazonECSClient in the
+Registry or your accessKey and secretKey to access
+the https://aws.amazon.com/ecs/[Amazon ECS] service.
+
+== Usage
+
+=== Message headers evaluated by the ECS producer
+
+[width="100%",cols="10%,10%,80%",options="header",]
+|=======================================================================
+|Header |Type |Description
+
+|`CamelAwsECSMaxResults` |`Integer` |The limit number of results while listing 
clusters
+
+|`CamelAwsECSOperation` |`String` |The operation we want to perform
+
+|`CamelAwsECSClusterName` |`String` |The cluster name
+|=======================================================================
+
+=== ECS Producer operations
+
+Camel-AWS ECS component provides the following operation on the producer side:
+
+- listClusters
+- createCluster
+- describeCluster
+- deleteCluster
+
+== Producer Examples
+
+- listClusters: this operation will list the available clusters in ECS
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:listClusters")
+    .to("aws-ecs://test?ecsClient=#amazonEcsClient&operation=listClusters")
+--------------------------------------------------------------------------------
+
+== Automatic detection of AmazonECS client in registry
+
+The component is capable of detecting the presence of an AmazonECS bean into 
the registry.
+If it's the only instance of that type it will be used as client and you won't 
have to define it as uri parameter.
+This may be really useful for smarter configuration of the endpoint.
+
+Dependencies
+
+Maven users will need to add the following dependency to their pom.xml.
+
+*pom.xml*
+
+[source,xml]
+---------------------------------------
+<dependency>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-aws-ecs</artifactId>
+    <version>${camel-version}</version>
+</dependency>
+---------------------------------------
+
+where `$\{camel-version\}` must be replaced by the actual version of Camel.
+
diff --git 
a/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Component.java
 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Component.java
new file mode 100644
index 0000000..de3df20
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Component.java
@@ -0,0 +1,121 @@
+/*
+ * 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.ecs;
+
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.annotations.Component;
+import org.apache.camel.support.DefaultComponent;
+
+import software.amazon.awssdk.services.ecs.EcsClient;
+
+/**
+ * For working with Amazon ECS.
+ */
+@Component("aws2-ecs")
+public class ECS2Component extends DefaultComponent {
+
+    @Metadata
+    private String accessKey;
+    @Metadata
+    private String secretKey;
+    @Metadata
+    private String region;
+    @Metadata(label = "advanced")    
+    private ECS2Configuration configuration;
+    
+    public ECS2Component() {
+        this(null);
+    }
+    
+    public ECS2Component(CamelContext context) {
+        super(context);
+        
+        registerExtension(new ECS2ComponentVerifierExtension());
+    }
+
+    @Override
+    protected Endpoint createEndpoint(String uri, String remaining, 
Map<String, Object> parameters) throws Exception {
+        ECS2Configuration configuration = this.configuration != null ? 
this.configuration.copy() : new ECS2Configuration();
+        ECS2Endpoint endpoint = new ECS2Endpoint(uri, this, configuration);
+        endpoint.getConfiguration().setAccessKey(accessKey);
+        endpoint.getConfiguration().setSecretKey(secretKey);
+        endpoint.getConfiguration().setRegion(region);
+        setProperties(endpoint, parameters);
+        checkAndSetRegistryClient(configuration);
+        if (configuration.getEcsClient() == null && 
(configuration.getAccessKey() == null || configuration.getSecretKey() == null)) 
{
+            throw new IllegalArgumentException("Amazon ecs client or accessKey 
and secretKey must be specified");
+        }
+      
+        return endpoint;
+    }
+    
+    public ECS2Configuration getConfiguration() {
+        return configuration;
+    }
+
+    /**
+     * The AWS ECS default configuration
+     */
+    public void setConfiguration(ECS2Configuration configuration) {
+        this.configuration = configuration;
+    }
+
+    public String getAccessKey() {
+        return accessKey;
+    }
+
+    /**
+     * Amazon AWS Access Key
+     */
+    public void setAccessKey(String accessKey) {
+        this.accessKey = accessKey;
+    }
+
+    public String getSecretKey() {
+        return secretKey;
+    }
+
+    /**
+     * Amazon AWS Secret Key
+     */
+    public void setSecretKey(String secretKey) {
+        this.secretKey = secretKey;
+    }
+    
+    public String getRegion() {
+        return region;
+    }
+
+    /**
+     * The region in which ECS client needs to work
+     */
+    public void setRegion(String region) {
+        this.region = region;
+    }
+
+    private void checkAndSetRegistryClient(ECS2Configuration configuration) {
+        Set<EcsClient> clients = 
getCamelContext().getRegistry().findByType(EcsClient.class);
+        if (clients.size() == 1) {
+            configuration.setEcsClient(clients.stream().findFirst().get());
+        }
+    }
+}
diff --git 
a/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2ComponentVerifierExtension.java
 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2ComponentVerifierExtension.java
new file mode 100644
index 0000000..303bec8
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2ComponentVerifierExtension.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws2.ecs;
+
+import java.util.Map;
+
+import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
+import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
+import software.amazon.awssdk.core.exception.SdkClientException;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.ecs.EcsClient;
+import software.amazon.awssdk.services.ecs.EcsClientBuilder;
+import software.amazon.awssdk.services.ecs.model.ListClustersRequest;
+
+import 
org.apache.camel.component.extension.verifier.DefaultComponentVerifierExtension;
+import org.apache.camel.component.extension.verifier.ResultBuilder;
+import org.apache.camel.component.extension.verifier.ResultErrorBuilder;
+import org.apache.camel.component.extension.verifier.ResultErrorHelper;
+
+public class ECS2ComponentVerifierExtension extends 
DefaultComponentVerifierExtension {
+
+    public ECS2ComponentVerifierExtension() {
+        this("aws2-ecs");
+    }
+
+    public ECS2ComponentVerifierExtension(String scheme) {
+        super(scheme);
+    }
+
+    // *********************************
+    // Parameters validation
+    // *********************************
+
+    @Override
+    protected Result verifyParameters(Map<String, Object> parameters) {
+
+        ResultBuilder builder = 
ResultBuilder.withStatusAndScope(Result.Status.OK, 
Scope.PARAMETERS).error(ResultErrorHelper.requiresOption("accessKey", 
parameters))
+            .error(ResultErrorHelper.requiresOption("secretKey", 
parameters)).error(ResultErrorHelper.requiresOption("region", parameters));
+
+        // Validate using the catalog
+
+        super.verifyParametersAgainstCatalog(builder, parameters);
+
+        return builder.build();
+    }
+
+    // *********************************
+    // Connectivity validation
+    // *********************************
+
+    @Override
+    protected Result verifyConnectivity(Map<String, Object> parameters) {
+        ResultBuilder builder = 
ResultBuilder.withStatusAndScope(Result.Status.OK, Scope.CONNECTIVITY);
+
+        try {
+            ECS2Configuration configuration = setProperties(new 
ECS2Configuration(), parameters);
+            AwsCredentialsProvider credentialsProvider = 
DefaultCredentialsProvider.create();
+            EcsClientBuilder clientBuilder = EcsClient.builder();
+            EcsClient client = 
clientBuilder.credentialsProvider(credentialsProvider).region(Region.of(configuration.getRegion())).build();
+            client.listClusters(ListClustersRequest.builder().build());
+        } catch (SdkClientException e) {
+            ResultErrorBuilder errorBuilder = 
ResultErrorBuilder.withCodeAndDescription(VerificationError.StandardCode.AUTHENTICATION,
 e.getMessage())
+                .detail("aws_ecs_exception_message", 
e.getMessage()).detail(VerificationError.ExceptionAttribute.EXCEPTION_CLASS, 
e.getClass().getName())
+                
.detail(VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE, e);
+
+            builder.error(errorBuilder.build());
+        } catch (Exception e) {
+            builder.error(ResultErrorBuilder.withException(e).build());
+        }
+        return builder.build();
+    }
+}
diff --git 
a/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Configuration.java
 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Configuration.java
new file mode 100644
index 0000000..31fed9e
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Configuration.java
@@ -0,0 +1,152 @@
+/*
+ * 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.ecs;
+
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
+
+import software.amazon.awssdk.core.Protocol;
+import software.amazon.awssdk.services.ecs.EcsClient;
+
+@UriParams
+public class ECS2Configuration implements Cloneable {
+
+    @UriPath(description = "Logical name")
+    @Metadata(required = true)
+    private String label;
+    @UriParam(label = "producer")
+    private EcsClient ecsClient;
+    @UriParam(label = "producer", secret = true)
+    private String accessKey;
+    @UriParam(label = "producer", secret = true)
+    private String secretKey;
+    @UriParam(label = "producer")
+    @Metadata(required = true)
+    private ECS2Operations operation;
+    @UriParam(enums = "HTTP,HTTPS", defaultValue = "HTTPS")
+    private Protocol proxyProtocol = Protocol.HTTPS;
+    @UriParam(label = "producer")
+    private String proxyHost;
+    @UriParam(label = "producer")
+    private Integer proxyPort;
+    @UriParam
+    private String region;
+
+    public EcsClient getEcsClient() {
+        return ecsClient;
+    }
+
+    /**
+     * To use a existing configured AWS ECS as client
+     */
+    public void setEcsClient(EcsClient ecsClient) {
+        this.ecsClient = ecsClient;
+    }
+
+    public String getAccessKey() {
+        return accessKey;
+    }
+
+    /**
+     * Amazon AWS Access Key
+     */
+    public void setAccessKey(String accessKey) {
+        this.accessKey = accessKey;
+    }
+
+    public String getSecretKey() {
+        return secretKey;
+    }
+
+    /**
+     * Amazon AWS Secret Key
+     */
+    public void setSecretKey(String secretKey) {
+        this.secretKey = secretKey;
+    }
+
+    public ECS2Operations getOperation() {
+        return operation;
+    }
+
+    /**
+     * The operation to perform
+     */
+    public void setOperation(ECS2Operations operation) {
+        this.operation = operation;
+    }
+    
+    public Protocol getProxyProtocol() {
+        return proxyProtocol;
+    }
+
+    /**
+     * To define a proxy protocol when instantiating the ECS client
+     */
+    public void setProxyProtocol(Protocol proxyProtocol) {
+        this.proxyProtocol = proxyProtocol;
+    }
+
+    public String getProxyHost() {
+        return proxyHost;
+    }
+
+    /**
+     * To define a proxy host when instantiating the ECS client
+     */
+    public void setProxyHost(String proxyHost) {
+        this.proxyHost = proxyHost;
+    }
+
+    public Integer getProxyPort() {
+        return proxyPort;
+    }
+
+    /**
+     * To define a proxy port when instantiating the ECS client
+     */
+    public void setProxyPort(Integer proxyPort) {
+        this.proxyPort = proxyPort;
+    }
+
+    public String getRegion() {
+        return region;
+    }
+
+    /**
+     * The region in which ECS client needs to work. When using this 
parameter, the configuration will expect the capitalized name of the region 
(for example AP_EAST_1)
+     * You'll need to use the name Regions.EU_WEST_1.name()
+     */
+    public void setRegion(String region) {
+        this.region = region;
+    }
+    
+    // *************************************************
+    //
+    // *************************************************
+
+    public ECS2Configuration copy() {
+        try {
+            return (ECS2Configuration)super.clone();
+        } catch (CloneNotSupportedException e) {
+            throw new RuntimeCamelException(e);
+        }
+    }
+}
diff --git 
a/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Constants.java
 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Constants.java
new file mode 100644
index 0000000..d8d2d56
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Constants.java
@@ -0,0 +1,26 @@
+/*
+ * 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.ecs;
+
+/**
+ * Constants used in Camel AWS ECS module
+ */
+public interface ECS2Constants {
+    String OPERATION                = "CamelAwsECSOperation";
+    String MAX_RESULTS              = "CamelAwsECSMaxResults";
+    String CLUSTER_NAME             = "CamelAwsECSClusterName";
+}
diff --git 
a/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Endpoint.java
 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Endpoint.java
new file mode 100644
index 0000000..987d7a6
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Endpoint.java
@@ -0,0 +1,120 @@
+/*
+ * 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.ecs;
+
+import java.net.URI;
+
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.support.ScheduledPollEndpoint;
+import org.apache.camel.util.ObjectHelper;
+
+import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
+import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
+import software.amazon.awssdk.http.apache.ApacheHttpClient;
+import software.amazon.awssdk.http.apache.ProxyConfiguration;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.ecs.EcsClient;
+import software.amazon.awssdk.services.ecs.EcsClientBuilder;
+
+/**
+ * The aws-ecs is used for managing Amazon ECS
+ */
+@UriEndpoint(firstVersion = "3.1.0", scheme = "aws2-ecs", title = "AWS2 ECS", 
syntax = "aws2-ecs:label", producerOnly = true, label = "cloud,management")
+public class ECS2Endpoint extends ScheduledPollEndpoint {
+
+    private EcsClient ecsClient;
+
+    @UriParam
+    private ECS2Configuration configuration;
+
+    public ECS2Endpoint(String uri, Component component, ECS2Configuration 
configuration) {
+        super(uri, component);
+        this.configuration = configuration;
+    }
+
+    @Override
+    public Consumer createConsumer(Processor processor) throws Exception {
+        throw new UnsupportedOperationException("You cannot receive messages 
from this endpoint");
+    }
+
+    @Override
+    public Producer createProducer() throws Exception {
+        return new ECS2Producer(this);
+    }
+
+    @Override
+    public void doStart() throws Exception {
+        super.doStart();
+
+        ecsClient = configuration.getEcsClient() != null ? 
configuration.getEcsClient() : createECSClient();
+    }
+    
+    @Override
+    public void doStop() throws Exception {
+        if (ObjectHelper.isEmpty(configuration.getEcsClient())) {
+            if (ecsClient != null) {
+                ecsClient.close();
+            }
+        }
+        super.doStop();
+    }
+
+    public ECS2Configuration getConfiguration() {
+        return configuration;
+    }
+
+    public EcsClient getEcsClient() {
+        return ecsClient;
+    }
+
+    EcsClient createECSClient() {
+        EcsClient client = null;
+        EcsClientBuilder clientBuilder = EcsClient.builder();
+        ProxyConfiguration.Builder proxyConfig = null;
+        ApacheHttpClient.Builder httpClientBuilder = null;
+        boolean isClientConfigFound = false;
+        if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && 
ObjectHelper.isNotEmpty(configuration.getProxyPort())) {
+            proxyConfig = ProxyConfiguration.builder();
+            URI proxyEndpoint = URI.create(configuration.getProxyProtocol() + 
configuration.getProxyHost() + configuration.getProxyPort());
+            proxyConfig.endpoint(proxyEndpoint);
+            httpClientBuilder = 
ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
+            isClientConfigFound = true;
+        }
+        if (configuration.getAccessKey() != null && 
configuration.getSecretKey() != null) {
+            AwsBasicCredentials cred = 
AwsBasicCredentials.create(configuration.getAccessKey(), 
configuration.getSecretKey());
+            if (isClientConfigFound) {
+                clientBuilder = 
clientBuilder.httpClientBuilder(httpClientBuilder).credentialsProvider(StaticCredentialsProvider.create(cred));
+            } else {
+                clientBuilder = 
clientBuilder.credentialsProvider(StaticCredentialsProvider.create(cred));
+            }
+        } else {
+            if (!isClientConfigFound) {
+                clientBuilder = 
clientBuilder.httpClientBuilder(httpClientBuilder);
+            }
+        }
+        if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+            clientBuilder = 
clientBuilder.region(Region.of(configuration.getRegion()));
+        }
+        client = clientBuilder.build();
+        return client;
+    }
+}
diff --git 
a/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Operations.java
 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Operations.java
new file mode 100644
index 0000000..9b2fa34
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Operations.java
@@ -0,0 +1,25 @@
+/*
+ * 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.ecs;
+
+public enum ECS2Operations {
+
+    listClusters,
+    describeCluster,
+    createCluster,
+    deleteCluster
+}
diff --git 
a/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Producer.java
 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Producer.java
new file mode 100644
index 0000000..7070b45
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Producer.java
@@ -0,0 +1,176 @@
+/*
+ * 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.ecs;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.util.URISupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import software.amazon.awssdk.awscore.exception.AwsServiceException;
+import software.amazon.awssdk.services.ecs.EcsClient;
+import software.amazon.awssdk.services.ecs.model.CreateClusterRequest;
+import software.amazon.awssdk.services.ecs.model.CreateClusterResponse;
+import software.amazon.awssdk.services.ecs.model.DeleteClusterRequest;
+import software.amazon.awssdk.services.ecs.model.DeleteClusterResponse;
+import software.amazon.awssdk.services.ecs.model.DescribeClustersRequest;
+import software.amazon.awssdk.services.ecs.model.DescribeClustersResponse;
+import software.amazon.awssdk.services.ecs.model.ListClustersRequest;
+import software.amazon.awssdk.services.ecs.model.ListClustersRequest.Builder;
+import software.amazon.awssdk.services.ecs.model.ListClustersResponse;
+
+/**
+ * A Producer which sends messages to the Amazon ECS Service
+ * <a href="http://aws.amazon.com/ecs/";>AWS ECS</a>
+ */
+public class ECS2Producer extends DefaultProducer {
+
+    private static final Logger LOG = 
LoggerFactory.getLogger(ECS2Producer.class);
+
+    private transient String ecsProducerToString;
+
+    public ECS2Producer(Endpoint endpoint) {
+        super(endpoint);
+    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        switch (determineOperation(exchange)) {
+        case listClusters:
+            listClusters(getEndpoint().getEcsClient(), exchange);
+            break;
+        case describeCluster:
+            describeCluster(getEndpoint().getEcsClient(), exchange);
+            break;
+        case createCluster:
+            createCluster(getEndpoint().getEcsClient(), exchange);
+            break;
+        case deleteCluster:
+            deleteCluster(getEndpoint().getEcsClient(), exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation");
+        }
+    }
+
+    private ECS2Operations determineOperation(Exchange exchange) {
+        ECS2Operations operation = 
exchange.getIn().getHeader(ECS2Constants.OPERATION, ECS2Operations.class);
+        if (operation == null) {
+            operation = getConfiguration().getOperation();
+        }
+        return operation;
+    }
+
+    protected ECS2Configuration getConfiguration() {
+        return getEndpoint().getConfiguration();
+    }
+
+    @Override
+    public String toString() {
+        if (ecsProducerToString == null) {
+            ecsProducerToString = "ECSProducer[" + 
URISupport.sanitizeUri(getEndpoint().getEndpointUri()) + "]";
+        }
+        return ecsProducerToString;
+    }
+
+    @Override
+    public ECS2Endpoint getEndpoint() {
+        return (ECS2Endpoint)super.getEndpoint();
+    }
+
+    private void listClusters(EcsClient ecsClient, Exchange exchange) {
+        Builder builder = ListClustersRequest.builder();
+        if 
(ObjectHelper.isNotEmpty(exchange.getIn().getHeader(ECS2Constants.MAX_RESULTS)))
 {
+            int maxRes = exchange.getIn().getHeader(ECS2Constants.MAX_RESULTS, 
Integer.class);
+            builder.maxResults(maxRes);
+        }
+        ListClustersResponse result;
+        try {
+               ListClustersRequest request = builder.build();
+            result = ecsClient.listClusters(request);
+        } catch (AwsServiceException ase) {
+            LOG.trace("List Clusters command returned the error code {}", 
ase.getMessage());
+            throw ase;
+        }
+        Message message = getMessageForResponse(exchange);
+        message.setBody(result);
+    }
+    
+    private void createCluster(EcsClient ecsClient, Exchange exchange) {
+       CreateClusterRequest.Builder builder = CreateClusterRequest.builder();
+        if 
(ObjectHelper.isNotEmpty(exchange.getIn().getHeader(ECS2Constants.CLUSTER_NAME)))
 {
+            String name = 
exchange.getIn().getHeader(ECS2Constants.CLUSTER_NAME, String.class);
+            builder.clusterName(name);
+        }
+        CreateClusterResponse result;
+        try {
+               CreateClusterRequest request = builder.build();
+            result = ecsClient.createCluster(request);
+        } catch (AwsServiceException ase) {
+            LOG.trace("Create Cluster command returned the error code {}", 
ase.getMessage());
+            throw ase;
+        }
+        Message message = getMessageForResponse(exchange);
+        message.setBody(result);
+    }
+    
+    private void describeCluster(EcsClient ecsClient, Exchange exchange) {
+        DescribeClustersRequest.Builder builder = 
DescribeClustersRequest.builder();
+        if 
(ObjectHelper.isNotEmpty(exchange.getIn().getHeader(ECS2Constants.CLUSTER_NAME)))
 {
+            String clusterName = 
exchange.getIn().getHeader(ECS2Constants.CLUSTER_NAME, String.class);
+            builder.clusters(clusterName);
+        } 
+        DescribeClustersResponse result;
+        try {
+               DescribeClustersRequest request = builder.build();
+            result = ecsClient.describeClusters(request);
+        } catch (AwsServiceException ase) {
+            LOG.trace("Describe Clusters command returned the error code {}", 
ase.getMessage());
+            throw ase;
+        }
+        Message message = getMessageForResponse(exchange);
+        message.setBody(result);
+    }
+    
+    private void deleteCluster(EcsClient ecsClient, Exchange exchange) {
+        DeleteClusterRequest.Builder builder = DeleteClusterRequest.builder();
+        if 
(ObjectHelper.isNotEmpty(exchange.getIn().getHeader(ECS2Constants.CLUSTER_NAME)))
 {
+            String name = 
exchange.getIn().getHeader(ECS2Constants.CLUSTER_NAME, String.class);
+            builder.cluster(name);
+        } else {
+            throw new IllegalArgumentException("Cluster name must be 
specified");
+        }
+        DeleteClusterResponse result;
+        try {
+               DeleteClusterRequest request = builder.build();
+            result = ecsClient.deleteCluster(request);
+        } catch (AwsServiceException ase) {
+            LOG.trace("Delete Cluster command returned the error code {}", 
ase.getMessage());
+            throw ase;
+        }
+        Message message = getMessageForResponse(exchange);
+        message.setBody(result);
+    }
+    
+    public static Message getMessageForResponse(final Exchange exchange) {
+        return exchange.getMessage();
+    }
+}
diff --git 
a/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/AmazonECSClientMock.java
 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/AmazonECSClientMock.java
new file mode 100644
index 0000000..23ea17a
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/AmazonECSClientMock.java
@@ -0,0 +1,84 @@
+/*
+ * 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.ecs;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+
+import software.amazon.awssdk.services.ecs.EcsClient;
+import software.amazon.awssdk.services.ecs.model.Cluster;
+import software.amazon.awssdk.services.ecs.model.CreateClusterRequest;
+import software.amazon.awssdk.services.ecs.model.CreateClusterResponse;
+import software.amazon.awssdk.services.ecs.model.DeleteClusterRequest;
+import software.amazon.awssdk.services.ecs.model.DeleteClusterResponse;
+import software.amazon.awssdk.services.ecs.model.DescribeClustersRequest;
+import software.amazon.awssdk.services.ecs.model.DescribeClustersResponse;
+import software.amazon.awssdk.services.ecs.model.ListClustersRequest;
+import software.amazon.awssdk.services.ecs.model.ListClustersResponse;
+
+public class AmazonECSClientMock implements EcsClient {
+
+    public AmazonECSClientMock() {
+    }
+    
+    @Override
+    public CreateClusterResponse createCluster(CreateClusterRequest request) {
+       CreateClusterResponse.Builder res = CreateClusterResponse.builder();
+        Cluster cluster = Cluster.builder().clusterName("Test").build();
+        res.cluster(cluster);
+        return res.build();
+    }
+
+    @Override
+    public DeleteClusterResponse deleteCluster(DeleteClusterRequest request) {
+       DeleteClusterResponse.Builder res = DeleteClusterResponse.builder();
+        Cluster cluster = 
Cluster.builder().clusterName("Test").status("INACTIVE").build();
+        res.cluster(cluster);
+        return res.build();
+    }
+
+    @Override
+    public DescribeClustersResponse describeClusters(DescribeClustersRequest 
request) {
+       DescribeClustersResponse.Builder res = 
DescribeClustersResponse.builder();
+        Cluster cluster = 
Cluster.builder().clusterName("Test").status("INACTIVE").build();
+        res.clusters(Collections.singleton(cluster));
+        return res.build();        
+    }
+
+    @Override
+    public ListClustersResponse listClusters(ListClustersRequest request) {
+       ListClustersResponse.Builder res = ListClustersResponse.builder();
+        List<String> list = new ArrayList<>();
+        list.add("Test");
+        res.clusterArns(list);
+        return res.build();
+    }
+
+       @Override
+       public String serviceName() {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+       @Override
+       public void close() {
+               // TODO Auto-generated method stub
+               
+       }
+}
diff --git 
a/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSComponentClientRegistryTest.java
 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSComponentClientRegistryTest.java
new file mode 100644
index 0000000..e6606f4
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSComponentClientRegistryTest.java
@@ -0,0 +1,43 @@
+/*
+ * 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.ecs;
+
+import org.apache.camel.component.aws2.ecs.ECS2Component;
+import org.apache.camel.component.aws2.ecs.ECS2Endpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class ECSComponentClientRegistryTest extends CamelTestSupport {
+
+    @Test
+    public void createEndpointWithMinimalECSClientConfiguration() throws 
Exception {
+
+        AmazonECSClientMock clientMock = new AmazonECSClientMock();
+        context.getRegistry().bind("amazonEcsClient", clientMock);
+        ECS2Component component = context.getComponent("aws2-ecs", 
ECS2Component.class);
+        ECS2Endpoint endpoint = 
(ECS2Endpoint)component.createEndpoint("aws-ecs://TestDomain");
+
+        assertNotNull(endpoint.getConfiguration().getEcsClient());
+    }
+    
+    @Test(expected = IllegalArgumentException.class)
+    public void createEndpointWithMinimalECSClientMisconfiguration() throws 
Exception {
+
+        ECS2Component component = context.getComponent("aws2-ecs", 
ECS2Component.class);
+        ECS2Endpoint endpoint = 
(ECS2Endpoint)component.createEndpoint("aws-ecs://TestDomain");
+    }
+}
diff --git 
a/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSComponentConfigurationTest.java
 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSComponentConfigurationTest.java
new file mode 100644
index 0000000..6ddf23b
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSComponentConfigurationTest.java
@@ -0,0 +1,70 @@
+/*
+ * 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.ecs;
+
+import org.apache.camel.component.aws2.ecs.ECS2Component;
+import org.apache.camel.component.aws2.ecs.ECS2Endpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+import software.amazon.awssdk.core.Protocol;
+import software.amazon.awssdk.regions.Region;
+
+public class ECSComponentConfigurationTest extends CamelTestSupport {
+
+    
+    @Test
+    public void createEndpointWithComponentElements() throws Exception {
+        ECS2Component component = context.getComponent("aws2-ecs", 
ECS2Component.class);
+        component.setAccessKey("XXX");
+        component.setSecretKey("YYY");
+        ECS2Endpoint endpoint = 
(ECS2Endpoint)component.createEndpoint("aws2-ecs://label");
+        
+        assertEquals("XXX", endpoint.getConfiguration().getAccessKey());
+        assertEquals("YYY", endpoint.getConfiguration().getSecretKey());
+    }
+    
+    @Test
+    public void createEndpointWithComponentAndEndpointElements() throws 
Exception {
+        ECS2Component component = context.getComponent("aws2-ecs", 
ECS2Component.class);
+        component.setAccessKey("XXX");
+        component.setSecretKey("YYY");
+        component.setRegion(Region.US_WEST_1.toString());
+        ECS2Endpoint endpoint = 
(ECS2Endpoint)component.createEndpoint("aws2-ecs://label?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1");
+        
+        assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
+        assertEquals("yyyyy", endpoint.getConfiguration().getSecretKey());
+        assertEquals("US_EAST_1", endpoint.getConfiguration().getRegion());
+    }
+    
+    @Test
+    public void createEndpointWithComponentEndpointElementsAndProxy() throws 
Exception {
+        ECS2Component component = context.getComponent("aws2-ecs", 
ECS2Component.class);
+        component.setAccessKey("XXX");
+        component.setSecretKey("YYY");
+        component.setRegion(Region.US_WEST_1.toString());
+        ECS2Endpoint endpoint = 
(ECS2Endpoint)component.createEndpoint("aws2-ecs://label?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
+        
+        assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
+        assertEquals("yyyyy", endpoint.getConfiguration().getSecretKey());
+        assertEquals("US_EAST_1", endpoint.getConfiguration().getRegion());
+        assertEquals(Protocol.HTTP, 
endpoint.getConfiguration().getProxyProtocol());
+        assertEquals("localhost", endpoint.getConfiguration().getProxyHost());
+        assertEquals(Integer.valueOf(9000), 
endpoint.getConfiguration().getProxyPort());
+    }
+    
+}
diff --git 
a/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSComponentVerifierExtensionTest.java
 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSComponentVerifierExtensionTest.java
new file mode 100644
index 0000000..a3d289f
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSComponentVerifierExtensionTest.java
@@ -0,0 +1,74 @@
+/*
+ * 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.ecs;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.Component;
+import org.apache.camel.component.aws2.ecs.ECS2Operations;
+import org.apache.camel.component.extension.ComponentVerifierExtension;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ECSComponentVerifierExtensionTest extends CamelTestSupport {
+
+    // *************************************************
+    // Tests (parameters)
+    // *************************************************
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testParameters() throws Exception {
+        Component component = context().getComponent("aws2-ecs");
+
+        ComponentVerifierExtension verifier = 
component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new);
+
+        Map<String, Object> parameters = new HashMap<>();
+        parameters.put("secretKey", "l");
+        parameters.put("accessKey", "k");
+        parameters.put("region", "l");
+        parameters.put("label", "test");
+        parameters.put("operation", ECS2Operations.listClusters);
+
+        ComponentVerifierExtension.Result result = 
verifier.verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
+
+        Assert.assertEquals(ComponentVerifierExtension.Result.Status.OK, 
result.getStatus());
+    }
+
+    @Test
+    public void testConnectivity() throws Exception {
+        Component component = context().getComponent("aws2-ecs");
+        ComponentVerifierExtension verifier = 
component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new);
+
+        Map<String, Object> parameters = new HashMap<>();
+        parameters.put("secretKey", "l");
+        parameters.put("accessKey", "k");
+        parameters.put("region", "US_EAST_1");
+        parameters.put("label", "test");
+        parameters.put("operation", ECS2Operations.listClusters);
+
+        ComponentVerifierExtension.Result result = 
verifier.verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
+
+        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, 
result.getStatus());
+    }
+
+}
diff --git 
a/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSProducerSpringTest.java
 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSProducerSpringTest.java
new file mode 100644
index 0000000..2874391
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSProducerSpringTest.java
@@ -0,0 +1,115 @@
+/*
+ * 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.ecs;
+
+import software.amazon.awssdk.services.ecs.model.CreateClusterResponse;
+import software.amazon.awssdk.services.ecs.model.DeleteClusterResponse;
+import software.amazon.awssdk.services.ecs.model.DescribeClustersResponse;
+import software.amazon.awssdk.services.ecs.model.ListClustersResponse;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.component.aws2.ecs.ECS2Constants;
+import org.apache.camel.component.aws2.ecs.ECS2Operations;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.spring.CamelSpringTestSupport;
+import org.junit.Test;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class ECSProducerSpringTest extends CamelSpringTestSupport {
+    
+    @EndpointInject("mock:result")
+    private MockEndpoint mock;
+    
+    @Test
+    public void kmsListClustersTest() throws Exception {
+
+        mock.expectedMessageCount(1);
+        Exchange exchange = template.request("direct:listClusters", new 
Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(ECS2Constants.OPERATION, 
ECS2Operations.listClusters);
+            }
+        });
+
+        assertMockEndpointsSatisfied();
+        
+        ListClustersResponse resultGet = (ListClustersResponse) 
exchange.getIn().getBody();
+        assertEquals(1, resultGet.clusterArns().size());
+        assertEquals("Test", resultGet.clusterArns().get(0));
+    }
+    
+    @Test
+    public void ecsCreateClusterTest() throws Exception {
+
+        mock.expectedMessageCount(1);
+        Exchange exchange = template.request("direct:createCluster", new 
Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(ECS2Constants.OPERATION, 
ECS2Operations.createCluster);
+                exchange.getIn().setHeader(ECS2Constants.CLUSTER_NAME, "Test");
+            }
+        });
+
+        assertMockEndpointsSatisfied();
+        
+        CreateClusterResponse resultGet = (CreateClusterResponse) 
exchange.getIn().getBody();
+        assertEquals("Test", resultGet.cluster().clusterName());
+    }
+    
+    @Test
+    public void eksDescribeClusterTest() throws Exception {
+
+        mock.expectedMessageCount(1);
+        Exchange exchange = template.request("direct:describeCluster", new 
Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(ECS2Constants.OPERATION, 
ECS2Operations.describeCluster);
+                exchange.getIn().setHeader(ECS2Constants.CLUSTER_NAME, "Test");
+            }
+        });
+
+        assertMockEndpointsSatisfied();
+        
+        DescribeClustersResponse resultGet = 
exchange.getIn().getBody(DescribeClustersResponse.class);
+        assertEquals("Test", resultGet.clusters().get(0).clusterName());
+    }
+    
+    @Test
+    public void eksDeleteClusterTest() throws Exception {
+
+        mock.expectedMessageCount(1);
+        Exchange exchange = template.request("direct:deleteCluster", new 
Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(ECS2Constants.OPERATION, 
ECS2Operations.deleteCluster);
+                exchange.getIn().setHeader(ECS2Constants.CLUSTER_NAME, "Test");
+            }
+        });
+
+        assertMockEndpointsSatisfied();
+        
+        DeleteClusterResponse resultGet = 
exchange.getIn().getBody(DeleteClusterResponse.class);
+        assertEquals("Test", resultGet.cluster().clusterName());
+    }
+
+    @Override
+    protected ClassPathXmlApplicationContext createApplicationContext() {
+        return new 
ClassPathXmlApplicationContext("org/apache/camel/component/aws2/ecs/ECSComponentSpringTest-context.xml");
+    }
+}
diff --git 
a/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSProducerTest.java
 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSProducerTest.java
new file mode 100644
index 0000000..ee20532
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECSProducerTest.java
@@ -0,0 +1,135 @@
+/*
+ * 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.ecs;
+
+import org.apache.camel.BindToRegistry;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.aws2.ecs.ECS2Constants;
+import org.apache.camel.component.aws2.ecs.ECS2Operations;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+import software.amazon.awssdk.services.ecs.model.CreateClusterResponse;
+import software.amazon.awssdk.services.ecs.model.DeleteClusterResponse;
+import software.amazon.awssdk.services.ecs.model.DescribeClustersResponse;
+import software.amazon.awssdk.services.ecs.model.ListClustersResponse;
+
+public class ECSProducerTest extends CamelTestSupport {
+
+    @BindToRegistry("amazonEcsClient")
+    AmazonECSClientMock clientMock = new AmazonECSClientMock();
+    
+    @EndpointInject("mock:result")
+    private MockEndpoint mock;
+    
+    @Test
+    public void kmsListClustersTest() throws Exception {
+
+        mock.expectedMessageCount(1);
+        Exchange exchange = template.request("direct:listClusters", new 
Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(ECS2Constants.OPERATION, 
ECS2Operations.listClusters);
+            }
+        });
+
+        assertMockEndpointsSatisfied();
+        
+        ListClustersResponse resultGet = (ListClustersResponse) 
exchange.getIn().getBody();
+        assertEquals(1, resultGet.clusterArns().size());
+        assertEquals("Test", resultGet.clusterArns().get(0));
+    }
+    
+    @Test
+    public void ecsCreateClusterTest() throws Exception {
+
+        mock.expectedMessageCount(1);
+        Exchange exchange = template.request("direct:createCluster", new 
Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(ECS2Constants.OPERATION, 
ECS2Operations.createCluster);
+                exchange.getIn().setHeader(ECS2Constants.CLUSTER_NAME, "Test");
+            }
+        });
+
+        assertMockEndpointsSatisfied();
+        
+        CreateClusterResponse resultGet = (CreateClusterResponse) 
exchange.getIn().getBody();
+        assertEquals("Test", resultGet.cluster().clusterName());
+    }
+    
+    @Test
+    public void eksDescribeClusterTest() throws Exception {
+
+        mock.expectedMessageCount(1);
+        Exchange exchange = template.request("direct:describeCluster", new 
Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(ECS2Constants.OPERATION, 
ECS2Operations.describeCluster);
+                exchange.getIn().setHeader(ECS2Constants.CLUSTER_NAME, "Test");
+            }
+        });
+
+        assertMockEndpointsSatisfied();
+        
+        DescribeClustersResponse resultGet = 
exchange.getIn().getBody(DescribeClustersResponse.class);
+        assertEquals("Test", resultGet.clusters().get(0).clusterName());
+    }
+    
+    @Test
+    public void eksDeleteClusterTest() throws Exception {
+
+        mock.expectedMessageCount(1);
+        Exchange exchange = template.request("direct:deleteCluster", new 
Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setHeader(ECS2Constants.OPERATION, 
ECS2Operations.deleteCluster);
+                exchange.getIn().setHeader(ECS2Constants.CLUSTER_NAME, "Test");
+            }
+        });
+
+        assertMockEndpointsSatisfied();
+        
+        DeleteClusterResponse resultGet = 
exchange.getIn().getBody(DeleteClusterResponse.class);
+        assertEquals("Test", resultGet.cluster().clusterName());
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:listClusters")
+                    
.to("aws2-ecs://test?ecsClient=#amazonEcsClient&operation=listClusters")
+                    .to("mock:result");
+                from("direct:createCluster")
+                    
.to("aws2-ecs://test?ecsClient=#amazonEcsClient&operation=createCluster")
+                    .to("mock:result");
+                from("direct:deleteCluster")
+                    
.to("aws2-ecs://test?ecsClient=#amazonEcsClient&operation=deleteCluster")
+                    .to("mock:result");
+                from("direct:describeCluster")
+                    
.to("aws2-ecs://test?ecsClient=#amazonEcsClient&operation=describeCluster")
+                    .to("mock:result");
+            }
+        };
+    }
+}
diff --git 
a/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/integration/ECS2ProducerIntegrationTest.java
 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/integration/ECS2ProducerIntegrationTest.java
new file mode 100644
index 0000000..ea55d18
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/integration/ECS2ProducerIntegrationTest.java
@@ -0,0 +1,60 @@
+/*
+ * 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.ecs.integration;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import software.amazon.awssdk.services.ecs.model.ListClustersResponse;
+
+@Ignore("This test must be manually started, you need to specify AWS 
Credentials")
+public class ECS2ProducerIntegrationTest extends CamelTestSupport {
+
+    @EndpointInject("mock:result")
+    private MockEndpoint mock;
+
+    @Test
+    public void translateTextTest() throws Exception {
+
+        mock.expectedMessageCount(1);
+        Exchange exchange = template.request("direct:listClusters", new 
Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setBody("Test");
+            }
+        });
+
+        ListClustersResponse resultGet = 
(ListClustersResponse)exchange.getIn().getBody();
+        assertEquals(0, resultGet.clusterArns().size());
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                
from("direct:listClusters").to("aws2-ecs://test?accessKey=RAW(xxxx)&secretKey=RAW(xxxx)&region=eu-west-1&operation=listClusters").to("mock:result");
+            }
+        };
+    }
+}
diff --git a/components/camel-aws2-ecs/src/test/resources/log4j2.properties 
b/components/camel-aws2-ecs/src/test/resources/log4j2.properties
new file mode 100644
index 0000000..37bc833
--- /dev/null
+++ b/components/camel-aws2-ecs/src/test/resources/log4j2.properties
@@ -0,0 +1,28 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-aws-ecs-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = file
diff --git 
a/components/camel-aws2-ecs/src/test/resources/org/apache/camel/component/aws2/ecs/ECSComponentSpringTest-context.xml
 
b/components/camel-aws2-ecs/src/test/resources/org/apache/camel/component/aws2/ecs/ECSComponentSpringTest-context.xml
new file mode 100644
index 0000000..fe4ab20
--- /dev/null
+++ 
b/components/camel-aws2-ecs/src/test/resources/org/apache/camel/component/aws2/ecs/ECSComponentSpringTest-context.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="
+    http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
+    http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd";>
+
+    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring";>
+        <route>
+            <from uri="direct:listClusters"/>
+            <to 
uri="aws2-ecs://test?ecsClient=#amazonEcsClient&amp;operation=listClusters"/>
+            <to uri="mock:result"/>
+        </route>
+        <route>
+            <from uri="direct:createCluster"/>
+            <to 
uri="aws2-ecs://test?ecsClient=#amazonEcsClient&amp;operation=createCluster"/>
+            <to uri="mock:result"/>
+        </route>
+        <route>
+            <from uri="direct:deleteCluster"/>
+            <to 
uri="aws2-ecs://test?ecsClient=#amazonEcsClient&amp;operation=deleteCluster"/>
+            <to uri="mock:result"/>
+        </route>
+        <route>
+            <from uri="direct:describeCluster"/>
+            <to 
uri="aws2-ecs://test?ecsClient=#amazonEcsClient&amp;operation=describeCluster"/>
+            <to uri="mock:result"/>
+        </route>
+    </camelContext>
+
+    <bean id="amazonEcsClient" 
class="org.apache.camel.component.aws2.ecs.AmazonECSClientMock"/>
+</beans>
\ No newline at end of file
diff --git 
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
 
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
index 1c138cd..e1b4934 100644
--- 
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
+++ 
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
@@ -95,6 +95,7 @@ public interface EndpointBuilderFactory
             
org.apache.camel.builder.endpoint.dsl.DrillEndpointBuilderFactory.DrillBuilders,
             
org.apache.camel.builder.endpoint.dsl.DropboxEndpointBuilderFactory.DropboxBuilders,
             
org.apache.camel.builder.endpoint.dsl.EC2EndpointBuilderFactory.EC2Builders,
+            
org.apache.camel.builder.endpoint.dsl.ECS2EndpointBuilderFactory.ECS2Builders,
             
org.apache.camel.builder.endpoint.dsl.ECSEndpointBuilderFactory.ECSBuilders,
             
org.apache.camel.builder.endpoint.dsl.EKSEndpointBuilderFactory.EKSBuilders,
             
org.apache.camel.builder.endpoint.dsl.EhcacheEndpointBuilderFactory.EhcacheBuilders,
diff --git 
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
 
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
index 5bf800e..899d157 100644
--- 
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
+++ 
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
@@ -92,6 +92,7 @@ public interface EndpointBuilders
             org.apache.camel.builder.endpoint.dsl.DrillEndpointBuilderFactory,
             
org.apache.camel.builder.endpoint.dsl.DropboxEndpointBuilderFactory,
             org.apache.camel.builder.endpoint.dsl.EC2EndpointBuilderFactory,
+            org.apache.camel.builder.endpoint.dsl.ECS2EndpointBuilderFactory,
             org.apache.camel.builder.endpoint.dsl.ECSEndpointBuilderFactory,
             org.apache.camel.builder.endpoint.dsl.EKSEndpointBuilderFactory,
             
org.apache.camel.builder.endpoint.dsl.EhcacheEndpointBuilderFactory,
diff --git 
a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ECS2EndpointBuilderFactory.java
 
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ECS2EndpointBuilderFactory.java
new file mode 100644
index 0000000..93d50bd
--- /dev/null
+++ 
b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ECS2EndpointBuilderFactory.java
@@ -0,0 +1,351 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder.endpoint.dsl;
+
+import javax.annotation.Generated;
+import org.apache.camel.builder.EndpointConsumerBuilder;
+import org.apache.camel.builder.EndpointProducerBuilder;
+import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
+
+/**
+ * The aws-ecs is used for managing Amazon ECS
+ * 
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public interface ECS2EndpointBuilderFactory {
+
+
+    /**
+     * Builder for endpoint for the AWS2 ECS component.
+     */
+    public interface ECS2EndpointBuilder extends EndpointProducerBuilder {
+        default AdvancedECS2EndpointBuilder advanced() {
+            return (AdvancedECS2EndpointBuilder) this;
+        }
+        /**
+         * Amazon AWS Access Key.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: producer
+         */
+        default ECS2EndpointBuilder accessKey(String accessKey) {
+            doSetProperty("accessKey", accessKey);
+            return this;
+        }
+        /**
+         * To use a existing configured AWS ECS as client.
+         * 
+         * The option is a:
+         * <code>software.amazon.awssdk.services.ecs.EcsClient</code> type.
+         * 
+         * Group: producer
+         */
+        default ECS2EndpointBuilder ecsClient(Object ecsClient) {
+            doSetProperty("ecsClient", ecsClient);
+            return this;
+        }
+        /**
+         * To use a existing configured AWS ECS as client.
+         * 
+         * The option will be converted to a
+         * <code>software.amazon.awssdk.services.ecs.EcsClient</code> type.
+         * 
+         * Group: producer
+         */
+        default ECS2EndpointBuilder ecsClient(String ecsClient) {
+            doSetProperty("ecsClient", ecsClient);
+            return this;
+        }
+        /**
+         * Whether the producer should be started lazy (on the first message).
+         * By starting lazy you can use this to allow CamelContext and routes 
to
+         * startup in situations where a producer may otherwise fail during
+         * starting and cause the route to fail being started. By deferring 
this
+         * startup to be lazy then the startup failure can be handled during
+         * routing messages via Camel's routing error handlers. Beware that 
when
+         * the first message is processed then creating and starting the
+         * producer may take a little time and prolong the total processing 
time
+         * of the processing.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: producer
+         */
+        default ECS2EndpointBuilder lazyStartProducer(boolean 
lazyStartProducer) {
+            doSetProperty("lazyStartProducer", lazyStartProducer);
+            return this;
+        }
+        /**
+         * Whether the producer should be started lazy (on the first message).
+         * By starting lazy you can use this to allow CamelContext and routes 
to
+         * startup in situations where a producer may otherwise fail during
+         * starting and cause the route to fail being started. By deferring 
this
+         * startup to be lazy then the startup failure can be handled during
+         * routing messages via Camel's routing error handlers. Beware that 
when
+         * the first message is processed then creating and starting the
+         * producer may take a little time and prolong the total processing 
time
+         * of the processing.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: producer
+         */
+        default ECS2EndpointBuilder lazyStartProducer(String 
lazyStartProducer) {
+            doSetProperty("lazyStartProducer", lazyStartProducer);
+            return this;
+        }
+        /**
+         * The operation to perform.
+         * 
+         * The option is a:
+         * <code>org.apache.camel.component.aws2.ecs.ECS2Operations</code> 
type.
+         * 
+         * Required: true
+         * Group: producer
+         */
+        default ECS2EndpointBuilder operation(ECS2Operations operation) {
+            doSetProperty("operation", operation);
+            return this;
+        }
+        /**
+         * The operation to perform.
+         * 
+         * The option will be converted to a
+         * <code>org.apache.camel.component.aws2.ecs.ECS2Operations</code> 
type.
+         * 
+         * Required: true
+         * Group: producer
+         */
+        default ECS2EndpointBuilder operation(String operation) {
+            doSetProperty("operation", operation);
+            return this;
+        }
+        /**
+         * To define a proxy host when instantiating the ECS client.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: producer
+         */
+        default ECS2EndpointBuilder proxyHost(String proxyHost) {
+            doSetProperty("proxyHost", proxyHost);
+            return this;
+        }
+        /**
+         * To define a proxy port when instantiating the ECS client.
+         * 
+         * The option is a: <code>java.lang.Integer</code> type.
+         * 
+         * Group: producer
+         */
+        default ECS2EndpointBuilder proxyPort(Integer proxyPort) {
+            doSetProperty("proxyPort", proxyPort);
+            return this;
+        }
+        /**
+         * To define a proxy port when instantiating the ECS client.
+         * 
+         * The option will be converted to a <code>java.lang.Integer</code>
+         * type.
+         * 
+         * Group: producer
+         */
+        default ECS2EndpointBuilder proxyPort(String proxyPort) {
+            doSetProperty("proxyPort", proxyPort);
+            return this;
+        }
+        /**
+         * To define a proxy protocol when instantiating the ECS client.
+         * 
+         * The option is a: <code>software.amazon.awssdk.core.Protocol</code>
+         * type.
+         * 
+         * Default: HTTPS
+         * Group: producer
+         */
+        default ECS2EndpointBuilder proxyProtocol(Protocol proxyProtocol) {
+            doSetProperty("proxyProtocol", proxyProtocol);
+            return this;
+        }
+        /**
+         * To define a proxy protocol when instantiating the ECS client.
+         * 
+         * The option will be converted to a
+         * <code>software.amazon.awssdk.core.Protocol</code> type.
+         * 
+         * Default: HTTPS
+         * Group: producer
+         */
+        default ECS2EndpointBuilder proxyProtocol(String proxyProtocol) {
+            doSetProperty("proxyProtocol", proxyProtocol);
+            return this;
+        }
+        /**
+         * The region in which ECS client needs to work. When using this
+         * parameter, the configuration will expect the capitalized name of the
+         * region (for example AP_EAST_1) You'll need to use the name
+         * Regions.EU_WEST_1.name().
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: producer
+         */
+        default ECS2EndpointBuilder region(String region) {
+            doSetProperty("region", region);
+            return this;
+        }
+        /**
+         * Amazon AWS Secret Key.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: producer
+         */
+        default ECS2EndpointBuilder secretKey(String secretKey) {
+            doSetProperty("secretKey", secretKey);
+            return this;
+        }
+    }
+
+    /**
+     * Advanced builder for endpoint for the AWS2 ECS component.
+     */
+    public interface AdvancedECS2EndpointBuilder
+            extends
+                EndpointProducerBuilder {
+        default ECS2EndpointBuilder basic() {
+            return (ECS2EndpointBuilder) this;
+        }
+        /**
+         * Whether the endpoint should use basic property binding (Camel 2.x) 
or
+         * the newer property binding with additional capabilities.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: advanced
+         */
+        default AdvancedECS2EndpointBuilder basicPropertyBinding(
+                boolean basicPropertyBinding) {
+            doSetProperty("basicPropertyBinding", basicPropertyBinding);
+            return this;
+        }
+        /**
+         * Whether the endpoint should use basic property binding (Camel 2.x) 
or
+         * the newer property binding with additional capabilities.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: advanced
+         */
+        default AdvancedECS2EndpointBuilder basicPropertyBinding(
+                String basicPropertyBinding) {
+            doSetProperty("basicPropertyBinding", basicPropertyBinding);
+            return this;
+        }
+        /**
+         * Sets whether synchronous processing should be strictly used, or 
Camel
+         * is allowed to use asynchronous processing (if supported).
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: advanced
+         */
+        default AdvancedECS2EndpointBuilder synchronous(boolean synchronous) {
+            doSetProperty("synchronous", synchronous);
+            return this;
+        }
+        /**
+         * Sets whether synchronous processing should be strictly used, or 
Camel
+         * is allowed to use asynchronous processing (if supported).
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: false
+         * Group: advanced
+         */
+        default AdvancedECS2EndpointBuilder synchronous(String synchronous) {
+            doSetProperty("synchronous", synchronous);
+            return this;
+        }
+    }
+
+    /**
+     * Proxy enum for
+     * <code>org.apache.camel.component.aws2.ecs.ECS2Operations</code> enum.
+     */
+    enum ECS2Operations {
+        listClusters,
+        describeCluster,
+        createCluster,
+        deleteCluster;
+    }
+
+    /**
+     * Proxy enum for <code>software.amazon.awssdk.core.Protocol</code> enum.
+     */
+    enum Protocol {
+        http,
+        https;
+    }
+
+    public interface ECS2Builders {
+        /**
+         * AWS2 ECS (camel-aws2-ecs)
+         * The aws-ecs is used for managing Amazon ECS
+         * 
+         * Category: cloud,management
+         * Since: 3.1
+         * Maven coordinates: org.apache.camel:camel-aws2-ecs
+         * 
+         * Syntax: <code>aws2-ecs:label</code>
+         * 
+         * Path parameter: label (required)
+         * Logical name
+         */
+        default ECS2EndpointBuilder aws2Ecs(String path) {
+            return ECS2EndpointBuilderFactory.aws2Ecs(path);
+        }
+    }
+    /**
+     * AWS2 ECS (camel-aws2-ecs)
+     * The aws-ecs is used for managing Amazon ECS
+     * 
+     * Category: cloud,management
+     * Since: 3.1
+     * Maven coordinates: org.apache.camel:camel-aws2-ecs
+     * 
+     * Syntax: <code>aws2-ecs:label</code>
+     * 
+     * Path parameter: label (required)
+     * Logical name
+     */
+    static ECS2EndpointBuilder aws2Ecs(String path) {
+        class ECS2EndpointBuilderImpl extends AbstractEndpointBuilder 
implements ECS2EndpointBuilder, AdvancedECS2EndpointBuilder {
+            public ECS2EndpointBuilderImpl(String path) {
+                super("aws2-ecs", path);
+            }
+        }
+        return new ECS2EndpointBuilderImpl(path);
+    }
+}
\ No newline at end of file

Reply via email to