gnodet-bot commented on code in PR #26564:
URL: https://github.com/apache/camel/pull/26564#discussion_r4040759756
##########
catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws-secrets-manager-component.adoc:
##########
@@ -526,6 +526,216 @@ Camel-AWS-Secrets-manager component provides the
following operation on the prod
- batchGetSecret
- updateSecret
- replicateSecretToRegions
+- restoreSecret
+- putSecretValue
+
+The `operation` option selects what to do (the
`CamelAwsSecretsManagerOperation` header overrides it per
+message), and the secret to work on comes from a header:
`CamelAwsSecretsManagerSecretName` when creating a
+secret, `CamelAwsSecretsManagerSecretId` (the name or the ARN) for the other
operations. The path of the
+endpoint is a logical name for the client, not a secret. With
`pojoRequest=true` the message body is the AWS
+SDK request object instead.
+
+==== Creating a secret
+
+The message body is the value of the secret, as a string (with
`binaryPayload=true` it is stored as binary):
+
+[tabs]
+====
+Java::
++
+[source,java]
+----
+from("direct:createSecret")
+ .setHeader(SecretsManagerConstants.SECRET_NAME, constant("database"))
+ .setBody(constant("{\"username\":\"camel\",\"password\":\"secret\"}"))
+
.to("aws-secrets-manager:secrets?operation=createSecret®ion=eu-west-1&useDefaultCredentialsProvider=true");
+----
+
+XML::
++
+[source,xml]
+----
+<camelContext>
+ <route>
+ <from uri="direct:createSecret"/>
+ <setHeader name="CamelAwsSecretsManagerSecretName">
+ <constant>database</constant>
+ </setHeader>
+ <setBody>
+ <constant>{"username":"camel","password":"secret"}</constant>
+ </setBody>
+ <to
uri="aws-secrets-manager:secrets?operation=createSecret&region=eu-west-1&useDefaultCredentialsProvider=true"/>
+ </route>
+</camelContext>
+----
+
+YAML::
++
+[source,yaml]
+----
+- route:
+ from:
+ uri: direct:createSecret
+ steps:
+ - setHeader:
+ name: CamelAwsSecretsManagerSecretName
+ expression:
+ constant:
+ expression: database
+ - setBody:
+ expression:
+ constant:
+ expression: '{"username":"camel","password":"secret"}'
+ - to:
+ uri:
aws-secrets-manager:secrets?operation=createSecret®ion=eu-west-1&useDefaultCredentialsProvider=true
+----
+====
+
+==== Getting a secret
+
+The message body becomes the value of the secret, and the
`CamelAwsSecretsManagerSecretVersionId` header its
Review Comment:
**Catalog out of sync with source — old wording not updated here.**
The new commit fixed
`components/camel-aws/camel-aws-secrets-manager/src/main/docs/aws-secrets-manager-component.adoc`
but left the catalog copy with the previous ambiguous description. The catalog
is auto-generated from the source, so the fix should be regenerated or applied
directly:
```suggestion
The message body becomes the value of the secret, and the
`CamelAwsSecretsManagerSecretVersionId` response
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]