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 933df5974f4ea8c03ff9b3c96ec727d294375191
Author: Nicolas Filotto <[email protected]>
AuthorDate: Wed Mar 16 15:40:52 2022 +0100

    CAMEL-17792: Add doc about the message headers of camel-aws2-sts
---
 .../resources/org/apache/camel/component/aws2/sts/aws2-sts.json   | 6 ++++++
 .../camel-aws2-sts/src/main/docs/aws2-sts-component.adoc          | 8 ++++++--
 .../java/org/apache/camel/component/aws2/sts/STS2Constants.java   | 6 ++++++
 .../java/org/apache/camel/component/aws2/sts/STS2Endpoint.java    | 3 ++-
 4 files changed, 20 insertions(+), 3 deletions(-)

diff --git 
a/components/camel-aws/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json
 
b/components/camel-aws/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json
index 549e78e..5266eab 100644
--- 
a/components/camel-aws/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json
+++ 
b/components/camel-aws/camel-aws2-sts/src/generated/resources/org/apache/camel/component/aws2/sts/aws2-sts.json
@@ -39,6 +39,12 @@
     "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.sts.STS2Configuration", "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.sts.STS2Configuration", "configurationField": 
"configuration", "description": "Amazon AWS Secret Key" }
   },
+  "headers": {
+    "CamelAwsStsOperation": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The operation we want to perform" },
+    "CamelAwsStsRoleArn": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The Amazon Resource Name (ARN) of the role to assume." },
+    "CamelAwsStsRoleSessionName": { "kind": "header", "displayName": "", 
"group": "producer", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "An identifier for the assumed role session." },
+    "CamelAwsStsFederatedName": { "kind": "header", "displayName": "", 
"group": "producer", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The name of the federated user." }
+  },
   "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.sts.STS2Configuration", "configurationField": 
"configuration", "description": "Logical name" },
     "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start 
Producer", "group": "producer", "label": "producer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": 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 sta [...]
diff --git 
a/components/camel-aws/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc 
b/components/camel-aws/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc
index 0bd23c0..cd4fd43 100644
--- a/components/camel-aws/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc
+++ b/components/camel-aws/camel-aws2-sts/src/main/docs/aws2-sts-component.adoc
@@ -69,7 +69,11 @@ You have the possibility of avoiding the usage of explicit 
static credentials, b
  - Web Identity Token from AWS STS.
  - The shared credentials and config files.
  - Amazon ECS container credentials - loaded from the Amazon ECS if the 
environment variable AWS_CONTAINER_CREDENTIALS_RELATIVE_URI is set.
- - Amazon EC2 Instance profile credentials. 
+ - Amazon EC2 Instance profile credentials.
+
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 === STS Producer operations
 
@@ -77,7 +81,7 @@ Camel-AWS STS component provides the following operation on 
the producer side:
 
 - assumeRole
 - getSessionToken
-- getFedeationToken
+- getFederationToken
 
 == Producer Examples
 
diff --git 
a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Constants.java
 
b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Constants.java
index f95ab66..ea486a6 100644
--- 
a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Constants.java
+++ 
b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Constants.java
@@ -16,13 +16,19 @@
  */
 package org.apache.camel.component.aws2.sts;
 
+import org.apache.camel.spi.Metadata;
+
 /**
  * Constants used in Camel AWS2 STS module
  */
 public interface STS2Constants {
+    @Metadata(description = "The operation we want to perform", javaType = 
"String")
     String OPERATION = "CamelAwsStsOperation";
+    @Metadata(description = "The Amazon Resource Name (ARN) of the role to 
assume.", javaType = "String")
     String ROLE_ARN = "CamelAwsStsRoleArn";
+    @Metadata(description = "An identifier for the assumed role session.", 
javaType = "String")
     String ROLE_SESSION_NAME = "CamelAwsStsRoleSessionName";
+    @Metadata(description = "The name of the federated user.", javaType = 
"String")
     String FEDERATED_NAME = "CamelAwsStsFederatedName";
     String ACCESS_KEY_ID = "CamelAwsStsAccessKeyId";
     String SECRET_KEY_ID = "CamelAwsStsSecretKey";
diff --git 
a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Endpoint.java
 
b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Endpoint.java
index e6e4391..5796752 100644
--- 
a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Endpoint.java
+++ 
b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Endpoint.java
@@ -34,7 +34,8 @@ import software.amazon.awssdk.services.sts.StsClient;
 @UriEndpoint(firstVersion = "3.5.0", scheme = "aws2-sts", title = "AWS 
Security Token Service (STS)",
              syntax = "aws2-sts:label", producerOnly = true, category = {
                      Category.CLOUD,
-                     Category.MANAGEMENT })
+                     Category.MANAGEMENT },
+             headersClass = STS2Constants.class)
 public class STS2Endpoint extends DefaultEndpoint {
 
     private StsClient stsClient;

Reply via email to