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 8f9abe80fcb9cb2528eac0123981e78278b67c2a Author: Nicolas Filotto <[email protected]> AuthorDate: Wed Mar 16 10:21:58 2022 +0100 CAMEL-17792: Add doc about the message headers of camel-aws2-iam --- .../apache/camel/component/aws2/iam/aws2-iam.json | 8 ++++++++ .../src/main/docs/aws2-iam-component.adoc | 24 ++++------------------ .../camel/component/aws2/iam/IAM2Constants.java | 9 ++++++++ .../camel/component/aws2/iam/IAM2Endpoint.java | 3 ++- 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/components/camel-aws/camel-aws2-iam/src/generated/resources/org/apache/camel/component/aws2/iam/aws2-iam.json b/components/camel-aws/camel-aws2-iam/src/generated/resources/org/apache/camel/component/aws2/iam/aws2-iam.json index e821d5d..17ca9d9 100644 --- a/components/camel-aws/camel-aws2-iam/src/generated/resources/org/apache/camel/component/aws2/iam/aws2-iam.json +++ b/components/camel-aws/camel-aws2-iam/src/generated/resources/org/apache/camel/component/aws2/iam/aws2-iam.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.iam.IAM2Configuration", "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.iam.IAM2Configuration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" } }, + "headers": { + "CamelAwsIAMOperation": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform" }, + "CamelAwsIAMUsername": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The username for the user you want to manage" }, + "CamelAwsIAMAccessKeyID": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The accessKey you want to manage" }, + "CamelAwsIAMAccessKeyStatus": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Status of the AccessKey you want to set, possible value are active and inactive" }, + "CamelAwsIAMGroupName": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of an AWS IAM Group" }, + "CamelAwsIAMGroupPath": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The path of an AWS IAM Group" } + }, "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.iam.IAM2Configuration", "configurationField": "configuration", "description": "Logical name" }, "iamClient": { "kind": "parameter", "displayName": "Iam Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.iam.IamClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws2.iam.IAM2Configuration", "configurationField": "configuration", "description": "To use a existing configured AWS IAM as client" }, diff --git a/components/camel-aws/camel-aws2-iam/src/main/docs/aws2-iam-component.adoc b/components/camel-aws/camel-aws2-iam/src/main/docs/aws2-iam-component.adoc index 5dfc64e..cec662f 100644 --- a/components/camel-aws/camel-aws2-iam/src/main/docs/aws2-iam-component.adoc +++ b/components/camel-aws/camel-aws2-iam/src/main/docs/aws2-iam-component.adoc @@ -61,26 +61,6 @@ the https://aws.amazon.com/iam/[Amazon IAM] service. == Usage -=== Message headers evaluated by the IAM producer - -[width="100%",cols="10%,10%,80%",options="header",] -|======================================================================= -|Header |Type |Description - -|`CamelAwsIAMOperation` |`String` |The operation we want to perform - -|`CamelAwsIAMUsername` |`String` |The username for the user you want to manage - -|`CamelAwsIAMAccessKeyID` |`String` |The accessKey you want to manage - -|`CamelAwsIAMAccessKeyStatus` |`String` |The Status of the AccessKey you want to set, possible value are active and inactive - -|`CamelAwsIAMGroupName` |`String` |The name of an AWS IAM Group - -|`CamelAwsIAMGroupPath` |`String` |The path of an AWS IAM Group -|======================================================================= - - === Static credentials vs Default Credential Provider You have the possibility of avoiding the usage of explicit static credentials, by specifying the useDefaultCredentialsProvider option and set it to true. @@ -94,6 +74,10 @@ 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] +// component headers: START +include::partial$component-endpoint-headers.adoc[] +// component headers: END + === IAM Producer operations Camel-AWS2 IAM component provides the following operation on the producer side: diff --git a/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Constants.java b/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Constants.java index 15898c2..acf66c5 100644 --- a/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Constants.java +++ b/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Constants.java @@ -16,14 +16,23 @@ */ package org.apache.camel.component.aws2.iam; +import org.apache.camel.spi.Metadata; + /** * Constants used in Camel AWS IAM module */ public interface IAM2Constants { + @Metadata(description = "The operation we want to perform", javaType = "String") String OPERATION = "CamelAwsIAMOperation"; + @Metadata(description = "The username for the user you want to manage", javaType = "String") String USERNAME = "CamelAwsIAMUsername"; + @Metadata(description = "The accessKey you want to manage", javaType = "String") String ACCESS_KEY_ID = "CamelAwsIAMAccessKeyID"; + @Metadata(description = "The Status of the AccessKey you want to set, possible value are active and inactive", + javaType = "String") String ACCESS_KEY_STATUS = "CamelAwsIAMAccessKeyStatus"; + @Metadata(description = "The name of an AWS IAM Group", javaType = "String") String GROUP_NAME = "CamelAwsIAMGroupName"; + @Metadata(description = "The path of an AWS IAM Group", javaType = "String") String GROUP_PATH = "CamelAwsIAMGroupPath"; } diff --git a/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Endpoint.java b/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Endpoint.java index cae983b..e3411af 100644 --- a/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Endpoint.java +++ b/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Endpoint.java @@ -32,7 +32,8 @@ import software.amazon.awssdk.services.iam.IamClient; * Manage AWS IAM instances using AWS SDK version 2.x. */ @UriEndpoint(firstVersion = "3.1.0", scheme = "aws2-iam", title = "AWS Identity and Access Management (IAM)", - syntax = "aws2-iam:label", producerOnly = true, category = { Category.CLOUD, Category.MANAGEMENT }) + syntax = "aws2-iam:label", producerOnly = true, category = { Category.CLOUD, Category.MANAGEMENT }, + headersClass = IAM2Constants.class) public class IAM2Endpoint extends ScheduledPollEndpoint { private IamClient iamClient;
