This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 37d784b295c6708329c58ecbf43bcf8bd488c2e9
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Wed Aug 5 11:48:45 2020 +0200

    Regen catalog
---
 .../camel/catalog/docs/aws2-sts-component.adoc     | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sts-component.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sts-component.adoc
index c1ef0ef..3aa5079 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sts-component.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-sts-component.adoc
@@ -126,12 +126,37 @@ Camel-AWS STS component provides the following operation 
on the producer side:
 
 - assumeRole
 
+== Producer Examples
+
+- assumeRole: this operation will make an AWS user assume a different role 
temporary
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:createUser")
+    .setHeader(STS2Constants.ROLE_ARN, constant("arn:123"))
+    .setHeader(STS2Constants.ROLE_SESSION_NAME, constant("groot"))
+    .to("aws2-sts://test?stsClient=#amazonSTSClient&operation=assumeRole")
+--------------------------------------------------------------------------------
+
 == Automatic detection of StsClient client in registry
 
 The component is capable of detecting the presence of an StsClient bean into 
the registry.
 If it's the only instance of that type it will be used as client and you won't 
have to define it as uri parameter.
 This may be really useful for smarter configuration of the endpoint.
 
+== Using a POJO as body
+
+Sometimes build an AWS Request can be complex, because of multiple options. We 
introduce the possibility to use a POJO as body.
+In AWS STS, as example for Assume Role request, you can do something like:
+
+------------------------------------------------------------------------------------------------------
+from("direct:createUser")
+     
.setBody(AssumeRoleRequest.builder().roleArn("arn:123").roleSessionName("groot").build())
+    
.to("aws2-sts://test?stsClient=#amazonSTSClient&operation=assumeRole&pojoRequest=true")
+------------------------------------------------------------------------------------------------------
+
+In this way you'll pass the request directly without the need of passing 
headers and options specifically related to this operation.
+
 == Dependencies
 
 Maven users will need to add the following dependency to their pom.xml.

Reply via email to