You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/07/23 07:35:33 UTC

[camel] 01/03: CAMEL-15310 - AWS* - Support for more than 1 client in the registry - Camel-AWS2-KMS

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 81b808aceaf2edbd6a3522e2ba508d24a0e58c0e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jul 23 09:33:57 2020 +0200

    CAMEL-15310 - AWS* - Support for more than 1 client in the registry - Camel-AWS2-KMS
---
 .../aws2/kms/KMS2ComponentConfigurer.java          |  5 ++++
 .../component/aws2/kms/KMS2EndpointConfigurer.java |  5 ++++
 .../apache/camel/component/aws2/kms/aws2-kms.json  |  2 ++
 .../src/main/docs/aws2-kms-component.adoc          |  6 +++--
 .../camel/component/aws2/kms/KMS2Component.java    |  4 ++-
 .../component/aws2/kms/KMS2Configuration.java      | 15 +++++++++++
 .../aws2/kms/KMSComponentClientRegistryTest.java   | 24 ++++++++++++++++++
 .../dsl/Aws2KmsComponentBuilderFactory.java        | 16 ++++++++++++
 .../builder/endpoint/StaticEndpointBuilders.java   |  8 +++---
 .../endpoint/dsl/KMS2EndpointBuilderFactory.java   | 29 ++++++++++++++++++++++
 10 files changed, 107 insertions(+), 7 deletions(-)

diff --git a/components/camel-aws2-kms/src/generated/java/org/apache/camel/component/aws2/kms/KMS2ComponentConfigurer.java b/components/camel-aws2-kms/src/generated/java/org/apache/camel/component/aws2/kms/KMS2ComponentConfigurer.java
index 87c0d26..c2f3789 100644
--- a/components/camel-aws2-kms/src/generated/java/org/apache/camel/component/aws2/kms/KMS2ComponentConfigurer.java
+++ b/components/camel-aws2-kms/src/generated/java/org/apache/camel/component/aws2/kms/KMS2ComponentConfigurer.java
@@ -28,6 +28,8 @@ public class KMS2ComponentConfigurer extends PropertyConfigurerSupport implement
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+        case "autodiscoverclient":
+        case "autoDiscoverClient": getOrCreateConfiguration(target).setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true;
         case "basicpropertybinding":
         case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
         case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.kms.KMS2Configuration.class, value)); return true;
@@ -57,6 +59,7 @@ public class KMS2ComponentConfigurer extends PropertyConfigurerSupport implement
     public Map<String, Object> getAllOptions(Object target) {
         Map<String, Object> answer = new CaseInsensitiveMap();
         answer.put("accessKey", java.lang.String.class);
+        answer.put("autoDiscoverClient", boolean.class);
         answer.put("basicPropertyBinding", boolean.class);
         answer.put("configuration", org.apache.camel.component.aws2.kms.KMS2Configuration.class);
         answer.put("kmsClient", software.amazon.awssdk.services.kms.KmsClient.class);
@@ -78,6 +81,8 @@ public class KMS2ComponentConfigurer extends PropertyConfigurerSupport implement
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": return getOrCreateConfiguration(target).getAccessKey();
+        case "autodiscoverclient":
+        case "autoDiscoverClient": return getOrCreateConfiguration(target).isAutoDiscoverClient();
         case "basicpropertybinding":
         case "basicPropertyBinding": return target.isBasicPropertyBinding();
         case "configuration": return target.getConfiguration();
diff --git a/components/camel-aws2-kms/src/generated/java/org/apache/camel/component/aws2/kms/KMS2EndpointConfigurer.java b/components/camel-aws2-kms/src/generated/java/org/apache/camel/component/aws2/kms/KMS2EndpointConfigurer.java
index eea7e0c..7e59015 100644
--- a/components/camel-aws2-kms/src/generated/java/org/apache/camel/component/aws2/kms/KMS2EndpointConfigurer.java
+++ b/components/camel-aws2-kms/src/generated/java/org/apache/camel/component/aws2/kms/KMS2EndpointConfigurer.java
@@ -21,6 +21,8 @@ public class KMS2EndpointConfigurer extends PropertyConfigurerSupport implements
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+        case "autodiscoverclient":
+        case "autoDiscoverClient": target.getConfiguration().setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true;
         case "basicpropertybinding":
         case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
         case "kmsclient":
@@ -50,6 +52,7 @@ public class KMS2EndpointConfigurer extends PropertyConfigurerSupport implements
     public Map<String, Object> getAllOptions(Object target) {
         Map<String, Object> answer = new CaseInsensitiveMap();
         answer.put("accessKey", java.lang.String.class);
+        answer.put("autoDiscoverClient", boolean.class);
         answer.put("basicPropertyBinding", boolean.class);
         answer.put("kmsClient", software.amazon.awssdk.services.kms.KmsClient.class);
         answer.put("lazyStartProducer", boolean.class);
@@ -71,6 +74,8 @@ public class KMS2EndpointConfigurer extends PropertyConfigurerSupport implements
         switch (ignoreCase ? name.toLowerCase() : name) {
         case "accesskey":
         case "accessKey": return target.getConfiguration().getAccessKey();
+        case "autodiscoverclient":
+        case "autoDiscoverClient": return target.getConfiguration().isAutoDiscoverClient();
         case "basicpropertybinding":
         case "basicPropertyBinding": return target.isBasicPropertyBinding();
         case "kmsclient":
diff --git a/components/camel-aws2-kms/src/generated/resources/org/apache/camel/component/aws2/kms/aws2-kms.json b/components/camel-aws2-kms/src/generated/resources/org/apache/camel/component/aws2/kms/aws2-kms.json
index e8cc0ce..39f4518 100644
--- a/components/camel-aws2-kms/src/generated/resources/org/apache/camel/component/aws2/kms/aws2-kms.json
+++ b/components/camel-aws2-kms/src/generated/resources/org/apache/camel/component/aws2/kms/aws2-kms.json
@@ -21,6 +21,7 @@
     "lenientProperties": false
   },
   "componentProperties": {
+    "autoDiscoverClient": { "kind": "property", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.kms.KMS2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the regist [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.kms.KMS2Configuration", "deprecated": false, "secret": false, "description": "Component configuration" },
     "kmsClient": { "kind": "property", "displayName": "Kms Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.kms.KmsClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.kms.KMS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS KMS as client" },
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...]
@@ -37,6 +38,7 @@
   },
   "properties": {
     "label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.kms.KMS2Configuration", "configurationField": "configuration", "description": "Logical name" },
+    "autoDiscoverClient": { "kind": "parameter", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.kms.KMS2Configuration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the regis [...]
     "kmsClient": { "kind": "parameter", "displayName": "Kms Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.kms.KmsClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.kms.KMS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS KMS as client" },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the  [...]
     "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.kms.KMS2Operations", "enum": [ "listKeys", "createKey", "disableKey", "scheduleKeyDeletion", "describeKey", "enableKey" ], "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.kms.KMS2Configuration", "configurationField": "configuration", "descri [...]
diff --git a/components/camel-aws2-kms/src/main/docs/aws2-kms-component.adoc b/components/camel-aws2-kms/src/main/docs/aws2-kms-component.adoc
index 9f0e235..4a0e255 100644
--- a/components/camel-aws2-kms/src/main/docs/aws2-kms-component.adoc
+++ b/components/camel-aws2-kms/src/main/docs/aws2-kms-component.adoc
@@ -41,13 +41,14 @@ You can append query options to the URI in the following format,
 
 
 // component options: START
-The AWS 2 Key Management Service (KMS) component supports 13 options, which are listed below.
+The AWS 2 Key Management Service (KMS) component supports 14 options, which are listed below.
 
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
+| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
 | *configuration* (producer) | Component configuration |  | KMS2Configuration
 | *kmsClient* (producer) | To use a existing configured AWS KMS as client |  | KmsClient
 | *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 [...]
@@ -86,12 +87,13 @@ with the following path and query parameters:
 |===
 
 
-=== Query Parameters (13 parameters):
+=== Query Parameters (14 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
+| *autoDiscoverClient* (common) | Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. | true | boolean
 | *kmsClient* (producer) | To use a existing configured AWS KMS as client |  | KmsClient
 | *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. The value can be one of: listKeys, createKey, disableKey, scheduleKeyDeletion, describeKey, enableKey |  | KMS2Operations
diff --git a/components/camel-aws2-kms/src/main/java/org/apache/camel/component/aws2/kms/KMS2Component.java b/components/camel-aws2-kms/src/main/java/org/apache/camel/component/aws2/kms/KMS2Component.java
index e093f79..99ebf93 100644
--- a/components/camel-aws2-kms/src/main/java/org/apache/camel/component/aws2/kms/KMS2Component.java
+++ b/components/camel-aws2-kms/src/main/java/org/apache/camel/component/aws2/kms/KMS2Component.java
@@ -56,7 +56,9 @@ public class KMS2Component extends DefaultComponent {
 
         KMS2Endpoint endpoint = new KMS2Endpoint(uri, this, configuration);
         setProperties(endpoint, parameters);
-        checkAndSetRegistryClient(configuration, endpoint);
+        if (endpoint.getConfiguration().isAutoDiscoverClient()) {
+            checkAndSetRegistryClient(configuration, endpoint);
+        }
         if (configuration.getKmsClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
             throw new IllegalArgumentException("Amazon kms client or accessKey and secretKey must be specified");
         }
diff --git a/components/camel-aws2-kms/src/main/java/org/apache/camel/component/aws2/kms/KMS2Configuration.java b/components/camel-aws2-kms/src/main/java/org/apache/camel/component/aws2/kms/KMS2Configuration.java
index b0b7687..1869bae 100644
--- a/components/camel-aws2-kms/src/main/java/org/apache/camel/component/aws2/kms/KMS2Configuration.java
+++ b/components/camel-aws2-kms/src/main/java/org/apache/camel/component/aws2/kms/KMS2Configuration.java
@@ -51,6 +51,8 @@ public class KMS2Configuration implements Cloneable {
     private boolean pojoRequest;
     @UriParam(defaultValue = "false")
     private boolean trustAllCertificates;
+    @UriParam(label = "common", defaultValue = "true")
+    private boolean autoDiscoverClient = true;
 
     public KmsClient getKmsClient() {
         return kmsClient;
@@ -163,6 +165,19 @@ public class KMS2Configuration implements Cloneable {
     public void setTrustAllCertificates(boolean trustAllCertificates) {
         this.trustAllCertificates = trustAllCertificates;
     }
+    
+    public boolean isAutoDiscoverClient() {
+        return autoDiscoverClient;
+    }
+
+    /**
+     * Setting the autoDiscoverClient mechanism, if true, the component will
+     * look for a client instance in the registry automatically otherwise it
+     * will skip that checking.
+     */
+    public void setAutoDiscoverClient(boolean autoDiscoverClient) {
+        this.autoDiscoverClient = autoDiscoverClient;
+    }
 
     // *************************************************
     //
diff --git a/components/camel-aws2-kms/src/test/java/org/apache/camel/component/aws2/kms/KMSComponentClientRegistryTest.java b/components/camel-aws2-kms/src/test/java/org/apache/camel/component/aws2/kms/KMSComponentClientRegistryTest.java
index 9d67731..063ed03 100644
--- a/components/camel-aws2-kms/src/test/java/org/apache/camel/component/aws2/kms/KMSComponentClientRegistryTest.java
+++ b/components/camel-aws2-kms/src/test/java/org/apache/camel/component/aws2/kms/KMSComponentClientRegistryTest.java
@@ -20,6 +20,8 @@ import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotSame;
+import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
 public class KMSComponentClientRegistryTest extends CamelTestSupport {
@@ -43,4 +45,26 @@ public class KMSComponentClientRegistryTest extends CamelTestSupport {
             component.createEndpoint("aws2-kms://TestDomain");
         });
     }
+    
+    @Test
+    public void createEndpointWithAutoDiscoverClientFalse() throws Exception {
+
+        AmazonKMSClientMock clientMock = new AmazonKMSClientMock();
+        context.getRegistry().bind("amazonKmsClient", clientMock);
+        KMS2Component component = context.getComponent("aws2-kms", KMS2Component.class);
+        KMS2Endpoint endpoint = (KMS2Endpoint)component.createEndpoint("aws2-kms://TestDomain?accessKey=xxx&secretKey=yyy&region=eu-west-1&autoDiscoverClient=false");
+
+        assertNotSame(clientMock, endpoint.getConfiguration().getKmsClient());
+    }
+    
+    @Test
+    public void createEndpointWithAutoDiscoverClientTrue() throws Exception {
+
+        AmazonKMSClientMock clientMock = new AmazonKMSClientMock();
+        context.getRegistry().bind("amazonKmsClient", clientMock);
+        KMS2Component component = context.getComponent("aws2-kms", KMS2Component.class);
+        KMS2Endpoint endpoint = (KMS2Endpoint)component.createEndpoint("aws2-kms://TestDomain?accessKey=xxx&secretKey=yyy&region=eu-west-1");
+
+        assertSame(clientMock, endpoint.getConfiguration().getKmsClient());
+    }
 }
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KmsComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KmsComponentBuilderFactory.java
index 3539677..c3cad49 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KmsComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2KmsComponentBuilderFactory.java
@@ -47,6 +47,21 @@ public interface Aws2KmsComponentBuilderFactory {
      */
     interface Aws2KmsComponentBuilder extends ComponentBuilder<KMS2Component> {
         /**
+         * Setting the autoDiscoverClient mechanism, if true, the component will
+         * look for a client instance in the registry automatically otherwise it
+         * will skip that checking.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: common
+         */
+        default Aws2KmsComponentBuilder autoDiscoverClient(
+                boolean autoDiscoverClient) {
+            doSetProperty("autoDiscoverClient", autoDiscoverClient);
+            return this;
+        }
+        /**
          * Component configuration.
          * 
          * The option is a:
@@ -243,6 +258,7 @@ public interface Aws2KmsComponentBuilderFactory {
                 String name,
                 Object value) {
             switch (name) {
+            case "autoDiscoverClient": getOrCreateConfiguration((KMS2Component) component).setAutoDiscoverClient((boolean) value); return true;
             case "configuration": ((KMS2Component) component).setConfiguration((org.apache.camel.component.aws2.kms.KMS2Configuration) value); return true;
             case "kmsClient": getOrCreateConfiguration((KMS2Component) component).setKmsClient((software.amazon.awssdk.services.kms.KmsClient) value); return true;
             case "lazyStartProducer": ((KMS2Component) component).setLazyStartProducer((boolean) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index 5b8d333..74def4b 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -1252,7 +1252,7 @@ public class StaticEndpointBuilders {
      * 
      * @param path label
      */
-    public static org.apache.camel.builder.endpoint.dsl.KMS2EndpointBuilderFactory.KMS2EndpointBuilder aws2Kms(
+    static org.apache.camel.builder.endpoint.dsl.KMS2EndpointBuilderFactory.KMS2EndpointBuilder aws2Kms(
             String path) {
         return org.apache.camel.builder.endpoint.dsl.KMS2EndpointBuilderFactory.endpointBuilder("aws2-kms", path);
     }
@@ -1273,7 +1273,7 @@ public class StaticEndpointBuilders {
      * instead of the default name
      * @param path label
      */
-    public static org.apache.camel.builder.endpoint.dsl.KMS2EndpointBuilderFactory.KMS2EndpointBuilder aws2Kms(
+    static org.apache.camel.builder.endpoint.dsl.KMS2EndpointBuilderFactory.KMS2EndpointBuilder aws2Kms(
             String componentName,
             String path) {
         return org.apache.camel.builder.endpoint.dsl.KMS2EndpointBuilderFactory.endpointBuilder(componentName, path);
@@ -1996,7 +1996,7 @@ public class StaticEndpointBuilders {
      * 
      * @param path label
      */
-    static org.apache.camel.builder.endpoint.dsl.KMSEndpointBuilderFactory.KMSEndpointBuilder awsKms(
+    public static org.apache.camel.builder.endpoint.dsl.KMSEndpointBuilderFactory.KMSEndpointBuilder awsKms(
             String path) {
         return org.apache.camel.builder.endpoint.dsl.KMSEndpointBuilderFactory.endpointBuilder("aws-kms", path);
     }
@@ -2017,7 +2017,7 @@ public class StaticEndpointBuilders {
      * instead of the default name
      * @param path label
      */
-    static org.apache.camel.builder.endpoint.dsl.KMSEndpointBuilderFactory.KMSEndpointBuilder awsKms(
+    public static org.apache.camel.builder.endpoint.dsl.KMSEndpointBuilderFactory.KMSEndpointBuilder awsKms(
             String componentName,
             String path) {
         return org.apache.camel.builder.endpoint.dsl.KMSEndpointBuilderFactory.endpointBuilder(componentName, path);
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KMS2EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KMS2EndpointBuilderFactory.java
index bb93f56..ece8c7c 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KMS2EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KMS2EndpointBuilderFactory.java
@@ -39,6 +39,35 @@ public interface KMS2EndpointBuilderFactory {
             return (AdvancedKMS2EndpointBuilder) this;
         }
         /**
+         * Setting the autoDiscoverClient mechanism, if true, the component will
+         * look for a client instance in the registry automatically otherwise it
+         * will skip that checking.
+         * 
+         * The option is a: <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: common
+         */
+        default KMS2EndpointBuilder autoDiscoverClient(
+                boolean autoDiscoverClient) {
+            doSetProperty("autoDiscoverClient", autoDiscoverClient);
+            return this;
+        }
+        /**
+         * Setting the autoDiscoverClient mechanism, if true, the component will
+         * look for a client instance in the registry automatically otherwise it
+         * will skip that checking.
+         * 
+         * The option will be converted to a <code>boolean</code> type.
+         * 
+         * Default: true
+         * Group: common
+         */
+        default KMS2EndpointBuilder autoDiscoverClient(String autoDiscoverClient) {
+            doSetProperty("autoDiscoverClient", autoDiscoverClient);
+            return this;
+        }
+        /**
          * To use a existing configured AWS KMS as client.
          * 
          * The option is a: