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 e3ecfee3b2482965ca8349681567b0d9fdc8da0e Author: Nicolas Filotto <[email protected]> AuthorDate: Wed Mar 16 10:02:59 2022 +0100 CAMEL-17792: Add doc about the message headers of camel-aws2-eks --- .../apache/camel/component/aws2/eks/aws2-eks.json | 8 ++++++++ .../src/main/docs/aws2-eks-component.adoc | 21 +++------------------ .../camel/component/aws2/eks/EKS2Constants.java | 9 +++++++++ .../camel/component/aws2/eks/EKS2Endpoint.java | 3 ++- 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/components/camel-aws/camel-aws2-eks/src/generated/resources/org/apache/camel/component/aws2/eks/aws2-eks.json b/components/camel-aws/camel-aws2-eks/src/generated/resources/org/apache/camel/component/aws2/eks/aws2-eks.json index 4121689..0c1b393 100644 --- a/components/camel-aws/camel-aws2-eks/src/generated/resources/org/apache/camel/component/aws2/eks/aws2-eks.json +++ b/components/camel-aws/camel-aws2-eks/src/generated/resources/org/apache/camel/component/aws2/eks/aws2-eks.json @@ -39,6 +39,14 @@ "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.eks.EKS2Configuration", "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.eks.EKS2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" } }, + "headers": { + "CamelAwsEKSOperation": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform" }, + "CamelAwsEKSMaxResults": { "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" }, + "CamelAwsEKSDescription": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "A key description to use while performing a createKey operation" }, + "CamelAwsEKSClusterName": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The cluster name" }, + "CamelAwsEKSRoleARN": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The role ARN to use while creating the cluster" }, + "CamelAwsEKSVPCConfig": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "software.amazon.awssdk.services.eks.model.VpcConfigRequest", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The VPC config for the creations of an EKS cluster" } + }, "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.eks.EKS2Configuration", "configurationField": "configuration", "description": "Logical name" }, "eksClient": { "kind": "parameter", "displayName": "Eks Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eks.EksClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eks.EKS2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS EKS as client" }, diff --git a/components/camel-aws/camel-aws2-eks/src/main/docs/aws2-eks-component.adoc b/components/camel-aws/camel-aws2-eks/src/main/docs/aws2-eks-component.adoc index 5e956f7..fd0b4dc 100644 --- a/components/camel-aws/camel-aws2-eks/src/main/docs/aws2-eks-component.adoc +++ b/components/camel-aws/camel-aws2-eks/src/main/docs/aws2-eks-component.adoc @@ -69,24 +69,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 EKS producer - -[width="100%",cols="10%,10%,80%",options="header",] -|======================================================================= -|Header |Type |Description - -|`CamelAwsEKSMaxResults` |`Integer` |The limit number of results while listing clusters - -|`CamelAwsEKSOperation` |`String` |The operation we want to perform - -|`CamelAwsEKSDescription` |`String` |A key description to use while performing a createKey operation - -|`CamelAwsEKSClusterName` |`String` |The cluster name - -|`CamelAwsEKSRoleARN` |`String` |The role ARN to use while creating the cluster - -|`CamelAwsEKSVPCConfig` |`VPCConfigRequest` |The VPC config for the creations of an EKS cluster -|======================================================================= +// component headers: START +include::partial$component-endpoint-headers.adoc[] +// component headers: END === EKS Producer operations diff --git a/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Constants.java b/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Constants.java index 97a079b..f673f41 100644 --- a/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Constants.java +++ b/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Constants.java @@ -16,14 +16,23 @@ */ package org.apache.camel.component.aws2.eks; +import org.apache.camel.spi.Metadata; + /** * Constants used in Camel AWS EKS module SDK v2 */ public interface EKS2Constants { + @Metadata(description = "The operation we want to perform", javaType = "String") String OPERATION = "CamelAwsEKSOperation"; + @Metadata(description = "The limit number of results while listing clusters", javaType = "Integer") String MAX_RESULTS = "CamelAwsEKSMaxResults"; + @Metadata(description = "A key description to use while performing a createKey operation", javaType = "String") String DESCRIPTION = "CamelAwsEKSDescription"; + @Metadata(description = "The cluster name", javaType = "String") String CLUSTER_NAME = "CamelAwsEKSClusterName"; + @Metadata(description = "The role ARN to use while creating the cluster", javaType = "String") String ROLE_ARN = "CamelAwsEKSRoleARN"; + @Metadata(description = "The VPC config for the creations of an EKS cluster", + javaType = "software.amazon.awssdk.services.eks.model.VpcConfigRequest") String VPC_CONFIG = "CamelAwsEKSVPCConfig"; } diff --git a/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Endpoint.java b/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Endpoint.java index 9bd74b9..5b0c1f4 100644 --- a/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Endpoint.java +++ b/components/camel-aws/camel-aws2-eks/src/main/java/org/apache/camel/component/aws2/eks/EKS2Endpoint.java @@ -32,7 +32,8 @@ import software.amazon.awssdk.services.eks.EksClient; * Manage AWS EKS cluster instances using AWS SDK version 2.x. */ @UriEndpoint(firstVersion = "3.1.0", scheme = "aws2-eks", title = "AWS Elastic Kubernetes Service (EKS)", - syntax = "aws2-eks:label", producerOnly = true, category = { Category.CLOUD, Category.MANAGEMENT }) + syntax = "aws2-eks:label", producerOnly = true, category = { Category.CLOUD, Category.MANAGEMENT }, + headersClass = EKS2Constants.class) public class EKS2Endpoint extends ScheduledPollEndpoint { private EksClient eksClient;
