gnodet-bot commented on code in PR #26564:
URL: https://github.com/apache/camel/pull/26564#discussion_r4040797664
##########
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` response
+version:
Review Comment:
⚠️ **Catalog still out of sync with source.** The source file was fully
updated to read `response\nheader is set to the version id of the retrieved
secret:` but the catalog was only partially synced — line 597 still says
`version:` instead of `header is set to the version id of the retrieved
secret:`.
```suggestion
The message body becomes the value of the secret, and the
`CamelAwsSecretsManagerSecretVersionId` response
header is set to the version id of the retrieved secret:
```
--
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]