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 2024/06/11 09:24:51 UTC

(camel) branch CAMEL-20798-aws-config created (now 390aaac8d34)

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

acosentino pushed a change to branch CAMEL-20798-aws-config
in repository https://gitbox.apache.org/repos/asf/camel.git


      at 390aaac8d34 CAMEL-20798: EndpointServiceLocation on components to make it possible to know which remote system Camel connects to to assist for monitoring and observability - AWS Config

This branch includes the following new commits:

     new 390aaac8d34 CAMEL-20798: EndpointServiceLocation on components to make it possible to know which remote system Camel connects to to assist for monitoring and observability - AWS Config

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(camel) 01/01: CAMEL-20798: EndpointServiceLocation on components to make it possible to know which remote system Camel connects to to assist for monitoring and observability - AWS Config

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch CAMEL-20798-aws-config
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 390aaac8d34ce97ff2a35956a81c6e4bd610186d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jun 11 11:24:22 2024 +0200

    CAMEL-20798: EndpointServiceLocation on components to make it possible to know which remote system Camel connects to to assist for monitoring and observability - AWS Config
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../component/aws/config/AWSConfigEndpoint.java    | 20 +++++-
 ...sticsearchRestClientEndpointBuilderFactory.java | 74 ++++++++++++++++++++++
 2 files changed, 93 insertions(+), 1 deletion(-)

diff --git a/components/camel-aws/camel-aws-config/src/main/java/org/apache/camel/component/aws/config/AWSConfigEndpoint.java b/components/camel-aws/camel-aws-config/src/main/java/org/apache/camel/component/aws/config/AWSConfigEndpoint.java
index a0448526a92..b073f5c5b46 100644
--- a/components/camel-aws/camel-aws-config/src/main/java/org/apache/camel/component/aws/config/AWSConfigEndpoint.java
+++ b/components/camel-aws/camel-aws-config/src/main/java/org/apache/camel/component/aws/config/AWSConfigEndpoint.java
@@ -22,6 +22,7 @@ import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.component.aws.config.client.AWSConfigClientFactory;
+import org.apache.camel.spi.EndpointServiceLocation;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.support.DefaultEndpoint;
@@ -34,7 +35,7 @@ import software.amazon.awssdk.services.config.ConfigClient;
 @UriEndpoint(firstVersion = "4.3.0", scheme = "aws-config", title = "AWS Config Service",
              syntax = "aws-config:label", producerOnly = true, category = { Category.CLOUD, Category.MANAGEMENT },
              headersClass = AWSConfigConstants.class)
-public class AWSConfigEndpoint extends DefaultEndpoint {
+public class AWSConfigEndpoint extends DefaultEndpoint implements EndpointServiceLocation {
 
     private ConfigClient configClient;
 
@@ -86,4 +87,21 @@ public class AWSConfigEndpoint extends DefaultEndpoint {
     public ConfigClient getConfigClient() {
         return configClient;
     }
+
+    @Override
+    public String getServiceUrl() {
+        if (!configuration.isOverrideEndpoint()) {
+            if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+                return configuration.getRegion();
+            }
+        } else if (ObjectHelper.isNotEmpty(configuration.getUriEndpointOverride())) {
+            return configuration.getUriEndpointOverride();
+        }
+        return null;
+    }
+
+    @Override
+    public String getServiceProtocol() {
+        return "config";
+    }
 }
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ElasticsearchRestClientEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ElasticsearchRestClientEndpointBuilderFactory.java
index 681cf48d4d5..83c7535998c 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ElasticsearchRestClientEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ElasticsearchRestClientEndpointBuilderFactory.java
@@ -393,6 +393,20 @@ public interface ElasticsearchRestClientEndpointBuilderFactory {
     }
 
     public interface ElasticsearchRestClientBuilders {
+        /**
+         * Elasticsearch Low level Rest Client (camel-elasticsearch-rest-client)
+         * Perform queries and other operations on Elasticsearch or OpenSearch
+         * (uses low-level client).
+         * 
+         * Category: search
+         * Since: 4.3
+         * Maven coordinates: org.apache.camel:camel-elasticsearch-rest-client
+         * 
+         * @return the dsl builder for the headers' name.
+         */
+        default ElasticsearchRestClientHeaderNameBuilder elasticsearchRestClient() {
+            return ElasticsearchRestClientHeaderNameBuilder.INSTANCE;
+        }
         /**
          * Elasticsearch Low level Rest Client (camel-elasticsearch-rest-client)
          * Perform queries and other operations on Elasticsearch or OpenSearch
@@ -437,6 +451,66 @@ public interface ElasticsearchRestClientEndpointBuilderFactory {
         }
 
     }
+    /**
+     * The builder of headers' name for the Elasticsearch Low level Rest Client component.
+     */
+    public static class ElasticsearchRestClientHeaderNameBuilder {
+        /**
+         * The internal instance of the builder used to access to all the
+         * methods representing the name of headers.
+         */
+        private static final ElasticsearchRestClientHeaderNameBuilder INSTANCE = new ElasticsearchRestClientHeaderNameBuilder();
+
+        /**
+         * ID of the object to index or retrieve or delete.
+         * 
+         * The option is a: {@code String} type.
+         * 
+         * Group: producer
+         * 
+         * @return the name of the header {@code ID}.
+         */
+        public String iD() {
+            return "ID";
+        }
+        /**
+         * The JSON Query to perform for search.
+         * 
+         * The option is a: {@code String} type.
+         * 
+         * Group: producer
+         * 
+         * @return the name of the header {@code SEARCH_QUERY}.
+         */
+        public String searchQuery() {
+            return "SEARCH_QUERY";
+        }
+        /**
+         * Advanced - The JSON Index Settings and/or Mappings Query to perform
+         * to create an index.
+         * 
+         * The option is a: {@code String} type.
+         * 
+         * Group: producer
+         * 
+         * @return the name of the header {@code INDEX_SETTINGS}.
+         */
+        public String indexSettings() {
+            return "INDEX_SETTINGS";
+        }
+        /**
+         * The Index name.
+         * 
+         * The option is a: {@code String} type.
+         * 
+         * Group: producer
+         * 
+         * @return the name of the header {@code INDEX_NAME}.
+         */
+        public String indexName() {
+            return "INDEX_NAME";
+        }
+    }
     static ElasticsearchRestClientEndpointBuilder endpointBuilder(String componentName, String path) {
         class ElasticsearchRestClientEndpointBuilderImpl extends AbstractEndpointBuilder implements ElasticsearchRestClientEndpointBuilder, AdvancedElasticsearchRestClientEndpointBuilder {
             public ElasticsearchRestClientEndpointBuilderImpl(String path) {