This is an automated email from the ASF dual-hosted git repository. nfilotto pushed a commit to branch CAMEL-17792/doc-message-headers in repository https://gitbox.apache.org/repos/asf/camel.git
commit aee5840950d2b15bb8a83fa4830b2ae5d2be3bdf Author: Nicolas Filotto <[email protected]> AuthorDate: Wed Mar 16 09:56:28 2022 +0100 CAMEL-17792: Add doc about the message headers of camel-aws2-ecs --- .../org/apache/camel/component/aws2/ecs/aws2-ecs.json | 5 +++++ .../camel-aws2-ecs/src/main/docs/aws2-ecs-component.adoc | 15 +++------------ .../apache/camel/component/aws2/ecs/ECS2Constants.java | 5 +++++ .../org/apache/camel/component/aws2/ecs/ECS2Endpoint.java | 3 ++- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/components/camel-aws/camel-aws2-ecs/src/generated/resources/org/apache/camel/component/aws2/ecs/aws2-ecs.json b/components/camel-aws/camel-aws2-ecs/src/generated/resources/org/apache/camel/component/aws2/ecs/aws2-ecs.json index 2050055..9e15597 100644 --- a/components/camel-aws/camel-aws2-ecs/src/generated/resources/org/apache/camel/component/aws2/ecs/aws2-ecs.json +++ b/components/camel-aws/camel-aws2-ecs/src/generated/resources/org/apache/camel/component/aws2/ecs/aws2-ecs.json @@ -39,6 +39,11 @@ "accessKey": { "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.ecs.ECS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Access Key" }, "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws2.ecs.ECS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" } }, + "headers": { + "CamelAwsECSOperation": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform" }, + "CamelAwsECSMaxResults": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The limit number of results while listing clusters" }, + "CamelAwsECSClusterName": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster name" } + }, "properties": { "label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.ecs.ECS2Configuration", "configurationField": "configuration", "description": "Logical name" }, "ecsClient": { "kind": "parameter", "displayName": "Ecs Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.ecs.EcsClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.ecs.ECS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS ECS as client" }, diff --git a/components/camel-aws/camel-aws2-ecs/src/main/docs/aws2-ecs-component.adoc b/components/camel-aws/camel-aws2-ecs/src/main/docs/aws2-ecs-component.adoc index 630c0eb..f31a667 100644 --- a/components/camel-aws/camel-aws2-ecs/src/main/docs/aws2-ecs-component.adoc +++ b/components/camel-aws/camel-aws2-ecs/src/main/docs/aws2-ecs-component.adoc @@ -67,18 +67,9 @@ You have the possibility of avoiding the usage of explicit static credentials, b For more information about this you can look at https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html[AWS credentials documentation] -=== 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 -|======================================================================= +// component headers: START +include::partial$component-endpoint-headers.adoc[] +// component headers: END === ECS Producer operations diff --git a/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Constants.java b/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Constants.java index 49debe6..bf228eb1 100644 --- a/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Constants.java +++ b/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Constants.java @@ -16,11 +16,16 @@ */ package org.apache.camel.component.aws2.ecs; +import org.apache.camel.spi.Metadata; + /** * Constants used in Camel AWS2 ECS module */ public interface ECS2Constants { + @Metadata(description = "The operation we want to perform", javaType = "String") String OPERATION = "CamelAwsECSOperation"; + @Metadata(description = "The limit number of results while listing clusters", javaType = "Integer") String MAX_RESULTS = "CamelAwsECSMaxResults"; + @Metadata(description = "The cluster name", javaType = "String") String CLUSTER_NAME = "CamelAwsECSClusterName"; } diff --git a/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Endpoint.java b/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Endpoint.java index cf3f8d1..882a282 100644 --- a/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Endpoint.java +++ b/components/camel-aws/camel-aws2-ecs/src/main/java/org/apache/camel/component/aws2/ecs/ECS2Endpoint.java @@ -32,7 +32,8 @@ import software.amazon.awssdk.services.ecs.EcsClient; * Manage AWS ECS cluster instances using AWS SDK version 2.x. */ @UriEndpoint(firstVersion = "3.1.0", scheme = "aws2-ecs", title = "AWS Elastic Container Service (ECS)", - syntax = "aws2-ecs:label", producerOnly = true, category = { Category.CLOUD, Category.MANAGEMENT }) + syntax = "aws2-ecs:label", producerOnly = true, category = { Category.CLOUD, Category.MANAGEMENT }, + headersClass = ECS2Constants.class) public class ECS2Endpoint extends ScheduledPollEndpoint { private EcsClient ecsClient;
